You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@zeppelin.apache.org by bz...@apache.org on 2016/11/30 04:19:08 UTC

zeppelin git commit: ZEPPELIN-1707. Pass userName when creating interpreter through thrift

Repository: zeppelin
Updated Branches:
  refs/heads/master 97cdfa987 -> 71632967d


ZEPPELIN-1707. Pass userName when creating interpreter through thrift

### What is this PR for?
In ZEPPELIN-1607, I'd like refactor livy interpreter to scoped mode by default, this require username when open this interpreter. So I propose to pass username when creating interpreter through thrift.
What I did in this PR.
* update `RemoteInterpreterService.thrift` and regenerate the java thrift code.
* update `genthrift.sh`, otherwise hashCode method won't be generated correctly.
* This is one compilation issue (`PythonDockerInterpreterTest.java`) in the existing master branch, I also fix it here.

### What type of PR is it?
[Improvement]

### Todos
* [ ] - Task

### What is the Jira issue?
* https://issues.apache.org/jira/browse/ZEPPELIN-1707

### Screenshots (if appropriate)

### Questions:
* Does the licenses files need update? No
* Is there breaking changes for older versions? No
* Does this needs documentation? No

Author: Jeff Zhang <zj...@apache.org>

Closes #1679 from zjffdu/ZEPPELIN-1707 and squashes the following commits:

763455f [Jeff Zhang] regenerate it using thrift 0.9.2
a247552 [Jeff Zhang] ZEPPELIN-1707. Pass userName when creating interpreter through thrift


Project: http://git-wip-us.apache.org/repos/asf/zeppelin/repo
Commit: http://git-wip-us.apache.org/repos/asf/zeppelin/commit/71632967
Tree: http://git-wip-us.apache.org/repos/asf/zeppelin/tree/71632967
Diff: http://git-wip-us.apache.org/repos/asf/zeppelin/diff/71632967

Branch: refs/heads/master
Commit: 71632967ded7904319a17cbe1ae6104efe4f249d
Parents: 97cdfa9
Author: Jeff Zhang <zj...@apache.org>
Authored: Fri Nov 25 16:33:39 2016 +0800
Committer: Alexander Bezzubov <bz...@apache.org>
Committed: Wed Nov 30 13:18:53 2016 +0900

----------------------------------------------------------------------
 docs/development/howtocontribute.md             |   5 +-
 .../zeppelin/interpreter/Interpreter.java       |   9 ++
 .../interpreter/dev/ZeppelinDevServer.java      |   3 +-
 .../interpreter/remote/RemoteInterpreter.java   |   3 +-
 .../remote/RemoteInterpreterServer.java         |   4 +-
 .../thrift/RemoteInterpreterService.java        | 137 +++++++++++++++++--
 .../main/thrift/RemoteInterpreterService.thrift |   2 +-
 7 files changed, 141 insertions(+), 22 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/71632967/docs/development/howtocontribute.md
----------------------------------------------------------------------
diff --git a/docs/development/howtocontribute.md b/docs/development/howtocontribute.md
index cd0ca3f..5de4458 100644
--- a/docs/development/howtocontribute.md
+++ b/docs/development/howtocontribute.md
@@ -105,11 +105,12 @@ Server will be run on [http://localhost:8080](http://localhost:8080).
 
 Some portions of the Zeppelin code are generated by [Thrift](http://thrift.apache.org). For most Zeppelin changes, you don't need to worry about this. But if you modify any of the Thrift IDL files (e.g. zeppelin-interpreter/src/main/thrift/*.thrift), then you also need to regenerate these files and submit their updated version as part of your patch.
 
-To regenerate the code, install **thrift-0.9.2** and change directory into Zeppelin source directory. and then run following command
+To regenerate the code, install **thrift-0.9.2** and then run the following command to generate thrift code.
 
 
 ```
-thrift -out zeppelin-interpreter/src/main/java/ --gen java zeppelin-interpreter/src/main/thrift/RemoteInterpreterService.thrift
+cd <zeppelin_home>/zeppelin-interpreter/src/main/thrift
+./genthrift.sh
 ```
 
 ## Where to Start

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/71632967/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/Interpreter.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/Interpreter.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/Interpreter.java
index c068e04..cc57cb0 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/Interpreter.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/Interpreter.java
@@ -142,6 +142,7 @@ public abstract class Interpreter {
   private InterpreterGroup interpreterGroup;
   private URL [] classloaderUrls;
   protected Properties property;
+  private String userName;
 
   @ZeppelinApi
   public Interpreter(Properties property) {
@@ -187,6 +188,14 @@ public abstract class Interpreter {
     return this.getClass().getName();
   }
 
+  public void setUserName(String userName) {
+    this.userName = userName;
+  }
+
+  public String getUserName() {
+    return this.userName;
+  }
+
   public void setInterpreterGroup(InterpreterGroup interpreterGroup) {
     this.interpreterGroup = interpreterGroup;
   }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/71632967/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/dev/ZeppelinDevServer.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/dev/ZeppelinDevServer.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/dev/ZeppelinDevServer.java
index 3be711d..5414c70 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/dev/ZeppelinDevServer.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/dev/ZeppelinDevServer.java
@@ -52,7 +52,8 @@ public class ZeppelinDevServer extends
             "dev",
             sessionKey,
             DevInterpreter.class.getName(),
-            new HashMap<String, String>());
+            new HashMap<String, String>(),
+            "anonymous");
 
         Interpreter intp = super.getInterpreter(sessionKey, className);
         interpreter = (DevInterpreter) (

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/71632967/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/remote/RemoteInterpreter.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/remote/RemoteInterpreter.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/remote/RemoteInterpreter.java
index 5f8ea50..1ffba42 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/remote/RemoteInterpreter.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/remote/RemoteInterpreter.java
@@ -239,8 +239,7 @@ public class RemoteInterpreter extends Interpreter {
           property.put("zeppelin.interpreter.localRepo", localRepoPath);
         }
         client.createInterpreter(groupId, sessionKey,
-          getClassName(), (Map) property);
-
+          getClassName(), (Map) property, userName);
         // Push angular object loaded from JSON file to remote interpreter
         if (!interpreterGroup.isAngularRegistryPushed()) {
           pushAngularObjectRegistryToRemote(client);

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/71632967/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/remote/RemoteInterpreterServer.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/remote/RemoteInterpreterServer.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/remote/RemoteInterpreterServer.java
index 50a1f7c..ca61145 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/remote/RemoteInterpreterServer.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/remote/RemoteInterpreterServer.java
@@ -155,10 +155,9 @@ public class RemoteInterpreterServer
     System.exit(0);
   }
 
-
   @Override
   public void createInterpreter(String interpreterGroupId, String sessionKey, String
-      className, Map<String, String> properties) throws TException {
+      className, Map<String, String> properties, String userName) throws TException {
     if (interpreterGroup == null) {
       interpreterGroup = new InterpreterGroup(interpreterGroupId);
       angularObjectRegistry = new AngularObjectRegistry(interpreterGroup.getId(), this);
@@ -196,6 +195,7 @@ public class RemoteInterpreterServer
 
       logger.info("Instantiate interpreter {}", className);
       repl.setInterpreterGroup(interpreterGroup);
+      repl.setUserName(userName);
     } catch (ClassNotFoundException | NoSuchMethodException | SecurityException
         | InstantiationException | IllegalAccessException
         | IllegalArgumentException | InvocationTargetException e) {

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/71632967/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/RemoteInterpreterService.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/RemoteInterpreterService.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/RemoteInterpreterService.java
index 0b7930d..ca056b4 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/RemoteInterpreterService.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/RemoteInterpreterService.java
@@ -56,7 +56,7 @@ public class RemoteInterpreterService {
 
   public interface Iface {
 
-    public void createInterpreter(String intpGroupId, String noteId, String className, Map<String,String> properties) throws org.apache.thrift.TException;
+    public void createInterpreter(String intpGroupId, String noteId, String className, Map<String,String> properties, String userName) throws org.apache.thrift.TException;
 
     public void open(String noteId, String className) throws org.apache.thrift.TException;
 
@@ -108,7 +108,7 @@ public class RemoteInterpreterService {
 
   public interface AsyncIface {
 
-    public void createInterpreter(String intpGroupId, String noteId, String className, Map<String,String> properties, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+    public void createInterpreter(String intpGroupId, String noteId, String className, Map<String,String> properties, String userName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
     public void open(String noteId, String className, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
@@ -178,19 +178,20 @@ public class RemoteInterpreterService {
       super(iprot, oprot);
     }
 
-    public void createInterpreter(String intpGroupId, String noteId, String className, Map<String,String> properties) throws org.apache.thrift.TException
+    public void createInterpreter(String intpGroupId, String noteId, String className, Map<String,String> properties, String userName) throws org.apache.thrift.TException
     {
-      send_createInterpreter(intpGroupId, noteId, className, properties);
+      send_createInterpreter(intpGroupId, noteId, className, properties, userName);
       recv_createInterpreter();
     }
 
-    public void send_createInterpreter(String intpGroupId, String noteId, String className, Map<String,String> properties) throws org.apache.thrift.TException
+    public void send_createInterpreter(String intpGroupId, String noteId, String className, Map<String,String> properties, String userName) throws org.apache.thrift.TException
     {
       createInterpreter_args args = new createInterpreter_args();
       args.setIntpGroupId(intpGroupId);
       args.setNoteId(noteId);
       args.setClassName(className);
       args.setProperties(properties);
+      args.setUserName(userName);
       sendBase("createInterpreter", args);
     }
 
@@ -742,9 +743,9 @@ public class RemoteInterpreterService {
       super(protocolFactory, clientManager, transport);
     }
 
-    public void createInterpreter(String intpGroupId, String noteId, String className, Map<String,String> properties, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+    public void createInterpreter(String intpGroupId, String noteId, String className, Map<String,String> properties, String userName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
       checkReady();
-      createInterpreter_call method_call = new createInterpreter_call(intpGroupId, noteId, className, properties, resultHandler, this, ___protocolFactory, ___transport);
+      createInterpreter_call method_call = new createInterpreter_call(intpGroupId, noteId, className, properties, userName, resultHandler, this, ___protocolFactory, ___transport);
       this.___currentMethod = method_call;
       ___manager.call(method_call);
     }
@@ -754,12 +755,14 @@ public class RemoteInterpreterService {
       private String noteId;
       private String className;
       private Map<String,String> properties;
-      public createInterpreter_call(String intpGroupId, String noteId, String className, Map<String,String> properties, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+      private String userName;
+      public createInterpreter_call(String intpGroupId, String noteId, String className, Map<String,String> properties, String userName, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
         super(client, protocolFactory, transport, resultHandler, false);
         this.intpGroupId = intpGroupId;
         this.noteId = noteId;
         this.className = className;
         this.properties = properties;
+        this.userName = userName;
       }
 
       public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
@@ -769,6 +772,7 @@ public class RemoteInterpreterService {
         args.setNoteId(noteId);
         args.setClassName(className);
         args.setProperties(properties);
+        args.setUserName(userName);
         args.write(prot);
         prot.writeMessageEnd();
       }
@@ -1655,7 +1659,7 @@ public class RemoteInterpreterService {
 
       public createInterpreter_result getResult(I iface, createInterpreter_args args) throws org.apache.thrift.TException {
         createInterpreter_result result = new createInterpreter_result();
-        iface.createInterpreter(args.intpGroupId, args.noteId, args.className, args.properties);
+        iface.createInterpreter(args.intpGroupId, args.noteId, args.className, args.properties, args.userName);
         return result;
       }
     }
@@ -2208,7 +2212,7 @@ public class RemoteInterpreterService {
       }
 
       public void start(I iface, createInterpreter_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
-        iface.createInterpreter(args.intpGroupId, args.noteId, args.className, args.properties,resultHandler);
+        iface.createInterpreter(args.intpGroupId, args.noteId, args.className, args.properties, args.userName,resultHandler);
       }
     }
 
@@ -3385,6 +3389,7 @@ public class RemoteInterpreterService {
     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)2);
     private static final org.apache.thrift.protocol.TField CLASS_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("className", org.apache.thrift.protocol.TType.STRING, (short)3);
     private static final org.apache.thrift.protocol.TField PROPERTIES_FIELD_DESC = new org.apache.thrift.protocol.TField("properties", org.apache.thrift.protocol.TType.MAP, (short)4);
+    private static final org.apache.thrift.protocol.TField USER_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("userName", org.apache.thrift.protocol.TType.STRING, (short)5);
 
     private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
     static {
@@ -3396,13 +3401,15 @@ public class RemoteInterpreterService {
     public String noteId; // required
     public String className; // required
     public Map<String,String> properties; // required
+    public String userName; // required
 
     /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
     public enum _Fields implements org.apache.thrift.TFieldIdEnum {
       INTP_GROUP_ID((short)1, "intpGroupId"),
       NOTE_ID((short)2, "noteId"),
       CLASS_NAME((short)3, "className"),
-      PROPERTIES((short)4, "properties");
+      PROPERTIES((short)4, "properties"),
+      USER_NAME((short)5, "userName");
 
       private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
 
@@ -3425,6 +3432,8 @@ public class RemoteInterpreterService {
             return CLASS_NAME;
           case 4: // PROPERTIES
             return PROPERTIES;
+          case 5: // USER_NAME
+            return USER_NAME;
           default:
             return null;
         }
@@ -3478,6 +3487,8 @@ public class RemoteInterpreterService {
           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))));
+      tmpMap.put(_Fields.USER_NAME, new org.apache.thrift.meta_data.FieldMetaData("userName", 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(createInterpreter_args.class, metaDataMap);
     }
@@ -3489,13 +3500,15 @@ public class RemoteInterpreterService {
       String intpGroupId,
       String noteId,
       String className,
-      Map<String,String> properties)
+      Map<String,String> properties,
+      String userName)
     {
       this();
       this.intpGroupId = intpGroupId;
       this.noteId = noteId;
       this.className = className;
       this.properties = properties;
+      this.userName = userName;
     }
 
     /**
@@ -3515,6 +3528,9 @@ public class RemoteInterpreterService {
         Map<String,String> __this__properties = new HashMap<String,String>(other.properties);
         this.properties = __this__properties;
       }
+      if (other.isSetUserName()) {
+        this.userName = other.userName;
+      }
     }
 
     public createInterpreter_args deepCopy() {
@@ -3527,6 +3543,7 @@ public class RemoteInterpreterService {
       this.noteId = null;
       this.className = null;
       this.properties = null;
+      this.userName = null;
     }
 
     public String getIntpGroupId() {
@@ -3636,6 +3653,30 @@ public class RemoteInterpreterService {
       }
     }
 
+    public String getUserName() {
+      return this.userName;
+    }
+
+    public createInterpreter_args setUserName(String userName) {
+      this.userName = userName;
+      return this;
+    }
+
+    public void unsetUserName() {
+      this.userName = null;
+    }
+
+    /** Returns true if field userName is set (has been assigned a value) and false otherwise */
+    public boolean isSetUserName() {
+      return this.userName != null;
+    }
+
+    public void setUserNameIsSet(boolean value) {
+      if (!value) {
+        this.userName = null;
+      }
+    }
+
     public void setFieldValue(_Fields field, Object value) {
       switch (field) {
       case INTP_GROUP_ID:
@@ -3670,6 +3711,14 @@ public class RemoteInterpreterService {
         }
         break;
 
+      case USER_NAME:
+        if (value == null) {
+          unsetUserName();
+        } else {
+          setUserName((String)value);
+        }
+        break;
+
       }
     }
 
@@ -3687,6 +3736,9 @@ public class RemoteInterpreterService {
       case PROPERTIES:
         return getProperties();
 
+      case USER_NAME:
+        return getUserName();
+
       }
       throw new IllegalStateException();
     }
@@ -3706,6 +3758,8 @@ public class RemoteInterpreterService {
         return isSetClassName();
       case PROPERTIES:
         return isSetProperties();
+      case USER_NAME:
+        return isSetUserName();
       }
       throw new IllegalStateException();
     }
@@ -3759,6 +3813,15 @@ public class RemoteInterpreterService {
           return false;
       }
 
+      boolean this_present_userName = true && this.isSetUserName();
+      boolean that_present_userName = true && that.isSetUserName();
+      if (this_present_userName || that_present_userName) {
+        if (!(this_present_userName && that_present_userName))
+          return false;
+        if (!this.userName.equals(that.userName))
+          return false;
+      }
+
       return true;
     }
 
@@ -3786,6 +3849,11 @@ public class RemoteInterpreterService {
       if (present_properties)
         list.add(properties);
 
+      boolean present_userName = true && (isSetUserName());
+      list.add(present_userName);
+      if (present_userName)
+        list.add(userName);
+
       return list.hashCode();
     }
 
@@ -3837,6 +3905,16 @@ public class RemoteInterpreterService {
           return lastComparison;
         }
       }
+      lastComparison = Boolean.valueOf(isSetUserName()).compareTo(other.isSetUserName());
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+      if (isSetUserName()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userName, other.userName);
+        if (lastComparison != 0) {
+          return lastComparison;
+        }
+      }
       return 0;
     }
 
@@ -3888,6 +3966,14 @@ public class RemoteInterpreterService {
         sb.append(this.properties);
       }
       first = false;
+      if (!first) sb.append(", ");
+      sb.append("userName:");
+      if (this.userName == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.userName);
+      }
+      first = false;
       sb.append(")");
       return sb.toString();
     }
@@ -3975,6 +4061,14 @@ public class RemoteInterpreterService {
                 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
               }
               break;
+            case 5: // USER_NAME
+              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+                struct.userName = iprot.readString();
+                struct.setUserNameIsSet(true);
+              } else { 
+                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+              }
+              break;
             default:
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
           }
@@ -4018,6 +4112,11 @@ public class RemoteInterpreterService {
           }
           oprot.writeFieldEnd();
         }
+        if (struct.userName != null) {
+          oprot.writeFieldBegin(USER_NAME_FIELD_DESC);
+          oprot.writeString(struct.userName);
+          oprot.writeFieldEnd();
+        }
         oprot.writeFieldStop();
         oprot.writeStructEnd();
       }
@@ -4048,7 +4147,10 @@ public class RemoteInterpreterService {
         if (struct.isSetProperties()) {
           optionals.set(3);
         }
-        oprot.writeBitSet(optionals, 4);
+        if (struct.isSetUserName()) {
+          optionals.set(4);
+        }
+        oprot.writeBitSet(optionals, 5);
         if (struct.isSetIntpGroupId()) {
           oprot.writeString(struct.intpGroupId);
         }
@@ -4068,12 +4170,15 @@ public class RemoteInterpreterService {
             }
           }
         }
+        if (struct.isSetUserName()) {
+          oprot.writeString(struct.userName);
+        }
       }
 
       @Override
       public void read(org.apache.thrift.protocol.TProtocol prot, createInterpreter_args struct) throws org.apache.thrift.TException {
         TTupleProtocol iprot = (TTupleProtocol) prot;
-        BitSet incoming = iprot.readBitSet(4);
+        BitSet incoming = iprot.readBitSet(5);
         if (incoming.get(0)) {
           struct.intpGroupId = iprot.readString();
           struct.setIntpGroupIdIsSet(true);
@@ -4101,6 +4206,10 @@ public class RemoteInterpreterService {
           }
           struct.setPropertiesIsSet(true);
         }
+        if (incoming.get(4)) {
+          struct.userName = iprot.readString();
+          struct.setUserNameIsSet(true);
+        }
       }
     }
 

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/71632967/zeppelin-interpreter/src/main/thrift/RemoteInterpreterService.thrift
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/thrift/RemoteInterpreterService.thrift b/zeppelin-interpreter/src/main/thrift/RemoteInterpreterService.thrift
index fdcf21b..c3c4237 100644
--- a/zeppelin-interpreter/src/main/thrift/RemoteInterpreterService.thrift
+++ b/zeppelin-interpreter/src/main/thrift/RemoteInterpreterService.thrift
@@ -82,8 +82,8 @@ struct InterpreterCompletion {
 }
 
 service RemoteInterpreterService {
-  void createInterpreter(1: string intpGroupId, 2: string sessionKey, 3: string className, 4: map<string, string> properties);
 
+  void createInterpreter(1: string intpGroupId, 2: string sessionKey, 3: string className, 4: map<string, string> properties, 5: string userName);
   void open(1: string sessionKey, 2: string className);
   void close(1: string sessionKey, 2: string className);
   RemoteInterpreterResult interpret(1: string sessionKey, 2: string className, 3: string st, 4: RemoteInterpreterContext interpreterContext);