hive-spark: Error while processing statement: FAILED: Execution Error, return code 30041 from org.ap

今天用hive执行hql时出现错误:

Error: Error while processing statement: FAILED: Execution Error, return code 30041 from org.apache.hadoop.hive.ql.exec.spark.SparkTask. Failed to create Spark client for Spark session 44e53d61-a15e-4d01-864c-099e6754c541 (state=42000,code=30041)

具体报错情况为:

用beeline方式登录hive,运行一个普通的sql:    select * from emp order by emp.empno; 

然后就报了以上错误:

解决方法:

在beeline模式下运行:

set hive.spark.client.future.timeout=200;

set hive.spark.client.future.timeout=200;

这个配置用来解决hive客户端远程连接spark超时的问题

然后重新运行sql即可。

注意:避免虚拟机开启多个hive客户端:   jps后如果有多个Runjar,应该全部关闭后,再重新启动hiveserver2服务,然后重新启动一个beeline客户端,再运行set hive.spark.client.future.timeout=200;即可。

更新:

如果以上解决办法不行,请尝试此解决办法:

hive/conf/hive-site.xml

进入hive-site.xml

修改:



    hive.spark.client.connect.timeout
    10000ms

可以将10000ms调至80000ms,亲测可行。

你可能感兴趣的:(hive,hive)