mirror of
https://github.com/apache/zeppelin
synced 2026-05-24 09:38:26 +00:00
code base workflow for remote zeppelin server control default thrift transaction.
This commit is contained in:
parent
19c07c2c84
commit
6e1f219993
16 changed files with 2892 additions and 7 deletions
|
|
@ -21,6 +21,9 @@ 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.*;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
|
@ -48,6 +51,23 @@ public class RemoteInterpreterEventClient implements ResourcePoolConnector {
|
|||
private final Map<ResourceId, Object> getResourceResponse = new HashMap<>();
|
||||
private final Gson gson = new Gson();
|
||||
|
||||
// cloverhearts
|
||||
/**
|
||||
* Run paragraph
|
||||
* @param runner
|
||||
*/
|
||||
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,
|
||||
gson.toJson(eventBody)));
|
||||
}
|
||||
|
||||
/**
|
||||
* Run paragraph
|
||||
* @param runner
|
||||
|
|
|
|||
|
|
@ -28,6 +28,9 @@ import org.apache.zeppelin.interpreter.InterpreterGroup;
|
|||
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;
|
||||
import org.apache.zeppelin.resource.ResourceId;
|
||||
import org.apache.zeppelin.resource.ResourcePool;
|
||||
|
|
@ -195,6 +198,12 @@ 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) {
|
||||
RemoteZeppelinServerController remoteControlEvent = gson.fromJson(
|
||||
event.getData(), RemoteZeppelinServerController.class);
|
||||
//cloverhearts
|
||||
progressRemoteZeppelinControlEvent(remoteControlEvent);
|
||||
|
||||
}
|
||||
logger.debug("Event from remoteproceess {}", event.getType());
|
||||
} catch (Exception e) {
|
||||
|
|
@ -206,6 +215,44 @@ public class RemoteInterpreterEventPoller extends Thread {
|
|||
}
|
||||
}
|
||||
|
||||
private void progressRemoteZeppelinControlEvent(RemoteZeppelinServerController event) {
|
||||
logger.info("clover - received RemoteInterpreterEvent");
|
||||
Gson gson = new Gson();
|
||||
String eventOwnerKey = event.getEventOwnerKey();
|
||||
Client interpreterServer = null;
|
||||
boolean broken = false;
|
||||
try {
|
||||
interpreterServer = interpreterProcess.getClient();
|
||||
|
||||
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);
|
||||
resResource.setMsg("test123123");
|
||||
interpreterServer.remoteZeppelinServerControlFeedback(resResource);
|
||||
logger.info("get runner noteid {} paragraphid {}",
|
||||
runner.getNoteId(), runner.getParagraphId());
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
broken = true;
|
||||
logger.error("Can't get RemoteInterpreterEvent", e);
|
||||
waitQuietly();
|
||||
|
||||
} finally {
|
||||
interpreterProcess.releaseClient(interpreterServer, broken);
|
||||
}
|
||||
|
||||
if (broken == true) {
|
||||
return;
|
||||
}
|
||||
|
||||
logger.info("clover - remote event {}", event.getType());
|
||||
}
|
||||
|
||||
private void sendResourcePoolResponseGetAll(ResourceSet resourceSet) {
|
||||
Client client = null;
|
||||
boolean broken = false;
|
||||
|
|
|
|||
|
|
@ -336,6 +336,12 @@ public class RemoteInterpreterServer
|
|||
context.getGui());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void remoteZeppelinServerControlFeedback(
|
||||
RemoteZeppelinServerController response) throws TException {
|
||||
logger.info("clover remote zeppelin server controller feedback {}", response);
|
||||
logger.info("clover remote zeppelin server conteroller body {}", response.getMsg());
|
||||
}
|
||||
|
||||
class InterpretJobListener implements JobListener {
|
||||
|
||||
|
|
@ -585,6 +591,10 @@ public class RemoteInterpreterServer
|
|||
|
||||
@Override
|
||||
public void run() {
|
||||
ZeppelinServerResourceParagraphRunner test = new ZeppelinServerResourceParagraphRunner();
|
||||
test.setNoteId("TEST NOTE");
|
||||
test.setParagraphId("TEST PARAGRAPH");
|
||||
server.eventClient.getZeppelinServerNoteRunner("IamOWNER", test);
|
||||
server.eventClient.run(this);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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-6-8")
|
||||
@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2016-11-11")
|
||||
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-5-7")
|
||||
@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2016-11-11")
|
||||
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-6-8")
|
||||
@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2016-11-11")
|
||||
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-6-8")
|
||||
@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2016-11-11")
|
||||
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");
|
||||
|
||||
|
|
|
|||
|
|
@ -39,7 +39,8 @@ public enum RemoteInterpreterEventType implements org.apache.thrift.TEnum {
|
|||
OUTPUT_APPEND(8),
|
||||
OUTPUT_UPDATE(9),
|
||||
ANGULAR_REGISTRY_PUSH(10),
|
||||
APP_STATUS_UPDATE(11);
|
||||
APP_STATUS_UPDATE(11),
|
||||
REMOTE_ZEPPELIN_SERVER_CONTROL(12);
|
||||
|
||||
private final int value;
|
||||
|
||||
|
|
@ -82,6 +83,8 @@ public enum RemoteInterpreterEventType implements org.apache.thrift.TEnum {
|
|||
return ANGULAR_REGISTRY_PUSH;
|
||||
case 11:
|
||||
return APP_STATUS_UPDATE;
|
||||
case 12:
|
||||
return REMOTE_ZEPPELIN_SERVER_CONTROL;
|
||||
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-6-8")
|
||||
@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2016-11-11")
|
||||
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-6-8")
|
||||
@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2016-11-11")
|
||||
public class RemoteInterpreterService {
|
||||
|
||||
public interface Iface {
|
||||
|
|
@ -102,6 +102,8 @@ public class RemoteInterpreterService {
|
|||
|
||||
public RemoteApplicationResult runApplication(String applicationInstanceId) throws org.apache.thrift.TException;
|
||||
|
||||
public void remoteZeppelinServerControlFeedback(RemoteZeppelinServerController response) throws org.apache.thrift.TException;
|
||||
|
||||
}
|
||||
|
||||
public interface AsyncIface {
|
||||
|
|
@ -152,6 +154,8 @@ 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 static class Client extends org.apache.thrift.TServiceClient implements Iface {
|
||||
|
|
@ -700,6 +704,26 @@ 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
|
||||
{
|
||||
send_remoteZeppelinServerControlFeedback(response);
|
||||
recv_remoteZeppelinServerControlFeedback();
|
||||
}
|
||||
|
||||
public void send_remoteZeppelinServerControlFeedback(RemoteZeppelinServerController response) throws org.apache.thrift.TException
|
||||
{
|
||||
remoteZeppelinServerControlFeedback_args args = new remoteZeppelinServerControlFeedback_args();
|
||||
args.setResponse(response);
|
||||
sendBase("remoteZeppelinServerControlFeedback", args);
|
||||
}
|
||||
|
||||
public void recv_remoteZeppelinServerControlFeedback() throws org.apache.thrift.TException
|
||||
{
|
||||
remoteZeppelinServerControlFeedback_result result = new remoteZeppelinServerControlFeedback_result();
|
||||
receiveBase(result, "remoteZeppelinServerControlFeedback");
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
public static class AsyncClient extends org.apache.thrift.async.TAsyncClient implements AsyncIface {
|
||||
public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
|
||||
|
|
@ -1544,6 +1568,38 @@ public class RemoteInterpreterService {
|
|||
}
|
||||
}
|
||||
|
||||
public void remoteZeppelinServerControlFeedback(RemoteZeppelinServerController 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);
|
||||
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 {
|
||||
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();
|
||||
args.setResponse(response);
|
||||
args.write(prot);
|
||||
prot.writeMessageEnd();
|
||||
}
|
||||
|
||||
public void getResult() throws org.apache.thrift.TException {
|
||||
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
|
||||
throw new IllegalStateException("Method call not finished!");
|
||||
}
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static class Processor<I extends Iface> extends org.apache.thrift.TBaseProcessor<I> implements org.apache.thrift.TProcessor {
|
||||
|
|
@ -1580,6 +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());
|
||||
return processMap;
|
||||
}
|
||||
|
||||
|
|
@ -2045,6 +2102,26 @@ public class RemoteInterpreterService {
|
|||
}
|
||||
}
|
||||
|
||||
public static class remoteZeppelinServerControlFeedback<I extends Iface> extends org.apache.thrift.ProcessFunction<I, remoteZeppelinServerControlFeedback_args> {
|
||||
public remoteZeppelinServerControlFeedback() {
|
||||
super("remoteZeppelinServerControlFeedback");
|
||||
}
|
||||
|
||||
public remoteZeppelinServerControlFeedback_args getEmptyArgsInstance() {
|
||||
return new remoteZeppelinServerControlFeedback_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);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static class AsyncProcessor<I extends AsyncIface> extends org.apache.thrift.TBaseAsyncProcessor<I> {
|
||||
|
|
@ -2081,6 +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());
|
||||
return processMap;
|
||||
}
|
||||
|
||||
|
|
@ -3248,6 +3326,56 @@ public class RemoteInterpreterService {
|
|||
}
|
||||
}
|
||||
|
||||
public static class remoteZeppelinServerControlFeedback<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, remoteZeppelinServerControlFeedback_args, Void> {
|
||||
public remoteZeppelinServerControlFeedback() {
|
||||
super("remoteZeppelinServerControlFeedback");
|
||||
}
|
||||
|
||||
public remoteZeppelinServerControlFeedback_args getEmptyArgsInstance() {
|
||||
return new remoteZeppelinServerControlFeedback_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();
|
||||
try {
|
||||
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
|
||||
return;
|
||||
} catch (Exception e) {
|
||||
LOGGER.error("Exception writing to internal frame buffer", e);
|
||||
}
|
||||
fb.close();
|
||||
}
|
||||
public void onError(Exception e) {
|
||||
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
|
||||
org.apache.thrift.TBase msg;
|
||||
remoteZeppelinServerControlFeedback_result result = new remoteZeppelinServerControlFeedback_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());
|
||||
}
|
||||
try {
|
||||
fcall.sendResponse(fb,msg,msgType,seqid);
|
||||
return;
|
||||
} catch (Exception ex) {
|
||||
LOGGER.error("Exception writing to internal frame buffer", ex);
|
||||
}
|
||||
fb.close();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
protected boolean isOneway() {
|
||||
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 static class createInterpreter_args implements org.apache.thrift.TBase<createInterpreter_args, createInterpreter_args._Fields>, java.io.Serializable, Cloneable, Comparable<createInterpreter_args> {
|
||||
|
|
@ -22001,4 +22129,618 @@ 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");
|
||||
|
||||
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());
|
||||
}
|
||||
|
||||
public RemoteZeppelinServerController 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 {
|
||||
RESPONSE((short)1, "response");
|
||||
|
||||
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: // RESPONSE
|
||||
return RESPONSE;
|
||||
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.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)));
|
||||
metaDataMap = Collections.unmodifiableMap(tmpMap);
|
||||
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(remoteZeppelinServerControlFeedback_args.class, metaDataMap);
|
||||
}
|
||||
|
||||
public remoteZeppelinServerControlFeedback_args() {
|
||||
}
|
||||
|
||||
public remoteZeppelinServerControlFeedback_args(
|
||||
RemoteZeppelinServerController response)
|
||||
{
|
||||
this();
|
||||
this.response = response;
|
||||
}
|
||||
|
||||
/**
|
||||
* Performs a deep copy on <i>other</i>.
|
||||
*/
|
||||
public remoteZeppelinServerControlFeedback_args(remoteZeppelinServerControlFeedback_args other) {
|
||||
if (other.isSetResponse()) {
|
||||
this.response = new RemoteZeppelinServerController(other.response);
|
||||
}
|
||||
}
|
||||
|
||||
public remoteZeppelinServerControlFeedback_args deepCopy() {
|
||||
return new remoteZeppelinServerControlFeedback_args(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clear() {
|
||||
this.response = null;
|
||||
}
|
||||
|
||||
public RemoteZeppelinServerController getResponse() {
|
||||
return this.response;
|
||||
}
|
||||
|
||||
public remoteZeppelinServerControlFeedback_args setResponse(RemoteZeppelinServerController response) {
|
||||
this.response = response;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void unsetResponse() {
|
||||
this.response = null;
|
||||
}
|
||||
|
||||
/** Returns true if field response is set (has been assigned a value) and false otherwise */
|
||||
public boolean isSetResponse() {
|
||||
return this.response != null;
|
||||
}
|
||||
|
||||
public void setResponseIsSet(boolean value) {
|
||||
if (!value) {
|
||||
this.response = null;
|
||||
}
|
||||
}
|
||||
|
||||
public void setFieldValue(_Fields field, Object value) {
|
||||
switch (field) {
|
||||
case RESPONSE:
|
||||
if (value == null) {
|
||||
unsetResponse();
|
||||
} else {
|
||||
setResponse((RemoteZeppelinServerController)value);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public Object getFieldValue(_Fields field) {
|
||||
switch (field) {
|
||||
case RESPONSE:
|
||||
return getResponse();
|
||||
|
||||
}
|
||||
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 RESPONSE:
|
||||
return isSetResponse();
|
||||
}
|
||||
throw new IllegalStateException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object that) {
|
||||
if (that == null)
|
||||
return false;
|
||||
if (that instanceof remoteZeppelinServerControlFeedback_args)
|
||||
return this.equals((remoteZeppelinServerControlFeedback_args)that);
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean equals(remoteZeppelinServerControlFeedback_args that) {
|
||||
if (that == null)
|
||||
return false;
|
||||
|
||||
boolean this_present_response = true && this.isSetResponse();
|
||||
boolean that_present_response = true && that.isSetResponse();
|
||||
if (this_present_response || that_present_response) {
|
||||
if (!(this_present_response && that_present_response))
|
||||
return false;
|
||||
if (!this.response.equals(that.response))
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
List<Object> list = new ArrayList<Object>();
|
||||
|
||||
boolean present_response = true && (isSetResponse());
|
||||
list.add(present_response);
|
||||
if (present_response)
|
||||
list.add(response);
|
||||
|
||||
return list.hashCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int compareTo(remoteZeppelinServerControlFeedback_args other) {
|
||||
if (!getClass().equals(other.getClass())) {
|
||||
return getClass().getName().compareTo(other.getClass().getName());
|
||||
}
|
||||
|
||||
int lastComparison = 0;
|
||||
|
||||
lastComparison = Boolean.valueOf(isSetResponse()).compareTo(other.isSetResponse());
|
||||
if (lastComparison != 0) {
|
||||
return lastComparison;
|
||||
}
|
||||
if (isSetResponse()) {
|
||||
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.response, other.response);
|
||||
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("remoteZeppelinServerControlFeedback_args(");
|
||||
boolean first = true;
|
||||
|
||||
sb.append("response:");
|
||||
if (this.response == null) {
|
||||
sb.append("null");
|
||||
} else {
|
||||
sb.append(this.response);
|
||||
}
|
||||
first = false;
|
||||
sb.append(")");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
public void validate() throws org.apache.thrift.TException {
|
||||
// check for required fields
|
||||
// check for sub-struct validity
|
||||
if (response != null) {
|
||||
response.validate();
|
||||
}
|
||||
}
|
||||
|
||||
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 remoteZeppelinServerControlFeedback_argsStandardSchemeFactory implements SchemeFactory {
|
||||
public remoteZeppelinServerControlFeedback_argsStandardScheme getScheme() {
|
||||
return new remoteZeppelinServerControlFeedback_argsStandardScheme();
|
||||
}
|
||||
}
|
||||
|
||||
private static class remoteZeppelinServerControlFeedback_argsStandardScheme extends StandardScheme<remoteZeppelinServerControlFeedback_args> {
|
||||
|
||||
public void read(org.apache.thrift.protocol.TProtocol iprot, remoteZeppelinServerControlFeedback_args 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: // RESPONSE
|
||||
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
|
||||
struct.response = new RemoteZeppelinServerController();
|
||||
struct.response.read(iprot);
|
||||
struct.setResponseIsSet(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, remoteZeppelinServerControlFeedback_args struct) throws org.apache.thrift.TException {
|
||||
struct.validate();
|
||||
|
||||
oprot.writeStructBegin(STRUCT_DESC);
|
||||
if (struct.response != null) {
|
||||
oprot.writeFieldBegin(RESPONSE_FIELD_DESC);
|
||||
struct.response.write(oprot);
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
oprot.writeFieldStop();
|
||||
oprot.writeStructEnd();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private static class remoteZeppelinServerControlFeedback_argsTupleSchemeFactory implements SchemeFactory {
|
||||
public remoteZeppelinServerControlFeedback_argsTupleScheme getScheme() {
|
||||
return new remoteZeppelinServerControlFeedback_argsTupleScheme();
|
||||
}
|
||||
}
|
||||
|
||||
private static class remoteZeppelinServerControlFeedback_argsTupleScheme extends TupleScheme<remoteZeppelinServerControlFeedback_args> {
|
||||
|
||||
@Override
|
||||
public void write(org.apache.thrift.protocol.TProtocol prot, remoteZeppelinServerControlFeedback_args struct) throws org.apache.thrift.TException {
|
||||
TTupleProtocol oprot = (TTupleProtocol) prot;
|
||||
BitSet optionals = new BitSet();
|
||||
if (struct.isSetResponse()) {
|
||||
optionals.set(0);
|
||||
}
|
||||
oprot.writeBitSet(optionals, 1);
|
||||
if (struct.isSetResponse()) {
|
||||
struct.response.write(oprot);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void read(org.apache.thrift.protocol.TProtocol prot, remoteZeppelinServerControlFeedback_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.read(iprot);
|
||||
struct.setResponseIsSet(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
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");
|
||||
|
||||
|
||||
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());
|
||||
}
|
||||
|
||||
|
||||
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
|
||||
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
|
||||
;
|
||||
|
||||
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) {
|
||||
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;
|
||||
}
|
||||
}
|
||||
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);
|
||||
metaDataMap = Collections.unmodifiableMap(tmpMap);
|
||||
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(remoteZeppelinServerControlFeedback_result.class, metaDataMap);
|
||||
}
|
||||
|
||||
public remoteZeppelinServerControlFeedback_result() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Performs a deep copy on <i>other</i>.
|
||||
*/
|
||||
public remoteZeppelinServerControlFeedback_result(remoteZeppelinServerControlFeedback_result other) {
|
||||
}
|
||||
|
||||
public remoteZeppelinServerControlFeedback_result deepCopy() {
|
||||
return new remoteZeppelinServerControlFeedback_result(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clear() {
|
||||
}
|
||||
|
||||
public void setFieldValue(_Fields field, Object value) {
|
||||
switch (field) {
|
||||
}
|
||||
}
|
||||
|
||||
public Object getFieldValue(_Fields field) {
|
||||
switch (field) {
|
||||
}
|
||||
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) {
|
||||
}
|
||||
throw new IllegalStateException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object that) {
|
||||
if (that == null)
|
||||
return false;
|
||||
if (that instanceof remoteZeppelinServerControlFeedback_result)
|
||||
return this.equals((remoteZeppelinServerControlFeedback_result)that);
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean equals(remoteZeppelinServerControlFeedback_result that) {
|
||||
if (that == null)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
List<Object> list = new ArrayList<Object>();
|
||||
|
||||
return list.hashCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int compareTo(remoteZeppelinServerControlFeedback_result other) {
|
||||
if (!getClass().equals(other.getClass())) {
|
||||
return getClass().getName().compareTo(other.getClass().getName());
|
||||
}
|
||||
|
||||
int lastComparison = 0;
|
||||
|
||||
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("remoteZeppelinServerControlFeedback_result(");
|
||||
boolean first = true;
|
||||
|
||||
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 remoteZeppelinServerControlFeedback_resultStandardSchemeFactory implements SchemeFactory {
|
||||
public remoteZeppelinServerControlFeedback_resultStandardScheme getScheme() {
|
||||
return new remoteZeppelinServerControlFeedback_resultStandardScheme();
|
||||
}
|
||||
}
|
||||
|
||||
private static class remoteZeppelinServerControlFeedback_resultStandardScheme extends StandardScheme<remoteZeppelinServerControlFeedback_result> {
|
||||
|
||||
public void read(org.apache.thrift.protocol.TProtocol iprot, remoteZeppelinServerControlFeedback_result 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) {
|
||||
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, remoteZeppelinServerControlFeedback_result struct) throws org.apache.thrift.TException {
|
||||
struct.validate();
|
||||
|
||||
oprot.writeStructBegin(STRUCT_DESC);
|
||||
oprot.writeFieldStop();
|
||||
oprot.writeStructEnd();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private static class remoteZeppelinServerControlFeedback_resultTupleSchemeFactory implements SchemeFactory {
|
||||
public remoteZeppelinServerControlFeedback_resultTupleScheme getScheme() {
|
||||
return new remoteZeppelinServerControlFeedback_resultTupleScheme();
|
||||
}
|
||||
}
|
||||
|
||||
private static class remoteZeppelinServerControlFeedback_resultTupleScheme extends TupleScheme<remoteZeppelinServerControlFeedback_result> {
|
||||
|
||||
@Override
|
||||
public void write(org.apache.thrift.protocol.TProtocol prot, remoteZeppelinServerControlFeedback_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 {
|
||||
TTupleProtocol iprot = (TTupleProtocol) prot;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,62 @@
|
|||
/**
|
||||
* 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,641 @@
|
|||
/**
|
||||
* 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-11")
|
||||
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);
|
||||
|
||||
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
|
||||
static {
|
||||
schemes.put(StandardScheme.class, new RemoteZeppelinServerControllerStandardSchemeFactory());
|
||||
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");
|
||||
|
||||
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, 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,
|
||||
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
|
||||
metaDataMap = Collections.unmodifiableMap(tmpMap);
|
||||
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(RemoteZeppelinServerController.class, metaDataMap);
|
||||
}
|
||||
|
||||
public RemoteZeppelinServerController() {
|
||||
}
|
||||
|
||||
public RemoteZeppelinServerController(
|
||||
RemoteZeppelinServerControlEvent type,
|
||||
String eventOwnerKey,
|
||||
String msg)
|
||||
{
|
||||
this();
|
||||
this.type = type;
|
||||
this.eventOwnerKey = eventOwnerKey;
|
||||
this.msg = msg;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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;
|
||||
}
|
||||
if (other.isSetMsg()) {
|
||||
this.msg = other.msg;
|
||||
}
|
||||
}
|
||||
|
||||
public RemoteZeppelinServerController deepCopy() {
|
||||
return new RemoteZeppelinServerController(this);
|
||||
}
|
||||
|
||||
@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;
|
||||
}
|
||||
|
||||
public RemoteZeppelinServerController 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 RemoteZeppelinServerController 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((RemoteZeppelinServerControlEvent)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 RemoteZeppelinServerController)
|
||||
return this.equals((RemoteZeppelinServerController)that);
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean equals(RemoteZeppelinServerController 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(RemoteZeppelinServerController 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("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");
|
||||
} 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 RemoteZeppelinServerControllerStandardSchemeFactory implements SchemeFactory {
|
||||
public RemoteZeppelinServerControllerStandardScheme getScheme() {
|
||||
return new RemoteZeppelinServerControllerStandardScheme();
|
||||
}
|
||||
}
|
||||
|
||||
private static class RemoteZeppelinServerControllerStandardScheme extends StandardScheme<RemoteZeppelinServerController> {
|
||||
|
||||
public void read(org.apache.thrift.protocol.TProtocol iprot, RemoteZeppelinServerController 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.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();
|
||||
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, RemoteZeppelinServerController 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 RemoteZeppelinServerControllerTupleSchemeFactory implements SchemeFactory {
|
||||
public RemoteZeppelinServerControllerTupleScheme getScheme() {
|
||||
return new RemoteZeppelinServerControllerTupleScheme();
|
||||
}
|
||||
}
|
||||
|
||||
private static class RemoteZeppelinServerControllerTupleScheme extends TupleScheme<RemoteZeppelinServerController> {
|
||||
|
||||
@Override
|
||||
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()) {
|
||||
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, RemoteZeppelinServerController 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.RemoteZeppelinServerControlEvent.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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,59 @@
|
|||
/**
|
||||
* 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,641 @@
|
|||
/**
|
||||
* 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-11")
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,625 @@
|
|||
/**
|
||||
* 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-11")
|
||||
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");
|
||||
|
||||
private static final org.apache.thrift.protocol.TField NOTE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("noteId", org.apache.thrift.protocol.TType.STRING, (short)1);
|
||||
private static final org.apache.thrift.protocol.TField PARAGRAPH_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("paragraphId", org.apache.thrift.protocol.TType.STRING, (short)2);
|
||||
private static final org.apache.thrift.protocol.TField RUNNERS_FIELD_DESC = new org.apache.thrift.protocol.TField("runners", 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 ZeppelinServerResourceParagraphRunnerStandardSchemeFactory());
|
||||
schemes.put(TupleScheme.class, new ZeppelinServerResourceParagraphRunnerTupleSchemeFactory());
|
||||
}
|
||||
|
||||
public String noteId; // required
|
||||
public String paragraphId; // required
|
||||
public String runners; // 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 {
|
||||
NOTE_ID((short)1, "noteId"),
|
||||
PARAGRAPH_ID((short)2, "paragraphId"),
|
||||
RUNNERS((short)3, "runners");
|
||||
|
||||
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: // NOTE_ID
|
||||
return NOTE_ID;
|
||||
case 2: // PARAGRAPH_ID
|
||||
return PARAGRAPH_ID;
|
||||
case 3: // RUNNERS
|
||||
return RUNNERS;
|
||||
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.NOTE_ID, new org.apache.thrift.meta_data.FieldMetaData("noteId", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
||||
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
|
||||
tmpMap.put(_Fields.PARAGRAPH_ID, new org.apache.thrift.meta_data.FieldMetaData("paragraphId", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
||||
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
|
||||
tmpMap.put(_Fields.RUNNERS, new org.apache.thrift.meta_data.FieldMetaData("runners", 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(ZeppelinServerResourceParagraphRunner.class, metaDataMap);
|
||||
}
|
||||
|
||||
public ZeppelinServerResourceParagraphRunner() {
|
||||
}
|
||||
|
||||
public ZeppelinServerResourceParagraphRunner(
|
||||
String noteId,
|
||||
String paragraphId,
|
||||
String runners)
|
||||
{
|
||||
this();
|
||||
this.noteId = noteId;
|
||||
this.paragraphId = paragraphId;
|
||||
this.runners = runners;
|
||||
}
|
||||
|
||||
/**
|
||||
* Performs a deep copy on <i>other</i>.
|
||||
*/
|
||||
public ZeppelinServerResourceParagraphRunner(ZeppelinServerResourceParagraphRunner other) {
|
||||
if (other.isSetNoteId()) {
|
||||
this.noteId = other.noteId;
|
||||
}
|
||||
if (other.isSetParagraphId()) {
|
||||
this.paragraphId = other.paragraphId;
|
||||
}
|
||||
if (other.isSetRunners()) {
|
||||
this.runners = other.runners;
|
||||
}
|
||||
}
|
||||
|
||||
public ZeppelinServerResourceParagraphRunner deepCopy() {
|
||||
return new ZeppelinServerResourceParagraphRunner(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clear() {
|
||||
this.noteId = null;
|
||||
this.paragraphId = null;
|
||||
this.runners = null;
|
||||
}
|
||||
|
||||
public String getNoteId() {
|
||||
return this.noteId;
|
||||
}
|
||||
|
||||
public ZeppelinServerResourceParagraphRunner setNoteId(String noteId) {
|
||||
this.noteId = noteId;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void unsetNoteId() {
|
||||
this.noteId = null;
|
||||
}
|
||||
|
||||
/** Returns true if field noteId is set (has been assigned a value) and false otherwise */
|
||||
public boolean isSetNoteId() {
|
||||
return this.noteId != null;
|
||||
}
|
||||
|
||||
public void setNoteIdIsSet(boolean value) {
|
||||
if (!value) {
|
||||
this.noteId = null;
|
||||
}
|
||||
}
|
||||
|
||||
public String getParagraphId() {
|
||||
return this.paragraphId;
|
||||
}
|
||||
|
||||
public ZeppelinServerResourceParagraphRunner setParagraphId(String paragraphId) {
|
||||
this.paragraphId = paragraphId;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void unsetParagraphId() {
|
||||
this.paragraphId = null;
|
||||
}
|
||||
|
||||
/** Returns true if field paragraphId is set (has been assigned a value) and false otherwise */
|
||||
public boolean isSetParagraphId() {
|
||||
return this.paragraphId != null;
|
||||
}
|
||||
|
||||
public void setParagraphIdIsSet(boolean value) {
|
||||
if (!value) {
|
||||
this.paragraphId = null;
|
||||
}
|
||||
}
|
||||
|
||||
public String getRunners() {
|
||||
return this.runners;
|
||||
}
|
||||
|
||||
public ZeppelinServerResourceParagraphRunner setRunners(String runners) {
|
||||
this.runners = runners;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void unsetRunners() {
|
||||
this.runners = null;
|
||||
}
|
||||
|
||||
/** Returns true if field runners is set (has been assigned a value) and false otherwise */
|
||||
public boolean isSetRunners() {
|
||||
return this.runners != null;
|
||||
}
|
||||
|
||||
public void setRunnersIsSet(boolean value) {
|
||||
if (!value) {
|
||||
this.runners = null;
|
||||
}
|
||||
}
|
||||
|
||||
public void setFieldValue(_Fields field, Object value) {
|
||||
switch (field) {
|
||||
case NOTE_ID:
|
||||
if (value == null) {
|
||||
unsetNoteId();
|
||||
} else {
|
||||
setNoteId((String)value);
|
||||
}
|
||||
break;
|
||||
|
||||
case PARAGRAPH_ID:
|
||||
if (value == null) {
|
||||
unsetParagraphId();
|
||||
} else {
|
||||
setParagraphId((String)value);
|
||||
}
|
||||
break;
|
||||
|
||||
case RUNNERS:
|
||||
if (value == null) {
|
||||
unsetRunners();
|
||||
} else {
|
||||
setRunners((String)value);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public Object getFieldValue(_Fields field) {
|
||||
switch (field) {
|
||||
case NOTE_ID:
|
||||
return getNoteId();
|
||||
|
||||
case PARAGRAPH_ID:
|
||||
return getParagraphId();
|
||||
|
||||
case RUNNERS:
|
||||
return getRunners();
|
||||
|
||||
}
|
||||
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 NOTE_ID:
|
||||
return isSetNoteId();
|
||||
case PARAGRAPH_ID:
|
||||
return isSetParagraphId();
|
||||
case RUNNERS:
|
||||
return isSetRunners();
|
||||
}
|
||||
throw new IllegalStateException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object that) {
|
||||
if (that == null)
|
||||
return false;
|
||||
if (that instanceof ZeppelinServerResourceParagraphRunner)
|
||||
return this.equals((ZeppelinServerResourceParagraphRunner)that);
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean equals(ZeppelinServerResourceParagraphRunner that) {
|
||||
if (that == null)
|
||||
return false;
|
||||
|
||||
boolean this_present_noteId = true && this.isSetNoteId();
|
||||
boolean that_present_noteId = true && that.isSetNoteId();
|
||||
if (this_present_noteId || that_present_noteId) {
|
||||
if (!(this_present_noteId && that_present_noteId))
|
||||
return false;
|
||||
if (!this.noteId.equals(that.noteId))
|
||||
return false;
|
||||
}
|
||||
|
||||
boolean this_present_paragraphId = true && this.isSetParagraphId();
|
||||
boolean that_present_paragraphId = true && that.isSetParagraphId();
|
||||
if (this_present_paragraphId || that_present_paragraphId) {
|
||||
if (!(this_present_paragraphId && that_present_paragraphId))
|
||||
return false;
|
||||
if (!this.paragraphId.equals(that.paragraphId))
|
||||
return false;
|
||||
}
|
||||
|
||||
boolean this_present_runners = true && this.isSetRunners();
|
||||
boolean that_present_runners = true && that.isSetRunners();
|
||||
if (this_present_runners || that_present_runners) {
|
||||
if (!(this_present_runners && that_present_runners))
|
||||
return false;
|
||||
if (!this.runners.equals(that.runners))
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
List<Object> list = new ArrayList<Object>();
|
||||
|
||||
boolean present_noteId = true && (isSetNoteId());
|
||||
list.add(present_noteId);
|
||||
if (present_noteId)
|
||||
list.add(noteId);
|
||||
|
||||
boolean present_paragraphId = true && (isSetParagraphId());
|
||||
list.add(present_paragraphId);
|
||||
if (present_paragraphId)
|
||||
list.add(paragraphId);
|
||||
|
||||
boolean present_runners = true && (isSetRunners());
|
||||
list.add(present_runners);
|
||||
if (present_runners)
|
||||
list.add(runners);
|
||||
|
||||
return list.hashCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int compareTo(ZeppelinServerResourceParagraphRunner other) {
|
||||
if (!getClass().equals(other.getClass())) {
|
||||
return getClass().getName().compareTo(other.getClass().getName());
|
||||
}
|
||||
|
||||
int lastComparison = 0;
|
||||
|
||||
lastComparison = Boolean.valueOf(isSetNoteId()).compareTo(other.isSetNoteId());
|
||||
if (lastComparison != 0) {
|
||||
return lastComparison;
|
||||
}
|
||||
if (isSetNoteId()) {
|
||||
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.noteId, other.noteId);
|
||||
if (lastComparison != 0) {
|
||||
return lastComparison;
|
||||
}
|
||||
}
|
||||
lastComparison = Boolean.valueOf(isSetParagraphId()).compareTo(other.isSetParagraphId());
|
||||
if (lastComparison != 0) {
|
||||
return lastComparison;
|
||||
}
|
||||
if (isSetParagraphId()) {
|
||||
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.paragraphId, other.paragraphId);
|
||||
if (lastComparison != 0) {
|
||||
return lastComparison;
|
||||
}
|
||||
}
|
||||
lastComparison = Boolean.valueOf(isSetRunners()).compareTo(other.isSetRunners());
|
||||
if (lastComparison != 0) {
|
||||
return lastComparison;
|
||||
}
|
||||
if (isSetRunners()) {
|
||||
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.runners, other.runners);
|
||||
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("ZeppelinServerResourceParagraphRunner(");
|
||||
boolean first = true;
|
||||
|
||||
sb.append("noteId:");
|
||||
if (this.noteId == null) {
|
||||
sb.append("null");
|
||||
} else {
|
||||
sb.append(this.noteId);
|
||||
}
|
||||
first = false;
|
||||
if (!first) sb.append(", ");
|
||||
sb.append("paragraphId:");
|
||||
if (this.paragraphId == null) {
|
||||
sb.append("null");
|
||||
} else {
|
||||
sb.append(this.paragraphId);
|
||||
}
|
||||
first = false;
|
||||
if (!first) sb.append(", ");
|
||||
sb.append("runners:");
|
||||
if (this.runners == null) {
|
||||
sb.append("null");
|
||||
} else {
|
||||
sb.append(this.runners);
|
||||
}
|
||||
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 ZeppelinServerResourceParagraphRunnerStandardSchemeFactory implements SchemeFactory {
|
||||
public ZeppelinServerResourceParagraphRunnerStandardScheme getScheme() {
|
||||
return new ZeppelinServerResourceParagraphRunnerStandardScheme();
|
||||
}
|
||||
}
|
||||
|
||||
private static class ZeppelinServerResourceParagraphRunnerStandardScheme extends StandardScheme<ZeppelinServerResourceParagraphRunner> {
|
||||
|
||||
public void read(org.apache.thrift.protocol.TProtocol iprot, ZeppelinServerResourceParagraphRunner 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: // NOTE_ID
|
||||
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
|
||||
struct.noteId = iprot.readString();
|
||||
struct.setNoteIdIsSet(true);
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||
}
|
||||
break;
|
||||
case 2: // PARAGRAPH_ID
|
||||
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
|
||||
struct.paragraphId = iprot.readString();
|
||||
struct.setParagraphIdIsSet(true);
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||
}
|
||||
break;
|
||||
case 3: // RUNNERS
|
||||
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
|
||||
struct.runners = iprot.readString();
|
||||
struct.setRunnersIsSet(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, ZeppelinServerResourceParagraphRunner struct) throws org.apache.thrift.TException {
|
||||
struct.validate();
|
||||
|
||||
oprot.writeStructBegin(STRUCT_DESC);
|
||||
if (struct.noteId != null) {
|
||||
oprot.writeFieldBegin(NOTE_ID_FIELD_DESC);
|
||||
oprot.writeString(struct.noteId);
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
if (struct.paragraphId != null) {
|
||||
oprot.writeFieldBegin(PARAGRAPH_ID_FIELD_DESC);
|
||||
oprot.writeString(struct.paragraphId);
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
if (struct.runners != null) {
|
||||
oprot.writeFieldBegin(RUNNERS_FIELD_DESC);
|
||||
oprot.writeString(struct.runners);
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
oprot.writeFieldStop();
|
||||
oprot.writeStructEnd();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private static class ZeppelinServerResourceParagraphRunnerTupleSchemeFactory implements SchemeFactory {
|
||||
public ZeppelinServerResourceParagraphRunnerTupleScheme getScheme() {
|
||||
return new ZeppelinServerResourceParagraphRunnerTupleScheme();
|
||||
}
|
||||
}
|
||||
|
||||
private static class ZeppelinServerResourceParagraphRunnerTupleScheme extends TupleScheme<ZeppelinServerResourceParagraphRunner> {
|
||||
|
||||
@Override
|
||||
public void write(org.apache.thrift.protocol.TProtocol prot, ZeppelinServerResourceParagraphRunner struct) throws org.apache.thrift.TException {
|
||||
TTupleProtocol oprot = (TTupleProtocol) prot;
|
||||
BitSet optionals = new BitSet();
|
||||
if (struct.isSetNoteId()) {
|
||||
optionals.set(0);
|
||||
}
|
||||
if (struct.isSetParagraphId()) {
|
||||
optionals.set(1);
|
||||
}
|
||||
if (struct.isSetRunners()) {
|
||||
optionals.set(2);
|
||||
}
|
||||
oprot.writeBitSet(optionals, 3);
|
||||
if (struct.isSetNoteId()) {
|
||||
oprot.writeString(struct.noteId);
|
||||
}
|
||||
if (struct.isSetParagraphId()) {
|
||||
oprot.writeString(struct.paragraphId);
|
||||
}
|
||||
if (struct.isSetRunners()) {
|
||||
oprot.writeString(struct.runners);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void read(org.apache.thrift.protocol.TProtocol prot, ZeppelinServerResourceParagraphRunner struct) throws org.apache.thrift.TException {
|
||||
TTupleProtocol iprot = (TTupleProtocol) prot;
|
||||
BitSet incoming = iprot.readBitSet(3);
|
||||
if (incoming.get(0)) {
|
||||
struct.noteId = iprot.readString();
|
||||
struct.setNoteIdIsSet(true);
|
||||
}
|
||||
if (incoming.get(1)) {
|
||||
struct.paragraphId = iprot.readString();
|
||||
struct.setParagraphIdIsSet(true);
|
||||
}
|
||||
if (incoming.get(2)) {
|
||||
struct.runners = iprot.readString();
|
||||
struct.setRunnersIsSet(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -50,8 +50,10 @@ enum RemoteInterpreterEventType {
|
|||
OUTPUT_UPDATE = 9,
|
||||
ANGULAR_REGISTRY_PUSH = 10,
|
||||
APP_STATUS_UPDATE = 11,
|
||||
REMOTE_ZEPPELIN_SERVER_CONTROL = 12
|
||||
}
|
||||
|
||||
|
||||
struct RemoteInterpreterEvent {
|
||||
1: RemoteInterpreterEventType type,
|
||||
2: string data // json serialized data
|
||||
|
|
@ -62,6 +64,37 @@ struct RemoteApplicationResult {
|
|||
2: string msg
|
||||
}
|
||||
|
||||
/*
|
||||
cloverhearts
|
||||
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,
|
||||
3: string runners
|
||||
}
|
||||
|
||||
struct ZeppelinServerResource {
|
||||
1: RemoteZeppelinServerResourceType type,
|
||||
2: string eventOwnerKey,
|
||||
3: string msg
|
||||
}
|
||||
|
||||
struct RemoteZeppelinServerController {
|
||||
1: RemoteZeppelinServerControlEvent type,
|
||||
2: string eventOwnerKey
|
||||
3: string msg
|
||||
}
|
||||
|
||||
/*
|
||||
* The below variables(name, value) will be connected to getCompletions in paragraph.controller.js
|
||||
*
|
||||
|
|
@ -109,4 +142,6 @@ service RemoteInterpreterService {
|
|||
RemoteApplicationResult loadApplication(1: string applicationInstanceId, 2: string packageInfo, 3: string noteId, 4: string paragraphId);
|
||||
RemoteApplicationResult unloadApplication(1: string applicationInstanceId);
|
||||
RemoteApplicationResult runApplication(1: string applicationInstanceId);
|
||||
|
||||
void remoteZeppelinServerControlFeedback(1: RemoteZeppelinServerController response);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue