You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zeppelin.apache.org by randerzander <gi...@git.apache.org> on 2017/06/05 15:50:16 UTC

[GitHub] zeppelin pull request #2396: [ZEPPELIN-2451]: Add JDBC config option for cal...

GitHub user randerzander opened a pull request:

    https://github.com/apache/zeppelin/pull/2396

    [ZEPPELIN-2451]: Add JDBC config option for calling connection.commit after paragraph execution

    Updated version of: https://github.com/apache/zeppelin/pull/2284
    
    ### What is this PR for?
    Adding config for automatically calling commit after JDBC paragraph execution
    
    ### What type of PR is it?
    [Improvement]
    
    ### What is the Jira issue?
    https://issues.apache.org/jira/browse/ZEPPELIN-2451
    
    ### How should this be tested?
    Create property zeppelin.jdbc.autocommit with value "true" under the JDBC interpreter, run an INSERT statement against a database. The insert should be committed and should be accessible in the database.
    
    Create property zeppelin.jdbc.autocommit with value "false" under the JDBC interpreter, run an INSERT statement against a database. The insert should not be committed and will not be in the database.
    
    
    ### Questions:
    * Does the licenses files need update?
    No
    * Is there breaking changes for older versions?
    No
    * Does this needs documentation?
    Yes


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

    $ git pull https://github.com/randerzander/zeppelin master

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

    https://github.com/apache/zeppelin/pull/2396.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 #2396
    
----
commit f2d62ff9132e2013e618e8dd64b5813352d48077
Author: Randy Gelhausen <rg...@gmail.com>
Date:   2017-06-05T15:37:07Z

    ZEPPELIN-2451

----


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] zeppelin issue #2396: [ZEPPELIN-2451]: Add JDBC config option for calling co...

Posted by jongyoul <gi...@git.apache.org>.
Github user jongyoul commented on the issue:

    https://github.com/apache/zeppelin/pull/2396
  
    @randerzander Can you fix the failure of CI?


---

[GitHub] zeppelin issue #2396: [ZEPPELIN-2451]: Add JDBC config option for calling co...

Posted by tzolov <gi...@git.apache.org>.
Github user tzolov commented on the issue:

    https://github.com/apache/zeppelin/pull/2396
  
    The `JDBC interpreter` uses Connection's auto-commit status to decide whether forceful to commit  the connection. As it as pointed above `commit` is not supported by many `NoSql` Jdbc implementation. The Apache Calcite's Avatica (which Druid uses by the way) is one of them. 
    
    The interpreter doesn't allow setting the desired connection auto-commit status. Since the JDBC API provides a standard [setAutoCommit(boolean)](https://docs.oracle.com/javase/8/docs/api/java/sql/Connection.html#setAutoCommit-boolean-) method to alter connections auto-commit status i believe this should be exposed as Explicit property. 
    
    Shouldn't the `zeppelin.jdbc.autocommit` be implemented as: 
    ```
    JDBCInterpreter#getConnection(..)
    ....
    connection.setAutoCommit(use zeppelin.jdbc.autocommit value)
    ....
    ```


---

[GitHub] zeppelin issue #2396: [ZEPPELIN-2451]: Add JDBC config option for calling co...

Posted by randerzander <gi...@git.apache.org>.
Github user randerzander commented on the issue:

    https://github.com/apache/zeppelin/pull/2396
  
    retest


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] zeppelin issue #2396: [ZEPPELIN-2451]: Add JDBC config option for calling co...

Posted by jongyoul <gi...@git.apache.org>.
Github user jongyoul commented on the issue:

    https://github.com/apache/zeppelin/pull/2396
  
    LGTM


---

[GitHub] zeppelin pull request #2396: [ZEPPELIN-2451]: Add JDBC config option for cal...

Posted by randerzander <gi...@git.apache.org>.
Github user randerzander closed the pull request at:

    https://github.com/apache/zeppelin/pull/2396


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] zeppelin issue #2396: [ZEPPELIN-2451]: Add JDBC config option for calling co...

Posted by tinkoff-dwh <gi...@git.apache.org>.
Github user tinkoff-dwh commented on the issue:

    https://github.com/apache/zeppelin/pull/2396
  
    @randerzander 
    autocommit is already in JDBCInterpreter. 
    ```
     finally {
          //In case user ran an insert/update/upsert statement
          if (connection != null) {
            try {
              if (!connection.getAutoCommit()) {
                connection.commit();
              }
              connection.close();
            } catch (SQLException e) { /*ignored*/ }
          } 
    ```
    
    You may close this PR.


---

[GitHub] zeppelin issue #2396: [ZEPPELIN-2451]: Add JDBC config option for calling co...

Posted by jongyoul <gi...@git.apache.org>.
Github user jongyoul commented on the issue:

    https://github.com/apache/zeppelin/pull/2396
  
    You'd better rebase from current master to make your branch newer.


---

[GitHub] zeppelin pull request #2396: [ZEPPELIN-2451]: Add JDBC config option for cal...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/zeppelin/pull/2396


---

[GitHub] zeppelin pull request #2396: [ZEPPELIN-2451]: Add JDBC config option for cal...

Posted by randerzander <gi...@git.apache.org>.
Github user randerzander closed the pull request at:

    https://github.com/apache/zeppelin/pull/2396


---

[GitHub] zeppelin issue #2396: [ZEPPELIN-2451]: Add JDBC config option for calling co...

Posted by randerzander <gi...@git.apache.org>.
Github user randerzander commented on the issue:

    https://github.com/apache/zeppelin/pull/2396
  
    @jongyoul I'm having trouble with CI.
    
    Jenkins tests pass except 3 that relate to Python interpreter, I believe unrelated to these small JDBC interpreter changes. Are the Python tests broken generally?
    
    AppVeyor seems stuck queued on the older version of this PR. Do you know of a way to refresh it?


---

[GitHub] zeppelin issue #2396: [ZEPPELIN-2451]: Add JDBC config option for calling co...

Posted by randerzander <gi...@git.apache.org>.
Github user randerzander commented on the issue:

    https://github.com/apache/zeppelin/pull/2396
  
    @jongyoul I fixed the Appveyor test, but having problems with the Jenkins Python tests.
    
    I don't believe these are related to my changes.. can you suggest what I can try next?


---

[GitHub] zeppelin pull request #2396: [ZEPPELIN-2451]: Add JDBC config option for cal...

Posted by randerzander <gi...@git.apache.org>.
GitHub user randerzander reopened a pull request:

    https://github.com/apache/zeppelin/pull/2396

    [ZEPPELIN-2451]: Add JDBC config option for calling connection.commit after paragraph execution

    Updated version of: https://github.com/apache/zeppelin/pull/2284
    
    ### What is this PR for?
    Adding config for automatically calling commit after JDBC paragraph execution
    
    ### What type of PR is it?
    [Improvement]
    
    ### What is the Jira issue?
    https://issues.apache.org/jira/browse/ZEPPELIN-2451
    
    ### How should this be tested?
    Create property zeppelin.jdbc.autocommit with value "true" under the JDBC interpreter, run an INSERT statement against a database. The insert should be committed and should be accessible in the database.
    
    Create property zeppelin.jdbc.autocommit with value "false" under the JDBC interpreter, run an INSERT statement against a database. The insert should not be committed and will not be in the database.
    
    
    ### Questions:
    * Does the licenses files need update?
    No
    * Is there breaking changes for older versions?
    No
    * Does this needs documentation?
    Yes


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

    $ git pull https://github.com/randerzander/zeppelin master

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

    https://github.com/apache/zeppelin/pull/2396.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 #2396
    
----
commit f2d62ff9132e2013e618e8dd64b5813352d48077
Author: Randy Gelhausen <rg...@gmail.com>
Date:   2017-06-05T15:37:07Z

    ZEPPELIN-2451

----


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] zeppelin pull request #2396: [ZEPPELIN-2451]: Add JDBC config option for cal...

Posted by randerzander <gi...@git.apache.org>.
GitHub user randerzander reopened a pull request:

    https://github.com/apache/zeppelin/pull/2396

    [ZEPPELIN-2451]: Add JDBC config option for calling connection.commit after paragraph execution

    Updated version of: https://github.com/apache/zeppelin/pull/2284
    
    ### What is this PR for?
    Adding config for automatically calling commit after JDBC paragraph execution
    
    ### What type of PR is it?
    [Improvement]
    
    ### What is the Jira issue?
    https://issues.apache.org/jira/browse/ZEPPELIN-2451
    
    ### How should this be tested?
    Create property zeppelin.jdbc.autocommit with value "true" under the JDBC interpreter, run an INSERT statement against a database. The insert should be committed and should be accessible in the database.
    
    Create property zeppelin.jdbc.autocommit with value "false" under the JDBC interpreter, run an INSERT statement against a database. The insert should not be committed and will not be in the database.
    
    
    ### Questions:
    * Does the licenses files need update?
    No
    * Is there breaking changes for older versions?
    No
    * Does this needs documentation?
    Yes


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

    $ git pull https://github.com/randerzander/zeppelin master

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

    https://github.com/apache/zeppelin/pull/2396.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 #2396
    
----
commit 1fd5c6533b59765ed48ff55a1822d5c591fca321
Author: Randy Gelhausen <rg...@gmail.com>
Date:   2017-12-12T03:42:10Z

    ZEPPELIN-2451: Add JDBC config option for calling connection.commit after paragraph execution

----


---