Environment:
- Spark 1.5.1
- Hive 1.2.1
- Hadoop Yarn 2.7.2
In my code, I created a HiveContext
to run mysql which insert data from a RDD to a hive table.
In order to achieve better performance, I run multiple sql in different threads with the same HiveContext
. But through jstack output, I find most of threads are blocked at HiveContext
and only a few of them are running. So I try to create seperate HiveContext
within threads , but unfortunately I got error. After google, I learned that a single JVM can own just one HiveContext.
I'm stuck there. Hope anyone can provide some suggestion ?