Remove clientutil jar

This commit is contained in:
Tyler Hobbs 2016-08-11 13:51:46 -05:00
commit a3e772b8b9
4 changed files with 8 additions and 172 deletions

View File

@ -1,4 +1,5 @@
3.10
* Remove clientutil jar (CASSANDRA-11635)
* Fix compaction throughput throttle (CASSANDRA-12366)
* Delay releasing Memtable memory on flush until PostFlush has finished running (CASSANDRA-12358)
* Cassandra stress should dump all setting on startup (CASSANDRA-11914)

View File

@ -65,6 +65,11 @@ Upgrading
- Logs written to stdout are now consistent with logs written to files.
Time is now local (it was UTC on the console and local in files). Date, thread, file
and line info where added to stdout. (see CASSANDRA-12004)
- The 'clientutil' jar, which has been somewhat broken on the 3.x branch, is not longer provided.
The features provided by that jar are provided by any good java driver and we advise relying on drivers rather on
that jar, but if you need that jar for backward compatiblity until you do so, you should use the version provided
on previous Cassandra branch, like the 3.0 branch (by design, the functionality provided by that jar are stable
accross versions so using the 3.0 jar for a client connecting to 3.x should work without issues).
3.8
===

115
build.xml
View File

@ -639,17 +639,6 @@
<dependency groupId="com.googlecode.concurrent-trees" artifactId="concurrent-trees" version="2.4.0" />
</artifact:pom>
<artifact:pom id="clientutil-pom"
artifactId="cassandra-clientutil"
url="http://cassandra.apache.org"
name="Apache Cassandra">
<parent groupId="org.apache.cassandra"
artifactId="cassandra-parent"
version="${version}"/>
<scm connection="${scm.connection}" developerConnection="${scm.developerConnection}" url="${scm.url}"/>
<dependency groupId="com.google.guava" artifactId="guava"/>
</artifact:pom>
<artifact:pom id="dist-pom"
artifactId="apache-cassandra"
packaging="pom"
@ -890,8 +879,6 @@
<artifact:writepom pomRefId="thrift-pom"
file="${build.dir}/${ant.project.name}-thrift-${version}.pom"/>
<artifact:writepom pomRefId="all-pom" file="${build.dir}/${final.name}.pom"/>
<artifact:writepom pomRefId="clientutil-pom"
file="${build.dir}/${ant.project.name}-clientutil-${version}.pom"/>
</target>
<target name="write-poms" unless="without.maven">
@ -943,31 +930,11 @@
<attribute name="Premain-Class"
value="org.apache.cassandra.infrastructure.continuations.CAgent"/>
<attribute name="Class-Path"
value="${ant.project.name}-clientutil-${version}.jar ${ant.project.name}-thrift-${version}.jar" />
value="${ant.project.name}-thrift-${version}.jar" />
<!-- </section> -->
</manifest>
</jar>
<!-- Clientutil Jar -->
<!-- TODO: write maven pom here -->
<jar jarfile="${build.dir}/${ant.project.name}-clientutil-${version}.jar">
<fileset dir="${build.classes.main}">
<include name="org/apache/cassandra/serializers/*" />
<include name="org/apache/cassandra/utils/ByteBufferUtil*.class" />
<include name="org/apache/cassandra/utils/Hex.class" />
<include name="org/apache/cassandra/utils/UUIDGen*.class" />
<include name="org/apache/cassandra/utils/FBUtilities*.class" />
<include name="org/apache/cassandra/exceptions/*.class" />
<include name="org/apache/cassandra/utils/CloseableIterator.class" />
<include name="org/apache/cassandra/io/util/*.class" />
</fileset>
<manifest>
<attribute name="Implementation-Title" value="Cassandra"/>
<attribute name="Implementation-Version" value="${version}"/>
<attribute name="Implementation-Vendor" value="Apache"/>
</manifest>
</jar>
<!-- Stress jar -->
<manifest file="${stress.manifest}">
<attribute name="Built-By" value="Pavel Yaskevich"/>
@ -1008,18 +975,6 @@
<jar jarfile="${build.dir}/${final.name}-javadoc.jar"
basedir="${javadoc.jars.dir}/main"/>
<create-javadoc destdir="${javadoc.jars.dir}/clientutil">
<filesets>
<fileset dir="${build.src.java}" defaultexcludes="yes">
<include name="org/apache/cassandra/serializers/*" />
<include name="org/apache/cassandra/utils/ByteBufferUtil*.java" />
<include name="org/apache/cassandra/utils/Hex.java" />
<include name="org/apache/cassandra/utils/UUIDGen*.java" />
</fileset>
</filesets>
</create-javadoc>
<jar jarfile="${build.dir}/${ant.project.name}-clientutil-${version}-javadoc.jar"
basedir="${javadoc.jars.dir}/clientutil"/>
<!-- javadoc task always rebuilds so might as well remove the generated docs to prevent
being pulled into the distribution by accident -->
<delete quiet="true" dir="${javadoc.jars.dir}"/>
@ -1042,14 +997,6 @@
<include name="org/apache/**/*.java"/>
</fileset>
</jar>
<jar jarfile="${build.dir}/${ant.project.name}-clientutil-${version}-sources.jar">
<fileset dir="${build.src.java}" defaultexcludes="yes">
<include name="org/apache/cassandra/serializers/*" />
<include name="org/apache/cassandra/utils/ByteBufferUtil*.java" />
<include name="org/apache/cassandra/utils/Hex.java" />
<include name="org/apache/cassandra/utils/UUIDGen*.java" />
</fileset>
</jar>
</target>
<!-- creates release tarballs -->
@ -1065,7 +1012,6 @@
<fileset dir="${build.dir}">
<include name="${final.name}.jar" />
<include name="${ant.project.name}-thrift-${version}.jar" />
<include name="${ant.project.name}-clientutil-${version}.jar" />
</fileset>
</copy>
<copy todir="${dist.dir}/javadoc">
@ -1310,44 +1256,6 @@
</sequential>
</macrodef>
<!--
This test target is a bit different. It's purpose is to exercise the
clientutil jar in order to expose any new dependencies. For that
reason we use the classes from the jar, and a carefully constructed
classpath which only contains what we expect users to need.
-->
<target name="test-clientutil-jar" depends="build-test,jar" description="Test clientutil jar">
<junit fork="on" forkmode="perTest" failureproperty="testfailed" maxmemory="1024m" timeout="${test.timeout}">
<test name="org.apache.cassandra.serializers.ClientUtilsTest" />
<formatter type="brief" usefile="false" />
<classpath>
<pathelement location="${test.classes}" />
<pathelement location="${build.dir}/${ant.project.name}-clientutil-${version}.jar" />
<pathelement location="${build.dir}/${ant.project.name}-thrift-${version}.jar" />
<pathelement location="${build.lib}/libthrift-0.9.0.jar" />
<pathelement location="${build.lib}/slf4j-api-1.7.7.jar" />
<pathelement location="${build.lib}/log4j-over-slf4j.jar" />
<pathelement location="${build.lib}/logback-core-1.1.3.jar" />
<pathelement location="${build.lib}/logback-classic-1.1.3.jar" />
<pathelement location="${build.lib}/jackson-core-asl-1.9.2.jar" />
<pathelement location="${build.lib}/jackson-mapper-asl-1.9.2.jar" />
<fileset dir="${build.dir.lib}">
<include name="**/junit*.jar" />
</fileset>
</classpath>
</junit>
<fail message="Clientutil test(s) failed.">
<condition>
<and>
<isset property="testfailed"/>
<not>
<isset property="ant.test.failure.ignore"/>
</not>
</and>
</condition>
</fail>
</target>
<target name="testold" depends="build-test" description="Execute unit tests">
<testmacro inputdir="${test.unit.src}" timeout="${test.timeout}">
<jvmarg value="-Dlegacy-sstable-root=${test.data}/legacy-sstables"/>
@ -1584,7 +1492,7 @@
</target>
<target name="test-all"
depends="eclipse-warnings,test,long-test,test-compression,test-clientutil-jar,stress-test"
depends="eclipse-warnings,test,long-test,test-compression,stress-test"
description="Run all tests except for those under test-burn" />
<!-- Use JaCoCo ant extension without needing externally saved lib -->
@ -1983,16 +1891,6 @@
file="${build.dir}/${ant.project.name}-thrift-${version}-javadoc.jar"
classifier="javadoc"/>
<!-- the cassandra-clientutil jar -->
<install pomFile="${build.dir}/${ant.project.name}-clientutil-${version}.pom"
file="${build.dir}/${ant.project.name}-clientutil-${version}.jar"/>
<install pomFile="${build.dir}/${ant.project.name}-clientutil-${version}.pom"
file="${build.dir}/${ant.project.name}-clientutil-${version}-sources.jar"
classifier="sources"/>
<install pomFile="${build.dir}/${ant.project.name}-clientutil-${version}.pom"
file="${build.dir}/${ant.project.name}-clientutil-${version}-javadoc.jar"
classifier="javadoc"/>
<!-- the cassandra-all jar -->
<install pomFile="${build.dir}/${final.name}.pom"
file="${build.dir}/${final.name}.jar"/>
@ -2037,15 +1935,6 @@
file="${build.dir}/${ant.project.name}-thrift-${version}-javadoc.jar"
classifier="javadoc"/>
<!-- the cassandra-clientutil jar -->
<deploy pomFile="${build.dir}/${ant.project.name}-clientutil-${version}.pom"
file="${build.dir}/${ant.project.name}-clientutil-${version}.jar"/>
<deploy pomFile="${build.dir}/${ant.project.name}-clientutil-${version}.pom"
file="${build.dir}/${ant.project.name}-clientutil-${version}-sources.jar"
classifier="sources"/>
<deploy pomFile="${build.dir}/${ant.project.name}-clientutil-${version}.pom"
file="${build.dir}/${ant.project.name}-clientutil-${version}-javadoc.jar"
classifier="javadoc"/>
<!-- the cassandra-all jar -->
<deploy pomFile="${build.dir}/${final.name}.pom"
file="${build.dir}/${final.name}.jar"/>

View File

@ -1,59 +0,0 @@
package org.apache.cassandra.serializers;
/*
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*
*/
import java.math.BigDecimal;
import java.math.BigInteger;
import java.nio.ByteBuffer;
import java.sql.Date;
import java.util.UUID;
import org.apache.cassandra.utils.UUIDGen;
import org.junit.Test;
public class ClientUtilsTest
{
/** Exercises the classes in the clientutil jar to expose missing dependencies. */
@Test
public void test()
{
AsciiSerializer.instance.deserialize(AsciiSerializer.instance.serialize("string"));
BooleanSerializer.instance.deserialize(BooleanSerializer.instance.serialize(true));
BytesSerializer.instance.deserialize(BytesSerializer.instance.serialize(ByteBuffer.wrap("string".getBytes())));
Date date = new Date(System.currentTimeMillis());
ByteBuffer dateBB = TimestampSerializer.instance.serialize(date);
TimestampSerializer.instance.deserialize(dateBB);
DecimalSerializer.instance.deserialize(DecimalSerializer.instance.serialize(new BigDecimal(1)));
DoubleSerializer.instance.deserialize(DoubleSerializer.instance.serialize(new Double(1.0d)));
FloatSerializer.instance.deserialize(FloatSerializer.instance.serialize(new Float(1.0f)));
Int32Serializer.instance.deserialize(Int32Serializer.instance.serialize(1));
IntegerSerializer.instance.deserialize(IntegerSerializer.instance.serialize(new BigInteger("1")));
LongSerializer.instance.deserialize(LongSerializer.instance.serialize(1L));
UTF8Serializer.instance.deserialize(UTF8Serializer.instance.serialize("string"));
// UUIDGen
UUID uuid = UUIDGen.getTimeUUID();
UUIDSerializer.instance.deserialize(UUIDSerializer.instance.serialize(uuid));
}
}