http://git-wip-us.apache.org/repos/asf/zeppelin/blob/55f6c91c/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 324b7c2..3b4acf2 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,65 +1,66 @@ /** - * 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 * - * http://www.apache.org/licenses/LICENSE-2.0 + * <p>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 + * <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 * 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 + * <p>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); +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>(); - 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()); @@ -69,11 +70,14 @@ public class RegisterInfo implements org.apache.thrift.TBase<RegisterInfo, Regis 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>(); @@ -83,11 +87,9 @@ public class RegisterInfo implements org.apache.thrift.TBase<RegisterInfo, Regis } } - /** - * 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 @@ -99,19 +101,15 @@ public class RegisterInfo implements org.apache.thrift.TBase<RegisterInfo, Regis } } - /** - * 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); } @@ -137,26 +135,38 @@ public class RegisterInfo implements org.apache.thrift.TBase<RegisterInfo, Regis 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; @@ -164,9 +174,7 @@ public class RegisterInfo implements org.apache.thrift.TBase<RegisterInfo, Regis 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()) { @@ -250,7 +258,9 @@ public class RegisterInfo implements org.apache.thrift.TBase<RegisterInfo, Regis 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; } @@ -263,103 +273,95 @@ public class RegisterInfo implements org.apache.thrift.TBase<RegisterInfo, Regis public void setFieldValue(_Fields field, Object value) { switch (field) { - case HOST: - if (value == null) { - unsetHost(); - } else { - setHost((String)value); - } - break; - - case PORT: - if (value == null) { - unsetPort(); - } else { - setPort((Integer)value); - } - break; + case HOST: + if (value == null) { + unsetHost(); + } else { + setHost((String) value); + } + break; - case INTERPRETER_GROUP_ID: - if (value == null) { - unsetInterpreterGroupId(); - } else { - setInterpreterGroupId((String)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; } } public Object getFieldValue(_Fields field) { switch (field) { - case HOST: - return getHost(); - - case PORT: - return Integer.valueOf(getPort()); + case HOST: + return getHost(); - case INTERPRETER_GROUP_ID: - return getInterpreterGroupId(); + case PORT: + return Integer.valueOf(getPort()); + 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; @@ -371,18 +373,15 @@ public class RegisterInfo implements org.apache.thrift.TBase<RegisterInfo, Regis 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(); } @@ -415,12 +414,15 @@ public class RegisterInfo implements org.apache.thrift.TBase<RegisterInfo, Regis 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; } @@ -436,7 +438,8 @@ public class RegisterInfo implements org.apache.thrift.TBase<RegisterInfo, Regis 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); } @@ -475,17 +478,23 @@ public class RegisterInfo implements org.apache.thrift.TBase<RegisterInfo, Regis 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); } @@ -499,13 +508,13 @@ public class RegisterInfo implements org.apache.thrift.TBase<RegisterInfo, Regis 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) { @@ -513,7 +522,7 @@ public class RegisterInfo implements org.apache.thrift.TBase<RegisterInfo, Regis 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; @@ -521,7 +530,7 @@ public class RegisterInfo implements org.apache.thrift.TBase<RegisterInfo, Regis 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; @@ -529,7 +538,7 @@ public class RegisterInfo implements org.apache.thrift.TBase<RegisterInfo, Regis 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; @@ -544,7 +553,8 @@ public class RegisterInfo implements org.apache.thrift.TBase<RegisterInfo, Regis 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); @@ -564,7 +574,6 @@ public class RegisterInfo implements org.apache.thrift.TBase<RegisterInfo, Regis oprot.writeFieldStop(); oprot.writeStructEnd(); } - } private static class RegisterInfoTupleSchemeFactory implements SchemeFactory { @@ -576,7 +585,8 @@ public class RegisterInfo implements org.apache.thrift.TBase<RegisterInfo, Regis 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()) { @@ -601,7 +611,8 @@ public class RegisterInfo implements org.apache.thrift.TBase<RegisterInfo, Regis } @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)) { @@ -618,6 +629,4 @@ public class RegisterInfo implements org.apache.thrift.TBase<RegisterInfo, Regis } } } - } -
http://git-wip-us.apache.org/repos/asf/zeppelin/blob/55f6c91c/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 4d2bdb4..423bb12 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,64 +1,63 @@ /** - * 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 * - * http://www.apache.org/licenses/LICENSE-2.0 + * <p>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 + * <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 * 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 + * <p>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"); +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>(); - 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()); @@ -67,10 +66,13 @@ public class RemoteApplicationResult implements org.apache.thrift.TBase<RemoteAp 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>(); @@ -80,11 +82,9 @@ public class RemoteApplicationResult implements org.apache.thrift.TBase<RemoteAp } } - /** - * 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,19 +94,15 @@ public class RemoteApplicationResult implements org.apache.thrift.TBase<RemoteAp } } - /** - * 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); } @@ -132,32 +128,39 @@ public class RemoteApplicationResult implements org.apache.thrift.TBase<RemoteAp 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; @@ -226,81 +229,75 @@ public class RemoteApplicationResult implements org.apache.thrift.TBase<RemoteAp public void setFieldValue(_Fields field, Object value) { switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((Boolean)value); - } - break; - - case MSG: - if (value == null) { - unsetMsg(); - } else { - setMsg((String)value); - } - break; + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Boolean) 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 MSG: - return getMsg(); + case SUCCESS: + return Boolean.valueOf(isSuccess()); + 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; @@ -312,13 +309,11 @@ public class RemoteApplicationResult implements org.apache.thrift.TBase<RemoteAp 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(); } @@ -362,7 +357,8 @@ public class RemoteApplicationResult implements org.apache.thrift.TBase<RemoteAp 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); } @@ -393,17 +389,23 @@ public class RemoteApplicationResult implements org.apache.thrift.TBase<RemoteAp 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); } @@ -415,15 +417,16 @@ public class RemoteApplicationResult implements org.apache.thrift.TBase<RemoteAp } } - 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) { @@ -431,7 +434,7 @@ public class RemoteApplicationResult implements org.apache.thrift.TBase<RemoteAp 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; @@ -439,7 +442,7 @@ public class RemoteApplicationResult implements org.apache.thrift.TBase<RemoteAp 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; @@ -454,7 +457,8 @@ public class RemoteApplicationResult implements org.apache.thrift.TBase<RemoteAp 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); @@ -469,7 +473,6 @@ public class RemoteApplicationResult implements org.apache.thrift.TBase<RemoteAp oprot.writeFieldStop(); oprot.writeStructEnd(); } - } private static class RemoteApplicationResultTupleSchemeFactory implements SchemeFactory { @@ -478,10 +481,12 @@ public class RemoteApplicationResult implements org.apache.thrift.TBase<RemoteAp } } - 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()) { @@ -500,7 +505,8 @@ public class RemoteApplicationResult implements org.apache.thrift.TBase<RemoteAp } @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)) { @@ -513,6 +519,4 @@ public class RemoteApplicationResult implements org.apache.thrift.TBase<RemoteAp } } } - } -
