shark icon indicating copy to clipboard operation
shark copied to clipboard

[WIP] Add CLI Support for Catalyst

Open chenghao-intel opened this issue 11 years ago • 37 comments
trafficstars

  • Support reload the cachedRDD upon the start
  • Support the CLI switch for Hive/Catalyst
$ bin/shark
catalyst> show tables;
Execution Mode: catalyst
OK
shark_test1
shark_test1_cached
Time taken: 0.011 seconds

catalyst> explain select * from shark_test1;
Execution Mode: catalyst
== Logical Plan ==
Project [key#0,val#1]
 MetastoreRelation default, shark_test1, None

== Optimized Logical Plan ==
MetastoreRelation default, shark_test1, None

== Physical Plan ==
HiveTableScan [key#0,val#1], (MetastoreRelation default, shark_test1, None), None
Time taken: 0.172 seconds

catalyst> set shark.exec.mode=hive;
hive> explain select * from shark_test1;
Execution Mode: hive
OK
ABSTRACT SYNTAX TREE:
  (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME shark_test1))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR TOK_ALLCOLREF))))

STAGE DEPENDENCIES:
  Stage-0 is a root stage

STAGE PLANS:
  Stage: Stage-0
    Fetch Operator
      limit: -1
      Processor Tree:
        TableScan
          alias: shark_test1
          Select Operator
            expressions:
                  expr: key
                  type: int
                  expr: val
                  type: string
            outputColumnNames: _col0, _col1
            ListSink


Time taken: 0.107 seconds

chenghao-intel avatar Jun 04 '14 07:06 chenghao-intel

@marmbrus Can you review that for me? Sorry, lots of code, but most of them are copied from the Shark.

chenghao-intel avatar Jun 04 '14 07:06 chenghao-intel

Merged build triggered.

AmplabJenkins avatar Jun 04 '14 07:06 AmplabJenkins

Merged build started.

AmplabJenkins avatar Jun 04 '14 07:06 AmplabJenkins

Merged build finished.

AmplabJenkins avatar Jun 04 '14 07:06 AmplabJenkins

Refer to this link for build results: https://amplab.cs.berkeley.edu/jenkins/job/Shark-Pull-Request-Builder/12203/

AmplabJenkins avatar Jun 04 '14 07:06 AmplabJenkins

Still found some jar conflict issues, I will keep updating.

chenghao-intel avatar Jun 04 '14 08:06 chenghao-intel

Merged build triggered.

AmplabJenkins avatar Jun 05 '14 15:06 AmplabJenkins

Merged build started.

AmplabJenkins avatar Jun 05 '14 15:06 AmplabJenkins

SharkServer2Suite failed in my local test, seems the namespace conflict for the rewritten class CliService.java / HiveServer2.java, I will figure out how to fix that soon.

Besides, I removed the cached RDD reload code for next PR.

chenghao-intel avatar Jun 05 '14 15:06 chenghao-intel

Merged build finished.

AmplabJenkins avatar Jun 05 '14 15:06 AmplabJenkins

Refer to this link for build results: https://amplab.cs.berkeley.edu/jenkins/job/Shark-Pull-Request-Builder/12204/

AmplabJenkins avatar Jun 05 '14 15:06 AmplabJenkins

Merged build triggered.

AmplabJenkins avatar Jun 05 '14 15:06 AmplabJenkins

Merged build started.

AmplabJenkins avatar Jun 05 '14 15:06 AmplabJenkins

Merged build finished.

AmplabJenkins avatar Jun 05 '14 15:06 AmplabJenkins

Refer to this link for build results: https://amplab.cs.berkeley.edu/jenkins/job/Shark-Pull-Request-Builder/12205/

AmplabJenkins avatar Jun 05 '14 15:06 AmplabJenkins

Merged build triggered.

AmplabJenkins avatar Jun 05 '14 15:06 AmplabJenkins

Merged build started.

AmplabJenkins avatar Jun 05 '14 15:06 AmplabJenkins

Merged build finished.

AmplabJenkins avatar Jun 05 '14 15:06 AmplabJenkins

Refer to this link for build results: https://amplab.cs.berkeley.edu/jenkins/job/Shark-Pull-Request-Builder/12206/

AmplabJenkins avatar Jun 05 '14 15:06 AmplabJenkins

@chenghao-intel thanks for working on this. I think it is ok to not have the other features for now. We just need a CLI that we can use to query.

rxin avatar Jun 05 '14 18:06 rxin

The CLI is ready now, and it passed the unit test in my local (SharkServer2 doens't work in my local still), But Jenkins failed in retrieving the httpclient jar, @rxin , can you check that also in your local if possible? I am not sure if any env setting that only work for myself.

chenghao-intel avatar Jun 06 '14 02:06 chenghao-intel

Jenkins, retest this please.

rxin avatar Jun 06 '14 05:06 rxin

Merged build triggered.

AmplabJenkins avatar Jun 06 '14 05:06 AmplabJenkins

Merged build started.

AmplabJenkins avatar Jun 06 '14 05:06 AmplabJenkins

Merged build finished.

AmplabJenkins avatar Jun 06 '14 05:06 AmplabJenkins

Refer to this link for build results: https://amplab.cs.berkeley.edu/jenkins/job/Shark-Pull-Request-Builder/12207/

AmplabJenkins avatar Jun 06 '14 05:06 AmplabJenkins

Still failed in retrieving the jar httpclient.

chenghao-intel avatar Jun 06 '14 07:06 chenghao-intel

Could it be missing a repository?

rxin avatar Jun 06 '14 07:06 rxin

Actually I 've added 3 more repository.

chenghao-intel avatar Jun 06 '14 07:06 chenghao-intel

I confirm that I can build this locally.

@pwendell can we clear the .m2 / .ivy2 cache on the Jenkins machine?

rxin avatar Jun 06 '14 07:06 rxin