我正在尝试让Presto在Cloudera VM上运行(在使用普通的Hadoop和Amazon运行它之后)。基本上,我在同一节点上拥有一切(协调者,发现者,工作者)。 我按照文档中的说明操作,并在运行选择查询时收到如下错误。 我生成的UUID用于每个帖子的节点ID,但仍然是同一个问题。 可以有人帮忙。
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]
答案 0 :(得分:2)
以下是Cloudera VM 4.3.0 VirtualBox映像上的配置:
等/ node.properties
node.environment=production
node.id=FA7BA366-0253-43CA-99DE-32DD4AC11C88
node.data-dir=/var/presto/data
等/ 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
等/目录/ hive.properties
connector.name=hive-cdh4
hive.metastore.uri=thrift://localhost:9083
等/目录/ jmx.properties
connector.name=jmx
等/ 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
Cloudera VM附带jdk 6,Presto需要jdk 7,安装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