I am having trouble running queries with Shark locally on Mac OSX 10.8. I am trying to run some test queries on data stored in Hive. I am using Scala 2.9.3 and Hive 0.9.0 and both seem to be running fine. The Hive database is using MySQL to store metadata.
I can start up Shark fine. I can see all my databases in Hive in the Shark console. I can switch to the desired database. But when I try to query data I get errors.
The simple query looks like this:
select * from table limit 100;
The error looks like this:
25.351: [Full GC 98320K->17564K(1013632K), 0.1279630 secs]
java.lang.NoSuchMethodError: org.apache.hadoop.hive.shims.HadoopShims.isLocalMode(Lorg/apache/hadoop/conf/Configuration;)Z
at shark.execution.FileSinkOperator.execute(FileSinkOperator.scala:123)
at shark.execution.SparkTask.execute(SparkTask.scala:101)
at org.apache.hadoop.hive.ql.exec.Task.executeTask(Task.java:134)
at org.apache.hadoop.hive.ql.exec.TaskRunner.runSequential(TaskRunner.java:57)
at org.apache.hadoop.hive.ql.Driver.launchTask(Driver.java:1326)
at org.apache.hadoop.hive.ql.Driver.execute(Driver.java:1118)
at org.apache.hadoop.hive.ql.Driver.run(Driver.java:951)
at shark.SharkCliDriver.processCmd(SharkCliDriver.scala:294)
at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:406)
at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:341)
at shark.SharkCliDriver$.main(SharkCliDriver.scala:203)
at shark.SharkCliDriver.main(SharkCliDriver.scala)
FAILED: Execution Error, return code -101 from shark.execution.SparkTask
this looks like a recent addition to Shark code, https://github.com/amplab/shark/pull/140/files perhaps wasn't tested with Hive 0.9?
current HadoopShims.java
does have the isLocalMode()
, but the Hive 0.9 HadoopShims.java
does not have the isLocalMode()
method.
I would recommend using at least Hive 0.10, or even better a recent 0.12 if you can.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.