You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
➜ bin curl "http://localhost:8080/insert?taskid=0&hdfsfile=/data/jsondata_example.txt"
{"code":0,"list":["insert:/data/jsondata_example.txt,/data/ycloud/ydb/rawdata/0/jsondata_example.txt_20151130204532_1457527103"],"skip":[],"error":[]}
统计: http://localhost:8080/sql?sql=select sum(clickcount),avg(clickcount),max(clickcount),min(clickcount) from ydbexample where ydbpartion='20151011' limit 0,100
YDB单机模式
启动ZK和HDFS
修改conf/storm.yaml
修改ydb_site.xml
修改bin下ydb的权限为777
在我的mac下,如果没有修改权限,则下面启动的命令会报错没有权限
启动集群
启动Worker
查看进程:
建表
表结构会存储在HDFS上:
上传示例文件到HDFS
插入数据和查询数据
要过个一会儿,打开下面的链接(注意: 用curl貌似没反应):
http://localhost:8080/sql?sql=select indexnum,label from ydbexample where ydbpartion='20151222' limit 0,100
没有这个分区, 修改分区为20151011:
http://localhost:8080/sql?sql=select indexnum,label from ydbexample where ydbpartion='20151011' limit 0,100
其他查询
查询:
http://localhost:8080/sql?sql=select indexnum,label from ydbexample where ydbpartion='20151011' limit 0,100
排序:
http://localhost:8080/sql?sql=select indexnum,label from ydbexample where ydbpartion='20151011' order by indexnum desc limit 0,100
COUNT:
http://localhost:8080/sql?sql=select count(*),count(indexnum) from ydbexample where ydbpartion='20151011' limit 0,100
统计:
http://localhost:8080/sql?sql=select sum(clickcount),avg(clickcount),max(clickcount),min(clickcount) from ydbexample where ydbpartion='20151011' limit 0,100
收工
The text was updated successfully, but these errors were encountered: