3

我正在尝试让 Presto 在 Cloudera VM 上运行(在无法使用普通 Hadoop 和 Amazon 运行它之后)。基本上我在同一个节点上拥有所有东西(协调器、发现、工作者)。我按照文档中的说明进行操作,在运行选择查询时出现如下错误。我在另一篇文章中生成了用于节点 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]
4

1 回答 1

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
于 2013-11-14T07:50:29.150 回答