/usr/local/lib/python3.6/site-packages/fsspec/implementations/__pycache__
Edit: /usr/local/lib/python3.6/site-packages/fsspec/implementations/__pycache__/dbfs.cpython-36.pyc (13351B)
3
8%Eg:9 @ sd d dl Z d dlZd dlZd dlmZ d dlmZ G dd deZG dd deZ G dd d eZ
dS )
N)AbstractFileSystem)AbstractBufferedFilec s e Zd ZdZ fddZ ZS )DatabricksExceptionz<
Helper class for exceptions raised in this module.
c s t j| || _|| _dS )z Create a new DatabricksExceptionN)super__init__
error_codemessage)selfr r ) __class__ E/usr/local/lib/python3.6/site-packages/fsspec/implementations/dbfs.pyr s zDatabricksException.__init__)__name__
__module____qualname____doc__r
__classcell__r r )r
r r
s r c s e Zd ZdZ fddZd!ddZd"ddZd#d d
Zd$dd
Zd%ddZ d&ddZ
dd Zd'ddZdd Z
dd Zdd Zd( fdd Z ZS ))DatabricksFileSystemz
Get access to the Databricks filesystem implementation over HTTP.
Can be used inside and outside of a databricks cluster.
c sB || _ || _tj | _| jjjdd| j i t jf | dS )a
Create a new DatabricksFileSystem.
Parameters
----------
instance: str
The instance URL of the databricks cluster.
For example for an Azure databricks cluster, this
has the form adb-
..azuredatabricks.net.
token: str
Your personal token. Find out more
here: https://docs.databricks.com/dev-tools/api/latest/authentication.html
AuthorizationzBearer N) instancetokenrequestsSessionsessionheadersupdater r )r r r kwargs)r
r r r s
zDatabricksFileSystem.__init__Tc C s | j |}|sy| jddd|id}W n: tk
r` } z|jdkrLt|j|W Y dd}~X nX |d }dd |D }|| j|<