/usr/local/lib/python3.6/site-packages/fsspec/implementations/__pycache__
NameSizeModeActions
arrow.cpython-36.pyc73280644editdlrm
cached.cpython-36.pyc230300644editdlrm
dask.cpython-36.pyc46560644editdlrm
dbfs.cpython-36.pyc133510644editdlrm
dvc.cpython-36.pyc26220644editdlrm
ftp.cpython-36.pyc104440644editdlrm
git.cpython-36.pyc37500644editdlrm
github.cpython-36.pyc74040644editdlrm
hdfs.cpython-36.pyc70930644editdlrm
http.cpython-36.pyc207520644editdlrm
jupyter.cpython-36.pyc41310644editdlrm
libarchive.cpython-36.pyc60050644editdlrm
local.cpython-36.pyc119120644editdlrm
memory.cpython-36.pyc66970644editdlrm
reference.cpython-36.pyc161420644editdlrm
sftp.cpython-36.pyc61040644editdlrm
smb.cpython-36.pyc105910644editdlrm
tar.cpython-36.pyc45020644editdlrm
webhdfs.cpython-36.pyc147120644editdlrm
zip.cpython-36.pyc32760644editdlrm
__init__.cpython-36.pyc1560644editdlrm
Edit: /usr/local/lib/python3.6/site-packages/fsspec/implementations/__pycache__/dask.cpython-36.pyc (4656B)
3 8%EgY@sxddlZddlmZmZddlmZddlmZddlm Z m Z ddl m Z ddZ Gd d d e ZGd d d e ZdS) N)Client_get_global_client) get_worker) filesystem)AbstractBufferedFileAbstractFileSystem)infer_storage_optionscCs(|dkrtSt|tr|St|SdS)N)r isinstancer)clientr E/usr/local/lib/python3.6/site-packages/fsspec/implementations/dask.py _get_client s  r cspeZdZdZdfdd ZeddZddZd d Zd d Z d dZ ddZ ddZ dddZ ddZZS)DaskWorkerFileSystema)View files accessible to a worker as any other remote file-system When instances are run on the worker, uses the real filesystem. When run on the client, they call the worker to provide information or data. **Warning** this implementation is experimental, and read-only for now. Nc sPtjf||dk|dkAs&td||_||_d|_||_||_|jdS)NzKPlease provide one of filesystem instance (fs) or target_protocol, not both) super__init__ ValueErrortarget_protocoltarget_optionsworkerr fs_determine_worker)selfrrrr kwargs) __class__r r rszDaskWorkerFileSystem.__init__cCs:t|}d|kr2d|kr2d|dd|diSiSdS)Nhostportr :)r)pathsor r r _get_kwargs_from_urls-sz*DaskWorkerFileSystem._get_kwargs_from_urlsc Cshy0td|_|jdkr.t|jf|jp(i|_Wn2tk rbd|_t|j|_t j ||_ YnXdS)NTF) rrrrrrrr r daskZdelayedrfs)rr r r r5s  z&DaskWorkerFileSystem._determine_workercOs,|jr|jj||n|jj||jdS)N)rrmkdirr!compute)rargsrr r r r"BszDaskWorkerFileSystem.mkdircOs,|jr|jj||n|jj||jdS)N)rrrmr!r#)rr$rr r r r%HszDaskWorkerFileSystem.rmcOs,|jr|jj||n|jj||jdS)N)rrcopyr!r#)rr$rr r r r&NszDaskWorkerFileSystem.copycOs,|jr|jj||n|jj||jdS)N)rrmvr!r#)rr$rr r r r'TszDaskWorkerFileSystem.mvcOs*|jr|jj||S|jj||jSdS)N)rrlsr!r#)rr$rr r r r(ZszDaskWorkerFileSystem.lsrbTc KsD|jr$|jj|f||||d|Stf||||||d|SdS)N)mode block_size autocommit cache_options)rrr*r+r,r-)rr_openDaskFile)rrr*r+r,r-rr r r r.`s zDaskWorkerFileSystem._openc CsN|jr4|j||}|j||j||SQRXn|jj||||jSdS)N)rr.seekreadr! fetch_ranger#)rrr*startendfr r r r2}s  z DaskWorkerFileSystem.fetch_range)NNNN)r)NTN)__name__ __module__ __qualname____doc__r staticmethodrrr"r%r&r'r(r.r2 __classcell__r r )rr rs    rcs8eZdZd fdd Zd ddZddZd d ZZS) r/r)c s"|dkrtdtjf|dS)Nr)z1Remote dask files can only be opened in "rb" mode)rrr)rr*r)rr r rszDaskFile.__init__FcCsdS)Nr )rfinalr r r _upload_chunkszDaskFile._upload_chunkcCsdS)zCreate remote file/uploadNr )rr r r _initiate_uploadszDaskFile._initiate_uploadcCs|jj|j|j||S)z*Get the specified set of bytes from remote)rr2rr*)rr3r4r r r _fetch_rangeszDaskFile._fetch_range)r))F)r6r7r8rr=r>r?r;r r )rr r/s r/)r Zdistributed.clientrrZdistributed.workerrZfsspecrZ fsspec.specrrZ fsspec.utilsrr rr/r r r r s    r