Configuration Options¶
HDFSContentsManager¶
-
class
hdfscm.
HDFSContentsManager
(*args, **kwargs)¶ A ContentsManager implementation that persists to HDFS.
-
config c.HDFSContentsManager.allow_hidden = Bool(False)
Allow access to hidden files
-
config c.HDFSContentsManager.create_root_dir_on_startup = Bool(True)
Create
root_dir
on startup if it doesn’t already exist
-
config c.HDFSContentsManager.files_handler_class = Type(<class 'notebook.files.handlers.FilesHandler'>)
handler class to use when serving raw file requests.
Default is a fallback that talks to the ContentsManager API, which may be inefficient, especially for large files.
Local files-based ContentsManagers can use a StaticFileHandler subclass, which will be much more efficient.
Access to these files should be Authenticated.
-
config c.HDFSContentsManager.files_handler_params = Dict()
Extra parameters to pass to files_handler_class.
For example, StaticFileHandlers generally expect a path argument specifying the root directory from which to serve files.
-
config c.HDFSContentsManager.hdfs_host = Unicode('default')
The hostname of the HDFS namenode.
By default this will be inferred from the HDFS configuration files.
-
config c.HDFSContentsManager.hdfs_port = Int(0)
The port for the HDFS namenode.
By default this will be inferred from the HDFS configuration files.
-
config c.HDFSContentsManager.hide_globs = List()
Glob patterns to hide in file and directory listings.
-
config c.HDFSContentsManager.pre_save_hook = Any(None)
Python callable or importstring thereof
To be called on a contents model prior to save.
This can be used to process the structure, such as removing notebook outputs or other side effects that should not be saved.
It will be called as (all arguments passed by keyword):
hook(path=path, model=model, contents_manager=self)
model: the model to be saved. Includes file contents. Modifying this dict will affect the file that is stored.
path: the API path of the save destination
contents_manager: this ContentsManager instance
-
config c.HDFSContentsManager.root_dir = Unicode('')
The root directory to serve from.
By default this is populated by
root_dir_template
.
-
config c.HDFSContentsManager.root_dir_template = Unicode('/user/{username}/notebooks')
A template string to populate
root_dir
from.Receive the following format parameters:
username
-
config c.HDFSContentsManager.untitled_directory = Unicode('Untitled Folder')
The base name used when creating untitled directories.
-
config c.HDFSContentsManager.untitled_file = Unicode('untitled')
The base name used when creating untitled files.
-
config c.HDFSContentsManager.untitled_notebook = Unicode('Untitled')
The base name used when creating untitled notebooks.
-
HDFSCheckpoints¶
-
class
hdfscm.
HDFSCheckpoints
(**kwargs)¶ A Checkpoints implementation that persists to HDFS
-
config c.HDFSCheckpoints.checkpoint_dir = Unicode('.ipynb_checkpoints')
The directory name in which to keep file checkpoints
This is a path relative to the file’s own directory.
By default, it is .ipynb_checkpoints
-
NoOpCheckpoints¶
-
class
hdfscm.
NoOpCheckpoints
(**kwargs)¶ A Checkpoints implementation that does nothing.
Useful if you don’t want checkpoints at all.