cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alek...@apache.org
Subject [1/5] git commit: Fix typo
Date Fri, 20 Dec 2013 17:20:11 GMT
Updated Branches:
  refs/heads/trunk 0d695d4d1 -> ed6584ee1


Fix typo


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

Branch: refs/heads/trunk
Commit: b97c5233e17b73232be3554cf06b8ae6e472b145
Parents: a4895c5
Author: Aleksey Yeschenko <aleksey@apache.org>
Authored: Fri Dec 20 19:52:00 2013 +0300
Committer: Aleksey Yeschenko <aleksey@apache.org>
Committed: Fri Dec 20 19:52:00 2013 +0300

----------------------------------------------------------------------
 src/java/org/apache/cassandra/cql3/CQLStatement.java  |  2 +-
 .../org/apache/cassandra/cql3/QueryProcessor.java     | 14 +++++++-------
 .../cql3/statements/AuthenticationStatement.java      |  2 +-
 .../cql3/statements/AuthorizationStatement.java       |  2 +-
 .../cassandra/cql3/statements/BatchStatement.java     |  3 +--
 .../cql3/statements/CreateColumnFamilyStatement.java  |  2 +-
 .../cassandra/cql3/statements/DeleteStatement.java    |  2 +-
 .../cassandra/cql3/statements/ParsedStatement.java    |  2 +-
 .../cassandra/cql3/statements/SelectStatement.java    |  6 +++---
 .../cassandra/cql3/statements/UpdateStatement.java    |  2 +-
 .../org/apache/cassandra/thrift/CassandraServer.java  |  2 +-
 11 files changed, 19 insertions(+), 20 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/b97c5233/src/java/org/apache/cassandra/cql3/CQLStatement.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/cql3/CQLStatement.java b/src/java/org/apache/cassandra/cql3/CQLStatement.java
index 63f9cc6..02475e9 100644
--- a/src/java/org/apache/cassandra/cql3/CQLStatement.java
+++ b/src/java/org/apache/cassandra/cql3/CQLStatement.java
@@ -31,7 +31,7 @@ public interface CQLStatement
     /**
      * Returns the number of bound terms in this statement.
      */
-    public int getBoundsTerms();
+    public int getBoundTerms();
 
     /**
      * Perform any access verification necessary for the statement.

http://git-wip-us.apache.org/repos/asf/cassandra/blob/b97c5233/src/java/org/apache/cassandra/cql3/QueryProcessor.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/cql3/QueryProcessor.java b/src/java/org/apache/cassandra/cql3/QueryProcessor.java
index a62b248..332aea1 100644
--- a/src/java/org/apache/cassandra/cql3/QueryProcessor.java
+++ b/src/java/org/apache/cassandra/cql3/QueryProcessor.java
@@ -153,7 +153,7 @@ public class QueryProcessor
     throws RequestExecutionException, RequestValidationException
     {
         CQLStatement prepared = getStatement(queryString, queryState.getClientState()).statement;
-        if (prepared.getBoundsTerms() > 0)
+        if (prepared.getBoundTerms() > 0)
             throw new InvalidRequestException("Cannot execute query with bind variables");
         return processStatement(prepared, cl, queryState, Collections.<ByteBuffer>emptyList());
     }
@@ -220,7 +220,7 @@ public class QueryProcessor
         ParsedStatement.Prepared prepared = getStatement(queryString, clientState);
         ResultMessage.Prepared msg = storePreparedStatement(queryString, clientState.getRawKeyspace(),
prepared, forThrift);
 
-        int bountTerms = prepared.statement.getBoundsTerms();
+        int bountTerms = prepared.statement.getBoundTerms();
         if (bountTerms > FBUtilities.MAX_UNSIGNED_SHORT)
             throw new InvalidRequestException(String.format("Too many markers(?). %d markers
exceed the allowed maximum of %d", bountTerms, FBUtilities.MAX_UNSIGNED_SHORT));
         assert bountTerms == prepared.boundNames.size();
@@ -246,7 +246,7 @@ public class QueryProcessor
             thriftPreparedStatements.put(statementId, prepared.statement);
             logger.trace(String.format("Stored prepared statement #%d with %d bind markers",
                                        statementId,
-                                       prepared.statement.getBoundsTerms()));
+                                       prepared.statement.getBoundTerms()));
             return ResultMessage.Prepared.forThrift(statementId, prepared.boundNames);
         }
         else
@@ -255,7 +255,7 @@ public class QueryProcessor
             preparedStatements.put(statementId, prepared.statement);
             logger.trace(String.format("Stored prepared statement %s with %d bind markers",
                          statementId,
-                         prepared.statement.getBoundsTerms()));
+                         prepared.statement.getBoundTerms()));
             return new ResultMessage.Prepared(statementId, prepared.boundNames);
         }
     }
@@ -264,11 +264,11 @@ public class QueryProcessor
     throws RequestExecutionException, RequestValidationException
     {
         // Check to see if there are any bound variables to verify
-        if (!(variables.isEmpty() && (statement.getBoundsTerms() == 0)))
+        if (!(variables.isEmpty() && (statement.getBoundTerms() == 0)))
         {
-            if (variables.size() != statement.getBoundsTerms())
+            if (variables.size() != statement.getBoundTerms())
                 throw new InvalidRequestException(String.format("there were %d markers(?)
in CQL but %d bound variables",
-                                                                statement.getBoundsTerms(),
+                                                                statement.getBoundTerms(),
                                                                 variables.size()));
 
             // at this point there is a match in count between markers and variables that
is non-zero

http://git-wip-us.apache.org/repos/asf/cassandra/blob/b97c5233/src/java/org/apache/cassandra/cql3/statements/AuthenticationStatement.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/cql3/statements/AuthenticationStatement.java b/src/java/org/apache/cassandra/cql3/statements/AuthenticationStatement.java
index 64468af..40d414b 100644
--- a/src/java/org/apache/cassandra/cql3/statements/AuthenticationStatement.java
+++ b/src/java/org/apache/cassandra/cql3/statements/AuthenticationStatement.java
@@ -35,7 +35,7 @@ public abstract class AuthenticationStatement extends ParsedStatement implements
         return new Prepared(this);
     }
 
-    public int getBoundsTerms()
+    public int getBoundTerms()
     {
         return 0;
     }

http://git-wip-us.apache.org/repos/asf/cassandra/blob/b97c5233/src/java/org/apache/cassandra/cql3/statements/AuthorizationStatement.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/cql3/statements/AuthorizationStatement.java b/src/java/org/apache/cassandra/cql3/statements/AuthorizationStatement.java
index af1bd17..119c087 100644
--- a/src/java/org/apache/cassandra/cql3/statements/AuthorizationStatement.java
+++ b/src/java/org/apache/cassandra/cql3/statements/AuthorizationStatement.java
@@ -36,7 +36,7 @@ public abstract class AuthorizationStatement extends ParsedStatement implements
         return new Prepared(this);
     }
 
-    public int getBoundsTerms()
+    public int getBoundTerms()
     {
         return 0;
     }

http://git-wip-us.apache.org/repos/asf/cassandra/blob/b97c5233/src/java/org/apache/cassandra/cql3/statements/BatchStatement.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/cql3/statements/BatchStatement.java b/src/java/org/apache/cassandra/cql3/statements/BatchStatement.java
index d211eb9..05dae48 100644
--- a/src/java/org/apache/cassandra/cql3/statements/BatchStatement.java
+++ b/src/java/org/apache/cassandra/cql3/statements/BatchStatement.java
@@ -31,7 +31,6 @@ import org.apache.cassandra.db.RowMutation;
 import org.apache.cassandra.exceptions.*;
 import org.apache.cassandra.service.ClientState;
 import org.apache.cassandra.utils.Pair;
-import org.apache.cassandra.utils.ObjectSizes;
 
 /**
  * A <code>BATCH</code> statement parsed from a CQL query.
@@ -140,7 +139,7 @@ public class BatchStatement extends ModificationStatement
 
     public ParsedStatement.Prepared prepare() throws InvalidRequestException
     {
-        CFDefinition.Name[] boundNames = new CFDefinition.Name[getBoundsTerms()];
+        CFDefinition.Name[] boundNames = new CFDefinition.Name[getBoundTerms()];
         return prepare(boundNames);
     }
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/b97c5233/src/java/org/apache/cassandra/cql3/statements/CreateColumnFamilyStatement.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/cql3/statements/CreateColumnFamilyStatement.java
b/src/java/org/apache/cassandra/cql3/statements/CreateColumnFamilyStatement.java
index c0e6349..cd4be71 100644
--- a/src/java/org/apache/cassandra/cql3/statements/CreateColumnFamilyStatement.java
+++ b/src/java/org/apache/cassandra/cql3/statements/CreateColumnFamilyStatement.java
@@ -175,7 +175,7 @@ public class CreateColumnFamilyStatement extends SchemaAlteringStatement
             properties.validate();
 
             CreateColumnFamilyStatement stmt = new CreateColumnFamilyStatement(cfName, properties);
-            stmt.setBoundTerms(getBoundsTerms());
+            stmt.setBoundTerms(getBoundTerms());
 
             Map<ByteBuffer, CollectionType> definedCollections = null;
             for (Map.Entry<ColumnIdentifier, CQL3Type> entry : definitions.entrySet())

http://git-wip-us.apache.org/repos/asf/cassandra/blob/b97c5233/src/java/org/apache/cassandra/cql3/statements/DeleteStatement.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/cql3/statements/DeleteStatement.java b/src/java/org/apache/cassandra/cql3/statements/DeleteStatement.java
index e05f009..e31c1a9 100644
--- a/src/java/org/apache/cassandra/cql3/statements/DeleteStatement.java
+++ b/src/java/org/apache/cassandra/cql3/statements/DeleteStatement.java
@@ -173,7 +173,7 @@ public class DeleteStatement extends ModificationStatement
 
     public ParsedStatement.Prepared prepare() throws InvalidRequestException
     {
-        ColumnSpecification[] boundNames = new ColumnSpecification[getBoundsTerms()];
+        ColumnSpecification[] boundNames = new ColumnSpecification[getBoundTerms()];
         return prepare(boundNames);
     }
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/b97c5233/src/java/org/apache/cassandra/cql3/statements/ParsedStatement.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/cql3/statements/ParsedStatement.java b/src/java/org/apache/cassandra/cql3/statements/ParsedStatement.java
index ffcb7ae..2d0b4c7 100644
--- a/src/java/org/apache/cassandra/cql3/statements/ParsedStatement.java
+++ b/src/java/org/apache/cassandra/cql3/statements/ParsedStatement.java
@@ -27,7 +27,7 @@ public abstract class ParsedStatement
 {
     private int boundTerms;
 
-    public int getBoundsTerms()
+    public int getBoundTerms()
     {
         return boundTerms;
     }

http://git-wip-us.apache.org/repos/asf/cassandra/blob/b97c5233/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java b/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
index e1537fc..4730f18 100644
--- a/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
+++ b/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
@@ -105,7 +105,7 @@ public class SelectStatement implements CQLStatement, MeasurableForPreparedCache
         return meter.measureDeep(this) - meter.measureDeep(cfDef);
     }
 
-    public int getBoundsTerms()
+    public int getBoundTerms()
     {
         return boundTerms;
     }
@@ -1002,7 +1002,7 @@ public class SelectStatement implements CQLStatement, MeasurableForPreparedCache
 
             CFDefinition cfDef = cfm.getCfDef();
 
-            ColumnSpecification[] names = new ColumnSpecification[getBoundsTerms()];
+            ColumnSpecification[] names = new ColumnSpecification[getBoundTerms()];
 
             // Select clause
             if (parameters.isCount && !selectClause.isEmpty())
@@ -1012,7 +1012,7 @@ public class SelectStatement implements CQLStatement, MeasurableForPreparedCache
                                 ? Selection.wildcard(cfDef)
                                 : Selection.fromSelectors(cfDef, selectClause);
 
-            SelectStatement stmt = new SelectStatement(cfDef, getBoundsTerms(), parameters,
selection);
+            SelectStatement stmt = new SelectStatement(cfDef, getBoundTerms(), parameters,
selection);
 
             /*
              * WHERE clause. For a given entity, rules are:

http://git-wip-us.apache.org/repos/asf/cassandra/blob/b97c5233/src/java/org/apache/cassandra/cql3/statements/UpdateStatement.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/cql3/statements/UpdateStatement.java b/src/java/org/apache/cassandra/cql3/statements/UpdateStatement.java
index 27e7db9..f8adbd1 100644
--- a/src/java/org/apache/cassandra/cql3/statements/UpdateStatement.java
+++ b/src/java/org/apache/cassandra/cql3/statements/UpdateStatement.java
@@ -348,7 +348,7 @@ public class UpdateStatement extends ModificationStatement
 
     public ParsedStatement.Prepared prepare() throws InvalidRequestException
     {
-        ColumnSpecification[] names = new ColumnSpecification[getBoundsTerms()];
+        ColumnSpecification[] names = new ColumnSpecification[getBoundTerms()];
         return prepare(names);
     }
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/b97c5233/src/java/org/apache/cassandra/thrift/CassandraServer.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/thrift/CassandraServer.java b/src/java/org/apache/cassandra/thrift/CassandraServer.java
index 6a35285..ec7a37d 100644
--- a/src/java/org/apache/cassandra/thrift/CassandraServer.java
+++ b/src/java/org/apache/cassandra/thrift/CassandraServer.java
@@ -1849,7 +1849,7 @@ public class CassandraServer implements Cassandra.Iface
                                                                 " (either the query was not
prepared on this host (maybe the host has been restarted?)" +
                                                                 " or you have prepared too
many queries and it has been evicted from the internal cache)",
                                                                 itemId));
-            logger.trace("Retrieved prepared statement #{} with {} bind markers", itemId,
statement.getBoundsTerms());
+            logger.trace("Retrieved prepared statement #{} with {} bind markers", itemId,
statement.getBoundTerms());
 
             return org.apache.cassandra.cql3.QueryProcessor.processPrepared(statement, ThriftConversion.fromThrift(cLevel),
cState.getQueryState(), bindVariables).toThriftResult();
         }


Mime
View raw message