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 2016/11/09 00:32:44 UTC

[GitHub] zeppelin pull request #1617: ZEPPELIN-1645: JDBC Interpreter does not commit...

GitHub user randerzander opened a pull request:

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

    ZEPPELIN-1645: JDBC Interpreter does not commit updates

    ### What is this PR for?
    Allow users to issue insert/update/upsert statements from Zeppelin notes
    
    ### What type of PR is it?
    Improvement
    
    ### Todos
    * [ ] - Task
    
    ### What is the Jira issue?
    [ZEPPELIN-1645](https://issues.apache.org/jira/browse/ZEPPELIN-1645)
    
    ### How should this be tested?
    For Phoenix Interpreter:
    Paragraph 1:
    %jdbc
    UPSERT INTO CX_TEST (ACCT_NBR, HSE_ID) VALUES ('a', 'b')
    Paragraph 2:
    select count(*) from cx_test
    
    Result: 1
    
    ### Questions:
    * Does the licenses files need update?
    No
    * Is there breaking changes for older versions?
    No
    * Does this needs documentation?
    Yes - JDBC README updated
    


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/1617.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 #1617
    
----
commit 03f3f181a601f036f6a058fe23dd460db0aa7e41
Author: Randy Gelhausen <rg...@gmail.com>
Date:   2016-11-09T00:23:42Z

    Added commit after JDBC statement execution

commit 20f186f5788cf38fb9368a1e8e82a93fb88829f2
Author: Randy Gelhausen <rg...@gmail.com>
Date:   2016-11-09T00:31:47Z

    updated JDBC Readme

----


---
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 #1617: ZEPPELIN-1645: JDBC Interpreter does not commit update...

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

    https://github.com/apache/zeppelin/pull/1617
  
    @matthewLiem Maybe, some jdbc driver may support some parameters like `?autocommit=true` in it's connection url. But it depends on driver implementation whether they have such feature or not.
    Except for that, i can't think any workaround but applying this patch.


---
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 #1617: ZEPPELIN-1645: JDBC Interpreter does not commit update...

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

    https://github.com/apache/zeppelin/pull/1617
  
    @randerzander Thanks for the contribution.
    
    LGTM and Merge to master if there're no more discussions.


---
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 #1617: ZEPPELIN-1645: JDBC Interpreter does not commit update...

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

    https://github.com/apache/zeppelin/pull/1617
  
    The failed test is some bower.json issue, unrelated to the change in this PR.


---
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 #1617: ZEPPELIN-1645: JDBC Interpreter does not commit update...

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

    https://github.com/apache/zeppelin/pull/1617
  
    The failed test is in the Python interpreter, unrelated to this JDBC change.


---
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 #1617: ZEPPELIN-1645: JDBC Interpreter does not commit...

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

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


---
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 #1617: ZEPPELIN-1645: JDBC Interpreter does not commit update...

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

    https://github.com/apache/zeppelin/pull/1617
  
    In order to call `commit()` in mysql, `auto commit` should be `false` otherwise it throws `SQLException` like following.
    ```
    java.sql.SQLException: Can't call commit when autocommit=true
    	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:868)
    	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:864)
    	at com.mysql.jdbc.ConnectionImpl.commit(ConnectionImpl.java:1608)
    	at org.apache.zeppelin.jdbc.JDBCInterpreter.executeSql(JDBCInterpreter.java:405)
    	at org.apache.zeppelin.jdbc.JDBCInterpreter.interpret(JDBCInterpreter.java:459)
    	at org.apache.zeppelin.interpreter.LazyOpenInterpreter.interpret(LazyOpenInterpreter.java:94)
    	at org.apache.zeppelin.interpreter.remote.RemoteInterpreterServer$InterpretJob.jobRun(RemoteInterpreterServer.java:447)
    	at org.apache.zeppelin.scheduler.Job.run(Job.java:176)
    	at org.apache.zeppelin.scheduler.ParallelScheduler$JobRunner.run(ParallelScheduler.java:162)
    	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
    	at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)
    	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)
    	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    	at java.lang.Thread.run(Thread.java:745)
    ```
    Could you address this?



---
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 #1617: ZEPPELIN-1645: JDBC Interpreter does not commit update...

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

    https://github.com/apache/zeppelin/pull/1617
  
    @astroshim Added a safety check on autocommit status


---
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 #1617: ZEPPELIN-1645: JDBC Interpreter does not commit update...

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

    https://github.com/apache/zeppelin/pull/1617
  
    @randerzander @Leemoonsoo 
    Thanks for this. Do you know of  a workaround we could use in the meantime? 


---
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 #1617: ZEPPELIN-1645: JDBC Interpreter does not commit update...

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

    https://github.com/apache/zeppelin/pull/1617
  
    @randerzander Could you rebase?


---
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.
---