cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brandonwilli...@apache.org
Subject git commit: Add forgotten updates
Date Thu, 27 Jun 2013 00:10:21 GMT
Updated Branches:
  refs/heads/trunk 764bcd3f3 -> 168482bc1


Add forgotten updates


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

Branch: refs/heads/trunk
Commit: 168482bc113616206701d86fd9db29849a3635b5
Parents: 764bcd3
Author: Brandon Williams <brandonwilliams@apache.org>
Authored: Wed Jun 26 19:10:05 2013 -0500
Committer: Brandon Williams <brandonwilliams@apache.org>
Committed: Wed Jun 26 19:10:05 2013 -0500

----------------------------------------------------------------------
 examples/pig/README.txt            | 21 ++++++++++++++++++---
 examples/pig/test/test_storage.pig |  2 +-
 2 files changed, 19 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/168482bc/examples/pig/README.txt
----------------------------------------------------------------------
diff --git a/examples/pig/README.txt b/examples/pig/README.txt
index e3d9af6..6dc0937 100644
--- a/examples/pig/README.txt
+++ b/examples/pig/README.txt
@@ -32,7 +32,10 @@ for input and output:
 * PIG_OUTPUT_RPC_PORT : the port thrift is listening on for writing
 * PIG_OUTPUT_PARTITIONER : cluster partitioner for writing
 
-Then you can run it like this:
+CassandraStorage
+================
+
+The CassandraStorage class is for any non-CQL3 ColumnFamilies you may have.  For CQL3 support,
refer to the CqlStorage section.
 
 examples/pig$ bin/pig_cassandra -x local example-script.pig
 
@@ -71,8 +74,8 @@ already exist for this to work.
 
 See the example in test/ to see how schema is inferred.
 
-Advanced Options
-================
+Advanced Options for CassandraStorage
+=====================================
 
 The following environment variables default to false but can be set to true to enable them:
 
@@ -92,3 +95,15 @@ PIG_INPUT_SPLIT_SIZE: this sets the split size passed to Hadoop, controlling
                       the amount of mapper tasks created.  This can also be set in the LOAD
url by
                       adding the 'split_size=X' parameter, where X is an integer amount for
the size.
 
+CqlStorage
+==========
+
+The CqlStorage class is somewhat similar to CassandraStorage, but it can work with CQL3-defined
ColumnFamilies.  The main difference is in the URL format:
+
+cql://[username:password@]<keyspace>/<columnfamily>[?[page_size=<size>][&columns=<col1,col2>][&output_query=<prepared_statement>][&where_clause=<clause>][&split_size=<size>][&partitioner=<partitioner>]]
+
+Which in grunt, the simplest example would look like:
+
+grunt> rows = LOAD 'cql://MyKeyspace/MyColumnFamily' USING CqlStorage();
+
+CqlStorage handles wide rows automatically and thus has no separate flag for this.

http://git-wip-us.apache.org/repos/asf/cassandra/blob/168482bc/examples/pig/test/test_storage.pig
----------------------------------------------------------------------
diff --git a/examples/pig/test/test_storage.pig b/examples/pig/test/test_storage.pig
index 93dd91f..026cb02 100644
--- a/examples/pig/test/test_storage.pig
+++ b/examples/pig/test/test_storage.pig
@@ -1,4 +1,4 @@
-rows = LOAD 'cassandra://PigTest/SomeApp?widerows=true' USING CassandraStorage();
+rows = LOAD 'cassandra://PigTest/SomeApp' USING CassandraStorage();
 -- full copy
 STORE rows INTO 'cassandra://PigTest/CopyOfSomeApp' USING CassandraStorage();
 -- single tuple


Mime
View raw message