cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alek...@apache.org
Subject git commit: Increase CQL2 and CQL3 internals' visibility
Date Mon, 14 Oct 2013 19:37:11 GMT
Updated Branches:
  refs/heads/cassandra-2.0 f557a7775 -> b1c60a0c0


Increase CQL2 and CQL3 internals' visibility

Increase CQL2 and CQL3 internals' visibility for external introspection


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

Branch: refs/heads/cassandra-2.0
Commit: b1c60a0c083fd79141e9cab071ac222b8fe0eb8e
Parents: f557a77
Author: Aleksey Yeschenko <aleksey@apache.org>
Authored: Tue Oct 15 02:35:37 2013 +0700
Committer: Aleksey Yeschenko <aleksey@apache.org>
Committed: Tue Oct 15 02:36:58 2013 +0700

----------------------------------------------------------------------
 src/java/org/apache/cassandra/cql/AbstractModification.java     | 5 +++++
 src/java/org/apache/cassandra/cql/BatchStatement.java           | 5 +++++
 src/java/org/apache/cassandra/cql/SelectStatement.java          | 5 +++++
 src/java/org/apache/cassandra/cql/WhereClause.java              | 5 +++++
 .../org/apache/cassandra/cql3/statements/BatchStatement.java    | 5 +++++
 .../org/apache/cassandra/cql3/statements/DeleteStatement.java   | 2 +-
 .../apache/cassandra/cql3/statements/ModificationStatement.java | 4 ++--
 .../org/apache/cassandra/cql3/statements/SelectStatement.java   | 2 +-
 .../org/apache/cassandra/cql3/statements/UpdateStatement.java   | 2 +-
 9 files changed, 30 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/b1c60a0c/src/java/org/apache/cassandra/cql/AbstractModification.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/cql/AbstractModification.java b/src/java/org/apache/cassandra/cql/AbstractModification.java
index 2ec9f54..8da2611 100644
--- a/src/java/org/apache/cassandra/cql/AbstractModification.java
+++ b/src/java/org/apache/cassandra/cql/AbstractModification.java
@@ -92,6 +92,11 @@ public abstract class AbstractModification
         return timeToLive;
     }
 
+    public String getKeyName()
+    {
+        return keyName;
+    }
+
     /**
      * Convert statement into a list of mutations to apply on the server
      *

http://git-wip-us.apache.org/repos/asf/cassandra/blob/b1c60a0c/src/java/org/apache/cassandra/cql/BatchStatement.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/cql/BatchStatement.java b/src/java/org/apache/cassandra/cql/BatchStatement.java
index 5cb7a0c..b141bcc 100644
--- a/src/java/org/apache/cassandra/cql/BatchStatement.java
+++ b/src/java/org/apache/cassandra/cql/BatchStatement.java
@@ -75,6 +75,11 @@ public class BatchStatement
         return timeToLive;
     }
 
+    public long getTimestamp()
+    {
+        return timestamp;
+    }
+
     public List<IMutation> getMutations(String keyspace, ThriftClientState clientState,
List<ByteBuffer> variables)
     throws InvalidRequestException, UnauthorizedException
     {

http://git-wip-us.apache.org/repos/asf/cassandra/blob/b1c60a0c/src/java/org/apache/cassandra/cql/SelectStatement.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/cql/SelectStatement.java b/src/java/org/apache/cassandra/cql/SelectStatement.java
index 69b191d..2314b73 100644
--- a/src/java/org/apache/cassandra/cql/SelectStatement.java
+++ b/src/java/org/apache/cassandra/cql/SelectStatement.java
@@ -182,6 +182,11 @@ public class SelectStatement
         return Schema.instance.getValueValidator(keyspace, columnFamily, column);
     }
 
+    public List<Relation> getClauseRelations()
+    {
+        return clause.getClauseRelations();
+    }
+
     public String toString()
     {
         return String.format("SelectStatement [expression=%s, isCountOper=%s, columnFamily=%s,
keyspace=%s, cLevel=%s, clause=%s, numRecords=%s]",

http://git-wip-us.apache.org/repos/asf/cassandra/blob/b1c60a0c/src/java/org/apache/cassandra/cql/WhereClause.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/cql/WhereClause.java b/src/java/org/apache/cassandra/cql/WhereClause.java
index aa7d321..3df5102 100644
--- a/src/java/org/apache/cassandra/cql/WhereClause.java
+++ b/src/java/org/apache/cassandra/cql/WhereClause.java
@@ -172,6 +172,11 @@ public class WhereClause
         }
     }
 
+    public List<Relation> getClauseRelations()
+    {
+        return clauseRelations;
+    }
+
     public String toString()
     {
         return String.format("WhereClause [keys=%s, startKey=%s, finishKey=%s, columns=%s,
includeStartKey=%s, includeFinishKey=%s, multiKey=%s, keyAlias=%s]",

http://git-wip-us.apache.org/repos/asf/cassandra/blob/b1c60a0c/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 cb9ff59..3d42da6 100644
--- a/src/java/org/apache/cassandra/cql3/statements/BatchStatement.java
+++ b/src/java/org/apache/cassandra/cql3/statements/BatchStatement.java
@@ -85,6 +85,11 @@ public class BatchStatement implements CQLStatement
         }
     }
 
+    public List<ModificationStatement> getStatements()
+    {
+        return statements;
+    }
+
     private Collection<? extends IMutation> getMutations(List<ByteBuffer> variables,
boolean local, ConsistencyLevel cl, long now)
     throws RequestExecutionException, RequestValidationException
     {

http://git-wip-us.apache.org/repos/asf/cassandra/blob/b1c60a0c/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 4006bdb..3704e14 100644
--- a/src/java/org/apache/cassandra/cql3/statements/DeleteStatement.java
+++ b/src/java/org/apache/cassandra/cql3/statements/DeleteStatement.java
@@ -36,7 +36,7 @@ public class DeleteStatement extends ModificationStatement
         super(boundTerms, cfm, attrs);
     }
 
-    protected boolean requireFullClusteringKey()
+    public boolean requireFullClusteringKey()
     {
         return false;
     }

http://git-wip-us.apache.org/repos/asf/cassandra/blob/b1c60a0c/src/java/org/apache/cassandra/cql3/statements/ModificationStatement.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/cql3/statements/ModificationStatement.java b/src/java/org/apache/cassandra/cql3/statements/ModificationStatement.java
index 4470b51..8445633 100644
--- a/src/java/org/apache/cassandra/cql3/statements/ModificationStatement.java
+++ b/src/java/org/apache/cassandra/cql3/statements/ModificationStatement.java
@@ -48,7 +48,7 @@ public abstract class ModificationStatement implements CQLStatement
 
     private final int boundTerms;
     public final CFMetaData cfm;
-    private final Attributes attrs;
+    public final Attributes attrs;
 
     private final Map<ColumnIdentifier, Restriction> processedKeys = new HashMap<ColumnIdentifier,
Restriction>();
     private final List<Operation> columnOperations = new ArrayList<Operation>();
@@ -63,7 +63,7 @@ public abstract class ModificationStatement implements CQLStatement
         this.attrs = attrs;
     }
 
-    protected abstract boolean requireFullClusteringKey();
+    public abstract boolean requireFullClusteringKey();
     public abstract ColumnFamily updateForKey(ByteBuffer key, ColumnNameBuilder builder,
UpdateParameters params) throws InvalidRequestException;
 
     public int getBoundsTerms()

http://git-wip-us.apache.org/repos/asf/cassandra/blob/b1c60a0c/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 6391199..14400d5 100644
--- a/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
+++ b/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
@@ -719,7 +719,7 @@ public class SelectStatement implements CQLStatement
         return buildBound(b, cfDef.columns.values(), columnRestrictions, isReversed, cfDef.getColumnNameBuilder(),
variables);
     }
 
-    private List<IndexExpression> getIndexExpressions(List<ByteBuffer> variables)
throws InvalidRequestException
+    public List<IndexExpression> getIndexExpressions(List<ByteBuffer> variables)
throws InvalidRequestException
     {
         if (!usesSecondaryIndexing || restrictedNames.isEmpty())
             return Collections.emptyList();

http://git-wip-us.apache.org/repos/asf/cassandra/blob/b1c60a0c/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 2db24ea..89f17a7 100644
--- a/src/java/org/apache/cassandra/cql3/statements/UpdateStatement.java
+++ b/src/java/org/apache/cassandra/cql3/statements/UpdateStatement.java
@@ -40,7 +40,7 @@ public class UpdateStatement extends ModificationStatement
         super(boundTerms, cfm, attrs);
     }
 
-    protected boolean requireFullClusteringKey()
+    public boolean requireFullClusteringKey()
     {
         return true;
     }


Mime
View raw message