You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by ja...@apache.org on 2015/07/08 21:16:23 UTC

[1/2] cassandra git commit: Fix clientutil-jar and tests

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 <ja...@apache.org>
Authored: Wed Jul 8 14:07:36 2015 -0400
Committer: T Jake Luciani <ja...@apache.org>
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)


[2/2] cassandra git commit: Merge branch 'cassandra-2.1' into cassandra-2.2

Posted by ja...@apache.org.
Merge branch 'cassandra-2.1' into cassandra-2.2

Conflicts:
	CHANGES.txt
	src/java/org/apache/cassandra/utils/FBUtilities.java


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/882cf258
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/882cf258
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/882cf258

Branch: refs/heads/cassandra-2.2
Commit: 882cf258412e54724dbcfd9c8c7ecc84d315693e
Parents: 1644599 08f4f5a
Author: T Jake Luciani <ja...@apache.org>
Authored: Wed Jul 8 15:15:37 2015 -0400
Committer: T Jake Luciani <ja...@apache.org>
Committed: Wed Jul 8 15:15:58 2015 -0400

----------------------------------------------------------------------
 CHANGES.txt                                     |  4 +-
 build.xml                                       | 13 ++++++-
 .../org/apache/cassandra/utils/FBUtilities.java | 41 +-------------------
 3 files changed, 16 insertions(+), 42 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/882cf258/CHANGES.txt
----------------------------------------------------------------------
diff --cc CHANGES.txt
index 2172672,568571d..cc7b109
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,8 -1,9 +1,10 @@@
 -2.1.9
 +2.2.0-rc3
- Merged from 2.0:
++Merged from 2.1:
+  * 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:
 - * Scrub (recover) sstables even when -Index.db is missing, (CASSANDRA-9591)
 + * Scrub (recover) sstables even when -Index.db is missing (CASSANDRA-9591)
   * Fix growing pending background compaction (CASSANDRA-9662)
  
  

http://git-wip-us.apache.org/repos/asf/cassandra/blob/882cf258/build.xml
----------------------------------------------------------------------
diff --cc build.xml
index 360accf,435d4a0..ebde62a
--- a/build.xml
+++ b/build.xml
@@@ -848,6 -832,7 +848,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" />
++          <include name="org/apache/cassandra/io/util/*.class" />
          </fileset>
          <manifest>
            <attribute name="Implementation-Title" value="Cassandra"/>

http://git-wip-us.apache.org/repos/asf/cassandra/blob/882cf258/src/java/org/apache/cassandra/utils/FBUtilities.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/utils/FBUtilities.java
index df65572,1b118ba..ce118b9
--- a/src/java/org/apache/cassandra/utils/FBUtilities.java
+++ b/src/java/org/apache/cassandra/utils/FBUtilities.java
@@@ -48,12 -52,10 +48,12 @@@ import org.apache.cassandra.dht.Range
  import org.apache.cassandra.dht.Token;
  import org.apache.cassandra.exceptions.ConfigurationException;
  import org.apache.cassandra.io.IVersionedSerializer;
 +import org.apache.cassandra.io.compress.CompressionParameters;
  import org.apache.cassandra.io.util.DataOutputBuffer;
 -import org.apache.cassandra.io.util.IAllocator;
 +import org.apache.cassandra.io.util.DataOutputBufferFixed;
 +import org.apache.cassandra.io.util.FileUtils;
  import org.apache.cassandra.net.AsyncOneResponse;
- import org.apache.thrift.*;
+ 
  import org.codehaus.jackson.JsonFactory;
  import org.codehaus.jackson.map.ObjectMapper;