Commit graph

9 commits

Author SHA1 Message Date
Tinkoff DWH
4d398ef2a6 [ZEPPELIN-2297] improvements to jdbc autocompleter
### What is this PR for?
PR contains some improvements for completion (JDBC Interpreter):
- types of completion
- display of long values
- refactoring of search of completions
- uniqness of completions with type `keyword`
- updating data in completer by pressing `Ctrl + .`
- setting the schema filter to generate completions
- fix highlighting code when used not default data source

### What type of PR is it?
Improvement

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

### How should this be tested?
try to work with new completer

### Screenshots (if appropriate)
**1. Types of completion**
![1](https://cloud.githubusercontent.com/assets/25951039/24449367/758eeeac-1490-11e7-863f-bf1b313a3f4d.png)

**2. Display of long values**
before
![2297_before_long_caption](https://cloud.githubusercontent.com/assets/25951039/24449397/8ecd3072-1490-11e7-8fd4-415424ef337e.gif)
after
![2297_after_long_caption](https://cloud.githubusercontent.com/assets/25951039/24449413/9c7a36b6-1490-11e7-9d7c-cbbdac71cbe7.gif)

**3. Refactoring of search of completions. Updating data in completer by pressing `Ctrl + .`**
before
![2297_before_refactoring_search](https://cloud.githubusercontent.com/assets/25951039/24449463/c1801214-1490-11e7-84a8-25c887b68d65.gif)
after
![2297_after_refactoring_search](https://cloud.githubusercontent.com/assets/25951039/24449567/1079bdc0-1491-11e7-8409-5187aeceb428.gif)

**4. uniqness of completions with type keyword**
before
![2297_before_uniq](https://cloud.githubusercontent.com/assets/25951039/24449615/4e20c8d0-1491-11e7-94cc-c86aab886c53.gif)
after
![2297_after_uniq](https://cloud.githubusercontent.com/assets/25951039/24449635/5cf59aca-1491-11e7-8ee1-31ea3cdacb3e.gif)

**5. fix highlighting code when used not default data source**
before
![2297_before_inrpret_name](https://cloud.githubusercontent.com/assets/25951039/24449730/b6c8d62a-1491-11e7-8dc3-39fa6975c8c3.gif)
after
![2297_after_inrpret_name](https://cloud.githubusercontent.com/assets/25951039/24449738/baf63e18-1491-11e7-8711-12557a674212.gif)

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

Author: Tinkoff DWH <tinkoff.dwh@gmail.com>

Closes #2203 from tinkoff-dwh/ZEPPELIN-2297 and squashes the following commits:

b86b57a [Tinkoff DWH] [ZEPPELIN-2297] small fix to compute caption
8552049 [Tinkoff DWH] [ZEPPELIN-2297] schema filters
5308f1e [Tinkoff DWH] [ZEPPELIN-2297] updating completions
ef6c9cb [Tinkoff DWH] Merge remote-tracking branch 'origin/ZEPPELIN-2297' into ZEPPELIN-2297
1e05a68 [Tinkoff DWH] [ZEPPELIN-2297] fix uniqueness keywords
ec3cd3b [Tinkoff DWH] [ZEPPELIN-2297] fix uniqueness keywords
2b58cc5 [Tinkoff DWH] [ZEPPELIN-2297] refactoring search completions
7b5835d [Tinkoff DWH] [ZEPPELIN-2297] compute caption of copletion
1c74384 [Tinkoff DWH] [ZEPPELIN-2297] add type of completion
2017-04-17 14:18:32 +09:00
Unknown
69bc353d3c [MINOR] Remove unused import. Naming convention.
### What is this PR for?
Change method name (Method names should comply with a naming convention).  Remove unused imports. Using append makes code simpler to read `sb.append("\nAccessTime = ").append(accessTime);` instead `sb.append("\nAccessTime = " + accessTime);`

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

### Todos
* [ ] - Task

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

### How should this be tested?
HDFSFileInterpreterTest.java (still working)

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

Remove this unused import,  naming convention

Author: Unknown <Sokurito@gmail.com>

Closes #1747 from bitchelov/hdfsFileInterpreterSmallChanges and squashes the following commits:

6d27bb8 [Unknown] Minor changes
2017-01-15 01:38:22 +09:00
Lee moon soo
850fd81a51 [ZEPPELIN-212] Multiple paragraph results
### What is this PR for?
Currently a paragraph can display only a single type of result.
For example
```
print("""
%text textout
%html htmlout
""")
```

will display only last display system detected, "htmlout".

This pr implements multiple results supports, so not only the last, but also all the display systems in a paragraph outputs can be displayed.

To do that, Note.json format need to be changed. from

```
   paragraph : [
      {
          result : {
              code: "",
              type: "",
              msg: ""
          },
          config : {
             graph : {},
             ...
          },
          ...
      },
      ...
   ],
   ...
```

to

```
   paragraph : [
      {
          results : {
             {
                code: "",
                msg: [
                   {
                        type: "",
                        data: ""
                    },
                    {
                        type: "",
                        data: ""
                     },
                     ...
                ]
          },
          config : {
             results : [
                {
                    graph : {},
                },
                {
                    graph : {},
                },
                ...
             ]
          },
          ...
      },
      ...
   ],
   ...
```

### What type of PR is it?
Improvement

### Todos
* [x] - Make InterpreterResult and InterpreterOutput support multiple display system
* [x] - Automatic migration old format to new format
* [x] - Render multiple results in front-end
* [x] - Take care Importing old notebook format
* [x] - Make helium framework support multiple results

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

### How should this be tested?

run following code in a single spark paragraph.
```
%spark
// default output is text
(1 to 3).foreach{i=>
  println(new java.util.Date())
  Thread.sleep(1000)
}

// print something in html
println(s"""%html <h3><font style="color:blue">Some HTML</font></h3>""")

// create table
println(s"""%table key\tvalue
sun\t100
moon\t200

""")

// display text again
println("""%text""")
(1 to 3).foreach{i=>
  println(new java.util.Date())
  Thread.sleep(1000)
}

// another table
Thread.sleep(1000)
println(s"""%table key\tvalue
apple\t100
banana\t200
""")
```

### Screenshots (if appropriate)
![multipleout](https://cloud.githubusercontent.com/assets/1540981/20465902/23379948-af1d-11e6-85cf-4d70597fb94e.gif)

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

Author: Lee moon soo <moon@apache.org>

Closes #1658 from Leemoonsoo/ZEPPELIN-212 and squashes the following commits:

0c6a13c [Lee moon soo] Merge remote-tracking branch 'origin/master' into ZEPPELIN-212
519cf23 [Lee moon soo] Update PythonInterpreterPandasSqlTest
e6268ac [Lee moon soo] Update PythonInterpreterMatplotlibTest.java
f5034b8 [Lee moon soo] Merge remote-tracking branch 'origin/master' into ZEPPELIN-212
d5981d5 [Lee moon soo] Merge remote-tracking branch 'origin/master' into ZEPPELIN-212
a1fe729 [Lee moon soo] document note format change
282504e [Lee moon soo] Merge remote-tracking branch 'origin/master' into ZEPPELIN-212
7ab6679 [Lee moon soo] update selenium test
6a897a5 [Lee moon soo] Update rest-api doc
cbbd58a [Lee moon soo] update unittest
e89c9b8 [Lee moon soo] restore tutoral note
3ba37b7 [Lee moon soo] Let old version import note without error
d09e03f [Lee moon soo] enable helium only in the last result
6682908 [Lee moon soo] Remove unnecessary listener method
0f1d28f [Lee moon soo] Merge branch 'master' into ZEPPELIN-212
73b3a81 [Lee moon soo] update selenium test
e69f1a1 [Lee moon soo] update test
f12230f [Lee moon soo] Remove unnecessary newline in test
26e201a [Lee moon soo] Update testcase
b01d70f [Lee moon soo] Make helium app work
0a5b4d1 [Lee moon soo] Update HeliumApplicationFactoryTest
d8ca07f [Lee moon soo] update NotebookTest
aaf9778 [Lee moon soo] fix r test
3e43df4 [Lee moon soo] make zeppelin-web test pass
1d6fd3e [Lee moon soo] fix compile errors
0156ffc [Lee moon soo] take care angular object
804768d [Lee moon soo] Take care output streaming
57d6b2f [Lee moon soo] Render multiple results
95b6037 [Lee moon soo] Multiple results
2016-11-30 17:23:57 -08:00
Jan Hentschel
99b975f5c5 [ZEPPELIN-429] Replaced explicit types with diamonds
### What is this PR for?

Changed all occurrences of explicit types to diamonds in the different modules.
### What type of PR is it?

Improvement
### Todos
##
### What is the Jira issue?

https://issues.apache.org/jira/browse/ZEPPELIN-429
### How should this be tested?

Run the normal Maven build process.
### 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: Jan Hentschel <jan.hentschel@ultratendency.com>

Closes #1551 from HorizonNet/ZEPPELIN-429 and squashes the following commits:

7bde50e [Jan Hentschel] [ZEPPELIN-429] Incorporated latest changes
58a94ac [Jan Hentschel] Merge branch 'master' of https://github.com/apache/zeppelin into ZEPPELIN-429
b56bf24 [Jan Hentschel] [ZEPPELIN-429] Replaced explicit types with diamonds
2016-11-01 11:59:22 +09:00
Mina Lee
60089f0f58 [ZEPPELIN-1566] Make paragraph editable with double click
### What is this PR for?
This PR enables edit on double click for markdown/angular paragraph.  Users can change `editOnDblClick` field to be `false` by editting `interpreter/md/interpreter-setting.json` or  `conf/interpreter.json`. In the same context, users can set other type paragraphs to be editable on double click by setting `editOnDblClick` to be true.

This PR also fixes bug that syntax highlight doesn't work on pasted code.

### What type of PR is it?
Feature

### Todos
* [x] Create test
* [x] Update docs

### What is the Jira issue?
[ZEPPELIN-1566](https://issues.apache.org/jira/browse/ZEPPELIN-1566)

### How should this be tested?
1. Create new markdown interpreter
2. Create notebook and run markdown paragraph
3. Double click markdown paragraph to edit

### Screenshots (if appropriate)

**Edit on double click and hide editor on paragraph run**
![oct-20-2016 12-28-54](https://cloud.githubusercontent.com/assets/8503346/19545401/ca2a69a8-96c0-11e6-9e70-ca930fd7cc8e.gif)

**Syntax highlight on paste**

Before
![oct-20-2016 12-24-54](https://cloud.githubusercontent.com/assets/8503346/19545333/46a2f2a8-96c0-11e6-910a-2a216da5603b.gif)

After
![oct-20-2016 12-25-06](https://cloud.githubusercontent.com/assets/8503346/19545338/4d3bb852-96c0-11e6-8dc4-ff839234876a.gif)

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

Author: Mina Lee <minalee@apache.org>

Closes #1540 from minahlee/ZEPPELIN-1566 and squashes the following commits:

89ea628 [Mina Lee] Remove redundant code
4ffc446 [Mina Lee] Enable focus first paragraph on note reload
c566706 [Mina Lee] Check null condition of editor setting and return default setting
38d5e35 [Mina Lee] Update document about how to make paragraph editable on double click
b42039e [Mina Lee] Add integration test for editOnDblClick
0a26207 [Mina Lee] Add editOnDblClick field in interpreter-setting.json
93abe6a [Mina Lee] Make paragraph editable on doubleclick if editOnDblClick set true in interpreter-setting.json
359dc0b [Mina Lee] Split getAndSetEditorSetting method into getEditorSetting and setEditorLanguage method
2016-10-29 10:30:22 +09:00
Rerngvit Yanggratoke
a691e94c5c [ZEPPELIN-910] New interpreter registration mechanism to HDFSFileInterpreter
### What is this PR for?
This PR applies the new interpreter registration mechanism to HDFSFileInterpreter

### What type of PR is it?
Improvement

### Todos
Move interpreter registration properties from a static block to interpreter-setting.json

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

### How should this be tested?
 1. apply patch
 2. rm conf/interpreter.json
 3. mvn clean package -DskipTests
 4. bin/zeppelin-daemon.sh start
 5. Configure %file interpreter setting according to your HDFS setup
 6. run some paragraph with HDFS file access

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

Author: Rerngvit Yanggratoke <rerngvit.yanggratoke@gmail.com>

Closes #1211 from rerngvit/ZEPPELIN-804 and squashes the following commits:

b1ebf67 [Rerngvit Yanggratoke] This PR applies the new interpreter registration mechanism to HDFSFileInterpreter
2016-07-22 14:01:50 +09:00
astroshim
2147375745 [Bugfix] Wrong return value of HDFSFileInterpreter completion.
### What is this PR for?
This PR fixes auto competion of HDFSFileInterpreter.

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

### How should this be tested?
Please refer to test case.

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

Author: astroshim <hsshim@nflabs.com>

Closes #1141 from astroshim/bugfix/HDFSFileInterpreterCompletion and squashes the following commits:

81d4dee [astroshim] add space after ,
9831e0b [astroshim] add testcase
7cc30c3 [astroshim] bugfix HDFSFileInterpreter completion
2016-07-18 10:51:17 +09:00
AhyoungRyu
7b00dffd98 [ZEPPELIN-982] Improve interpreter completion API
### What is this PR for?
When people implement a new interpreter, they extend [interpreter.java](https://github.com/apache/zeppelin/blob/master/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/Interpreter.java) as described in [here](https://zeppelin.apache.org/docs/0.6.0-SNAPSHOT/development/writingzeppelininterpreter.html). Among the several methods in [interpreter.java](https://github.com/apache/zeppelin/blob/master/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/Interpreter.java), [completion API](https://github.com/apache/zeppelin/blob/master/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/Interpreter.java#L109) enables auto-completion.

However this API is too simple compared to other project's auto-completion and hard to add more at the moment. So for the aspect of further expansion, it would be better to separate and restructure this API before the this release( 0.6.0 ).

### What type of PR is it?
Improvement

### Todos
* [x] - Create new structure : `InterpreterCompletion` in `RemoteInterpreterService.thrift` and regenerate `zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/*` files
* [x] - Change all existing `List<String> completion` -> `List<InterpreterCompletion> completion`
* [x] - Change `paragraph.controller.js` to point real `name` and `value`

### What is the Jira issue?
[ZEPPELIN-982](https://issues.apache.org/jira/browse/ZEPPELIN-982)

### How should this be tested?
Since this improvement is just API change, it should work same as before. So after applying this patch, and check whether auto-completion works well or not.

Use `. + ctrl` for auto-completion. For example,

```
%spark
sc.version
```

When after typing `sc.` and pushing  `. + ctrl` down, `version` should be shown in the auto-completion list.

### Screenshots (if appropriate)
![auto_completion](https://cloud.githubusercontent.com/assets/10060731/15952521/72937782-2e76-11e6-8246-4faf0dd77a5b.gif)

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

Author: AhyoungRyu <fbdkdud93@hanmail.net>

Closes #984 from AhyoungRyu/ZEPPELIN-982 and squashes the following commits:

311dc29 [AhyoungRyu] Fix travis
9d384ec [AhyoungRyu] Address @minalee feedback
fdfae8f [AhyoungRyu] Address @jongyoul review
bd4f8c0 [AhyoungRyu] Remove abstract and make it return null by default
f8352c7 [AhyoungRyu] Fix travis error
43d81f6 [AhyoungRyu] Remove console.log
24912fa [AhyoungRyu] Fix type casting error in SparkInterpreter
80e295b [AhyoungRyu] Change return type
bd04c22 [AhyoungRyu] Apply new InterpreterCompletion class to all interpreter class files
c283043 [AhyoungRyu] Apply new InterpreterCompletion class under zeppelin-zengine/
dbecc51 [AhyoungRyu] Apply new InterpreterCompletion class under zeppelin-server/
6449455 [AhyoungRyu] Apply new InterpreterCompletion class under zeppelin-interpreter/
919b159 [AhyoungRyu] Add automatically generated thrift class
9e69e11 [AhyoungRyu] Change v -> v.name & v.value in front
73e374e [AhyoungRyu] Define InterpreterCompletion structure to thrift file
2016-06-16 08:06:07 -07:00
Tom Runyon
b45663d227 ZEPPELIN-198 HDFS File Interpreter
### What is this PR for?
This pull request is a follow of https://github.com/apache/incubator-zeppelin/pull/276 started by raj-bains.  The additional commits address comments from the pull request regarding string creation and error propagation for bad object requests.

### What type of PR is it?
[Bug Fix | Improvement | Feature | Documentation | Hot Fix | Refactoring]
Feature/Subtask
### Todos

### Is there a relevant Jira issue?
[ZEPPELIN-198](https://issues.apache.org/jira/browse/ZEPPELIN-198)
### How should this be tested?
Outline the steps to test the PR here.

### Screenshots (if appropriate)

![selection_001](https://cloud.githubusercontent.com/assets/9200575/13370345/87a922ac-dcd2-11e5-9217-66ec21c016de.png)
![selection_002](https://cloud.githubusercontent.com/assets/9200575/13370347/89a5603e-dcd2-11e5-9555-9c38167e8667.png)
![selection_003](https://cloud.githubusercontent.com/assets/9200575/13370359/b9bbadc8-dcd2-11e5-97bd-47d216f0c7da.png)
![selection_004](https://cloud.githubusercontent.com/assets/9200575/13370364/16ff9274-dcd3-11e5-9b4c-f324e7035c20.png)

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

Author: Tom Runyon <runyontr@gmail.com>
Author: Raj Bains <rajbains@Rajs-MacBook-Pro.local>

Closes #752 from runyontr/master and squashes the following commits:

f7bfef8 [Tom Runyon] ZEPPELIN-198 added transitive dependency lincense information
af16ce0 [Tom Runyon] ZEPPELIN-198 removed GPL2 reference from license file
5e9e131 [Tom Runyon] ZEPPELIN-198 Updated ZeppelinConfiguration to hold HDFS interpreter
9832622 [Tom Runyon] ZEPPELIN-198 Changed group for hdfs interpreter
c34a913 [Tom Runyon] ZEPPELIN-198 Updated licenses file to include org.glassfish.jersey.core
8d0ee3d [Tom Runyon] Merge https://github.com/apache/incubator-zeppelin
9f66514 [Tom Runyon] ZEPPELIN-198 Removed extra copy of configuration table and fixed formatting issues for hdfs.md
5938b0e [Tom Runyon] ZEPPELIN-198 Updated documentation to be consistent with naming between pom file and interpreter documentation.
67bbc5b [Tom Runyon] ZEPPELIN-198 Added navigation to hdfs interpreter
1c7a5c2 [Tom Runyon] ZEPPELIN-198 removed errant text in documentation.
56a5174 [Tom Runyon] ZEPPELIN-198 fixed logging to match standards
933c890 [Tom Runyon] MAINT Updated .gitignore file to remove zeppelin-server/derby.log
29540df [Tom Runyon] ZEPPELIN-198 removed zeppelin-server/derby.log
71d53d3 [Tom Runyon] ZEPPELIN-198 Changed pom name to Zeppelin File System Interpreters to match functionality
aec0512 [Tom Runyon] ZEPPELIN-198 Fixed compile error for error logging.
d24f4c0 [Tom Runyon] ZEPPELIN-198 Added error logging when returning error in interpet
227b815 [Tom Runyon] ZEPPELIN-198 Updated interpreter documentation.
b505391 [Tom Runyon] ZEPPELIN-198 Added completion functionality to HDFSInterpreter
32ed7cb [Tom Runyon] ZEPPELIN-198 Added -h flag for human readable byte sizes.  Updated string creation to StringBuilder.
797fd29 [Tom Runyon] Added org.glassfish.jersey.core to pom.xml file for hdfs intepretor
27e0438 [Tom Runyon] Modified string creation to use StringBuilder
79f0d90 [Tom Runyon] Merge branch 'master' of http://github.com/raj-bains/incubator-zeppelin
70507a8 [Raj Bains] Add Documentation and a missing dependency for HDFS File Browser
1239fe6 [Raj Bains] Merge remote-tracking branch 'upstream/master'
7d61e5f [Raj Bains] This is the first reviewed version of File Interpreter that adds basic ls, cd and pwd functionality against WebHDFS. It addresses ZEPPELIN-198
865e6ab [Raj Bains] Add File Interpreter, HDFS Interpreter and Tests
2016-03-17 11:27:08 -07:00