cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brandonwilli...@apache.org
Subject git commit: Pig: Remove errant LIMIT clause in CqlNativeStorage
Date Thu, 23 Oct 2014 17:00:21 GMT
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.0 b10c2ab86 -> 46f43cee7 (forced update)


Pig: Remove errant LIMIT clause in CqlNativeStorage

Patch by Alex Liu, reviewed by brandonwilliams for CASSANDRA-8166


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

Branch: refs/heads/cassandra-2.0
Commit: 46f43cee7297e267d76b3369c2aa2f1bfc76f70c
Parents: 02b83d9
Author: Brandon Williams <brandonwilliams@apache.org>
Authored: Thu Oct 23 11:53:36 2014 -0500
Committer: Brandon Williams <brandonwilliams@apache.org>
Committed: Thu Oct 23 11:58:33 2014 -0500

----------------------------------------------------------------------
 CHANGES.txt                                          |  4 ++++
 .../cassandra/hadoop/cql3/CqlRecordReader.java       | 15 ++-------------
 2 files changed, 6 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/46f43cee/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 4ed7bed..6c2be8c 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,3 +1,7 @@
+2.0.12:
+ * Pig: Remove errant LIMIT clause in CqlNativeStorage (CASSANDRA-8166)
+
+
 2.0.11:
  * Reject conditions on DELETE unless full PK is given (CASSANDRA-6430)
  * Properly reject the token function DELETE (CASSANDRA-7747)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/46f43cee/src/java/org/apache/cassandra/hadoop/cql3/CqlRecordReader.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/hadoop/cql3/CqlRecordReader.java b/src/java/org/apache/cassandra/hadoop/cql3/CqlRecordReader.java
index 3eab7c0..df06e8e 100644
--- a/src/java/org/apache/cassandra/hadoop/cql3/CqlRecordReader.java
+++ b/src/java/org/apache/cassandra/hadoop/cql3/CqlRecordReader.java
@@ -86,7 +86,6 @@ public class CqlRecordReader extends RecordReader<Long, Row>
     private IPartitioner partitioner;
     private String inputColumns;
     private String userDefinedWhereClauses;
-    private int pageRowSize;
 
     private List<String> partitionKeys = new ArrayList<>();
 
@@ -111,14 +110,7 @@ public class CqlRecordReader extends RecordReader<Long, Row>
         inputColumns = CqlConfigHelper.getInputcolumns(conf);
         userDefinedWhereClauses = CqlConfigHelper.getInputWhereClauses(conf);
         Optional<Integer> pageRowSizeOptional = CqlConfigHelper.getInputPageRowSize(conf);
-        try
-        {
-            pageRowSize = pageRowSizeOptional.isPresent() ? pageRowSizeOptional.get() : DEFAULT_CQL_PAGE_LIMIT;
-        }
-        catch(NumberFormatException e)
-        {
-            pageRowSize = DEFAULT_CQL_PAGE_LIMIT;
-        }
+
         try
         {
             if (cluster != null)
@@ -143,7 +135,6 @@ public class CqlRecordReader extends RecordReader<Long, Row>
         // otherwise we will fall back to building a query using the:
         //   inputColumns
         //   whereClauses
-        //   pageRowSize
         cqlQuery = CqlConfigHelper.getInputCql(conf);
         // validate that the user hasn't tried to give us a custom query along with input
columns
         // and where clauses
@@ -519,8 +510,7 @@ public class CqlRecordReader extends RecordReader<Long, Row>
     /**
      * Build a query for the reader of the form:
      *
-     * SELECT * FROM ks>cf token(pk1,...pkn)>? AND token(pk1,...pkn)<=? [AND user
where clauses]
-     * LIMIT pageRowSize [ALLOW FILTERING]
+     * SELECT * FROM ks>cf token(pk1,...pkn)>? AND token(pk1,...pkn)<=? [AND user
where clauses] [ALLOW FILTERING]
      */
     private String buildQuery()
     {
@@ -539,7 +529,6 @@ public class CqlRecordReader extends RecordReader<Long, Row>
         String whereClause = "";
         if (StringUtils.isNotEmpty(userDefinedWhereClauses))
             whereClause += " AND " + userDefinedWhereClauses;
-        whereClause += " LIMIT " + pageRowSize;
         if (StringUtils.isNotEmpty(userDefinedWhereClauses))
             whereClause += " ALLOW FILTERING";
         return whereClause;


Mime
View raw message