Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -100,17 +100,14 @@ private String getOldNotebookRepoClassName(String notebookRepoClassName) {
*/
public OldNotebookRepo loadOldNotebookRepo(String notebookRepoClassName) throws IOException {
LOGGER.info("Loading OldNotebookRepo Plugin: " + notebookRepoClassName);
// load plugin from classpath directly when it is test.
// otherwise load it from plugin folder
String isTest = System.getenv("IS_ZEPPELIN_TEST");
if (isTest != null && isTest.equals("true")) {
try {
OldNotebookRepo notebookRepo = (OldNotebookRepo)
(Class.forName(notebookRepoClassName).newInstance());
return notebookRepo;
} catch (InstantiationException | IllegalAccessException | ClassNotFoundException e) {
LOGGER.warn("Fail to instantiate notebookrepo from classpath directly:" + notebookRepoClassName);
}
// load plugin from classpath directly first for these builtin NotebookRepo (such as VFSNoteBookRepo
// and GitNotebookRepo). If fails, then try to load it from plugin folder
try {
OldNotebookRepo notebookRepo = (OldNotebookRepo)
(Class.forName(notebookRepoClassName).newInstance());
return notebookRepo;
} catch (InstantiationException | IllegalAccessException | ClassNotFoundException e) {
LOGGER.warn("Fail to instantiate notebookrepo from classpath directly:" + notebookRepoClassName);
}

String simpleClassName = notebookRepoClassName.substring(notebookRepoClassName.lastIndexOf(".") + 1);
Expand Down