http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/OutputAppendEvent.java ---------------------------------------------------------------------- diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/OutputAppendEvent.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/OutputAppendEvent.java index bbbdb94..ec175e0 100644 --- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/OutputAppendEvent.java +++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/OutputAppendEvent.java @@ -1,72 +1,67 @@ /** - * 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 OutputAppendEvent - implements org.apache.thrift.TBase<OutputAppendEvent, OutputAppendEvent._Fields>, - java.io.Serializable, - Cloneable, - Comparable<OutputAppendEvent> { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = - new org.apache.thrift.protocol.TStruct("OutputAppendEvent"); - - 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 INDEX_FIELD_DESC = - new org.apache.thrift.protocol.TField( - "index", org.apache.thrift.protocol.TType.I32, (short) 3); - 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) 4); - 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) 5); - - private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = - new HashMap<Class<? extends IScheme>, SchemeFactory>(); +public class OutputAppendEvent implements org.apache.thrift.TBase<OutputAppendEvent, OutputAppendEvent._Fields>, java.io.Serializable, Cloneable, Comparable<OutputAppendEvent> { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("OutputAppendEvent"); + 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 INDEX_FIELD_DESC = new org.apache.thrift.protocol.TField("index", org.apache.thrift.protocol.TType.I32, (short)3); + 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)4); + 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)5); + + private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new OutputAppendEventStandardSchemeFactory()); schemes.put(TupleScheme.class, new OutputAppendEventTupleSchemeFactory()); @@ -78,16 +73,13 @@ public class OutputAppendEvent public String data; // required public String appId; // 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"), - INDEX((short) 3, "index"), - DATA((short) 4, "data"), - APP_ID((short) 5, "appId"); + NOTE_ID((short)1, "noteId"), + PARAGRAPH_ID((short)2, "paragraphId"), + INDEX((short)3, "index"), + DATA((short)4, "data"), + APP_ID((short)5, "appId"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); @@ -97,9 +89,11 @@ public class OutputAppendEvent } } - /** 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 @@ -115,15 +109,19 @@ public class OutputAppendEvent } } - /** 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); } @@ -149,54 +147,32 @@ public class OutputAppendEvent 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.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.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))); - 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))); + 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.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.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))); + 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))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap( - OutputAppendEvent.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(OutputAppendEvent.class, metaDataMap); } - public OutputAppendEvent() {} + public OutputAppendEvent() { + } public OutputAppendEvent( - String noteId, String paragraphId, int index, String data, String appId) { + String noteId, + String paragraphId, + int index, + String data, + String appId) + { this(); this.noteId = noteId; this.paragraphId = paragraphId; @@ -206,7 +182,9 @@ public class OutputAppendEvent this.appId = appId; } - /** Performs a deep copy on <i>other</i>. */ + /** + * Performs a deep copy on <i>other</i>. + */ public OutputAppendEvent(OutputAppendEvent other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetNoteId()) { @@ -359,135 +337,147 @@ public class OutputAppendEvent 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 INDEX: - if (value == null) { - unsetIndex(); - } else { - setIndex((Integer) value); - } - break; + case INDEX: + if (value == null) { + unsetIndex(); + } else { + setIndex((Integer)value); + } + break; - case DATA: - if (value == null) { - unsetData(); - } else { - setData((String) value); - } - break; + case DATA: + if (value == null) { + unsetData(); + } else { + setData((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; } } 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 INDEX: - return Integer.valueOf(getIndex()); + case INDEX: + return Integer.valueOf(getIndex()); - case DATA: - return getData(); + case DATA: + return getData(); + + case APP_ID: + return getAppId(); - case APP_ID: - return getAppId(); } 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 INDEX: - return isSetIndex(); - case DATA: - return isSetData(); - case APP_ID: - return isSetAppId(); + case NOTE_ID: + return isSetNoteId(); + case PARAGRAPH_ID: + return isSetParagraphId(); + case INDEX: + return isSetIndex(); + case DATA: + return isSetData(); + case APP_ID: + return isSetAppId(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { - if (that == null) return false; - if (that instanceof OutputAppendEvent) return this.equals((OutputAppendEvent) that); + if (that == null) + return false; + if (that instanceof OutputAppendEvent) + return this.equals((OutputAppendEvent)that); return false; } public boolean equals(OutputAppendEvent 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_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_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; } 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; } return true; @@ -499,23 +489,28 @@ public class OutputAppendEvent 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_index = true; list.add(present_index); - if (present_index) list.add(index); + if (present_index) + list.add(index); boolean present_data = true && (isSetData()); list.add(present_data); - if (present_data) list.add(data); + if (present_data) + list.add(data); boolean present_appId = true && (isSetAppId()); list.add(present_appId); - if (present_appId) list.add(appId); + if (present_appId) + list.add(appId); return list.hashCode(); } @@ -589,8 +584,7 @@ public class OutputAppendEvent 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); } @@ -645,23 +639,17 @@ public class OutputAppendEvent 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); } @@ -675,13 +663,13 @@ public class OutputAppendEvent private static class OutputAppendEventStandardScheme extends StandardScheme<OutputAppendEvent> { - public void read(org.apache.thrift.protocol.TProtocol iprot, OutputAppendEvent struct) - throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, OutputAppendEvent 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) { @@ -689,7 +677,7 @@ public class OutputAppendEvent 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; @@ -697,7 +685,7 @@ public class OutputAppendEvent 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; @@ -705,7 +693,7 @@ public class OutputAppendEvent 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; @@ -713,7 +701,7 @@ public class OutputAppendEvent 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; @@ -721,7 +709,7 @@ public class OutputAppendEvent 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; @@ -736,8 +724,7 @@ public class OutputAppendEvent struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, OutputAppendEvent struct) - throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, OutputAppendEvent struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); @@ -767,6 +754,7 @@ public class OutputAppendEvent oprot.writeFieldStop(); oprot.writeStructEnd(); } + } private static class OutputAppendEventTupleSchemeFactory implements SchemeFactory { @@ -778,8 +766,7 @@ public class OutputAppendEvent private static class OutputAppendEventTupleScheme extends TupleScheme<OutputAppendEvent> { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, OutputAppendEvent struct) - throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, OutputAppendEvent struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetNoteId()) { @@ -816,8 +803,7 @@ public class OutputAppendEvent } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, OutputAppendEvent struct) - throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, OutputAppendEvent struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(5); if (incoming.get(0)) { @@ -842,4 +828,6 @@ public class OutputAppendEvent } } } + } +
http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/OutputUpdateAllEvent.java ---------------------------------------------------------------------- diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/OutputUpdateAllEvent.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/OutputUpdateAllEvent.java index c7cbfd2..9ee8858 100644 --- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/OutputUpdateAllEvent.java +++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/OutputUpdateAllEvent.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 OutputUpdateAllEvent - implements org.apache.thrift.TBase<OutputUpdateAllEvent, OutputUpdateAllEvent._Fields>, - java.io.Serializable, - Cloneable, - Comparable<OutputUpdateAllEvent> { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = - new org.apache.thrift.protocol.TStruct("OutputUpdateAllEvent"); - - 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 MSG_FIELD_DESC = - new org.apache.thrift.protocol.TField( - "msg", org.apache.thrift.protocol.TType.LIST, (short) 3); - - private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = - new HashMap<Class<? extends IScheme>, SchemeFactory>(); +public class OutputUpdateAllEvent implements org.apache.thrift.TBase<OutputUpdateAllEvent, OutputUpdateAllEvent._Fields>, java.io.Serializable, Cloneable, Comparable<OutputUpdateAllEvent> { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("OutputUpdateAllEvent"); + 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 MSG_FIELD_DESC = new org.apache.thrift.protocol.TField("msg", org.apache.thrift.protocol.TType.LIST, (short)3); + + private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new OutputUpdateAllEventStandardSchemeFactory()); schemes.put(TupleScheme.class, new OutputUpdateAllEventTupleSchemeFactory()); @@ -67,17 +67,13 @@ public class OutputUpdateAllEvent public String noteId; // required public String paragraphId; // required - public List<org.apache.zeppelin.interpreter.thrift.RemoteInterpreterResultMessage> - msg; // required + public List<org.apache.zeppelin.interpreter.thrift.RemoteInterpreterResultMessage> 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 { - NOTE_ID((short) 1, "noteId"), - PARAGRAPH_ID((short) 2, "paragraphId"), - MSG((short) 3, "msg"); + NOTE_ID((short)1, "noteId"), + PARAGRAPH_ID((short)2, "paragraphId"), + MSG((short)3, "msg"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); @@ -87,9 +83,11 @@ public class OutputUpdateAllEvent } } - /** 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 @@ -101,15 +99,19 @@ public class OutputUpdateAllEvent } } - /** 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); } @@ -133,52 +135,36 @@ public class OutputUpdateAllEvent // 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.MSG, - new org.apache.thrift.meta_data.FieldMetaData( - "msg", - org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.ListMetaData( - org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.StructMetaData( - org.apache.thrift.protocol.TType.STRUCT, - org.apache.zeppelin.interpreter.thrift.RemoteInterpreterResultMessage.class)))); + 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.MSG, new org.apache.thrift.meta_data.FieldMetaData("msg", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.zeppelin.interpreter.thrift.RemoteInterpreterResultMessage.class)))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap( - OutputUpdateAllEvent.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(OutputUpdateAllEvent.class, metaDataMap); } - public OutputUpdateAllEvent() {} + public OutputUpdateAllEvent() { + } public OutputUpdateAllEvent( - String noteId, - String paragraphId, - List<org.apache.zeppelin.interpreter.thrift.RemoteInterpreterResultMessage> msg) { + String noteId, + String paragraphId, + List<org.apache.zeppelin.interpreter.thrift.RemoteInterpreterResultMessage> msg) + { this(); this.noteId = noteId; this.paragraphId = paragraphId; this.msg = msg; } - /** Performs a deep copy on <i>other</i>. */ + /** + * Performs a deep copy on <i>other</i>. + */ public OutputUpdateAllEvent(OutputUpdateAllEvent other) { if (other.isSetNoteId()) { this.noteId = other.noteId; @@ -187,14 +173,9 @@ public class OutputUpdateAllEvent this.paragraphId = other.paragraphId; } if (other.isSetMsg()) { - List<org.apache.zeppelin.interpreter.thrift.RemoteInterpreterResultMessage> __this__msg = - new ArrayList<org.apache.zeppelin.interpreter.thrift.RemoteInterpreterResultMessage>( - other.msg.size()); - for (org.apache.zeppelin.interpreter.thrift.RemoteInterpreterResultMessage other_element : - other.msg) { - __this__msg.add( - new org.apache.zeppelin.interpreter.thrift.RemoteInterpreterResultMessage( - other_element)); + List<org.apache.zeppelin.interpreter.thrift.RemoteInterpreterResultMessage> __this__msg = new ArrayList<org.apache.zeppelin.interpreter.thrift.RemoteInterpreterResultMessage>(other.msg.size()); + for (org.apache.zeppelin.interpreter.thrift.RemoteInterpreterResultMessage other_element : other.msg) { + __this__msg.add(new org.apache.zeppelin.interpreter.thrift.RemoteInterpreterResultMessage(other_element)); } this.msg = __this__msg; } @@ -263,15 +244,13 @@ public class OutputUpdateAllEvent return (this.msg == null) ? 0 : this.msg.size(); } - public java.util.Iterator<org.apache.zeppelin.interpreter.thrift.RemoteInterpreterResultMessage> - getMsgIterator() { + public java.util.Iterator<org.apache.zeppelin.interpreter.thrift.RemoteInterpreterResultMessage> getMsgIterator() { return (this.msg == null) ? null : this.msg.iterator(); } public void addToMsg(org.apache.zeppelin.interpreter.thrift.RemoteInterpreterResultMessage elem) { if (this.msg == null) { - this.msg = - new ArrayList<org.apache.zeppelin.interpreter.thrift.RemoteInterpreterResultMessage>(); + this.msg = new ArrayList<org.apache.zeppelin.interpreter.thrift.RemoteInterpreterResultMessage>(); } this.msg.add(elem); } @@ -280,8 +259,7 @@ public class OutputUpdateAllEvent return this.msg; } - public OutputUpdateAllEvent setMsg( - List<org.apache.zeppelin.interpreter.thrift.RemoteInterpreterResultMessage> msg) { + public OutputUpdateAllEvent setMsg(List<org.apache.zeppelin.interpreter.thrift.RemoteInterpreterResultMessage> msg) { this.msg = msg; return this; } @@ -303,96 +281,103 @@ public class OutputUpdateAllEvent 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 MSG: + if (value == null) { + unsetMsg(); + } else { + setMsg((List<org.apache.zeppelin.interpreter.thrift.RemoteInterpreterResultMessage>)value); + } + break; - case PARAGRAPH_ID: - if (value == null) { - unsetParagraphId(); - } else { - setParagraphId((String) value); - } - break; - - case MSG: - if (value == null) { - unsetMsg(); - } else { - setMsg( - (List<org.apache.zeppelin.interpreter.thrift.RemoteInterpreterResultMessage>) 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 MSG: + return getMsg(); - case MSG: - return getMsg(); } throw new IllegalStateException(); } - /** - * Returns true if field corresponding to fieldID is set (has been assigned a value) and false - * otherwise - */ + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { - case NOTE_ID: - return isSetNoteId(); - case PARAGRAPH_ID: - return isSetParagraphId(); - case MSG: - return isSetMsg(); + case NOTE_ID: + return isSetNoteId(); + case PARAGRAPH_ID: + return isSetParagraphId(); + case MSG: + return isSetMsg(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { - if (that == null) return false; - if (that instanceof OutputUpdateAllEvent) return this.equals((OutputUpdateAllEvent) that); + if (that == null) + return false; + if (that instanceof OutputUpdateAllEvent) + return this.equals((OutputUpdateAllEvent)that); return false; } public boolean equals(OutputUpdateAllEvent 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_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; @@ -404,15 +389,18 @@ public class OutputUpdateAllEvent 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_msg = true && (isSetMsg()); list.add(present_msg); - if (present_msg) list.add(msg); + if (present_msg) + list.add(msg); return list.hashCode(); } @@ -466,8 +454,7 @@ public class OutputUpdateAllEvent 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); } @@ -510,20 +497,15 @@ public class OutputUpdateAllEvent 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); } @@ -535,16 +517,15 @@ public class OutputUpdateAllEvent } } - private static class OutputUpdateAllEventStandardScheme - extends StandardScheme<OutputUpdateAllEvent> { + private static class OutputUpdateAllEventStandardScheme extends StandardScheme<OutputUpdateAllEvent> { - public void read(org.apache.thrift.protocol.TProtocol iprot, OutputUpdateAllEvent struct) - throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, OutputUpdateAllEvent 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) { @@ -552,7 +533,7 @@ public class OutputUpdateAllEvent 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; @@ -560,7 +541,7 @@ public class OutputUpdateAllEvent 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; @@ -568,21 +549,18 @@ public class OutputUpdateAllEvent if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list0 = iprot.readListBegin(); - struct.msg = - new ArrayList< - org.apache.zeppelin.interpreter.thrift.RemoteInterpreterResultMessage>( - _list0.size); + struct.msg = new ArrayList<org.apache.zeppelin.interpreter.thrift.RemoteInterpreterResultMessage>(_list0.size); org.apache.zeppelin.interpreter.thrift.RemoteInterpreterResultMessage _elem1; - for (int _i2 = 0; _i2 < _list0.size; ++_i2) { - _elem1 = - new org.apache.zeppelin.interpreter.thrift.RemoteInterpreterResultMessage(); + for (int _i2 = 0; _i2 < _list0.size; ++_i2) + { + _elem1 = new org.apache.zeppelin.interpreter.thrift.RemoteInterpreterResultMessage(); _elem1.read(iprot); struct.msg.add(_elem1); } iprot.readListEnd(); } struct.setMsgIsSet(true); - } else { + } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; @@ -597,8 +575,7 @@ public class OutputUpdateAllEvent struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, OutputUpdateAllEvent struct) - throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, OutputUpdateAllEvent struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); @@ -615,11 +592,9 @@ public class OutputUpdateAllEvent if (struct.msg != null) { oprot.writeFieldBegin(MSG_FIELD_DESC); { - oprot.writeListBegin( - new org.apache.thrift.protocol.TList( - org.apache.thrift.protocol.TType.STRUCT, struct.msg.size())); - for (org.apache.zeppelin.interpreter.thrift.RemoteInterpreterResultMessage _iter3 : - struct.msg) { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.msg.size())); + for (org.apache.zeppelin.interpreter.thrift.RemoteInterpreterResultMessage _iter3 : struct.msg) + { _iter3.write(oprot); } oprot.writeListEnd(); @@ -629,6 +604,7 @@ public class OutputUpdateAllEvent oprot.writeFieldStop(); oprot.writeStructEnd(); } + } private static class OutputUpdateAllEventTupleSchemeFactory implements SchemeFactory { @@ -640,8 +616,7 @@ public class OutputUpdateAllEvent private static class OutputUpdateAllEventTupleScheme extends TupleScheme<OutputUpdateAllEvent> { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, OutputUpdateAllEvent struct) - throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, OutputUpdateAllEvent struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetNoteId()) { @@ -663,8 +638,8 @@ public class OutputUpdateAllEvent if (struct.isSetMsg()) { { oprot.writeI32(struct.msg.size()); - for (org.apache.zeppelin.interpreter.thrift.RemoteInterpreterResultMessage _iter4 : - struct.msg) { + for (org.apache.zeppelin.interpreter.thrift.RemoteInterpreterResultMessage _iter4 : struct.msg) + { _iter4.write(oprot); } } @@ -672,8 +647,7 @@ public class OutputUpdateAllEvent } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, OutputUpdateAllEvent struct) - throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, OutputUpdateAllEvent struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { @@ -686,14 +660,11 @@ public class OutputUpdateAllEvent } if (incoming.get(2)) { { - org.apache.thrift.protocol.TList _list5 = - new org.apache.thrift.protocol.TList( - org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.msg = - new ArrayList<org.apache.zeppelin.interpreter.thrift.RemoteInterpreterResultMessage>( - _list5.size); + org.apache.thrift.protocol.TList _list5 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.msg = new ArrayList<org.apache.zeppelin.interpreter.thrift.RemoteInterpreterResultMessage>(_list5.size); org.apache.zeppelin.interpreter.thrift.RemoteInterpreterResultMessage _elem6; - for (int _i7 = 0; _i7 < _list5.size; ++_i7) { + for (int _i7 = 0; _i7 < _list5.size; ++_i7) + { _elem6 = new org.apache.zeppelin.interpreter.thrift.RemoteInterpreterResultMessage(); _elem6.read(iprot); struct.msg.add(_elem6); @@ -703,4 +674,6 @@ public class OutputUpdateAllEvent } } } + } + http://git-wip-us.apache.org/repos/asf/zeppelin/blob/0d746fa2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/OutputUpdateEvent.java ---------------------------------------------------------------------- diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/OutputUpdateEvent.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/OutputUpdateEvent.java index f021d8f..1cf328c 100644 --- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/OutputUpdateEvent.java +++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/OutputUpdateEvent.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 OutputUpdateEvent - implements org.apache.thrift.TBase<OutputUpdateEvent, OutputUpdateEvent._Fields>, - java.io.Serializable, - Cloneable, - Comparable<OutputUpdateEvent> { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = - new org.apache.thrift.protocol.TStruct("OutputUpdateEvent"); - - 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 INDEX_FIELD_DESC = - new org.apache.thrift.protocol.TField( - "index", org.apache.thrift.protocol.TType.I32, (short) 3); - 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) 4); - 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) 5); - 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) 6); - - private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = - new HashMap<Class<? extends IScheme>, SchemeFactory>(); +public class OutputUpdateEvent implements org.apache.thrift.TBase<OutputUpdateEvent, OutputUpdateEvent._Fields>, java.io.Serializable, Cloneable, Comparable<OutputUpdateEvent> { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("OutputUpdateEvent"); + + 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 INDEX_FIELD_DESC = new org.apache.thrift.protocol.TField("index", org.apache.thrift.protocol.TType.I32, (short)3); + 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)4); + 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)5); + 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)6); + private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new OutputUpdateEventStandardSchemeFactory()); schemes.put(TupleScheme.class, new OutputUpdateEventTupleSchemeFactory()); @@ -82,17 +75,14 @@ public class OutputUpdateEvent public String data; // required public String appId; // 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"), - INDEX((short) 3, "index"), - TYPE((short) 4, "type"), - DATA((short) 5, "data"), - APP_ID((short) 6, "appId"); + NOTE_ID((short)1, "noteId"), + PARAGRAPH_ID((short)2, "paragraphId"), + INDEX((short)3, "index"), + TYPE((short)4, "type"), + DATA((short)5, "data"), + APP_ID((short)6, "appId"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); @@ -102,9 +92,11 @@ public class OutputUpdateEvent } } - /** 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 OutputUpdateEvent } } - /** 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 OutputUpdateEvent 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.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))); - 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))); + 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.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))); + 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))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap( - OutputUpdateEvent.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(OutputUpdateEvent.class, metaDataMap); } - public OutputUpdateEvent() {} + public OutputUpdateEvent() { + } public OutputUpdateEvent( - String noteId, String paragraphId, int index, String type, String data, String appId) { + String noteId, + String paragraphId, + int index, + String type, + String data, + String appId) + { this(); this.noteId = noteId; this.paragraphId = paragraphId; @@ -221,7 +191,9 @@ public class OutputUpdateEvent this.appId = appId; } - /** Performs a deep copy on <i>other</i>. */ + /** + * Performs a deep copy on <i>other</i>. + */ public OutputUpdateEvent(OutputUpdateEvent other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetNoteId()) { @@ -402,155 +374,169 @@ public class OutputUpdateEvent 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 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; + + case APP_ID: + if (value == null) { + unsetAppId(); + } else { + setAppId((String)value); + } + break; - case APP_ID: - if (value == null) { - unsetAppId(); - } else { - setAppId((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 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(); + + case APP_ID: + return getAppId(); - case APP_ID: - return getAppId(); } 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 INDEX: - return isSetIndex(); - case TYPE: - return isSetType(); - case DATA: - return isSetData(); - case APP_ID: - return isSetAppId(); + case NOTE_ID: + return isSetNoteId(); + case PARAGRAPH_ID: + return isSetParagraphId(); + case INDEX: + return isSetIndex(); + case TYPE: + return isSetType(); + case DATA: + return isSetData(); + case APP_ID: + return isSetAppId(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { - if (that == null) return false; - if (that instanceof OutputUpdateEvent) return this.equals((OutputUpdateEvent) that); + if (that == null) + return false; + if (that instanceof OutputUpdateEvent) + return this.equals((OutputUpdateEvent)that); return false; } public boolean equals(OutputUpdateEvent 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_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; } 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; } return true; @@ -562,27 +548,33 @@ public class OutputUpdateEvent 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_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); boolean present_appId = true && (isSetAppId()); list.add(present_appId); - if (present_appId) list.add(appId); + if (present_appId) + list.add(appId); return list.hashCode(); } @@ -666,8 +658,7 @@ public class OutputUpdateEvent 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 OutputUpdateEvent 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); } @@ -760,13 +745,13 @@ public class OutputUpdateEvent private static class OutputUpdateEventStandardScheme extends StandardScheme<OutputUpdateEvent> { - public void read(org.apache.thrift.protocol.TProtocol iprot, OutputUpdateEvent struct) - throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, OutputUpdateEvent 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) { @@ -774,7 +759,7 @@ public class OutputUpdateEvent 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; @@ -782,7 +767,7 @@ public class OutputUpdateEvent 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; @@ -790,7 +775,7 @@ public class OutputUpdateEvent 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; @@ -798,7 +783,7 @@ public class OutputUpdateEvent 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; @@ -806,7 +791,7 @@ public class OutputUpdateEvent 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; @@ -814,7 +799,7 @@ public class OutputUpdateEvent 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; @@ -829,8 +814,7 @@ public class OutputUpdateEvent struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, OutputUpdateEvent struct) - throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, OutputUpdateEvent struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); @@ -865,6 +849,7 @@ public class OutputUpdateEvent oprot.writeFieldStop(); oprot.writeStructEnd(); } + } private static class OutputUpdateEventTupleSchemeFactory implements SchemeFactory { @@ -876,8 +861,7 @@ public class OutputUpdateEvent private static class OutputUpdateEventTupleScheme extends TupleScheme<OutputUpdateEvent> { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, OutputUpdateEvent struct) - throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, OutputUpdateEvent struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetNoteId()) { @@ -920,8 +904,7 @@ public class OutputUpdateEvent } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, OutputUpdateEvent struct) - throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, OutputUpdateEvent struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(6); if (incoming.get(0)) { @@ -950,4 +933,6 @@ public class OutputUpdateEvent } } } + } +
