没有可查询的节点错误

hiz5n14c  于 2021-06-03  发布在  Hadoop
关注(0)|答案(1)|浏览(372)

我试图让presto在clouderavm上工作(在用普通hadoop和amazon运行它失败之后)。基本上我在同一个节点上拥有所有的东西(协调器、发现、工作者)。我按照docs中的说明操作,在运行select查询时出现如下错误。我在另一篇文章中生成了用于节点id的uuid,但仍然是相同的问题。有人能帮忙吗。

java.lang.IllegalStateException: No nodes available to run query
    at com.google.common.base.Preconditions.checkState(Preconditions.java:150) ~[guava-15.0.jar:na]
    at com.facebook.presto.execution.NodeScheduler$NodeSelector.selectNode(NodeScheduler.java:166) ~[presto-main-0.52.jar:0.52]
    at com.facebook.presto.execution.SqlStageExecution.chooseNode(SqlStageExecution.java:531) [presto-main-0.52.jar:0.52]
    at com.facebook.presto.execution.SqlStageExecution.startTasks(SqlStageExecution.java:467) [presto-main-0.52.jar:0.52]
    at com.facebook.presto.execution.SqlStageExecution.access$300(SqlStageExecution.java:80) [presto-main-0.52.jar:0.52]
    at com.facebook.presto.execution.SqlStageExecution$5.run(SqlStageExecution.java:435) [presto-main-0.52.jar:0.52]
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [na:1.7.0_45]
    at java.util.concurrent.FutureTask.run(FutureTask.java:262) [na:1.7.0_45]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_45]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_45]
    at java.lang.Thread.run(Thread.java:744) [na:1.7.0_45]
zmeyuzjn

zmeyuzjn1#

以下是在cloudera vm 4.3.0 virtualbox映像上对我有效的配置:
等/节点属性

node.environment=production
node.id=FA7BA366-0253-43CA-99DE-32DD4AC11C88
node.data-dir=/var/presto/data

etc/config.properties属性

coordinator=true
datasources=jmx,hive
http-server.http.port=8080
presto-metastore.db.type=h2
presto-metastore.db.filename=var/db/MetaStore
task.max-memory=1GB
discovery-server.enabled=true
discovery.uri=http://localhost:8080

etc/目录/hive.properties

connector.name=hive-cdh4
hive.metastore.uri=thrift://localhost:9083

etc/catalog/jmx.properties文件

connector.name=jmx

etc/jvm.config文件

-server
-Xmx2G
-XX:+UseConcMarkSweepGC
-XX:+ExplicitGCInvokesConcurrent
-XX:+CMSClassUnloadingEnabled
-XX:+AggressiveOpts
-XX:+HeapDumpOnOutOfMemoryError
-XX:OnOutOfMemoryError=kill -9 %p
-XX:PermSize=150M
-XX:MaxPermSize=150M
-XX:ReservedCodeCacheSize=150M
-Xbootclasspath/p:/opt/presto/lib/floatingdecimal-0.1.jar

clouderavm附带jdk6,presto需要jdk7,安装jdk7。不要使用rpm安装,它将删除jdk6并且可能会影响其他服务。我假设presto安装在/opt/presto中,这个目录(连同/var/presto)由cloudera:cloudera. 启动presto服务器:

PATH=/usr/java/jdk1.7.0_45/bin:$PATH /opt/presto/bin/launcher run

像客户端一样运行命令:

PATH=/usr/java/jdk1.7.0_45/bin:$PATH ./presto-cli-0.52-executable.jar --server localhost:8080 --catalog hive --schema default

相关问题