accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ctubb...@apache.org
Subject [1/3] accumulo git commit: ACCUMULO-3433 Make thrift code gen reproducible
Date Fri, 09 Jan 2015 18:41:06 GMT
Repository: accumulo
Updated Branches:
  refs/heads/1.6 9ca1ff02e -> 81fce53ac
  refs/heads/master 392d9d6a4 -> a4165a56a


ACCUMULO-3433 Make thrift code gen reproducible

  Fixes an issue introduced with ACCUMULO-3132 that made the build
  non-reproducible when the thrift profile is enabled. That change introduced a
  manual edit to the generated TInfo class. This change fixes that by ensuring
  that edit is applied each time the class is generated.

  This applies only to the 1.6 branch.


Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/81fce53a
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/81fce53a
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/81fce53a

Branch: refs/heads/1.6
Commit: 81fce53aca1954e42f2b263b3cb7153d2e8ce778
Parents: 9ca1ff0
Author: Christopher Tubbs <ctubbsii@apache.org>
Authored: Fri Jan 9 13:32:46 2015 -0500
Committer: Christopher Tubbs <ctubbsii@apache.org>
Committed: Fri Jan 9 13:36:07 2015 -0500

----------------------------------------------------------------------
 .../org/apache/accumulo/trace/thrift/TInfo.java | 34 +++++++++++++-------
 trace/src/main/scripts/generate-thrift.sh       |  2 ++
 2 files changed, 25 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/81fce53a/trace/src/main/java/org/apache/accumulo/trace/thrift/TInfo.java
----------------------------------------------------------------------
diff --git a/trace/src/main/java/org/apache/accumulo/trace/thrift/TInfo.java b/trace/src/main/java/org/apache/accumulo/trace/thrift/TInfo.java
index 15b922f..8e71aea 100644
--- a/trace/src/main/java/org/apache/accumulo/trace/thrift/TInfo.java
+++ b/trace/src/main/java/org/apache/accumulo/trace/thrift/TInfo.java
@@ -22,24 +22,36 @@
  */
 package org.apache.accumulo.trace.thrift;
 
-import java.util.BitSet;
-import java.util.Collections;
-import java.util.EnumMap;
-import java.util.EnumSet;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.protocol.TTupleProtocol;
 import org.apache.thrift.scheme.IScheme;
 import org.apache.thrift.scheme.SchemeFactory;
 import org.apache.thrift.scheme.StandardScheme;
+
 import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import org.apache.thrift.async.AsyncMethodCallback;
+import org.apache.thrift.server.AbstractNonblockingServer.*;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 @SuppressWarnings("all") public class TInfo implements org.apache.thrift.TBase<TInfo,
TInfo._Fields>, java.io.Serializable, Cloneable, Comparable<TInfo> {
 
-  private static final long serialVersionUID = -4659975753252858243l;
-  
+  private static final long serialVersionUID = -4659975753252858243l; // See ACCUMULO-3132
+
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TInfo");
 
   private static final org.apache.thrift.protocol.TField TRACE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("traceId",
org.apache.thrift.protocol.TType.I64, (short)1);

http://git-wip-us.apache.org/repos/asf/accumulo/blob/81fce53a/trace/src/main/scripts/generate-thrift.sh
----------------------------------------------------------------------
diff --git a/trace/src/main/scripts/generate-thrift.sh b/trace/src/main/scripts/generate-thrift.sh
index b8a46b6..1916b20 100755
--- a/trace/src/main/scripts/generate-thrift.sh
+++ b/trace/src/main/scripts/generate-thrift.sh
@@ -22,3 +22,5 @@ PACKAGES_TO_GENERATE=(trace)
 
 . ../core/src/main/scripts/generate-thrift.sh
 
+# Ensure serialVersionUID stays the same for all 1.6.x versions (see ACCUMULO-3433, ACCUMULO-3132)
+sed -i -e 's/\(public class TInfo .*\)$/\1\n\n  private static final long serialVersionUID
= -4659975753252858243l; \/\/ See ACCUMULO-3132\n/' src/main/java/org/apache/accumulo/trace/thrift/TInfo.java


Mime
View raw message