mirror of https://github.com/apache/cassandra
merge from 1.1
This commit is contained in:
commit
c4692a1713
|
|
@ -91,6 +91,7 @@
|
|||
Merged from 1.0:
|
||||
* increase Xss to 160k to accomodate latest 1.6 JVMs (CASSANDRA-4602)
|
||||
* fix toString of hint destination tokens (CASSANDRA-4568)
|
||||
* Fix multiple values for CurrentLocal NodeID (CASSANDRA-4626)
|
||||
|
||||
|
||||
1.1.4
|
||||
|
|
@ -101,7 +102,10 @@ 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
|
||||
|
||||
|
||||
* munmap commitlog segments before rename (CASSANDRA-4337)
|
||||
|
|
|
|||
18
bin/cqlsh
18
bin/cqlsh
|
|
@ -124,8 +124,10 @@ precedence over any defaults.""" % globals()
|
|||
parser = optparse.OptionParser(description=description, epilog=epilog,
|
||||
usage="Usage: %prog [options] [host [port]]",
|
||||
version='cqlsh ' + version)
|
||||
parser.add_option("-C", "--color", action="store_true",
|
||||
help="Enable color output.")
|
||||
parser.add_option("-C", "--color", action='store_true', dest='color',
|
||||
help='Always use color output')
|
||||
parser.add_option("--no-color", action='store_false', dest='color',
|
||||
help='Never use color output')
|
||||
parser.add_option("-u", "--username", help="Authenticate as user.")
|
||||
parser.add_option("-p", "--password", help="Authenticate using password.")
|
||||
parser.add_option('-k', '--keyspace', help='Authenticate to the given keyspace.')
|
||||
|
|
@ -2444,9 +2446,6 @@ def read_options(cmdlineargs, environment):
|
|||
optvalues.keyspace = option_with_default(configs.get, 'authentication', 'keyspace')
|
||||
optvalues.completekey = option_with_default(configs.get, 'ui', 'completekey', 'tab')
|
||||
optvalues.color = option_with_default(configs.getboolean, 'ui', 'color')
|
||||
if optvalues.color is None:
|
||||
# default yes if tty
|
||||
optvalues.color = should_use_color()
|
||||
optvalues.debug = False
|
||||
optvalues.file = None
|
||||
optvalues.tty = sys.stdin.isatty()
|
||||
|
|
@ -2466,9 +2465,16 @@ def read_options(cmdlineargs, environment):
|
|||
port = arguments[1]
|
||||
|
||||
if options.file is not None:
|
||||
options.color = False
|
||||
options.tty = False
|
||||
|
||||
if optvalues.color in (True, False):
|
||||
options.color = optvalues.color
|
||||
else:
|
||||
if options.file is not None:
|
||||
options.color = False
|
||||
else:
|
||||
options.color = should_use_color()
|
||||
|
||||
options.cqlversion, cqlvertup = full_cql_version(options.cqlversion)
|
||||
if cqlvertup[0] < 3:
|
||||
options.cqlmodule = cqlhandling
|
||||
|
|
|
|||
|
|
@ -472,6 +472,9 @@ public class DatabaseDescriptor
|
|||
// setup schema required for authorization
|
||||
authorityContainer.setup();
|
||||
|
||||
// setup schema required for authorization
|
||||
authorityContainer.setup();
|
||||
|
||||
/* Load the seeds for node contact points */
|
||||
if (conf.seed_provider == null)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -18,18 +18,19 @@
|
|||
package org.apache.cassandra.cql3.statements;
|
||||
|
||||
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;
|
||||
|
||||
|
|
|
|||
|
|
@ -24,7 +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;
|
||||
|
|
@ -35,6 +35,7 @@ import org.apache.cassandra.config.CFMetaData;
|
|||
import org.apache.cassandra.config.ColumnDefinition;
|
||||
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;
|
||||
|
|
|
|||
|
|
@ -226,7 +226,7 @@ public class ClientState
|
|||
resourceClear();
|
||||
resource.add(keyspace);
|
||||
|
||||
// check if keyspace access is set to Permission.ALL
|
||||
// check if keyspace access is set to Permission.FULL_ACCESS
|
||||
// (which means that user has all access on keyspace and it's underlying elements)
|
||||
if (DatabaseDescriptor.getAuthority().authorize(user, resource).contains(Permission.FULL_ACCESS))
|
||||
return;
|
||||
|
|
@ -267,6 +267,7 @@ public class ClientState
|
|||
perm,
|
||||
Resources.toString(resource)));
|
||||
|
||||
|
||||
boolean granular = false;
|
||||
|
||||
for (Permission p : perms)
|
||||
|
|
|
|||
Loading…
Reference in New Issue