incubator-accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vi...@apache.org
Subject svn commit: r1189806 [5/46] - in /incubator/accumulo: branches/1.3/contrib/ branches/1.3/src/core/src/main/java/org/apache/accumulo/core/client/ branches/1.3/src/core/src/main/java/org/apache/accumulo/core/client/admin/ branches/1.3/src/core/src/main/j...
Date Thu, 27 Oct 2011 15:25:17 GMT
Modified: incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/data/Key.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/data/Key.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/data/Key.java (original)
+++ incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/data/Key.java Thu Oct 27 15:24:51 2011
@@ -48,16 +48,19 @@ public class Key implements WritableComp
   
   @Override
   public boolean equals(Object o) {
-    if (o instanceof Key) return this.equals((Key) o, PartialKey.ROW_COLFAM_COLQUAL_COLVIS_TIME_DEL);
+    if (o instanceof Key)
+      return this.equals((Key) o, PartialKey.ROW_COLFAM_COLQUAL_COLVIS_TIME_DEL);
     return false;
   }
   
   private static final byte EMPTY_BYTES[] = new byte[0];
   
   private byte[] copyIfNeeded(byte ba[], int off, int len, boolean copyData) {
-    if (len == 0) return EMPTY_BYTES;
+    if (len == 0)
+      return EMPTY_BYTES;
     
-    if (!copyData && ba.length == len && off == 0) return ba;
+    if (!copyData && ba.length == len && off == 0)
+      return ba;
     
     byte[] copy = new byte[len];
     System.arraycopy(ba, off, copy, 0, len);
@@ -376,30 +379,40 @@ public class Key implements WritableComp
   public int compareTo(Key other, PartialKey part) {
     // check for matching row
     int result = WritableComparator.compareBytes(row, 0, row.length, other.row, 0, other.row.length);
-    if (result != 0 || part.equals(PartialKey.ROW)) return result;
+    if (result != 0 || part.equals(PartialKey.ROW))
+      return result;
     
     // check for matching column family
     result = WritableComparator.compareBytes(colFamily, 0, colFamily.length, other.colFamily, 0, other.colFamily.length);
-    if (result != 0 || part.equals(PartialKey.ROW_COLFAM)) return result;
+    if (result != 0 || part.equals(PartialKey.ROW_COLFAM))
+      return result;
     
     // check for matching column qualifier
     result = WritableComparator.compareBytes(colQualifier, 0, colQualifier.length, other.colQualifier, 0, other.colQualifier.length);
-    if (result != 0 || part.equals(PartialKey.ROW_COLFAM_COLQUAL)) return result;
+    if (result != 0 || part.equals(PartialKey.ROW_COLFAM_COLQUAL))
+      return result;
     
     // check for matching column visibility
     result = WritableComparator.compareBytes(colVisibility, 0, colVisibility.length, other.colVisibility, 0, other.colVisibility.length);
-    if (result != 0 || part.equals(PartialKey.ROW_COLFAM_COLQUAL_COLVIS)) return result;
+    if (result != 0 || part.equals(PartialKey.ROW_COLFAM_COLQUAL_COLVIS))
+      return result;
     
     // check for matching timestamp
-    if (timestamp < other.timestamp) result = 1;
-    else if (timestamp > other.timestamp) result = -1;
-    else result = 0;
+    if (timestamp < other.timestamp)
+      result = 1;
+    else if (timestamp > other.timestamp)
+      result = -1;
+    else
+      result = 0;
     
-    if (result != 0 || part.equals(PartialKey.ROW_COLFAM_COLQUAL_COLVIS_TIME)) return result;
+    if (result != 0 || part.equals(PartialKey.ROW_COLFAM_COLQUAL_COLVIS_TIME))
+      return result;
     
     // check for matching deleted flag
-    if (deleted) result = other.deleted ? 0 : -1;
-    else result = other.deleted ? 1 : 0;
+    if (deleted)
+      result = other.deleted ? 0 : -1;
+    else
+      result = other.deleted ? 1 : 0;
     
     return result;
   }
@@ -424,8 +437,10 @@ public class Key implements WritableComp
     
     for (int i = 0; i < plen; i++) {
       int c = 0xff & ba[offset + i];
-      if (c >= 32 && c <= 126) sb.append((char) c);
-      else sb.append("%" + String.format("%02x;", c));
+      if (c >= 32 && c <= 126)
+        sb.append((char) c);
+      else
+        sb.append("%" + String.format("%02x;", c));
     }
     
     if (len > maxLen) {
@@ -463,13 +478,16 @@ public class Key implements WritableComp
   }
   
   private static boolean isEqual(byte a1[], byte a2[]) {
-    if (a1 == a2) return true;
+    if (a1 == a2)
+      return true;
     
     int last = a1.length;
     
-    if (last != a2.length) return false;
+    if (last != a2.length)
+      return false;
     
-    if (last == 0) return true;
+    if (last == 0)
+      return true;
     
     // since sorted data is usually compared in accumulo,
     // the prefixes will normally be the same... so compare
@@ -485,7 +503,8 @@ public class Key implements WritableComp
     
     if (a1[last] == a2[last]) {
       for (int i = 0; i < last; i++)
-        if (a1[i] != a2[i]) return false;
+        if (a1[i] != a2[i])
+          return false;
     } else {
       return false;
     }
@@ -503,7 +522,8 @@ public class Key implements WritableComp
     
     List<TKeyValue> tkvl = Arrays.asList(new TKeyValue[param.size()]);
     
-    if (param.size() > 0) tkvl.set(0, new TKeyValue(param.get(0).key.toThrift(), param.get(0).value));
+    if (param.size() > 0)
+      tkvl.set(0, new TKeyValue(param.get(0).key.toThrift(), param.get(0).value));
     
     for (int i = param.size() - 1; i > 0; i--) {
       Key prevKey = param.get(i - 1).key;
@@ -518,21 +538,25 @@ public class Key implements WritableComp
       }
       
       if (isEqual(prevKey.colFamily, key.colFamily)) {
-        if (newKey == null) newKey = key.toThrift();
+        if (newKey == null)
+          newKey = key.toThrift();
         newKey.colFamily = null;
       }
       
       if (isEqual(prevKey.colQualifier, key.colQualifier)) {
-        if (newKey == null) newKey = key.toThrift();
+        if (newKey == null)
+          newKey = key.toThrift();
         newKey.colQualifier = null;
       }
       
       if (isEqual(prevKey.colVisibility, key.colVisibility)) {
-        if (newKey == null) newKey = key.toThrift();
+        if (newKey == null)
+          newKey = key.toThrift();
         newKey.colVisibility = null;
       }
       
-      if (newKey == null) newKey = key.toThrift();
+      if (newKey == null)
+        newKey = key.toThrift();
       
       tkvl.set(i, new TKeyValue(newKey, kv.value));
     }

Modified: incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/data/KeyExtent.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/data/KeyExtent.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/data/KeyExtent.java (original)
+++ incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/data/KeyExtent.java Thu Oct 27 15:24:51 2011
@@ -73,9 +73,11 @@ public class KeyExtent implements Writab
   
   private void check() {
     
-    if (getTableId() == null) throw new IllegalArgumentException("null table id not allowed");
+    if (getTableId() == null)
+      throw new IllegalArgumentException("null table id not allowed");
     
-    if (getEndRow() == null || getPrevEndRow() == null) return;
+    if (getEndRow() == null || getPrevEndRow() == null)
+      return;
     
     if (getPrevEndRow().compareTo(getEndRow()) >= 0) {
       throw new IllegalArgumentException("prevEndRow (" + getPrevEndRow() + ") >= endRow (" + getEndRow() + ")");
@@ -156,7 +158,8 @@ public class KeyExtent implements Writab
     decodeMetadataRow(flattenedExtent);
     
     this.setPrevEndRow(null, false, false);
-    if (prevEndRow != null) this.setPrevEndRow(prevEndRow, false, true);
+    if (prevEndRow != null)
+      this.setPrevEndRow(prevEndRow, false, true);
     
     check();
   }
@@ -167,7 +170,8 @@ public class KeyExtent implements Writab
    */
   public void setTableId(Text tId) {
     
-    if (tId == null) throw new IllegalArgumentException("null table name not allowed");
+    if (tId == null)
+      throw new IllegalArgumentException("null table name not allowed");
     
     this.textTableId = dedupeTableId(tId);
     
@@ -183,12 +187,17 @@ public class KeyExtent implements Writab
   }
   
   private void setEndRow(Text endRow, boolean check, boolean copy) {
-    if (endRow != null) if (copy) this.textEndRow = new Text(endRow);
-    else this.textEndRow = endRow;
-    else this.textEndRow = null;
+    if (endRow != null)
+      if (copy)
+        this.textEndRow = new Text(endRow);
+      else
+        this.textEndRow = endRow;
+    else
+      this.textEndRow = null;
     
     hashCode = 0;
-    if (check) check();
+    if (check)
+      check();
   }
   
   /**
@@ -216,12 +225,17 @@ public class KeyExtent implements Writab
   }
   
   private void setPrevEndRow(Text prevEndRow, boolean check, boolean copy) {
-    if (prevEndRow != null) if (copy) this.textPrevEndRow = new Text(prevEndRow);
-    else this.textPrevEndRow = prevEndRow;
-    else this.textPrevEndRow = null;
+    if (prevEndRow != null)
+      if (copy)
+        this.textPrevEndRow = new Text(prevEndRow);
+      else
+        this.textPrevEndRow = prevEndRow;
+    else
+      this.textPrevEndRow = null;
     
     hashCode = 0;
-    if (check) check();
+    if (check)
+      check();
   }
   
   /**
@@ -296,9 +310,12 @@ public class KeyExtent implements Writab
    */
   
   public static Collection<KeyExtent> getKeyExtentsForRange(Text startRow, Text endRow, Set<KeyExtent> kes) {
-    if (kes == null) return Collections.emptyList();
-    if (startRow == null) startRow = new Text();
-    if (endRow == null) endRow = new Text();
+    if (kes == null)
+      return Collections.emptyList();
+    if (startRow == null)
+      startRow = new Text();
+    if (endRow == null)
+      endRow = new Text();
     Collection<KeyExtent> keys = new ArrayList<KeyExtent>();
     for (KeyExtent ckes : kes) {
       if (ckes.getPrevEndRow() == null) {
@@ -368,7 +385,8 @@ public class KeyExtent implements Writab
   }
   
   public static Value encodePrevEndRow(Text per) {
-    if (per == null) return new Value(new byte[] {0});
+    if (per == null)
+      return new Value(new byte[] {0});
     byte[] b = new byte[per.getLength() + 1];
     b[0] = 1;
     System.arraycopy(per.getBytes(), 0, b, 1, per.getLength());
@@ -388,28 +406,35 @@ public class KeyExtent implements Writab
   public int compareTo(KeyExtent other) {
     
     int result = getTableId().compareTo(other.getTableId());
-    if (result != 0) return result;
+    if (result != 0)
+      return result;
     
     if (this.getEndRow() == null) {
-      if (other.getEndRow() != null) return 1;
+      if (other.getEndRow() != null)
+        return 1;
     } else {
-      if (other.getEndRow() == null) return -1;
+      if (other.getEndRow() == null)
+        return -1;
       
       result = getEndRow().compareTo(other.getEndRow());
-      if (result != 0) return result;
+      if (result != 0)
+        return result;
     }
     if (this.getPrevEndRow() == null) {
-      if (other.getPrevEndRow() == null) return 0;
+      if (other.getPrevEndRow() == null)
+        return 0;
       return -1;
     }
-    if (other.getPrevEndRow() == null) return 1;
+    if (other.getPrevEndRow() == null)
+      return 1;
     return this.getPrevEndRow().compareTo(other.getPrevEndRow());
   }
   
   private int hashCode = 0;
   
   public int hashCode() {
-    if (hashCode != 0) return hashCode;
+    if (hashCode != 0)
+      return hashCode;
     
     int prevEndRowHash = 0;
     int endRowHash = 0;
@@ -426,7 +451,8 @@ public class KeyExtent implements Writab
   }
   
   private boolean equals(Text t1, Text t2) {
-    if (t1 == null || t2 == null) return t1 == t2;
+    if (t1 == null || t2 == null)
+      return t1 == t2;
     
     return t1.equals(t2);
   }
@@ -441,11 +467,15 @@ public class KeyExtent implements Writab
     String prevEndRowString;
     String tableIdString = getTableId().toString().replaceAll(";", "\\\\;").replaceAll("\\\\", "\\\\\\\\");
     
-    if (getEndRow() == null) endRowString = "<";
-    else endRowString = ";" + TextUtil.truncate(getEndRow()).toString().replaceAll(";", "\\\\;").replaceAll("\\\\", "\\\\\\\\");
-    
-    if (getPrevEndRow() == null) prevEndRowString = "<";
-    else prevEndRowString = ";" + TextUtil.truncate(getPrevEndRow()).toString().replaceAll(";", "\\\\;").replaceAll("\\\\", "\\\\\\\\");
+    if (getEndRow() == null)
+      endRowString = "<";
+    else
+      endRowString = ";" + TextUtil.truncate(getEndRow()).toString().replaceAll(";", "\\\\;").replaceAll("\\\\", "\\\\\\\\");
+    
+    if (getPrevEndRow() == null)
+      prevEndRowString = "<";
+    else
+      prevEndRowString = ";" + TextUtil.truncate(getPrevEndRow()).toString().replaceAll(";", "\\\\;").replaceAll("\\\\", "\\\\\\\\");
     
     return tableIdString + endRowString + prevEndRowString;
   }
@@ -539,7 +569,8 @@ public class KeyExtent implements Writab
       
       @Override
       public byte[] getBytes() {
-        if (bsrow.isBackedByArray() && bsrow.offset() == 0) return bsrow.getBackingArray();
+        if (bsrow.isBackedByArray() && bsrow.offset() == 0)
+          return bsrow.getBackingArray();
         
         return bsrow.toArray();
       }
@@ -626,7 +657,8 @@ public class KeyExtent implements Writab
       return null;
     }
     
-    if (extent.getPrevEndRow().compareTo(first.getPrevEndRow()) >= 0) return first;
+    if (extent.getPrevEndRow().compareTo(first.getPrevEndRow()) >= 0)
+      return first;
     return null;
   }
   
@@ -649,7 +681,8 @@ public class KeyExtent implements Writab
   
   // Some duplication with TabletLocatorImpl
   public static Set<KeyExtent> findOverlapping(KeyExtent nke, SortedSet<KeyExtent> extents) {
-    if (nke == null || extents == null || extents.isEmpty()) return Collections.emptySet();
+    if (nke == null || extents == null || extents.isEmpty())
+      return Collections.emptySet();
     
     SortedSet<KeyExtent> start;
     
@@ -674,7 +707,8 @@ public class KeyExtent implements Writab
   
   // Specialization of findOverlapping(KeyExtent, SortedSet<KeyExtent> to work with SortedMap
   public static Set<KeyExtent> findOverlapping(KeyExtent nke, SortedMap<KeyExtent,? extends Object> extents) {
-    if (nke == null || extents == null || extents.isEmpty()) return Collections.emptySet();
+    if (nke == null || extents == null || extents.isEmpty())
+      return Collections.emptySet();
     
     SortedMap<KeyExtent,? extends Object> start;
     

Modified: incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/data/Mutation.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/data/Mutation.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/data/Mutation.java (original)
+++ incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/data/Mutation.java Thu Oct 27 15:24:51 2011
@@ -84,8 +84,10 @@ public class Mutation implements Writabl
     
     void add(boolean b) {
       reserve(1);
-      if (b) data[offset++] = 1;
-      else data[offset++] = 0;
+      if (b)
+        data[offset++] = 1;
+      else
+        data[offset++] = 0;
     }
     
     void add(long v) {
@@ -213,7 +215,8 @@ public class Mutation implements Writabl
   
   private void put(Text cf, Text cq, byte[] cv, boolean hasts, long ts, boolean deleted, byte[] val) {
     
-    if (buffer == null) throw new IllegalStateException("Can not add to mutation after serializing it");
+    if (buffer == null)
+      throw new IllegalStateException("Can not add to mutation after serializing it");
     
     put(cf);
     put(cq);
@@ -225,7 +228,8 @@ public class Mutation implements Writabl
     if (val.length < VALUE_SIZE_COPY_CUTOFF) {
       put(val);
     } else {
-      if (values == null) values = new ArrayList<byte[]>();
+      if (values == null)
+        values = new ArrayList<byte[]>();
       byte copy[] = new byte[val.length];
       System.arraycopy(val, 0, copy, 0, val.length);
       values.add(copy);
@@ -325,7 +329,8 @@ public class Mutation implements Writabl
   
   private byte[] readBytes(SimpleReader in) {
     int len = in.readInt();
-    if (len == 0) return EMPTY_BYTES;
+    if (len == 0)
+      return EMPTY_BYTES;
     
     byte bytes[] = new byte[len];
     in.readBytes(bytes);
@@ -380,7 +385,8 @@ public class Mutation implements Writabl
   private int cachedValLens = -1;
   
   long getValueLengths() {
-    if (values == null) return 0;
+    if (values == null)
+      return 0;
     
     if (cachedValLens == -1) {
       int tmpCVL = 0;
@@ -451,7 +457,8 @@ public class Mutation implements Writabl
     out.write(data);
     out.writeInt(entries);
     
-    if (values == null) out.writeBoolean(false);
+    if (values == null)
+      out.writeBoolean(false);
     else {
       out.writeBoolean(true);
       out.writeInt(values.size());
@@ -465,18 +472,21 @@ public class Mutation implements Writabl
   }
   
   public boolean equals(Object o) {
-    if (o instanceof Mutation) return equals((Mutation) o);
+    if (o instanceof Mutation)
+      return equals((Mutation) o);
     return false;
   }
   
   public boolean equals(Mutation m) {
     serialize();
     if (Arrays.equals(row, m.row) && entries == m.entries && Arrays.equals(data, m.data)) {
-      if (values == null && m.values == null) return true;
+      if (values == null && m.values == null)
+        return true;
       
       if (values != null && m.values != null && values.size() == m.values.size()) {
         for (int i = 0; i < values.size(); i++) {
-          if (!Arrays.equals(values.get(i), m.values.get(i))) return false;
+          if (!Arrays.equals(values.get(i), m.values.get(i)))
+            return false;
         }
         
         return true;

Modified: incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/data/PartialKey.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/data/PartialKey.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/data/PartialKey.java (original)
+++ incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/data/PartialKey.java Thu Oct 27 15:24:51 2011
@@ -31,7 +31,8 @@ public enum PartialKey {
   
   public static PartialKey getByDepth(int depth) {
     for (PartialKey d : PartialKey.values())
-      if (depth == d.depth) return d;
+      if (depth == d.depth)
+        return d;
     throw new IllegalArgumentException("Invalid legacy depth " + depth);
   }
   

Modified: incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/data/Range.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/data/Range.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/data/Range.java (original)
+++ incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/data/Range.java Thu Oct 27 15:24:51 2011
@@ -167,9 +167,11 @@ public class Range implements WritableCo
   }
   
   public Range(Key start, Key stop, boolean startKeyInclusive, boolean stopKeyInclusive, boolean infiniteStartKey, boolean infiniteStopKey) {
-    if (infiniteStartKey && start != null) throw new IllegalArgumentException();
+    if (infiniteStartKey && start != null)
+      throw new IllegalArgumentException();
     
-    if (infiniteStopKey && stop != null) throw new IllegalArgumentException();
+    if (infiniteStopKey && stop != null)
+      throw new IllegalArgumentException();
     
     this.start = start;
     this.stop = stop;
@@ -196,7 +198,8 @@ public class Range implements WritableCo
       return false;
     }
     
-    if (startKeyInclusive) return key.compareTo(start) < 0;
+    if (startKeyInclusive)
+      return key.compareTo(start) < 0;
     return key.compareTo(start) <= 0;
   }
   
@@ -208,9 +211,11 @@ public class Range implements WritableCo
   }
   
   public boolean afterEndKey(Key key) {
-    if (infiniteStopKey) return false;
+    if (infiniteStopKey)
+      return false;
     
-    if (stopKeyInclusive) return stop.compareTo(key) < 0;
+    if (stopKeyInclusive)
+      return stop.compareTo(key) < 0;
     return stop.compareTo(key) <= 0;
   }
   
@@ -222,7 +227,8 @@ public class Range implements WritableCo
   }
   
   public boolean equals(Object o) {
-    if (o instanceof Range) return equals((Range) o);
+    if (o instanceof Range)
+      return equals((Range) o);
     return false;
   }
   
@@ -234,24 +240,39 @@ public class Range implements WritableCo
   public int compareTo(Range o) {
     int comp;
     
-    if (infiniteStartKey) if (o.infiniteStartKey) comp = 0;
-    else comp = -1;
-    else if (o.infiniteStartKey) comp = 1;
+    if (infiniteStartKey)
+      if (o.infiniteStartKey)
+        comp = 0;
+      else
+        comp = -1;
+    else if (o.infiniteStartKey)
+      comp = 1;
     else {
       comp = start.compareTo(o.start);
-      if (comp == 0) if (startKeyInclusive && !o.startKeyInclusive) comp = -1;
-      else if (!startKeyInclusive && o.startKeyInclusive) comp = 1;
+      if (comp == 0)
+        if (startKeyInclusive && !o.startKeyInclusive)
+          comp = -1;
+        else if (!startKeyInclusive && o.startKeyInclusive)
+          comp = 1;
       
     }
     
-    if (comp == 0) if (infiniteStopKey) if (o.infiniteStopKey) comp = 0;
-    else comp = 1;
-    else if (o.infiniteStopKey) comp = -1;
-    else {
-      comp = stop.compareTo(o.stop);
-      if (comp == 0) if (stopKeyInclusive && !o.stopKeyInclusive) comp = 1;
-      else if (!stopKeyInclusive && o.stopKeyInclusive) comp = -1;
-    }
+    if (comp == 0)
+      if (infiniteStopKey)
+        if (o.infiniteStopKey)
+          comp = 0;
+        else
+          comp = 1;
+      else if (o.infiniteStopKey)
+        comp = -1;
+      else {
+        comp = stop.compareTo(o.stop);
+        if (comp == 0)
+          if (stopKeyInclusive && !o.stopKeyInclusive)
+            comp = 1;
+          else if (!stopKeyInclusive && o.stopKeyInclusive)
+            comp = -1;
+      }
     
     return comp;
   }
@@ -261,7 +282,8 @@ public class Range implements WritableCo
   }
   
   public static List<Range> mergeOverlapping(Collection<Range> ranges) {
-    if (ranges.size() == 0) return Collections.emptyList();
+    if (ranges.size() == 0)
+      return Collections.emptyList();
     
     List<Range> ral = new ArrayList<Range>(ranges);
     Collections.sort(ral);
@@ -334,7 +356,8 @@ public class Range implements WritableCo
       }
     } else if (afterEndKey(range.getStartKey())
         || (getEndKey() != null && range.getStartKey().equals(getEndKey()) && !(range.isStartKeyInclusive() && isEndKeyInclusive()))) {
-      if (returnNullIfDisjoint) return null;
+      if (returnNullIfDisjoint)
+        return null;
       throw new IllegalArgumentException("Range " + range + " does not overlap " + this);
     } else if (beforeStartKey(range.getStartKey())) {
       sk = getStartKey();
@@ -348,7 +371,8 @@ public class Range implements WritableCo
       }
     } else if (beforeStartKey(range.getEndKey())
         || (getStartKey() != null && range.getEndKey().equals(getStartKey()) && !(range.isEndKeyInclusive() && isStartKeyInclusive()))) {
-      if (returnNullIfDisjoint) return null;
+      if (returnNullIfDisjoint)
+        return null;
       throw new IllegalArgumentException("Range " + range + " does not overlap " + this);
     } else if (afterEndKey(range.getEndKey())) {
       ek = getEndKey();
@@ -375,8 +399,10 @@ public class Range implements WritableCo
       ByteSequence mincf = new ArrayByteSequence(min.columnFamily);
       ByteSequence mincq;
       
-      if (min.columnQualifier != null) mincq = new ArrayByteSequence(min.columnQualifier);
-      else mincq = new ArrayByteSequence(new byte[0]);
+      if (min.columnQualifier != null)
+        mincq = new ArrayByteSequence(min.columnQualifier);
+      else
+        mincq = new ArrayByteSequence(new byte[0]);
       
       int cmp = cf.compareTo(mincf);
       
@@ -397,7 +423,8 @@ public class Range implements WritableCo
       
       ByteSequence maxcf = new ArrayByteSequence(max.columnFamily);
       ByteSequence maxcq = null;
-      if (max.columnQualifier != null) maxcq = new ArrayByteSequence(max.columnQualifier);
+      if (max.columnQualifier != null)
+        maxcq = new ArrayByteSequence(max.columnQualifier);
       
       boolean set = false;
       
@@ -415,8 +442,10 @@ public class Range implements WritableCo
       
       if (set) {
         eki = false;
-        if (maxcq == null) ek = new Key(row.toArray(), maxcf.toArray(), new byte[0], new byte[0], 0, false).followingKey(PartialKey.ROW_COLFAM);
-        else ek = new Key(row.toArray(), maxcf.toArray(), maxcq.toArray(), new byte[0], 0, false).followingKey(PartialKey.ROW_COLFAM_COLQUAL);
+        if (maxcq == null)
+          ek = new Key(row.toArray(), maxcf.toArray(), new byte[0], new byte[0], 0, false).followingKey(PartialKey.ROW_COLFAM);
+        else
+          ek = new Key(row.toArray(), maxcf.toArray(), maxcq.toArray(), new byte[0], 0, false).followingKey(PartialKey.ROW_COLFAM_COLQUAL);
       }
     }
     
@@ -452,8 +481,10 @@ public class Range implements WritableCo
   public void write(DataOutput out) throws IOException {
     out.writeBoolean(infiniteStartKey);
     out.writeBoolean(infiniteStopKey);
-    if (!infiniteStartKey) start.write(out);
-    if (!infiniteStopKey) stop.write(out);
+    if (!infiniteStartKey)
+      start.write(out);
+    if (!infiniteStopKey)
+      stop.write(out);
     out.writeBoolean(startKeyInclusive);
     out.writeBoolean(stopKeyInclusive);
   }

Modified: incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/data/thrift/InitialMultiScan.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/data/thrift/InitialMultiScan.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/data/thrift/InitialMultiScan.java (original)
+++ incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/data/thrift/InitialMultiScan.java Thu Oct 27 15:24:51 2011
@@ -5,40 +5,37 @@
  */
 package org.apache.accumulo.core.data.thrift;
 
-
-
 import org.apache.thrift.*;
 import org.apache.thrift.meta_data.*;
 import org.apache.thrift.protocol.*;
 
 @SuppressWarnings("serial")
-public class InitialMultiScan implements TBase<InitialMultiScan, InitialMultiScan._Fields>, java.io.Serializable, Cloneable {
+public class InitialMultiScan implements TBase<InitialMultiScan,InitialMultiScan._Fields>, java.io.Serializable, Cloneable {
   private static final TStruct STRUCT_DESC = new TStruct("InitialMultiScan");
-
-  private static final TField SCAN_ID_FIELD_DESC = new TField("scanID", TType.I64, (short)1);
-  private static final TField RESULT_FIELD_DESC = new TField("result", TType.STRUCT, (short)2);
-
+  
+  private static final TField SCAN_ID_FIELD_DESC = new TField("scanID", TType.I64, (short) 1);
+  private static final TField RESULT_FIELD_DESC = new TField("result", TType.STRUCT, (short) 2);
+  
   public long scanID;
   public MultiScanResult result;
-
+  
   /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
   public enum _Fields implements TFieldIdEnum {
-    SCAN_ID((short)1, "scanID"),
-    RESULT((short)2, "result");
-
-    private static final java.util.Map<String, _Fields> byName = new java.util.HashMap<String, _Fields>();
-
+    SCAN_ID((short) 1, "scanID"), RESULT((short) 2, "result");
+    
+    private static final java.util.Map<String,_Fields> byName = new java.util.HashMap<String,_Fields>();
+    
     static {
       for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
         byName.put(field.getFieldName(), field);
       }
     }
-
+    
     /**
      * Find the _Fields constant that matches fieldId, or null if its not found.
      */
     public static _Fields findByThriftId(int fieldId) {
-      switch(fieldId) {
+      switch (fieldId) {
         case 1: // SCAN_ID
           return SCAN_ID;
         case 2: // RESULT
@@ -47,69 +44,63 @@ public class InitialMultiScan implements
           return null;
       }
     }
-
+    
     /**
-     * Find the _Fields constant that matches fieldId, throwing an exception
-     * if it is not found.
+     * Find the _Fields constant that matches fieldId, throwing an exception if it is not found.
      */
     public static _Fields findByThriftIdOrThrow(int fieldId) {
       _Fields fields = findByThriftId(fieldId);
-      if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+      if (fields == null)
+        throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
       return fields;
     }
-
+    
     /**
      * Find the _Fields constant that matches name, or null if its not found.
      */
     public static _Fields findByName(String name) {
       return byName.get(name);
     }
-
+    
     private final short _thriftId;
     private final String _fieldName;
-
+    
     _Fields(short thriftId, String fieldName) {
       _thriftId = thriftId;
       _fieldName = fieldName;
     }
-
+    
     public short getThriftFieldId() {
       return _thriftId;
     }
-
+    
     public String getFieldName() {
       return _fieldName;
     }
   }
-
+  
   // isset id assignments
   private static final int __SCANID_ISSET_ID = 0;
   private java.util.BitSet __isset_bit_vector = new java.util.BitSet(1);
-
-  public static final java.util.Map<_Fields, FieldMetaData> metaDataMap;
+  
+  public static final java.util.Map<_Fields,FieldMetaData> metaDataMap;
   static {
-    java.util.Map<_Fields, FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, FieldMetaData>(_Fields.class);
-    tmpMap.put(_Fields.SCAN_ID, new FieldMetaData("scanID", TFieldRequirementType.DEFAULT, 
-        new FieldValueMetaData(TType.I64        , "ScanID")));
-    tmpMap.put(_Fields.RESULT, new FieldMetaData("result", TFieldRequirementType.DEFAULT, 
-        new StructMetaData(TType.STRUCT, MultiScanResult.class)));
+    java.util.Map<_Fields,FieldMetaData> tmpMap = new java.util.EnumMap<_Fields,FieldMetaData>(_Fields.class);
+    tmpMap.put(_Fields.SCAN_ID, new FieldMetaData("scanID", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.I64, "ScanID")));
+    tmpMap.put(_Fields.RESULT, new FieldMetaData("result", TFieldRequirementType.DEFAULT, new StructMetaData(TType.STRUCT, MultiScanResult.class)));
     metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
     FieldMetaData.addStructMetaDataMap(InitialMultiScan.class, metaDataMap);
   }
-
-  public InitialMultiScan() {
-  }
-
-  public InitialMultiScan(
-    long scanID,
-    MultiScanResult result)
-  {
+  
+  public InitialMultiScan() {}
+  
+  public InitialMultiScan(long scanID, MultiScanResult result) {
     this();
     this.scanID = scanID;
     setScanIDIsSet(true);
     this.result = result;
   }
-
+  
   /**
    * Performs a deep copy on <i>other</i>.
    */
@@ -121,132 +112,132 @@ public class InitialMultiScan implements
       this.result = new MultiScanResult(other.result);
     }
   }
-
+  
   public InitialMultiScan deepCopy() {
     return new InitialMultiScan(this);
   }
-
+  
   @Deprecated
   public InitialMultiScan clone() {
     return new InitialMultiScan(this);
   }
-
+  
   public long getScanID() {
     return this.scanID;
   }
-
+  
   public InitialMultiScan setScanID(long scanID) {
     this.scanID = scanID;
     setScanIDIsSet(true);
     return this;
   }
-
+  
   public void unsetScanID() {
     __isset_bit_vector.clear(__SCANID_ISSET_ID);
   }
-
+  
   /** Returns true if field scanID is set (has been asigned a value) and false otherwise */
   public boolean isSetScanID() {
     return __isset_bit_vector.get(__SCANID_ISSET_ID);
   }
-
+  
   public void setScanIDIsSet(boolean value) {
     __isset_bit_vector.set(__SCANID_ISSET_ID, value);
   }
-
+  
   public MultiScanResult getResult() {
     return this.result;
   }
-
+  
   public InitialMultiScan setResult(MultiScanResult result) {
     this.result = result;
     return this;
   }
-
+  
   public void unsetResult() {
     this.result = null;
   }
-
+  
   /** Returns true if field result is set (has been asigned a value) and false otherwise */
   public boolean isSetResult() {
     return this.result != null;
   }
-
+  
   public void setResultIsSet(boolean value) {
     if (!value) {
       this.result = null;
     }
   }
-
+  
   public void setFieldValue(_Fields field, Object value) {
     switch (field) {
-    case SCAN_ID:
-      if (value == null) {
-        unsetScanID();
-      } else {
-        setScanID((Long)value);
-      }
-      break;
-
-    case RESULT:
-      if (value == null) {
-        unsetResult();
-      } else {
-        setResult((MultiScanResult)value);
-      }
-      break;
-
+      case SCAN_ID:
+        if (value == null) {
+          unsetScanID();
+        } else {
+          setScanID((Long) value);
+        }
+        break;
+      
+      case RESULT:
+        if (value == null) {
+          unsetResult();
+        } else {
+          setResult((MultiScanResult) value);
+        }
+        break;
+    
     }
   }
-
+  
   public void setFieldValue(int fieldID, Object value) {
     setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
   }
-
+  
   public Object getFieldValue(_Fields field) {
     switch (field) {
-    case SCAN_ID:
-      return new Long(getScanID());
-
-    case RESULT:
-      return getResult();
-
+      case SCAN_ID:
+        return new Long(getScanID());
+        
+      case RESULT:
+        return getResult();
+        
     }
     throw new IllegalStateException();
   }
-
+  
   public Object getFieldValue(int fieldId) {
     return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
   }
-
+  
   /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
   public boolean isSet(_Fields field) {
     switch (field) {
-    case SCAN_ID:
-      return isSetScanID();
-    case RESULT:
-      return isSetResult();
+      case SCAN_ID:
+        return isSetScanID();
+      case RESULT:
+        return isSetResult();
     }
     throw new IllegalStateException();
   }
-
+  
   public boolean isSet(int fieldID) {
     return isSet(_Fields.findByThriftIdOrThrow(fieldID));
   }
-
+  
   @Override
   public boolean equals(Object that) {
     if (that == null)
       return false;
     if (that instanceof InitialMultiScan)
-      return this.equals((InitialMultiScan)that);
+      return this.equals((InitialMultiScan) that);
     return false;
   }
-
+  
   public boolean equals(InitialMultiScan that) {
     if (that == null)
       return false;
-
+    
     boolean this_present_scanID = true;
     boolean that_present_scanID = true;
     if (this_present_scanID || that_present_scanID) {
@@ -255,7 +246,7 @@ public class InitialMultiScan implements
       if (this.scanID != that.scanID)
         return false;
     }
-
+    
     boolean this_present_result = true && this.isSetResult();
     boolean that_present_result = true && that.isSetResult();
     if (this_present_result || that_present_result) {
@@ -264,28 +255,29 @@ public class InitialMultiScan implements
       if (!this.result.equals(that.result))
         return false;
     }
-
+    
     return true;
   }
-
+  
   @Override
   public int hashCode() {
     return 0;
   }
-
+  
   public int compareTo(InitialMultiScan other) {
     if (!getClass().equals(other.getClass())) {
       return getClass().getName().compareTo(other.getClass().getName());
     }
-
+    
     int lastComparison = 0;
-    InitialMultiScan typedOther = (InitialMultiScan)other;
-
+    InitialMultiScan typedOther = (InitialMultiScan) other;
+    
     lastComparison = Boolean.valueOf(isSetScanID()).compareTo(typedOther.isSetScanID());
     if (lastComparison != 0) {
       return lastComparison;
     }
-    if (isSetScanID()) {      lastComparison = TBaseHelper.compareTo(this.scanID, typedOther.scanID);
+    if (isSetScanID()) {
+      lastComparison = TBaseHelper.compareTo(this.scanID, typedOther.scanID);
       if (lastComparison != 0) {
         return lastComparison;
       }
@@ -294,21 +286,21 @@ public class InitialMultiScan implements
     if (lastComparison != 0) {
       return lastComparison;
     }
-    if (isSetResult()) {      lastComparison = TBaseHelper.compareTo(this.result, typedOther.result);
+    if (isSetResult()) {
+      lastComparison = TBaseHelper.compareTo(this.result, typedOther.result);
       if (lastComparison != 0) {
         return lastComparison;
       }
     }
     return 0;
   }
-
+  
   public void read(TProtocol iprot) throws TException {
     TField field;
     iprot.readStructBegin();
-    while (true)
-    {
+    while (true) {
       field = iprot.readFieldBegin();
-      if (field.type == TType.STOP) { 
+      if (field.type == TType.STOP) {
         break;
       }
       switch (field.id) {
@@ -316,7 +308,7 @@ public class InitialMultiScan implements
           if (field.type == TType.I64) {
             this.scanID = iprot.readI64();
             setScanIDIsSet(true);
-          } else { 
+          } else {
             TProtocolUtil.skip(iprot, field.type);
           }
           break;
@@ -324,7 +316,7 @@ public class InitialMultiScan implements
           if (field.type == TType.STRUCT) {
             this.result = new MultiScanResult();
             this.result.read(iprot);
-          } else { 
+          } else {
             TProtocolUtil.skip(iprot, field.type);
           }
           break;
@@ -334,14 +326,14 @@ public class InitialMultiScan implements
       iprot.readFieldEnd();
     }
     iprot.readStructEnd();
-
+    
     // check for required fields of primitive type, which can't be checked in the validate method
     validate();
   }
-
+  
   public void write(TProtocol oprot) throws TException {
     validate();
-
+    
     oprot.writeStructBegin(STRUCT_DESC);
     oprot.writeFieldBegin(SCAN_ID_FIELD_DESC);
     oprot.writeI64(this.scanID);
@@ -354,7 +346,7 @@ public class InitialMultiScan implements
     oprot.writeFieldStop();
     oprot.writeStructEnd();
   }
-
+  
   @Override
   public String toString() {
     StringBuilder sb = new StringBuilder("InitialMultiScan(");
@@ -370,10 +362,9 @@ public class InitialMultiScan implements
     sb.append(")");
     return sb.toString();
   }
-
+  
   public void validate() throws TException {
     // check for required fields
   }
-
+  
 }
-

Modified: incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/data/thrift/InitialScan.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/data/thrift/InitialScan.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/data/thrift/InitialScan.java (original)
+++ incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/data/thrift/InitialScan.java Thu Oct 27 15:24:51 2011
@@ -5,40 +5,37 @@
  */
 package org.apache.accumulo.core.data.thrift;
 
-
-
 import org.apache.thrift.*;
 import org.apache.thrift.meta_data.*;
 import org.apache.thrift.protocol.*;
 
 @SuppressWarnings("serial")
-public class InitialScan implements TBase<InitialScan, InitialScan._Fields>, java.io.Serializable, Cloneable {
+public class InitialScan implements TBase<InitialScan,InitialScan._Fields>, java.io.Serializable, Cloneable {
   private static final TStruct STRUCT_DESC = new TStruct("InitialScan");
-
-  private static final TField SCAN_ID_FIELD_DESC = new TField("scanID", TType.I64, (short)1);
-  private static final TField RESULT_FIELD_DESC = new TField("result", TType.STRUCT, (short)2);
-
+  
+  private static final TField SCAN_ID_FIELD_DESC = new TField("scanID", TType.I64, (short) 1);
+  private static final TField RESULT_FIELD_DESC = new TField("result", TType.STRUCT, (short) 2);
+  
   public long scanID;
   public ScanResult result;
-
+  
   /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
   public enum _Fields implements TFieldIdEnum {
-    SCAN_ID((short)1, "scanID"),
-    RESULT((short)2, "result");
-
-    private static final java.util.Map<String, _Fields> byName = new java.util.HashMap<String, _Fields>();
-
+    SCAN_ID((short) 1, "scanID"), RESULT((short) 2, "result");
+    
+    private static final java.util.Map<String,_Fields> byName = new java.util.HashMap<String,_Fields>();
+    
     static {
       for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
         byName.put(field.getFieldName(), field);
       }
     }
-
+    
     /**
      * Find the _Fields constant that matches fieldId, or null if its not found.
      */
     public static _Fields findByThriftId(int fieldId) {
-      switch(fieldId) {
+      switch (fieldId) {
         case 1: // SCAN_ID
           return SCAN_ID;
         case 2: // RESULT
@@ -47,69 +44,63 @@ public class InitialScan implements TBas
           return null;
       }
     }
-
+    
     /**
-     * Find the _Fields constant that matches fieldId, throwing an exception
-     * if it is not found.
+     * Find the _Fields constant that matches fieldId, throwing an exception if it is not found.
      */
     public static _Fields findByThriftIdOrThrow(int fieldId) {
       _Fields fields = findByThriftId(fieldId);
-      if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+      if (fields == null)
+        throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
       return fields;
     }
-
+    
     /**
      * Find the _Fields constant that matches name, or null if its not found.
      */
     public static _Fields findByName(String name) {
       return byName.get(name);
     }
-
+    
     private final short _thriftId;
     private final String _fieldName;
-
+    
     _Fields(short thriftId, String fieldName) {
       _thriftId = thriftId;
       _fieldName = fieldName;
     }
-
+    
     public short getThriftFieldId() {
       return _thriftId;
     }
-
+    
     public String getFieldName() {
       return _fieldName;
     }
   }
-
+  
   // isset id assignments
   private static final int __SCANID_ISSET_ID = 0;
   private java.util.BitSet __isset_bit_vector = new java.util.BitSet(1);
-
-  public static final java.util.Map<_Fields, FieldMetaData> metaDataMap;
+  
+  public static final java.util.Map<_Fields,FieldMetaData> metaDataMap;
   static {
-    java.util.Map<_Fields, FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, FieldMetaData>(_Fields.class);
-    tmpMap.put(_Fields.SCAN_ID, new FieldMetaData("scanID", TFieldRequirementType.DEFAULT, 
-        new FieldValueMetaData(TType.I64        , "ScanID")));
-    tmpMap.put(_Fields.RESULT, new FieldMetaData("result", TFieldRequirementType.DEFAULT, 
-        new StructMetaData(TType.STRUCT, ScanResult.class)));
+    java.util.Map<_Fields,FieldMetaData> tmpMap = new java.util.EnumMap<_Fields,FieldMetaData>(_Fields.class);
+    tmpMap.put(_Fields.SCAN_ID, new FieldMetaData("scanID", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.I64, "ScanID")));
+    tmpMap.put(_Fields.RESULT, new FieldMetaData("result", TFieldRequirementType.DEFAULT, new StructMetaData(TType.STRUCT, ScanResult.class)));
     metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
     FieldMetaData.addStructMetaDataMap(InitialScan.class, metaDataMap);
   }
-
-  public InitialScan() {
-  }
-
-  public InitialScan(
-    long scanID,
-    ScanResult result)
-  {
+  
+  public InitialScan() {}
+  
+  public InitialScan(long scanID, ScanResult result) {
     this();
     this.scanID = scanID;
     setScanIDIsSet(true);
     this.result = result;
   }
-
+  
   /**
    * Performs a deep copy on <i>other</i>.
    */
@@ -121,132 +112,132 @@ public class InitialScan implements TBas
       this.result = new ScanResult(other.result);
     }
   }
-
+  
   public InitialScan deepCopy() {
     return new InitialScan(this);
   }
-
+  
   @Deprecated
   public InitialScan clone() {
     return new InitialScan(this);
   }
-
+  
   public long getScanID() {
     return this.scanID;
   }
-
+  
   public InitialScan setScanID(long scanID) {
     this.scanID = scanID;
     setScanIDIsSet(true);
     return this;
   }
-
+  
   public void unsetScanID() {
     __isset_bit_vector.clear(__SCANID_ISSET_ID);
   }
-
+  
   /** Returns true if field scanID is set (has been asigned a value) and false otherwise */
   public boolean isSetScanID() {
     return __isset_bit_vector.get(__SCANID_ISSET_ID);
   }
-
+  
   public void setScanIDIsSet(boolean value) {
     __isset_bit_vector.set(__SCANID_ISSET_ID, value);
   }
-
+  
   public ScanResult getResult() {
     return this.result;
   }
-
+  
   public InitialScan setResult(ScanResult result) {
     this.result = result;
     return this;
   }
-
+  
   public void unsetResult() {
     this.result = null;
   }
-
+  
   /** Returns true if field result is set (has been asigned a value) and false otherwise */
   public boolean isSetResult() {
     return this.result != null;
   }
-
+  
   public void setResultIsSet(boolean value) {
     if (!value) {
       this.result = null;
     }
   }
-
+  
   public void setFieldValue(_Fields field, Object value) {
     switch (field) {
-    case SCAN_ID:
-      if (value == null) {
-        unsetScanID();
-      } else {
-        setScanID((Long)value);
-      }
-      break;
-
-    case RESULT:
-      if (value == null) {
-        unsetResult();
-      } else {
-        setResult((ScanResult)value);
-      }
-      break;
-
+      case SCAN_ID:
+        if (value == null) {
+          unsetScanID();
+        } else {
+          setScanID((Long) value);
+        }
+        break;
+      
+      case RESULT:
+        if (value == null) {
+          unsetResult();
+        } else {
+          setResult((ScanResult) value);
+        }
+        break;
+    
     }
   }
-
+  
   public void setFieldValue(int fieldID, Object value) {
     setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
   }
-
+  
   public Object getFieldValue(_Fields field) {
     switch (field) {
-    case SCAN_ID:
-      return new Long(getScanID());
-
-    case RESULT:
-      return getResult();
-
+      case SCAN_ID:
+        return new Long(getScanID());
+        
+      case RESULT:
+        return getResult();
+        
     }
     throw new IllegalStateException();
   }
-
+  
   public Object getFieldValue(int fieldId) {
     return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
   }
-
+  
   /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
   public boolean isSet(_Fields field) {
     switch (field) {
-    case SCAN_ID:
-      return isSetScanID();
-    case RESULT:
-      return isSetResult();
+      case SCAN_ID:
+        return isSetScanID();
+      case RESULT:
+        return isSetResult();
     }
     throw new IllegalStateException();
   }
-
+  
   public boolean isSet(int fieldID) {
     return isSet(_Fields.findByThriftIdOrThrow(fieldID));
   }
-
+  
   @Override
   public boolean equals(Object that) {
     if (that == null)
       return false;
     if (that instanceof InitialScan)
-      return this.equals((InitialScan)that);
+      return this.equals((InitialScan) that);
     return false;
   }
-
+  
   public boolean equals(InitialScan that) {
     if (that == null)
       return false;
-
+    
     boolean this_present_scanID = true;
     boolean that_present_scanID = true;
     if (this_present_scanID || that_present_scanID) {
@@ -255,7 +246,7 @@ public class InitialScan implements TBas
       if (this.scanID != that.scanID)
         return false;
     }
-
+    
     boolean this_present_result = true && this.isSetResult();
     boolean that_present_result = true && that.isSetResult();
     if (this_present_result || that_present_result) {
@@ -264,28 +255,29 @@ public class InitialScan implements TBas
       if (!this.result.equals(that.result))
         return false;
     }
-
+    
     return true;
   }
-
+  
   @Override
   public int hashCode() {
     return 0;
   }
-
+  
   public int compareTo(InitialScan other) {
     if (!getClass().equals(other.getClass())) {
       return getClass().getName().compareTo(other.getClass().getName());
     }
-
+    
     int lastComparison = 0;
-    InitialScan typedOther = (InitialScan)other;
-
+    InitialScan typedOther = (InitialScan) other;
+    
     lastComparison = Boolean.valueOf(isSetScanID()).compareTo(typedOther.isSetScanID());
     if (lastComparison != 0) {
       return lastComparison;
     }
-    if (isSetScanID()) {      lastComparison = TBaseHelper.compareTo(this.scanID, typedOther.scanID);
+    if (isSetScanID()) {
+      lastComparison = TBaseHelper.compareTo(this.scanID, typedOther.scanID);
       if (lastComparison != 0) {
         return lastComparison;
       }
@@ -294,21 +286,21 @@ public class InitialScan implements TBas
     if (lastComparison != 0) {
       return lastComparison;
     }
-    if (isSetResult()) {      lastComparison = TBaseHelper.compareTo(this.result, typedOther.result);
+    if (isSetResult()) {
+      lastComparison = TBaseHelper.compareTo(this.result, typedOther.result);
       if (lastComparison != 0) {
         return lastComparison;
       }
     }
     return 0;
   }
-
+  
   public void read(TProtocol iprot) throws TException {
     TField field;
     iprot.readStructBegin();
-    while (true)
-    {
+    while (true) {
       field = iprot.readFieldBegin();
-      if (field.type == TType.STOP) { 
+      if (field.type == TType.STOP) {
         break;
       }
       switch (field.id) {
@@ -316,7 +308,7 @@ public class InitialScan implements TBas
           if (field.type == TType.I64) {
             this.scanID = iprot.readI64();
             setScanIDIsSet(true);
-          } else { 
+          } else {
             TProtocolUtil.skip(iprot, field.type);
           }
           break;
@@ -324,7 +316,7 @@ public class InitialScan implements TBas
           if (field.type == TType.STRUCT) {
             this.result = new ScanResult();
             this.result.read(iprot);
-          } else { 
+          } else {
             TProtocolUtil.skip(iprot, field.type);
           }
           break;
@@ -334,14 +326,14 @@ public class InitialScan implements TBas
       iprot.readFieldEnd();
     }
     iprot.readStructEnd();
-
+    
     // check for required fields of primitive type, which can't be checked in the validate method
     validate();
   }
-
+  
   public void write(TProtocol oprot) throws TException {
     validate();
-
+    
     oprot.writeStructBegin(STRUCT_DESC);
     oprot.writeFieldBegin(SCAN_ID_FIELD_DESC);
     oprot.writeI64(this.scanID);
@@ -354,7 +346,7 @@ public class InitialScan implements TBas
     oprot.writeFieldStop();
     oprot.writeStructEnd();
   }
-
+  
   @Override
   public String toString() {
     StringBuilder sb = new StringBuilder("InitialScan(");
@@ -370,10 +362,9 @@ public class InitialScan implements TBas
     sb.append(")");
     return sb.toString();
   }
-
+  
   public void validate() throws TException {
     // check for required fields
   }
-
+  
 }
-

Modified: incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/data/thrift/IterInfo.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/data/thrift/IterInfo.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/data/thrift/IterInfo.java (original)
+++ incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/data/thrift/IterInfo.java Thu Oct 27 15:24:51 2011
@@ -5,43 +5,39 @@
  */
 package org.apache.accumulo.core.data.thrift;
 
-
-
 import org.apache.thrift.*;
 import org.apache.thrift.meta_data.*;
 import org.apache.thrift.protocol.*;
 
 @SuppressWarnings("serial")
-public class IterInfo implements TBase<IterInfo, IterInfo._Fields>, java.io.Serializable, Cloneable {
+public class IterInfo implements TBase<IterInfo,IterInfo._Fields>, java.io.Serializable, Cloneable {
   private static final TStruct STRUCT_DESC = new TStruct("IterInfo");
-
-  private static final TField PRIORITY_FIELD_DESC = new TField("priority", TType.I32, (short)1);
-  private static final TField CLASS_NAME_FIELD_DESC = new TField("className", TType.STRING, (short)2);
-  private static final TField ITER_NAME_FIELD_DESC = new TField("iterName", TType.STRING, (short)3);
-
+  
+  private static final TField PRIORITY_FIELD_DESC = new TField("priority", TType.I32, (short) 1);
+  private static final TField CLASS_NAME_FIELD_DESC = new TField("className", TType.STRING, (short) 2);
+  private static final TField ITER_NAME_FIELD_DESC = new TField("iterName", TType.STRING, (short) 3);
+  
   public int priority;
   public String className;
   public String iterName;
-
+  
   /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
   public enum _Fields implements TFieldIdEnum {
-    PRIORITY((short)1, "priority"),
-    CLASS_NAME((short)2, "className"),
-    ITER_NAME((short)3, "iterName");
-
-    private static final java.util.Map<String, _Fields> byName = new java.util.HashMap<String, _Fields>();
-
+    PRIORITY((short) 1, "priority"), CLASS_NAME((short) 2, "className"), ITER_NAME((short) 3, "iterName");
+    
+    private static final java.util.Map<String,_Fields> byName = new java.util.HashMap<String,_Fields>();
+    
     static {
       for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
         byName.put(field.getFieldName(), field);
       }
     }
-
+    
     /**
      * Find the _Fields constant that matches fieldId, or null if its not found.
      */
     public static _Fields findByThriftId(int fieldId) {
-      switch(fieldId) {
+      switch (fieldId) {
         case 1: // PRIORITY
           return PRIORITY;
         case 2: // CLASS_NAME
@@ -52,73 +48,65 @@ public class IterInfo implements TBase<I
           return null;
       }
     }
-
+    
     /**
-     * Find the _Fields constant that matches fieldId, throwing an exception
-     * if it is not found.
+     * Find the _Fields constant that matches fieldId, throwing an exception if it is not found.
      */
     public static _Fields findByThriftIdOrThrow(int fieldId) {
       _Fields fields = findByThriftId(fieldId);
-      if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+      if (fields == null)
+        throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
       return fields;
     }
-
+    
     /**
      * Find the _Fields constant that matches name, or null if its not found.
      */
     public static _Fields findByName(String name) {
       return byName.get(name);
     }
-
+    
     private final short _thriftId;
     private final String _fieldName;
-
+    
     _Fields(short thriftId, String fieldName) {
       _thriftId = thriftId;
       _fieldName = fieldName;
     }
-
+    
     public short getThriftFieldId() {
       return _thriftId;
     }
-
+    
     public String getFieldName() {
       return _fieldName;
     }
   }
-
+  
   // isset id assignments
   private static final int __PRIORITY_ISSET_ID = 0;
   private java.util.BitSet __isset_bit_vector = new java.util.BitSet(1);
-
-  public static final java.util.Map<_Fields, FieldMetaData> metaDataMap;
+  
+  public static final java.util.Map<_Fields,FieldMetaData> metaDataMap;
   static {
-    java.util.Map<_Fields, FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, FieldMetaData>(_Fields.class);
-    tmpMap.put(_Fields.PRIORITY, new FieldMetaData("priority", TFieldRequirementType.DEFAULT, 
-        new FieldValueMetaData(TType.I32)));
-    tmpMap.put(_Fields.CLASS_NAME, new FieldMetaData("className", TFieldRequirementType.DEFAULT, 
-        new FieldValueMetaData(TType.STRING)));
-    tmpMap.put(_Fields.ITER_NAME, new FieldMetaData("iterName", TFieldRequirementType.DEFAULT, 
-        new FieldValueMetaData(TType.STRING)));
+    java.util.Map<_Fields,FieldMetaData> tmpMap = new java.util.EnumMap<_Fields,FieldMetaData>(_Fields.class);
+    tmpMap.put(_Fields.PRIORITY, new FieldMetaData("priority", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.I32)));
+    tmpMap.put(_Fields.CLASS_NAME, new FieldMetaData("className", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING)));
+    tmpMap.put(_Fields.ITER_NAME, new FieldMetaData("iterName", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING)));
     metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
     FieldMetaData.addStructMetaDataMap(IterInfo.class, metaDataMap);
   }
-
-  public IterInfo() {
-  }
-
-  public IterInfo(
-    int priority,
-    String className,
-    String iterName)
-  {
+  
+  public IterInfo() {}
+  
+  public IterInfo(int priority, String className, String iterName) {
     this();
     this.priority = priority;
     setPriorityIsSet(true);
     this.className = className;
     this.iterName = iterName;
   }
-
+  
   /**
    * Performs a deep copy on <i>other</i>.
    */
@@ -133,169 +121,169 @@ public class IterInfo implements TBase<I
       this.iterName = other.iterName;
     }
   }
-
+  
   public IterInfo deepCopy() {
     return new IterInfo(this);
   }
-
+  
   @Deprecated
   public IterInfo clone() {
     return new IterInfo(this);
   }
-
+  
   public int getPriority() {
     return this.priority;
   }
-
+  
   public IterInfo setPriority(int priority) {
     this.priority = priority;
     setPriorityIsSet(true);
     return this;
   }
-
+  
   public void unsetPriority() {
     __isset_bit_vector.clear(__PRIORITY_ISSET_ID);
   }
-
+  
   /** Returns true if field priority is set (has been asigned a value) and false otherwise */
   public boolean isSetPriority() {
     return __isset_bit_vector.get(__PRIORITY_ISSET_ID);
   }
-
+  
   public void setPriorityIsSet(boolean value) {
     __isset_bit_vector.set(__PRIORITY_ISSET_ID, value);
   }
-
+  
   public String getClassName() {
     return this.className;
   }
-
+  
   public IterInfo setClassName(String className) {
     this.className = className;
     return this;
   }
-
+  
   public void unsetClassName() {
     this.className = null;
   }
-
+  
   /** Returns true if field className is set (has been asigned a value) and false otherwise */
   public boolean isSetClassName() {
     return this.className != null;
   }
-
+  
   public void setClassNameIsSet(boolean value) {
     if (!value) {
       this.className = null;
     }
   }
-
+  
   public String getIterName() {
     return this.iterName;
   }
-
+  
   public IterInfo setIterName(String iterName) {
     this.iterName = iterName;
     return this;
   }
-
+  
   public void unsetIterName() {
     this.iterName = null;
   }
-
+  
   /** Returns true if field iterName is set (has been asigned a value) and false otherwise */
   public boolean isSetIterName() {
     return this.iterName != null;
   }
-
+  
   public void setIterNameIsSet(boolean value) {
     if (!value) {
       this.iterName = null;
     }
   }
-
+  
   public void setFieldValue(_Fields field, Object value) {
     switch (field) {
-    case PRIORITY:
-      if (value == null) {
-        unsetPriority();
-      } else {
-        setPriority((Integer)value);
-      }
-      break;
-
-    case CLASS_NAME:
-      if (value == null) {
-        unsetClassName();
-      } else {
-        setClassName((String)value);
-      }
-      break;
-
-    case ITER_NAME:
-      if (value == null) {
-        unsetIterName();
-      } else {
-        setIterName((String)value);
-      }
-      break;
-
+      case PRIORITY:
+        if (value == null) {
+          unsetPriority();
+        } else {
+          setPriority((Integer) value);
+        }
+        break;
+      
+      case CLASS_NAME:
+        if (value == null) {
+          unsetClassName();
+        } else {
+          setClassName((String) value);
+        }
+        break;
+      
+      case ITER_NAME:
+        if (value == null) {
+          unsetIterName();
+        } else {
+          setIterName((String) value);
+        }
+        break;
+    
     }
   }
-
+  
   public void setFieldValue(int fieldID, Object value) {
     setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
   }
-
+  
   public Object getFieldValue(_Fields field) {
     switch (field) {
-    case PRIORITY:
-      return new Integer(getPriority());
-
-    case CLASS_NAME:
-      return getClassName();
-
-    case ITER_NAME:
-      return getIterName();
-
+      case PRIORITY:
+        return new Integer(getPriority());
+        
+      case CLASS_NAME:
+        return getClassName();
+        
+      case ITER_NAME:
+        return getIterName();
+        
     }
     throw new IllegalStateException();
   }
-
+  
   public Object getFieldValue(int fieldId) {
     return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
   }
-
+  
   /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
   public boolean isSet(_Fields field) {
     switch (field) {
-    case PRIORITY:
-      return isSetPriority();
-    case CLASS_NAME:
-      return isSetClassName();
-    case ITER_NAME:
-      return isSetIterName();
+      case PRIORITY:
+        return isSetPriority();
+      case CLASS_NAME:
+        return isSetClassName();
+      case ITER_NAME:
+        return isSetIterName();
     }
     throw new IllegalStateException();
   }
-
+  
   public boolean isSet(int fieldID) {
     return isSet(_Fields.findByThriftIdOrThrow(fieldID));
   }
-
+  
   @Override
   public boolean equals(Object that) {
     if (that == null)
       return false;
     if (that instanceof IterInfo)
-      return this.equals((IterInfo)that);
+      return this.equals((IterInfo) that);
     return false;
   }
-
+  
   public boolean equals(IterInfo that) {
     if (that == null)
       return false;
-
+    
     boolean this_present_priority = true;
     boolean that_present_priority = true;
     if (this_present_priority || that_present_priority) {
@@ -304,7 +292,7 @@ public class IterInfo implements TBase<I
       if (this.priority != that.priority)
         return false;
     }
-
+    
     boolean this_present_className = true && this.isSetClassName();
     boolean that_present_className = true && that.isSetClassName();
     if (this_present_className || that_present_className) {
@@ -313,7 +301,7 @@ public class IterInfo implements TBase<I
       if (!this.className.equals(that.className))
         return false;
     }
-
+    
     boolean this_present_iterName = true && this.isSetIterName();
     boolean that_present_iterName = true && that.isSetIterName();
     if (this_present_iterName || that_present_iterName) {
@@ -322,28 +310,29 @@ public class IterInfo implements TBase<I
       if (!this.iterName.equals(that.iterName))
         return false;
     }
-
+    
     return true;
   }
-
+  
   @Override
   public int hashCode() {
     return 0;
   }
-
+  
   public int compareTo(IterInfo other) {
     if (!getClass().equals(other.getClass())) {
       return getClass().getName().compareTo(other.getClass().getName());
     }
-
+    
     int lastComparison = 0;
-    IterInfo typedOther = (IterInfo)other;
-
+    IterInfo typedOther = (IterInfo) other;
+    
     lastComparison = Boolean.valueOf(isSetPriority()).compareTo(typedOther.isSetPriority());
     if (lastComparison != 0) {
       return lastComparison;
     }
-    if (isSetPriority()) {      lastComparison = TBaseHelper.compareTo(this.priority, typedOther.priority);
+    if (isSetPriority()) {
+      lastComparison = TBaseHelper.compareTo(this.priority, typedOther.priority);
       if (lastComparison != 0) {
         return lastComparison;
       }
@@ -352,7 +341,8 @@ public class IterInfo implements TBase<I
     if (lastComparison != 0) {
       return lastComparison;
     }
-    if (isSetClassName()) {      lastComparison = TBaseHelper.compareTo(this.className, typedOther.className);
+    if (isSetClassName()) {
+      lastComparison = TBaseHelper.compareTo(this.className, typedOther.className);
       if (lastComparison != 0) {
         return lastComparison;
       }
@@ -361,21 +351,21 @@ public class IterInfo implements TBase<I
     if (lastComparison != 0) {
       return lastComparison;
     }
-    if (isSetIterName()) {      lastComparison = TBaseHelper.compareTo(this.iterName, typedOther.iterName);
+    if (isSetIterName()) {
+      lastComparison = TBaseHelper.compareTo(this.iterName, typedOther.iterName);
       if (lastComparison != 0) {
         return lastComparison;
       }
     }
     return 0;
   }
-
+  
   public void read(TProtocol iprot) throws TException {
     TField field;
     iprot.readStructBegin();
-    while (true)
-    {
+    while (true) {
       field = iprot.readFieldBegin();
-      if (field.type == TType.STOP) { 
+      if (field.type == TType.STOP) {
         break;
       }
       switch (field.id) {
@@ -383,21 +373,21 @@ public class IterInfo implements TBase<I
           if (field.type == TType.I32) {
             this.priority = iprot.readI32();
             setPriorityIsSet(true);
-          } else { 
+          } else {
             TProtocolUtil.skip(iprot, field.type);
           }
           break;
         case 2: // CLASS_NAME
           if (field.type == TType.STRING) {
             this.className = iprot.readString();
-          } else { 
+          } else {
             TProtocolUtil.skip(iprot, field.type);
           }
           break;
         case 3: // ITER_NAME
           if (field.type == TType.STRING) {
             this.iterName = iprot.readString();
-          } else { 
+          } else {
             TProtocolUtil.skip(iprot, field.type);
           }
           break;
@@ -407,14 +397,14 @@ public class IterInfo implements TBase<I
       iprot.readFieldEnd();
     }
     iprot.readStructEnd();
-
+    
     // check for required fields of primitive type, which can't be checked in the validate method
     validate();
   }
-
+  
   public void write(TProtocol oprot) throws TException {
     validate();
-
+    
     oprot.writeStructBegin(STRUCT_DESC);
     oprot.writeFieldBegin(PRIORITY_FIELD_DESC);
     oprot.writeI32(this.priority);
@@ -432,7 +422,7 @@ public class IterInfo implements TBase<I
     oprot.writeFieldStop();
     oprot.writeStructEnd();
   }
-
+  
   @Override
   public String toString() {
     StringBuilder sb = new StringBuilder("IterInfo(");
@@ -455,10 +445,9 @@ public class IterInfo implements TBase<I
     sb.append(")");
     return sb.toString();
   }
-
+  
   public void validate() throws TException {
     // check for required fields
   }
-
+  
 }
-

Modified: incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/data/thrift/MapFileInfo.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/data/thrift/MapFileInfo.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/data/thrift/MapFileInfo.java (original)
+++ incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/data/thrift/MapFileInfo.java Thu Oct 27 15:24:51 2011
@@ -5,102 +5,96 @@
  */
 package org.apache.accumulo.core.data.thrift;
 
-
-
 import org.apache.thrift.*;
 import org.apache.thrift.meta_data.*;
 import org.apache.thrift.protocol.*;
 
 @SuppressWarnings("serial")
-public class MapFileInfo implements TBase<MapFileInfo, MapFileInfo._Fields>, java.io.Serializable, Cloneable {
+public class MapFileInfo implements TBase<MapFileInfo,MapFileInfo._Fields>, java.io.Serializable, Cloneable {
   private static final TStruct STRUCT_DESC = new TStruct("MapFileInfo");
-
-  private static final TField ESTIMATED_SIZE_FIELD_DESC = new TField("estimatedSize", TType.I64, (short)1);
-
+  
+  private static final TField ESTIMATED_SIZE_FIELD_DESC = new TField("estimatedSize", TType.I64, (short) 1);
+  
   public long estimatedSize;
-
+  
   /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
   public enum _Fields implements TFieldIdEnum {
-    ESTIMATED_SIZE((short)1, "estimatedSize");
-
-    private static final java.util.Map<String, _Fields> byName = new java.util.HashMap<String, _Fields>();
-
+    ESTIMATED_SIZE((short) 1, "estimatedSize");
+    
+    private static final java.util.Map<String,_Fields> byName = new java.util.HashMap<String,_Fields>();
+    
     static {
       for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
         byName.put(field.getFieldName(), field);
       }
     }
-
+    
     /**
      * Find the _Fields constant that matches fieldId, or null if its not found.
      */
     public static _Fields findByThriftId(int fieldId) {
-      switch(fieldId) {
+      switch (fieldId) {
         case 1: // ESTIMATED_SIZE
           return ESTIMATED_SIZE;
         default:
           return null;
       }
     }
-
+    
     /**
-     * Find the _Fields constant that matches fieldId, throwing an exception
-     * if it is not found.
+     * Find the _Fields constant that matches fieldId, throwing an exception if it is not found.
      */
     public static _Fields findByThriftIdOrThrow(int fieldId) {
       _Fields fields = findByThriftId(fieldId);
-      if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+      if (fields == null)
+        throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
       return fields;
     }
-
+    
     /**
      * Find the _Fields constant that matches name, or null if its not found.
      */
     public static _Fields findByName(String name) {
       return byName.get(name);
     }
-
+    
     private final short _thriftId;
     private final String _fieldName;
-
+    
     _Fields(short thriftId, String fieldName) {
       _thriftId = thriftId;
       _fieldName = fieldName;
     }
-
+    
     public short getThriftFieldId() {
       return _thriftId;
     }
-
+    
     public String getFieldName() {
       return _fieldName;
     }
   }
-
+  
   // isset id assignments
   private static final int __ESTIMATEDSIZE_ISSET_ID = 0;
   private java.util.BitSet __isset_bit_vector = new java.util.BitSet(1);
-
-  public static final java.util.Map<_Fields, FieldMetaData> metaDataMap;
+  
+  public static final java.util.Map<_Fields,FieldMetaData> metaDataMap;
   static {
-    java.util.Map<_Fields, FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, FieldMetaData>(_Fields.class);
-    tmpMap.put(_Fields.ESTIMATED_SIZE, new FieldMetaData("estimatedSize", TFieldRequirementType.DEFAULT, 
-        new FieldValueMetaData(TType.I64)));
+    java.util.Map<_Fields,FieldMetaData> tmpMap = new java.util.EnumMap<_Fields,FieldMetaData>(_Fields.class);
+    tmpMap.put(_Fields.ESTIMATED_SIZE, new FieldMetaData("estimatedSize", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.I64)));
     metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
     FieldMetaData.addStructMetaDataMap(MapFileInfo.class, metaDataMap);
   }
-
-  public MapFileInfo() {
-  }
-
-  public MapFileInfo(
-    long estimatedSize)
-  {
+  
+  public MapFileInfo() {}
+  
+  public MapFileInfo(long estimatedSize) {
     this();
     this.estimatedSize = estimatedSize;
     setEstimatedSizeIsSet(true);
   }
-
+  
   /**
    * Performs a deep copy on <i>other</i>.
    */
@@ -109,95 +103,95 @@ public class MapFileInfo implements TBas
     __isset_bit_vector.or(other.__isset_bit_vector);
     this.estimatedSize = other.estimatedSize;
   }
-
+  
   public MapFileInfo deepCopy() {
     return new MapFileInfo(this);
   }
-
+  
   @Deprecated
   public MapFileInfo clone() {
     return new MapFileInfo(this);
   }
-
+  
   public long getEstimatedSize() {
     return this.estimatedSize;
   }
-
+  
   public MapFileInfo setEstimatedSize(long estimatedSize) {
     this.estimatedSize = estimatedSize;
     setEstimatedSizeIsSet(true);
     return this;
   }
-
+  
   public void unsetEstimatedSize() {
     __isset_bit_vector.clear(__ESTIMATEDSIZE_ISSET_ID);
   }
-
+  
   /** Returns true if field estimatedSize is set (has been asigned a value) and false otherwise */
   public boolean isSetEstimatedSize() {
     return __isset_bit_vector.get(__ESTIMATEDSIZE_ISSET_ID);
   }
-
+  
   public void setEstimatedSizeIsSet(boolean value) {
     __isset_bit_vector.set(__ESTIMATEDSIZE_ISSET_ID, value);
   }
-
+  
   public void setFieldValue(_Fields field, Object value) {
     switch (field) {
-    case ESTIMATED_SIZE:
-      if (value == null) {
-        unsetEstimatedSize();
-      } else {
-        setEstimatedSize((Long)value);
-      }
-      break;
-
+      case ESTIMATED_SIZE:
+        if (value == null) {
+          unsetEstimatedSize();
+        } else {
+          setEstimatedSize((Long) value);
+        }
+        break;
+    
     }
   }
-
+  
   public void setFieldValue(int fieldID, Object value) {
     setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
   }
-
+  
   public Object getFieldValue(_Fields field) {
     switch (field) {
-    case ESTIMATED_SIZE:
-      return new Long(getEstimatedSize());
-
+      case ESTIMATED_SIZE:
+        return new Long(getEstimatedSize());
+        
     }
     throw new IllegalStateException();
   }
-
+  
   public Object getFieldValue(int fieldId) {
     return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
   }
-
+  
   /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
   public boolean isSet(_Fields field) {
     switch (field) {
-    case ESTIMATED_SIZE:
-      return isSetEstimatedSize();
+      case ESTIMATED_SIZE:
+        return isSetEstimatedSize();
     }
     throw new IllegalStateException();
   }
-
+  
   public boolean isSet(int fieldID) {
     return isSet(_Fields.findByThriftIdOrThrow(fieldID));
   }
-
+  
   @Override
   public boolean equals(Object that) {
     if (that == null)
       return false;
     if (that instanceof MapFileInfo)
-      return this.equals((MapFileInfo)that);
+      return this.equals((MapFileInfo) that);
     return false;
   }
-
+  
   public boolean equals(MapFileInfo that) {
     if (that == null)
       return false;
-
+    
     boolean this_present_estimatedSize = true;
     boolean that_present_estimatedSize = true;
     if (this_present_estimatedSize || that_present_estimatedSize) {
@@ -206,42 +200,42 @@ public class MapFileInfo implements TBas
       if (this.estimatedSize != that.estimatedSize)
         return false;
     }
-
+    
     return true;
   }
-
+  
   @Override
   public int hashCode() {
     return 0;
   }
-
+  
   public int compareTo(MapFileInfo other) {
     if (!getClass().equals(other.getClass())) {
       return getClass().getName().compareTo(other.getClass().getName());
     }
-
+    
     int lastComparison = 0;
-    MapFileInfo typedOther = (MapFileInfo)other;
-
+    MapFileInfo typedOther = (MapFileInfo) other;
+    
     lastComparison = Boolean.valueOf(isSetEstimatedSize()).compareTo(typedOther.isSetEstimatedSize());
     if (lastComparison != 0) {
       return lastComparison;
     }
-    if (isSetEstimatedSize()) {      lastComparison = TBaseHelper.compareTo(this.estimatedSize, typedOther.estimatedSize);
+    if (isSetEstimatedSize()) {
+      lastComparison = TBaseHelper.compareTo(this.estimatedSize, typedOther.estimatedSize);
       if (lastComparison != 0) {
         return lastComparison;
       }
     }
     return 0;
   }
-
+  
   public void read(TProtocol iprot) throws TException {
     TField field;
     iprot.readStructBegin();
-    while (true)
-    {
+    while (true) {
       field = iprot.readFieldBegin();
-      if (field.type == TType.STOP) { 
+      if (field.type == TType.STOP) {
         break;
       }
       switch (field.id) {
@@ -249,7 +243,7 @@ public class MapFileInfo implements TBas
           if (field.type == TType.I64) {
             this.estimatedSize = iprot.readI64();
             setEstimatedSizeIsSet(true);
-          } else { 
+          } else {
             TProtocolUtil.skip(iprot, field.type);
           }
           break;
@@ -259,14 +253,14 @@ public class MapFileInfo implements TBas
       iprot.readFieldEnd();
     }
     iprot.readStructEnd();
-
+    
     // check for required fields of primitive type, which can't be checked in the validate method
     validate();
   }
-
+  
   public void write(TProtocol oprot) throws TException {
     validate();
-
+    
     oprot.writeStructBegin(STRUCT_DESC);
     oprot.writeFieldBegin(ESTIMATED_SIZE_FIELD_DESC);
     oprot.writeI64(this.estimatedSize);
@@ -274,7 +268,7 @@ public class MapFileInfo implements TBas
     oprot.writeFieldStop();
     oprot.writeStructEnd();
   }
-
+  
   @Override
   public String toString() {
     StringBuilder sb = new StringBuilder("MapFileInfo(");
@@ -283,10 +277,9 @@ public class MapFileInfo implements TBas
     sb.append(")");
     return sb.toString();
   }
-
+  
   public void validate() throws TException {
     // check for required fields
   }
-
+  
 }
-



Mime
View raw message