Skip to content
Closed
Show file tree
Hide file tree
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
14 changes: 14 additions & 0 deletions bin/upgrade-note.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,18 @@ addJarInDir "${ZEPPELIN_HOME}/zeppelin-server/target/lib"

ZEPPELIN_CLASSPATH="$CLASSPATH:$ZEPPELIN_CLASSPATH"

## Add hadoop jars when env USE_HADOOP is true
if [[ "${USE_HADOOP}" != "false" ]]; then
if [[ -z "${HADOOP_CONF_DIR}" ]]; then
echo "Please specify HADOOP_CONF_DIR if USE_HADOOP is true"
else
ZEPPELIN_CLASSPATH+=":${HADOOP_CONF_DIR}"
if ! [ -x "$(command -v hadoop)" ]; then
echo 'hadoop command is not in PATH when HADOOP_CONF_DIR is specified.'
else
ZEPPELIN_CLASSPATH+=":`hadoop classpath`"
fi
fi
fi

exec $ZEPPELIN_RUNNER $JAVA_OPTS -cp $ZEPPELIN_CLASSPATH_OVERRIDES:${ZEPPELIN_CLASSPATH} $MAIN_CLASS "$@"
Original file line number Diff line number Diff line change
Expand Up @@ -679,11 +679,12 @@ public void testRuntimeInfos() throws IOException {

// check RuntimeInfos
assertTrue(paragraph.getRuntimeInfos().containsKey("jobUrl"));
List<Map<String, String>> list = paragraph.getRuntimeInfos().get("jobUrl").getValue();
List<Object> list = paragraph.getRuntimeInfos().get("jobUrl").getValue();
assertEquals(1, list.size());
assertEquals(2, list.get(0).size());
assertEquals(list.get(0).get("jobUrl"), "jobUrl_value");
assertEquals(list.get(0).get("jobLabel"), "jobLabel_value");
Map<String, String> map = (Map<String, String>) list.get(0);
assertEquals(2, map.size());
assertEquals(map.get("jobUrl"), "jobUrl_value");
assertEquals(map.get("jobLabel"), "jobLabel_value");
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public class ParagraphRuntimeInfo {

// runtimeInfos job url or dropdown-menu key in
// zeppelin-web/src/app/notebook/paragraph/paragraph-control.html
private List<Map<String, String>> values; // values for the key-value pair property
private List<Object> values; // values for the key-value pair property
private String interpreterSettingId;

public ParagraphRuntimeInfo(String propertyName, String label,
Expand All @@ -39,7 +39,7 @@ public void addValue(Map<String, String> mapValue) {
}

@VisibleForTesting
public List<Map<String, String>> getValue() {
public List<Object> getValue() {
return values;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ public void convertNoteFiles(ZeppelinConfiguration conf, boolean deleteOld) thro
LOGGER.info("Convert old note file to new style, note count: " + oldNotesInfo.size());
LOGGER.info("Delete old note: " + deleteOld);
for (OldNoteInfo oldNoteInfo : oldNotesInfo) {
LOGGER.info("Converting note, id: {}", oldNoteInfo.getId());
Note note = oldNotebookRepo.get(oldNoteInfo.getId(), AuthenticationInfo.ANONYMOUS);
note.setPath(note.getName());
note.setVersion(Util.getVersion());
Expand Down