一、编译代码
git clone git@github.com:apache/incubator-pinot.git
cd incubator-pinot
mvn install package -DskipTests -Pbin-dist -DdownloadSources -DdownloadJavadocs -Drat.numUnapprovedLicenses=5000
cd pinot-distribution/target/apache-pinot-incubating-0.2.0-SNAPSHOT-bin
chmod +x bin/*.sh
二、离线快速入门
1、bin/quick-start-offline.sh
2、
http://localhost:9000/query/
3、Pinot使用类似SQL的查询语言PQL来查询数据。以下是一些示例查询(完整的文献参考https://pinot.readthedocs.io/en/latest/pql_examples.html#pql):
/*Total number of documents in the table*/
SELECT count(*) FROM baseballStats LIMIT 0
/*Top 5 run scorers of all time*/
SELECT sum('runs') FROM baseballStats GROUP BY playerName TOP 5 LIMIT 0
/*Top 5 run scorers of the year 2000*/
SELECT sum('runs') FROM baseballStats WHERE yearID=2000 GROUP BY playerName TOP 5 LIMIT 0
/*Top 10 run scorers after 2000*/
SELECT sum('runs') FROM baseballStats WHERE yearID>=2000 GROUP BY playerName
/*Select playerName,runs,homeRuns for 10 records from the table and order them by yearID*/
SELECT playerName,runs,homeRuns FROM baseballStats ORDER BY yearID LIMIT 10
三、实时快速入门
1、bin/quick-start-realtime.sh
2、查询实例
SELECT * FROM meetupRsvp ORDER BY mtime DESC LIMIT 50