You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by yu...@apache.org on 2012/05/31 22:35:11 UTC
[4/4] git commit: Minor correction in pig readme/example. Patch by
Fabian Rousseau, reviewed by brandonwilliams for CASSANDRA-4301
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/trunk
Commit: d484e28d191f60069550648cb735517eb1c62f37
Parents: 59f349d
Author: Brandon Williams <br...@apache.org>
Authored: Thu May 31 09:46:49 2012 -0500
Committer: Brandon Williams <br...@apache.org>
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;