WebHCat . , , . JSON - JSON .
In this example of constructing WebHCat results for Python, only 24 is returned, representing the number of partitions for this table. (Server name is the name of the node).
curl -s 'http://*myservername*:50111/templeton/v1/ddl/database/*mydatabasename*/table/*mytablename*/partition?user.name=*myusername*' | python -c 'import sys, json; print len(json.load(sys.stdin)["partitions"])'
24
source
share