Updated Branches: refs/heads/cassandra-1.1 59f349de7 -> d484e28d1 refs/heads/trunk 25c7a7147 -> d71250349
Minor correction in pig readme/example. Patch by Fabian Rousseau, reviewed by brandonwilliams for CASSANDRA-4301 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/d484e28d Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/d484e28d Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/d484e28d Branch: refs/heads/cassandra-1.1 Commit: d484e28d191f60069550648cb735517eb1c62f37 Parents: 59f349d Author: Brandon Williams <[email protected]> Authored: Thu May 31 09:46:49 2012 -0500 Committer: Brandon Williams <[email protected]> Committed: Thu May 31 09:48:58 2012 -0500 ---------------------------------------------------------------------- examples/pig/README.txt | 4 ++-- examples/pig/example-script.pig | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cassandra/blob/d484e28d/examples/pig/README.txt ---------------------------------------------------------------------- diff --git a/examples/pig/README.txt b/examples/pig/README.txt index 57b8f57..7c61c05 100644 --- a/examples/pig/README.txt +++ b/examples/pig/README.txt @@ -52,12 +52,12 @@ grunt> cols = FOREACH rows GENERATE flatten(columns); grunt> colnames = FOREACH cols GENERATE $0; grunt> namegroups = GROUP colnames BY (chararray) $0; grunt> namecounts = FOREACH namegroups GENERATE COUNT($1), group; -grunt> orderednames = ORDER namecounts BY $0; +grunt> orderednames = ORDER namecounts BY $0 DESC; grunt> topnames = LIMIT orderednames 50; grunt> dump topnames; Slices on columns can also be specified: -grunt> rows = LOAD 'cassandra://MyKeyspace/MyColumnFamily&slice_start=C2&slice_end=C4&limit=1&reversed=true' USING CassandraStorage(); +grunt> rows = LOAD 'cassandra://MyKeyspace/MyColumnFamily?slice_start=C2&slice_end=C4&limit=1&reversed=true' USING CassandraStorage(); Binary values for slice_start and slice_end can be escaped such as '\u0255' http://git-wip-us.apache.org/repos/asf/cassandra/blob/d484e28d/examples/pig/example-script.pig ---------------------------------------------------------------------- diff --git a/examples/pig/example-script.pig b/examples/pig/example-script.pig index 74a4602..7767071 100644 --- a/examples/pig/example-script.pig +++ b/examples/pig/example-script.pig @@ -3,6 +3,6 @@ cols = FOREACH rows GENERATE flatten(columns); colnames = FOREACH cols GENERATE $0; namegroups = GROUP colnames BY (chararray) $0; namecounts = FOREACH namegroups GENERATE COUNT($1), group; -orderednames = ORDER namecounts BY $0; +orderednames = ORDER namecounts BY $0 DESC; topnames = LIMIT orderednames 50; dump topnames;
