This is an automated email from the ASF dual-hosted git repository. jlli pushed a commit to branch add-docs in repository https://gitbox.apache.org/repos/asf/incubator-pinot.git
commit 5176b8237ac5832399e295a716db47ffc65d6aca Author: jackjlli <j...@linkedin.com> AuthorDate: Thu Mar 14 17:18:31 2019 -0700 Add documentation --- docs/getting_started.rst | 7 +++++++ docs/img/pinot-console.png | Bin 0 -> 157310 bytes docs/management_api.rst | 49 +++++++++++++++++++++++++++++++++++++++++++-- 3 files changed, 54 insertions(+), 2 deletions(-) diff --git a/docs/getting_started.rst b/docs/getting_started.rst index e3d2416..4b92f96 100644 --- a/docs/getting_started.rst +++ b/docs/getting_started.rst @@ -94,3 +94,10 @@ show up in Pinot. To show new events appearing, one can run :sql:`SELECT * FROM meetupRsvp ORDER BY mtime DESC LIMIT 50` repeatedly, which shows the last events that were ingested by Pinot. +Experiment with Pinot +~~~~~~~~~~~~~~~~~~~~~ + +Here's the instruction on how to add a simple table to the pinot system you got working int the previous demo steps, +how to add segments, and how to query it. + + diff --git a/docs/img/pinot-console.png b/docs/img/pinot-console.png new file mode 100644 index 0000000..f73405b Binary files /dev/null and b/docs/img/pinot-console.png differ diff --git a/docs/management_api.rst b/docs/management_api.rst index 5a7a0e4..3aaef33 100644 --- a/docs/management_api.rst +++ b/docs/management_api.rst @@ -28,6 +28,8 @@ Pinot Management Console There is a REST API which allows management of tables, tenants, segments and schemas. It can be accessed by going to ``http://[controller host]/help`` which offers a web UI to do these tasks, as well as document the REST API. + .. figure:: img/pinot-console.png + For example, list all the schema within Pinot cluster: .. figure:: img/list-schemas.png @@ -44,8 +46,51 @@ It can be used instead of the ``pinot-admin.sh`` commands to automate the creati For example, create a pinot segment: - .. figure:: img/generate-segment.png +.. code-block:: none + + $ ./pinot-distribution/target/apache-pinot-incubating-0.1.0-SNAPSHOT-bin/apache-pinot-incubating-0.1.0-SNAPSHOT-bin/bin/pinot-admin.sh CreateSegment -dataDir /Users/jlli/Desktop/test/ -format CSV -outDir /Users/jlli/Desktop/test2/ -tableName baseballStats -segmentName baseballStats_data -overwrite -schemaFile ./pinot-distribution/target/apache-pinot-incubating-0.1.0-SNAPSHOT-bin/apache-pinot-incubating-0.1.0-SNAPSHOT-bin/sample_data/baseballStats_schema.json + Executing command: CreateSegment -generatorConfigFile null -dataDir /Users/jlli/Desktop/test/ -format CSV -outDir /Users/jlli/Desktop/test2/ -overwrite true -tableName baseballStats -segmentName baseballStats_data -timeColumnName null -schemaFile ./pinot-distribution/target/apache-pinot-incubating-0.1.0-SNAPSHOT-bin/apache-pinot-incubating-0.1.0-SNAPSHOT-bin/sample_data/baseballStats_schema.json -readerConfigFile null -enableStarTreeIndex false -starTreeIndexSpecFile null -hllSize 9 - [...] + Accepted files: [/Users/jlli/Desktop/test/baseballStats_data.csv] + Finished building StatsCollector! + Collected stats for 97889 documents + Created dictionary for INT column: homeRuns with cardinality: 67, range: 0 to 73 + Created dictionary for INT column: playerStint with cardinality: 5, range: 1 to 5 + Created dictionary for INT column: groundedIntoDoublePlays with cardinality: 35, range: 0 to 36 + Created dictionary for INT column: numberOfGames with cardinality: 165, range: 1 to 165 + Created dictionary for INT column: AtBatting with cardinality: 699, range: 0 to 716 + Created dictionary for INT column: stolenBases with cardinality: 114, range: 0 to 138 + Created dictionary for INT column: tripples with cardinality: 32, range: 0 to 36 + Created dictionary for INT column: hitsByPitch with cardinality: 41, range: 0 to 51 + Created dictionary for STRING column: teamID with cardinality: 149, max length in bytes: 3, range: ALT to WSU + Created dictionary for INT column: numberOfGamesAsBatter with cardinality: 166, range: 0 to 165 + Created dictionary for INT column: strikeouts with cardinality: 199, range: 0 to 223 + Created dictionary for INT column: sacrificeFlies with cardinality: 20, range: 0 to 19 + Created dictionary for INT column: caughtStealing with cardinality: 36, range: 0 to 42 + Created dictionary for INT column: baseOnBalls with cardinality: 154, range: 0 to 232 + Created dictionary for STRING column: playerName with cardinality: 11976, max length in bytes: 43, range: to Zoilo Casanova + Created dictionary for INT column: doules with cardinality: 64, range: 0 to 67 + Created dictionary for STRING column: league with cardinality: 7, max length in bytes: 2, range: AA to UA + Created dictionary for INT column: yearID with cardinality: 143, range: 1871 to 2013 + Created dictionary for INT column: hits with cardinality: 250, range: 0 to 262 + Created dictionary for INT column: runsBattedIn with cardinality: 175, range: 0 to 191 + Created dictionary for INT column: G_old with cardinality: 166, range: 0 to 165 + Created dictionary for INT column: sacrificeHits with cardinality: 54, range: 0 to 67 + Created dictionary for INT column: intentionalWalks with cardinality: 45, range: 0 to 120 + Created dictionary for INT column: runs with cardinality: 167, range: 0 to 192 + Created dictionary for STRING column: playerID with cardinality: 18107, max length in bytes: 9, range: aardsda01 to zwilldu01 + Start building IndexCreator! + Finished records indexing in IndexCreator! + Finished segment seal! + Converting segment: /Users/jlli/Desktop/test2/baseballStats_data_0 to v3 format + v3 segment location for segment: baseballStats_data_0 is /Users/jlli/Desktop/test2/baseballStats_data_0/v3 + Deleting files in v1 segment directory: /Users/jlli/Desktop/test2/baseballStats_data_0 + Driver, record read time : 369 + Driver, stats collector time : 0 + Driver, indexing time : 373 Query a table: - .. figure:: img/query-table.png +.. code-block:: none + + $ ./pinot-distribution/target/apache-pinot-incubating-0.1.0-SNAPSHOT-bin/apache-pinot-incubating-0.1.0-SNAPSHOT-bin/bin/pinot-admin.sh PostQuery -brokerPort 8000 -query "select count(*) from baseballStats" ./pinot-distribution/target/apache-pinot-incubaExecuting command: PostQuery -brokerHost 172.25.118.138 -brokerPort 8000 -query select count(*) from baseballStats + Result: {"aggregationResults":[{"function":"count_star","value":"97889"}],"exceptions":[],"numServersQueried":1,"numServersResponded":1,"numSegmentsQueried":1,"numSegmentsProcessed":1,"numSegmentsMatched":1,"numDocsScanned":97889,"numEntriesScannedInFilter":0,"numEntriesScannedPostFilter":0,"numGroupsLimitReached":false,"totalDocs":97889,"timeUsedMs":107,"segmentStatistics":[],"traceInfo":{}} --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org