You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by br...@apache.org on 2012/05/31 16:49:23 UTC
[2/2] 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/d7125034
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/d7125034
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/d7125034
Branch: refs/heads/trunk
Commit: d71250349d250c37d4d40261694a9a047f75a468
Parents: 25c7a71
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:24 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/d7125034/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/d7125034/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;