Apache spark 在spark中启动thrift服务器

Apache spark 在spark中启动thrift服务器,apache-spark,apache-spark-sql,spark-thriftserver,Apache Spark,Apache Spark Sql,Spark Thriftserver,有人能帮我启动spark thrift server吗?我正在独立模式下运行脚本,希望在我的商业智能工具中获取数据 为了做到这一点,我需要启动节俭服务器。我尝试运行shell脚本: $SPARK_HOME/sbin/start-thriftserver.sh 但我有一个错误: 错误“ps未知选项--0” sbin/脚本在linux下工作正常,但它们不准备在Windows中运行(请参阅)。但spark thriftserver可以在前台独立于操作系统启动,使用以下命令: java -cp con

有人能帮我启动spark thrift server吗?我正在独立模式下运行脚本,希望在我的商业智能工具中获取数据

为了做到这一点,我需要启动节俭服务器。我尝试运行shell脚本:

$SPARK_HOME/sbin/start-thriftserver.sh
但我有一个错误:

错误“ps未知选项--0”


sbin/
脚本在linux下工作正常,但它们不准备在Windows中运行(请参阅)。但spark thriftserver可以在前台独立于操作系统启动,使用以下命令:

java -cp conf/:jars/* org.apache.spark.deploy.SparkSubmit --class org.apache.spark.sql.hive.thriftserver.HiveThriftServer2 spark-internal
然后,您可以使用spark提供的直线测试连接:

$ ./bin/beeline -u jdbc:hive2://localhost:10000
Connecting to jdbc:hive2://localhost:10000
16/11/22 13:09:57 INFO Utils: Supplied authorities: localhost:10000
16/11/22 13:09:57 INFO Utils: Resolved authority: localhost:10000
16/11/22 13:09:57 INFO HiveConnection: Will try to open client transport with JDBC Uri: jdbc:hive2://localhost:10000
Connected to: Spark SQL (version 2.0.1)
Driver: Hive JDBC (version 1.2.1.spark2)
Transaction isolation: TRANSACTION_REPEATABLE_READ
Beeline version 1.2.1.spark2 by Apache Hive
0: jdbc:hive2://localhost:10000> show databases;
+---------------+--+
| databaseName  |
+---------------+--+
| default       |
| elo           |
+---------------+--+
2 rows selected (0,26 seconds)
在Spark 2.2.1中

cd %SPARK_HOME%\bin
spark-class org.apache.spark.deploy.SparkSubmit --class org.apache.spark.sql.hive.thriftserver.HiveThriftServer2 spark-internal
这启动了windows中的spark thrift服务器。 在另一个终端中,运行beveline命令打开jdbc连接

cd %SPARK_HOME%\bin
beeline -u jdbc:hive2://localhost:10000

提供更多调试信息,使用bash-x sbin/start thriftserver.sh启动服务器,并将日志附加到问题。--ps:unknown选项--o(换行符)Try
ps--help”获取更多信息。启动org.apache.spark.sql.hive.thriftserver.HiveThriftServer2,登录到/e/Development/spark-2.0.1-bin-hadoop2.7/logs/spark--org.apache.spark.sql.hive.thriftserver.HiveThriftServer2-1-TEAMTAPPS.out在下面这一行之后继续重复ps:unknown选项--o Try
ps--help'以获取更多信息。可能重复@mariusz…该链接提供了启动master的解决方案,但我想启动它thriftserver。是的,但这适用于所有服务器脚本,spark thriftserver就是其中之一。非常感谢Mariusz。现在我可以启动thrift服务器了,这让我松了一口气。嗨,我得到了ThriftCLIService:98的信息-在端口10000上启动ThriftBinaryCLIService,有5…500个工作线程,它永远挂在那里。你知道为什么吗?嗨,我得到信息ThriftCLIService:98-在端口10000上启动ThriftBinaryCLIService,有5…500个工作线程。它就挂在那里。你知道为什么吗?只是为了帮助别人。。。我们不需要有正确版本的winutils。