cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xe...@apache.org
Subject [1/13] git commit: merge from 1.1
Date Mon, 10 Sep 2012 22:13:31 GMT
Updated Branches:
  refs/heads/trunk 804dd0991 -> c4692a171


merge from 1.1


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

Branch: refs/heads/trunk
Commit: c4692a1713e5abe1446954c9202aebe0f2d3ec81
Parents: 804dd09 e172a9b
Author: Pavel Yaskevich <xedin@apache.org>
Authored: Tue Sep 11 01:13:05 2012 +0300
Committer: Pavel Yaskevich <xedin@apache.org>
Committed: Tue Sep 11 01:13:05 2012 +0300

----------------------------------------------------------------------
 CHANGES.txt                                        |    4 +++
 bin/cqlsh                                          |   18 ++++++++++-----
 .../cassandra/config/DatabaseDescriptor.java       |    3 ++
 .../cql3/statements/AlterTableStatement.java       |   17 +++++++------
 .../statements/CreateColumnFamilyStatement.java    |    3 +-
 .../org/apache/cassandra/service/ClientState.java  |    3 +-
 6 files changed, 32 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/c4692a17/CHANGES.txt
----------------------------------------------------------------------
diff --cc CHANGES.txt
index 26c361a,246bc49..f5ae4e3
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -101,9 -37,9 +102,12 @@@ Merged from 1.0
   * (Hadoop) fix setting key length for old-style mapred api (CASSANDRA-4534)
   * (Hadoop) fix iterating through a resultset consisting entirely
     of tombstoned rows (CASSANDRA-4466)
++<<<<<<< HEAD
 + * Fix multiple values for CurrentLocal NodeID (CASSANDRA-4626)
++=======
++>>>>>>> cassandra-1.1
  
  
 -1.1.3
   * munmap commitlog segments before rename (CASSANDRA-4337)
   * (JMX) rename getRangeKeySample to sampleKeyRange to avoid returning
     multi-MB results as an attribute (CASSANDRA-4452)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/c4692a17/bin/cqlsh
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/c4692a17/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/config/DatabaseDescriptor.java
index 97106f1,20fa981..d479acb
--- a/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
+++ b/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
@@@ -461,15 -438,21 +461,18 @@@ public class DatabaseDescripto
              rowCacheProvider = FBUtilities.newCacheProvider(conf.row_cache_provider);
  
              // Hardcoded system tables
 -            KSMetaData systemMeta = KSMetaData.systemKeyspace();
 -            Schema.instance.load(CFMetaData.StatusCf);
 -            Schema.instance.load(CFMetaData.HintsCf);
 -            Schema.instance.load(CFMetaData.MigrationsCf);
 -            Schema.instance.load(CFMetaData.SchemaCf);
 -            Schema.instance.load(CFMetaData.IndexCf);
 -            Schema.instance.load(CFMetaData.NodeIdCf);
 -            Schema.instance.load(CFMetaData.VersionCf);
 -            Schema.instance.load(CFMetaData.SchemaKeyspacesCf);
 -            Schema.instance.load(CFMetaData.SchemaColumnFamiliesCf);
 -            Schema.instance.load(CFMetaData.SchemaColumnsCf);
 -
 -            Schema.instance.addSystemTable(systemMeta);
 +            List<KSMetaData> systemKeyspaces = Arrays.asList(KSMetaData.systemKeyspace(),
KSMetaData.traceKeyspace());
 +            for (KSMetaData ksmd : systemKeyspaces)
 +            {
 +                for (CFMetaData cfm : ksmd.cfMetaData().values())
 +                    Schema.instance.load(cfm);
 +                Schema.instance.setTableDefinition(ksmd);
 +            }
 +
 +            // setup schema required for authorization
++            authorityContainer.setup();
+ 
+             // setup schema required for authorization
              authorityContainer.setup();
  
              /* Load the seeds for node contact points */

http://git-wip-us.apache.org/repos/asf/cassandra/blob/c4692a17/src/java/org/apache/cassandra/cql3/statements/AlterTableStatement.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/cql3/statements/AlterTableStatement.java
index 360d188,7867019..fe89f32
--- a/src/java/org/apache/cassandra/cql3/statements/AlterTableStatement.java
+++ b/src/java/org/apache/cassandra/cql3/statements/AlterTableStatement.java
@@@ -17,21 -18,17 +17,22 @@@
   */
  package org.apache.cassandra.cql3.statements;
  
 -import java.util.*;
 +import java.nio.ByteBuffer;
- import java.util.*;
++import java.util.ArrayList;
++import java.util.HashMap;
++import java.util.List;
++import java.util.Map;
  
  import org.apache.cassandra.auth.Permission;
++import org.apache.cassandra.config.CFMetaData;
++import org.apache.cassandra.config.ColumnDefinition;
  import org.apache.cassandra.cql3.*;
--import org.apache.cassandra.config.*;
--import org.apache.cassandra.db.marshal.AbstractType;
- import org.apache.cassandra.db.marshal.CollectionType;
- import org.apache.cassandra.db.marshal.ColumnToCollectionType;
--import org.apache.cassandra.db.marshal.CompositeType;
--import org.apache.cassandra.db.marshal.CounterColumnType;
- import org.apache.cassandra.exceptions.*;
++import org.apache.cassandra.db.marshal.*;
 +import org.apache.cassandra.exceptions.ConfigurationException;
++import org.apache.cassandra.exceptions.InvalidRequestException;
++import org.apache.cassandra.exceptions.UnauthorizedException;
  import org.apache.cassandra.service.ClientState;
  import org.apache.cassandra.service.MigrationManager;
 -import org.apache.cassandra.thrift.InvalidRequestException;
  
  import static org.apache.cassandra.thrift.ThriftValidation.validateColumnFamily;
  

http://git-wip-us.apache.org/repos/asf/cassandra/blob/c4692a17/src/java/org/apache/cassandra/cql3/statements/CreateColumnFamilyStatement.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/cql3/statements/CreateColumnFamilyStatement.java
index ac7d02c,763db28..238ce67
--- a/src/java/org/apache/cassandra/cql3/statements/CreateColumnFamilyStatement.java
+++ b/src/java/org/apache/cassandra/cql3/statements/CreateColumnFamilyStatement.java
@@@ -24,7 -25,6 +24,7 @@@ import java.util.List
  import java.util.Map;
  
  import org.apache.cassandra.auth.Permission;
- import org.apache.cassandra.exceptions.UnauthorizedException;
++
  import org.apache.commons.lang.StringUtils;
  import com.google.common.collect.HashMultiset;
  import com.google.common.collect.Multiset;
@@@ -33,12 -33,9 +33,13 @@@ import org.apache.cassandra.config.Sche
  import org.apache.cassandra.cql3.*;
  import org.apache.cassandra.config.CFMetaData;
  import org.apache.cassandra.config.ColumnDefinition;
 -import org.apache.cassandra.config.ConfigurationException;
 +import org.apache.cassandra.exceptions.ConfigurationException;
 +import org.apache.cassandra.exceptions.RequestValidationException;
++import org.apache.cassandra.exceptions.UnauthorizedException;
  import org.apache.cassandra.db.ColumnFamilyType;
  import org.apache.cassandra.db.marshal.AbstractType;
 +import org.apache.cassandra.db.marshal.CollectionType;
 +import org.apache.cassandra.db.marshal.ColumnToCollectionType;
  import org.apache.cassandra.db.marshal.CompositeType;
  import org.apache.cassandra.db.marshal.ReversedType;
  import org.apache.cassandra.db.marshal.CounterColumnType;

http://git-wip-us.apache.org/repos/asf/cassandra/blob/c4692a17/src/java/org/apache/cassandra/service/ClientState.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/service/ClientState.java
index e96da85,b7bf7d7..d3bbc4e
--- a/src/java/org/apache/cassandra/service/ClientState.java
+++ b/src/java/org/apache/cassandra/service/ClientState.java
@@@ -262,11 -220,11 +262,12 @@@ public class ClientStat
              return; // full access
  
          if (perms.contains(Permission.NO_ACCESS))
 -            throw new PermissionDenied(String.format("%s does not have permission %s for
%s",
 -                                                     user,
 -                                                     perm,
 -                                                     Resources.toString(resource)));
 +            throw new UnauthorizedException(String.format("%s does not have permission %s
for %s",
 +                                                          user,
 +                                                          perm,
 +                                                          Resources.toString(resource)));
 +
+ 
          boolean granular = false;
  
          for (Permission p : perms)


Mime
View raw message