You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@zeppelin.apache.org by mo...@apache.org on 2016/06/23 22:25:07 UTC

zeppelin git commit: BugFix of Automatically adds %.* of previous paragraph's typing.

Repository: zeppelin
Updated Branches:
  refs/heads/master 74346a22b -> d77991371


BugFix of Automatically adds %.* of previous paragraph's typing.

### What is this PR for?
This PR is to fix bug from https://github.com/apache/zeppelin/pull/806.
The default interpreter name that automatically adds should be interpreter group name.

### What type of PR is it?
Bug Fix

### Screenshots (if appropriate)
  - before
![b](https://cloud.githubusercontent.com/assets/3348133/16221424/99cab6b6-37cd-11e6-8074-93fd9db53b45.gif)

  - after
![a](https://cloud.githubusercontent.com/assets/3348133/16221623/d2c36e94-37ce-11e6-957f-fea2e67dd55d.gif)

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

Author: astroshim <hs...@nflabs.com>

Closes #1058 from astroshim/bugfix/ZEPPELIN-707 and squashes the following commits:

8e00b49 [astroshim] default interpreter name should be group name.


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

Branch: refs/heads/master
Commit: d779913715951e976441eff629bf7e81cb28ab90
Parents: 74346a2
Author: astroshim <hs...@nflabs.com>
Authored: Tue Jun 21 16:17:58 2016 +0900
Committer: Lee moon soo <mo...@apache.org>
Committed: Thu Jun 23 15:27:00 2016 -0700

----------------------------------------------------------------------
 .../src/main/java/org/apache/zeppelin/notebook/Note.java     | 2 +-
 .../src/test/java/org/apache/zeppelin/notebook/NoteTest.java | 8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/d7799137/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/Note.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/Note.java b/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/Note.java
index b6c8b29..1f4a508 100644
--- a/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/Note.java
+++ b/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/Note.java
@@ -113,7 +113,7 @@ public class Note implements Serializable, JobListener {
 
   private String getDefaultInterpreterName() {
     Optional<InterpreterSetting> settingOptional = replLoader.getDefaultInterpreterSetting();
-    return settingOptional.isPresent() ? settingOptional.get().getName() : StringUtils.EMPTY;
+    return settingOptional.isPresent() ? settingOptional.get().getGroup() : StringUtils.EMPTY;
   }
 
   void putDefaultReplName() {

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/d7799137/zeppelin-zengine/src/test/java/org/apache/zeppelin/notebook/NoteTest.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/test/java/org/apache/zeppelin/notebook/NoteTest.java b/zeppelin-zengine/src/test/java/org/apache/zeppelin/notebook/NoteTest.java
index 29da058..3e323ef 100644
--- a/zeppelin-zengine/src/test/java/org/apache/zeppelin/notebook/NoteTest.java
+++ b/zeppelin-zengine/src/test/java/org/apache/zeppelin/notebook/NoteTest.java
@@ -112,7 +112,7 @@ public class NoteTest {
   @Test
   public void putDefaultReplNameIfInterpreterSettingPresent() {
     InterpreterSetting interpreterSetting = Mockito.mock(InterpreterSetting.class);
-    when(interpreterSetting.getName()).thenReturn("spark");
+    when(interpreterSetting.getGroup()).thenReturn("spark");
     when(replLoader.getDefaultInterpreterSetting())
             .thenReturn(Optional.of(interpreterSetting));
 
@@ -126,7 +126,7 @@ public class NoteTest {
   @Test
   public void addParagraphWithLastReplName() {
     InterpreterSetting interpreterSetting = Mockito.mock(InterpreterSetting.class);
-    when(interpreterSetting.getName()).thenReturn("spark");
+    when(interpreterSetting.getGroup()).thenReturn("spark");
     when(replLoader.getDefaultInterpreterSetting())
             .thenReturn(Optional.of(interpreterSetting));
 
@@ -141,7 +141,7 @@ public class NoteTest {
   @Test
   public void insertParagraphWithLastReplName() {
     InterpreterSetting interpreterSetting = Mockito.mock(InterpreterSetting.class);
-    when(interpreterSetting.getName()).thenReturn("spark");
+    when(interpreterSetting.getGroup()).thenReturn("spark");
     when(replLoader.getDefaultInterpreterSetting())
             .thenReturn(Optional.of(interpreterSetting));
 
@@ -165,4 +165,4 @@ public class NoteTest {
 
     assertEquals("spark", note.getLastReplName());
   }
-}
\ No newline at end of file
+}