Question

I am a noobie for sharkle - though I do have some experience with spark. Every attempt being made to retrieve data from shark is hanging.

As a preliminary step: let's ensure that spark were up and healthy:

spark>
val tf = sc.textFile("hdfs://10.213.39.125:8020/hadoop/example/20417.txt")

 val c = tf.count 
..
14/04/10 19:44:34 INFO SparkContext: Job finished: count at <console>:14, took 0.161135127 s
c: Long = 12761

I have checked carefully about the shark-env.sh points to the spark installation correctly..

Now let us go to shark and try (a) the same file read and (b) a shark table read

(a)

shark>
       val tf = sc.textFile("hdfs://10.213.39.125:8020/hadoop/example/20417.txt")                          
tf: org.apache.spark.rdd.RDD[String] = MappedRDD[4] at textFile at <console>:17

scala>  val c2 = tf.count      
(wait minutes .. finally do control -c)


shark>
sc.makeRDD("select * from dual")
res1: org.apache.spark.rdd.RDD[Char] = ParallelCollectionRDD[2] at makeRDD at <console>:18

scala> res1.collect                                                                                        

(Once again:  wait minutes .. finally do control -c)

java.lang.InterruptedException
        at java.lang.Object.wait(Native Method)
        at java.lang.Object.wait(Object.java:485)
        at org.apache.spark.scheduler.JobWaiter.awaitResult(JobWaiter.scala:62)
        at org.apache.spark.scheduler.DAGScheduler.runJob(DAGScheduler.scala:313)
        at org.apache.spark.SparkContext.runJob(SparkContext.scala:725)
        at org.apache.spark.SparkContext.runJob(SparkContext.scala:744)
        at org.apache.spark.SparkContext.runJob(SparkContext.scala:758)
        at org.apache.spark.SparkContext.runJob(SparkContext.scala:772)
        at org.apache.spark.rdd.RDD.collect(RDD.scala:560)

More Details

Here are pertinent sections of the shark-env.sh

export SPARK_MEM=2g

# (Required) Set the master program's memory
export SHARK_MASTER_MEM=1g

# (Required) Point to your Scala installation.
export SCALA_HOME="/usr/local/scala-2.9.3"

# (Required) Point to the patched Hive binary distribution
export HIVE_HOME="/home/guest/shark-0.8.0-bin-hadoop1/hive-0.9.0-shark-0.8.0-bin"

# For running Shark in distributed mode, set the following:
export HADOOP_HOME="/usr/local/hadoop"
export SPARK_HOME="/home/guest/spark-0.8.0"
export MASTER="spark://swlab-r03-16L:17087"

From shark-shell, let us ensure we are talking to the same spark server

scala> sc.sparkHome
res0: String = /home/guest/spark-0.8.0

scala> sc.isLocal                                                                                          
res1: Boolean = false

scala> sc.master
res2: String = spark://swlab-r03-16L:17087
Was it helpful?

Solution

It seems there were hive metastore configuration issues. The metastore parameters are under the shark-hive-/conf/hive-site.xml

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top