mirror of https://github.com/apache/cassandra
Merge branch 'cassandra-1.2' into cassandra-2.0
Conflicts: CHANGES.txt
This commit is contained in:
commit
47fcb05d4b
|
|
@ -30,6 +30,7 @@
|
||||||
Merged from 1.2:
|
Merged from 1.2:
|
||||||
* Optimize FD phi calculation (CASSANDRA-6386)
|
* Optimize FD phi calculation (CASSANDRA-6386)
|
||||||
* Improve initial FD phi estimate when starting up (CASSANDRA-6385)
|
* Improve initial FD phi estimate when starting up (CASSANDRA-6385)
|
||||||
|
* Don't list CQL3 table in CLI describe even if named explicitely (CASSANDRA-5750)
|
||||||
* Invalidate row cache when dropping CF (CASSANDRA-6351)
|
* Invalidate row cache when dropping CF (CASSANDRA-6351)
|
||||||
* add non-jamm path for cached statements (CASSANDRA-6293)
|
* add non-jamm path for cached statements (CASSANDRA-6293)
|
||||||
* (Hadoop) Require CFRR batchSize to be at least 2 (CASSANDRA-6114)
|
* (Hadoop) Require CFRR batchSize to be at least 2 (CASSANDRA-6114)
|
||||||
|
|
|
||||||
|
|
@ -1168,8 +1168,10 @@ public class CliClient
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
// request correct cfDef from the server
|
// request correct cfDef from the server (we let that call include CQL3 cf even though
|
||||||
CfDef cfDef = getCfDef(thriftClient.describe_keyspace(this.keySpace), cfName);
|
// they can't be modified by thrift because the error message that will be thrown by
|
||||||
|
// system_update_column_family will be more useful)
|
||||||
|
CfDef cfDef = getCfDef(thriftClient.describe_keyspace(this.keySpace), cfName, true);
|
||||||
|
|
||||||
if (cfDef == null)
|
if (cfDef == null)
|
||||||
throw new RuntimeException("Column Family " + cfName + " was not found in the current keyspace.");
|
throw new RuntimeException("Column Family " + cfName + " was not found in the current keyspace.");
|
||||||
|
|
@ -2302,7 +2304,7 @@ public class CliClient
|
||||||
"of the keyspaces first.", entityName));
|
"of the keyspaces first.", entityName));
|
||||||
|
|
||||||
CfDef inputCfDef = (inputKsDef == null)
|
CfDef inputCfDef = (inputKsDef == null)
|
||||||
? getCfDef(currentKeySpace, entityName)
|
? getCfDef(currentKeySpace, entityName, false)
|
||||||
: null; // no need to lookup CfDef if we know that it was keyspace
|
: null; // no need to lookup CfDef if we know that it was keyspace
|
||||||
|
|
||||||
if (inputKsDef != null)
|
if (inputKsDef != null)
|
||||||
|
|
@ -2327,7 +2329,7 @@ public class CliClient
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
sessionState.out.println("Sorry, no Keyspace nor ColumnFamily was found with name: " + entityName);
|
sessionState.out.println("Sorry, no Keyspace nor (non-CQL3) ColumnFamily was found with name: " + entityName + " (if this is a CQL3 table, you should use cqlsh instead)");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -2400,7 +2402,7 @@ public class CliClient
|
||||||
private CfDef getCfDef(String keySpaceName, String columnFamilyName)
|
private CfDef getCfDef(String keySpaceName, String columnFamilyName)
|
||||||
{
|
{
|
||||||
KsDef ksDef = keyspacesMap.get(keySpaceName);
|
KsDef ksDef = keyspacesMap.get(keySpaceName);
|
||||||
CfDef cfDef = getCfDef(ksDef, columnFamilyName);
|
CfDef cfDef = getCfDef(ksDef, columnFamilyName, true);
|
||||||
if (cfDef == null)
|
if (cfDef == null)
|
||||||
throw new RuntimeException("No such column family: " + columnFamilyName);
|
throw new RuntimeException("No such column family: " + columnFamilyName);
|
||||||
return cfDef;
|
return cfDef;
|
||||||
|
|
@ -2416,7 +2418,7 @@ public class CliClient
|
||||||
return getCfDef(this.keySpace, columnFamilyName);
|
return getCfDef(this.keySpace, columnFamilyName);
|
||||||
}
|
}
|
||||||
|
|
||||||
private CfDef getCfDef(KsDef keyspace, String columnFamilyName)
|
private CfDef getCfDef(KsDef keyspace, String columnFamilyName, boolean includeCQL3)
|
||||||
{
|
{
|
||||||
for (CfDef cfDef : keyspace.cf_defs)
|
for (CfDef cfDef : keyspace.cf_defs)
|
||||||
{
|
{
|
||||||
|
|
@ -2424,7 +2426,7 @@ public class CliClient
|
||||||
return cfDef;
|
return cfDef;
|
||||||
}
|
}
|
||||||
|
|
||||||
return cql3KeyspacesMap.get(keyspace.name).get(columnFamilyName);
|
return includeCQL3 ? cql3KeyspacesMap.get(keyspace.name).get(columnFamilyName) : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue