Uh oh!
There was an error while loading. Please reload this page.
Using HDFS to backup and restore notebook - #1600
Conversation
@aspen01 thank you for contribution! Could you please double-check that
As for copyright notices, could you please help to understand if your contribution contains any third-party works or is that all code, developed for the ASF? That would determine, if the existing copyright notice from the files should be moved to root NOTICE file or not. Thanks! |
| public synchronized void save(Note note, AuthenticationInfo subject) throws IOException { | ||
| super.save(note, subject); | ||
| if (this.enableWebHDFS) | ||
| uploadNoteListToHDFS(note); |
There was a problem hiding this comment.
what do you think about:
- whether makes sense to pass
userfromsubjectinstead of getting user from environment insideHDFSCommand - from this function name seems like uploading whole list instead of a single note
There was a problem hiding this comment.
- If this feature save a notebook to hdfs directly, I think your opinion is right. But now the feature is just backup the notebook to hdfs, so I tried to think of the two functions(connecting hdfs and save the notebook) separately.
- I'll fix it. Thanks.
| String notebookStatus = this.hdfsCmd.runCommand(this.hdfsCmd.getFileStatus, notebook, null); | ||
| fileStatus = gson.fromJson(notebookStatus, OneFileStatus.class); | ||
| } catch (Exception e) { | ||
| logger.warn("Warning: ", e); |
There was a problem hiding this comment.
maybe some description to give here
| } | ||
| } | ||
| catch (Exception e) { | ||
| logger.error("Exception: ", e); |
There was a problem hiding this comment.
a bit more description would help here as well
| @@ -0,0 +1,241 @@ | |||
| /** | |||
| * Copyright 2015 NAVER Corp. All rights Reserved. | |||
There was a problem hiding this comment.
Is this file licensed for use in an Apache project?
There was a problem hiding this comment.
Please make sure all the code is distributed under one of the ASF category-a licenses
khalidhuseynov
commented
Dec 8, 2016
@aspen01 I wonder if any progress on this one? |
| </property> | ||
| <property> | ||
| <name>hdfs.url</name> |
There was a problem hiding this comment.
I think it is better to add prefix zeppelin.notebook, because hdfs is used in many places. Adding prefix can help user to understand this this is for notebook storage.
There was a problem hiding this comment.
HDFSCommand use hdfs.url property already. So I used the same property name.
If adding prefix can help user to understand, I'll add prefix.
| <version>${project.version}</version> | ||
| </dependency> | ||
| <dependency> |
There was a problem hiding this comment.
I don't think it is a good idea to make zengine to depend on one specific interpreter.
There was a problem hiding this comment.
I agree with you. But To use HDFSCommand functions, I had to add dependency.
Could you give me advice to solve this?
There was a problem hiding this comment.
Indeed, Zengine should not have such dependency.
@aspen01 if HDFSCommand have to be shared:
- one option is to move it to
zeppelin-interpreter, as bothfileandzeppelin-zenginealready depend on it - another option to consider would be - extract a new maven sub-module out of
zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/, moveHDFSCommandthere and make other modules depend on it.
Second option is more involved and deserves a separate issue \w discussion. First one looks more feasible
aspen01
commented
Dec 19, 2016
@bzz Thank you for advice. But the build is failed even though I fixed license and checkstyle. |
I see, thank you for taking care! This looks like something failing on the TravisCI side though. Could you please rebase this branch on latest master and force-push it here again? This will trigger CI \w latest code\fixes from master. |
placeybordeaux
commented
Dec 21, 2016
Looks like you're missing a hotfix commit: |
bzz
commented
Dec 22, 2016
Thank you @aspen01, @placeybordeaux In order to be merged, this branch have to be rebased on top of the master, which itself already includes CI fixes, i.e 1c7d8fb. This branch must not include any other commits, except for ones that implement "HDFS to backup and restore notebook" - edae7bc, d94eb16 need to be removed. |
| return "/" + newUrl.replaceAll("^hdfs://", "").split("/", 2)[1]; | ||
| } | ||
| else | ||
| return newUrl; |
There was a problem hiding this comment.
Please, make sure all the code follows project style guide
@placeybordeaux Thank you. |
add header for uploading file using REST API
aspen01
commented
Dec 28, 2016
I committed this branch on latest master and force-push it. |
placeybordeaux
commented
Jan 10, 2017
Not sure why the CI hasn't kicked in, but I tried compiling this on my local and I am getting some test failures: Not sure if these are related to the PR at all. |
aspen01
commented
Jan 11, 2017
@placeybordeaux How did you build a package? |
placeybordeaux
commented
Jan 11, 2017
I built with |
keithchambers
commented
Feb 4, 2017
Is this ready to be merged? |
EronWright
commented
Mar 10, 2017
Seems overcomplicated for |
aspen01
commented
May 10, 2017
@EronWright Thank you for your feedback. When I first developed the feature, I assumed that HDFS would not be used as default storage because remote FS failure could affect zeppelin usage. So extended VFSNotebookRepo to keep the default storage space on local FS and HDFS as backup storage for failover. This makes the implementation is simple, but it may have created complexity. |
close#83close#86close#125close#133close#139close#146close#193close#203close#246close#262close#264close#273close#291close#299close#320close#347close#389close#413close#423close#543close#560close#658close#670close#728close#765close#777close#782close#783close#812close#822close#841close#843close#878close#884close#918close#989close#1076close#1135close#1187close#1231close#1304close#1316close#1361close#1385close#1390close#1414close#1422close#1425close#1447close#1458close#1466close#1485close#1492close#1495close#1497close#1536close#1545close#1561close#1577close#1600close#1603close#1678close#1695close#1739close#1748close#1765close#1767close#1776close#1783close#1799
What is this PR for?
This PR supports using HDFS to backup and restore notebook.
It is similar to #1479.
However this PR just use WebHDFS API, so we don't need to care about hadoop libraries' dependency.
What type of PR is it?
Improvement
Todos
What is the Jira issue?
https://issues.apache.org/jira/browse/ZEPPELIN-1515
How should this be tested?
Set the variables in zeppelin-site.xml
After zeppelin daemon start, check the notebook directories in
hdfs.notebook.dir.Screenshots (if appropriate)
Questions: