本文整理匯總了Python中hail.java.Env.jutils方法的典型用法代碼示例。如果您正苦於以下問題:Python Env.jutils方法的具體用法?Python Env.jutils怎麽用?Python Env.jutils使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類hail.java.Env
的用法示例。
在下文中一共展示了Env.jutils方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: _convert_to_j
# 需要導入模塊: from hail.java import Env [as 別名]
# 或者: from hail.java.Env import jutils [as 別名]
def _convert_to_j(self, annotation):
if annotation is not None:
return Env.jutils().arrayListToSet(
[self.element_type._convert_to_j(elt) for elt in annotation]
)
else:
return annotation
示例2: hadoop_copy
# 需要導入模塊: from hail.java import Env [as 別名]
# 或者: from hail.java.Env import jutils [as 別名]
def hadoop_copy(src, dest):
"""Copy a file through the Hadoop filesystem API.
Supports distributed file systems like hdfs, gs, and s3.
**Examples**
>>> hadoop_copy('gs://hail-common/LCR.interval_list', 'file:///mnt/data/LCR.interval_list') # doctest: +SKIP
**Notes**
The provided source and destination file paths must be URIs
(uniform resource identifiers).
:param str src: Source file URI.
:param str dest: Destination file URI.
"""
Env.jutils().copyFile(src, dest, Env.hc()._jhc)
示例3: _convert_to_py
# 需要導入模塊: from hail.java import Env [as 別名]
# 或者: from hail.java.Env import jutils [as 別名]
def _convert_to_py(self, annotation):
if annotation:
lst = Env.jutils().iterableToArrayList(annotation)
d = dict()
for x in lst:
d[self.key_type._convert_to_py(x._1())] = self.value_type._convert_to_py(x._2())
return d
else:
return annotation
示例4: _init_from_java
# 需要導入模塊: from hail.java import Env [as 別名]
# 或者: from hail.java.Env import jutils [as 別名]
def _init_from_java(self, jtype):
jfields = Env.jutils().iterableToArrayList(jtype.fields())
self.fields = [Field(f.name(), Type._from_java(f.typ()), dict(f.attrsJava())) for f in jfields]
示例5: __init__
# 需要導入模塊: from hail.java import Env [as 別名]
# 或者: from hail.java.Env import jutils [as 別名]
def __init__(self, path):
self._jfile = Env.jutils().writeFile(path, Env.hc()._jhc)
super(HadoopWriter, self).__init__()