mirror of https://github.com/apache/cassandra
Merge branch 'cassandra-3.0' into cassandra-3.X
This commit is contained in:
commit
6130d4b2c5
|
|
@ -121,6 +121,7 @@ Merged from 3.0:
|
|||
* Add schema to snapshot manifest, add USING TIMESTAMP clause to ALTER TABLE statements (CASSANDRA-7190)
|
||||
* If CF has no clustering columns, any row cache is full partition cache (CASSANDRA-12499)
|
||||
* Correct log message for statistics of offheap memtable flush (CASSANDRA-12776)
|
||||
* Explicitly set locale for string validation (CASSANDRA-12541,CASSANDRA-12542,CASSANDRA-12543,CASSANDRA-12545)
|
||||
Merged from 2.2:
|
||||
* Clean up permissions when a UDA is dropped (CASSANDRA-12720)
|
||||
* Limit colUpdateTimeDelta histogram updates to reasonable deltas (CASSANDRA-11117)
|
||||
|
|
|
|||
|
|
@ -125,7 +125,7 @@ class CqlRecordWriter extends RecordWriter<Map<String, ByteBuffer>, List<ByteBuf
|
|||
partitionKeyColumns = tableMetadata.getPartitionKey();
|
||||
|
||||
String cqlQuery = CqlConfigHelper.getOutputCql(conf).trim();
|
||||
if (cqlQuery.toLowerCase().startsWith("insert"))
|
||||
if (cqlQuery.toLowerCase(Locale.ENGLISH).startsWith("insert"))
|
||||
throw new UnsupportedOperationException("INSERT with CqlRecordWriter is not supported, please use UPDATE/DELETE statement");
|
||||
cql = appendKeyWhereClauses(cqlQuery);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ package org.apache.cassandra.schema;
|
|||
|
||||
import java.text.DecimalFormat;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.Locale;
|
||||
|
||||
import com.google.common.base.Objects;
|
||||
|
||||
|
|
@ -88,7 +89,7 @@ public final class SpeculativeRetryParam
|
|||
|
||||
public static SpeculativeRetryParam fromString(String value)
|
||||
{
|
||||
if (value.toLowerCase().endsWith("ms"))
|
||||
if (value.toLowerCase(Locale.ENGLISH).endsWith("ms"))
|
||||
{
|
||||
try
|
||||
{
|
||||
|
|
@ -100,7 +101,7 @@ public final class SpeculativeRetryParam
|
|||
}
|
||||
}
|
||||
|
||||
if (value.toUpperCase().endsWith(Kind.PERCENTILE.toString()))
|
||||
if (value.toUpperCase(Locale.ENGLISH).endsWith(Kind.PERCENTILE.toString()))
|
||||
{
|
||||
double threshold;
|
||||
try
|
||||
|
|
|
|||
|
|
@ -193,7 +193,7 @@ public class ThriftConversion
|
|||
private static boolean isSuper(String thriftColumnType)
|
||||
throws org.apache.cassandra.exceptions.InvalidRequestException
|
||||
{
|
||||
switch (thriftColumnType.toLowerCase())
|
||||
switch (thriftColumnType.toLowerCase(Locale.ENGLISH))
|
||||
{
|
||||
case "standard": return false;
|
||||
case "super": return true;
|
||||
|
|
@ -675,7 +675,7 @@ public class ThriftConversion
|
|||
|
||||
private static CachingParams cachingFromTrhfit(String caching)
|
||||
{
|
||||
switch (caching.toUpperCase())
|
||||
switch (caching.toUpperCase(Locale.ENGLISH))
|
||||
{
|
||||
case "ALL":
|
||||
return CachingParams.CACHE_EVERYTHING;
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@ import java.util.List;
|
|||
import java.util.concurrent.BlockingQueue;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.concurrent.locks.LockSupport;
|
||||
import java.util.Locale;
|
||||
|
||||
import com.google.common.annotations.VisibleForTesting;
|
||||
import com.google.common.base.Preconditions;
|
||||
|
|
@ -511,7 +512,7 @@ public class CoalescingStrategies
|
|||
String displayName)
|
||||
{
|
||||
String classname = null;
|
||||
String strategyCleaned = strategy.trim().toUpperCase();
|
||||
String strategyCleaned = strategy.trim().toUpperCase(Locale.ENGLISH);
|
||||
switch(strategyCleaned)
|
||||
{
|
||||
case "MOVINGAVERAGE":
|
||||
|
|
|
|||
Loading…
Reference in New Issue