Subject: Answers to recent questions on Hive on Spark


Hi Xuefu,

 

Thanks for the response. I did the changes as requested (coping the assembly jar file from build to $HIVE_HOME/lib). I will give full response when I get the debug outpout

 

In summary when I ran the sql query from Hive and expected Spark to act as execution engine, it came back with client connection error.

 

Cruically I noticed that it was trying to connect to eth1 (the internet connection) as opposed to eth0 (the local network. This host has two Ethernet cards one for local area network and the other for linternet (directly no proxy)

 

It suggested that I can change the address using the configuration parameter hive.spark.client.server.address

 

Now I don’t seem to be able to set it up in hive-site.xml or as a set parameter in hive prompt itself!

 

Any hint would be appreciated or any work around?

 

Regards,

 

Mich

 

From: Xuefu Zhang [mailto:[EMAIL PROTECTED]]
Sent: 28 November 2015 04:35
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: Answers to recent questions on Hive on Spark

 

Okay. I think I know what problem you have now. To run Hive on Spark, spark-assembly.jar is needed and it's also recommended that you have a spark installation (identified by spark.home) on the same host where HS2 is running. You only need spark-assembly.jar in HS2's /lib directory. Other than those, Hive on Spark doesn't have any other dependency at service level. On the job level, Hive on Spark jobs of course run on a spark cluster, which could be standalone, yarn-cluster, etc. However, how you get the binaries for your spark cluster and how you start them is completely independent of Hive.

Thus, you only need to build the spark-assembly.jar w/o HIve and put it in Hive's /lib directory. The one in the existing spark build may contain Hive classes and that's why you need to build your own. Your spark installation can still have a jar that's different from what you build for Hive on Spark. Your spark.home can still point to your existing spark installation. In fact, Hive on Spark only needs spark-submit from your Spark installation. Therefore, you should be okay even if your spark installation contains Hive classes.

By following this, I'm sure you will get your Hive on Spark to work. Depending on the Hive version that your spark installation contains, you may have problem with spark applications such as SparkSQL, but it shouldn't be a concern if you decide that you use Hive in Hive.

Let me know if you are still confused.

Thanks,

Xuefu

 

On Fri, Nov 27, 2015 at 4:34 PM, Mich Talebzadeh <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> > wrote:

Hi,

 

Thanks for heads up and comments.

 

Sounds like when it comes to using spark as the execution engine for Hive, we are in no man’s land so to speak. I have opened questions in both Hive and Spark user forums. Not much of luck for reasons that you alluded to.

 

Ok just to clarify the prebuild version of spark (as opposed get the source code and build your spec) works fine for me.

 

Components are

 

hadoop version

Hadoop 2.6.0

 

hive --version

Hive 1.2.1

 

Spark

version 1.5.2

 

It does what it says on the tin. For example I can start the master node OK start-master.sh.

 

 

Spark Command: /usr/java/latest/bin/java -cp /usr/lib/spark_1.5.2_bin/sbin/../conf/:/usr/lib/spark_1.5.2_bin/lib/spark-assembly-1.5.2-hadoop2.6.0.jar:/usr/lib/spark_1.5.2_bin/lib/datanucleus-core-3.2.10.jar:/usr/lib/spark_1.5.2_bin/lib/datanucleus-api-jdo-3.2.6.jar:/usr/lib/spark_1.5.2_bin/lib/datanucleus-rdbms-3.2.9.jar:/home/hduser/hadoop-2.6.0/etc/hadoop/ -Xms1g -Xmx1g -XX:MaxPermSize=256m org.apache.spark.deploy.master.Master --ip 127.0.0.1 --port 7077 --webui-port 8080

========================================

15/11/28 00:05:23 INFO master.Master: Registered signal handlers for [TERM, HUP, INT]

15/11/28 00:05:23 WARN util.Utils: Your hostname, rhes564 resolves to a loopback address: 127.0.0.1; using 50.140.197.217 instead (on interface eth0)

15/11/28 00:05:23 WARN util.Utils: Set SPARK_LOCAL_IP if you need to bind to another address

15/11/28 00:05:24 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable

15/11/28 00:05:24 INFO spark.SecurityManager: Changing view acls to: hduser

15/11/28 00:05:24 INFO spark.SecurityManager: Changing modify acls to: hduser

15/11/28 00:05:24 INFO spark.SecurityManager: SecurityManager: authentication disabled; ui acls disabled; users with view permissions: Set(hduser); users with modify permissions: Set(hduser)

15/11/28 00:05:25 INFO slf4j.Slf4jLogger: Slf4jLogger started

15/11/28 00:05:25 INFO Remoting: Starting remoting

15/11/28 00:05:25 INFO Remoting: Remoting started; listening on addresses :[akka.tcp://sparkMaster@127.0.0.1:7077 <http://sparkMaster@127.0.0.1:7077> ]

15/11/28 00:05:25 INFO util.Utils: Successfully started service 'sparkMaster' on port 7077.

15/11/28 00:05:25 INFO master.Master: Starting Spark master at spark://127.0.0.1:7077 <http://127.0.0.1:7077>

15/11/28 00:05:25 INFO master.Master: Running Spark version 1.5.2

15/11/28 00:05:25 INFO server.Server: jetty-8.y.z-SNAPSHOT

15/11/28 00:05:25 INFO server.AbstractConnector: Started SelectChannelConnector@0.0.0.0:8080 <http://SelectChannelConnector@0.0.0.0:8080>

15/11/28 00:05:25 INFO util.Utils: Successfully started service 'MasterUI' on port 8080.

15/11/28 00:05:25 INFO ui.MasterWebUI: Started MasterWebUI at http://50.140.197.217:8080

15/11/28 00:05:25 INFO server.Server: jetty-8.y.z-SNAPSHOT

15/11/28 00:05:25 INFO server.AbstractConnector: Started SelectChannelConnector@rhes564:6066

15/11/28 00:05:25 INFO util.Utils: Successfully started service on port 6066.

15/11/28 00:05:25 INFO rest.StandaloneRestServer: Started REST server for submitting applications on port 6066

15/11/28 00:05:25 INFO master.Master: I have been elected leader! New state: ALIVE

 

However, I cannot use spark in place of MapReduce engine with t