GitHub user doanduyhai reopened a pull request:

    https://github.com/apache/incubator-zeppelin/pull/950

    [ZEPPELIN-901] Cassandra interpreter V3

    ### What is this PR for?
    **Cassandra** interpreter V3:
    
    * Update documentation
    * Update interactive documentation
    * Add support for binary protocol **V4**
    * Implement new `@requestTimeOut` runtime option
    * Upgrade Java driver version to **3.0.1**
    * Allow interpreter to add dynamic forms programmatically when using 
`FormType.SIMPLE`
    * Allow dynamic form using default Zeppelin syntax
    * Fixing typo on `FallThroughPolicy`
    * Look for data in `AngularObjectRegistry` before creating dynamic form
    * Add missing support for `ALTER` statements
    
    ### What type of PR is it?
    [Improvement]
    
    ### Todos
    * [ ] - Test steps executed and confirmed working by the community
    
    ### What is the Jira issue?
    **[ZEPPELIN-901]**
    
    ### How should this be tested?
    * Download and install locally **[Cassandra 3.5]**
    * Start **Cassandra**
    * Clone this pull request locally with:
        * `git fetch origin pull/950/head:CassandraInterpreterV3`
        * `git checkout CassandraInterpreterV3`
    * Build this version of **Zeppelin** with `mvn clean package -DskipTests`
    * Start Zeppelin and update the property `cassandra.hosts` of the 
**Cassandra** interpreter (set it to _localhost_ or _127.0.0.1_ depending on 
your configuration)
    * To test the `ALTER` statement, create a new paragraph with the following 
content:
    ```
    %cassandra
    
    CREATE KEYSPACE IF NOT EXISTS cassandra_v3 WITH REPLICATION = {'class': 
'SimpleStrategy', 'replication_factor': 1};
    CREATE TABLE IF NOT EXISTS cassandra_v3.simple(key int PRIMARY KEY);
    ALTER TABLE cassandra_v3.simple ADD value text;
    DESCRIBE TABLE cassandra_v3.simple;
    ```
    The result of this paragraph should be:
    
![image](https://cloud.githubusercontent.com/assets/1532977/15740044/6062bba4-28b3-11e6-818e-e257d0830041.png)
     
    * To test the support for **Zeppelin** dynamic form syntax, create a 
paragraph with the following content:
    
    ```
    %cassandra
    
    INSERT INTO cassandra_v3.simple(key,value) VALUES(1, 'first'); 
    INSERT INTO cassandra_v3.simple(key,value) VALUES(2, 'second');
    INSERT INTO cassandra_v3.simple(key,value) VALUES(3, 'third');
    
    SELECT * FROM cassandra_v3.simple WHERE key=${key=1};
    ```
    The result of this paragraph should be:
    
![image](https://cloud.githubusercontent.com/assets/1532977/15740146/d7b696f8-28b3-11e6-80c5-428ae97558f6.png)
    * To test the legacy syntax for dynamic form, create a new paragraph with 
the following content:
    
    ```
    %cassandra
    
    INSERT INTO cassandra_v3.simple(key,value) VALUES(1, 'first'); 
    INSERT INTO cassandra_v3.simple(key,value) VALUES(2, 'second');
    INSERT INTO cassandra_v3.simple(key,value) VALUES(3, 'third');
    
    SELECT * FROM cassandra_v3.simple WHERE key={{key=1|2|3}};
    ```
    The result of this paragraph should be:
    
![image](https://cloud.githubusercontent.com/assets/1532977/15740377/ebb018ea-28b4-11e6-9cde-b3aad50bbaef.png)
    
    
    * To test the override of `AngularObject` upon dynamic form, create 2 new 
paragraphs with the following content
    
    First paragraph content:
    ```
    %angular
    
    <form class="form-inline">
      <div class="form-group">
        <label for="keyId">Key: </label>
        <input type="text" class="form-control" id="keyId" placeholder="key id 
..." ng-model="key_id"></input>
      </div>
      <button type="submit" class="btn btn-primary" 
ng-click="z.angularBind('key_id',key_id,'PUT_HERE_SECOND_PARAGRAPH_ID'); 
z.runParagraph('PUT_HERE_SECOND_PARAGRAPH_ID')"> Bind</button>
    </form>
    ```
    Second paragraph content:
    ```
    %cassandra
    
    INSERT INTO cassandra_v3.simple(key,value) VALUES(1, 'first'); 
    INSERT INTO cassandra_v3.simple(key,value) VALUES(2, 'second');
    INSERT INTO cassandra_v3.simple(key,value) VALUES(3, 'third');
    
    SELECT * FROM cassandra_v3.simple WHERE key={{key_id=1}};
    ```
    Replace `PUT_HERE_SECOND_PARAGRAPH_ID` in the angular code of the first 
paragraph by the real paragraph id of the second paragraph. Execute the first 
paragraph, put a value into the input text (3) and click on **Bind**, you 
should see the following result:
    
    
![image](https://cloud.githubusercontent.com/assets/1532977/15740626/e9d9deba-28b5-11e6-9708-f040a8d58ccd.png)
    
    
    ### Screenshots (if appropriate)
    
    ### Questions:
    * Does the licenses files need update? --> **No**
    * Is there breaking changes for older versions? --> **No**
    * Does this needs documentation? --> **Yes**
    
    [ZEPPELIN-901]: https://issues.apache.org/jira/browse/ZEPPELIN-901
    [Cassandra 3.5]: http://cassandra.apache.org/download/

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/doanduyhai/incubator-zeppelin 
CassandraInterpreterV3

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-zeppelin/pull/950.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #950
    
----
commit 8e49a055748a8b77d0ca369101d710a16c34f75d
Author: DuyHai DOAN <doanduy...@gmail.com>
Date:   2016-01-27T20:03:50Z

    [ZEPPELIN-901] Add missing support for ALTER statements

commit 4914c696eab7373eb032eacedc0a1d9fbefad390
Author: DuyHai DOAN <doanduy...@gmail.com>
Date:   2016-01-27T22:20:42Z

    [ZEPPELIN-901] Look for data in AngularObjectRegistry before creating 
dynamic form

commit c85d928e5667f116170f688f515312af3d3999a9
Author: DuyHai DOAN <doanduy...@gmail.com>
Date:   2016-05-11T14:15:33Z

    [ZEPPELIN-901] Allow interpreter to add dynamic forms programmatically when 
using FormType.SIMPLE

commit 449e42cf9b27b173829de310439ed18994c4eb92
Author: DuyHai DOAN <doanduy...@gmail.com>
Date:   2016-05-11T16:47:04Z

    [ZEPPELIN-901] Fixing typo on FallThroughPolicy

commit 6a057492ad37bb5e91afdea243141c9513a9cb9c
Author: DuyHai DOAN <doanduy...@gmail.com>
Date:   2016-05-11T16:47:32Z

    [ZEPPELIN-901] Allow dynamic form using default Zeppelin syntax

commit e27741f448c9878ab90744cb7ce6d95b0a808b99
Author: DuyHai DOAN <doanduy...@gmail.com>
Date:   2016-05-11T15:08:02Z

    [ZEPPELIN-901] Upgrade Java driver version to 3.0.1

commit 9d45bba8f54ba55abc10678a836f0e9a7c2964fd
Author: DuyHai DOAN <doanduy...@gmail.com>
Date:   2016-05-11T17:06:51Z

    [ZEPPELIN-901] Implement new @requestTimeOut runtime option

commit b434cc131b308145b077017b1d5d5f152fa8a6f2
Author: DuyHai DOAN <doanduy...@gmail.com>
Date:   2016-05-30T16:07:50Z

    [ZEPPELIN-901] Add support for binary protocol V4

commit 8e39846f49f79956dc7139ab9570e6b3d5767e5a
Author: DuyHai DOAN <doanduy...@gmail.com>
Date:   2016-05-30T15:41:53Z

    [ZEPPELIN-901] Update documentation

commit e12400ecc2e13c9ee9b87a0e9ca2f558bea94ada
Author: DuyHai DOAN <doanduy...@gmail.com>
Date:   2016-05-30T19:30:46Z

    [ZEPPELIN-901] Update interactive documentation

commit abd42e32d05c5bf4eb41c5820379d04f4b79c8be
Author: DuyHai DOAN <doanduy...@gmail.com>
Date:   2016-06-02T18:07:17Z

    [ZEPPELIN-901] Update documentation after code review

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to