accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject [11/18] accumulo git commit: ACCUMULO-4077 back out a couple of 0.9.1 hacks, run the new compiler
Date Wed, 16 Dec 2015 21:11:16 GMT
http://git-wip-us.apache.org/repos/asf/accumulo/blob/3af75fc6/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/TabletStats.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/TabletStats.java
b/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/TabletStats.java
index 310d3b6..ee819ad 100644
--- a/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/TabletStats.java
+++ b/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/TabletStats.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 /**
- * Autogenerated by Thrift Compiler (0.9.1)
+ * Autogenerated by Thrift Compiler (0.9.3)
  *
  * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
  *  @generated
@@ -45,10 +45,13 @@ import java.util.Collections;
 import java.util.BitSet;
 import java.nio.ByteBuffer;
 import java.util.Arrays;
+import javax.annotation.Generated;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-@SuppressWarnings({"unchecked", "serial", "rawtypes", "unused"}) public class TabletStats
implements org.apache.thrift.TBase<TabletStats, TabletStats._Fields>, java.io.Serializable,
Cloneable, Comparable<TabletStats> {
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2015-12-16")
+public class TabletStats implements org.apache.thrift.TBase<TabletStats, TabletStats._Fields>,
java.io.Serializable, Cloneable, Comparable<TabletStats> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TabletStats");
 
   private static final org.apache.thrift.protocol.TField EXTENT_FIELD_DESC = new org.apache.thrift.protocol.TField("extent",
org.apache.thrift.protocol.TType.STRUCT, (short)1);
@@ -526,16 +529,16 @@ import org.slf4j.LoggerFactory;
       return getSplits();
 
     case NUM_ENTRIES:
-      return Long.valueOf(getNumEntries());
+      return getNumEntries();
 
     case INGEST_RATE:
-      return Double.valueOf(getIngestRate());
+      return getIngestRate();
 
     case QUERY_RATE:
-      return Double.valueOf(getQueryRate());
+      return getQueryRate();
 
     case SPLIT_CREATION_TIME:
-      return Long.valueOf(getSplitCreationTime());
+      return getSplitCreationTime();
 
     }
     throw new IllegalStateException();
@@ -658,7 +661,49 @@ import org.slf4j.LoggerFactory;
 
   @Override
   public int hashCode() {
-    return 0;
+    List<Object> list = new ArrayList<Object>();
+
+    boolean present_extent = true && (isSetExtent());
+    list.add(present_extent);
+    if (present_extent)
+      list.add(extent);
+
+    boolean present_majors = true && (isSetMajors());
+    list.add(present_majors);
+    if (present_majors)
+      list.add(majors);
+
+    boolean present_minors = true && (isSetMinors());
+    list.add(present_minors);
+    if (present_minors)
+      list.add(minors);
+
+    boolean present_splits = true && (isSetSplits());
+    list.add(present_splits);
+    if (present_splits)
+      list.add(splits);
+
+    boolean present_numEntries = true;
+    list.add(present_numEntries);
+    if (present_numEntries)
+      list.add(numEntries);
+
+    boolean present_ingestRate = true;
+    list.add(present_ingestRate);
+    if (present_ingestRate)
+      list.add(ingestRate);
+
+    boolean present_queryRate = true;
+    list.add(present_queryRate);
+    if (present_queryRate)
+      list.add(queryRate);
+
+    boolean present_splitCreationTime = true;
+    list.add(present_splitCreationTime);
+    if (present_splitCreationTime)
+      list.add(splitCreationTime);
+
+    return list.hashCode();
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/accumulo/blob/3af75fc6/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/TooManyFilesException.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/TooManyFilesException.java
b/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/TooManyFilesException.java
index 203597a..30399cb 100644
--- a/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/TooManyFilesException.java
+++ b/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/TooManyFilesException.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 /**
- * Autogenerated by Thrift Compiler (0.9.1)
+ * Autogenerated by Thrift Compiler (0.9.3)
  *
  * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
  *  @generated
@@ -45,10 +45,13 @@ import java.util.Collections;
 import java.util.BitSet;
 import java.nio.ByteBuffer;
 import java.util.Arrays;
+import javax.annotation.Generated;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-@SuppressWarnings({"unchecked", "serial", "rawtypes", "unused"}) public class TooManyFilesException
extends TException implements org.apache.thrift.TBase<TooManyFilesException, TooManyFilesException._Fields>,
java.io.Serializable, Cloneable, Comparable<TooManyFilesException> {
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2015-12-16")
+public class TooManyFilesException extends TException implements org.apache.thrift.TBase<TooManyFilesException,
TooManyFilesException._Fields>, java.io.Serializable, Cloneable, Comparable<TooManyFilesException>
{
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TooManyFilesException");
 
   private static final org.apache.thrift.protocol.TField EXTENT_FIELD_DESC = new org.apache.thrift.protocol.TField("extent",
org.apache.thrift.protocol.TType.STRUCT, (short)1);
@@ -243,7 +246,14 @@ import org.slf4j.LoggerFactory;
 
   @Override
   public int hashCode() {
-    return 0;
+    List<Object> list = new ArrayList<Object>();
+
+    boolean present_extent = true && (isSetExtent());
+    list.add(present_extent);
+    if (present_extent)
+      list.add(extent);
+
+    return list.hashCode();
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/accumulo/blob/3af75fc6/core/src/main/java/org/apache/accumulo/core/trace/thrift/TInfo.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/trace/thrift/TInfo.java b/core/src/main/java/org/apache/accumulo/core/trace/thrift/TInfo.java
index fa7933b..7a3c9e4 100644
--- a/core/src/main/java/org/apache/accumulo/core/trace/thrift/TInfo.java
+++ b/core/src/main/java/org/apache/accumulo/core/trace/thrift/TInfo.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 /**
- * Autogenerated by Thrift Compiler (0.9.1)
+ * Autogenerated by Thrift Compiler (0.9.3)
  *
  * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
  *  @generated
@@ -45,10 +45,13 @@ import java.util.Collections;
 import java.util.BitSet;
 import java.nio.ByteBuffer;
 import java.util.Arrays;
+import javax.annotation.Generated;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-@SuppressWarnings({"unchecked", "serial", "rawtypes", "unused"}) public class TInfo implements
org.apache.thrift.TBase<TInfo, TInfo._Fields>, java.io.Serializable, Cloneable, Comparable<TInfo>
{
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2015-12-16")
+public class TInfo implements org.apache.thrift.TBase<TInfo, TInfo._Fields>, java.io.Serializable,
Cloneable, Comparable<TInfo> {
   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);
@@ -244,10 +247,10 @@ import org.slf4j.LoggerFactory;
   public Object getFieldValue(_Fields field) {
     switch (field) {
     case TRACE_ID:
-      return Long.valueOf(getTraceId());
+      return getTraceId();
 
     case PARENT_ID:
-      return Long.valueOf(getParentId());
+      return getParentId();
 
     }
     throw new IllegalStateException();
@@ -304,7 +307,19 @@ import org.slf4j.LoggerFactory;
 
   @Override
   public int hashCode() {
-    return 0;
+    List<Object> list = new ArrayList<Object>();
+
+    boolean present_traceId = true;
+    list.add(present_traceId);
+    if (present_traceId)
+      list.add(traceId);
+
+    boolean present_parentId = true;
+    list.add(present_parentId);
+    if (present_parentId)
+      list.add(parentId);
+
+    return list.hashCode();
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/accumulo/blob/3af75fc6/core/src/main/scripts/generate-thrift.sh
----------------------------------------------------------------------
diff --git a/core/src/main/scripts/generate-thrift.sh b/core/src/main/scripts/generate-thrift.sh
index b9f9962..bc9b333 100755
--- a/core/src/main/scripts/generate-thrift.sh
+++ b/core/src/main/scripts/generate-thrift.sh
@@ -26,7 +26,7 @@
 #   INCLUDED_MODULES should be an array that includes other Maven modules with src/main/thrift
directories
 #   Use INCLUDED_MODULES=(-) in calling scripts that require no other modules
 # ========================================================================================================================
-[[ -z $REQUIRED_THRIFT_VERSION ]] && REQUIRED_THRIFT_VERSION='0.9.1'
+[[ -z $REQUIRED_THRIFT_VERSION ]] && REQUIRED_THRIFT_VERSION='0.9.3'
 [[ -z $INCLUDED_MODULES ]]        && INCLUDED_MODULES=(../server/tracer)
 [[ -z $BASE_OUTPUT_PACKAGE ]]     && BASE_OUTPUT_PACKAGE='org.apache.accumulo.core'
 [[ -z $PACKAGES_TO_GENERATE ]]    && PACKAGES_TO_GENERATE=(gc master tabletserver
security client.impl data replication trace)
@@ -74,7 +74,7 @@ done
 # For all generated thrift code, suppress all warnings and add the LICENSE header
 cs='@SuppressWarnings({"unchecked", "serial", "rawtypes", "unused"})'
 es='@SuppressWarnings({"unused"})'
-find $BUILD_DIR/gen-java -name '*.java' -print0 | xargs -0 sed -i.orig -e 's/\(public class
[A-Z]\)/'"$cs"' \1/'
+find $BUILD_DIR/gen-java -name '*.java' -print0 | xargs -0 sed -i.orig -e 's/"unchecked"/"unchecked",
"unused"/'
 find $BUILD_DIR/gen-java -name '*.java' -print0 | xargs -0 sed -i.orig -e 's/\(public enum
[A-Z]\)/'"$es"' \1/'
 
 for lang in "${LANGUAGES_TO_GENERATE[@]}"; do

http://git-wip-us.apache.org/repos/asf/accumulo/blob/3af75fc6/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index d16e90c..2c9f0d8 100644
--- a/pom.xml
+++ b/pom.xml
@@ -150,7 +150,7 @@
     <slf4j.version>1.7.5</slf4j.version>
     <sourceReleaseAssemblyDescriptor>source-release-tar</sourceReleaseAssemblyDescriptor>
     <!-- Thrift version -->
-    <thrift.version>0.9.1</thrift.version>
+    <thrift.version>0.9.3</thrift.version>
     <!-- ZooKeeper version -->
     <zookeeper.version>3.4.6</zookeeper.version>
   </properties>
@@ -363,6 +363,11 @@
       </dependency>
       <dependency>
         <groupId>org.apache.commons</groupId>
+        <artifactId>commons-lang3</artifactId>
+        <version>3.1</version>
+      </dependency>
+      <dependency>
+        <groupId>org.apache.commons</groupId>
         <artifactId>commons-math</artifactId>
         <version>2.1</version>
       </dependency>
@@ -937,12 +942,6 @@
                 <regexMessage>You should specify the Hadoop profile by major Hadoop
generation, i.e. 1 or 2, not by a version number.
   Use hadoop.version to use a particular Hadoop version within that generation. See README
for more details.</regexMessage>
               </requireProperty>
-              <requireProperty>
-                <property>thrift.version</property>
-                <regex>0[.]9[.]1</regex>
-                <regexMessage>Thrift version must be 0.9.1; Any alteration requires
a review of ACCUMULO-1691
-                  (See server/base/src/main/java/org/apache/accumulo/server/util/CustomNonBlockingServer.java)</regexMessage>
-              </requireProperty>
             </rules>
           </configuration>
         </plugin>


Mime
View raw message