You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zeppelin.apache.org by 1teed <gi...@git.apache.org> on 2015/05/04 12:11:36 UTC

[GitHub] incubator-zeppelin pull request: Add JDBC Interpreter for Mysql

GitHub user 1teed opened a pull request:

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

    Add JDBC Interpreter for Mysql

    I added jdbc interpreter for mysql
    
    I used Abstract Factory Pattern
    It has the advantage that can be separated using the JDBC Connection only argument value
    
    ![1](https://cloud.githubusercontent.com/assets/4284583/7451786/c3b44b10-f28f-11e4-8332-fe9133fe8f06.PNG)
    
    How to add your jdbc driver
    1. add dependency for your jdbc driver (pom.xml)
    2. implement Sub-Class (like MysqlConnection)
    3. add branch connection in Factory Class (DBConnectionFactory)
    > It can be extended any jdbc. Such as Oracle, HIVE, Tajo, hBase, MariaDB, ...
    
    Set interpreter
    ![2015-05-04 18 47 59](https://cloud.githubusercontent.com/assets/4284583/7451794/e48ec89c-f28f-11e4-8318-cc060061d320.PNG)
    
    How  to Use
    ![2015-05-04 19 02 27](https://cloud.githubusercontent.com/assets/4284583/7451821/2bf1ad6c-f290-11e4-872a-2936baf9f139.PNG)

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

    $ git pull https://github.com/1teed/incubator-zeppelin master

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

    https://github.com/apache/incubator-zeppelin/pull/60.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 #60
    
----
commit 4747f8969525890d0507315e93534a0f52f3c1fd
Author: Hyungu Roh <hy...@navercorp.com>
Date:   2015-05-04T09:56:52Z

    Add JDBC Interpreter for Mysql

----


---
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] incubator-zeppelin pull request: Add JDBC Interpreter for Mysql

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

    https://github.com/apache/incubator-zeppelin/pull/60#issuecomment-128877615
  
    > Do you pack mysql-connector.jar within the release?
    
    I think answer currently is yes, although binary packages are provided as a favor.
    
    Exclude mysql interpreter by default from the build, but let user enabling with some special flag, will this solve the license issue?



---
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] incubator-zeppelin pull request: Add JDBC Interpreter for Mysql

Posted by jmrr <gi...@git.apache.org>.
Github user jmrr commented on the pull request:

    https://github.com/apache/incubator-zeppelin/pull/60#issuecomment-110856364
  
    +1 please go ahead and merge into master
    
    On Wed, Jun 10, 2015 at 6:40 PM, riomario1 <no...@github.com> wrote:
    
    > Looks good, when are we merging it?
    >
    > —
    > Reply to this email directly or view it on GitHub
    > <https://github.com/apache/incubator-zeppelin/pull/60#issuecomment-110847719>
    > .
    >



---
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] incubator-zeppelin pull request: Add JDBC Interpreter for Mysql

Posted by martin-g <gi...@git.apache.org>.
Github user martin-g commented on the pull request:

    https://github.com/apache/incubator-zeppelin/pull/60#issuecomment-129855077
  
    At http://apache.cbox.biz/incubator/zeppelin/0.5.0-incubating/ (my neareast Apache mirror) I see two binary downloads and one source download.
    If you don't include mysql-connector.jar in the binaries then everything is fine.
    People wanting to use the MySQL interpreter should build Zeppelin from source (i.e. should use the third download: zeppelin-0.5.0-incubating.tgz).
    Zeppelin's distributions should not bring mysql-connector.jar with them. Maven's `<dependency>...</dependency>` and code like `import com.mysql.*` doesn't violate the rules, so it is safe to have it in Apache sources.


---
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] incubator-zeppelin pull request: Add JDBC Interpreter for Mysql

Posted by 1teed <gi...@git.apache.org>.
Github user 1teed commented on the pull request:

    https://github.com/apache/incubator-zeppelin/pull/60#issuecomment-99414971
  
    @Leemoonsoo 
    
    Thanks for your comment.
    I fix mysql dependency to meet The GNU General Public License, Version 2 in pom.xml.
    And add JDBCInterpreter to ZEPPELIN_INTERPRETERS in zeppelin-zengine/src/main/java/org/apache/conf/ZeppelinConfiguration.java.


---
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] incubator-zeppelin pull request: Add JDBC Interpreter for Mysql

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

    https://github.com/apache/incubator-zeppelin/pull/60#issuecomment-188634868
  
    @1teed please close 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] incubator-zeppelin pull request: Add JDBC Interpreter for Mysql

Posted by jmrr <gi...@git.apache.org>.
Github user jmrr commented on the pull request:

    https://github.com/apache/incubator-zeppelin/pull/60#issuecomment-117999770
  
    What happened to this? It hasn't been merged to master yet and I'm having problems merging it locally as the master branch is starting to diverge...
    
    Thanks


---
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] incubator-zeppelin pull request: Add JDBC Interpreter for Mysql

Posted by 1teed <gi...@git.apache.org>.
Github user 1teed commented on the pull request:

    https://github.com/apache/incubator-zeppelin/pull/60#issuecomment-99732488
  
    @sylvinho81 
    
    Thank you for your interest.
    
    I think you seem to be not latest source.
    Please update to the latest sources.
    
    Please check this update.
    ![2015-05-07 14 59 15](https://cloud.githubusercontent.com/assets/4284583/7509297/d1400e5e-f4c9-11e4-9c20-09842b7e6557.PNG)



---
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] incubator-zeppelin pull request: Add JDBC Interpreter for Mysql

Posted by rquast <gi...@git.apache.org>.
Github user rquast commented on the pull request:

    https://github.com/apache/incubator-zeppelin/pull/60#issuecomment-125924988
  
    Is this getting merged still? Just tried it out and found that it could do with some default settings for the interpreter (jdbc, host, user, password, port). Works great - very useful.


---
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] incubator-zeppelin pull request: Add JDBC Interpreter for Mysql

Posted by riomario1 <gi...@git.apache.org>.
Github user riomario1 commented on the pull request:

    https://github.com/apache/incubator-zeppelin/pull/60#issuecomment-128788003
  
    Hi,
    
    How do I use MySQL with zeppelin?
    
    Please provide steps
    
    Thank you


---
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] incubator-zeppelin pull request: Add JDBC Interpreter for Mysql

Posted by tdunning <gi...@git.apache.org>.
Github user tdunning commented on the pull request:

    https://github.com/apache/incubator-zeppelin/pull/60#issuecomment-127311135
  
    Yes.  The GPL license makes mysql-connector be category X.  We cannot ship a release with that component, even unmodified.


---
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] incubator-zeppelin pull request: Add JDBC Interpreter for Mysql

Posted by riomario1 <gi...@git.apache.org>.
Github user riomario1 commented on the pull request:

    https://github.com/apache/incubator-zeppelin/pull/60#issuecomment-136057196
  
    Mysql is the most awaited feature :) 
    
    Sent from my iPhone
    
    > On Aug 29, 2015, at 4:18 PM, neptun2000 <no...@github.com> wrote:
    > 
    > When do you planning to release MySQL interpreter ?
    > Thanks
    > 
    > —
    > Reply to this email directly or view it on GitHub.
    > 



---
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] incubator-zeppelin pull request: Add JDBC Interpreter for Mysql

Posted by sylvinho81 <gi...@git.apache.org>.
Github user sylvinho81 commented on the pull request:

    https://github.com/apache/incubator-zeppelin/pull/60#issuecomment-99417733
  
    Hi @1teed,
    
    I am trying to apply this patch and test it, because I think is really interesting and I need it. 
    After apply the changes and run:
    mvn clean package
    mvn install -DskipTests -Dspark.version=1.1.1 -Dhadoop.version=1.2.1
    
    I can see:
    
    [INFO] ------------------------------------------------------------------------
    [INFO] Reactor Summary:
    [INFO] 
    [INFO] Zeppelin ........................................... SUCCESS [  3.472 s]
    [INFO] Zeppelin: Interpreter .............................. SUCCESS [  9.269 s]
    [INFO] Zeppelin: Zengine .................................. SUCCESS [  3.835 s]
    [INFO] Zeppelin: Spark .................................... SUCCESS [ 23.308 s]
    [INFO] Zeppelin: Markdown interpreter ..................... SUCCESS [  2.025 s]
    [INFO] Zeppelin: Angular interpreter ...................... SUCCESS [  1.958 s]
    [INFO] Zeppelin: Shell interpreter ........................ SUCCESS [  1.993 s]
    [INFO] Zeppelin: Hive interpreter ......................... SUCCESS [  2.094 s]
    [INFO] Zeppelin: Tajo interpreter ......................... SUCCESS [  1.971 s]
    [INFO] Zeppelin: JDBC interpreter ......................... SUCCESS [  1.922 s]
    [INFO] Zeppelin: web Application .......................... SUCCESS [ 45.557 s]
    [INFO] Zeppelin: Server ................................... SUCCESS [  4.682 s]
    [INFO] Zeppelin: Packaging distribution ................... SUCCESS [  0.439 s]
    
    But when I execute "bin/zeppelin-daemon.sh  start" and try to add the interpreter in  http://localhost:8080/ I can not see the option "jdbc" in the dropdown "Interpreter".
    



---
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] incubator-zeppelin pull request: Add JDBC Interpreter for Mysql

Posted by martin-g <gi...@git.apache.org>.
Github user martin-g commented on the pull request:

    https://github.com/apache/incubator-zeppelin/pull/60#issuecomment-127580813
  
    Do you pack mysql-connector.jar within the release?
    If YES then there is a problem.
    If the user has to provide the jar herself (e.g. by executing `mvn install` locally) then everything is fine.


---
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] incubator-zeppelin pull request: Add JDBC Interpreter for Mysql

Posted by jmrr <gi...@git.apache.org>.
Github user jmrr commented on the pull request:

    https://github.com/apache/incubator-zeppelin/pull/60#issuecomment-104373982
  
    Are temporary tables possible with the interpreter connector? I quickly tried one and got `Can not issue data manipulation statements with executeQuery().`
    
    Apart from that everything else runs smoothly.
    
    Thanks!


---
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] incubator-zeppelin pull request: Add JDBC Interpreter for Mysql

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

    https://github.com/apache/incubator-zeppelin/pull/60#issuecomment-107302737
  
    @Leemoonsoo Concerning licenses, I've heard that GPL shouldn't be included in apache projects, and known that some project in Apache also doesn't have a mysql-connector-java packages due to same reason. I think JdbcInterpreter looks better and general. @1teed How about you?


---
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] incubator-zeppelin pull request: Add JDBC Interpreter for Mysql

Posted by riomario1 <gi...@git.apache.org>.
Github user riomario1 commented on the pull request:

    https://github.com/apache/incubator-zeppelin/pull/60#issuecomment-110847719
  
    Looks good, when are we merging it?


---
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] incubator-zeppelin pull request: Add JDBC Interpreter for Mysql

Posted by neptun2000 <gi...@git.apache.org>.
Github user neptun2000 commented on the pull request:

    https://github.com/apache/incubator-zeppelin/pull/60#issuecomment-136043139
  
    When do you planning to release MySQL interpreter ?
    Thanks


---
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] incubator-zeppelin pull request: Add JDBC Interpreter for Mysql

Posted by sylvinho81 <gi...@git.apache.org>.
Github user sylvinho81 commented on the pull request:

    https://github.com/apache/incubator-zeppelin/pull/60#issuecomment-99785556
  
    Thanks @1teed.  I had not seen the latest changes


---
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] incubator-zeppelin pull request: Add JDBC Interpreter for Mysql

Posted by ZhijieWang <gi...@git.apache.org>.
Github user ZhijieWang commented on the pull request:

    https://github.com/apache/incubator-zeppelin/pull/60#issuecomment-107078417
  
    @1teed  I added postgresql support and create a merge request to your repo.
    
    Limitation of this interpreter -- may crush zeppelin when running large query.


---
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] incubator-zeppelin pull request: Add JDBC Interpreter for Mysql

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

    https://github.com/apache/incubator-zeppelin/pull/60#issuecomment-99353415
  
    Thanks for the contribution.
    
    For default value of zeppelin-site.xml, you'll need add JDBCInterpreter to zeppelin-zengine/src/main/java/org/apache/conf/ZeppelinConfiguration.java L384, ZEPPELIN_INTERPRETERS.
    
    And about mysql dependency in jdbc/pom.xml file, 
    ```
        <dependency>
          <groupId>mysql</groupId>
          <artifactId>mysql-connector-java</artifactId>
          <version>5.1.6</version>
        </dependency>
    ```
    I think the dependency's version is The GNU General Public License, Version 2 and should not be used.



---
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] incubator-zeppelin pull request: Add JDBC Interpreter for Mysql

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

    https://github.com/apache/incubator-zeppelin/pull/60#issuecomment-162319547
  
    @1teed Hi, do you still have an interest to contribute this feature? I've found that your PR is the first one for supporting JDBC thus I think it's important to ask your opinion.


---
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] incubator-zeppelin pull request: Add JDBC Interpreter for Mysql

Posted by jmrr <gi...@git.apache.org>.
Github user jmrr commented on the pull request:

    https://github.com/apache/incubator-zeppelin/pull/60#issuecomment-101208857
  
    @1teed Thanks for the contribution. Tested with a centos-zeppeling docker image and works fine! Looking forward to the merge!


---
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] incubator-zeppelin pull request: Add JDBC Interpreter for Mysql

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

    https://github.com/apache/incubator-zeppelin/pull/60#issuecomment-166234850
  
    @1teed Now, I will try to contact @andrescelis to accept jdbc interpreter. I hope you would understand it. And please check the mailing(https://www.mail-archive.com/dev@zeppelin.incubator.apache.org/msg05504.html) and issue(https://issues.apache.org/jira/browse/ZEPPELIN-439)


---
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] incubator-zeppelin pull request: Add JDBC Interpreter for Mysql

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

    https://github.com/apache/incubator-zeppelin/pull/60#issuecomment-127129085
  
    I'm not sure about merging it, while this implementation depends on `mysql-connector-java` that distributed in GPL 2 license. Please correct me if i'm wrong.
    



---
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] incubator-zeppelin pull request: Add JDBC Interpreter for Mysql

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

    https://github.com/apache/incubator-zeppelin/pull/60#issuecomment-101519927
  
    @hyonaldo be4b52b changes the mysql dependency version. but it is still GPLv2 License. 
    
    In my understanding, If code is depends on some GPL (depends means more like can not functioning without it), it can not be included. 
    And in our case, mysql driver is GPL and this interpreter looks like pretty much depends on mysql driver. 
    
    If i'm right, I think it's better to make JdbcInterpreter completely independent to mysql.
    And then we can make something similar to dependency loader of sparkinterpreter. so any jdbc driver could be loaded on the fly Instead of adding them in pom.xml.
    
    Any ideas?


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