presto初探【0.52版本】

来源:互联网 发布:动态桌面软件怎么设置 编辑:程序博客网 时间:2024/05/17 06:43

presto

http://www.dw4e.com/?p=141http://blog.csdn.net/u012417026/article/details/14516631

conf

hadoop@yard02:~/bigdata/presto-server-0.52/$ tar zxvf presto-server-0.52.tar.gzhadoop@yard02:~/bigdata/presto-server-0.52/etc$ cd presto-server-0.52/

hadoop@yard02:~/bigdata/presto-server-0.52/etc$ touch node.properties

hadoop@yard02:~/bigdata/presto-server-0.52/etc$ cat node.properties node.environment=productionnode.id=ffffffff-ffff-ffff-ffff-ffffffffffffnode.data-dir=/home/hadoop/bigdata/presto-server-0.52/data

hadoop@yard02:~/bigdata/presto-server-0.52/etc$ touch jvm.config

hadoop@yard02:~/bigdata/presto-server-0.52/etc$ cat jvm.config -server-Xmx16G-XX:+UseConcMarkSweepGC-XX:+ExplicitGCInvokesConcurrent-XX:+CMSClassUnloadingEnabled-XX:+AggressiveOpts-XX:+HeapDumpOnOutOfMemoryError-XX:OnOutOfMemoryError=kill -9 %p-XX:PermSize=150M-XX:MaxPermSize=150M-XX:ReservedCodeCacheSize=150M

hadoop@yard02:~/bigdata/presto-server-0.52/etc$ touch config.properties

hadoop@yard02:~/bigdata/presto-server-0.52/etc$ cat config.properties coordinator=truedatasources=jmx,hivehttp-server.http.port=8080presto-metastore.db.type=h2presto-metastore.db.filename=/home/hadoop/bigdata/presto-server-0.52/data/db/MetaStoretask.max-memory=1GBdiscovery-server.enabled=truediscovery.uri=http://yard02:8080

hadoop@yard02:~/bigdata/presto-server-0.52/etc$ touch log.properties

hadoop@yard02:~/bigdata/presto-server-0.52/etc$ cat log.properties com.facebook.presto=DEBUG

hadoop@yard02:~/bigdata/presto-server-0.52/etc/catalog$ touch jmx.properties

hadoop@yard02:~/bigdata/presto-server-0.52/etc$ cat catalog/jmx.properties connector.name=jmx

hadoop@yard02:~/bigdata/presto-server-0.52/etc/catalog$ touch hive.properties

###hadoop@yard02:~/bigdata/presto-server-0.52/etc$ cat catalog/hive.properties connector.name=hive-cdh4hive.metastore.uri=thrift://yard02:9083

presto 客户端

下载: http://search.maven.org/remotecontent?filepath=com/facebook/presto/presto-server/0.52/presto-server-0.52.tar.gz

重命名:mv presto-cli-0.52-executable.jar presto

TEST 试试手感

启动:

hadoop@yard02:~/bigdata/presto-server-0.52/bin$ ./launcher start

需要先启动hiveserver

./hive --service hiveserver -p 9083

客户端链接:

hadoop@yard02:~/bigdata/presto-server-0.52/bin$ ./presto --server localhost:8080 --catalog hive --schema defaultpresto:default> list             -> ;Query 20131120_114948_00002_3frqf failed: line 1:1: no viable alternative at input 'list'listpresto:default> show tables; Table  -------- mytest (1 row)Query 20131120_114955_00003_3frqf, FINISHED, 1 nodeSplits: 2 total, 2 done (100.00%)0:00 [1 rows, 23B] [2 rows/s, 68B/s]presto:default>
0 1
原创粉丝点击