Repository: cassandra Updated Branches: refs/heads/cassandra-2.2 1644599d6 -> 882cf2584
Fix clientutil-jar and tests patch by tjake; reviewed by Jason Brown for (CASSANDRA-9760) Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/08f4f5a6 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/08f4f5a6 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/08f4f5a6 Branch: refs/heads/cassandra-2.2 Commit: 08f4f5a67439c50a3313b51e63c38b7469c33a0b Parents: fe7a7a7 Author: T Jake Luciani <[email protected]> Authored: Wed Jul 8 14:07:36 2015 -0400 Committer: T Jake Luciani <[email protected]> Committed: Wed Jul 8 14:28:19 2015 -0400 ---------------------------------------------------------------------- CHANGES.txt | 1 + build.xml | 13 +++++- .../org/apache/cassandra/utils/FBUtilities.java | 44 +------------------- 3 files changed, 14 insertions(+), 44 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cassandra/blob/08f4f5a6/CHANGES.txt ---------------------------------------------------------------------- diff --git a/CHANGES.txt b/CHANGES.txt index bdc5dc2..568571d 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 2.1.9 + * Fix clientutil jar and tests (CASSANDRA-9760) * (cqlsh) Allow the SSL protocol version to be specified through the config file or environment variables (CASSANDRA-9544) Merged from 2.0: http://git-wip-us.apache.org/repos/asf/cassandra/blob/08f4f5a6/build.xml ---------------------------------------------------------------------- diff --git a/build.xml b/build.xml index cf9788a..435d4a0 100644 --- a/build.xml +++ b/build.xml @@ -832,6 +832,7 @@ <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/DataOutputPlus.class" /> </fileset> <manifest> <attribute name="Implementation-Title" value="Cassandra"/> @@ -1161,7 +1162,7 @@ classpath which only contains what we expect users to need. --> <target name="test-clientutil-jar" depends="build-test,jar" description="Test clientutil jar"> - <junit> + <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> @@ -1179,6 +1180,16 @@ </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"> http://git-wip-us.apache.org/repos/asf/cassandra/blob/08f4f5a6/src/java/org/apache/cassandra/utils/FBUtilities.java ---------------------------------------------------------------------- diff --git a/src/java/org/apache/cassandra/utils/FBUtilities.java b/src/java/org/apache/cassandra/utils/FBUtilities.java index 68eb864..1b118ba 100644 --- a/src/java/org/apache/cassandra/utils/FBUtilities.java +++ b/src/java/org/apache/cassandra/utils/FBUtilities.java @@ -55,10 +55,7 @@ import org.apache.cassandra.io.IVersionedSerializer; import org.apache.cassandra.io.util.DataOutputBuffer; import org.apache.cassandra.io.util.IAllocator; import org.apache.cassandra.net.AsyncOneResponse; -import org.apache.thrift.TBase; -import org.apache.thrift.TDeserializer; -import org.apache.thrift.TException; -import org.apache.thrift.TSerializer; + import org.codehaus.jackson.JsonFactory; import org.codehaus.jackson.map.ObjectMapper; @@ -255,45 +252,6 @@ public class FBUtilities return new BigInteger(hash(data)).abs(); } - @Deprecated - public static void serialize(TSerializer serializer, TBase struct, DataOutput out) - throws IOException - { - assert serializer != null; - assert struct != null; - assert out != null; - byte[] bytes; - try - { - bytes = serializer.serialize(struct); - } - catch (TException e) - { - throw new RuntimeException(e); - } - out.writeInt(bytes.length); - out.write(bytes); - } - - @Deprecated - public static void deserialize(TDeserializer deserializer, TBase struct, DataInput in) - throws IOException - { - assert deserializer != null; - assert struct != null; - assert in != null; - byte[] bytes = new byte[in.readInt()]; - in.readFully(bytes); - try - { - deserializer.deserialize(struct, bytes); - } - catch (TException ex) - { - throw new IOException(ex); - } - } - public static void sortSampledKeys(List<DecoratedKey> keys, Range<Token> range) { if (range.left.compareTo(range.right) >= 0)
