### 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)

### 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
### 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
### What is this PR for?
Set project url to `http://zeppelin.apache.org` in pom.xml files
### What type of PR is it?
Refactoring
### Questions:
* Does the licenses files need update? no
* Is there breaking changes for older versions? no
* Does this needs documentation? no
Author: Mina Lee <minalee@apache.org>
Closes#1221 from minahlee/pom_url and squashes the following commits:
10de8cb [Mina Lee] Remove child url
ef0ef04 [Mina Lee] Change main class package name
ead4064 [Mina Lee] Use consistent url in pom.xml
### What is this PR for?
Doesn't work autocompletion for postgresql interpreter
'Completion' There is a problem with the return type of implementation.
```
org.apache.zeppelin.interpreter.InterpreterException: org.apache.thrift.transport.TTransportException
at org.apache.zeppelin.interpreter.remote.RemoteInterpreter.completion(RemoteInterpreter.java:396)
at org.apache.zeppelin.interpreter.LazyOpenInterpreter.completion(LazyOpenInterpreter.java:122)
at org.apache.zeppelin.notebook.Paragraph.completion(Paragraph.java:216)
at org.apache.zeppelin.notebook.Note.completion(Note.java:488)
at org.apache.zeppelin.socket.NotebookServer.completion(NotebookServer.java:729)
at org.apache.zeppelin.socket.NotebookServer.onMessage(NotebookServer.java:202)
at org.apache.zeppelin.socket.NotebookSocket.onWebSocketText(NotebookSocket.java:56)
at org.eclipse.jetty.websocket.common.events.JettyListenerEventDriver.onTextMessage(JettyListenerEventDriver.java:128)
at org.eclipse.jetty.websocket.common.message.SimpleTextMessage.messageComplete(SimpleTextMessage.java:69)
at org.eclipse.jetty.websocket.common.events.AbstractEventDriver.appendMessage(AbstractEventDriver.java:65)
at org.eclipse.jetty.websocket.common.events.JettyListenerEventDriver.onTextFrame(JettyListenerEventDriver.java:122)
at org.eclipse.jetty.websocket.common.events.AbstractEventDriver.incomingFrame(AbstractEventDriver.java:161)
at org.eclipse.jetty.websocket.common.WebSocketSession.incomingFrame(WebSocketSession.java:309)
at org.eclipse.jetty.websocket.common.extensions.ExtensionStack.incomingFrame(ExtensionStack.java:214)
at org.eclipse.jetty.websocket.common.Parser.notifyFrame(Parser.java:220)
at org.eclipse.jetty.websocket.common.Parser.parse(Parser.java:258)
at org.eclipse.jetty.websocket.common.io.AbstractWebSocketConnection.readParse(AbstractWebSocketConnection.java:632)
at org.eclipse.jetty.websocket.common.io.AbstractWebSocketConnection.onFillable(AbstractWebSocketConnection.java:480)
at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.thrift.transport.TTransportException
at org.apache.thrift.transport.TIOStreamTransport.read(TIOStreamTransport.java:132)
at org.apache.thrift.transport.TTransport.readAll(TTransport.java:86)
at org.apache.thrift.protocol.TBinaryProtocol.readAll(TBinaryProtocol.java:429)
at org.apache.thrift.protocol.TBinaryProtocol.readI32(TBinaryProtocol.java:318)
at org.apache.thrift.protocol.TBinaryProtocol.readMessageBegin(TBinaryProtocol.java:219)
at org.apache.thrift.TServiceClient.receiveBase(TServiceClient.java:69)
at org.apache.zeppelin.interpreter.thrift.RemoteInterpreterService$Client.recv_completion(RemoteInterpreterService.java:346)
at org.apache.zeppelin.interpreter.thrift.RemoteInterpreterService$Client.completion(RemoteInterpreterService.java:330)
at org.apache.zeppelin.interpreter.remote.RemoteInterpreter.completion(RemoteInterpreter.java:392)
```
### What type of PR is it?
Bug Fix
### What is the Jira issue?
https://issues.apache.org/jira/browse/ZEPPELIN-1108
### How should this be tested?
try to completion for Postgresql interpreter paragraph.
```
%psql
SELET * F (ctrl + shift + space)
```
### 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: CloverHearts <cloverheartsdev+github@gmail.com>
Closes#1126 from cloverhearts/bugfix/psql-completion and squashes the following commits:
5931133 [CloverHearts] fixed test case for postgresql completion
bb24bc0 [CloverHearts] bug fixed auto completion for postgresql interpreter
### What is this PR for?
Bump up version to 0.7.0-SNAPSHOT
Author: Mina Lee <minalee@apache.org>
Closes#1016 from minahlee/0.7.0-SNAPSHOT and squashes the following commits:
541e1b3 [Mina Lee] Bump up zeppelin-examples version to 0.7.0-SNAPSHOT
ea8c0ad [Mina Lee] Bump up version to 0.7.0-SNAPSHOT
### What is this PR for?
This PR is to automate release publish to maven repository.
We used to use maven-deploy-plugin and maven-release-plugin for release but somehow it didn't work well with Zeppelin so 0.5.5 and 0.5.6 haven't been published to maven repository.
Publishing release to maven repository will eventually help zeppelin to reduce binary package size by leading users to use Dynamic interpreter loading(#908).
Originally below modules were skipped for maven release
- all interpreters(except spark)
- zeppelin-display
- zeppelin-server
- zeppelin-distribution
on the other hand this pr will skip only:
- zeppelin-distribution
### What type of PR is it?
Infra
### Todos
- [x] Include SparkR/R interpreter in release
- [x] Create common_release.sh to remove build configuration duplication
- [x] Check curl networking failure
### What is the Jira issue?
[ZEPPELIN-986](https://issues.apache.org/jira/browse/ZEPPELIN-986)
### Questions:
* Does the licenses files need update? No
* Is there breaking changes for older versions? No
* Does this needs documentation? Yes, https://cwiki.apache.org/confluence/display/ZEPPELIN/Preparing+Zeppelin+Release will be updated accordingly once this pr is merged.
Author: Mina Lee <minalee@apache.org>
Closes#994 from minahlee/ZEPPELIN-986 and squashes the following commits:
b0e8e67 [Mina Lee] Revert "Add geode, scalding profile in maven artifact build"
cd4cbcd [Mina Lee] curl failure check
c0ea07c [Mina Lee] Fix wrong indentation
a88bc1d [Mina Lee] Add geode, scalding profile in maven artifact build
2cced61 [Mina Lee] Add r to binary package and maven build
903bc12 [Mina Lee] Move duplicate code to common_release.sh
a3eb676 [Mina Lee] Include zeppelin-server module in publish artifiact
48d338f [Mina Lee] Rollback mistakenly removed plugin
aafaf42 [Mina Lee] Follow google shell style guide
30dcc65 [Mina Lee] remove deploy plugin from pom since custom script will be used instead for deploy
cd1f08c [Mina Lee] Refactor create release script
e764f5f [Mina Lee] Add maven publish release script
### 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)

### 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
### What is this PR for?
Remove `incubating` term from pom files
### Questions:
* Does the licenses files need update? No
* Is there breaking changes for older versions? No
* Does this needs documentation? No
Author: Mina Lee <minalee@nflabs.com>
Closes#942 from minahlee/tlp/removeIncubating and squashes the following commits:
e605b54 [Mina Lee] Remove incubating from pom files
### What is this PR for?
Update resources to use Zeppelin TLP links
### What type of PR is it?
[Bug Fix]
### What is the Jira issue?
[ZEPPELIN-898](https://issues.apache.org/jira/browse/ZEPPELIN-898)
Author: Luciano Resende <lresende@apache.org>
Closes#927 from lresende/incubator-links and squashes the following commits:
8fca07c [Luciano Resende] [ZEPPELIN-898] Update resources to use Zeppelin TLP links
### What is this PR for?
Restore postgresql functionality and fix some mistake #361.
### What type of PR is it?
Hot Fix
### Is there a relevant Jira issue?
ZEPPELIN-614
### How should this be tested?
Outline the steps to test the PR here.
### 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: Jongyoul Lee <jongyoul@gmail.com>
Closes#653 from jongyoul/hotfix/restore-psql and squashes the following commits:
8917ada [Jongyoul Lee] [HOTFIX] Temporary support on Postgresql - Related #361fde5a2b [Jongyoul Lee] [HOTFIX] Temporary support on Postgresql - Related #361
Only you need to add to the classpath the jdbc connector jar and the interpreter add the particular properties for each db.
In the file zeppelin-daemon.sh add:
ZEPPELIN_CLASSPATH+=":${ZEPPELIN_HOME}/jdbc/jdbc/connector jar"
Author: beeva-victorgarcia <victor.garcia@beeva.com>
Author: Victor <viktor.manuel.garcia@gmail.com>
Author: vgmartinez <viktor.manuel.garcia@gmail.com>
Closes#361 from vgmartinez/jdbc_interpreter and squashes the following commits:
2513c1b [vgmartinez] Merge branch 'master' into jdbc_interpreter
8046692 [vgmartinez] merged with master
e602621 [beeva-victorgarcia] remove spaces
37a4c1a [beeva-victorgarcia] remove dependency
4085849 [beeva-victorgarcia] rebase branch
bd20ac2 [beeva-victorgarcia] remove README.md
2f93406 [beeva-victorgarcia] clean commit
f0ad06d [beeva-victorgarcia] Merge branch 'master' of https://github.com/apache/incubator-zeppelina0e0d54 [beeva-victorgarcia] add some test
fe92f89 [beeva-victorgarcia] add multiple connections for interpreter
a06718c [beeva-victorgarcia] -a
09006f1 [Victor] fix test
462c3b1 [Victor] Merge branch 'master' of https://github.com/apache/incubator-zeppelin into jdbc_interpreter
a66a5b7 [Victor] add descriptions
710699c [Victor] deleted cassandra/.cache-main from commit
4f28f5a [Victor] change psql to jdbc
53d0a81 [Victor] generic interpreter for jdbc
### What is this PR for?
To increase logging in the application, so as it
### What type of PR is it?
Refactoring
### Todos
* [x] - replace all printStackTrace() to LOGGER.error
* [x] - all catch block that doesn't throw exception, should have logging
### Is there a relevant Jira issue?
Yes, ZEPPELIN-541
### Screenshots (if appropriate)
N/A
Author: Prabhjyot Singh <prabhjyotsingh@gmail.com>
Closes#579 from prabhjyotsingh/increaseLogging and squashes the following commits:
ba053f5 [Prabhjyot Singh] revert note.json
648c65c [Prabhjyot Singh] fix CI
6d927fc [Prabhjyot Singh] Every catch should log error/info message or should throw an exception
7f8b70c [Prabhjyot Singh] replace printStackTrace() to LOGGER.error
When the query response contains null column values the following NPE is thrown:
java.lang.NullPointerException
at org.apache.zeppelin.postgresql.PostgreSqlInterpreter.replaceReservedChars(PostgreSqlInterpreter.java:278)
at org.apache.zeppelin.postgresql.PostgreSqlInterpreter.executeSql(PostgreSqlInterpreter.java:235)
Author: tzolov <christian.tzolov@gmail.com>
Closes#348 from tzolov/ZEPPELIN-349 and squashes the following commits:
de70c88 [tzolov] ZEPPELIN-349: Format test code
fff3448 [tzolov] ZEPPELIN-349: Resolve NPE on null cell values
Create postgresql README.md documentation
Author: tzolov <christian.tzolov@gmail.com>
Author: Christian Tzolov <christian.tzolov@gmail.com>
Closes#237 from tzolov/ZEPPELIN-251 and squashes the following commits:
82dc1e4 [tzolov] ZEPPELIN-252: Replace the postgresql/README.md content with a link to the Zeppelin Interpreters doc
30dc5b7 [Christian Tzolov] ZEPPELIN-251: Add Psql/Hawq video tutorial
bb271af [tzolov] ZEPPELIN-251: Postgresql Interpreter README.md documentation
Author: tzolov <christian.tzolov@gmail.com>
Closes#198 from tzolov/ZEPPELIN-215 and squashes the following commits:
35c40d4 [tzolov] ZEPPELIN-215: Handle failures during jdbc connectio initialization
271ef14 [tzolov] ZEPPELIN-215: Handle addition and removal of completions on Data Model changes
d87942e [tzolov] ZEPPELIN-215: Update the auto-complete metadata (schema, tables, columns) on update SQL queries
91ce7f4 [tzolov] ZEPPELIN-215: Fix a case where the cursor is close after the end of the buffer
d2393d6 [tzolov] ZEPPELIN-215: clean logging messages
4dd2a36 [tzolov] ZEPPELIN-215: resolve delimiter bug
0a3910d [tzolov] ZEPPELIN-215: Add DB schema names to the completion list
cef2b95 [tzolov] ZEPPELIN-215: Use JDBC.setMastRows(maxResults) to restrict the size of the displied rows
c6acd0e [tzolov] ZEPPELIN-215: PostgreSQL completer - initial implementation
modified: conf/zeppelin-site.xml.template
modified: pom.xml
new file: postgresql/pom.xml
new file: postgresql/src/main/java/org/apache/zeppelin/postgresql/PostgreSqlInterpreter.java
new file: postgresql/src/test/java/org/apache/zeppelin/postgresql/PostgreSqlInterpreterTest.java
Author: tzolov <christian.tzolov@gmail.com>
Closes#172 from tzolov/ZEPPELIN-70 and squashes the following commits:
5de507d [tzolov] ZEPPELIN-70: Remove the obsolete dependencies from the POM
a3db5f7 [tzolov] ZEPPELING-70: Rebase to upstream master
745ad3d [tzolov] ZEPPELIN-70: Add PostgreSQL JDBC license statement
a7d26dd [tzolov] ZEPPELIN-70: Closed previous connection before open new one. Register psql in ZeppelinConfiguration
886eab5 [tzolov] ZEPPELIN-70: Add property to control the number of SQL results shown in the display.
880bde0 [tzolov] ZEPPELIN-70: Improve javadoc. Clean pom formating
ba1b5b8 [tzolov] ZEPPELIN-70: Fix spelling
60544a1 [tzolov] ZEPPELIN-70: Add jdbc driver name as configuration property
841d67c [tzolov] ZEPPELIN-70: Add PostgreSQL Interpreter