cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brandonwilli...@apache.org
Subject [3/3] git commit: Update readme/example for 3371
Date Tue, 14 Feb 2012 20:29:35 GMT
Update readme/example for 3371


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/f2a43096
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/f2a43096
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/f2a43096

Branch: refs/heads/trunk
Commit: f2a4309675832c0887eed060eac5cc3dbc76890c
Parents: 161e052
Author: Brandon Williams <brandonwilliams@apache.org>
Authored: Tue Feb 14 12:48:33 2012 -0600
Committer: Brandon Williams <brandonwilliams@apache.org>
Committed: Tue Feb 14 13:45:39 2012 -0600

----------------------------------------------------------------------
 contrib/pig/README.txt         |    6 ++++--
 contrib/pig/example-script.pig |    4 ++--
 2 files changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/f2a43096/contrib/pig/README.txt
----------------------------------------------------------------------
diff --git a/contrib/pig/README.txt b/contrib/pig/README.txt
index 93eceb2..1058870 100644
--- a/contrib/pig/README.txt
+++ b/contrib/pig/README.txt
@@ -43,7 +43,7 @@ contrib/pig$ bin/pig_cassandra -x local
 Once the 'grunt>' shell has loaded, try a simple program like the
 following, which will determine the top 50 column names:
 
-grunt> rows = LOAD 'cassandra://MyKeyspace/MyColumnFamily' USING CassandraStorage() AS
(key, columns: bag {T: tuple(name, value)});
+grunt> rows = LOAD 'cassandra://MyKeyspace/MyColumnFamily' USING CassandraStorage();
 grunt> cols = FOREACH rows GENERATE flatten(columns);
 grunt> colnames = FOREACH cols GENERATE $0;
 grunt> namegroups = GROUP colnames BY (chararray) $0;
@@ -53,7 +53,7 @@ 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&i&limit=1&reversed=true'
USING CassandraStorage() AS (key, columns: bag {T: tuple(name, value)});
+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'
 
@@ -64,3 +64,5 @@ grunt> STORE rows into 'cassandra://MyKeyspace/MyColumnFamily' USING
CassandraSt
 
 Which will copy the ColumnFamily.  Note that the destination ColumnFamily must
 already exist for this to work.
+
+See the example in test/ to see how schema is inferred.

http://git-wip-us.apache.org/repos/asf/cassandra/blob/f2a43096/contrib/pig/example-script.pig
----------------------------------------------------------------------
diff --git a/contrib/pig/example-script.pig b/contrib/pig/example-script.pig
index f88d773..74a4602 100644
--- a/contrib/pig/example-script.pig
+++ b/contrib/pig/example-script.pig
@@ -1,8 +1,8 @@
-rows = LOAD 'cassandra://MyKeyspace/MyColumnFamily' USING CassandraStorage() AS (key, columns:
bag {T: tuple(name, value)});
+rows = LOAD 'cassandra://MyKeyspace/MyColumnFamily' USING CassandraStorage();
 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;
 topnames = LIMIT orderednames 50;
-dump topnames;
\ No newline at end of file
+dump topnames;


Mime
View raw message