From commits-return-4814-archive-asf-public=cust-asf.ponee.io@zeppelin.apache.org Sun Aug 26 06:43:50 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 0B4721807B5 for ; Sun, 26 Aug 2018 06:43:48 +0200 (CEST) Received: (qmail 53298 invoked by uid 500); 26 Aug 2018 04:43:48 -0000 Mailing-List: contact commits-help@zeppelin.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@zeppelin.apache.org Delivered-To: mailing list commits@zeppelin.apache.org Received: (qmail 51518 invoked by uid 99); 26 Aug 2018 04:43:46 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 26 Aug 2018 04:43:46 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id BC14BE11A9; Sun, 26 Aug 2018 04:43:44 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: jongyoul@apache.org To: commits@zeppelin.apache.org Date: Sun, 26 Aug 2018 04:44:07 -0000 Message-Id: <8bc9214fee40420b85f9e5a7d2fa3ba6@git.apache.org> In-Reply-To: <0adeff196a68402393e9e95080c19527@git.apache.org> References: <0adeff196a68402393e9e95080c19527@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [24/49] zeppelin git commit: [ZEPPELIN-3740] Adopt `google-java-format` and `fmt-maven-plugin` http://git-wip-us.apache.org/repos/asf/zeppelin/blob/55f6c91c/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/RemoteInterpreterContext.java ---------------------------------------------------------------------- diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/RemoteInterpreterContext.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/RemoteInterpreterContext.java index f1f36fc..96e201a 100644 --- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/RemoteInterpreterContext.java +++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/RemoteInterpreterContext.java @@ -1,73 +1,89 @@ /** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more contributor license + * agreements. See the NOTICE file distributed with this work for additional information regarding + * copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance with the License. You may obtain a + * copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + *

http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and + *

Unless required by applicable law or agreed to in writing, software distributed under the + * License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. See the License for the specific language governing permissions and * limitations under the License. */ /** * Autogenerated by Thrift Compiler (0.9.2) * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated + *

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 RemoteInterpreterContext implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("RemoteInterpreterContext"); - - 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 NOTE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("noteName", org.apache.thrift.protocol.TType.STRING, (short)2); - 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)3); - private static final org.apache.thrift.protocol.TField REPL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("replName", org.apache.thrift.protocol.TType.STRING, (short)4); - private static final org.apache.thrift.protocol.TField PARAGRAPH_TITLE_FIELD_DESC = new org.apache.thrift.protocol.TField("paragraphTitle", org.apache.thrift.protocol.TType.STRING, (short)5); - private static final org.apache.thrift.protocol.TField PARAGRAPH_TEXT_FIELD_DESC = new org.apache.thrift.protocol.TField("paragraphText", org.apache.thrift.protocol.TType.STRING, (short)6); - private static final org.apache.thrift.protocol.TField AUTHENTICATION_INFO_FIELD_DESC = new org.apache.thrift.protocol.TField("authenticationInfo", org.apache.thrift.protocol.TType.STRING, (short)7); - private static final org.apache.thrift.protocol.TField CONFIG_FIELD_DESC = new org.apache.thrift.protocol.TField("config", org.apache.thrift.protocol.TType.STRING, (short)8); - private static final org.apache.thrift.protocol.TField GUI_FIELD_DESC = new org.apache.thrift.protocol.TField("gui", org.apache.thrift.protocol.TType.STRING, (short)9); - private static final org.apache.thrift.protocol.TField NOTE_GUI_FIELD_DESC = new org.apache.thrift.protocol.TField("noteGui", org.apache.thrift.protocol.TType.STRING, (short)10); - private static final org.apache.thrift.protocol.TField LOCAL_PROPERTIES_FIELD_DESC = new org.apache.thrift.protocol.TField("localProperties", org.apache.thrift.protocol.TType.MAP, (short)11); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); +public class RemoteInterpreterContext + implements org.apache.thrift.TBase, + java.io.Serializable, + Cloneable, + Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = + new org.apache.thrift.protocol.TStruct("RemoteInterpreterContext"); + + 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 NOTE_NAME_FIELD_DESC = + new org.apache.thrift.protocol.TField( + "noteName", org.apache.thrift.protocol.TType.STRING, (short) 2); + 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) 3); + private static final org.apache.thrift.protocol.TField REPL_NAME_FIELD_DESC = + new org.apache.thrift.protocol.TField( + "replName", org.apache.thrift.protocol.TType.STRING, (short) 4); + private static final org.apache.thrift.protocol.TField PARAGRAPH_TITLE_FIELD_DESC = + new org.apache.thrift.protocol.TField( + "paragraphTitle", org.apache.thrift.protocol.TType.STRING, (short) 5); + private static final org.apache.thrift.protocol.TField PARAGRAPH_TEXT_FIELD_DESC = + new org.apache.thrift.protocol.TField( + "paragraphText", org.apache.thrift.protocol.TType.STRING, (short) 6); + private static final org.apache.thrift.protocol.TField AUTHENTICATION_INFO_FIELD_DESC = + new org.apache.thrift.protocol.TField( + "authenticationInfo", org.apache.thrift.protocol.TType.STRING, (short) 7); + private static final org.apache.thrift.protocol.TField CONFIG_FIELD_DESC = + new org.apache.thrift.protocol.TField( + "config", org.apache.thrift.protocol.TType.STRING, (short) 8); + private static final org.apache.thrift.protocol.TField GUI_FIELD_DESC = + new org.apache.thrift.protocol.TField( + "gui", org.apache.thrift.protocol.TType.STRING, (short) 9); + private static final org.apache.thrift.protocol.TField NOTE_GUI_FIELD_DESC = + new org.apache.thrift.protocol.TField( + "noteGui", org.apache.thrift.protocol.TType.STRING, (short) 10); + private static final org.apache.thrift.protocol.TField LOCAL_PROPERTIES_FIELD_DESC = + new org.apache.thrift.protocol.TField( + "localProperties", org.apache.thrift.protocol.TType.MAP, (short) 11); + + private static final Map, SchemeFactory> schemes = + new HashMap, SchemeFactory>(); + static { schemes.put(StandardScheme.class, new RemoteInterpreterContextStandardSchemeFactory()); schemes.put(TupleScheme.class, new RemoteInterpreterContextTupleSchemeFactory()); @@ -83,21 +99,24 @@ public class RemoteInterpreterContext implements org.apache.thrift.TBase localProperties; // required + public Map localProperties; // 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"), - NOTE_NAME((short)2, "noteName"), - PARAGRAPH_ID((short)3, "paragraphId"), - REPL_NAME((short)4, "replName"), - PARAGRAPH_TITLE((short)5, "paragraphTitle"), - PARAGRAPH_TEXT((short)6, "paragraphText"), - AUTHENTICATION_INFO((short)7, "authenticationInfo"), - CONFIG((short)8, "config"), - GUI((short)9, "gui"), - NOTE_GUI((short)10, "noteGui"), - LOCAL_PROPERTIES((short)11, "localProperties"); + NOTE_ID((short) 1, "noteId"), + NOTE_NAME((short) 2, "noteName"), + PARAGRAPH_ID((short) 3, "paragraphId"), + REPL_NAME((short) 4, "replName"), + PARAGRAPH_TITLE((short) 5, "paragraphTitle"), + PARAGRAPH_TEXT((short) 6, "paragraphText"), + AUTHENTICATION_INFO((short) 7, "authenticationInfo"), + CONFIG((short) 8, "config"), + GUI((short) 9, "gui"), + NOTE_GUI((short) 10, "noteGui"), + LOCAL_PROPERTIES((short) 11, "localProperties"); private static final Map byName = new HashMap(); @@ -107,11 +126,9 @@ public class RemoteInterpreterContext implements org.apache.thrift.TBase 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.NOTE_NAME, new org.apache.thrift.meta_data.FieldMetaData("noteName", 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.REPL_NAME, new org.apache.thrift.meta_data.FieldMetaData("replName", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.PARAGRAPH_TITLE, new org.apache.thrift.meta_data.FieldMetaData("paragraphTitle", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.PARAGRAPH_TEXT, new org.apache.thrift.meta_data.FieldMetaData("paragraphText", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.AUTHENTICATION_INFO, new org.apache.thrift.meta_data.FieldMetaData("authenticationInfo", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.CONFIG, new org.apache.thrift.meta_data.FieldMetaData("config", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.GUI, new org.apache.thrift.meta_data.FieldMetaData("gui", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.NOTE_GUI, new org.apache.thrift.meta_data.FieldMetaData("noteGui", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.LOCAL_PROPERTIES, new org.apache.thrift.meta_data.FieldMetaData("localProperties", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), - 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.NOTE_NAME, + new org.apache.thrift.meta_data.FieldMetaData( + "noteName", + 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.REPL_NAME, + new org.apache.thrift.meta_data.FieldMetaData( + "replName", + org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData( + org.apache.thrift.protocol.TType.STRING))); + tmpMap.put( + _Fields.PARAGRAPH_TITLE, + new org.apache.thrift.meta_data.FieldMetaData( + "paragraphTitle", + org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData( + org.apache.thrift.protocol.TType.STRING))); + tmpMap.put( + _Fields.PARAGRAPH_TEXT, + new org.apache.thrift.meta_data.FieldMetaData( + "paragraphText", + org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData( + org.apache.thrift.protocol.TType.STRING))); + tmpMap.put( + _Fields.AUTHENTICATION_INFO, + new org.apache.thrift.meta_data.FieldMetaData( + "authenticationInfo", + org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData( + org.apache.thrift.protocol.TType.STRING))); + tmpMap.put( + _Fields.CONFIG, + new org.apache.thrift.meta_data.FieldMetaData( + "config", + org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData( + org.apache.thrift.protocol.TType.STRING))); + tmpMap.put( + _Fields.GUI, + new org.apache.thrift.meta_data.FieldMetaData( + "gui", + org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData( + org.apache.thrift.protocol.TType.STRING))); + tmpMap.put( + _Fields.NOTE_GUI, + new org.apache.thrift.meta_data.FieldMetaData( + "noteGui", + org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData( + org.apache.thrift.protocol.TType.STRING))); + tmpMap.put( + _Fields.LOCAL_PROPERTIES, + new org.apache.thrift.meta_data.FieldMetaData( + "localProperties", + org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.MapMetaData( + org.apache.thrift.protocol.TType.MAP, + new org.apache.thrift.meta_data.FieldValueMetaData( + org.apache.thrift.protocol.TType.STRING), + new org.apache.thrift.meta_data.FieldValueMetaData( + org.apache.thrift.protocol.TType.STRING)))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(RemoteInterpreterContext.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap( + RemoteInterpreterContext.class, metaDataMap); } - public RemoteInterpreterContext() { - } + public RemoteInterpreterContext() {} public RemoteInterpreterContext( - String noteId, - String noteName, - String paragraphId, - String replName, - String paragraphTitle, - String paragraphText, - String authenticationInfo, - String config, - String gui, - String noteGui, - Map localProperties) - { + String noteId, + String noteName, + String paragraphId, + String replName, + String paragraphTitle, + String paragraphText, + String authenticationInfo, + String config, + String gui, + String noteGui, + Map localProperties) { this(); this.noteId = noteId; this.noteName = noteName; @@ -235,9 +306,7 @@ public class RemoteInterpreterContext implements org.apache.thrift.TBaseother. - */ + /** Performs a deep copy on other. */ public RemoteInterpreterContext(RemoteInterpreterContext other) { if (other.isSetNoteId()) { this.noteId = other.noteId; @@ -270,7 +339,8 @@ public class RemoteInterpreterContext implements org.apache.thrift.TBase __this__localProperties = new HashMap(other.localProperties); + Map __this__localProperties = + new HashMap(other.localProperties); this.localProperties = __this__localProperties; } } @@ -451,7 +521,9 @@ public class RemoteInterpreterContext implements org.apache.thrift.TBase(); + this.localProperties = new HashMap(); } this.localProperties.put(key, val); } - public Map getLocalProperties() { + public Map getLocalProperties() { return this.localProperties; } - public RemoteInterpreterContext setLocalProperties(Map localProperties) { + public RemoteInterpreterContext setLocalProperties(Map localProperties) { this.localProperties = localProperties; return this; } @@ -558,7 +630,9 @@ public class RemoteInterpreterContext implements org.apache.thrift.TBase)value); - } - break; + case NOTE_GUI: + if (value == null) { + unsetNoteGui(); + } else { + setNoteGui((String) value); + } + break; + case LOCAL_PROPERTIES: + if (value == null) { + unsetLocalProperties(); + } else { + setLocalProperties((Map) value); + } + break; } } public Object getFieldValue(_Fields field) { switch (field) { - case NOTE_ID: - return getNoteId(); - - case NOTE_NAME: - return getNoteName(); + case NOTE_ID: + return getNoteId(); - case PARAGRAPH_ID: - return getParagraphId(); + case NOTE_NAME: + return getNoteName(); - case REPL_NAME: - return getReplName(); + case PARAGRAPH_ID: + return getParagraphId(); - case PARAGRAPH_TITLE: - return getParagraphTitle(); + case REPL_NAME: + return getReplName(); - case PARAGRAPH_TEXT: - return getParagraphText(); + case PARAGRAPH_TITLE: + return getParagraphTitle(); - case AUTHENTICATION_INFO: - return getAuthenticationInfo(); + case PARAGRAPH_TEXT: + return getParagraphText(); - case CONFIG: - return getConfig(); + case AUTHENTICATION_INFO: + return getAuthenticationInfo(); - case GUI: - return getGui(); + case CONFIG: + return getConfig(); - case NOTE_GUI: - return getNoteGui(); + case GUI: + return getGui(); - case LOCAL_PROPERTIES: - return getLocalProperties(); + case NOTE_GUI: + return getNoteGui(); + case LOCAL_PROPERTIES: + return getLocalProperties(); } 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 NOTE_NAME: - return isSetNoteName(); - case PARAGRAPH_ID: - return isSetParagraphId(); - case REPL_NAME: - return isSetReplName(); - case PARAGRAPH_TITLE: - return isSetParagraphTitle(); - case PARAGRAPH_TEXT: - return isSetParagraphText(); - case AUTHENTICATION_INFO: - return isSetAuthenticationInfo(); - case CONFIG: - return isSetConfig(); - case GUI: - return isSetGui(); - case NOTE_GUI: - return isSetNoteGui(); - case LOCAL_PROPERTIES: - return isSetLocalProperties(); + case NOTE_ID: + return isSetNoteId(); + case NOTE_NAME: + return isSetNoteName(); + case PARAGRAPH_ID: + return isSetParagraphId(); + case REPL_NAME: + return isSetReplName(); + case PARAGRAPH_TITLE: + return isSetParagraphTitle(); + case PARAGRAPH_TEXT: + return isSetParagraphText(); + case AUTHENTICATION_INFO: + return isSetAuthenticationInfo(); + case CONFIG: + return isSetConfig(); + case GUI: + return isSetGui(); + case NOTE_GUI: + return isSetNoteGui(); + case LOCAL_PROPERTIES: + return isSetLocalProperties(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { - if (that == null) - return false; + if (that == null) return false; if (that instanceof RemoteInterpreterContext) - return this.equals((RemoteInterpreterContext)that); + return this.equals((RemoteInterpreterContext) that); return false; } public boolean equals(RemoteInterpreterContext 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_noteName = true && this.isSetNoteName(); boolean that_present_noteName = true && that.isSetNoteName(); if (this_present_noteName || that_present_noteName) { - if (!(this_present_noteName && that_present_noteName)) - return false; - if (!this.noteName.equals(that.noteName)) - return false; + if (!(this_present_noteName && that_present_noteName)) return false; + if (!this.noteName.equals(that.noteName)) 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_replName = true && this.isSetReplName(); boolean that_present_replName = true && that.isSetReplName(); if (this_present_replName || that_present_replName) { - if (!(this_present_replName && that_present_replName)) - return false; - if (!this.replName.equals(that.replName)) - return false; + if (!(this_present_replName && that_present_replName)) return false; + if (!this.replName.equals(that.replName)) return false; } boolean this_present_paragraphTitle = true && this.isSetParagraphTitle(); boolean that_present_paragraphTitle = true && that.isSetParagraphTitle(); if (this_present_paragraphTitle || that_present_paragraphTitle) { - if (!(this_present_paragraphTitle && that_present_paragraphTitle)) - return false; - if (!this.paragraphTitle.equals(that.paragraphTitle)) - return false; + if (!(this_present_paragraphTitle && that_present_paragraphTitle)) return false; + if (!this.paragraphTitle.equals(that.paragraphTitle)) return false; } boolean this_present_paragraphText = true && this.isSetParagraphText(); boolean that_present_paragraphText = true && that.isSetParagraphText(); if (this_present_paragraphText || that_present_paragraphText) { - if (!(this_present_paragraphText && that_present_paragraphText)) - return false; - if (!this.paragraphText.equals(that.paragraphText)) - return false; + if (!(this_present_paragraphText && that_present_paragraphText)) return false; + if (!this.paragraphText.equals(that.paragraphText)) return false; } boolean this_present_authenticationInfo = true && this.isSetAuthenticationInfo(); boolean that_present_authenticationInfo = true && that.isSetAuthenticationInfo(); if (this_present_authenticationInfo || that_present_authenticationInfo) { - if (!(this_present_authenticationInfo && that_present_authenticationInfo)) - return false; - if (!this.authenticationInfo.equals(that.authenticationInfo)) - return false; + if (!(this_present_authenticationInfo && that_present_authenticationInfo)) return false; + if (!this.authenticationInfo.equals(that.authenticationInfo)) return false; } boolean this_present_config = true && this.isSetConfig(); boolean that_present_config = true && that.isSetConfig(); if (this_present_config || that_present_config) { - if (!(this_present_config && that_present_config)) - return false; - if (!this.config.equals(that.config)) - return false; + if (!(this_present_config && that_present_config)) return false; + if (!this.config.equals(that.config)) return false; } boolean this_present_gui = true && this.isSetGui(); boolean that_present_gui = true && that.isSetGui(); if (this_present_gui || that_present_gui) { - if (!(this_present_gui && that_present_gui)) - return false; - if (!this.gui.equals(that.gui)) - return false; + if (!(this_present_gui && that_present_gui)) return false; + if (!this.gui.equals(that.gui)) return false; } boolean this_present_noteGui = true && this.isSetNoteGui(); boolean that_present_noteGui = true && that.isSetNoteGui(); if (this_present_noteGui || that_present_noteGui) { - if (!(this_present_noteGui && that_present_noteGui)) - return false; - if (!this.noteGui.equals(that.noteGui)) - return false; + if (!(this_present_noteGui && that_present_noteGui)) return false; + if (!this.noteGui.equals(that.noteGui)) return false; } boolean this_present_localProperties = true && this.isSetLocalProperties(); boolean that_present_localProperties = true && that.isSetLocalProperties(); if (this_present_localProperties || that_present_localProperties) { - if (!(this_present_localProperties && that_present_localProperties)) - return false; - if (!this.localProperties.equals(that.localProperties)) - return false; + if (!(this_present_localProperties && that_present_localProperties)) return false; + if (!this.localProperties.equals(that.localProperties)) return false; } return true; @@ -855,58 +906,47 @@ public class RemoteInterpreterContext implements org.apache.thrift.TBase { + private static class RemoteInterpreterContextStandardScheme + extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, RemoteInterpreterContext struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, RemoteInterpreterContext 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) { @@ -1183,7 +1237,7 @@ public class RemoteInterpreterContext implements org.apache.thrift.TBase(2*_map0.size); + struct.localProperties = new HashMap(2 * _map0.size); String _key1; String _val2; - for (int _i3 = 0; _i3 < _map0.size; ++_i3) - { + for (int _i3 = 0; _i3 < _map0.size; ++_i3) { _key1 = iprot.readString(); _val2 = iprot.readString(); struct.localProperties.put(_key1, _val2); @@ -1275,7 +1328,7 @@ public class RemoteInterpreterContext implements org.apache.thrift.TBase _iter4 : struct.localProperties.entrySet()) - { + oprot.writeMapBegin( + new org.apache.thrift.protocol.TMap( + org.apache.thrift.protocol.TType.STRING, + org.apache.thrift.protocol.TType.STRING, + struct.localProperties.size())); + for (Map.Entry _iter4 : struct.localProperties.entrySet()) { oprot.writeString(_iter4.getKey()); oprot.writeString(_iter4.getValue()); } @@ -1360,7 +1417,6 @@ public class RemoteInterpreterContext implements org.apache.thrift.TBase { + private static class RemoteInterpreterContextTupleScheme + extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, RemoteInterpreterContext struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, RemoteInterpreterContext struct) + throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetNoteId()) { @@ -1442,8 +1500,7 @@ public class RemoteInterpreterContext implements org.apache.thrift.TBase _iter5 : struct.localProperties.entrySet()) - { + for (Map.Entry _iter5 : struct.localProperties.entrySet()) { oprot.writeString(_iter5.getKey()); oprot.writeString(_iter5.getValue()); } @@ -1452,7 +1509,8 @@ public class RemoteInterpreterContext implements org.apache.thrift.TBase(2*_map6.size); + org.apache.thrift.protocol.TMap _map6 = + new org.apache.thrift.protocol.TMap( + org.apache.thrift.protocol.TType.STRING, + org.apache.thrift.protocol.TType.STRING, + iprot.readI32()); + struct.localProperties = new HashMap(2 * _map6.size); String _key7; String _val8; - for (int _i9 = 0; _i9 < _map6.size; ++_i9) - { + for (int _i9 = 0; _i9 < _map6.size; ++_i9) { _key7 = iprot.readString(); _val8 = iprot.readString(); struct.localProperties.put(_key7, _val8); @@ -1512,6 +1573,4 @@ public class RemoteInterpreterContext implements org.apache.thrift.TBasehttp://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and + *

Unless required by applicable law or agreed to in writing, software distributed under the + * License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. See the License for the specific language governing permissions and * limitations under the License. */ /** * Autogenerated by Thrift Compiler (0.9.2) * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated + *

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 RemoteInterpreterEvent implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("RemoteInterpreterEvent"); - - private static final org.apache.thrift.protocol.TField TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("type", org.apache.thrift.protocol.TType.I32, (short)1); - private static final org.apache.thrift.protocol.TField DATA_FIELD_DESC = new org.apache.thrift.protocol.TField("data", org.apache.thrift.protocol.TType.STRING, (short)2); +public class RemoteInterpreterEvent + implements org.apache.thrift.TBase, + java.io.Serializable, + Cloneable, + Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = + new org.apache.thrift.protocol.TStruct("RemoteInterpreterEvent"); + + private static final org.apache.thrift.protocol.TField TYPE_FIELD_DESC = + new org.apache.thrift.protocol.TField( + "type", org.apache.thrift.protocol.TType.I32, (short) 1); + private static final org.apache.thrift.protocol.TField DATA_FIELD_DESC = + new org.apache.thrift.protocol.TField( + "data", org.apache.thrift.protocol.TType.STRING, (short) 2); + + private static final Map, SchemeFactory> schemes = + new HashMap, SchemeFactory>(); - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new RemoteInterpreterEventStandardSchemeFactory()); schemes.put(TupleScheme.class, new RemoteInterpreterEventTupleSchemeFactory()); } - /** - * - * @see RemoteInterpreterEventType - */ + /** @see RemoteInterpreterEventType */ public RemoteInterpreterEventType 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 { - /** - * - * @see RemoteInterpreterEventType - */ - TYPE((short)1, "type"), - DATA((short)2, "data"); + /** @see RemoteInterpreterEventType */ + TYPE((short) 1, "type"), + DATA((short) 2, "data"); private static final Map byName = new HashMap(); @@ -88,11 +84,9 @@ public class RemoteInterpreterEvent implements org.apache.thrift.TBase metaDataMap; + static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, RemoteInterpreterEventType.class))); - 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.TYPE, + new org.apache.thrift.meta_data.FieldMetaData( + "type", + org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.EnumMetaData( + org.apache.thrift.protocol.TType.ENUM, RemoteInterpreterEventType.class))); + 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(RemoteInterpreterEvent.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap( + RemoteInterpreterEvent.class, metaDataMap); } - public RemoteInterpreterEvent() { - } + public RemoteInterpreterEvent() {} - public RemoteInterpreterEvent( - RemoteInterpreterEventType type, - String data) - { + public RemoteInterpreterEvent(RemoteInterpreterEventType type, String data) { this(); this.type = type; this.data = data; } - /** - * Performs a deep copy on other. - */ + /** Performs a deep copy on other. */ public RemoteInterpreterEvent(RemoteInterpreterEvent other) { if (other.isSetType()) { this.type = other.type; @@ -182,18 +179,12 @@ public class RemoteInterpreterEvent implements org.apache.thrift.TBase { + private static class RemoteInterpreterEventStandardScheme + extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, RemoteInterpreterEvent struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, RemoteInterpreterEvent 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) { case 1: // TYPE if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.type = org.apache.zeppelin.interpreter.thrift.RemoteInterpreterEventType.findByValue(iprot.readI32()); + struct.type = + org.apache.zeppelin.interpreter.thrift.RemoteInterpreterEventType.findByValue( + iprot.readI32()); struct.setTypeIsSet(true); - } else { + } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; @@ -455,7 +447,7 @@ public class RemoteInterpreterEvent implements org.apache.thrift.TBase { + private static class RemoteInterpreterEventTupleScheme + extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, RemoteInterpreterEvent struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, RemoteInterpreterEvent struct) + throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetType()) { @@ -518,11 +512,14 @@ public class RemoteInterpreterEvent implements org.apache.thrift.TBase