http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/AppOutputUpdateEvent.java ---------------------------------------------------------------------- diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/AppOutputUpdateEvent.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/AppOutputUpdateEvent.java index 21de67e..a37f828 100644 --- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/AppOutputUpdateEvent.java +++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/AppOutputUpdateEvent.java @@ -1,75 +1,68 @@ /** - * 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 AppOutputUpdateEvent - implements org.apache.thrift.TBase<AppOutputUpdateEvent, AppOutputUpdateEvent._Fields>, - java.io.Serializable, - Cloneable, - Comparable<AppOutputUpdateEvent> { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = - new org.apache.thrift.protocol.TStruct("AppOutputUpdateEvent"); - - 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 APP_ID_FIELD_DESC = - new org.apache.thrift.protocol.TField( - "appId", org.apache.thrift.protocol.TType.STRING, (short) 3); - private static final org.apache.thrift.protocol.TField INDEX_FIELD_DESC = - new org.apache.thrift.protocol.TField( - "index", org.apache.thrift.protocol.TType.I32, (short) 4); - private static final org.apache.thrift.protocol.TField TYPE_FIELD_DESC = - new org.apache.thrift.protocol.TField( - "type", org.apache.thrift.protocol.TType.STRING, (short) 5); - private static final org.apache.thrift.protocol.TField DATA_FIELD_DESC = - new org.apache.thrift.protocol.TField( - "data", org.apache.thrift.protocol.TType.STRING, (short) 6); - - private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = - new HashMap<Class<? extends IScheme>, SchemeFactory>(); +public class AppOutputUpdateEvent implements org.apache.thrift.TBase<AppOutputUpdateEvent, AppOutputUpdateEvent._Fields>, java.io.Serializable, Cloneable, Comparable<AppOutputUpdateEvent> { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("AppOutputUpdateEvent"); + + 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 APP_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("appId", org.apache.thrift.protocol.TType.STRING, (short)3); + private static final org.apache.thrift.protocol.TField INDEX_FIELD_DESC = new org.apache.thrift.protocol.TField("index", org.apache.thrift.protocol.TType.I32, (short)4); + private static final org.apache.thrift.protocol.TField TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("type", org.apache.thrift.protocol.TType.STRING, (short)5); + private static final org.apache.thrift.protocol.TField DATA_FIELD_DESC = new org.apache.thrift.protocol.TField("data", org.apache.thrift.protocol.TType.STRING, (short)6); + private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new AppOutputUpdateEventStandardSchemeFactory()); schemes.put(TupleScheme.class, new AppOutputUpdateEventTupleSchemeFactory()); @@ -82,17 +75,14 @@ public class AppOutputUpdateEvent public String type; // required public String data; // 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 { - NOTE_ID((short) 1, "noteId"), - PARAGRAPH_ID((short) 2, "paragraphId"), - APP_ID((short) 3, "appId"), - INDEX((short) 4, "index"), - TYPE((short) 5, "type"), - DATA((short) 6, "data"); + NOTE_ID((short)1, "noteId"), + PARAGRAPH_ID((short)2, "paragraphId"), + APP_ID((short)3, "appId"), + INDEX((short)4, "index"), + TYPE((short)5, "type"), + DATA((short)6, "data"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); @@ -102,9 +92,11 @@ public class AppOutputUpdateEvent } } - /** 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: // NOTE_ID return NOTE_ID; case 2: // PARAGRAPH_ID @@ -122,15 +114,19 @@ public class AppOutputUpdateEvent } } - /** 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); } @@ -156,61 +152,35 @@ public class AppOutputUpdateEvent private static final int __INDEX_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.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.APP_ID, - new org.apache.thrift.meta_data.FieldMetaData( - "appId", - org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData( - org.apache.thrift.protocol.TType.STRING))); - tmpMap.put( - _Fields.INDEX, - new org.apache.thrift.meta_data.FieldMetaData( - "index", - org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData( - org.apache.thrift.protocol.TType.I32))); - tmpMap.put( - _Fields.TYPE, - new org.apache.thrift.meta_data.FieldMetaData( - "type", - org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData( - org.apache.thrift.protocol.TType.STRING))); - tmpMap.put( - _Fields.DATA, - new org.apache.thrift.meta_data.FieldMetaData( - "data", - 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.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.APP_ID, new org.apache.thrift.meta_data.FieldMetaData("appId", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.INDEX, new org.apache.thrift.meta_data.FieldMetaData("index", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.DATA, new org.apache.thrift.meta_data.FieldMetaData("data", 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( - AppOutputUpdateEvent.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(AppOutputUpdateEvent.class, metaDataMap); } - public AppOutputUpdateEvent() {} + public AppOutputUpdateEvent() { + } public AppOutputUpdateEvent( - String noteId, String paragraphId, String appId, int index, String type, String data) { + String noteId, + String paragraphId, + String appId, + int index, + String type, + String data) + { this(); this.noteId = noteId; this.paragraphId = paragraphId; @@ -221,7 +191,9 @@ public class AppOutputUpdateEvent this.data = data; } - /** Performs a deep copy on <i>other</i>. */ + /** + * Performs a deep copy on <i>other</i>. + */ public AppOutputUpdateEvent(AppOutputUpdateEvent other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetNoteId()) { @@ -402,155 +374,169 @@ public class AppOutputUpdateEvent public void setFieldValue(_Fields field, Object value) { switch (field) { - case NOTE_ID: - if (value == null) { - unsetNoteId(); - } else { - setNoteId((String) value); - } - break; + 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 PARAGRAPH_ID: + if (value == null) { + unsetParagraphId(); + } else { + setParagraphId((String)value); + } + break; - case APP_ID: - if (value == null) { - unsetAppId(); - } else { - setAppId((String) value); - } - break; + case APP_ID: + if (value == null) { + unsetAppId(); + } else { + setAppId((String)value); + } + break; - case INDEX: - if (value == null) { - unsetIndex(); - } else { - setIndex((Integer) value); - } - break; + case INDEX: + if (value == null) { + unsetIndex(); + } else { + setIndex((Integer)value); + } + break; - case TYPE: - if (value == null) { - unsetType(); - } else { - setType((String) value); - } - break; + case TYPE: + if (value == null) { + unsetType(); + } else { + setType((String)value); + } + break; + + case DATA: + if (value == null) { + unsetData(); + } else { + setData((String)value); + } + break; - case DATA: - if (value == null) { - unsetData(); - } else { - setData((String) value); - } - break; } } public Object getFieldValue(_Fields field) { switch (field) { - case NOTE_ID: - return getNoteId(); + case NOTE_ID: + return getNoteId(); - case PARAGRAPH_ID: - return getParagraphId(); + case PARAGRAPH_ID: + return getParagraphId(); - case APP_ID: - return getAppId(); + case APP_ID: + return getAppId(); - case INDEX: - return Integer.valueOf(getIndex()); + case INDEX: + return Integer.valueOf(getIndex()); - case TYPE: - return getType(); + case TYPE: + return getType(); + + case DATA: + return getData(); - case DATA: - return getData(); } 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 NOTE_ID: - return isSetNoteId(); - case PARAGRAPH_ID: - return isSetParagraphId(); - case APP_ID: - return isSetAppId(); - case INDEX: - return isSetIndex(); - case TYPE: - return isSetType(); - case DATA: - return isSetData(); + case NOTE_ID: + return isSetNoteId(); + case PARAGRAPH_ID: + return isSetParagraphId(); + case APP_ID: + return isSetAppId(); + case INDEX: + return isSetIndex(); + case TYPE: + return isSetType(); + case DATA: + return isSetData(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { - if (that == null) return false; - if (that instanceof AppOutputUpdateEvent) return this.equals((AppOutputUpdateEvent) that); + if (that == null) + return false; + if (that instanceof AppOutputUpdateEvent) + return this.equals((AppOutputUpdateEvent)that); return false; } public boolean equals(AppOutputUpdateEvent that) { - if (that == null) return false; + 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; + 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; + if (!(this_present_paragraphId && that_present_paragraphId)) + return false; + if (!this.paragraphId.equals(that.paragraphId)) + return false; } boolean this_present_appId = true && this.isSetAppId(); boolean that_present_appId = true && that.isSetAppId(); if (this_present_appId || that_present_appId) { - if (!(this_present_appId && that_present_appId)) return false; - if (!this.appId.equals(that.appId)) return false; + if (!(this_present_appId && that_present_appId)) + return false; + if (!this.appId.equals(that.appId)) + return false; } boolean this_present_index = true; boolean that_present_index = true; if (this_present_index || that_present_index) { - if (!(this_present_index && that_present_index)) return false; - if (this.index != that.index) return false; + if (!(this_present_index && that_present_index)) + return false; + if (this.index != that.index) + 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; + if (!(this_present_type && that_present_type)) + return false; + if (!this.type.equals(that.type)) + return false; } boolean this_present_data = true && this.isSetData(); boolean that_present_data = true && that.isSetData(); if (this_present_data || that_present_data) { - if (!(this_present_data && that_present_data)) return false; - if (!this.data.equals(that.data)) return false; + if (!(this_present_data && that_present_data)) + return false; + if (!this.data.equals(that.data)) + return false; } return true; @@ -562,27 +548,33 @@ public class AppOutputUpdateEvent boolean present_noteId = true && (isSetNoteId()); list.add(present_noteId); - if (present_noteId) list.add(noteId); + if (present_noteId) + list.add(noteId); boolean present_paragraphId = true && (isSetParagraphId()); list.add(present_paragraphId); - if (present_paragraphId) list.add(paragraphId); + if (present_paragraphId) + list.add(paragraphId); boolean present_appId = true && (isSetAppId()); list.add(present_appId); - if (present_appId) list.add(appId); + if (present_appId) + list.add(appId); boolean present_index = true; list.add(present_index); - if (present_index) list.add(index); + if (present_index) + list.add(index); boolean present_type = true && (isSetType()); list.add(present_type); - if (present_type) list.add(type); + if (present_type) + list.add(type); boolean present_data = true && (isSetData()); list.add(present_data); - if (present_data) list.add(data); + if (present_data) + list.add(data); return list.hashCode(); } @@ -666,8 +658,7 @@ public class AppOutputUpdateEvent 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); } @@ -730,23 +721,17 @@ public class AppOutputUpdateEvent 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); } @@ -758,16 +743,15 @@ public class AppOutputUpdateEvent } } - private static class AppOutputUpdateEventStandardScheme - extends StandardScheme<AppOutputUpdateEvent> { + private static class AppOutputUpdateEventStandardScheme extends StandardScheme<AppOutputUpdateEvent> { - public void read(org.apache.thrift.protocol.TProtocol iprot, AppOutputUpdateEvent struct) - throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, AppOutputUpdateEvent 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) { @@ -775,7 +759,7 @@ public class AppOutputUpdateEvent if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.noteId = iprot.readString(); struct.setNoteIdIsSet(true); - } else { + } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; @@ -783,7 +767,7 @@ public class AppOutputUpdateEvent if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.paragraphId = iprot.readString(); struct.setParagraphIdIsSet(true); - } else { + } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; @@ -791,7 +775,7 @@ public class AppOutputUpdateEvent if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.appId = iprot.readString(); struct.setAppIdIsSet(true); - } else { + } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; @@ -799,7 +783,7 @@ public class AppOutputUpdateEvent if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.index = iprot.readI32(); struct.setIndexIsSet(true); - } else { + } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; @@ -807,7 +791,7 @@ public class AppOutputUpdateEvent if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.type = iprot.readString(); struct.setTypeIsSet(true); - } else { + } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; @@ -815,7 +799,7 @@ public class AppOutputUpdateEvent if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.data = iprot.readString(); struct.setDataIsSet(true); - } else { + } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; @@ -830,8 +814,7 @@ public class AppOutputUpdateEvent struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, AppOutputUpdateEvent struct) - throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, AppOutputUpdateEvent struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); @@ -866,6 +849,7 @@ public class AppOutputUpdateEvent oprot.writeFieldStop(); oprot.writeStructEnd(); } + } private static class AppOutputUpdateEventTupleSchemeFactory implements SchemeFactory { @@ -877,8 +861,7 @@ public class AppOutputUpdateEvent private static class AppOutputUpdateEventTupleScheme extends TupleScheme<AppOutputUpdateEvent> { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, AppOutputUpdateEvent struct) - throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, AppOutputUpdateEvent struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetNoteId()) { @@ -921,8 +904,7 @@ public class AppOutputUpdateEvent } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, AppOutputUpdateEvent struct) - throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, AppOutputUpdateEvent struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(6); if (incoming.get(0)) { @@ -951,4 +933,6 @@ public class AppOutputUpdateEvent } } } + } +
http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/AppStatusUpdateEvent.java ---------------------------------------------------------------------- diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/AppStatusUpdateEvent.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/AppStatusUpdateEvent.java index 1e7dcb4..5923dcc 100644 --- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/AppStatusUpdateEvent.java +++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/AppStatusUpdateEvent.java @@ -1,68 +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 * - * <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.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 AppStatusUpdateEvent - implements org.apache.thrift.TBase<AppStatusUpdateEvent, AppStatusUpdateEvent._Fields>, - java.io.Serializable, - Cloneable, - Comparable<AppStatusUpdateEvent> { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = - new org.apache.thrift.protocol.TStruct("AppStatusUpdateEvent"); - - 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 APP_ID_FIELD_DESC = - new org.apache.thrift.protocol.TField( - "appId", org.apache.thrift.protocol.TType.STRING, (short) 3); - private static final org.apache.thrift.protocol.TField STATUS_FIELD_DESC = - new org.apache.thrift.protocol.TField( - "status", org.apache.thrift.protocol.TType.STRING, (short) 4); - - private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = - new HashMap<Class<? extends IScheme>, SchemeFactory>(); +public class AppStatusUpdateEvent implements org.apache.thrift.TBase<AppStatusUpdateEvent, AppStatusUpdateEvent._Fields>, java.io.Serializable, Cloneable, Comparable<AppStatusUpdateEvent> { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("AppStatusUpdateEvent"); + 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 APP_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("appId", org.apache.thrift.protocol.TType.STRING, (short)3); + private static final org.apache.thrift.protocol.TField STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("status", org.apache.thrift.protocol.TType.STRING, (short)4); + + private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new AppStatusUpdateEventStandardSchemeFactory()); schemes.put(TupleScheme.class, new AppStatusUpdateEventTupleSchemeFactory()); @@ -73,15 +71,12 @@ public class AppStatusUpdateEvent public String appId; // required public String status; // 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 { - NOTE_ID((short) 1, "noteId"), - PARAGRAPH_ID((short) 2, "paragraphId"), - APP_ID((short) 3, "appId"), - STATUS((short) 4, "status"); + NOTE_ID((short)1, "noteId"), + PARAGRAPH_ID((short)2, "paragraphId"), + APP_ID((short)3, "appId"), + STATUS((short)4, "status"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); @@ -91,9 +86,11 @@ public class AppStatusUpdateEvent } } - /** 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: // NOTE_ID return NOTE_ID; case 2: // PARAGRAPH_ID @@ -107,15 +104,19 @@ public class AppStatusUpdateEvent } } - /** 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); } @@ -139,46 +140,29 @@ public class AppStatusUpdateEvent // 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.APP_ID, - new org.apache.thrift.meta_data.FieldMetaData( - "appId", - org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData( - org.apache.thrift.protocol.TType.STRING))); - tmpMap.put( - _Fields.STATUS, - new org.apache.thrift.meta_data.FieldMetaData( - "status", - 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.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.APP_ID, new org.apache.thrift.meta_data.FieldMetaData("appId", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.STATUS, new org.apache.thrift.meta_data.FieldMetaData("status", 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( - AppStatusUpdateEvent.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(AppStatusUpdateEvent.class, metaDataMap); } - public AppStatusUpdateEvent() {} + public AppStatusUpdateEvent() { + } - public AppStatusUpdateEvent(String noteId, String paragraphId, String appId, String status) { + public AppStatusUpdateEvent( + String noteId, + String paragraphId, + String appId, + String status) + { this(); this.noteId = noteId; this.paragraphId = paragraphId; @@ -186,7 +170,9 @@ public class AppStatusUpdateEvent this.status = status; } - /** Performs a deep copy on <i>other</i>. */ + /** + * Performs a deep copy on <i>other</i>. + */ public AppStatusUpdateEvent(AppStatusUpdateEvent other) { if (other.isSetNoteId()) { this.noteId = other.noteId; @@ -312,115 +298,125 @@ public class AppStatusUpdateEvent public void setFieldValue(_Fields field, Object value) { switch (field) { - case NOTE_ID: - if (value == null) { - unsetNoteId(); - } else { - setNoteId((String) value); - } - break; + 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 PARAGRAPH_ID: + if (value == null) { + unsetParagraphId(); + } else { + setParagraphId((String)value); + } + break; - case APP_ID: - if (value == null) { - unsetAppId(); - } else { - setAppId((String) value); - } - break; + case APP_ID: + if (value == null) { + unsetAppId(); + } else { + setAppId((String)value); + } + break; + + case STATUS: + if (value == null) { + unsetStatus(); + } else { + setStatus((String)value); + } + break; - case STATUS: - if (value == null) { - unsetStatus(); - } else { - setStatus((String) value); - } - break; } } public Object getFieldValue(_Fields field) { switch (field) { - case NOTE_ID: - return getNoteId(); + case NOTE_ID: + return getNoteId(); + + case PARAGRAPH_ID: + return getParagraphId(); - case PARAGRAPH_ID: - return getParagraphId(); + case APP_ID: + return getAppId(); - case APP_ID: - return getAppId(); + case STATUS: + return getStatus(); - case STATUS: - return getStatus(); } 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 NOTE_ID: - return isSetNoteId(); - case PARAGRAPH_ID: - return isSetParagraphId(); - case APP_ID: - return isSetAppId(); - case STATUS: - return isSetStatus(); + case NOTE_ID: + return isSetNoteId(); + case PARAGRAPH_ID: + return isSetParagraphId(); + case APP_ID: + return isSetAppId(); + case STATUS: + return isSetStatus(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { - if (that == null) return false; - if (that instanceof AppStatusUpdateEvent) return this.equals((AppStatusUpdateEvent) that); + if (that == null) + return false; + if (that instanceof AppStatusUpdateEvent) + return this.equals((AppStatusUpdateEvent)that); return false; } public boolean equals(AppStatusUpdateEvent that) { - if (that == null) return false; + 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; + 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; + if (!(this_present_paragraphId && that_present_paragraphId)) + return false; + if (!this.paragraphId.equals(that.paragraphId)) + return false; } boolean this_present_appId = true && this.isSetAppId(); boolean that_present_appId = true && that.isSetAppId(); if (this_present_appId || that_present_appId) { - if (!(this_present_appId && that_present_appId)) return false; - if (!this.appId.equals(that.appId)) return false; + if (!(this_present_appId && that_present_appId)) + return false; + if (!this.appId.equals(that.appId)) + return false; } boolean this_present_status = true && this.isSetStatus(); boolean that_present_status = true && that.isSetStatus(); if (this_present_status || that_present_status) { - if (!(this_present_status && that_present_status)) return false; - if (!this.status.equals(that.status)) return false; + if (!(this_present_status && that_present_status)) + return false; + if (!this.status.equals(that.status)) + return false; } return true; @@ -432,19 +428,23 @@ public class AppStatusUpdateEvent boolean present_noteId = true && (isSetNoteId()); list.add(present_noteId); - if (present_noteId) list.add(noteId); + if (present_noteId) + list.add(noteId); boolean present_paragraphId = true && (isSetParagraphId()); list.add(present_paragraphId); - if (present_paragraphId) list.add(paragraphId); + if (present_paragraphId) + list.add(paragraphId); boolean present_appId = true && (isSetAppId()); list.add(present_appId); - if (present_appId) list.add(appId); + if (present_appId) + list.add(appId); boolean present_status = true && (isSetStatus()); list.add(present_status); - if (present_status) list.add(status); + if (present_status) + list.add(status); return list.hashCode(); } @@ -508,8 +508,7 @@ public class AppStatusUpdateEvent 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); } @@ -560,20 +559,15 @@ public class AppStatusUpdateEvent 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 { - 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); } @@ -585,16 +579,15 @@ public class AppStatusUpdateEvent } } - private static class AppStatusUpdateEventStandardScheme - extends StandardScheme<AppStatusUpdateEvent> { + private static class AppStatusUpdateEventStandardScheme extends StandardScheme<AppStatusUpdateEvent> { - public void read(org.apache.thrift.protocol.TProtocol iprot, AppStatusUpdateEvent struct) - throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, AppStatusUpdateEvent 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) { @@ -602,7 +595,7 @@ public class AppStatusUpdateEvent if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.noteId = iprot.readString(); struct.setNoteIdIsSet(true); - } else { + } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; @@ -610,7 +603,7 @@ public class AppStatusUpdateEvent if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.paragraphId = iprot.readString(); struct.setParagraphIdIsSet(true); - } else { + } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; @@ -618,7 +611,7 @@ public class AppStatusUpdateEvent if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.appId = iprot.readString(); struct.setAppIdIsSet(true); - } else { + } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; @@ -626,7 +619,7 @@ public class AppStatusUpdateEvent if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.status = iprot.readString(); struct.setStatusIsSet(true); - } else { + } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; @@ -641,8 +634,7 @@ public class AppStatusUpdateEvent struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, AppStatusUpdateEvent struct) - throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, AppStatusUpdateEvent struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); @@ -669,6 +661,7 @@ public class AppStatusUpdateEvent oprot.writeFieldStop(); oprot.writeStructEnd(); } + } private static class AppStatusUpdateEventTupleSchemeFactory implements SchemeFactory { @@ -680,8 +673,7 @@ public class AppStatusUpdateEvent private static class AppStatusUpdateEventTupleScheme extends TupleScheme<AppStatusUpdateEvent> { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, AppStatusUpdateEvent struct) - throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, AppStatusUpdateEvent struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetNoteId()) { @@ -712,8 +704,7 @@ public class AppStatusUpdateEvent } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, AppStatusUpdateEvent struct) - throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, AppStatusUpdateEvent struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(4); if (incoming.get(0)) { @@ -734,4 +725,6 @@ public class AppStatusUpdateEvent } } } + } + http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/InterpreterCompletion.java ---------------------------------------------------------------------- diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/InterpreterCompletion.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/InterpreterCompletion.java index 4a989e1..68caf43 100644 --- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/InterpreterCompletion.java +++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/InterpreterCompletion.java @@ -1,65 +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.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 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"); - - private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = - new org.apache.thrift.protocol.TField( - "name", org.apache.thrift.protocol.TType.STRING, (short) 1); - private static final org.apache.thrift.protocol.TField VALUE_FIELD_DESC = - new org.apache.thrift.protocol.TField( - "value", org.apache.thrift.protocol.TType.STRING, (short) 2); - private static final org.apache.thrift.protocol.TField META_FIELD_DESC = - new org.apache.thrift.protocol.TField( - "meta", 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 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"); + + private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("value", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField META_FIELD_DESC = new org.apache.thrift.protocol.TField("meta", 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 InterpreterCompletionStandardSchemeFactory()); schemes.put(TupleScheme.class, new InterpreterCompletionTupleSchemeFactory()); @@ -69,14 +69,11 @@ public class InterpreterCompletion public String value; // required public String meta; // 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 { - NAME((short) 1, "name"), - VALUE((short) 2, "value"), - META((short) 3, "meta"); + NAME((short)1, "name"), + VALUE((short)2, "value"), + META((short)3, "meta"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); @@ -86,9 +83,11 @@ public class InterpreterCompletion } } - /** 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: // NAME return NAME; case 2: // VALUE @@ -100,15 +99,19 @@ public class InterpreterCompletion } } - /** 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,46 +135,35 @@ public class InterpreterCompletion // 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.NAME, - new org.apache.thrift.meta_data.FieldMetaData( - "name", - org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData( - org.apache.thrift.protocol.TType.STRING))); - tmpMap.put( - _Fields.VALUE, - new org.apache.thrift.meta_data.FieldMetaData( - "value", - org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData( - org.apache.thrift.protocol.TType.STRING))); - tmpMap.put( - _Fields.META, - new org.apache.thrift.meta_data.FieldMetaData( - "meta", - 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.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.VALUE, new org.apache.thrift.meta_data.FieldMetaData("value", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.META, new org.apache.thrift.meta_data.FieldMetaData("meta", 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( - InterpreterCompletion.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(InterpreterCompletion.class, metaDataMap); } - public InterpreterCompletion() {} + public InterpreterCompletion() { + } - public InterpreterCompletion(String name, String value, String meta) { + public InterpreterCompletion( + String name, + String value, + String meta) + { this(); this.name = name; this.value = value; this.meta = meta; } - /** Performs a deep copy on <i>other</i>. */ + /** + * Performs a deep copy on <i>other</i>. + */ public InterpreterCompletion(InterpreterCompletion other) { if (other.isSetName()) { this.name = other.name; @@ -269,95 +261,103 @@ public class InterpreterCompletion public void setFieldValue(_Fields field, Object value) { switch (field) { - case NAME: - if (value == null) { - unsetName(); - } else { - setName((String) value); - } - break; + case NAME: + if (value == null) { + unsetName(); + } else { + setName((String)value); + } + break; - case VALUE: - if (value == null) { - unsetValue(); - } else { - setValue((String) value); - } - break; + case VALUE: + if (value == null) { + unsetValue(); + } else { + setValue((String)value); + } + break; + + case META: + if (value == null) { + unsetMeta(); + } else { + setMeta((String)value); + } + break; - case META: - if (value == null) { - unsetMeta(); - } else { - setMeta((String) value); - } - break; } } public Object getFieldValue(_Fields field) { switch (field) { - case NAME: - return getName(); + case NAME: + return getName(); + + case VALUE: + return getValue(); - case VALUE: - return getValue(); + case META: + return getMeta(); - case META: - return getMeta(); } 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 NAME: - return isSetName(); - case VALUE: - return isSetValue(); - case META: - return isSetMeta(); + case NAME: + return isSetName(); + case VALUE: + return isSetValue(); + case META: + return isSetMeta(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { - if (that == null) return false; - if (that instanceof InterpreterCompletion) return this.equals((InterpreterCompletion) that); + if (that == null) + return false; + if (that instanceof InterpreterCompletion) + return this.equals((InterpreterCompletion)that); return false; } public boolean equals(InterpreterCompletion that) { - if (that == null) return false; + if (that == null) + return false; boolean this_present_name = true && this.isSetName(); boolean that_present_name = true && that.isSetName(); if (this_present_name || that_present_name) { - if (!(this_present_name && that_present_name)) return false; - if (!this.name.equals(that.name)) return false; + if (!(this_present_name && that_present_name)) + return false; + if (!this.name.equals(that.name)) + return false; } boolean this_present_value = true && this.isSetValue(); boolean that_present_value = true && that.isSetValue(); if (this_present_value || that_present_value) { - if (!(this_present_value && that_present_value)) return false; - if (!this.value.equals(that.value)) return false; + if (!(this_present_value && that_present_value)) + return false; + if (!this.value.equals(that.value)) + return false; } boolean this_present_meta = true && this.isSetMeta(); boolean that_present_meta = true && that.isSetMeta(); if (this_present_meta || that_present_meta) { - if (!(this_present_meta && that_present_meta)) return false; - if (!this.meta.equals(that.meta)) return false; + if (!(this_present_meta && that_present_meta)) + return false; + if (!this.meta.equals(that.meta)) + return false; } return true; @@ -369,15 +369,18 @@ public class InterpreterCompletion boolean present_name = true && (isSetName()); list.add(present_name); - if (present_name) list.add(name); + if (present_name) + list.add(name); boolean present_value = true && (isSetValue()); list.add(present_value); - if (present_value) list.add(value); + if (present_value) + list.add(value); boolean present_meta = true && (isSetMeta()); list.add(present_meta); - if (present_meta) list.add(meta); + if (present_meta) + list.add(meta); return list.hashCode(); } @@ -431,8 +434,7 @@ public class InterpreterCompletion 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,20 +477,15 @@ public class InterpreterCompletion 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 { - 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); } @@ -500,16 +497,15 @@ public class InterpreterCompletion } } - private static class InterpreterCompletionStandardScheme - extends StandardScheme<InterpreterCompletion> { + private static class InterpreterCompletionStandardScheme extends StandardScheme<InterpreterCompletion> { - public void read(org.apache.thrift.protocol.TProtocol iprot, InterpreterCompletion struct) - throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, InterpreterCompletion 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) { @@ -517,7 +513,7 @@ public class InterpreterCompletion if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.name = iprot.readString(); struct.setNameIsSet(true); - } else { + } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; @@ -525,7 +521,7 @@ public class InterpreterCompletion if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.value = iprot.readString(); struct.setValueIsSet(true); - } else { + } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; @@ -533,7 +529,7 @@ public class InterpreterCompletion if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.meta = iprot.readString(); struct.setMetaIsSet(true); - } else { + } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; @@ -548,8 +544,7 @@ public class InterpreterCompletion struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, InterpreterCompletion struct) - throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, InterpreterCompletion struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); @@ -571,6 +566,7 @@ public class InterpreterCompletion oprot.writeFieldStop(); oprot.writeStructEnd(); } + } private static class InterpreterCompletionTupleSchemeFactory implements SchemeFactory { @@ -582,8 +578,7 @@ public class InterpreterCompletion private static class InterpreterCompletionTupleScheme extends TupleScheme<InterpreterCompletion> { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, InterpreterCompletion struct) - throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, InterpreterCompletion struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetName()) { @@ -608,8 +603,7 @@ public class InterpreterCompletion } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, InterpreterCompletion struct) - throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, InterpreterCompletion struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { @@ -626,4 +620,6 @@ public class InterpreterCompletion } } } + } +
