cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brandonwilli...@apache.org
Subject git commit: Pig throws a useful error when the destination CF doesn't exist. Patch by brandonwilliams, reviewed by xedin for CASSANDRA-3847
Date Mon, 06 Feb 2012 21:07:32 GMT
Updated Branches:
  refs/heads/cassandra-1.0 b527d9ffe -> 3df7040fc


Pig throws a useful error when the destination CF doesn't exist.
Patch by brandonwilliams, reviewed by xedin for CASSANDRA-3847


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

Branch: refs/heads/cassandra-1.0
Commit: 3df7040fcf8002c8392224192e5c1794b1aefd13
Parents: b527d9f
Author: Brandon Williams <brandonwilliams@apache.org>
Authored: Mon Feb 6 14:58:02 2012 -0600
Committer: Brandon Williams <brandonwilliams@apache.org>
Committed: Mon Feb 6 14:58:02 2012 -0600

----------------------------------------------------------------------
 .../cassandra/hadoop/pig/CassandraStorage.java     |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/3df7040f/contrib/pig/src/java/org/apache/cassandra/hadoop/pig/CassandraStorage.java
----------------------------------------------------------------------
diff --git a/contrib/pig/src/java/org/apache/cassandra/hadoop/pig/CassandraStorage.java b/contrib/pig/src/java/org/apache/cassandra/hadoop/pig/CassandraStorage.java
index 1a594ce..b1af1b5 100644
--- a/contrib/pig/src/java/org/apache/cassandra/hadoop/pig/CassandraStorage.java
+++ b/contrib/pig/src/java/org/apache/cassandra/hadoop/pig/CassandraStorage.java
@@ -598,7 +598,10 @@ public class CassandraStorage extends LoadFunc implements StoreFuncInterface,
Lo
                         break;
                     }
                 }
-                property.setProperty(signature, cfdefToString(cfDef));
+                if (cfDef != null)
+                    property.setProperty(signature, cfdefToString(cfDef));
+                else
+                    throw new RuntimeException("Column family '" + column_family + "' not
found in keyspace '" + keyspace + "'");
             }
             catch (TException e)
             {


Mime
View raw message