amakaur commented on issue #3498: [ZEPPELIN-4409] Set spark.app.name to know 
which user is running which notebook
URL: https://github.com/apache/zeppelin/pull/3498#issuecomment-549224067
 
 
   Still not working for me, but will debug to see if i can find something. 
   
    ```@Override
     public Map<String, String> buildEnvFromProperties(InterpreterLaunchContext 
context) throws IOException {
       Map<String, String> env = super.buildEnvFromProperties(context);
       Properties sparkProperties = new Properties();
       String sparkMaster = getSparkMaster(properties);
       for (String key : properties.stringPropertyNames()) {
         if (RemoteInterpreterUtils.isEnvString(key)) {
           env.put(key, properties.getProperty(key));
         }
         if (isSparkConf(key, properties.getProperty(key))) {
           sparkProperties.setProperty(key, 
toShellFormat(properties.getProperty(key)));
         }
       }
   
       sparkProperties.setProperty("spark.app.name", 
context.getInterpreterGroupId());
   
       setupPropertiesForPySpark(sparkProperties);
       setupPropertiesForSparkR(sparkProperties);
       if (isYarnMode() && getDeployMode().equals("cluster")) {
         env.put("ZEPPELIN_SPARK_YARN_CLUSTER", "true");
         sparkProperties.setProperty("spark.yarn.submit.waitAppCompletion", 
"false");
       }
   
       StringBuilder sparkConfBuilder = new StringBuilder();
       if (sparkMaster != null) {
         sparkConfBuilder.append(" --master " + sparkMaster);
       }
       if (isYarnMode() && getDeployMode().equals("cluster")) {
         if (sparkProperties.containsKey("spark.files")) {
           sparkProperties.put("spark.files", 
sparkProperties.getProperty("spark.files") + "," +
               zConf.getConfDir() + "/log4j_yarn_cluster.properties");
         } else {
           sparkProperties.put("spark.files", zConf.getConfDir() + 
"/log4j_yarn_cluster.properties");
         }
         sparkProperties.put("spark.yarn.maxAppAttempts", "1");
       }```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to