You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@zeppelin.apache.org by jo...@apache.org on 2018/08/29 10:07:22 UTC
[26/50] [abbrv] zeppelin git commit: Revert "[ZEPPELIN-3740] Adopt
`google-java-format` and `fmt-maven-plugin`"
http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/RegisterInfo.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/RegisterInfo.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/RegisterInfo.java
index 3b4acf2..324b7c2 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/RegisterInfo.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/RegisterInfo.java
@@ -1,66 +1,65 @@
/**
- * 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
+ * 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
*
- * <p>http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * <p>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
+ * 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)
*
- * <p>DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- *
- * @generated
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
*/
package org.apache.zeppelin.interpreter.thrift;
-import java.util.ArrayList;
-import java.util.BitSet;
-import java.util.Collections;
-import java.util.EnumMap;
-import java.util.EnumSet;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import javax.annotation.Generated;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.protocol.TTupleProtocol;
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 = "2018-8-9")
-public class RegisterInfo
- implements org.apache.thrift.TBase<RegisterInfo, RegisterInfo._Fields>,
- java.io.Serializable,
- Cloneable,
- Comparable<RegisterInfo> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC =
- new org.apache.thrift.protocol.TStruct("RegisterInfo");
-
- private static final org.apache.thrift.protocol.TField HOST_FIELD_DESC =
- new org.apache.thrift.protocol.TField(
- "host", org.apache.thrift.protocol.TType.STRING, (short) 1);
- private static final org.apache.thrift.protocol.TField PORT_FIELD_DESC =
- new org.apache.thrift.protocol.TField(
- "port", org.apache.thrift.protocol.TType.I32, (short) 2);
- private static final org.apache.thrift.protocol.TField INTERPRETER_GROUP_ID_FIELD_DESC =
- new org.apache.thrift.protocol.TField(
- "interpreterGroupId", org.apache.thrift.protocol.TType.STRING, (short) 3);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes =
- new HashMap<Class<? extends IScheme>, SchemeFactory>();
+public class RegisterInfo implements org.apache.thrift.TBase<RegisterInfo, RegisterInfo._Fields>, java.io.Serializable, Cloneable, Comparable<RegisterInfo> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("RegisterInfo");
+
+ private static final org.apache.thrift.protocol.TField HOST_FIELD_DESC = new org.apache.thrift.protocol.TField("host", org.apache.thrift.protocol.TType.STRING, (short)1);
+ private static final org.apache.thrift.protocol.TField PORT_FIELD_DESC = new org.apache.thrift.protocol.TField("port", org.apache.thrift.protocol.TType.I32, (short)2);
+ private static final org.apache.thrift.protocol.TField INTERPRETER_GROUP_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("interpreterGroupId", 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 RegisterInfoStandardSchemeFactory());
schemes.put(TupleScheme.class, new RegisterInfoTupleSchemeFactory());
@@ -70,14 +69,11 @@ public class RegisterInfo
public int port; // required
public String interpreterGroupId; // required
- /**
- * The set of fields this struct contains, along with convenience methods for finding and
- * manipulating them.
- */
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- HOST((short) 1, "host"),
- PORT((short) 2, "port"),
- INTERPRETER_GROUP_ID((short) 3, "interpreterGroupId");
+ HOST((short)1, "host"),
+ PORT((short)2, "port"),
+ INTERPRETER_GROUP_ID((short)3, "interpreterGroupId");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
@@ -87,9 +83,11 @@ public class RegisterInfo
}
}
- /** Find the _Fields constant that matches fieldId, or null if its not found. */
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
public static _Fields findByThriftId(int fieldId) {
- switch (fieldId) {
+ switch(fieldId) {
case 1: // HOST
return HOST;
case 2: // PORT
@@ -101,15 +99,19 @@ public class RegisterInfo
}
}
- /** Find the _Fields constant that matches fieldId, throwing an exception if it is not found. */
+ /**
+ * 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!");
+ 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. */
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
public static _Fields findByName(String name) {
return byName.get(name);
}
@@ -135,38 +137,26 @@ public class RegisterInfo
private static final int __PORT_ISSET_ID = 0;
private byte __isset_bitfield = 0;
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.HOST,
- new org.apache.thrift.meta_data.FieldMetaData(
- "host",
- org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(
- org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(
- _Fields.PORT,
- new org.apache.thrift.meta_data.FieldMetaData(
- "port",
- org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(
- org.apache.thrift.protocol.TType.I32)));
- tmpMap.put(
- _Fields.INTERPRETER_GROUP_ID,
- new org.apache.thrift.meta_data.FieldMetaData(
- "interpreterGroupId",
- org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(
- org.apache.thrift.protocol.TType.STRING)));
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.HOST, new org.apache.thrift.meta_data.FieldMetaData("host", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.PORT, new org.apache.thrift.meta_data.FieldMetaData("port", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
+ tmpMap.put(_Fields.INTERPRETER_GROUP_ID, new org.apache.thrift.meta_data.FieldMetaData("interpreterGroupId", 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(RegisterInfo.class, metaDataMap);
}
- public RegisterInfo() {}
+ public RegisterInfo() {
+ }
- public RegisterInfo(String host, int port, String interpreterGroupId) {
+ public RegisterInfo(
+ String host,
+ int port,
+ String interpreterGroupId)
+ {
this();
this.host = host;
this.port = port;
@@ -174,7 +164,9 @@ public class RegisterInfo
this.interpreterGroupId = interpreterGroupId;
}
- /** Performs a deep copy on <i>other</i>. */
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
public RegisterInfo(RegisterInfo other) {
__isset_bitfield = other.__isset_bitfield;
if (other.isSetHost()) {
@@ -258,9 +250,7 @@ public class RegisterInfo
this.interpreterGroupId = null;
}
- /**
- * Returns true if field interpreterGroupId is set (has been assigned a value) and false otherwise
- */
+ /** Returns true if field interpreterGroupId is set (has been assigned a value) and false otherwise */
public boolean isSetInterpreterGroupId() {
return this.interpreterGroupId != null;
}
@@ -273,95 +263,103 @@ public class RegisterInfo
public void setFieldValue(_Fields field, Object value) {
switch (field) {
- case HOST:
- if (value == null) {
- unsetHost();
- } else {
- setHost((String) value);
- }
- break;
+ case HOST:
+ if (value == null) {
+ unsetHost();
+ } else {
+ setHost((String)value);
+ }
+ break;
- case PORT:
- if (value == null) {
- unsetPort();
- } else {
- setPort((Integer) value);
- }
- break;
+ case PORT:
+ if (value == null) {
+ unsetPort();
+ } else {
+ setPort((Integer)value);
+ }
+ break;
+
+ case INTERPRETER_GROUP_ID:
+ if (value == null) {
+ unsetInterpreterGroupId();
+ } else {
+ setInterpreterGroupId((String)value);
+ }
+ break;
- case INTERPRETER_GROUP_ID:
- if (value == null) {
- unsetInterpreterGroupId();
- } else {
- setInterpreterGroupId((String) value);
- }
- break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
- case HOST:
- return getHost();
+ case HOST:
+ return getHost();
+
+ case PORT:
+ return Integer.valueOf(getPort());
- case PORT:
- return Integer.valueOf(getPort());
+ case INTERPRETER_GROUP_ID:
+ return getInterpreterGroupId();
- case INTERPRETER_GROUP_ID:
- return getInterpreterGroupId();
}
throw new IllegalStateException();
}
- /**
- * Returns true if field corresponding to fieldID is set (has been assigned a value) and false
- * otherwise
- */
+ /** 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 HOST:
- return isSetHost();
- case PORT:
- return isSetPort();
- case INTERPRETER_GROUP_ID:
- return isSetInterpreterGroupId();
+ case HOST:
+ return isSetHost();
+ case PORT:
+ return isSetPort();
+ case INTERPRETER_GROUP_ID:
+ return isSetInterpreterGroupId();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
- if (that == null) return false;
- if (that instanceof RegisterInfo) return this.equals((RegisterInfo) that);
+ if (that == null)
+ return false;
+ if (that instanceof RegisterInfo)
+ return this.equals((RegisterInfo)that);
return false;
}
public boolean equals(RegisterInfo that) {
- if (that == null) return false;
+ if (that == null)
+ return false;
boolean this_present_host = true && this.isSetHost();
boolean that_present_host = true && that.isSetHost();
if (this_present_host || that_present_host) {
- if (!(this_present_host && that_present_host)) return false;
- if (!this.host.equals(that.host)) return false;
+ if (!(this_present_host && that_present_host))
+ return false;
+ if (!this.host.equals(that.host))
+ return false;
}
boolean this_present_port = true;
boolean that_present_port = true;
if (this_present_port || that_present_port) {
- if (!(this_present_port && that_present_port)) return false;
- if (this.port != that.port) return false;
+ if (!(this_present_port && that_present_port))
+ return false;
+ if (this.port != that.port)
+ return false;
}
boolean this_present_interpreterGroupId = true && this.isSetInterpreterGroupId();
boolean that_present_interpreterGroupId = true && that.isSetInterpreterGroupId();
if (this_present_interpreterGroupId || that_present_interpreterGroupId) {
- if (!(this_present_interpreterGroupId && that_present_interpreterGroupId)) return false;
- if (!this.interpreterGroupId.equals(that.interpreterGroupId)) return false;
+ if (!(this_present_interpreterGroupId && that_present_interpreterGroupId))
+ return false;
+ if (!this.interpreterGroupId.equals(that.interpreterGroupId))
+ return false;
}
return true;
@@ -373,15 +371,18 @@ public class RegisterInfo
boolean present_host = true && (isSetHost());
list.add(present_host);
- if (present_host) list.add(host);
+ if (present_host)
+ list.add(host);
boolean present_port = true;
list.add(present_port);
- if (present_port) list.add(port);
+ if (present_port)
+ list.add(port);
boolean present_interpreterGroupId = true && (isSetInterpreterGroupId());
list.add(present_interpreterGroupId);
- if (present_interpreterGroupId) list.add(interpreterGroupId);
+ if (present_interpreterGroupId)
+ list.add(interpreterGroupId);
return list.hashCode();
}
@@ -414,15 +415,12 @@ public class RegisterInfo
return lastComparison;
}
}
- lastComparison =
- Boolean.valueOf(isSetInterpreterGroupId()).compareTo(other.isSetInterpreterGroupId());
+ lastComparison = Boolean.valueOf(isSetInterpreterGroupId()).compareTo(other.isSetInterpreterGroupId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetInterpreterGroupId()) {
- lastComparison =
- org.apache.thrift.TBaseHelper.compareTo(
- this.interpreterGroupId, other.interpreterGroupId);
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.interpreterGroupId, other.interpreterGroupId);
if (lastComparison != 0) {
return lastComparison;
}
@@ -438,8 +436,7 @@ public class RegisterInfo
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
- public void write(org.apache.thrift.protocol.TProtocol oprot)
- throws org.apache.thrift.TException {
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@@ -478,23 +475,17 @@ public class RegisterInfo
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)));
+ 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 {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
- // it doesn't seem like you should have to do this, but java serialization is wacky, and
- // doesn't call the default constructor.
+ // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bitfield = 0;
- read(
- new org.apache.thrift.protocol.TCompactProtocol(
- new org.apache.thrift.transport.TIOStreamTransport(in)));
+ 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);
}
@@ -508,13 +499,13 @@ public class RegisterInfo
private static class RegisterInfoStandardScheme extends StandardScheme<RegisterInfo> {
- public void read(org.apache.thrift.protocol.TProtocol iprot, RegisterInfo struct)
- throws org.apache.thrift.TException {
+ public void read(org.apache.thrift.protocol.TProtocol iprot, RegisterInfo struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
- while (true) {
+ while (true)
+ {
schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
@@ -522,7 +513,7 @@ public class RegisterInfo
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.host = iprot.readString();
struct.setHostIsSet(true);
- } else {
+ } else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
@@ -530,7 +521,7 @@ public class RegisterInfo
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.port = iprot.readI32();
struct.setPortIsSet(true);
- } else {
+ } else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
@@ -538,7 +529,7 @@ public class RegisterInfo
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.interpreterGroupId = iprot.readString();
struct.setInterpreterGroupIdIsSet(true);
- } else {
+ } else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
@@ -553,8 +544,7 @@ public class RegisterInfo
struct.validate();
}
- public void write(org.apache.thrift.protocol.TProtocol oprot, RegisterInfo struct)
- throws org.apache.thrift.TException {
+ public void write(org.apache.thrift.protocol.TProtocol oprot, RegisterInfo struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
@@ -574,6 +564,7 @@ public class RegisterInfo
oprot.writeFieldStop();
oprot.writeStructEnd();
}
+
}
private static class RegisterInfoTupleSchemeFactory implements SchemeFactory {
@@ -585,8 +576,7 @@ public class RegisterInfo
private static class RegisterInfoTupleScheme extends TupleScheme<RegisterInfo> {
@Override
- public void write(org.apache.thrift.protocol.TProtocol prot, RegisterInfo struct)
- throws org.apache.thrift.TException {
+ public void write(org.apache.thrift.protocol.TProtocol prot, RegisterInfo struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetHost()) {
@@ -611,8 +601,7 @@ public class RegisterInfo
}
@Override
- public void read(org.apache.thrift.protocol.TProtocol prot, RegisterInfo struct)
- throws org.apache.thrift.TException {
+ public void read(org.apache.thrift.protocol.TProtocol prot, RegisterInfo struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
@@ -629,4 +618,6 @@ public class RegisterInfo
}
}
}
+
}
+
http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/RemoteApplicationResult.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/RemoteApplicationResult.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/RemoteApplicationResult.java
index 423bb12..4d2bdb4 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/RemoteApplicationResult.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/RemoteApplicationResult.java
@@ -1,63 +1,64 @@
/**
- * 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
+ * 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
*
- * <p>http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * <p>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
+ * 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)
*
- * <p>DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- *
- * @generated
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
*/
package org.apache.zeppelin.interpreter.thrift;
-import java.util.ArrayList;
-import java.util.BitSet;
-import java.util.Collections;
-import java.util.EnumMap;
-import java.util.EnumSet;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import javax.annotation.Generated;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.protocol.TTupleProtocol;
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 = "2018-8-9")
-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");
-
- private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC =
- new org.apache.thrift.protocol.TField(
- "success", org.apache.thrift.protocol.TType.BOOL, (short) 1);
- 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) 2);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes =
- new HashMap<Class<? extends IScheme>, SchemeFactory>();
+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");
+ private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)1);
+ 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)2);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new RemoteApplicationResultStandardSchemeFactory());
schemes.put(TupleScheme.class, new RemoteApplicationResultTupleSchemeFactory());
@@ -66,13 +67,10 @@ public class RemoteApplicationResult
public boolean success; // required
public String msg; // required
- /**
- * The set of fields this struct contains, along with convenience methods for finding and
- * manipulating them.
- */
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- SUCCESS((short) 1, "success"),
- MSG((short) 2, "msg");
+ SUCCESS((short)1, "success"),
+ MSG((short)2, "msg");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
@@ -82,9 +80,11 @@ public class RemoteApplicationResult
}
}
- /** Find the _Fields constant that matches fieldId, or null if its not found. */
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
public static _Fields findByThriftId(int fieldId) {
- switch (fieldId) {
+ switch(fieldId) {
case 1: // SUCCESS
return SUCCESS;
case 2: // MSG
@@ -94,15 +94,19 @@ public class RemoteApplicationResult
}
}
- /** Find the _Fields constant that matches fieldId, throwing an exception if it is not found. */
+ /**
+ * 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!");
+ 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. */
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
public static _Fields findByName(String name) {
return byName.get(name);
}
@@ -128,39 +132,32 @@ public class RemoteApplicationResult
private static final int __SUCCESS_ISSET_ID = 0;
private byte __isset_bitfield = 0;
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.SUCCESS,
- new org.apache.thrift.meta_data.FieldMetaData(
- "success",
- org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(
- org.apache.thrift.protocol.TType.BOOL)));
- 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)));
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
+ 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(
- RemoteApplicationResult.class, metaDataMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(RemoteApplicationResult.class, metaDataMap);
}
- public RemoteApplicationResult() {}
+ public RemoteApplicationResult() {
+ }
- public RemoteApplicationResult(boolean success, String msg) {
+ public RemoteApplicationResult(
+ boolean success,
+ String msg)
+ {
this();
this.success = success;
setSuccessIsSet(true);
this.msg = msg;
}
- /** Performs a deep copy on <i>other</i>. */
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
public RemoteApplicationResult(RemoteApplicationResult other) {
__isset_bitfield = other.__isset_bitfield;
this.success = other.success;
@@ -229,75 +226,81 @@ public class RemoteApplicationResult
public void setFieldValue(_Fields field, Object value) {
switch (field) {
- case SUCCESS:
- if (value == null) {
- unsetSuccess();
- } else {
- setSuccess((Boolean) value);
- }
- break;
+ case SUCCESS:
+ if (value == null) {
+ unsetSuccess();
+ } else {
+ setSuccess((Boolean)value);
+ }
+ break;
+
+ case MSG:
+ if (value == null) {
+ unsetMsg();
+ } else {
+ setMsg((String)value);
+ }
+ break;
- case MSG:
- if (value == null) {
- unsetMsg();
- } else {
- setMsg((String) value);
- }
- break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
- case SUCCESS:
- return Boolean.valueOf(isSuccess());
+ case SUCCESS:
+ return Boolean.valueOf(isSuccess());
+
+ case MSG:
+ return getMsg();
- case MSG:
- return getMsg();
}
throw new IllegalStateException();
}
- /**
- * Returns true if field corresponding to fieldID is set (has been assigned a value) and false
- * otherwise
- */
+ /** 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 SUCCESS:
- return isSetSuccess();
- case MSG:
- return isSetMsg();
+ case SUCCESS:
+ return isSetSuccess();
+ case MSG:
+ return isSetMsg();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
- if (that == null) return false;
- if (that instanceof RemoteApplicationResult) return this.equals((RemoteApplicationResult) that);
+ if (that == null)
+ return false;
+ if (that instanceof RemoteApplicationResult)
+ return this.equals((RemoteApplicationResult)that);
return false;
}
public boolean equals(RemoteApplicationResult that) {
- if (that == null) return false;
+ if (that == null)
+ return false;
boolean this_present_success = true;
boolean that_present_success = true;
if (this_present_success || that_present_success) {
- if (!(this_present_success && that_present_success)) return false;
- if (this.success != that.success) return false;
+ if (!(this_present_success && that_present_success))
+ return false;
+ if (this.success != that.success)
+ 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;
+ if (!(this_present_msg && that_present_msg))
+ return false;
+ if (!this.msg.equals(that.msg))
+ return false;
}
return true;
@@ -309,11 +312,13 @@ public class RemoteApplicationResult
boolean present_success = true;
list.add(present_success);
- if (present_success) list.add(success);
+ if (present_success)
+ list.add(success);
boolean present_msg = true && (isSetMsg());
list.add(present_msg);
- if (present_msg) list.add(msg);
+ if (present_msg)
+ list.add(msg);
return list.hashCode();
}
@@ -357,8 +362,7 @@ public class RemoteApplicationResult
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
- public void write(org.apache.thrift.protocol.TProtocol oprot)
- throws org.apache.thrift.TException {
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@@ -389,23 +393,17 @@ public class RemoteApplicationResult
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)));
+ 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 {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
- // it doesn't seem like you should have to do this, but java serialization is wacky, and
- // doesn't call the default constructor.
+ // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bitfield = 0;
- read(
- new org.apache.thrift.protocol.TCompactProtocol(
- new org.apache.thrift.transport.TIOStreamTransport(in)));
+ 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);
}
@@ -417,16 +415,15 @@ public class RemoteApplicationResult
}
}
- private static class RemoteApplicationResultStandardScheme
- extends StandardScheme<RemoteApplicationResult> {
+ private static class RemoteApplicationResultStandardScheme extends StandardScheme<RemoteApplicationResult> {
- public void read(org.apache.thrift.protocol.TProtocol iprot, RemoteApplicationResult struct)
- throws org.apache.thrift.TException {
+ public void read(org.apache.thrift.protocol.TProtocol iprot, RemoteApplicationResult struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
- while (true) {
+ while (true)
+ {
schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
@@ -434,7 +431,7 @@ public class RemoteApplicationResult
if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
struct.success = iprot.readBool();
struct.setSuccessIsSet(true);
- } else {
+ } else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
@@ -442,7 +439,7 @@ public class RemoteApplicationResult
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.msg = iprot.readString();
struct.setMsgIsSet(true);
- } else {
+ } else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
@@ -457,8 +454,7 @@ public class RemoteApplicationResult
struct.validate();
}
- public void write(org.apache.thrift.protocol.TProtocol oprot, RemoteApplicationResult struct)
- throws org.apache.thrift.TException {
+ public void write(org.apache.thrift.protocol.TProtocol oprot, RemoteApplicationResult struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
@@ -473,6 +469,7 @@ public class RemoteApplicationResult
oprot.writeFieldStop();
oprot.writeStructEnd();
}
+
}
private static class RemoteApplicationResultTupleSchemeFactory implements SchemeFactory {
@@ -481,12 +478,10 @@ public class RemoteApplicationResult
}
}
- private static class RemoteApplicationResultTupleScheme
- extends TupleScheme<RemoteApplicationResult> {
+ private static class RemoteApplicationResultTupleScheme extends TupleScheme<RemoteApplicationResult> {
@Override
- public void write(org.apache.thrift.protocol.TProtocol prot, RemoteApplicationResult struct)
- throws org.apache.thrift.TException {
+ public void write(org.apache.thrift.protocol.TProtocol prot, RemoteApplicationResult struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetSuccess()) {
@@ -505,8 +500,7 @@ public class RemoteApplicationResult
}
@Override
- public void read(org.apache.thrift.protocol.TProtocol prot, RemoteApplicationResult struct)
- throws org.apache.thrift.TException {
+ public void read(org.apache.thrift.protocol.TProtocol prot, RemoteApplicationResult struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
@@ -519,4 +513,6 @@ public class RemoteApplicationResult
}
}
}
+
}
+