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 @@ -205,12 +205,6 @@ public void onMessage(NotebookSocket conn, String msg) {
case CHECKPOINT_NOTEBOOK:
checkpointNotebook(conn, notebook, messagereceived);
break;
case LIST_NOTEBOOK_JOBS:
unicastNotebookJobInfo(conn, messagereceived);
break;
case LIST_UPDATE_NOTEBOOK_JOBS:
unicastUpdateNotebookJobInfo(conn, messagereceived);
break;
default:
break;
}
Expand Down Expand Up @@ -358,43 +352,8 @@ private void unicast(Message m, NotebookSocket conn) {
}
}

<<<<<<< HEAD
public List<Map<String, String>> generateNotebooksInfo(boolean needsReload) {
=======
public void unicastNotebookJobInfo(NotebookSocket conn, Message fromMessage) throws IOException {

AuthenticationInfo subject = new AuthenticationInfo(fromMessage.principal);
List<Map<String, Object>> notebookJobs = notebook().getJobListforNotebook(false, 0, subject);
Map<String, Object> response = new HashMap<>();

response.put("lastResponseUnixTime", System.currentTimeMillis());
response.put("jobs", notebookJobs);

conn.send(serializeMessage(new Message(OP.LIST_NOTEBOOK_JOBS)
.put("notebookJobs", response)));
}

public void unicastUpdateNotebookJobInfo(NotebookSocket conn, Message fromMessage)
throws IOException {
double lastUpdateUnixTimeRaw = (double) fromMessage.get("lastUpdateUnixTime");
long lastUpdateUnixTime = new Double(lastUpdateUnixTimeRaw).longValue();

List<Map<String, Object>> notebookJobs;
AuthenticationInfo subject = new AuthenticationInfo(fromMessage.principal);
notebookJobs = notebook().getJobListforNotebook(false, lastUpdateUnixTime, subject);

Map<String, Object> response = new HashMap<>();
response.put("lastResponseUnixTime", System.currentTimeMillis());
response.put("jobs", notebookJobs);

conn.send(serializeMessage(new Message(OP.LIST_UPDATE_NOTEBOOK_JOBS)
.put("notebookRunningJobs", response)));
}

public List<Map<String, String>> generateNotebooksInfo(boolean needsReload,
AuthenticationInfo subject) {

>>>>>>> 4a0dce5... Authenticated user aware notebook storage layer
Notebook notebook = notebook();

ZeppelinConfiguration conf = notebook.getConf();
Expand Down