zeppelin-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zjf...@apache.org
Subject zeppelin git commit: [HOTFIX] Code style fix for branch-0.8
Date Thu, 26 Apr 2018 09:54:23 GMT
Repository: zeppelin
Updated Branches:
  refs/heads/branch-0.8 6ce81b54f -> 3d1cb860b


[HOTFIX] Code style fix for branch-0.8

### What is this PR for?
Trivial code style fix for branch-0.8

### What type of PR is it?
[Hot Fix]

### Todos
* [ ] - Task

### What is the Jira issue?
* No jira created

### How should this be tested?
* CI pass

### 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 <zjffdu@apache.org>

Closes #2946 from zjffdu/codestyle and squashes the following commits:

417fa7a [Jeff Zhang] [HOTFIX] Code style issue fix for branch-0.8


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

Branch: refs/heads/branch-0.8
Commit: 3d1cb860b99f6caefbfd0b666b9d31a5b0d3536c
Parents: 6ce81b5
Author: Jeff Zhang <zjffdu@apache.org>
Authored: Thu Apr 26 16:14:45 2018 +0800
Committer: Jeff Zhang <zjffdu@apache.org>
Committed: Thu Apr 26 17:54:18 2018 +0800

----------------------------------------------------------------------
 .../interpreter/InterpreterSettingManager.java  | 70 ++++++++++----------
 1 file changed, 35 insertions(+), 35 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/3d1cb860/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/InterpreterSettingManager.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/InterpreterSettingManager.java
b/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/InterpreterSettingManager.java
index b61ec55..c09cf4a 100644
--- a/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/InterpreterSettingManager.java
+++ b/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/InterpreterSettingManager.java
@@ -434,17 +434,17 @@ public class InterpreterSettingManager {
 
   public List<InterpreterSetting> getInterpreterSettings(String noteId) {
     List<InterpreterSetting> settings = new ArrayList<>();
-      List<String> interpreterSettingIds = interpreterBindings.get(noteId);
-      if (interpreterSettingIds != null) {
-        for (String settingId : interpreterSettingIds) {
-          if (interpreterSettings.containsKey(settingId)) {
-            settings.add(interpreterSettings.get(settingId));
-          } else {
-            LOGGER.warn("InterpreterSetting {} has been removed, but note {} still bind to
it.",
-                settingId, noteId);
-          }
+    List<String> interpreterSettingIds = interpreterBindings.get(noteId);
+    if (interpreterSettingIds != null) {
+      for (String settingId : interpreterSettingIds) {
+        if (interpreterSettings.containsKey(settingId)) {
+          settings.add(interpreterSettings.get(settingId));
+        } else {
+          LOGGER.warn("InterpreterSetting {} has been removed, but note {} still bind to
it.",
+              settingId, noteId);
         }
       }
+    }
     return settings;
   }
 
@@ -616,36 +616,36 @@ public class InterpreterSettingManager {
    */
   private void copyDependenciesFromLocalPath(final InterpreterSetting setting) {
     setting.setStatus(InterpreterSetting.Status.DOWNLOADING_DEPENDENCIES);
-      final Thread t = new Thread() {
-        public void run() {
-          try {
-            List<Dependency> deps = setting.getDependencies();
-            if (deps != null) {
-              for (Dependency d : deps) {
-                File destDir = new File(
-                    conf.getRelativeDir(ConfVars.ZEPPELIN_DEP_LOCALREPO));
-
-                int numSplits = d.getGroupArtifactVersion().split(":").length;
-                if (!(numSplits >= 3 && numSplits <= 6)) {
-                  dependencyResolver.copyLocalDependency(d.getGroupArtifactVersion(),
-                      new File(destDir, setting.getId()));
-                }
+    final Thread t = new Thread() {
+      public void run() {
+        try {
+          List<Dependency> deps = setting.getDependencies();
+          if (deps != null) {
+            for (Dependency d : deps) {
+              File destDir = new File(
+                  conf.getRelativeDir(ConfVars.ZEPPELIN_DEP_LOCALREPO));
+
+              int numSplits = d.getGroupArtifactVersion().split(":").length;
+              if (!(numSplits >= 3 && numSplits <= 6)) {
+                dependencyResolver.copyLocalDependency(d.getGroupArtifactVersion(),
+                    new File(destDir, setting.getId()));
               }
             }
-            setting.setStatus(InterpreterSetting.Status.READY);
-          } catch (Exception e) {
-            LOGGER.error(String.format("Error while copying deps for interpreter group :
%s," +
-                    " go to interpreter setting page click on edit and save it again to make
" +
-                    "this interpreter work properly.",
-                setting.getGroup()), e);
-            setting.setErrorReason(e.getLocalizedMessage());
-            setting.setStatus(InterpreterSetting.Status.ERROR);
-          } finally {
-
           }
+          setting.setStatus(InterpreterSetting.Status.READY);
+        } catch (Exception e) {
+          LOGGER.error(String.format("Error while copying deps for interpreter group : %s,"
+
+                  " go to interpreter setting page click on edit and save it again to make
" +
+                  "this interpreter work properly.",
+              setting.getGroup()), e);
+          setting.setErrorReason(e.getLocalizedMessage());
+          setting.setStatus(InterpreterSetting.Status.ERROR);
+        } finally {
+
         }
-      };
-      t.start();
+      }
+    };
+    t.start();
   }
 
   /**


Mime
View raw message