/usr/local/lib64/python3.6/site-packages/pyarrow/__pycache__
NameSizeModeActions
benchmark.cpython-36.pyc2080644editdlrm
cffi.cpython-36.pyc14820644editdlrm
compat.cpython-36.pyc3810644editdlrm
compute.cpython-36.pyc202630644editdlrm
csv.cpython-36.pyc3820644editdlrm
cuda.cpython-36.pyc4050644editdlrm
dataset.cpython-36.pyc279700644editdlrm
feather.cpython-36.pyc77390644editdlrm
filesystem.cpython-36.pyc144020644editdlrm
flight.cpython-36.pyc13530644editdlrm
fs.cpython-36.pyc103950644editdlrm
hdfs.cpython-36.pyc70550644editdlrm
ipc.cpython-36.pyc73940644editdlrm
json.cpython-36.pyc2310644editdlrm
jvm.cpython-36.pyc80350644editdlrm
orc.cpython-36.pyc51400644editdlrm
pandas_compat.cpython-36.pyc276950644editdlrm
parquet.cpython-36.pyc666090644editdlrm
plasma.cpython-36.pyc40690644editdlrm
serialization.cpython-36.pyc137370644editdlrm
types.cpython-36.pyc120830644editdlrm
util.cpython-36.pyc41500644editdlrm
_generated_version.cpython-36.pyc2230644editdlrm
__init__.cpython-36.pyc164760644editdlrm
Edit: /usr/local/lib64/python3.6/site-packages/pyarrow/__pycache__/hdfs.cpython-36.pyc (7055B)
3 8%Egg@sddlZddlZddlZddlZddlmZmZddlmZddl j Z Gddde j eZ ddZ dd Z d d Zd d ZdddZdddZdS)N) implements _DEPR_MSG) FileSystemcseZdZdZdddZdd Zd d Zeej fd d Z eej fddZ eej dfdd Z fddZ eej fddZ eejfddZdfdd ZddZZS) HadoopFileSystema DEPRECATED: FileSystem interface for HDFS cluster. See pyarrow.hdfs.connect for full connection details .. deprecated:: 2.0 ``pyarrow.hdfs.HadoopFileSystem`` is deprecated, please use ``pyarrow.fs.HadoopFileSystem`` instead. defaultrNlibhdfscCs>tjtjdddtdd|dkr(t|j|||||dS)Nzhdfs.HadoopFileSystemz2.0.0zfs.HadoopFileSystem) stacklevelr)warningswarnrformat FutureWarning_maybe_set_hadoop_classpath_connect)selfhostportuser kerb_ticketZdriver extra_confr8/usr/local/lib64/python3.6/site-packages/pyarrow/hdfs.py__init__(s zHadoopFileSystem.__init__cCst|j|j|j|j|jffS)N)rrrrrr)rrrr __reduce__3szHadoopFileSystem.__reduce__cCsdS)zR Return True if this is a Unix-style file store with directories. Tr)rrrr _isfilestore7szHadoopFileSystem._isfilestorecs tj|S)N)superisdir)rpath) __class__rrr=szHadoopFileSystem.isdircs tj|S)N)risfile)rr)rrrrAszHadoopFileSystem.isfileFcstj||S)N)rdelete)rr recursive)rrrr EszHadoopFileSystem.deletec s tj|S)a Create directory in HDFS. Parameters ---------- path : str Directory path to create, including any parent directories. Notes ----- libhdfs does not support create_parents=False, so we ignore this here )rmkdir)rrkwargs)rrrr"Is zHadoopFileSystem.mkdircstj||S)N)rrename)rrnew_path)rrrr$XszHadoopFileSystem.renamecs tj|S)N)rexists)rr)rrrr&\szHadoopFileSystem.existscstj||S)ap Retrieve directory contents and metadata, if requested. Parameters ---------- path : str HDFS path to retrieve contents of. detail : bool, default False If False, only return list of paths. Returns ------- result : list of dicts (detail=True) or strings (detail=False) )rls)rrdetail)rrrr'`szHadoopFileSystem.lsccsR|j|dd}t||\}}|||fVx$|D]}|j|j||EdHq.WdS)a Directory tree generator for HDFS, like os.walk. Parameters ---------- top_path : str Root directory for tree traversal. Returns ------- Generator yielding 3-tuple (dirpath, dirnames, filename) T)r(N)r'_libhdfs_walk_files_dirswalk _path_join)rtop_pathcontents directoriesfilesdirnamerrrr*qs   zHadoopFileSystem.walk)rrNNrN)F)F)__name__ __module__ __qualname____doc__rrrrrrrr r"r$r&r'r* __classcell__rr)rrrs   rcCstddl}|jdtjjddr"dSdtjkrXtjdkr>t}q`djtjd}t |}nt d}|j d tjd<dS) Nrzhadoop-common[^/]+.jarZ CLASSPATH HADOOP_HOMEwin32z {}/bin/hadoopZhadoopzutf-8) researchosenvirongetsysplatform_derive_hadoop_classpathr _hadoop_classpath_globdecode)r9 classpath hadoop_binrrrrs   rcCsddl}ddtjdddf}|j||jd}|jd|j|jd }|jd|jd}dtjkrdtjdn tjdd}|djd|S)Nrfindz-Lr7z-namez*.jar)stdoutxargsecho)stdinrFtr' '':')rIZHADOOP_CONF_DIRz /etc/hadoop:zutf-8)rGrH)rJrKrL) subprocessr;r<PopenPIPErF check_outputencode)rNZ find_argsrEZ xargs_echoZjarsZ hadoop_confrrrr@s  r@cCsddl}|ddf}|j|S)NrrCz--glob)rNrQ)rDrNZhadoop_classpath_argsrrrrAs rAcCsRg}g}x@|D]8}tj|dd}|ddkr<|j|q|j|qW||fS)Nnamekindfile) posixpathsplitappend)r,r-r/r.cZ scrubbed_namerrrr)s   r)rcCs,tjtjdddtddt|||||dS)a DEPRECATED: Connect to an HDFS cluster. All parameters are optional and should only be set if the defaults need to be overridden. Authentication should be automatic if the HDFS cluster uses Kerberos. However, if a username is specified, then the ticket cache will likely be required. .. deprecated:: 2.0 ``pyarrow.hdfs.connect`` is deprecated, please use ``pyarrow.fs.HadoopFileSystem`` instead. Parameters ---------- host : NameNode. Set to "default" for fs.defaultFS from core-site.xml. port : NameNode's port. Set to 0 for default or logical (HA) nodes. user : Username when connecting to HDFS; None implies login user. kerb_ticket : Path to Kerberos ticket cache. extra_conf : dict, default None extra Key/Value pairs for config; Will override any hdfs-site.xml properties Notes ----- The first time you call this method, it will take longer than usual due to JNI spin-up time. Returns ------- filesystem : HadoopFileSystem z hdfs.connectz2.0.0zfs.HadoopFileSystemr)r )rrrrr)r r rr r r)rrrrrrrrconnects #  r[cCs4tj"tjdt|||||d}WdQRX|S)Nignore)rrrrr)r catch_warnings simplefilterr)rrrrrfsrrrrs   r)rrNNN)rrNNN)r;rWr>r Z pyarrow.utilrrZpyarrow.filesystemrZpyarrow._hdfsioZ_hdfsiorrr@rAr)r[rrrrrs  i  ,