You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zeppelin.apache.org by benbromhead <gi...@git.apache.org> on 2015/05/28 08:47:31 UTC

[GitHub] incubator-zeppelin pull request: Initial support for CassandraSQLC...

GitHub user benbromhead opened a pull request:

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

    Initial support for CassandraSQLContext for %sql queries

    Allow users to use %sql syntax to query Cassandra tables with SparkSQL without having to manually create a CassandraSQLContext.
    
    Expanding on "Add build profile for Spark/Cassandra integration #79"
    
    To enable Cassandra SQL context support add -Dzeppelin.spark.useCassandraContext=true to the ZEPPELIN_JAVA_OPTS parameter in conf/zeppelin-env.sh file. Alternatively you can add this parameter in the parameter list of the Spark interpreter on the GUI.
    
    Also supported are "spark.cassandra.connection.host",  "spark.cassandra.auth.username" and "spark.cassandra.auth.password" parameters.


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

    $ git pull https://github.com/benbromhead/incubator-zeppelin cassandraSQLsupport

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

    https://github.com/apache/incubator-zeppelin/pull/86.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 #86
    
----
commit fb27ababd04519308d1f0e70daa8c700db53c80a
Author: Ben Bromhead <be...@instaclustr.com>
Date:   2015-05-28T06:30:58Z

    Added support for CassandraSQLContext for %sql queries

----


---
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: Initial support for CassandraSQLC...

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

    https://github.com/apache/incubator-zeppelin/pull/86#issuecomment-135446119
  
    +1


---
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: Initial support for CassandraSQLC...

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

    https://github.com/apache/incubator-zeppelin/pull/86#issuecomment-122370605
  
    Ok I finally got around to completing some unit tests and changing the default values for the various interpreters.
    
    In this PR I've changed the default behaviour of the SparkInterpreter to use the standard SQLContext by default rather than the HiveContext. This will potentially break peoples notebooks on upgrade if they are relying on Hive syntax/functionality rather than Spark SQL syntax without realising 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: Initial support for CassandraSQLC...

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

    https://github.com/apache/incubator-zeppelin/pull/86#issuecomment-110069613
  
    Thanks for great contribution!
    
    And how about add `zeppelin.spark.useCassandraContext` into property builder?
    
    ```
      static {
         Interpreter.register(
             "spark",
             "spark",
             SparkInterpreter.class.getName(),
             new InterpreterPropertyBuilder()
                 .add("spark.app.name", "Zeppelin", "The name of spark application.")
                 ...
                 .add("zeppelin.spark.useHiveContext", "true",
                      "Use HiveContext instead of SQLContext if it is true.")
                 ...
    ```
    
    both `zeppelin.spark.useCassandraContext`, `zeppelin.spark.useHiveContext` can be true or false. In this case, in user point of view, it's very unclear to see what's going to happen. Do you have an idea to handle it?
    
    And Is it going to be difficult to add a test for 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: Initial support for CassandraSQLC...

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

    https://github.com/apache/incubator-zeppelin/pull/86#issuecomment-188638339
  
    @Leemoonsoo @benbromhead Do you guys have any update for this? It looks like pending state.


---
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: Initial support for CassandraSQLC...

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

    https://github.com/apache/incubator-zeppelin/pull/86#issuecomment-123868220
  
    `zeppelin.spark.useHiveContext` was originally 'false' but changed to 'true'. The reason was to give the same experience with spark-shell, which uses HiveContext by default.
    
    I think changing `zeppelin.spark.useHiveContext` need to be handled in separate issue if it is not breaking this contribution.


---
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: Initial support for CassandraSQLC...

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

    https://github.com/apache/incubator-zeppelin/pull/86#issuecomment-115362283
  
    @benbromhead let me know if I can help. I have played with it all day long today, using zeppelin forms and registering custom functions to be applied  on results. Every thing works fine so far.


---
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: Initial support for CassandraSQLC...

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

    https://github.com/apache/incubator-zeppelin/pull/86#issuecomment-115203941
  
    While I have tried to make Zeppelin to work with DSE 4.6 I have integrated also this change. I'm able to properly query cassandra db. However, if there is an error, the notebook will display a generic error that is not helping at all to identify the root cause. (java.lang.reflect.InvocationTargetException).
    
    if zeppelin.spark.useCassandraContext is set to true, then the value of zeppelin.spark.useHiveContext it doesn't matter. Even if it set to true it will still bind to cassandra context.  
    I think that there is a need for a small change to make sure that just on of the context could be set to true and not both....


---
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: Initial support for CassandraSQLC...

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

    https://github.com/apache/incubator-zeppelin/pull/86#issuecomment-188806844
  
    Can someone provide additional 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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-zeppelin pull request: Initial support for CassandraSQLC...

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

    https://github.com/apache/incubator-zeppelin/pull/86#issuecomment-140174012
  
    Anything left to do on this before it gets merged?


---
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: Initial support for CassandraSQLC...

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

    https://github.com/apache/incubator-zeppelin/pull/86#issuecomment-122374821
  
    @benbromhead, I'm writing a Cassandra interpreter (connecting Zeppelin directly to C* without going through Spark). Does it worth the effort to have a CassandraSQL 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: Initial support for CassandraSQLC...

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

    https://github.com/apache/incubator-zeppelin/pull/86#issuecomment-190314811
  
    The codebase has probably shifted a little bit since this last passed tests etc, do you want me to update and test against the latest master?


---
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: Initial support for CassandraSQLC...

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

    https://github.com/apache/incubator-zeppelin/pull/86#issuecomment-115352983
  
    Apologies I haven't had a whole heap of bandwidth to address the comments above, after chatting @Leemoonsoo at the spark conference the other week I have a good idea about integrating some tests and cleaning up the above mentioned issues.
    
    Stay tuned.


---
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: Initial support for CassandraSQLC...

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

    https://github.com/apache/incubator-zeppelin/pull/86#issuecomment-108490396
  
    Dude, nice work.


---
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: Initial support for CassandraSQLC...

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

    https://github.com/apache/incubator-zeppelin/pull/86#issuecomment-123879282
  
    Ok makes sense, changed back to use the HiveContext by default


---
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: Initial support for CassandraSQLC...

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

    https://github.com/apache/incubator-zeppelin/pull/86#issuecomment-122417036
  
    @doanduyhai I think it is... particularly if you want to do things like joins :)


---
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: Initial support for CassandraSQLC...

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

    https://github.com/apache/incubator-zeppelin/pull/86#issuecomment-169801836
  
    Looks like this request was close to getting merged months ago, any status update on 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] incubator-zeppelin pull request: Initial support for CassandraSQLC...

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

    https://github.com/apache/incubator-zeppelin/pull/86#issuecomment-123802962
  
    @Leemoonsoo yeah I struggled to come up with a good answer for this. On the one hand I think the default behaviour should be to use the standard SQLSpark context, but by changing this it will break the default behaviour for users that rely on Hive features.
    
    You will notice that the sql context tests actually rely on Hive syntax rather than spark sql compliant syntax. My vote would be to go with what is correct early on in this projects life, but I know this will be irritating for existing users.
    
    Happy to revert to the previous behaviour. 


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