示例#1
0
文件: zeppelin.py 项目: apache/bigtop
def register_notebook(client):
    zeppelin = Zeppelin()
    for notebook in client.unregistered_notebooks():
        notebook_md5 = hashlib.md5(notebook.encode("utf8")).hexdigest()
        if zeppelin.register_notebook(notebook_md5, notebook):
            client.accept_notebook(notebook)
        else:
            client.reject_notebook(notebook)
示例#2
0
def register_notebook(client):
    zeppelin = Zeppelin()
    for notebook in client.unregistered_notebooks():
        notebook_md5 = hashlib.md5(notebook.encode('utf8')).hexdigest()
        if zeppelin.register_notebook(notebook_md5, notebook):
            client.accept_notebook(notebook)
        else:
            client.reject_notebook(notebook)