Merge branch 'cassandra-3.0' into trunk
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/fdee887b Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/fdee887b Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/fdee887b Branch: refs/heads/trunk Commit: fdee887b425777eead75ac8f00a2128a6d2c03f8 Parents: aca2a1d a76a8ef Author: Robert Stupp <[email protected]> Authored: Fri Feb 19 10:30:50 2016 +0100 Committer: Robert Stupp <[email protected]> Committed: Fri Feb 19 10:30:50 2016 +0100 ---------------------------------------------------------------------- CHANGES.txt | 1 + .../cql3/functions/JavaBasedUDFunction.java | 10 +-- .../cassandra/cql3/functions/JavaUDF.java | 30 +++---- .../cql3/functions/ScriptBasedUDFunction.java | 2 +- .../cql3/functions/UDFByteCodeVerifier.java | 4 +- .../cassandra/cql3/functions/UDFunction.java | 31 +++---- .../cassandra/cql3/functions/UDHelper.java | 29 ++++--- .../cassandra/cql3/functions/JavaSourceUDF.txt | 6 +- test/conf/logback-test.xml | 2 +- .../entities/udfverify/CallClone.java | 4 +- .../entities/udfverify/CallComDatastax.java | 4 +- .../entities/udfverify/CallFinalize.java | 4 +- .../entities/udfverify/CallOrgApache.java | 4 +- .../entities/udfverify/ClassWithField.java | 4 +- .../udfverify/ClassWithInitializer.java | 4 +- .../udfverify/ClassWithInitializer2.java | 4 +- .../udfverify/ClassWithInitializer3.java | 4 +- .../udfverify/ClassWithStaticInitializer.java | 4 +- .../entities/udfverify/GoodClass.java | 4 +- .../entities/udfverify/UseOfSynchronized.java | 4 +- .../udfverify/UseOfSynchronizedWithNotify.java | 4 +- .../UseOfSynchronizedWithNotifyAll.java | 4 +- .../udfverify/UseOfSynchronizedWithWait.java | 4 +- .../udfverify/UseOfSynchronizedWithWaitL.java | 4 +- .../udfverify/UseOfSynchronizedWithWaitLI.java | 4 +- .../validation/operations/AggregationTest.java | 89 ++++++++++++++++++++ 26 files changed, 183 insertions(+), 85 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cassandra/blob/fdee887b/CHANGES.txt ---------------------------------------------------------------------- diff --cc CHANGES.txt index 830bef1,ae9d545..c12cc50 --- a/CHANGES.txt +++ b/CHANGES.txt @@@ -1,31 -1,5 +1,32 @@@ -3.0.4 +3.4 + * fix TrackerTest to handle new notifications (CASSANDRA-11178) + * add SASI validation for partitioner and complex columns (CASSANDRA-11169) + * Add caching of encrypted credentials in PasswordAuthenticator (CASSANDRA-7715) + * fix SASI memtable switching on flush (CASSANDRA-11159) + * Remove duplicate offline compaction tracking (CASSANDRA-11148) + * fix EQ semantics of analyzed SASI indexes (CASSANDRA-11130) + * Support long name output for nodetool commands (CASSANDRA-7950) + * Encrypted hints (CASSANDRA-11040) + * SASI index options validation (CASSANDRA-11136) + * Optimize disk seek using min/max column name meta data when the LIMIT clause is used + (CASSANDRA-8180) + * Add LIKE support to CQL3 (CASSANDRA-11067) + * Generic Java UDF types (CASSANDRA-10819) + * cqlsh: Include sub-second precision in timestamps by default (CASSANDRA-10428) + * Set javac encoding to utf-8 (CASSANDRA-11077) + * Integrate SASI index into Cassandra (CASSANDRA-10661) + * Add --skip-flush option to nodetool snapshot + * Skip values for non-queried columns (CASSANDRA-10657) + * Add support for secondary indexes on static columns (CASSANDRA-8103) + * CommitLogUpgradeTestMaker creates broken commit logs (CASSANDRA-11051) + * Add metric for number of dropped mutations (CASSANDRA-10866) + * Simplify row cache invalidation code (CASSANDRA-10396) + * Support user-defined compaction through nodetool (CASSANDRA-10660) + * Stripe view locks by key and table ID to reduce contention (CASSANDRA-10981) + * Add nodetool gettimeout and settimeout commands (CASSANDRA-10953) + * Add 3.0 metadata to sstablemetadata output (CASSANDRA-10838) +Merged from 3.0: + * Prevent logging in sandboxed state (CASSANDRA-11033) * Disallow drop/alter operations of UDTs used by UDAs (CASSANDRA-10721) * Add query time validation method on Index (CASSANDRA-11043) * Avoid potential AssertionError in mixed version cluster (CASSANDRA-11128) http://git-wip-us.apache.org/repos/asf/cassandra/blob/fdee887b/src/java/org/apache/cassandra/cql3/functions/JavaBasedUDFunction.java ---------------------------------------------------------------------- diff --cc src/java/org/apache/cassandra/cql3/functions/JavaBasedUDFunction.java index b1dd9f9,660d494..ae30adc --- a/src/java/org/apache/cassandra/cql3/functions/JavaBasedUDFunction.java +++ b/src/java/org/apache/cassandra/cql3/functions/JavaBasedUDFunction.java @@@ -189,10 -184,10 +189,10 @@@ public final class JavaBasedUDFunction super(name, argNames, argTypes, UDHelper.driverTypes(argTypes), returnType, UDHelper.driverType(returnType), calledOnNullInput, "java", body); - // javaParamTypes is just the Java representation for argTypes resp. argCodecs - Class<?>[] javaParamTypes = UDHelper.javaTypes(argCodecs, calledOnNullInput); - // javaReturnType is just the Java representation for returnType resp. returnCodec - Class<?> javaReturnType = UDHelper.asJavaClass(returnCodec); + // javaParamTypes is just the Java representation for argTypes resp. argDataTypes - TypeToken<?>[] javaParamTypes = UDHelper.typeTokens(argDataTypes, calledOnNullInput); ++ TypeToken<?>[] javaParamTypes = UDHelper.typeTokens(argCodecs, calledOnNullInput); + // javaReturnType is just the Java representation for returnType resp. returnDataType - TypeToken<?> javaReturnType = UDHelper.asTypeToken(returnDataType); ++ TypeToken<?> javaReturnType = returnCodec.getJavaType(); // put each UDF in a separate package to prevent cross-UDF code access String pkgName = BASE_PACKAGE + '.' + generateClassName(name, 'p'); http://git-wip-us.apache.org/repos/asf/cassandra/blob/fdee887b/src/java/org/apache/cassandra/cql3/functions/UDHelper.java ---------------------------------------------------------------------- diff --cc src/java/org/apache/cassandra/cql3/functions/UDHelper.java index 6237369,45c734f..4effdc3 --- a/src/java/org/apache/cassandra/cql3/functions/UDHelper.java +++ b/src/java/org/apache/cassandra/cql3/functions/UDHelper.java @@@ -70,12 -76,12 +78,12 @@@ public final class UDHelpe * @param calledOnNullInput whether to allow {@code null} as an argument value * @return array of same size with UDF arguments */ - public static TypeToken<?>[] typeTokens(DataType[] dataTypes, boolean calledOnNullInput) - public static Class<?>[] javaTypes(TypeCodec<Object>[] dataTypes, boolean calledOnNullInput) ++ public static TypeToken<?>[] typeTokens(TypeCodec<Object>[] dataTypes, boolean calledOnNullInput) { - Class<?>[] paramTypes = new Class[dataTypes.length]; + TypeToken<?>[] paramTypes = new TypeToken[dataTypes.length]; for (int i = 0; i < paramTypes.length; i++) { - TypeToken<?> typeToken = asTypeToken(dataTypes[i]); - Class<?> clazz = asJavaClass(dataTypes[i]); ++ TypeToken<?> typeToken = dataTypes[i].getJavaType(); if (!calledOnNullInput) { // only care about classes that can be used in a data type http://git-wip-us.apache.org/repos/asf/cassandra/blob/fdee887b/test/conf/logback-test.xml ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cassandra/blob/fdee887b/test/unit/org/apache/cassandra/cql3/validation/operations/AggregationTest.java ----------------------------------------------------------------------
