本文整理汇总了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__()