hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject svn commit: r735945 - in /hadoop/hbase/trunk: ./ src/java/org/apache/hadoop/hbase/
Date Tue, 20 Jan 2009 06:18:20 GMT
Author: stack
Date: Mon Jan 19 22:18:19 2009
New Revision: 735945

URL: http://svn.apache.org/viewvc?rev=735945&view=rev
Log:
HBASE-876 There are a large number of Java warnings in HBase

Modified:
    hadoop/hbase/trunk/CHANGES.txt
    hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/ColumnNameParseException.java
    hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/DoNotRetryIOException.java
    hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/DroppedSnapshotException.java
    hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/HColumnDescriptor.java
    hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/HConstants.java
    hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/HRegionInfo.java
    hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/HRegionLocation.java
    hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/HServerAddress.java
    hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/HServerInfo.java
    hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/HServerLoad.java
    hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/HStoreKey.java
    hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/LeaseException.java
    hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/RegionHistorian.java
    hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/RemoteExceptionHandler.java
    hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/ValueOverMaxLengthException.java

Modified: hadoop/hbase/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/CHANGES.txt?rev=735945&r1=735944&r2=735945&view=diff
==============================================================================
--- hadoop/hbase/trunk/CHANGES.txt (original)
+++ hadoop/hbase/trunk/CHANGES.txt Mon Jan 19 22:18:19 2009
@@ -12,6 +12,8 @@
                (Samuel Guo via Stack)
    HBASE-1130  PrefixRowFilter (Michael Gottesman via Stack)
    HBASE-1139  Update Clover in build.xml
+   HBASE-876   There are a large number of Java warnings in HBase; part 1
+               (Evgeny Ryabitskiy via Stack)
 
 Release 0.19.0 - Unreleased
   INCOMPATIBLE CHANGES

Modified: hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/ColumnNameParseException.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/ColumnNameParseException.java?rev=735945&r1=735944&r2=735945&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/ColumnNameParseException.java (original)
+++ hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/ColumnNameParseException.java Mon
Jan 19 22:18:19 2009
@@ -22,8 +22,10 @@
 /**
  * Thrown if issue with passed column name.
  */
-@SuppressWarnings("serial")
 public class ColumnNameParseException extends DoNotRetryIOException {
+
+  private static final long serialVersionUID = -2897373353949942302L;
+
   /** default constructor */
   public ColumnNameParseException() {
     super();

Modified: hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/DoNotRetryIOException.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/DoNotRetryIOException.java?rev=735945&r1=735944&r2=735945&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/DoNotRetryIOException.java (original)
+++ hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/DoNotRetryIOException.java Mon Jan
19 22:18:19 2009
@@ -25,8 +25,10 @@
  * Subclass if exception is not meant to be retried: e.g.
  * {@link UnknownScannerException}
  */
-@SuppressWarnings("serial")
 public class DoNotRetryIOException extends IOException {
+
+  private static final long serialVersionUID = 1197446454511704139L;
+
   /**
    * default constructor
    */

Modified: hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/DroppedSnapshotException.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/DroppedSnapshotException.java?rev=735945&r1=735944&r2=735945&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/DroppedSnapshotException.java (original)
+++ hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/DroppedSnapshotException.java Mon
Jan 19 22:18:19 2009
@@ -21,8 +21,10 @@
  * Thrown during flush if the possibility snapshot content was not properly
  * persisted into store files.  Response should include replay of hlog content.
  */
-@SuppressWarnings("serial")
 public class DroppedSnapshotException extends IOException {
+
+  private static final long serialVersionUID = -5463156580831677374L;
+
   /**
    * @param msg
    */

Modified: hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/HColumnDescriptor.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/HColumnDescriptor.java?rev=735945&r1=735944&r2=735945&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/HColumnDescriptor.java (original)
+++ hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/HColumnDescriptor.java Mon Jan 19
22:18:19 2009
@@ -40,7 +40,7 @@
  * column and recreating it. If there is data stored in the column, it will be
  * deleted when the column is deleted.
  */
-public class HColumnDescriptor implements WritableComparable {
+public class HColumnDescriptor implements WritableComparable<HColumnDescriptor> {
   // For future backward compatibility
 
   // Version 3 was when column names become byte arrays and when we picked up
@@ -489,7 +489,7 @@
   
   @Override
   public boolean equals(Object obj) {
-    return compareTo(obj) == 0;
+    return compareTo((HColumnDescriptor)obj) == 0;
   }
   
   @Override
@@ -502,7 +502,6 @@
   
   // Writable
 
-  @SuppressWarnings("deprecation")
   public void readFields(DataInput in) throws IOException {
     int version = in.readByte();
     if (version < 6) {
@@ -566,12 +565,11 @@
 
   // Comparable
 
-  public int compareTo(Object o) {
-    HColumnDescriptor other = (HColumnDescriptor)o;
-    int result = Bytes.compareTo(this.name, other.getName());
+  public int compareTo(HColumnDescriptor o) {
+    int result = Bytes.compareTo(this.name, o.getName());
     if (result == 0) {
       // punt on comparison for ordering, just calculate difference
-      result = this.values.hashCode() - other.values.hashCode();
+      result = this.values.hashCode() - o.values.hashCode();
       if (result < 0)
         result = -1;
       else if (result > 0)

Modified: hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/HConstants.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/HConstants.java?rev=735945&r1=735944&r2=735945&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/HConstants.java (original)
+++ hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/HConstants.java Mon Jan 19 22:18:19
2009
@@ -245,16 +245,14 @@
   //      there.
   public static final String HBASE_CLIENT_RETRIES_NUMBER_KEY =
     "hbase.client.retries.number";
-  //TODO: DEFAULT_CLIENT_RETRIES is not referenced anywhere. Remove it.
-  public static final int DEFAULT_CLIENT_RETRIES = 5;
 
   //TODO: although the following are referenced widely to format strings for
   //      the shell. They really aren't a part of the public API. It would be
   //      nice if we could put them somewhere where they did not need to be
   //      public. They could have package visibility
-  public static final String NAME = "NAME";
-  public static final String VERSIONS = "VERSIONS";
-  public static final String IN_MEMORY = "IN_MEMORY";
+  static final String NAME = "NAME";
+  static final String VERSIONS = "VERSIONS";
+  static final String IN_MEMORY = "IN_MEMORY";
   
   /**
    * This is a retry backoff multiplier table similar to the BSD TCP syn

Modified: hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/HRegionInfo.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/HRegionInfo.java?rev=735945&r1=735944&r2=735945&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/HRegionInfo.java (original)
+++ hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/HRegionInfo.java Mon Jan 19 22:18:19
2009
@@ -34,7 +34,7 @@
  * Contains HRegion id, start and end keys, a reference to this
  * HRegions' table descriptor, etc.
  */
-public class HRegionInfo extends VersionedWritable implements WritableComparable {
+public class HRegionInfo extends VersionedWritable implements WritableComparable<HRegionInfo>{
   private final byte VERSION = 0;
 
   /**
@@ -325,7 +325,7 @@
     
   @Override
   public boolean equals(Object o) {
-    return this.compareTo(o) == 0;
+    return this.compareTo((HRegionInfo)o) == 0;
   }
   
   @Override
@@ -374,26 +374,25 @@
   // Comparable
   //
   
-  public int compareTo(Object o) {
-    HRegionInfo other = (HRegionInfo) o;
-    if (other == null) {
+  public int compareTo(HRegionInfo o) {
+    if (o == null) {
       return 1;
     }
     
     // Are regions of same table?
-    int result = this.tableDesc.compareTo(other.tableDesc);
+    int result = this.tableDesc.compareTo(o.tableDesc);
     if (result != 0) {
       return result;
     }
 
     // Compare start keys.
-    result = HStoreKey.compareTwoRowKeys(other, this.startKey, other.startKey);
+    result = HStoreKey.compareTwoRowKeys(o, this.startKey, o.startKey);
     if (result != 0) {
       return result;
     }
     
     // Compare end keys.
-    return HStoreKey.compareTwoRowKeys(other, this.endKey, other.endKey);
+    return HStoreKey.compareTwoRowKeys(o, this.endKey, o.endKey);
   }
 
   /**

Modified: hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/HRegionLocation.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/HRegionLocation.java?rev=735945&r1=735944&r2=735945&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/HRegionLocation.java (original)
+++ hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/HRegionLocation.java Mon Jan 19 22:18:19
2009
@@ -23,8 +23,7 @@
  * Contains the HRegionInfo for the region and the HServerAddress for the
  * HRegionServer serving the region
  */
-@SuppressWarnings("unchecked")
-public class HRegionLocation implements Comparable {
+public class HRegionLocation implements Comparable<HRegionLocation> {
   private HRegionInfo regionInfo;
   private HServerAddress serverAddress;
 
@@ -47,7 +46,7 @@
   
   @Override
   public boolean equals(Object o) {
-    return this.compareTo(o) == 0;
+    return this.compareTo((HRegionLocation)o) == 0;
   }
   
   @Override
@@ -71,11 +70,10 @@
   // Comparable
   //
   
-  public int compareTo(Object o) {
-    HRegionLocation other = (HRegionLocation) o;
-    int result = this.regionInfo.compareTo(other.regionInfo);
+  public int compareTo(HRegionLocation o) {
+    int result = this.regionInfo.compareTo(o.regionInfo);
     if(result == 0) {
-      result = this.serverAddress.compareTo(other.serverAddress);
+      result = this.serverAddress.compareTo(o.serverAddress);
     }
     return result;
   }

Modified: hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/HServerAddress.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/HServerAddress.java?rev=735945&r1=735944&r2=735945&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/HServerAddress.java (original)
+++ hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/HServerAddress.java Mon Jan 19 22:18:19
2009
@@ -30,8 +30,7 @@
  * HServerAddress is a "label" for a HBase server that combines the host
  * name and port number.
  */
-@SuppressWarnings("unchecked")
-public class HServerAddress implements WritableComparable {
+public class HServerAddress implements WritableComparable<HServerAddress> {
   private InetSocketAddress address;
   String stringValue;
 
@@ -117,7 +116,7 @@
 
   @Override
   public boolean equals(Object o) {
-    return this.compareTo(o) == 0;
+    return this.compareTo((HServerAddress)o) == 0;
   }
   
   @Override
@@ -160,12 +159,11 @@
   // Comparable
   //
   
-  public int compareTo(Object o) {
-    HServerAddress that = (HServerAddress)o;
+  public int compareTo(HServerAddress o) {
     // Addresses as Strings may not compare though address is for the one
     // server with only difference being that one address has hostname
     // resolved whereas other only has IP.
-    if (this.address.equals(that.address)) return 0;
-    return this.toString().compareTo(that.toString());
+    if (this.address.equals(o.address)) return 0;
+    return this.toString().compareTo(o.toString());
   }
 }
\ No newline at end of file

Modified: hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/HServerInfo.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/HServerInfo.java?rev=735945&r1=735944&r2=735945&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/HServerInfo.java (original)
+++ hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/HServerInfo.java Mon Jan 19 22:18:19
2009
@@ -33,7 +33,7 @@
  * In the future it will contain information about the source machine and
  * load statistics.
  */
-public class HServerInfo implements WritableComparable {
+public class HServerInfo implements WritableComparable<HServerInfo> {
   private HServerAddress serverAddress;
   private long startCode;
   private HServerLoad load;
@@ -123,7 +123,7 @@
 
   @Override
   public boolean equals(Object obj) {
-    return compareTo(obj) == 0;
+    return compareTo((HServerInfo)obj) == 0;
   }
 
   @Override
@@ -151,19 +151,18 @@
     out.writeInt(this.infoPort);
   }
 
-  public int compareTo(Object o) {
-    HServerInfo that = (HServerInfo)o;
-    int result = getServerAddress().compareTo(that.getServerAddress());
+  public int compareTo(HServerInfo o) {
+    int result = getServerAddress().compareTo(o.getServerAddress());
     if (result != 0) {
       return result;
     }
-    if (this.infoPort != that.infoPort) {
-      return this.infoPort - that.infoPort;
+    if (this.infoPort != o.infoPort) {
+      return this.infoPort - o.infoPort;
     }
-    if (getStartCode() == that.getStartCode()) {
+    if (getStartCode() == o.getStartCode()) {
       return 0;
     }
     // Startcodes are timestamps.
-    return (int)(getStartCode() - that.getStartCode());
+    return (int)(getStartCode() - o.getStartCode());
   }
 }

Modified: hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/HServerLoad.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/HServerLoad.java?rev=735945&r1=735944&r2=735945&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/HServerLoad.java (original)
+++ hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/HServerLoad.java Mon Jan 19 22:18:19
2009
@@ -31,8 +31,7 @@
 /**
  * This class encapsulates metrics for determining the load on a HRegionServer
  */
-@SuppressWarnings("unchecked")
-public class HServerLoad implements WritableComparable {
+public class HServerLoad implements WritableComparable<HServerLoad> {
   /** number of regions */
     // could just use regionLoad.size() but master.RegionManager likes to play
     // around with this value while passing HServerLoad objects around during
@@ -279,7 +278,7 @@
 
   @Override
   public boolean equals(Object o) {
-    return compareTo(o) == 0;
+    return compareTo((HServerLoad)o) == 0;
   }
   
   @Override
@@ -311,7 +310,7 @@
   public int getStorefiles() {
     int count = 0;
     for (RegionLoad info: regionLoad)
-      count += info.storefiles;
+    	count += info.getStorefiles();
     return count;
   }
 
@@ -321,7 +320,7 @@
   public int getMemcacheSizeInMB() {
     int count = 0;
     for (RegionLoad info: regionLoad)
-      count += info.memcacheSizeMB;
+    	count += info.getMemcacheSizeMB();
     return count;
   }
 
@@ -331,7 +330,7 @@
   public int getStorefileIndexSizeInMB() {
     int count = 0;
     for (RegionLoad info: regionLoad)
-      count += info.storefileIndexSizeMB;
+    	count += info.getStorefileIndexSizeMB();
     return count;
   }
 
@@ -414,8 +413,7 @@
 
   // Comparable
 
-  public int compareTo(Object o) {
-    HServerLoad other = (HServerLoad) o;
-    return this.getLoad() - other.getLoad();
+  public int compareTo(HServerLoad o) {
+    return this.getLoad() - o.getLoad();
   }
 }

Modified: hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/HStoreKey.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/HStoreKey.java?rev=735945&r1=735944&r2=735945&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/HStoreKey.java (original)
+++ hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/HStoreKey.java Mon Jan 19 22:18:19
2009
@@ -356,7 +356,7 @@
   // Comparable
 
   public int compareTo(final HStoreKey o) {
-    return compareTo(this.regionInfo, this, (HStoreKey)o);
+    return compareTo(this.regionInfo, this, o);
   }
   
   static int compareTo(final HRegionInfo hri, final HStoreKey left,
@@ -548,10 +548,8 @@
    */
   public static boolean equalsTwoRowKeys(HRegionInfo regionInfo, 
       byte[] rowA, byte[] rowB) {
-    return rowA == null && rowB == null? true:
-      rowA == null && rowB != null? false:
-        rowA != null && rowB == null? false:
-          rowA.length != rowB.length? false:
+    return ((rowA == null) && (rowB == null)) ? true:
+      (rowA == null) || (rowB == null) || (rowA.length != rowB.length) ? false:
         compareTwoRowKeys(regionInfo,rowA,rowB) == 0;
   }
   
@@ -609,6 +607,7 @@
       this.hri = hri;
     }
     
+    @SuppressWarnings("unchecked")
     @Override
     public int compare(final WritableComparable left,
         final WritableComparable right) {
@@ -644,7 +643,7 @@
     }
     
     @Override
-    public boolean equals(@SuppressWarnings("unused") Object obj) {
+    public boolean equals(Object obj) {
       return false;
     }
 

Modified: hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/LeaseException.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/LeaseException.java?rev=735945&r1=735944&r2=735945&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/LeaseException.java (original)
+++ hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/LeaseException.java Mon Jan 19 22:18:19
2009
@@ -22,8 +22,10 @@
 /**
  * Reports a problem with a lease
  */
-@SuppressWarnings("serial")
 public class LeaseException extends DoNotRetryIOException {
+
+  private static final long serialVersionUID = 8179703995292418650L;
+
   /** default constructor */
   public LeaseException() {
     super();

Modified: hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/RegionHistorian.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/RegionHistorian.java?rev=735945&r1=735944&r2=735945&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/RegionHistorian.java (original)
+++ hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/RegionHistorian.java Mon Jan 19 22:18:19
2009
@@ -47,18 +47,17 @@
   
   private HTable metaTable;
 
-  private GregorianCalendar cal = new GregorianCalendar();
+
 
   /** Singleton reference */
   private static RegionHistorian historian;
 
   /** Date formater for the timestamp in RegionHistoryInformation */
-  private static SimpleDateFormat dateFormat = new SimpleDateFormat(
+  static SimpleDateFormat dateFormat = new SimpleDateFormat(
   "EEE, d MMM yyyy HH:mm:ss");
 
-  //TODO: Why is this public? Appears to only apply internally.
   
-  public static enum HistorianColumnKey  {
+  private static enum HistorianColumnKey  {
     REGION_CREATION ( Bytes.toBytes(COLUMN_FAMILY_HISTORIAN_STR+"creation")),
     REGION_OPEN ( Bytes.toBytes(COLUMN_FAMILY_HISTORIAN_STR+"open")),
     REGION_SPLIT ( Bytes.toBytes(COLUMN_FAMILY_HISTORIAN_STR+"split")),
@@ -66,13 +65,13 @@
     REGION_FLUSH ( Bytes.toBytes(COLUMN_FAMILY_HISTORIAN_STR+"flush")),
     REGION_ASSIGNMENT ( Bytes.toBytes(COLUMN_FAMILY_HISTORIAN_STR+"assignment"));
 
-    public byte[] key;
+  byte[] key;
 
     HistorianColumnKey(byte[] key) {
       this.key = key;
     }
   } 
-
+  
   public static final String SPLIT_PREFIX = "Region split from: ";
 
   /**
@@ -199,8 +198,7 @@
    * @param info
    * @param timeTaken
    */
-  public void addRegionFlush(HRegionInfo info,
-    @SuppressWarnings("unused") String timeTaken) {
+  public void addRegionFlush(HRegionInfo info, String timeTaken) {
     // Disabled.  Noop.  If this regionserver is hosting the .META. AND is
     // holding the reclaimMemcacheMemory global lock --
     // see Flusher#flushSomeRegions --  we deadlock.  For now, just disable
@@ -249,6 +247,8 @@
    */
   public class RegionHistoryInformation implements
   Comparable<RegionHistoryInformation> {
+    
+    private GregorianCalendar cal = new GregorianCalendar();
 
     private long timestamp;
 

Modified: hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/RemoteExceptionHandler.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/RemoteExceptionHandler.java?rev=735945&r1=735944&r2=735945&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/RemoteExceptionHandler.java (original)
+++ hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/RemoteExceptionHandler.java Mon Jan
19 22:18:19 2009
@@ -80,16 +80,15 @@
    *         exception is not an IOException. The decoded exception is set as
    *         the cause.
    */
-  @SuppressWarnings("unchecked")
   public static IOException decodeRemoteException(final RemoteException re)
   throws IOException {
     IOException i = re;
 
     try {
-      Class c = Class.forName(re.getClassName());
+      Class<?> c = Class.forName(re.getClassName());
 
-      Class[] parameterTypes = { String.class };
-      Constructor ctor = c.getConstructor(parameterTypes);
+      Class<?>[] parameterTypes = { String.class };
+      Constructor<?> ctor = c.getConstructor(parameterTypes);
       
       Object[] arguments = { re.getMessage() };
       Throwable t = (Throwable) ctor.newInstance(arguments);

Modified: hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/ValueOverMaxLengthException.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/ValueOverMaxLengthException.java?rev=735945&r1=735944&r2=735945&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/ValueOverMaxLengthException.java (original)
+++ hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/ValueOverMaxLengthException.java Mon
Jan 19 22:18:19 2009
@@ -22,9 +22,10 @@
 /**
  * Thrown when a value is longer than the specified LENGTH
  */
-@SuppressWarnings("serial")
 public class ValueOverMaxLengthException extends DoNotRetryIOException {
   
+  private static final long serialVersionUID = -5525656352372008316L;
+
   /**
    * default constructor
    */



Mime
View raw message