mirror of
https://github.com/apache/zeppelin
synced 2026-05-24 09:38:26 +00:00
Change structure and remove remoteWorksManager
This commit is contained in:
parent
8cbe46cbc8
commit
9ab05afe14
28 changed files with 290 additions and 1185 deletions
|
|
@ -26,7 +26,6 @@ import org.apache.zeppelin.interpreter.InterpreterContext;
|
|||
import org.apache.zeppelin.interpreter.InterpreterResult;
|
||||
import org.apache.zeppelin.interpreter.InterpreterResult.Code;
|
||||
import org.apache.zeppelin.interpreter.InterpreterResult.Type;
|
||||
import org.apache.zeppelin.interpreter.RemoteWorksController;
|
||||
import org.apache.zeppelin.interpreter.thrift.InterpreterCompletion;
|
||||
import org.apache.zeppelin.scheduler.Scheduler;
|
||||
import org.apache.zeppelin.scheduler.SchedulerFactory;
|
||||
|
|
|
|||
|
|
@ -37,7 +37,6 @@ import org.apache.commons.lang.StringUtils;
|
|||
import org.apache.zeppelin.interpreter.Interpreter;
|
||||
import org.apache.zeppelin.interpreter.InterpreterContext;
|
||||
import org.apache.zeppelin.interpreter.InterpreterResult;
|
||||
import org.apache.zeppelin.interpreter.RemoteWorksController;
|
||||
import org.apache.zeppelin.interpreter.thrift.InterpreterCompletion;
|
||||
import org.elasticsearch.action.delete.DeleteResponse;
|
||||
import org.elasticsearch.action.get.GetResponse;
|
||||
|
|
|
|||
|
|
@ -23,7 +23,6 @@ import org.apache.zeppelin.interpreter.InterpreterContext;
|
|||
import org.apache.zeppelin.interpreter.InterpreterResult;
|
||||
import org.apache.zeppelin.interpreter.InterpreterResult.Code;
|
||||
import org.apache.zeppelin.interpreter.InterpreterResult.Type;
|
||||
import org.apache.zeppelin.interpreter.RemoteWorksController;
|
||||
import org.apache.zeppelin.interpreter.thrift.InterpreterCompletion;
|
||||
import org.apache.zeppelin.scheduler.Scheduler;
|
||||
import org.apache.zeppelin.scheduler.SchedulerFactory;
|
||||
|
|
|
|||
|
|
@ -70,7 +70,6 @@ public class ZeppelinContext {
|
|||
private int maxResult;
|
||||
private List<Class> supportedClasses;
|
||||
private InterpreterHookRegistry hooks;
|
||||
private RemoteWorksController remoteWorksController;
|
||||
|
||||
public ZeppelinContext(SparkContext sc, SQLContext sql,
|
||||
InterpreterContext interpreterContext,
|
||||
|
|
@ -328,7 +327,8 @@ public class ZeppelinContext {
|
|||
throw new InterpreterException("Can not run current Paragraph");
|
||||
}
|
||||
|
||||
List<InterpreterContextRunner> runners = getInterpreterContextRunner(noteId, paragraphId);
|
||||
List<InterpreterContextRunner> runners =
|
||||
getInterpreterContextRunner(noteId, paragraphId, context);
|
||||
|
||||
if (runners.size() <= 0) {
|
||||
throw new InterpreterException("Paragraph " + paragraphId + " not found " + runners.size());
|
||||
|
|
@ -346,8 +346,10 @@ public class ZeppelinContext {
|
|||
* @param noteId
|
||||
*/
|
||||
@ZeppelinApi
|
||||
public List<InterpreterContextRunner> getInterpreterContextRunner(String noteId) {
|
||||
public List<InterpreterContextRunner> getInterpreterContextRunner(
|
||||
String noteId, InterpreterContext interpreterContext) {
|
||||
List<InterpreterContextRunner> runners = new LinkedList<>();
|
||||
RemoteWorksController remoteWorksController = interpreterContext.getRemoteWorksController();
|
||||
|
||||
if (remoteWorksController != null) {
|
||||
runners = remoteWorksController.getRemoteContextRunner(noteId);
|
||||
|
|
@ -363,8 +365,9 @@ public class ZeppelinContext {
|
|||
*/
|
||||
@ZeppelinApi
|
||||
public List<InterpreterContextRunner> getInterpreterContextRunner(
|
||||
String noteId, String paragraphId) {
|
||||
String noteId, String paragraphId, InterpreterContext interpreterContext) {
|
||||
List<InterpreterContextRunner> runners = new LinkedList<>();
|
||||
RemoteWorksController remoteWorksController = interpreterContext.getRemoteWorksController();
|
||||
|
||||
if (remoteWorksController != null) {
|
||||
runners = remoteWorksController.getRemoteContextRunner(noteId, paragraphId);
|
||||
|
|
@ -389,7 +392,7 @@ public class ZeppelinContext {
|
|||
* @param context interpreter context
|
||||
*/
|
||||
public void run(String noteId, int idx, InterpreterContext context) {
|
||||
List<InterpreterContextRunner> runners = getInterpreterContextRunner(noteId);
|
||||
List<InterpreterContextRunner> runners = getInterpreterContextRunner(noteId, context);
|
||||
if (idx >= runners.size()) {
|
||||
throw new InterpreterException("Index out of bound");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -60,6 +60,7 @@ public class InterpreterContext {
|
|||
private List<InterpreterContextRunner> runners;
|
||||
private String className;
|
||||
private RemoteEventClientWrapper client;
|
||||
private RemoteWorksController remoteWorksController;
|
||||
|
||||
public InterpreterContext(String noteId,
|
||||
String paragraphId,
|
||||
|
|
@ -73,6 +74,23 @@ public class InterpreterContext {
|
|||
List<InterpreterContextRunner> runners,
|
||||
InterpreterOutput out
|
||||
) {
|
||||
this(noteId, paragraphId, paragraphTitle, paragraphText, authenticationInfo, config, gui,
|
||||
angularObjectRegistry, resourcePool, runners, out, null);
|
||||
}
|
||||
|
||||
public InterpreterContext(String noteId,
|
||||
String paragraphId,
|
||||
String paragraphTitle,
|
||||
String paragraphText,
|
||||
AuthenticationInfo authenticationInfo,
|
||||
Map<String, Object> config,
|
||||
GUI gui,
|
||||
AngularObjectRegistry angularObjectRegistry,
|
||||
ResourcePool resourcePool,
|
||||
List<InterpreterContextRunner> runners,
|
||||
InterpreterOutput out,
|
||||
RemoteWorksController remoteWorksController
|
||||
) {
|
||||
this.noteId = noteId;
|
||||
this.paragraphId = paragraphId;
|
||||
this.paragraphTitle = paragraphTitle;
|
||||
|
|
@ -84,6 +102,7 @@ public class InterpreterContext {
|
|||
this.resourcePool = resourcePool;
|
||||
this.runners = runners;
|
||||
this.out = out;
|
||||
this.remoteWorksController = remoteWorksController;
|
||||
}
|
||||
|
||||
public InterpreterContext(String noteId,
|
||||
|
|
@ -97,9 +116,10 @@ public class InterpreterContext {
|
|||
ResourcePool resourcePool,
|
||||
List<InterpreterContextRunner> contextRunners,
|
||||
InterpreterOutput output,
|
||||
RemoteWorksController remoteWorksController,
|
||||
RemoteInterpreterEventClient eventClient) {
|
||||
this(noteId, paragraphId, paragraphTitle, paragraphText, authenticationInfo, config, gui,
|
||||
angularObjectRegistry, resourcePool, contextRunners, output);
|
||||
angularObjectRegistry, resourcePool, contextRunners, output, remoteWorksController);
|
||||
this.client = new RemoteEventClient(eventClient);
|
||||
}
|
||||
|
||||
|
|
@ -154,4 +174,12 @@ public class InterpreterContext {
|
|||
public RemoteEventClientWrapper getClient() {
|
||||
return client;
|
||||
}
|
||||
|
||||
public RemoteWorksController getRemoteWorksController() {
|
||||
return remoteWorksController;
|
||||
}
|
||||
|
||||
public void setRemoteWorksController(RemoteWorksController remoteWorksController) {
|
||||
this.remoteWorksController = remoteWorksController;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,7 +21,6 @@ import org.apache.zeppelin.display.AngularObject;
|
|||
import org.apache.zeppelin.interpreter.InterpreterContextRunner;
|
||||
import org.apache.zeppelin.interpreter.thrift.RemoteInterpreterEvent;
|
||||
import org.apache.zeppelin.interpreter.thrift.RemoteInterpreterEventType;
|
||||
import org.apache.zeppelin.interpreter.thrift.RemoteZeppelinServerControlEvent;
|
||||
import org.apache.zeppelin.interpreter.thrift.RemoteZeppelinServerController;
|
||||
import org.apache.zeppelin.interpreter.thrift.ZeppelinServerResourceParagraphRunner;
|
||||
import org.apache.zeppelin.resource.*;
|
||||
|
|
@ -58,12 +57,11 @@ public class RemoteInterpreterEventClient implements ResourcePoolConnector {
|
|||
public void getZeppelinServerNoteRunner(
|
||||
String eventOwnerKey, ZeppelinServerResourceParagraphRunner runner) {
|
||||
RemoteZeppelinServerController eventBody = new RemoteZeppelinServerController();
|
||||
eventBody.setType(RemoteZeppelinServerControlEvent.REQ_RESOURCE_PARAGRAPH_RUN_CONTEXT);
|
||||
eventBody.setEventOwnerKey(eventOwnerKey);
|
||||
eventBody.setMsg(gson.toJson(runner));
|
||||
|
||||
sendEvent(new RemoteInterpreterEvent(
|
||||
RemoteInterpreterEventType.REMOTE_ZEPPELIN_SERVER_CONTROL,
|
||||
RemoteInterpreterEventType.RESOURCE_PARAGRAPH_RUN_CONTEXT,
|
||||
gson.toJson(eventBody)));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -29,7 +29,6 @@ import org.apache.zeppelin.interpreter.RemoteWorksController;
|
|||
import org.apache.zeppelin.interpreter.thrift.RemoteInterpreterEvent;
|
||||
import org.apache.zeppelin.interpreter.thrift.RemoteInterpreterEventType;
|
||||
import org.apache.zeppelin.interpreter.thrift.RemoteInterpreterService.Client;
|
||||
import org.apache.zeppelin.interpreter.thrift.RemoteZeppelinServerControlEvent;
|
||||
import org.apache.zeppelin.interpreter.thrift.RemoteZeppelinServerController;
|
||||
import org.apache.zeppelin.interpreter.thrift.ZeppelinServerResourceParagraphRunner;
|
||||
import org.apache.zeppelin.resource.Resource;
|
||||
|
|
@ -199,10 +198,14 @@ public class RemoteInterpreterEventPoller extends Thread {
|
|||
String status = appStatusUpdate.get("status");
|
||||
|
||||
appListener.onStatusChange(noteId, paragraphId, appId, status);
|
||||
} else if (event.getType() == RemoteInterpreterEventType.REMOTE_ZEPPELIN_SERVER_CONTROL) {
|
||||
} else if (event.getType() == RemoteInterpreterEventType.RESOURCE_PARAGRAPH_RUN_CONTEXT) {
|
||||
//clover
|
||||
RemoteZeppelinServerController remoteControlEvent = gson.fromJson(
|
||||
event.getData(), RemoteZeppelinServerController.class);
|
||||
progressRemoteZeppelinControlEvent(remoteControlEvent);
|
||||
progressRemoteZeppelinControlEvent(event.getType(), listener, remoteControlEvent);
|
||||
|
||||
|
||||
|
||||
} else if (event.getType() == RemoteInterpreterEventType.META_INFOS) {
|
||||
Map<String, String> metaInfos = gson.fromJson(event.getData(),
|
||||
new TypeToken<Map<String, String>>() {
|
||||
|
|
@ -222,49 +225,69 @@ public class RemoteInterpreterEventPoller extends Thread {
|
|||
}
|
||||
}
|
||||
|
||||
private void progressRemoteZeppelinControlEvent(RemoteZeppelinServerController event) {
|
||||
Gson gson = new Gson();
|
||||
String eventOwnerKey = event.getEventOwnerKey();
|
||||
Client interpreterServer = null;
|
||||
private void progressRemoteZeppelinControlEvent(
|
||||
RemoteInterpreterEventType event,
|
||||
RemoteInterpreterProcessListener remoteWorksEventListener,
|
||||
RemoteZeppelinServerController data) {
|
||||
boolean broken = false;
|
||||
final Gson gson = new Gson();
|
||||
String eventOwnerKey = data.getEventOwnerKey();
|
||||
Client interpreterServerMain = null;
|
||||
try {
|
||||
interpreterServer = interpreterProcess.getClient();
|
||||
List<InterpreterContextRunner> interpreterContextRunners = new LinkedList<>();
|
||||
List<ZeppelinServerResourceParagraphRunner> remoteRunners = new LinkedList<>();
|
||||
if (event.getType() == RemoteZeppelinServerControlEvent.REQ_RESOURCE_PARAGRAPH_RUN_CONTEXT) {
|
||||
// ZeppelinServerResourceParagraphRunner runner = gson.fromJson(
|
||||
// event.getMsg(), ZeppelinServerResourceParagraphRunner.class);
|
||||
//
|
||||
// RemoteZeppelinServerController resResource = new RemoteZeppelinServerController();
|
||||
// resResource.setType(RemoteZeppelinServerControlEvent.RES_RESOURCE_PARAGRAPH_RUN_CONTEXT);
|
||||
// resResource.setEventOwnerKey(eventOwnerKey);
|
||||
// if (runner.getParagraphId() != null) {
|
||||
//
|
||||
// interpreterContextRunners = remoteWorkController.getRemoteContextRunner(
|
||||
// runner.getNoteId(), runner.getParagraphId());
|
||||
// } else {
|
||||
// interpreterContextRunners = remoteWorkController.getRemoteContextRunner(
|
||||
// runner.getNoteId());
|
||||
// }
|
||||
//
|
||||
// for (InterpreterContextRunner r : interpreterContextRunners) {
|
||||
// remoteRunners.add(
|
||||
// new ZeppelinServerResourceParagraphRunner(r.getNoteId(), r.getParagraphId())
|
||||
// );
|
||||
// }
|
||||
//
|
||||
// resResource.setMsg(gson.toJson(remoteRunners));
|
||||
//
|
||||
// interpreterServer.remoteZeppelinServerControlFeedback(resResource);
|
||||
}
|
||||
interpreterServerMain = interpreterProcess.getClient();
|
||||
final Client eventClient = interpreterServerMain;
|
||||
if (event == RemoteInterpreterEventType.RESOURCE_PARAGRAPH_RUN_CONTEXT) {
|
||||
final List<ZeppelinServerResourceParagraphRunner> remoteRunners = new LinkedList<>();
|
||||
|
||||
ZeppelinServerResourceParagraphRunner runner = gson.fromJson(
|
||||
data.getMsg(), ZeppelinServerResourceParagraphRunner.class);
|
||||
final RemoteZeppelinServerController resResource = new RemoteZeppelinServerController();
|
||||
resResource.setEventOwnerKey(eventOwnerKey);
|
||||
|
||||
remoteWorksEventListener.onGetParagraphRunners(runner.getNoteId(), runner.getParagraphId(),
|
||||
new RemoteInterpreterProcessListener.RemoteWorksEventListener() {
|
||||
@Override
|
||||
public void onFinished(Object resultObject) {
|
||||
logger.info("clover on Finished!!! send event finished");
|
||||
boolean clientBroken = false;
|
||||
if (resultObject != null && resultObject instanceof List) {
|
||||
List<InterpreterContextRunner> runnerList =
|
||||
(List<InterpreterContextRunner>) resultObject;
|
||||
for (InterpreterContextRunner r : runnerList) {
|
||||
remoteRunners.add(
|
||||
new ZeppelinServerResourceParagraphRunner(r.getNoteId(), r.getParagraphId())
|
||||
);
|
||||
}
|
||||
resResource.setMsg(gson.toJson(remoteRunners));
|
||||
RemoteInterpreterEvent response = new RemoteInterpreterEvent(
|
||||
RemoteInterpreterEventType.RESOURCE_PARAGRAPH_RUN_CONTEXT,
|
||||
gson.toJson(resResource));
|
||||
try {
|
||||
logger.info("clover send event finished");
|
||||
eventClient.onReceivedResourceParagraphRunners(response);
|
||||
} catch (Exception e) {
|
||||
clientBroken = true;
|
||||
logger.error("Can't get RemoteInterpreterEvent", e);
|
||||
waitQuietly();
|
||||
} finally {
|
||||
interpreterProcess.releaseClient(eventClient, clientBroken);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError() {
|
||||
logger.info("clover onError");
|
||||
}
|
||||
});
|
||||
}
|
||||
} catch (Exception e) {
|
||||
broken = true;
|
||||
logger.error("Can't get RemoteInterpreterEvent", e);
|
||||
waitQuietly();
|
||||
|
||||
} finally {
|
||||
interpreterProcess.releaseClient(interpreterServer, broken);
|
||||
interpreterProcess.releaseClient(interpreterServerMain, broken);
|
||||
}
|
||||
|
||||
if (broken == true) {
|
||||
|
|
|
|||
|
|
@ -25,4 +25,14 @@ public interface RemoteInterpreterProcessListener {
|
|||
public void onOutputAppend(String noteId, String paragraphId, String output);
|
||||
public void onOutputUpdated(String noteId, String paragraphId, String output);
|
||||
public void onMetaInfosReceived(String settingId, Map<String, String> metaInfos);
|
||||
public void onGetParagraphRunners(
|
||||
String noteId, String paragraphId, RemoteWorksEventListener callback);
|
||||
|
||||
/**
|
||||
* Remote works for Interpreter callback listener
|
||||
*/
|
||||
public interface RemoteWorksEventListener {
|
||||
public void onFinished(Object resultObject);
|
||||
public void onError();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -83,6 +83,7 @@ public class RemoteInterpreterServer
|
|||
Collections.synchronizedMap(new HashMap<String, RunningApplication>());
|
||||
|
||||
private Map<String, Object> remoteWorksResponsePool;
|
||||
private ZeppelinRemoteWorksController remoteWorksController;
|
||||
|
||||
public RemoteInterpreterServer(int port) throws TTransportException {
|
||||
this.port = port;
|
||||
|
|
@ -92,6 +93,7 @@ public class RemoteInterpreterServer
|
|||
server = new TThreadPoolServer(
|
||||
new TThreadPoolServer.Args(serverTransport).processor(processor));
|
||||
remoteWorksResponsePool = Collections.synchronizedMap(new HashMap<String, Object>());
|
||||
remoteWorksController = new ZeppelinRemoteWorksController(this, remoteWorksResponsePool);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -342,18 +344,30 @@ public class RemoteInterpreterServer
|
|||
}
|
||||
|
||||
@Override
|
||||
public void remoteZeppelinServerControlFeedback(
|
||||
RemoteZeppelinServerController response) throws TException {
|
||||
public void onReceivedResourceParagraphRunners(
|
||||
RemoteInterpreterEvent response) throws TException {
|
||||
//clover
|
||||
logger.info("remote zeppelin server controller feedback {}", response);
|
||||
if (response.getType() == RemoteZeppelinServerControlEvent.RES_RESOURCE_PARAGRAPH_RUN_CONTEXT) {
|
||||
if (response.getType() == RemoteInterpreterEventType.RESOURCE_PARAGRAPH_RUN_CONTEXT) {
|
||||
List<InterpreterContextRunner> intpContextRunners = new LinkedList<>();
|
||||
List<ZeppelinServerResourceParagraphRunner> runners = gson.fromJson(response.getMsg(),
|
||||
new TypeToken<List<ZeppelinServerResourceParagraphRunner>>() {}.getType());
|
||||
|
||||
RemoteZeppelinServerController remoteZeppelinServerController = gson.fromJson(
|
||||
response.getData(), RemoteZeppelinServerController.class);
|
||||
|
||||
if (remoteZeppelinServerController == null) {
|
||||
throw new TException("can not found Resource paragraph runners");
|
||||
}
|
||||
|
||||
List<ZeppelinServerResourceParagraphRunner> runners = gson.fromJson(
|
||||
remoteZeppelinServerController.getMsg(),
|
||||
new TypeToken<List<ZeppelinServerResourceParagraphRunner>>() {}.getType());
|
||||
for (ZeppelinServerResourceParagraphRunner r : runners) {
|
||||
intpContextRunners.add(new ParagraphRunner(this, r.getNoteId(), r.getParagraphId()));
|
||||
}
|
||||
synchronized (this.remoteWorksResponsePool) {
|
||||
this.remoteWorksResponsePool.put(response.getEventOwnerKey(), intpContextRunners);
|
||||
this.remoteWorksResponsePool.put(
|
||||
remoteZeppelinServerController.getEventOwnerKey(),
|
||||
intpContextRunners);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -573,7 +587,7 @@ public class RemoteInterpreterServer
|
|||
gson.fromJson(ric.getGui(), GUI.class),
|
||||
interpreterGroup.getAngularObjectRegistry(),
|
||||
interpreterGroup.getResourcePool(),
|
||||
contextRunners, output, eventClient);
|
||||
contextRunners, output, remoteWorksController, eventClient);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -611,6 +625,7 @@ public class RemoteInterpreterServer
|
|||
}
|
||||
|
||||
static class ZeppelinRemoteWorksController implements RemoteWorksController{
|
||||
//cloverhearts
|
||||
Logger logger = LoggerFactory.getLogger(ZeppelinRemoteWorksController.class);
|
||||
|
||||
private final long DEFAULT_TIMEOUT_VALUE = 300000;
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ import org.slf4j.Logger;
|
|||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
|
||||
@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2016-11-17")
|
||||
@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2016-11-18")
|
||||
public class InterpreterCompletion implements org.apache.thrift.TBase<InterpreterCompletion, InterpreterCompletion._Fields>, java.io.Serializable, Cloneable, Comparable<InterpreterCompletion> {
|
||||
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("InterpreterCompletion");
|
||||
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ import org.slf4j.Logger;
|
|||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
|
||||
@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2016-11-17")
|
||||
@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2016-11-18")
|
||||
public class RemoteApplicationResult implements org.apache.thrift.TBase<RemoteApplicationResult, RemoteApplicationResult._Fields>, java.io.Serializable, Cloneable, Comparable<RemoteApplicationResult> {
|
||||
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("RemoteApplicationResult");
|
||||
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ import org.slf4j.Logger;
|
|||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
|
||||
@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2016-11-17")
|
||||
@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2016-11-18")
|
||||
public class RemoteInterpreterContext implements org.apache.thrift.TBase<RemoteInterpreterContext, RemoteInterpreterContext._Fields>, java.io.Serializable, Cloneable, Comparable<RemoteInterpreterContext> {
|
||||
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("RemoteInterpreterContext");
|
||||
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ import org.slf4j.Logger;
|
|||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
|
||||
@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2016-11-17")
|
||||
@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2016-11-18")
|
||||
public class RemoteInterpreterEvent implements org.apache.thrift.TBase<RemoteInterpreterEvent, RemoteInterpreterEvent._Fields>, java.io.Serializable, Cloneable, Comparable<RemoteInterpreterEvent> {
|
||||
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("RemoteInterpreterEvent");
|
||||
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ public enum RemoteInterpreterEventType implements org.apache.thrift.TEnum {
|
|||
ANGULAR_REGISTRY_PUSH(10),
|
||||
APP_STATUS_UPDATE(11),
|
||||
META_INFOS(12),
|
||||
REMOTE_ZEPPELIN_SERVER_CONTROL(13);
|
||||
RESOURCE_PARAGRAPH_RUN_CONTEXT(13);
|
||||
|
||||
private final int value;
|
||||
|
||||
|
|
@ -87,7 +87,7 @@ public enum RemoteInterpreterEventType implements org.apache.thrift.TEnum {
|
|||
case 12:
|
||||
return META_INFOS;
|
||||
case 13:
|
||||
return REMOTE_ZEPPELIN_SERVER_CONTROL;
|
||||
return RESOURCE_PARAGRAPH_RUN_CONTEXT;
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ import org.slf4j.Logger;
|
|||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
|
||||
@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2016-11-17")
|
||||
@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2016-11-18")
|
||||
public class RemoteInterpreterResult implements org.apache.thrift.TBase<RemoteInterpreterResult, RemoteInterpreterResult._Fields>, java.io.Serializable, Cloneable, Comparable<RemoteInterpreterResult> {
|
||||
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("RemoteInterpreterResult");
|
||||
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ import org.slf4j.Logger;
|
|||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
|
||||
@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2016-11-17")
|
||||
@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2016-11-18")
|
||||
public class RemoteInterpreterService {
|
||||
|
||||
public interface Iface {
|
||||
|
|
@ -102,7 +102,7 @@ public class RemoteInterpreterService {
|
|||
|
||||
public RemoteApplicationResult runApplication(String applicationInstanceId) throws org.apache.thrift.TException;
|
||||
|
||||
public void remoteZeppelinServerControlFeedback(RemoteZeppelinServerController response) throws org.apache.thrift.TException;
|
||||
public void onReceivedResourceParagraphRunners(RemoteInterpreterEvent response) throws org.apache.thrift.TException;
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -154,7 +154,7 @@ public class RemoteInterpreterService {
|
|||
|
||||
public void runApplication(String applicationInstanceId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
|
||||
|
||||
public void remoteZeppelinServerControlFeedback(RemoteZeppelinServerController response, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
|
||||
public void onReceivedResourceParagraphRunners(RemoteInterpreterEvent response, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -704,23 +704,23 @@ public class RemoteInterpreterService {
|
|||
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "runApplication failed: unknown result");
|
||||
}
|
||||
|
||||
public void remoteZeppelinServerControlFeedback(RemoteZeppelinServerController response) throws org.apache.thrift.TException
|
||||
public void onReceivedResourceParagraphRunners(RemoteInterpreterEvent response) throws org.apache.thrift.TException
|
||||
{
|
||||
send_remoteZeppelinServerControlFeedback(response);
|
||||
recv_remoteZeppelinServerControlFeedback();
|
||||
send_onReceivedResourceParagraphRunners(response);
|
||||
recv_onReceivedResourceParagraphRunners();
|
||||
}
|
||||
|
||||
public void send_remoteZeppelinServerControlFeedback(RemoteZeppelinServerController response) throws org.apache.thrift.TException
|
||||
public void send_onReceivedResourceParagraphRunners(RemoteInterpreterEvent response) throws org.apache.thrift.TException
|
||||
{
|
||||
remoteZeppelinServerControlFeedback_args args = new remoteZeppelinServerControlFeedback_args();
|
||||
onReceivedResourceParagraphRunners_args args = new onReceivedResourceParagraphRunners_args();
|
||||
args.setResponse(response);
|
||||
sendBase("remoteZeppelinServerControlFeedback", args);
|
||||
sendBase("onReceivedResourceParagraphRunners", args);
|
||||
}
|
||||
|
||||
public void recv_remoteZeppelinServerControlFeedback() throws org.apache.thrift.TException
|
||||
public void recv_onReceivedResourceParagraphRunners() throws org.apache.thrift.TException
|
||||
{
|
||||
remoteZeppelinServerControlFeedback_result result = new remoteZeppelinServerControlFeedback_result();
|
||||
receiveBase(result, "remoteZeppelinServerControlFeedback");
|
||||
onReceivedResourceParagraphRunners_result result = new onReceivedResourceParagraphRunners_result();
|
||||
receiveBase(result, "onReceivedResourceParagraphRunners");
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -1568,23 +1568,23 @@ public class RemoteInterpreterService {
|
|||
}
|
||||
}
|
||||
|
||||
public void remoteZeppelinServerControlFeedback(RemoteZeppelinServerController response, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
|
||||
public void onReceivedResourceParagraphRunners(RemoteInterpreterEvent response, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
|
||||
checkReady();
|
||||
remoteZeppelinServerControlFeedback_call method_call = new remoteZeppelinServerControlFeedback_call(response, resultHandler, this, ___protocolFactory, ___transport);
|
||||
onReceivedResourceParagraphRunners_call method_call = new onReceivedResourceParagraphRunners_call(response, resultHandler, this, ___protocolFactory, ___transport);
|
||||
this.___currentMethod = method_call;
|
||||
___manager.call(method_call);
|
||||
}
|
||||
|
||||
public static class remoteZeppelinServerControlFeedback_call extends org.apache.thrift.async.TAsyncMethodCall {
|
||||
private RemoteZeppelinServerController response;
|
||||
public remoteZeppelinServerControlFeedback_call(RemoteZeppelinServerController response, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
|
||||
public static class onReceivedResourceParagraphRunners_call extends org.apache.thrift.async.TAsyncMethodCall {
|
||||
private RemoteInterpreterEvent response;
|
||||
public onReceivedResourceParagraphRunners_call(RemoteInterpreterEvent response, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
|
||||
super(client, protocolFactory, transport, resultHandler, false);
|
||||
this.response = response;
|
||||
}
|
||||
|
||||
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
|
||||
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("remoteZeppelinServerControlFeedback", org.apache.thrift.protocol.TMessageType.CALL, 0));
|
||||
remoteZeppelinServerControlFeedback_args args = new remoteZeppelinServerControlFeedback_args();
|
||||
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("onReceivedResourceParagraphRunners", org.apache.thrift.protocol.TMessageType.CALL, 0));
|
||||
onReceivedResourceParagraphRunners_args args = new onReceivedResourceParagraphRunners_args();
|
||||
args.setResponse(response);
|
||||
args.write(prot);
|
||||
prot.writeMessageEnd();
|
||||
|
|
@ -1596,7 +1596,7 @@ public class RemoteInterpreterService {
|
|||
}
|
||||
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
|
||||
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
|
||||
(new Client(prot)).recv_remoteZeppelinServerControlFeedback();
|
||||
(new Client(prot)).recv_onReceivedResourceParagraphRunners();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1636,7 +1636,7 @@ public class RemoteInterpreterService {
|
|||
processMap.put("loadApplication", new loadApplication());
|
||||
processMap.put("unloadApplication", new unloadApplication());
|
||||
processMap.put("runApplication", new runApplication());
|
||||
processMap.put("remoteZeppelinServerControlFeedback", new remoteZeppelinServerControlFeedback());
|
||||
processMap.put("onReceivedResourceParagraphRunners", new onReceivedResourceParagraphRunners());
|
||||
return processMap;
|
||||
}
|
||||
|
||||
|
|
@ -2102,22 +2102,22 @@ public class RemoteInterpreterService {
|
|||
}
|
||||
}
|
||||
|
||||
public static class remoteZeppelinServerControlFeedback<I extends Iface> extends org.apache.thrift.ProcessFunction<I, remoteZeppelinServerControlFeedback_args> {
|
||||
public remoteZeppelinServerControlFeedback() {
|
||||
super("remoteZeppelinServerControlFeedback");
|
||||
public static class onReceivedResourceParagraphRunners<I extends Iface> extends org.apache.thrift.ProcessFunction<I, onReceivedResourceParagraphRunners_args> {
|
||||
public onReceivedResourceParagraphRunners() {
|
||||
super("onReceivedResourceParagraphRunners");
|
||||
}
|
||||
|
||||
public remoteZeppelinServerControlFeedback_args getEmptyArgsInstance() {
|
||||
return new remoteZeppelinServerControlFeedback_args();
|
||||
public onReceivedResourceParagraphRunners_args getEmptyArgsInstance() {
|
||||
return new onReceivedResourceParagraphRunners_args();
|
||||
}
|
||||
|
||||
protected boolean isOneway() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public remoteZeppelinServerControlFeedback_result getResult(I iface, remoteZeppelinServerControlFeedback_args args) throws org.apache.thrift.TException {
|
||||
remoteZeppelinServerControlFeedback_result result = new remoteZeppelinServerControlFeedback_result();
|
||||
iface.remoteZeppelinServerControlFeedback(args.response);
|
||||
public onReceivedResourceParagraphRunners_result getResult(I iface, onReceivedResourceParagraphRunners_args args) throws org.apache.thrift.TException {
|
||||
onReceivedResourceParagraphRunners_result result = new onReceivedResourceParagraphRunners_result();
|
||||
iface.onReceivedResourceParagraphRunners(args.response);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
|
@ -2158,7 +2158,7 @@ public class RemoteInterpreterService {
|
|||
processMap.put("loadApplication", new loadApplication());
|
||||
processMap.put("unloadApplication", new unloadApplication());
|
||||
processMap.put("runApplication", new runApplication());
|
||||
processMap.put("remoteZeppelinServerControlFeedback", new remoteZeppelinServerControlFeedback());
|
||||
processMap.put("onReceivedResourceParagraphRunners", new onReceivedResourceParagraphRunners());
|
||||
return processMap;
|
||||
}
|
||||
|
||||
|
|
@ -3326,20 +3326,20 @@ public class RemoteInterpreterService {
|
|||
}
|
||||
}
|
||||
|
||||
public static class remoteZeppelinServerControlFeedback<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, remoteZeppelinServerControlFeedback_args, Void> {
|
||||
public remoteZeppelinServerControlFeedback() {
|
||||
super("remoteZeppelinServerControlFeedback");
|
||||
public static class onReceivedResourceParagraphRunners<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, onReceivedResourceParagraphRunners_args, Void> {
|
||||
public onReceivedResourceParagraphRunners() {
|
||||
super("onReceivedResourceParagraphRunners");
|
||||
}
|
||||
|
||||
public remoteZeppelinServerControlFeedback_args getEmptyArgsInstance() {
|
||||
return new remoteZeppelinServerControlFeedback_args();
|
||||
public onReceivedResourceParagraphRunners_args getEmptyArgsInstance() {
|
||||
return new onReceivedResourceParagraphRunners_args();
|
||||
}
|
||||
|
||||
public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
|
||||
final org.apache.thrift.AsyncProcessFunction fcall = this;
|
||||
return new AsyncMethodCallback<Void>() {
|
||||
public void onComplete(Void o) {
|
||||
remoteZeppelinServerControlFeedback_result result = new remoteZeppelinServerControlFeedback_result();
|
||||
onReceivedResourceParagraphRunners_result result = new onReceivedResourceParagraphRunners_result();
|
||||
try {
|
||||
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
|
||||
return;
|
||||
|
|
@ -3351,7 +3351,7 @@ public class RemoteInterpreterService {
|
|||
public void onError(Exception e) {
|
||||
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
|
||||
org.apache.thrift.TBase msg;
|
||||
remoteZeppelinServerControlFeedback_result result = new remoteZeppelinServerControlFeedback_result();
|
||||
onReceivedResourceParagraphRunners_result result = new onReceivedResourceParagraphRunners_result();
|
||||
{
|
||||
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
|
||||
msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
|
||||
|
|
@ -3371,8 +3371,8 @@ public class RemoteInterpreterService {
|
|||
return false;
|
||||
}
|
||||
|
||||
public void start(I iface, remoteZeppelinServerControlFeedback_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
|
||||
iface.remoteZeppelinServerControlFeedback(args.response,resultHandler);
|
||||
public void start(I iface, onReceivedResourceParagraphRunners_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
|
||||
iface.onReceivedResourceParagraphRunners(args.response,resultHandler);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -22129,18 +22129,18 @@ public class RemoteInterpreterService {
|
|||
|
||||
}
|
||||
|
||||
public static class remoteZeppelinServerControlFeedback_args implements org.apache.thrift.TBase<remoteZeppelinServerControlFeedback_args, remoteZeppelinServerControlFeedback_args._Fields>, java.io.Serializable, Cloneable, Comparable<remoteZeppelinServerControlFeedback_args> {
|
||||
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("remoteZeppelinServerControlFeedback_args");
|
||||
public static class onReceivedResourceParagraphRunners_args implements org.apache.thrift.TBase<onReceivedResourceParagraphRunners_args, onReceivedResourceParagraphRunners_args._Fields>, java.io.Serializable, Cloneable, Comparable<onReceivedResourceParagraphRunners_args> {
|
||||
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("onReceivedResourceParagraphRunners_args");
|
||||
|
||||
private static final org.apache.thrift.protocol.TField RESPONSE_FIELD_DESC = new org.apache.thrift.protocol.TField("response", org.apache.thrift.protocol.TType.STRUCT, (short)1);
|
||||
|
||||
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
|
||||
static {
|
||||
schemes.put(StandardScheme.class, new remoteZeppelinServerControlFeedback_argsStandardSchemeFactory());
|
||||
schemes.put(TupleScheme.class, new remoteZeppelinServerControlFeedback_argsTupleSchemeFactory());
|
||||
schemes.put(StandardScheme.class, new onReceivedResourceParagraphRunners_argsStandardSchemeFactory());
|
||||
schemes.put(TupleScheme.class, new onReceivedResourceParagraphRunners_argsTupleSchemeFactory());
|
||||
}
|
||||
|
||||
public RemoteZeppelinServerController response; // required
|
||||
public RemoteInterpreterEvent response; // required
|
||||
|
||||
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
|
||||
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
|
||||
|
|
@ -22205,16 +22205,16 @@ public class RemoteInterpreterService {
|
|||
static {
|
||||
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
|
||||
tmpMap.put(_Fields.RESPONSE, new org.apache.thrift.meta_data.FieldMetaData("response", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
||||
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, RemoteZeppelinServerController.class)));
|
||||
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, RemoteInterpreterEvent.class)));
|
||||
metaDataMap = Collections.unmodifiableMap(tmpMap);
|
||||
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(remoteZeppelinServerControlFeedback_args.class, metaDataMap);
|
||||
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(onReceivedResourceParagraphRunners_args.class, metaDataMap);
|
||||
}
|
||||
|
||||
public remoteZeppelinServerControlFeedback_args() {
|
||||
public onReceivedResourceParagraphRunners_args() {
|
||||
}
|
||||
|
||||
public remoteZeppelinServerControlFeedback_args(
|
||||
RemoteZeppelinServerController response)
|
||||
public onReceivedResourceParagraphRunners_args(
|
||||
RemoteInterpreterEvent response)
|
||||
{
|
||||
this();
|
||||
this.response = response;
|
||||
|
|
@ -22223,14 +22223,14 @@ public class RemoteInterpreterService {
|
|||
/**
|
||||
* Performs a deep copy on <i>other</i>.
|
||||
*/
|
||||
public remoteZeppelinServerControlFeedback_args(remoteZeppelinServerControlFeedback_args other) {
|
||||
public onReceivedResourceParagraphRunners_args(onReceivedResourceParagraphRunners_args other) {
|
||||
if (other.isSetResponse()) {
|
||||
this.response = new RemoteZeppelinServerController(other.response);
|
||||
this.response = new RemoteInterpreterEvent(other.response);
|
||||
}
|
||||
}
|
||||
|
||||
public remoteZeppelinServerControlFeedback_args deepCopy() {
|
||||
return new remoteZeppelinServerControlFeedback_args(this);
|
||||
public onReceivedResourceParagraphRunners_args deepCopy() {
|
||||
return new onReceivedResourceParagraphRunners_args(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -22238,11 +22238,11 @@ public class RemoteInterpreterService {
|
|||
this.response = null;
|
||||
}
|
||||
|
||||
public RemoteZeppelinServerController getResponse() {
|
||||
public RemoteInterpreterEvent getResponse() {
|
||||
return this.response;
|
||||
}
|
||||
|
||||
public remoteZeppelinServerControlFeedback_args setResponse(RemoteZeppelinServerController response) {
|
||||
public onReceivedResourceParagraphRunners_args setResponse(RemoteInterpreterEvent response) {
|
||||
this.response = response;
|
||||
return this;
|
||||
}
|
||||
|
|
@ -22268,7 +22268,7 @@ public class RemoteInterpreterService {
|
|||
if (value == null) {
|
||||
unsetResponse();
|
||||
} else {
|
||||
setResponse((RemoteZeppelinServerController)value);
|
||||
setResponse((RemoteInterpreterEvent)value);
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
@ -22301,12 +22301,12 @@ public class RemoteInterpreterService {
|
|||
public boolean equals(Object that) {
|
||||
if (that == null)
|
||||
return false;
|
||||
if (that instanceof remoteZeppelinServerControlFeedback_args)
|
||||
return this.equals((remoteZeppelinServerControlFeedback_args)that);
|
||||
if (that instanceof onReceivedResourceParagraphRunners_args)
|
||||
return this.equals((onReceivedResourceParagraphRunners_args)that);
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean equals(remoteZeppelinServerControlFeedback_args that) {
|
||||
public boolean equals(onReceivedResourceParagraphRunners_args that) {
|
||||
if (that == null)
|
||||
return false;
|
||||
|
||||
|
|
@ -22335,7 +22335,7 @@ public class RemoteInterpreterService {
|
|||
}
|
||||
|
||||
@Override
|
||||
public int compareTo(remoteZeppelinServerControlFeedback_args other) {
|
||||
public int compareTo(onReceivedResourceParagraphRunners_args other) {
|
||||
if (!getClass().equals(other.getClass())) {
|
||||
return getClass().getName().compareTo(other.getClass().getName());
|
||||
}
|
||||
|
|
@ -22369,7 +22369,7 @@ public class RemoteInterpreterService {
|
|||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder("remoteZeppelinServerControlFeedback_args(");
|
||||
StringBuilder sb = new StringBuilder("onReceivedResourceParagraphRunners_args(");
|
||||
boolean first = true;
|
||||
|
||||
sb.append("response:");
|
||||
|
|
@ -22407,15 +22407,15 @@ public class RemoteInterpreterService {
|
|||
}
|
||||
}
|
||||
|
||||
private static class remoteZeppelinServerControlFeedback_argsStandardSchemeFactory implements SchemeFactory {
|
||||
public remoteZeppelinServerControlFeedback_argsStandardScheme getScheme() {
|
||||
return new remoteZeppelinServerControlFeedback_argsStandardScheme();
|
||||
private static class onReceivedResourceParagraphRunners_argsStandardSchemeFactory implements SchemeFactory {
|
||||
public onReceivedResourceParagraphRunners_argsStandardScheme getScheme() {
|
||||
return new onReceivedResourceParagraphRunners_argsStandardScheme();
|
||||
}
|
||||
}
|
||||
|
||||
private static class remoteZeppelinServerControlFeedback_argsStandardScheme extends StandardScheme<remoteZeppelinServerControlFeedback_args> {
|
||||
private static class onReceivedResourceParagraphRunners_argsStandardScheme extends StandardScheme<onReceivedResourceParagraphRunners_args> {
|
||||
|
||||
public void read(org.apache.thrift.protocol.TProtocol iprot, remoteZeppelinServerControlFeedback_args struct) throws org.apache.thrift.TException {
|
||||
public void read(org.apache.thrift.protocol.TProtocol iprot, onReceivedResourceParagraphRunners_args struct) throws org.apache.thrift.TException {
|
||||
org.apache.thrift.protocol.TField schemeField;
|
||||
iprot.readStructBegin();
|
||||
while (true)
|
||||
|
|
@ -22427,7 +22427,7 @@ public class RemoteInterpreterService {
|
|||
switch (schemeField.id) {
|
||||
case 1: // RESPONSE
|
||||
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
|
||||
struct.response = new RemoteZeppelinServerController();
|
||||
struct.response = new RemoteInterpreterEvent();
|
||||
struct.response.read(iprot);
|
||||
struct.setResponseIsSet(true);
|
||||
} else {
|
||||
|
|
@ -22445,7 +22445,7 @@ public class RemoteInterpreterService {
|
|||
struct.validate();
|
||||
}
|
||||
|
||||
public void write(org.apache.thrift.protocol.TProtocol oprot, remoteZeppelinServerControlFeedback_args struct) throws org.apache.thrift.TException {
|
||||
public void write(org.apache.thrift.protocol.TProtocol oprot, onReceivedResourceParagraphRunners_args struct) throws org.apache.thrift.TException {
|
||||
struct.validate();
|
||||
|
||||
oprot.writeStructBegin(STRUCT_DESC);
|
||||
|
|
@ -22460,16 +22460,16 @@ public class RemoteInterpreterService {
|
|||
|
||||
}
|
||||
|
||||
private static class remoteZeppelinServerControlFeedback_argsTupleSchemeFactory implements SchemeFactory {
|
||||
public remoteZeppelinServerControlFeedback_argsTupleScheme getScheme() {
|
||||
return new remoteZeppelinServerControlFeedback_argsTupleScheme();
|
||||
private static class onReceivedResourceParagraphRunners_argsTupleSchemeFactory implements SchemeFactory {
|
||||
public onReceivedResourceParagraphRunners_argsTupleScheme getScheme() {
|
||||
return new onReceivedResourceParagraphRunners_argsTupleScheme();
|
||||
}
|
||||
}
|
||||
|
||||
private static class remoteZeppelinServerControlFeedback_argsTupleScheme extends TupleScheme<remoteZeppelinServerControlFeedback_args> {
|
||||
private static class onReceivedResourceParagraphRunners_argsTupleScheme extends TupleScheme<onReceivedResourceParagraphRunners_args> {
|
||||
|
||||
@Override
|
||||
public void write(org.apache.thrift.protocol.TProtocol prot, remoteZeppelinServerControlFeedback_args struct) throws org.apache.thrift.TException {
|
||||
public void write(org.apache.thrift.protocol.TProtocol prot, onReceivedResourceParagraphRunners_args struct) throws org.apache.thrift.TException {
|
||||
TTupleProtocol oprot = (TTupleProtocol) prot;
|
||||
BitSet optionals = new BitSet();
|
||||
if (struct.isSetResponse()) {
|
||||
|
|
@ -22482,11 +22482,11 @@ public class RemoteInterpreterService {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void read(org.apache.thrift.protocol.TProtocol prot, remoteZeppelinServerControlFeedback_args struct) throws org.apache.thrift.TException {
|
||||
public void read(org.apache.thrift.protocol.TProtocol prot, onReceivedResourceParagraphRunners_args struct) throws org.apache.thrift.TException {
|
||||
TTupleProtocol iprot = (TTupleProtocol) prot;
|
||||
BitSet incoming = iprot.readBitSet(1);
|
||||
if (incoming.get(0)) {
|
||||
struct.response = new RemoteZeppelinServerController();
|
||||
struct.response = new RemoteInterpreterEvent();
|
||||
struct.response.read(iprot);
|
||||
struct.setResponseIsSet(true);
|
||||
}
|
||||
|
|
@ -22495,14 +22495,14 @@ public class RemoteInterpreterService {
|
|||
|
||||
}
|
||||
|
||||
public static class remoteZeppelinServerControlFeedback_result implements org.apache.thrift.TBase<remoteZeppelinServerControlFeedback_result, remoteZeppelinServerControlFeedback_result._Fields>, java.io.Serializable, Cloneable, Comparable<remoteZeppelinServerControlFeedback_result> {
|
||||
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("remoteZeppelinServerControlFeedback_result");
|
||||
public static class onReceivedResourceParagraphRunners_result implements org.apache.thrift.TBase<onReceivedResourceParagraphRunners_result, onReceivedResourceParagraphRunners_result._Fields>, java.io.Serializable, Cloneable, Comparable<onReceivedResourceParagraphRunners_result> {
|
||||
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("onReceivedResourceParagraphRunners_result");
|
||||
|
||||
|
||||
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
|
||||
static {
|
||||
schemes.put(StandardScheme.class, new remoteZeppelinServerControlFeedback_resultStandardSchemeFactory());
|
||||
schemes.put(TupleScheme.class, new remoteZeppelinServerControlFeedback_resultTupleSchemeFactory());
|
||||
schemes.put(StandardScheme.class, new onReceivedResourceParagraphRunners_resultStandardSchemeFactory());
|
||||
schemes.put(TupleScheme.class, new onReceivedResourceParagraphRunners_resultTupleSchemeFactory());
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -22565,20 +22565,20 @@ public class RemoteInterpreterService {
|
|||
static {
|
||||
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
|
||||
metaDataMap = Collections.unmodifiableMap(tmpMap);
|
||||
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(remoteZeppelinServerControlFeedback_result.class, metaDataMap);
|
||||
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(onReceivedResourceParagraphRunners_result.class, metaDataMap);
|
||||
}
|
||||
|
||||
public remoteZeppelinServerControlFeedback_result() {
|
||||
public onReceivedResourceParagraphRunners_result() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Performs a deep copy on <i>other</i>.
|
||||
*/
|
||||
public remoteZeppelinServerControlFeedback_result(remoteZeppelinServerControlFeedback_result other) {
|
||||
public onReceivedResourceParagraphRunners_result(onReceivedResourceParagraphRunners_result other) {
|
||||
}
|
||||
|
||||
public remoteZeppelinServerControlFeedback_result deepCopy() {
|
||||
return new remoteZeppelinServerControlFeedback_result(this);
|
||||
public onReceivedResourceParagraphRunners_result deepCopy() {
|
||||
return new onReceivedResourceParagraphRunners_result(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -22611,12 +22611,12 @@ public class RemoteInterpreterService {
|
|||
public boolean equals(Object that) {
|
||||
if (that == null)
|
||||
return false;
|
||||
if (that instanceof remoteZeppelinServerControlFeedback_result)
|
||||
return this.equals((remoteZeppelinServerControlFeedback_result)that);
|
||||
if (that instanceof onReceivedResourceParagraphRunners_result)
|
||||
return this.equals((onReceivedResourceParagraphRunners_result)that);
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean equals(remoteZeppelinServerControlFeedback_result that) {
|
||||
public boolean equals(onReceivedResourceParagraphRunners_result that) {
|
||||
if (that == null)
|
||||
return false;
|
||||
|
||||
|
|
@ -22631,7 +22631,7 @@ public class RemoteInterpreterService {
|
|||
}
|
||||
|
||||
@Override
|
||||
public int compareTo(remoteZeppelinServerControlFeedback_result other) {
|
||||
public int compareTo(onReceivedResourceParagraphRunners_result other) {
|
||||
if (!getClass().equals(other.getClass())) {
|
||||
return getClass().getName().compareTo(other.getClass().getName());
|
||||
}
|
||||
|
|
@ -22655,7 +22655,7 @@ public class RemoteInterpreterService {
|
|||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder("remoteZeppelinServerControlFeedback_result(");
|
||||
StringBuilder sb = new StringBuilder("onReceivedResourceParagraphRunners_result(");
|
||||
boolean first = true;
|
||||
|
||||
sb.append(")");
|
||||
|
|
@ -22683,15 +22683,15 @@ public class RemoteInterpreterService {
|
|||
}
|
||||
}
|
||||
|
||||
private static class remoteZeppelinServerControlFeedback_resultStandardSchemeFactory implements SchemeFactory {
|
||||
public remoteZeppelinServerControlFeedback_resultStandardScheme getScheme() {
|
||||
return new remoteZeppelinServerControlFeedback_resultStandardScheme();
|
||||
private static class onReceivedResourceParagraphRunners_resultStandardSchemeFactory implements SchemeFactory {
|
||||
public onReceivedResourceParagraphRunners_resultStandardScheme getScheme() {
|
||||
return new onReceivedResourceParagraphRunners_resultStandardScheme();
|
||||
}
|
||||
}
|
||||
|
||||
private static class remoteZeppelinServerControlFeedback_resultStandardScheme extends StandardScheme<remoteZeppelinServerControlFeedback_result> {
|
||||
private static class onReceivedResourceParagraphRunners_resultStandardScheme extends StandardScheme<onReceivedResourceParagraphRunners_result> {
|
||||
|
||||
public void read(org.apache.thrift.protocol.TProtocol iprot, remoteZeppelinServerControlFeedback_result struct) throws org.apache.thrift.TException {
|
||||
public void read(org.apache.thrift.protocol.TProtocol iprot, onReceivedResourceParagraphRunners_result struct) throws org.apache.thrift.TException {
|
||||
org.apache.thrift.protocol.TField schemeField;
|
||||
iprot.readStructBegin();
|
||||
while (true)
|
||||
|
|
@ -22712,7 +22712,7 @@ public class RemoteInterpreterService {
|
|||
struct.validate();
|
||||
}
|
||||
|
||||
public void write(org.apache.thrift.protocol.TProtocol oprot, remoteZeppelinServerControlFeedback_result struct) throws org.apache.thrift.TException {
|
||||
public void write(org.apache.thrift.protocol.TProtocol oprot, onReceivedResourceParagraphRunners_result struct) throws org.apache.thrift.TException {
|
||||
struct.validate();
|
||||
|
||||
oprot.writeStructBegin(STRUCT_DESC);
|
||||
|
|
@ -22722,21 +22722,21 @@ public class RemoteInterpreterService {
|
|||
|
||||
}
|
||||
|
||||
private static class remoteZeppelinServerControlFeedback_resultTupleSchemeFactory implements SchemeFactory {
|
||||
public remoteZeppelinServerControlFeedback_resultTupleScheme getScheme() {
|
||||
return new remoteZeppelinServerControlFeedback_resultTupleScheme();
|
||||
private static class onReceivedResourceParagraphRunners_resultTupleSchemeFactory implements SchemeFactory {
|
||||
public onReceivedResourceParagraphRunners_resultTupleScheme getScheme() {
|
||||
return new onReceivedResourceParagraphRunners_resultTupleScheme();
|
||||
}
|
||||
}
|
||||
|
||||
private static class remoteZeppelinServerControlFeedback_resultTupleScheme extends TupleScheme<remoteZeppelinServerControlFeedback_result> {
|
||||
private static class onReceivedResourceParagraphRunners_resultTupleScheme extends TupleScheme<onReceivedResourceParagraphRunners_result> {
|
||||
|
||||
@Override
|
||||
public void write(org.apache.thrift.protocol.TProtocol prot, remoteZeppelinServerControlFeedback_result struct) throws org.apache.thrift.TException {
|
||||
public void write(org.apache.thrift.protocol.TProtocol prot, onReceivedResourceParagraphRunners_result struct) throws org.apache.thrift.TException {
|
||||
TTupleProtocol oprot = (TTupleProtocol) prot;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void read(org.apache.thrift.protocol.TProtocol prot, remoteZeppelinServerControlFeedback_result struct) throws org.apache.thrift.TException {
|
||||
public void read(org.apache.thrift.protocol.TProtocol prot, onReceivedResourceParagraphRunners_result struct) throws org.apache.thrift.TException {
|
||||
TTupleProtocol iprot = (TTupleProtocol) prot;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,62 +0,0 @@
|
|||
/**
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
/**
|
||||
* Autogenerated by Thrift Compiler (0.9.2)
|
||||
*
|
||||
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
|
||||
* @generated
|
||||
*/
|
||||
package org.apache.zeppelin.interpreter.thrift;
|
||||
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import org.apache.thrift.TEnum;
|
||||
|
||||
public enum RemoteZeppelinServerControlEvent implements org.apache.thrift.TEnum {
|
||||
REQ_RESOURCE_PARAGRAPH_RUN_CONTEXT(1),
|
||||
RES_RESOURCE_PARAGRAPH_RUN_CONTEXT(2);
|
||||
|
||||
private final int value;
|
||||
|
||||
private RemoteZeppelinServerControlEvent(int value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the integer value of this enum value, as defined in the Thrift IDL.
|
||||
*/
|
||||
public int getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Find a the enum type by its integer value, as defined in the Thrift IDL.
|
||||
* @return null if the value is not found.
|
||||
*/
|
||||
public static RemoteZeppelinServerControlEvent findByValue(int value) {
|
||||
switch (value) {
|
||||
case 1:
|
||||
return REQ_RESOURCE_PARAGRAPH_RUN_CONTEXT;
|
||||
case 2:
|
||||
return RES_RESOURCE_PARAGRAPH_RUN_CONTEXT;
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -51,11 +51,10 @@ import org.slf4j.Logger;
|
|||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
|
||||
@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2016-11-17")
|
||||
@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2016-11-18")
|
||||
public class RemoteZeppelinServerController implements org.apache.thrift.TBase<RemoteZeppelinServerController, RemoteZeppelinServerController._Fields>, java.io.Serializable, Cloneable, Comparable<RemoteZeppelinServerController> {
|
||||
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("RemoteZeppelinServerController");
|
||||
|
||||
private static final org.apache.thrift.protocol.TField TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("type", org.apache.thrift.protocol.TType.I32, (short)1);
|
||||
private static final org.apache.thrift.protocol.TField EVENT_OWNER_KEY_FIELD_DESC = new org.apache.thrift.protocol.TField("eventOwnerKey", org.apache.thrift.protocol.TType.STRING, (short)2);
|
||||
private static final org.apache.thrift.protocol.TField MSG_FIELD_DESC = new org.apache.thrift.protocol.TField("msg", org.apache.thrift.protocol.TType.STRING, (short)3);
|
||||
|
||||
|
|
@ -65,21 +64,11 @@ public class RemoteZeppelinServerController implements org.apache.thrift.TBase<R
|
|||
schemes.put(TupleScheme.class, new RemoteZeppelinServerControllerTupleSchemeFactory());
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @see RemoteZeppelinServerControlEvent
|
||||
*/
|
||||
public RemoteZeppelinServerControlEvent type; // required
|
||||
public String eventOwnerKey; // required
|
||||
public String msg; // required
|
||||
|
||||
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
|
||||
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
|
||||
/**
|
||||
*
|
||||
* @see RemoteZeppelinServerControlEvent
|
||||
*/
|
||||
TYPE((short)1, "type"),
|
||||
EVENT_OWNER_KEY((short)2, "eventOwnerKey"),
|
||||
MSG((short)3, "msg");
|
||||
|
||||
|
|
@ -96,8 +85,6 @@ public class RemoteZeppelinServerController implements org.apache.thrift.TBase<R
|
|||
*/
|
||||
public static _Fields findByThriftId(int fieldId) {
|
||||
switch(fieldId) {
|
||||
case 1: // TYPE
|
||||
return TYPE;
|
||||
case 2: // EVENT_OWNER_KEY
|
||||
return EVENT_OWNER_KEY;
|
||||
case 3: // MSG
|
||||
|
|
@ -145,8 +132,6 @@ public class RemoteZeppelinServerController implements org.apache.thrift.TBase<R
|
|||
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
|
||||
static {
|
||||
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
|
||||
tmpMap.put(_Fields.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
||||
new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, RemoteZeppelinServerControlEvent.class)));
|
||||
tmpMap.put(_Fields.EVENT_OWNER_KEY, new org.apache.thrift.meta_data.FieldMetaData("eventOwnerKey", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
||||
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
|
||||
tmpMap.put(_Fields.MSG, new org.apache.thrift.meta_data.FieldMetaData("msg", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
||||
|
|
@ -159,12 +144,10 @@ public class RemoteZeppelinServerController implements org.apache.thrift.TBase<R
|
|||
}
|
||||
|
||||
public RemoteZeppelinServerController(
|
||||
RemoteZeppelinServerControlEvent type,
|
||||
String eventOwnerKey,
|
||||
String msg)
|
||||
{
|
||||
this();
|
||||
this.type = type;
|
||||
this.eventOwnerKey = eventOwnerKey;
|
||||
this.msg = msg;
|
||||
}
|
||||
|
|
@ -173,9 +156,6 @@ public class RemoteZeppelinServerController implements org.apache.thrift.TBase<R
|
|||
* Performs a deep copy on <i>other</i>.
|
||||
*/
|
||||
public RemoteZeppelinServerController(RemoteZeppelinServerController other) {
|
||||
if (other.isSetType()) {
|
||||
this.type = other.type;
|
||||
}
|
||||
if (other.isSetEventOwnerKey()) {
|
||||
this.eventOwnerKey = other.eventOwnerKey;
|
||||
}
|
||||
|
|
@ -190,43 +170,10 @@ public class RemoteZeppelinServerController implements org.apache.thrift.TBase<R
|
|||
|
||||
@Override
|
||||
public void clear() {
|
||||
this.type = null;
|
||||
this.eventOwnerKey = null;
|
||||
this.msg = null;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @see RemoteZeppelinServerControlEvent
|
||||
*/
|
||||
public RemoteZeppelinServerControlEvent getType() {
|
||||
return this.type;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @see RemoteZeppelinServerControlEvent
|
||||
*/
|
||||
public RemoteZeppelinServerController setType(RemoteZeppelinServerControlEvent type) {
|
||||
this.type = type;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void unsetType() {
|
||||
this.type = null;
|
||||
}
|
||||
|
||||
/** Returns true if field type is set (has been assigned a value) and false otherwise */
|
||||
public boolean isSetType() {
|
||||
return this.type != null;
|
||||
}
|
||||
|
||||
public void setTypeIsSet(boolean value) {
|
||||
if (!value) {
|
||||
this.type = null;
|
||||
}
|
||||
}
|
||||
|
||||
public String getEventOwnerKey() {
|
||||
return this.eventOwnerKey;
|
||||
}
|
||||
|
|
@ -277,14 +224,6 @@ public class RemoteZeppelinServerController implements org.apache.thrift.TBase<R
|
|||
|
||||
public void setFieldValue(_Fields field, Object value) {
|
||||
switch (field) {
|
||||
case TYPE:
|
||||
if (value == null) {
|
||||
unsetType();
|
||||
} else {
|
||||
setType((RemoteZeppelinServerControlEvent)value);
|
||||
}
|
||||
break;
|
||||
|
||||
case EVENT_OWNER_KEY:
|
||||
if (value == null) {
|
||||
unsetEventOwnerKey();
|
||||
|
|
@ -306,9 +245,6 @@ public class RemoteZeppelinServerController implements org.apache.thrift.TBase<R
|
|||
|
||||
public Object getFieldValue(_Fields field) {
|
||||
switch (field) {
|
||||
case TYPE:
|
||||
return getType();
|
||||
|
||||
case EVENT_OWNER_KEY:
|
||||
return getEventOwnerKey();
|
||||
|
||||
|
|
@ -326,8 +262,6 @@ public class RemoteZeppelinServerController implements org.apache.thrift.TBase<R
|
|||
}
|
||||
|
||||
switch (field) {
|
||||
case TYPE:
|
||||
return isSetType();
|
||||
case EVENT_OWNER_KEY:
|
||||
return isSetEventOwnerKey();
|
||||
case MSG:
|
||||
|
|
@ -349,15 +283,6 @@ public class RemoteZeppelinServerController implements org.apache.thrift.TBase<R
|
|||
if (that == null)
|
||||
return false;
|
||||
|
||||
boolean this_present_type = true && this.isSetType();
|
||||
boolean that_present_type = true && that.isSetType();
|
||||
if (this_present_type || that_present_type) {
|
||||
if (!(this_present_type && that_present_type))
|
||||
return false;
|
||||
if (!this.type.equals(that.type))
|
||||
return false;
|
||||
}
|
||||
|
||||
boolean this_present_eventOwnerKey = true && this.isSetEventOwnerKey();
|
||||
boolean that_present_eventOwnerKey = true && that.isSetEventOwnerKey();
|
||||
if (this_present_eventOwnerKey || that_present_eventOwnerKey) {
|
||||
|
|
@ -383,11 +308,6 @@ public class RemoteZeppelinServerController implements org.apache.thrift.TBase<R
|
|||
public int hashCode() {
|
||||
List<Object> list = new ArrayList<Object>();
|
||||
|
||||
boolean present_type = true && (isSetType());
|
||||
list.add(present_type);
|
||||
if (present_type)
|
||||
list.add(type.getValue());
|
||||
|
||||
boolean present_eventOwnerKey = true && (isSetEventOwnerKey());
|
||||
list.add(present_eventOwnerKey);
|
||||
if (present_eventOwnerKey)
|
||||
|
|
@ -409,16 +329,6 @@ public class RemoteZeppelinServerController implements org.apache.thrift.TBase<R
|
|||
|
||||
int lastComparison = 0;
|
||||
|
||||
lastComparison = Boolean.valueOf(isSetType()).compareTo(other.isSetType());
|
||||
if (lastComparison != 0) {
|
||||
return lastComparison;
|
||||
}
|
||||
if (isSetType()) {
|
||||
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, other.type);
|
||||
if (lastComparison != 0) {
|
||||
return lastComparison;
|
||||
}
|
||||
}
|
||||
lastComparison = Boolean.valueOf(isSetEventOwnerKey()).compareTo(other.isSetEventOwnerKey());
|
||||
if (lastComparison != 0) {
|
||||
return lastComparison;
|
||||
|
|
@ -459,14 +369,6 @@ public class RemoteZeppelinServerController implements org.apache.thrift.TBase<R
|
|||
StringBuilder sb = new StringBuilder("RemoteZeppelinServerController(");
|
||||
boolean first = true;
|
||||
|
||||
sb.append("type:");
|
||||
if (this.type == null) {
|
||||
sb.append("null");
|
||||
} else {
|
||||
sb.append(this.type);
|
||||
}
|
||||
first = false;
|
||||
if (!first) sb.append(", ");
|
||||
sb.append("eventOwnerKey:");
|
||||
if (this.eventOwnerKey == null) {
|
||||
sb.append("null");
|
||||
|
|
@ -525,14 +427,6 @@ public class RemoteZeppelinServerController implements org.apache.thrift.TBase<R
|
|||
break;
|
||||
}
|
||||
switch (schemeField.id) {
|
||||
case 1: // TYPE
|
||||
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
|
||||
struct.type = org.apache.zeppelin.interpreter.thrift.RemoteZeppelinServerControlEvent.findByValue(iprot.readI32());
|
||||
struct.setTypeIsSet(true);
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||
}
|
||||
break;
|
||||
case 2: // EVENT_OWNER_KEY
|
||||
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
|
||||
struct.eventOwnerKey = iprot.readString();
|
||||
|
|
@ -564,11 +458,6 @@ public class RemoteZeppelinServerController implements org.apache.thrift.TBase<R
|
|||
struct.validate();
|
||||
|
||||
oprot.writeStructBegin(STRUCT_DESC);
|
||||
if (struct.type != null) {
|
||||
oprot.writeFieldBegin(TYPE_FIELD_DESC);
|
||||
oprot.writeI32(struct.type.getValue());
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
if (struct.eventOwnerKey != null) {
|
||||
oprot.writeFieldBegin(EVENT_OWNER_KEY_FIELD_DESC);
|
||||
oprot.writeString(struct.eventOwnerKey);
|
||||
|
|
@ -597,19 +486,13 @@ public class RemoteZeppelinServerController implements org.apache.thrift.TBase<R
|
|||
public void write(org.apache.thrift.protocol.TProtocol prot, RemoteZeppelinServerController struct) throws org.apache.thrift.TException {
|
||||
TTupleProtocol oprot = (TTupleProtocol) prot;
|
||||
BitSet optionals = new BitSet();
|
||||
if (struct.isSetType()) {
|
||||
if (struct.isSetEventOwnerKey()) {
|
||||
optionals.set(0);
|
||||
}
|
||||
if (struct.isSetEventOwnerKey()) {
|
||||
if (struct.isSetMsg()) {
|
||||
optionals.set(1);
|
||||
}
|
||||
if (struct.isSetMsg()) {
|
||||
optionals.set(2);
|
||||
}
|
||||
oprot.writeBitSet(optionals, 3);
|
||||
if (struct.isSetType()) {
|
||||
oprot.writeI32(struct.type.getValue());
|
||||
}
|
||||
oprot.writeBitSet(optionals, 2);
|
||||
if (struct.isSetEventOwnerKey()) {
|
||||
oprot.writeString(struct.eventOwnerKey);
|
||||
}
|
||||
|
|
@ -621,16 +504,12 @@ public class RemoteZeppelinServerController implements org.apache.thrift.TBase<R
|
|||
@Override
|
||||
public void read(org.apache.thrift.protocol.TProtocol prot, RemoteZeppelinServerController struct) throws org.apache.thrift.TException {
|
||||
TTupleProtocol iprot = (TTupleProtocol) prot;
|
||||
BitSet incoming = iprot.readBitSet(3);
|
||||
BitSet incoming = iprot.readBitSet(2);
|
||||
if (incoming.get(0)) {
|
||||
struct.type = org.apache.zeppelin.interpreter.thrift.RemoteZeppelinServerControlEvent.findByValue(iprot.readI32());
|
||||
struct.setTypeIsSet(true);
|
||||
}
|
||||
if (incoming.get(1)) {
|
||||
struct.eventOwnerKey = iprot.readString();
|
||||
struct.setEventOwnerKeyIsSet(true);
|
||||
}
|
||||
if (incoming.get(2)) {
|
||||
if (incoming.get(1)) {
|
||||
struct.msg = iprot.readString();
|
||||
struct.setMsgIsSet(true);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,59 +0,0 @@
|
|||
/**
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
/**
|
||||
* Autogenerated by Thrift Compiler (0.9.2)
|
||||
*
|
||||
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
|
||||
* @generated
|
||||
*/
|
||||
package org.apache.zeppelin.interpreter.thrift;
|
||||
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import org.apache.thrift.TEnum;
|
||||
|
||||
public enum RemoteZeppelinServerResourceType implements org.apache.thrift.TEnum {
|
||||
RESOURCE_PARAGRAPH_RUN_CONTEXT(1);
|
||||
|
||||
private final int value;
|
||||
|
||||
private RemoteZeppelinServerResourceType(int value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the integer value of this enum value, as defined in the Thrift IDL.
|
||||
*/
|
||||
public int getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Find a the enum type by its integer value, as defined in the Thrift IDL.
|
||||
* @return null if the value is not found.
|
||||
*/
|
||||
public static RemoteZeppelinServerResourceType findByValue(int value) {
|
||||
switch (value) {
|
||||
case 1:
|
||||
return RESOURCE_PARAGRAPH_RUN_CONTEXT;
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,641 +0,0 @@
|
|||
/**
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
/**
|
||||
* Autogenerated by Thrift Compiler (0.9.2)
|
||||
*
|
||||
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
|
||||
* @generated
|
||||
*/
|
||||
package org.apache.zeppelin.interpreter.thrift;
|
||||
|
||||
import org.apache.thrift.scheme.IScheme;
|
||||
import org.apache.thrift.scheme.SchemeFactory;
|
||||
import org.apache.thrift.scheme.StandardScheme;
|
||||
|
||||
import org.apache.thrift.scheme.TupleScheme;
|
||||
import org.apache.thrift.protocol.TTupleProtocol;
|
||||
import org.apache.thrift.protocol.TProtocolException;
|
||||
import org.apache.thrift.EncodingUtils;
|
||||
import org.apache.thrift.TException;
|
||||
import org.apache.thrift.async.AsyncMethodCallback;
|
||||
import org.apache.thrift.server.AbstractNonblockingServer.*;
|
||||
import java.util.List;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import java.util.EnumMap;
|
||||
import java.util.Set;
|
||||
import java.util.HashSet;
|
||||
import java.util.EnumSet;
|
||||
import java.util.Collections;
|
||||
import java.util.BitSet;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.util.Arrays;
|
||||
import javax.annotation.Generated;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
|
||||
@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2016-11-17")
|
||||
public class ZeppelinServerResource implements org.apache.thrift.TBase<ZeppelinServerResource, ZeppelinServerResource._Fields>, java.io.Serializable, Cloneable, Comparable<ZeppelinServerResource> {
|
||||
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ZeppelinServerResource");
|
||||
|
||||
private static final org.apache.thrift.protocol.TField TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("type", org.apache.thrift.protocol.TType.I32, (short)1);
|
||||
private static final org.apache.thrift.protocol.TField EVENT_OWNER_KEY_FIELD_DESC = new org.apache.thrift.protocol.TField("eventOwnerKey", org.apache.thrift.protocol.TType.STRING, (short)2);
|
||||
private static final org.apache.thrift.protocol.TField MSG_FIELD_DESC = new org.apache.thrift.protocol.TField("msg", org.apache.thrift.protocol.TType.STRING, (short)3);
|
||||
|
||||
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
|
||||
static {
|
||||
schemes.put(StandardScheme.class, new ZeppelinServerResourceStandardSchemeFactory());
|
||||
schemes.put(TupleScheme.class, new ZeppelinServerResourceTupleSchemeFactory());
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @see RemoteZeppelinServerResourceType
|
||||
*/
|
||||
public RemoteZeppelinServerResourceType type; // required
|
||||
public String eventOwnerKey; // required
|
||||
public String msg; // required
|
||||
|
||||
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
|
||||
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
|
||||
/**
|
||||
*
|
||||
* @see RemoteZeppelinServerResourceType
|
||||
*/
|
||||
TYPE((short)1, "type"),
|
||||
EVENT_OWNER_KEY((short)2, "eventOwnerKey"),
|
||||
MSG((short)3, "msg");
|
||||
|
||||
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
|
||||
|
||||
static {
|
||||
for (_Fields field : EnumSet.allOf(_Fields.class)) {
|
||||
byName.put(field.getFieldName(), field);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Find the _Fields constant that matches fieldId, or null if its not found.
|
||||
*/
|
||||
public static _Fields findByThriftId(int fieldId) {
|
||||
switch(fieldId) {
|
||||
case 1: // TYPE
|
||||
return TYPE;
|
||||
case 2: // EVENT_OWNER_KEY
|
||||
return EVENT_OWNER_KEY;
|
||||
case 3: // MSG
|
||||
return MSG;
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Find the _Fields constant that matches fieldId, throwing an exception
|
||||
* if it is not found.
|
||||
*/
|
||||
public static _Fields findByThriftIdOrThrow(int fieldId) {
|
||||
_Fields fields = findByThriftId(fieldId);
|
||||
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
|
||||
return fields;
|
||||
}
|
||||
|
||||
/**
|
||||
* Find the _Fields constant that matches name, or null if its not found.
|
||||
*/
|
||||
public static _Fields findByName(String name) {
|
||||
return byName.get(name);
|
||||
}
|
||||
|
||||
private final short _thriftId;
|
||||
private final String _fieldName;
|
||||
|
||||
_Fields(short thriftId, String fieldName) {
|
||||
_thriftId = thriftId;
|
||||
_fieldName = fieldName;
|
||||
}
|
||||
|
||||
public short getThriftFieldId() {
|
||||
return _thriftId;
|
||||
}
|
||||
|
||||
public String getFieldName() {
|
||||
return _fieldName;
|
||||
}
|
||||
}
|
||||
|
||||
// isset id assignments
|
||||
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
|
||||
static {
|
||||
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
|
||||
tmpMap.put(_Fields.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
||||
new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, RemoteZeppelinServerResourceType.class)));
|
||||
tmpMap.put(_Fields.EVENT_OWNER_KEY, new org.apache.thrift.meta_data.FieldMetaData("eventOwnerKey", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
||||
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
|
||||
tmpMap.put(_Fields.MSG, new org.apache.thrift.meta_data.FieldMetaData("msg", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
||||
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
|
||||
metaDataMap = Collections.unmodifiableMap(tmpMap);
|
||||
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ZeppelinServerResource.class, metaDataMap);
|
||||
}
|
||||
|
||||
public ZeppelinServerResource() {
|
||||
}
|
||||
|
||||
public ZeppelinServerResource(
|
||||
RemoteZeppelinServerResourceType type,
|
||||
String eventOwnerKey,
|
||||
String msg)
|
||||
{
|
||||
this();
|
||||
this.type = type;
|
||||
this.eventOwnerKey = eventOwnerKey;
|
||||
this.msg = msg;
|
||||
}
|
||||
|
||||
/**
|
||||
* Performs a deep copy on <i>other</i>.
|
||||
*/
|
||||
public ZeppelinServerResource(ZeppelinServerResource other) {
|
||||
if (other.isSetType()) {
|
||||
this.type = other.type;
|
||||
}
|
||||
if (other.isSetEventOwnerKey()) {
|
||||
this.eventOwnerKey = other.eventOwnerKey;
|
||||
}
|
||||
if (other.isSetMsg()) {
|
||||
this.msg = other.msg;
|
||||
}
|
||||
}
|
||||
|
||||
public ZeppelinServerResource deepCopy() {
|
||||
return new ZeppelinServerResource(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clear() {
|
||||
this.type = null;
|
||||
this.eventOwnerKey = null;
|
||||
this.msg = null;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @see RemoteZeppelinServerResourceType
|
||||
*/
|
||||
public RemoteZeppelinServerResourceType getType() {
|
||||
return this.type;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @see RemoteZeppelinServerResourceType
|
||||
*/
|
||||
public ZeppelinServerResource setType(RemoteZeppelinServerResourceType type) {
|
||||
this.type = type;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void unsetType() {
|
||||
this.type = null;
|
||||
}
|
||||
|
||||
/** Returns true if field type is set (has been assigned a value) and false otherwise */
|
||||
public boolean isSetType() {
|
||||
return this.type != null;
|
||||
}
|
||||
|
||||
public void setTypeIsSet(boolean value) {
|
||||
if (!value) {
|
||||
this.type = null;
|
||||
}
|
||||
}
|
||||
|
||||
public String getEventOwnerKey() {
|
||||
return this.eventOwnerKey;
|
||||
}
|
||||
|
||||
public ZeppelinServerResource setEventOwnerKey(String eventOwnerKey) {
|
||||
this.eventOwnerKey = eventOwnerKey;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void unsetEventOwnerKey() {
|
||||
this.eventOwnerKey = null;
|
||||
}
|
||||
|
||||
/** Returns true if field eventOwnerKey is set (has been assigned a value) and false otherwise */
|
||||
public boolean isSetEventOwnerKey() {
|
||||
return this.eventOwnerKey != null;
|
||||
}
|
||||
|
||||
public void setEventOwnerKeyIsSet(boolean value) {
|
||||
if (!value) {
|
||||
this.eventOwnerKey = null;
|
||||
}
|
||||
}
|
||||
|
||||
public String getMsg() {
|
||||
return this.msg;
|
||||
}
|
||||
|
||||
public ZeppelinServerResource setMsg(String msg) {
|
||||
this.msg = msg;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void unsetMsg() {
|
||||
this.msg = null;
|
||||
}
|
||||
|
||||
/** Returns true if field msg is set (has been assigned a value) and false otherwise */
|
||||
public boolean isSetMsg() {
|
||||
return this.msg != null;
|
||||
}
|
||||
|
||||
public void setMsgIsSet(boolean value) {
|
||||
if (!value) {
|
||||
this.msg = null;
|
||||
}
|
||||
}
|
||||
|
||||
public void setFieldValue(_Fields field, Object value) {
|
||||
switch (field) {
|
||||
case TYPE:
|
||||
if (value == null) {
|
||||
unsetType();
|
||||
} else {
|
||||
setType((RemoteZeppelinServerResourceType)value);
|
||||
}
|
||||
break;
|
||||
|
||||
case EVENT_OWNER_KEY:
|
||||
if (value == null) {
|
||||
unsetEventOwnerKey();
|
||||
} else {
|
||||
setEventOwnerKey((String)value);
|
||||
}
|
||||
break;
|
||||
|
||||
case MSG:
|
||||
if (value == null) {
|
||||
unsetMsg();
|
||||
} else {
|
||||
setMsg((String)value);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public Object getFieldValue(_Fields field) {
|
||||
switch (field) {
|
||||
case TYPE:
|
||||
return getType();
|
||||
|
||||
case EVENT_OWNER_KEY:
|
||||
return getEventOwnerKey();
|
||||
|
||||
case MSG:
|
||||
return getMsg();
|
||||
|
||||
}
|
||||
throw new IllegalStateException();
|
||||
}
|
||||
|
||||
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
|
||||
public boolean isSet(_Fields field) {
|
||||
if (field == null) {
|
||||
throw new IllegalArgumentException();
|
||||
}
|
||||
|
||||
switch (field) {
|
||||
case TYPE:
|
||||
return isSetType();
|
||||
case EVENT_OWNER_KEY:
|
||||
return isSetEventOwnerKey();
|
||||
case MSG:
|
||||
return isSetMsg();
|
||||
}
|
||||
throw new IllegalStateException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object that) {
|
||||
if (that == null)
|
||||
return false;
|
||||
if (that instanceof ZeppelinServerResource)
|
||||
return this.equals((ZeppelinServerResource)that);
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean equals(ZeppelinServerResource that) {
|
||||
if (that == null)
|
||||
return false;
|
||||
|
||||
boolean this_present_type = true && this.isSetType();
|
||||
boolean that_present_type = true && that.isSetType();
|
||||
if (this_present_type || that_present_type) {
|
||||
if (!(this_present_type && that_present_type))
|
||||
return false;
|
||||
if (!this.type.equals(that.type))
|
||||
return false;
|
||||
}
|
||||
|
||||
boolean this_present_eventOwnerKey = true && this.isSetEventOwnerKey();
|
||||
boolean that_present_eventOwnerKey = true && that.isSetEventOwnerKey();
|
||||
if (this_present_eventOwnerKey || that_present_eventOwnerKey) {
|
||||
if (!(this_present_eventOwnerKey && that_present_eventOwnerKey))
|
||||
return false;
|
||||
if (!this.eventOwnerKey.equals(that.eventOwnerKey))
|
||||
return false;
|
||||
}
|
||||
|
||||
boolean this_present_msg = true && this.isSetMsg();
|
||||
boolean that_present_msg = true && that.isSetMsg();
|
||||
if (this_present_msg || that_present_msg) {
|
||||
if (!(this_present_msg && that_present_msg))
|
||||
return false;
|
||||
if (!this.msg.equals(that.msg))
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
List<Object> list = new ArrayList<Object>();
|
||||
|
||||
boolean present_type = true && (isSetType());
|
||||
list.add(present_type);
|
||||
if (present_type)
|
||||
list.add(type.getValue());
|
||||
|
||||
boolean present_eventOwnerKey = true && (isSetEventOwnerKey());
|
||||
list.add(present_eventOwnerKey);
|
||||
if (present_eventOwnerKey)
|
||||
list.add(eventOwnerKey);
|
||||
|
||||
boolean present_msg = true && (isSetMsg());
|
||||
list.add(present_msg);
|
||||
if (present_msg)
|
||||
list.add(msg);
|
||||
|
||||
return list.hashCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int compareTo(ZeppelinServerResource other) {
|
||||
if (!getClass().equals(other.getClass())) {
|
||||
return getClass().getName().compareTo(other.getClass().getName());
|
||||
}
|
||||
|
||||
int lastComparison = 0;
|
||||
|
||||
lastComparison = Boolean.valueOf(isSetType()).compareTo(other.isSetType());
|
||||
if (lastComparison != 0) {
|
||||
return lastComparison;
|
||||
}
|
||||
if (isSetType()) {
|
||||
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, other.type);
|
||||
if (lastComparison != 0) {
|
||||
return lastComparison;
|
||||
}
|
||||
}
|
||||
lastComparison = Boolean.valueOf(isSetEventOwnerKey()).compareTo(other.isSetEventOwnerKey());
|
||||
if (lastComparison != 0) {
|
||||
return lastComparison;
|
||||
}
|
||||
if (isSetEventOwnerKey()) {
|
||||
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.eventOwnerKey, other.eventOwnerKey);
|
||||
if (lastComparison != 0) {
|
||||
return lastComparison;
|
||||
}
|
||||
}
|
||||
lastComparison = Boolean.valueOf(isSetMsg()).compareTo(other.isSetMsg());
|
||||
if (lastComparison != 0) {
|
||||
return lastComparison;
|
||||
}
|
||||
if (isSetMsg()) {
|
||||
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.msg, other.msg);
|
||||
if (lastComparison != 0) {
|
||||
return lastComparison;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
public _Fields fieldForId(int fieldId) {
|
||||
return _Fields.findByThriftId(fieldId);
|
||||
}
|
||||
|
||||
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
|
||||
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
|
||||
}
|
||||
|
||||
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
|
||||
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder("ZeppelinServerResource(");
|
||||
boolean first = true;
|
||||
|
||||
sb.append("type:");
|
||||
if (this.type == null) {
|
||||
sb.append("null");
|
||||
} else {
|
||||
sb.append(this.type);
|
||||
}
|
||||
first = false;
|
||||
if (!first) sb.append(", ");
|
||||
sb.append("eventOwnerKey:");
|
||||
if (this.eventOwnerKey == null) {
|
||||
sb.append("null");
|
||||
} else {
|
||||
sb.append(this.eventOwnerKey);
|
||||
}
|
||||
first = false;
|
||||
if (!first) sb.append(", ");
|
||||
sb.append("msg:");
|
||||
if (this.msg == null) {
|
||||
sb.append("null");
|
||||
} else {
|
||||
sb.append(this.msg);
|
||||
}
|
||||
first = false;
|
||||
sb.append(")");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
public void validate() throws org.apache.thrift.TException {
|
||||
// check for required fields
|
||||
// check for sub-struct validity
|
||||
}
|
||||
|
||||
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
|
||||
try {
|
||||
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
|
||||
} catch (org.apache.thrift.TException te) {
|
||||
throw new java.io.IOException(te);
|
||||
}
|
||||
}
|
||||
|
||||
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
|
||||
try {
|
||||
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
|
||||
} catch (org.apache.thrift.TException te) {
|
||||
throw new java.io.IOException(te);
|
||||
}
|
||||
}
|
||||
|
||||
private static class ZeppelinServerResourceStandardSchemeFactory implements SchemeFactory {
|
||||
public ZeppelinServerResourceStandardScheme getScheme() {
|
||||
return new ZeppelinServerResourceStandardScheme();
|
||||
}
|
||||
}
|
||||
|
||||
private static class ZeppelinServerResourceStandardScheme extends StandardScheme<ZeppelinServerResource> {
|
||||
|
||||
public void read(org.apache.thrift.protocol.TProtocol iprot, ZeppelinServerResource struct) throws org.apache.thrift.TException {
|
||||
org.apache.thrift.protocol.TField schemeField;
|
||||
iprot.readStructBegin();
|
||||
while (true)
|
||||
{
|
||||
schemeField = iprot.readFieldBegin();
|
||||
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
|
||||
break;
|
||||
}
|
||||
switch (schemeField.id) {
|
||||
case 1: // TYPE
|
||||
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
|
||||
struct.type = org.apache.zeppelin.interpreter.thrift.RemoteZeppelinServerResourceType.findByValue(iprot.readI32());
|
||||
struct.setTypeIsSet(true);
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||
}
|
||||
break;
|
||||
case 2: // EVENT_OWNER_KEY
|
||||
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
|
||||
struct.eventOwnerKey = iprot.readString();
|
||||
struct.setEventOwnerKeyIsSet(true);
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||
}
|
||||
break;
|
||||
case 3: // MSG
|
||||
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
|
||||
struct.msg = iprot.readString();
|
||||
struct.setMsgIsSet(true);
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||
}
|
||||
iprot.readFieldEnd();
|
||||
}
|
||||
iprot.readStructEnd();
|
||||
|
||||
// check for required fields of primitive type, which can't be checked in the validate method
|
||||
struct.validate();
|
||||
}
|
||||
|
||||
public void write(org.apache.thrift.protocol.TProtocol oprot, ZeppelinServerResource struct) throws org.apache.thrift.TException {
|
||||
struct.validate();
|
||||
|
||||
oprot.writeStructBegin(STRUCT_DESC);
|
||||
if (struct.type != null) {
|
||||
oprot.writeFieldBegin(TYPE_FIELD_DESC);
|
||||
oprot.writeI32(struct.type.getValue());
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
if (struct.eventOwnerKey != null) {
|
||||
oprot.writeFieldBegin(EVENT_OWNER_KEY_FIELD_DESC);
|
||||
oprot.writeString(struct.eventOwnerKey);
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
if (struct.msg != null) {
|
||||
oprot.writeFieldBegin(MSG_FIELD_DESC);
|
||||
oprot.writeString(struct.msg);
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
oprot.writeFieldStop();
|
||||
oprot.writeStructEnd();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private static class ZeppelinServerResourceTupleSchemeFactory implements SchemeFactory {
|
||||
public ZeppelinServerResourceTupleScheme getScheme() {
|
||||
return new ZeppelinServerResourceTupleScheme();
|
||||
}
|
||||
}
|
||||
|
||||
private static class ZeppelinServerResourceTupleScheme extends TupleScheme<ZeppelinServerResource> {
|
||||
|
||||
@Override
|
||||
public void write(org.apache.thrift.protocol.TProtocol prot, ZeppelinServerResource struct) throws org.apache.thrift.TException {
|
||||
TTupleProtocol oprot = (TTupleProtocol) prot;
|
||||
BitSet optionals = new BitSet();
|
||||
if (struct.isSetType()) {
|
||||
optionals.set(0);
|
||||
}
|
||||
if (struct.isSetEventOwnerKey()) {
|
||||
optionals.set(1);
|
||||
}
|
||||
if (struct.isSetMsg()) {
|
||||
optionals.set(2);
|
||||
}
|
||||
oprot.writeBitSet(optionals, 3);
|
||||
if (struct.isSetType()) {
|
||||
oprot.writeI32(struct.type.getValue());
|
||||
}
|
||||
if (struct.isSetEventOwnerKey()) {
|
||||
oprot.writeString(struct.eventOwnerKey);
|
||||
}
|
||||
if (struct.isSetMsg()) {
|
||||
oprot.writeString(struct.msg);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void read(org.apache.thrift.protocol.TProtocol prot, ZeppelinServerResource struct) throws org.apache.thrift.TException {
|
||||
TTupleProtocol iprot = (TTupleProtocol) prot;
|
||||
BitSet incoming = iprot.readBitSet(3);
|
||||
if (incoming.get(0)) {
|
||||
struct.type = org.apache.zeppelin.interpreter.thrift.RemoteZeppelinServerResourceType.findByValue(iprot.readI32());
|
||||
struct.setTypeIsSet(true);
|
||||
}
|
||||
if (incoming.get(1)) {
|
||||
struct.eventOwnerKey = iprot.readString();
|
||||
struct.setEventOwnerKeyIsSet(true);
|
||||
}
|
||||
if (incoming.get(2)) {
|
||||
struct.msg = iprot.readString();
|
||||
struct.setMsgIsSet(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -51,7 +51,7 @@ import org.slf4j.Logger;
|
|||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
|
||||
@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2016-11-17")
|
||||
@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2016-11-18")
|
||||
public class ZeppelinServerResourceParagraphRunner implements org.apache.thrift.TBase<ZeppelinServerResourceParagraphRunner, ZeppelinServerResourceParagraphRunner._Fields>, java.io.Serializable, Cloneable, Comparable<ZeppelinServerResourceParagraphRunner> {
|
||||
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ZeppelinServerResourceParagraphRunner");
|
||||
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ enum RemoteInterpreterEventType {
|
|||
ANGULAR_REGISTRY_PUSH = 10,
|
||||
APP_STATUS_UPDATE = 11,
|
||||
META_INFOS = 12,
|
||||
REMOTE_ZEPPELIN_SERVER_CONTROL = 13
|
||||
RESOURCE_PARAGRAPH_RUN_CONTEXT = 13
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -65,31 +65,12 @@ struct RemoteApplicationResult {
|
|||
2: string msg
|
||||
}
|
||||
|
||||
/*
|
||||
remote interpreter process --> request --> zeppelin server
|
||||
*/
|
||||
enum RemoteZeppelinServerControlEvent {
|
||||
REQ_RESOURCE_PARAGRAPH_RUN_CONTEXT = 1,
|
||||
RES_RESOURCE_PARAGRAPH_RUN_CONTEXT = 2
|
||||
}
|
||||
|
||||
enum RemoteZeppelinServerResourceType {
|
||||
RESOURCE_PARAGRAPH_RUN_CONTEXT = 1
|
||||
}
|
||||
|
||||
struct ZeppelinServerResourceParagraphRunner {
|
||||
1: string noteId,
|
||||
2: string paragraphId
|
||||
}
|
||||
|
||||
struct ZeppelinServerResource {
|
||||
1: RemoteZeppelinServerResourceType type,
|
||||
2: string eventOwnerKey,
|
||||
3: string msg
|
||||
}
|
||||
|
||||
struct RemoteZeppelinServerController {
|
||||
1: RemoteZeppelinServerControlEvent type,
|
||||
2: string eventOwnerKey
|
||||
3: string msg
|
||||
}
|
||||
|
|
@ -142,5 +123,5 @@ service RemoteInterpreterService {
|
|||
RemoteApplicationResult unloadApplication(1: string applicationInstanceId);
|
||||
RemoteApplicationResult runApplication(1: string applicationInstanceId);
|
||||
|
||||
void remoteZeppelinServerControlFeedback(1: RemoteZeppelinServerController response);
|
||||
void onReceivedResourceParagraphRunners(1: RemoteInterpreterEvent response);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -162,4 +162,9 @@ public class RemoteInterpreterOutputTestStream implements RemoteInterpreterProce
|
|||
public void onMetaInfosReceived(String settingId, Map<String, String> metaInfos) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onGetParagraphRunners(String noteId, String paragraphId, RemoteWorksEventListener callback) {
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -308,4 +308,9 @@ public class RemoteSchedulerTest implements RemoteInterpreterProcessListener {
|
|||
public void onMetaInfosReceived(String settingId, Map<String, String> metaInfos) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onGetParagraphRunners(String noteId, String paragraphId, RemoteWorksEventListener callback) {
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,7 +39,6 @@ import org.apache.zeppelin.interpreter.InterpreterFactory;
|
|||
import org.apache.zeppelin.notebook.Notebook;
|
||||
import org.apache.zeppelin.notebook.NotebookAuthorization;
|
||||
import org.apache.zeppelin.notebook.repo.NotebookRepoSync;
|
||||
import org.apache.zeppelin.remoteworks.RemoteWorksManager;
|
||||
import org.apache.zeppelin.rest.ConfigurationsRestApi;
|
||||
import org.apache.zeppelin.rest.CredentialRestApi;
|
||||
import org.apache.zeppelin.rest.HeliumRestApi;
|
||||
|
|
@ -92,7 +91,6 @@ public class ZeppelinServer extends Application {
|
|||
private NotebookAuthorization notebookAuthorization;
|
||||
private Credentials credentials;
|
||||
private DependencyResolver depResolver;
|
||||
private RemoteWorksManager remoteWorksManager;
|
||||
|
||||
public ZeppelinServer() throws Exception {
|
||||
ZeppelinConfiguration conf = ZeppelinConfiguration.create();
|
||||
|
|
@ -120,9 +118,6 @@ public class ZeppelinServer extends Application {
|
|||
|
||||
notebook.addNotebookEventListener(heliumApplicationFactory);
|
||||
notebook.addNotebookEventListener(notebookWsServer.getNotebookInformationListener());
|
||||
|
||||
remoteWorksManager = new RemoteWorksManager(notebook);
|
||||
replFactory.setRemoteController(remoteWorksManager.getInstance());
|
||||
}
|
||||
|
||||
public static void main(String[] args) throws InterruptedException {
|
||||
|
|
|
|||
|
|
@ -41,6 +41,7 @@ import org.apache.zeppelin.display.AngularObjectRegistry;
|
|||
import org.apache.zeppelin.display.AngularObjectRegistryListener;
|
||||
import org.apache.zeppelin.helium.ApplicationEventListener;
|
||||
import org.apache.zeppelin.helium.HeliumPackage;
|
||||
import org.apache.zeppelin.interpreter.InterpreterContextRunner;
|
||||
import org.apache.zeppelin.interpreter.InterpreterGroup;
|
||||
import org.apache.zeppelin.interpreter.InterpreterOutput;
|
||||
import org.apache.zeppelin.interpreter.InterpreterResult;
|
||||
|
|
@ -1482,6 +1483,38 @@ public class NotebookServer extends WebSocketServlet implements
|
|||
broadcast(noteId, msg);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onGetParagraphRunners(
|
||||
String noteId, String paragraphId, RemoteWorksEventListener callback) {
|
||||
LOG.info("clover onGetParagraphRunners {} {}", noteId, paragraphId);
|
||||
Notebook notebookIns = notebook();
|
||||
List<InterpreterContextRunner> runner = new LinkedList<>();
|
||||
|
||||
if (notebookIns == null) {
|
||||
callback.onFinished(notebookIns);
|
||||
}
|
||||
|
||||
try {
|
||||
Note note = notebookIns.getNote(noteId);
|
||||
if (note != null) {
|
||||
if (paragraphId != null) {
|
||||
Paragraph paragraph = note.getParagraph(paragraphId);
|
||||
if (paragraph != null) {
|
||||
runner.add(paragraph.getInterpreterContextRunner());
|
||||
}
|
||||
} else {
|
||||
for (Paragraph p : note.getParagraphs()) {
|
||||
runner.add(p.getInterpreterContextRunner());
|
||||
}
|
||||
}
|
||||
}
|
||||
callback.onFinished(runner);
|
||||
} catch (NullPointerException e) {
|
||||
LOG.warn(e.getMessage());
|
||||
callback.onError();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Notebook Information Change event
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -112,8 +112,6 @@ public class InterpreterFactory implements InterpreterGroupFactory {
|
|||
private Map<String, List<String>> interpreterBindings = new HashMap<>();
|
||||
private List<RemoteRepository> interpreterRepositories;
|
||||
|
||||
private RemoteWorksController remoteWorksController;
|
||||
|
||||
private Gson gson;
|
||||
|
||||
private InterpreterOption defaultOption;
|
||||
|
|
@ -279,14 +277,6 @@ public class InterpreterFactory implements InterpreterGroupFactory {
|
|||
}
|
||||
}
|
||||
|
||||
public RemoteWorksController getRemoteWorksController() {
|
||||
return remoteWorksController;
|
||||
}
|
||||
|
||||
public void setRemoteController(RemoteWorksController remoteController) {
|
||||
this.remoteWorksController = remoteController;
|
||||
}
|
||||
|
||||
private InterpreterSetting createFromInterpreterSettingRef(String name) {
|
||||
Preconditions.checkNotNull(name, "reference name should be not null");
|
||||
InterpreterSetting settingRef = interpreterSettingsRef.get(name);
|
||||
|
|
|
|||
|
|
@ -1,95 +0,0 @@
|
|||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.apache.zeppelin.remoteworks;
|
||||
|
||||
import org.apache.zeppelin.interpreter.InterpreterContextRunner;
|
||||
import org.apache.zeppelin.interpreter.RemoteWorksController;
|
||||
import org.apache.zeppelin.notebook.Note;
|
||||
import org.apache.zeppelin.notebook.Notebook;
|
||||
import org.apache.zeppelin.notebook.Paragraph;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Zeppelin Server RemoteWorkController Singleton.
|
||||
*/
|
||||
public class RemoteWorksManager {
|
||||
private static final Logger LOG = LoggerFactory.getLogger(RemoteWorksManager.class);
|
||||
private static NotebookJobManager instance;
|
||||
|
||||
public RemoteWorksManager(Notebook notebook) {
|
||||
if (RemoteWorksManager.instance == null) {
|
||||
RemoteWorksManager.instance = new NotebookJobManager(notebook);
|
||||
}
|
||||
}
|
||||
|
||||
public static NotebookJobManager getInstance() {
|
||||
return RemoteWorksManager.instance;
|
||||
}
|
||||
|
||||
private class NotebookJobManager implements RemoteWorksController {
|
||||
private transient Notebook notebook;
|
||||
|
||||
public NotebookJobManager(Notebook notebook) {
|
||||
setNotebook(notebook);
|
||||
}
|
||||
|
||||
private void setNotebook(Notebook notebook) {
|
||||
this.notebook = notebook;
|
||||
}
|
||||
|
||||
private Notebook getNotebook() throws NullPointerException {
|
||||
if (notebook == null) {
|
||||
throw new NullPointerException("Notebook instance is Null");
|
||||
}
|
||||
return notebook;
|
||||
}
|
||||
|
||||
public List<InterpreterContextRunner> getRemoteContextRunner(String noteId) {
|
||||
return getRemoteContextRunner(noteId, null);
|
||||
}
|
||||
|
||||
public List<InterpreterContextRunner> getRemoteContextRunner(
|
||||
String noteId, String paragraphId) {
|
||||
List<InterpreterContextRunner> runner = new LinkedList<>();
|
||||
try {
|
||||
Note note = getNotebook().getNote(noteId);
|
||||
if (note != null) {
|
||||
if (paragraphId != null) {
|
||||
Paragraph paragraph = note.getParagraph(paragraphId);
|
||||
if (paragraph != null) {
|
||||
runner.add(paragraph.getInterpreterContextRunner());
|
||||
}
|
||||
} else {
|
||||
for (Paragraph p : note.getParagraphs()) {
|
||||
runner.add(p.getInterpreterContextRunner());
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (NullPointerException e) {
|
||||
LOG.warn(e.getMessage());
|
||||
}
|
||||
return runner;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Reference in a new issue