hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cutt...@apache.org
Subject svn commit: r529756 [1/2] - in /lucene/hadoop/trunk/src: contrib/hbase/src/java/org/apache/hadoop/hbase/ contrib/hbase/src/test/org/apache/hadoop/hbase/ contrib/streaming/src/java/org/apache/hadoop/streaming/ java/org/apache/hadoop/dfs/ java/org/apache...
Date Tue, 17 Apr 2007 20:38:02 GMT
Author: cutting
Date: Tue Apr 17 13:37:59 2007
New Revision: 529756

URL: http://svn.apache.org/viewvc?view=rev&rev=529756
Log:
HADOOP-1148.  More re-indentation.

Modified:
    lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HAbstractScanner.java
    lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HClient.java
    lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HLog.java
    lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HMaster.java
    lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HMemcache.java
    lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HMsg.java
    lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HRegionInfo.java
    lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HRegionServer.java
    lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HStore.java
    lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HStoreFile.java
    lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HStoreKey.java
    lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/Leases.java
    lucene/hadoop/trunk/src/contrib/hbase/src/test/org/apache/hadoop/hbase/TestHRegion.java
    lucene/hadoop/trunk/src/contrib/streaming/src/java/org/apache/hadoop/streaming/PipeMapper.java
    lucene/hadoop/trunk/src/contrib/streaming/src/java/org/apache/hadoop/streaming/PipeReducer.java
    lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/DataStorage.java
    lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/DatanodeID.java
    lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/UnregisteredDatanodeException.java
    lucene/hadoop/trunk/src/java/org/apache/hadoop/fs/s3/Jets3tFileSystemStore.java
    lucene/hadoop/trunk/src/java/org/apache/hadoop/fs/s3/S3InputStream.java
    lucene/hadoop/trunk/src/java/org/apache/hadoop/fs/s3/S3OutputStream.java
    lucene/hadoop/trunk/src/java/org/apache/hadoop/io/ObjectWritable.java
    lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/ClusterStatus.java
    lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/DefaultJobHistoryParser.java
    lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/JobHistory.java
    lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/LineRecordReader.java
    lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/PhasedFileSystem.java
    lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/TaskCompletionEvent.java
    lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/TaskLogAppender.java
    lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/lib/MultithreadedMapRunner.java
    lucene/hadoop/trunk/src/java/org/apache/hadoop/record/compiler/CodeGenerator.java
    lucene/hadoop/trunk/src/java/org/apache/hadoop/util/DiskChecker.java
    lucene/hadoop/trunk/src/java/org/apache/hadoop/util/HostsFileReader.java
    lucene/hadoop/trunk/src/java/org/apache/hadoop/util/Progressable.java
    lucene/hadoop/trunk/src/test/org/apache/hadoop/dfs/TestReplicationPolicy.java
    lucene/hadoop/trunk/src/test/org/apache/hadoop/fs/s3/Jets3tS3FileSystemTest.java
    lucene/hadoop/trunk/src/test/org/apache/hadoop/fs/s3/S3FileSystemBaseTest.java
    lucene/hadoop/trunk/src/test/org/apache/hadoop/fs/s3/TestINode.java
    lucene/hadoop/trunk/src/test/org/apache/hadoop/fs/s3/TestInMemoryS3FileSystem.java
    lucene/hadoop/trunk/src/test/org/apache/hadoop/io/retry/TestRetryProxy.java
    lucene/hadoop/trunk/src/test/org/apache/hadoop/net/TestNetworkTopology.java
    lucene/hadoop/trunk/src/test/org/apache/hadoop/util/TestReflectionUtils.java
    lucene/hadoop/trunk/src/test/testjar/ExternalMapperReducer.java

Modified: lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HAbstractScanner.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HAbstractScanner.java?view=diff&rev=529756&r1=529755&r2=529756
==============================================================================
--- lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HAbstractScanner.java (original)
+++ lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HAbstractScanner.java Tue Apr 17 13:37:59 2007
@@ -180,7 +180,7 @@
    * @see org.apache.hadoop.hbase.HScannerInterface#next(org.apache.hadoop.hbase.HStoreKey, java.util.TreeMap)
    */
   public boolean next(HStoreKey key, TreeMap<Text, byte[]> results)
-      throws IOException {
+    throws IOException {
  
     // Find the next row label (and timestamp)
  
@@ -188,12 +188,12 @@
     long chosenTimestamp = -1;
     for(int i = 0; i < keys.length; i++) {
       while((keys[i] != null)
-          && (columnMatch(i))
-          && (keys[i].getTimestamp() <= this.timestamp)
-          && ((chosenRow == null)
-              || (keys[i].getRow().compareTo(chosenRow) < 0)
-              || ((keys[i].getRow().compareTo(chosenRow) == 0)
-                  && (keys[i].getTimestamp() > chosenTimestamp)))) {
+            && (columnMatch(i))
+            && (keys[i].getTimestamp() <= this.timestamp)
+            && ((chosenRow == null)
+                || (keys[i].getRow().compareTo(chosenRow) < 0)
+                || ((keys[i].getRow().compareTo(chosenRow) == 0)
+                    && (keys[i].getTimestamp() > chosenTimestamp)))) {
 
         chosenRow = new Text(keys[i].getRow());
         chosenTimestamp = keys[i].getTimestamp();
@@ -212,8 +212,8 @@
         // Fetch the data
         
         while((keys[i] != null)
-            && (keys[i].getRow().compareTo(chosenRow) == 0)
-            && (keys[i].getTimestamp() == chosenTimestamp)) {
+              && (keys[i].getRow().compareTo(chosenRow) == 0)
+              && (keys[i].getTimestamp() == chosenTimestamp)) {
 
           if(columnMatch(i)) {
             outbuf.reset();
@@ -235,9 +235,9 @@
         // a valid timestamp, so we're ready next time.
         
         while((keys[i] != null)
-            && ((keys[i].getRow().compareTo(chosenRow) <= 0)
-                || (keys[i].getTimestamp() > this.timestamp)
-                || (! columnMatch(i)))) {
+              && ((keys[i].getRow().compareTo(chosenRow) <= 0)
+                  || (keys[i].getTimestamp() > this.timestamp)
+                  || (! columnMatch(i)))) {
 
           getNext(i);
         }

Modified: lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HClient.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HClient.java?view=diff&rev=529756&r1=529755&r2=529756
==============================================================================
--- lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HClient.java (original)
+++ lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HClient.java Tue Apr 17 13:37:59 2007
@@ -146,8 +146,8 @@
   private void locateRootRegion() throws IOException {
     if(master == null) {
       master = (HMasterInterface)RPC.getProxy(HMasterInterface.class, 
-                   HMasterInterface.versionID,
-                   masterLocation.getInetSocketAddress(), conf);
+                                              HMasterInterface.versionID,
+                                              masterLocation.getInetSocketAddress(), conf);
     }
     
     int tries = 0;
@@ -229,7 +229,7 @@
         String serverName = new String(serverBytes, UTF8_ENCODING);
           
         tableServers.put(regionInfo.startKey, 
-            new TableInfo(regionInfo, new HServerAddress(serverName)));
+                         new TableInfo(regionInfo, new HServerAddress(serverName)));
 
         results.clear();
       }
@@ -239,16 +239,16 @@
   }
 
   public synchronized HRegionInterface getHRegionConnection(HServerAddress regionServer)
-      throws IOException {
+    throws IOException {
 
-      // See if we already have a connection
+    // See if we already have a connection
 
     HRegionInterface server = servers.get(regionServer.toString());
     
     if(server == null) {                                // Get a connection
       
       server = (HRegionInterface)RPC.waitForProxy(HRegionInterface.class, 
-          HRegionInterface.versionID, regionServer.getInetSocketAddress(), conf);
+                                                  HRegionInterface.versionID, regionServer.getInetSocketAddress(), conf);
       
       servers.put(regionServer.toString(), server);
     }
@@ -325,14 +325,14 @@
   public byte[] get(Text row, Text column) throws IOException {
     TableInfo info = getTableInfo(row);
     return getHRegionConnection(info.serverAddress).get(
-        info.regionInfo.regionName, row, column).get();
+                                                        info.regionInfo.regionName, row, column).get();
   }
  
   /** Get the specified number of versions of the specified row and column */
   public byte[][] get(Text row, Text column, int numVersions) throws IOException {
     TableInfo info = getTableInfo(row);
     BytesWritable[] values = getHRegionConnection(info.serverAddress).get(
-        info.regionInfo.regionName, row, column, numVersions);
+                                                                          info.regionInfo.regionName, row, column, numVersions);
     
     ArrayList<byte[]> bytes = new ArrayList<byte[]>();
     for(int i = 0 ; i < values.length; i++) {
@@ -348,7 +348,7 @@
   public byte[][] get(Text row, Text column, long timestamp, int numVersions) throws IOException {
     TableInfo info = getTableInfo(row);
     BytesWritable[] values = getHRegionConnection(info.serverAddress).get(
-        info.regionInfo.regionName, row, column, timestamp, numVersions);
+                                                                          info.regionInfo.regionName, row, column, timestamp, numVersions);
     
     ArrayList<byte[]> bytes = new ArrayList<byte[]>();
     for(int i = 0 ; i < values.length; i++) {
@@ -361,7 +361,7 @@
   public LabelledData[] getRow(Text row) throws IOException {
     TableInfo info = getTableInfo(row);
     return getHRegionConnection(info.serverAddress).getRow(
-        info.regionInfo.regionName, row);
+                                                           info.regionInfo.regionName, row);
   }
 
   /** 
@@ -492,7 +492,7 @@
       try {
         server = getHRegionConnection(regions[currentRegion].serverAddress);
         scanner = server.openScanner(regions[currentRegion].regionInfo.regionName,
-            columns, startRow);
+                                     columns, startRow);
         
       } catch(IOException e) {
         close();

Modified: lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HLog.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HLog.java?view=diff&rev=529756&r1=529755&r2=529756
==============================================================================
--- lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HLog.java (original)
+++ lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HLog.java Tue Apr 17 13:37:59 2007
@@ -342,7 +342,7 @@
     }
     
     writer.append(new HLogKey(regionName, tableName, HLog.METAROW, logSeqId),
-        new HLogEdit(HLog.METACOLUMN, HStoreKey.COMPLETE_CACHEFLUSH, System.currentTimeMillis()));
+                  new HLogEdit(HLog.METACOLUMN, HStoreKey.COMPLETE_CACHEFLUSH, System.currentTimeMillis()));
     numEntries++;
 
     // Remember the most-recent flush for each region.

Modified: lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HMaster.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HMaster.java?view=diff&rev=529756&r1=529755&r2=529756
==============================================================================
--- lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HMaster.java (original)
+++ lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HMaster.java Tue Apr 17 13:37:59 2007
@@ -104,7 +104,7 @@
     
     public void run() {
       Text cols[] = {
-          ROOT_COLUMN_FAMILY
+        ROOT_COLUMN_FAMILY
       };
       Text firstRow = new Text();
   
@@ -156,7 +156,7 @@
             synchronized(serversToServerInfo) {
               storedInfo = serversToServerInfo.get(serverName);
               if(storedInfo == null
-                  || storedInfo.getStartCode() != startCode) {
+                 || storedInfo.getStartCode() != startCode) {
               
                 // The current assignment is no good; load the region.
   
@@ -216,7 +216,7 @@
    */
   private class MetaScanner implements Runnable {
     private final Text cols[] = {
-        META_COLUMN_FAMILY
+      META_COLUMN_FAMILY
     };
     private final Text firstRow = new Text();
     
@@ -262,7 +262,7 @@
           synchronized(serversToServerInfo) {
             storedInfo = serversToServerInfo.get(serverName);
             if(storedInfo == null
-                || storedInfo.getStartCode() != startCode) {
+               || storedInfo.getStartCode() != startCode) {
             
               // The current assignment is no good; load the region.
 
@@ -370,8 +370,8 @@
   /** Build the HMaster out of a raw configuration item. */
   public HMaster(Configuration conf) throws IOException {
     this(new Path(conf.get(HREGION_DIR, DEFAULT_HREGION_DIR)),
-        new HServerAddress(conf.get(MASTER_DEFAULT_NAME)),
-        conf);
+         new HServerAddress(conf.get(MASTER_DEFAULT_NAME)),
+         conf);
   }
 
   /** 
@@ -410,9 +410,9 @@
     this.maxRegionOpenTime = conf.getLong("hbase.hbasemaster.maxregionopen", 30 * 1000);
     this.msgQueue = new Vector<PendingOperation>();
     this.serverLeases = new Leases(conf.getLong("hbase.master.lease.period", 15 * 1000), 
-        conf.getLong("hbase.master.lease.thread.wakefrequency", 15 * 1000));
+                                   conf.getLong("hbase.master.lease.thread.wakefrequency", 15 * 1000));
     this.server = RPC.getServer(this, address.getBindAddress(),
-        address.getPort(), conf.getInt("hbase.hregionserver.handler.count", 10), false, conf);
+                                address.getPort(), conf.getInt("hbase.hregionserver.handler.count", 10), false, conf);
     this.client = new HClient(conf);
     
     this.metaRescanInterval
@@ -714,7 +714,7 @@
           
         default:
           throw new IOException("Impossible state during msg processing.  Instruction: "
-              + incomingMsgs[i].getMsg());
+                                + incomingMsgs[i].getMsg());
         }
       }
 
@@ -725,13 +725,13 @@
         // Open new regions as necessary
 
         int targetForServer = (int) Math.ceil(unassignedRegions.size()
-            / (1.0 * serversToServerInfo.size()));
+                                              / (1.0 * serversToServerInfo.size()));
 
         int counter = 0;
         long now = System.currentTimeMillis();
 
         for(Iterator<Text> it = unassignedRegions.keySet().iterator();
-        it.hasNext(); ) {
+            it.hasNext(); ) {
 
           Text curRegionName = it.next();
           HRegionInfo regionInfo = unassignedRegions.get(curRegionName);
@@ -790,7 +790,7 @@
 
   abstract class PendingOperation {
     protected final Text[] columns = {
-        META_COLUMN_FAMILY
+      META_COLUMN_FAMILY
     };
     protected final Text startRow = new Text();
     protected long clientId;
@@ -813,7 +813,7 @@
     }
     
     private void scanMetaRegion(HRegionInterface server, HScannerInterface scanner,
-        Text regionName) throws IOException {
+                                Text regionName) throws IOException {
 
       Vector<HStoreKey> toDoList = new Vector<HStoreKey>();
       TreeMap<Text, HRegionInfo> regions = new TreeMap<Text, HRegionInfo>();
@@ -899,7 +899,7 @@
       
       HRegionInterface server = client.getHRegionConnection(rootRegionLocation);
       HScannerInterface scanner = server.openScanner(rootRegionInfo.regionName,
-          columns, startRow);
+                                                     columns, startRow);
       
       scanMetaRegion(server, scanner, rootRegionInfo.regionName);
       for(Iterator<MetaRegion> i = knownMetaRegions.values().iterator();
@@ -1003,10 +1003,10 @@
       
       try {
         this.serverAddress = new BytesWritable(
-            info.getServerAddress().toString().getBytes(UTF8_ENCODING));
+                                               info.getServerAddress().toString().getBytes(UTF8_ENCODING));
         
         this.startCode = new BytesWritable(
-            String.valueOf(info.getStartCode()).getBytes(UTF8_ENCODING));
+                                           String.valueOf(info.getStartCode()).getBytes(UTF8_ENCODING));
         
       } catch(UnsupportedEncodingException e) {
       }
@@ -1100,7 +1100,7 @@
     long clientId = rand.nextLong();
     long lockid = server.startUpdate(metaRegionName, clientId, regionName);
     server.put(metaRegionName, clientId, lockid, META_COL_REGIONINFO, 
-        new BytesWritable(byteValue.toByteArray()));
+               new BytesWritable(byteValue.toByteArray()));
     server.commit(metaRegionName, clientId, lockid);
     
     // 4. Get it assigned to a server
@@ -1122,14 +1122,14 @@
    * @throws IOException
    */
   private HRegion createNewHRegion(HTableDescriptor desc, long regionId) 
-      throws IOException {
+    throws IOException {
     
     HRegionInfo info = new HRegionInfo(regionId, desc, null, null);
     Path regionDir = HStoreFile.getHRegionDir(dir, info.regionName);
     fs.mkdirs(regionDir);
 
     return new HRegion(dir, new HLog(fs, new Path(regionDir, "log"), conf), fs,
-        conf, info, null, null);
+                       conf, info, null, null);
   }
   
   /**
@@ -1168,7 +1168,7 @@
   
   public void deleteTable(Text tableName) throws IOException {
     Text[] columns = {
-        META_COLUMN_FAMILY
+      META_COLUMN_FAMILY
     };
     
     // We can not access any meta region if they have not already been assigned

Modified: lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HMemcache.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HMemcache.java?view=diff&rev=529756&r1=529755&r2=529756
==============================================================================
--- lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HMemcache.java (original)
+++ lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HMemcache.java Tue Apr 17 13:37:59 2007
@@ -31,10 +31,10 @@
   private static final Log LOG = LogFactory.getLog(HMemcache.class);
   
   TreeMap<HStoreKey, BytesWritable> memcache 
-      = new TreeMap<HStoreKey, BytesWritable>();
+    = new TreeMap<HStoreKey, BytesWritable>();
   
   Vector<TreeMap<HStoreKey, BytesWritable>> history 
-      = new Vector<TreeMap<HStoreKey, BytesWritable>>();
+    = new Vector<TreeMap<HStoreKey, BytesWritable>>();
   
   TreeMap<HStoreKey, BytesWritable> snapshot = null;
 
@@ -199,7 +199,7 @@
   }
   
   void internalGetFull(TreeMap<HStoreKey, BytesWritable> map, HStoreKey key, 
-      TreeMap<Text, byte[]> results) {
+                       TreeMap<Text, byte[]> results) {
     
     SortedMap<HStoreKey, BytesWritable> tailMap = map.tailMap(key);
     
@@ -208,7 +208,7 @@
       Text itCol = itKey.getColumn();
 
       if(results.get(itCol) == null
-          && key.matchesWithoutColumn(itKey)) {
+         && key.matchesWithoutColumn(itKey)) {
         BytesWritable val = tailMap.get(itKey);
         results.put(itCol, val.get());
         
@@ -251,7 +251,7 @@
    * Return a scanner over the keys in the HMemcache
    */
   public HScannerInterface getScanner(long timestamp, Text targetCols[], Text firstRow)
-      throws IOException {
+    throws IOException {
     
     return new HMemcacheScanner(timestamp, targetCols, firstRow);
   }
@@ -266,8 +266,8 @@
     Iterator<HStoreKey> keyIterators[];
 
     @SuppressWarnings("unchecked")
-    public HMemcacheScanner(long timestamp, Text targetCols[], Text firstRow)
-        throws IOException {
+      public HMemcacheScanner(long timestamp, Text targetCols[], Text firstRow)
+      throws IOException {
       
       super(timestamp, targetCols);
       

Modified: lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HMsg.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HMsg.java?view=diff&rev=529756&r1=529755&r2=529756
==============================================================================
--- lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HMsg.java (original)
+++ lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HMsg.java Tue Apr 17 13:37:59 2007
@@ -67,13 +67,13 @@
   // Writable
   //////////////////////////////////////////////////////////////////////////////
 
-   public void write(DataOutput out) throws IOException {
-     out.writeByte(msg);
-     info.write(out);
-   }
+  public void write(DataOutput out) throws IOException {
+    out.writeByte(msg);
+    info.write(out);
+  }
 
-   public void readFields(DataInput in) throws IOException {
-     this.msg = in.readByte();
-     this.info.readFields(in);
-   }
+  public void readFields(DataInput in) throws IOException {
+    this.msg = in.readByte();
+    this.info.readFields(in);
+  }
 }

Modified: lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HRegionInfo.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HRegionInfo.java?view=diff&rev=529756&r1=529755&r2=529756
==============================================================================
--- lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HRegionInfo.java (original)
+++ lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HRegionInfo.java Tue Apr 17 13:37:59 2007
@@ -38,7 +38,7 @@
   }
 
   public HRegionInfo(long regionId, HTableDescriptor tableDesc, Text startKey, 
-      Text endKey) throws IllegalArgumentException {
+                     Text endKey) throws IllegalArgumentException {
     
     this.regionId = regionId;
     
@@ -59,7 +59,7 @@
     }
     
     this.regionName = new Text(tableDesc.getName() + "_"
-        + (startKey == null ? "" : startKey.toString()) + "_" + regionId);
+                               + (startKey == null ? "" : startKey.toString()) + "_" + regionId);
   }
     
   //////////////////////////////////////////////////////////////////////////////

Modified: lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HRegionServer.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HRegionServer.java?view=diff&rev=529756&r1=529755&r2=529756
==============================================================================
--- lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HRegionServer.java (original)
+++ lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HRegionServer.java Tue Apr 17 13:37:59 2007
@@ -111,7 +111,7 @@
 
             Text tableToUpdate
               = (oldRegion.find(META_TABLE_NAME.toString()) == 0)
-                ? ROOT_TABLE_NAME : META_TABLE_NAME;
+              ? ROOT_TABLE_NAME : META_TABLE_NAME;
 
             client.openTable(tableToUpdate);
             long lockid = client.startUpdate(oldRegion);
@@ -249,13 +249,13 @@
   /** Start a HRegionServer at the default location */
   public HRegionServer(Configuration conf) throws IOException {
     this(new Path(conf.get(HREGION_DIR, DEFAULT_HREGION_DIR)),
-        new HServerAddress(conf.get("hbase.regionserver.default.name")),
-        conf);
+         new HServerAddress(conf.get("hbase.regionserver.default.name")),
+         conf);
   }
   
   /** Start a HRegionServer at an indicated location */
   public HRegionServer(Path regionDir, HServerAddress address, Configuration conf) 
-      throws IOException {
+    throws IOException {
     
     // Basic setup
     
@@ -302,10 +302,10 @@
       // Remote HMaster
 
       this.hbaseMaster = (HMasterRegionInterface)
-      RPC.waitForProxy(HMasterRegionInterface.class,
-          HMasterRegionInterface.versionId,
-          new HServerAddress(conf.get(MASTER_DEFAULT_NAME)).getInetSocketAddress(),
-          conf);
+        RPC.waitForProxy(HMasterRegionInterface.class,
+                         HMasterRegionInterface.versionId,
+                         new HServerAddress(conf.get(MASTER_DEFAULT_NAME)).getInetSocketAddress(),
+                         conf);
 
       // Threads
 
@@ -313,12 +313,12 @@
       this.splitCheckerThread.start();
       this.logRollerThread.start();
       this.leases = new Leases(conf.getLong("hbase.hregionserver.lease.period", 
-          3 * 60 * 1000), threadWakeFrequency);
+                                            3 * 60 * 1000), threadWakeFrequency);
       
       // Server
 
       this.server = RPC.getServer(this, address.getBindAddress().toString(), 
-          address.getPort(), conf.getInt("hbase.hregionserver.handler.count", 10), false, conf);
+                                  address.getPort(), conf.getInt("hbase.hregionserver.handler.count", 10), false, conf);
       this.server.start();
 
     } catch(IOException e) {
@@ -523,7 +523,7 @@
   }
 
   private void closeRegion(HRegionInfo info, boolean reportWhenCompleted)
-      throws IOException {
+    throws IOException {
     
     locking.obtainWriteLock();
     try {
@@ -580,24 +580,24 @@
    *        
    *        For now, we do not do merging. Splits are driven by the HRegionServer.
    ****************************************************************************/
-/*
-  private void mergeRegions(Text regionNameA, Text regionNameB) throws IOException {
+  /*
+    private void mergeRegions(Text regionNameA, Text regionNameB) throws IOException {
     locking.obtainWriteLock();
     try {
-      HRegion srcA = regions.remove(regionNameA);
-      HRegion srcB = regions.remove(regionNameB);
-      HRegion newRegion = HRegion.closeAndMerge(srcA, srcB);
-      regions.put(newRegion.getRegionName(), newRegion);
-
-      reportClose(srcA);
-      reportClose(srcB);
-      reportOpen(newRegion);
+    HRegion srcA = regions.remove(regionNameA);
+    HRegion srcB = regions.remove(regionNameB);
+    HRegion newRegion = HRegion.closeAndMerge(srcA, srcB);
+    regions.put(newRegion.getRegionName(), newRegion);
+
+    reportClose(srcA);
+    reportClose(srcB);
+    reportOpen(newRegion);
       
     } finally {
-      locking.releaseWriteLock();
+    locking.releaseWriteLock();
     }
-  }
-*/
+    }
+  */
 
   //////////////////////////////////////////////////////////////////////////////
   // HRegionInterface
@@ -614,7 +614,7 @@
 
   /** Start a scanner for a given HRegion. */
   public HScannerInterface openScanner(Text regionName, Text[] cols, 
-      Text firstRow) throws IOException {
+                                       Text firstRow) throws IOException {
 
     HRegion r = getRegion(regionName);
     if(r == null) {
@@ -639,7 +639,7 @@
 
   /** Get multiple versions of the indicated row/col */
   public BytesWritable[] get(Text regionName, Text row, Text column, 
-      int numVersions) throws IOException {
+                             int numVersions) throws IOException {
     
     HRegion region = getRegion(regionName);
     if(region == null) {
@@ -661,7 +661,7 @@
 
   /** Get multiple timestamped versions of the indicated row/col */
   public BytesWritable[] get(Text regionName, Text row, Text column, 
-      long timestamp, int numVersions) throws IOException {
+                             long timestamp, int numVersions) throws IOException {
     
     HRegion region = getRegion(regionName);
     if(region == null) {
@@ -723,7 +723,7 @@
   }
   
   public long startUpdate(Text regionName, long clientid, Text row) 
-      throws IOException {
+    throws IOException {
     
     HRegion region = getRegion(regionName);
     if(region == null) {
@@ -732,15 +732,15 @@
     
     long lockid = region.startUpdate(row);
     leases.createLease(new Text(String.valueOf(clientid)), 
-        new Text(String.valueOf(lockid)), 
-        new RegionListener(region, lockid));
+                       new Text(String.valueOf(lockid)), 
+                       new RegionListener(region, lockid));
     
     return lockid;
   }
 
   /** Add something to the HBase. */
   public void put(Text regionName, long clientid, long lockid, Text column, 
-      BytesWritable val) throws IOException {
+                  BytesWritable val) throws IOException {
     
     HRegion region = getRegion(regionName);
     if(region == null) {
@@ -748,14 +748,14 @@
     }
     
     leases.renewLease(new Text(String.valueOf(clientid)), 
-        new Text(String.valueOf(lockid)));
+                      new Text(String.valueOf(lockid)));
     
     region.put(lockid, column, val.get());
   }
 
   /** Remove a cell from the HBase. */
   public void delete(Text regionName, long clientid, long lockid, Text column) 
-      throws IOException {
+    throws IOException {
     
     HRegion region = getRegion(regionName);
     if(region == null) {
@@ -763,14 +763,14 @@
     }
     
     leases.renewLease(new Text(String.valueOf(clientid)), 
-        new Text(String.valueOf(lockid)));
+                      new Text(String.valueOf(lockid)));
     
     region.delete(lockid, column);
   }
 
   /** Abandon the transaction */
   public void abort(Text regionName, long clientid, long lockid) 
-      throws IOException {
+    throws IOException {
     
     HRegion region = getRegion(regionName);
     if(region == null) {
@@ -778,14 +778,14 @@
     }
     
     leases.cancelLease(new Text(String.valueOf(clientid)), 
-        new Text(String.valueOf(lockid)));
+                       new Text(String.valueOf(lockid)));
     
     region.abort(lockid);
   }
 
   /** Confirm the transaction */
   public void commit(Text regionName, long clientid, long lockid) 
-      throws IOException {
+    throws IOException {
     
     HRegion region = getRegion(regionName);
     if(region == null) {
@@ -793,7 +793,7 @@
     }
     
     leases.cancelLease(new Text(String.valueOf(clientid)), 
-        new Text(String.valueOf(lockid)));
+                       new Text(String.valueOf(lockid)));
     
     region.commit(lockid);
   }
@@ -801,7 +801,7 @@
   /** Don't let the client's lease expire just yet...  */
   public void renewLease(long lockid, long clientid) throws IOException {
     leases.renewLease(new Text(String.valueOf(clientid)), 
-        new Text(String.valueOf(lockid)));
+                      new Text(String.valueOf(lockid)));
   }
 
   /** Private utility method for safely obtaining an HRegion handle. */

Modified: lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HStore.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HStore.java?view=diff&rev=529756&r1=529755&r2=529756
==============================================================================
--- lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HStore.java (original)
+++ lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HStore.java Tue Apr 17 13:37:59 2007
@@ -88,7 +88,7 @@
    * will be deleted (by whoever has instantiated the HStore).
    */
   public HStore(Path dir, Text regionName, Text colFamily, int maxVersions, 
-      FileSystem fs, Path reconstructionLog, Configuration conf) throws IOException {
+                FileSystem fs, Path reconstructionLog, Configuration conf) throws IOException {
     
     this.dir = dir;
     this.regionName = regionName;
@@ -174,7 +174,7 @@
             continue;
           }
           reconstructedCache.put(new HStoreKey(key.getRow(), val.getColumn(), 
-              val.getTimestamp()), val.getVal());
+                                               val.getTimestamp()), val.getVal());
         }
         
       } finally {
@@ -252,13 +252,13 @@
    * Return the entire list of HStoreFiles currently used by the HStore.
    */
   public Vector<HStoreFile> flushCache(TreeMap<HStoreKey, BytesWritable> inputCache,
-      long logCacheFlushId) throws IOException {
+                                       long logCacheFlushId) throws IOException {
     
     return flushCacheHelper(inputCache, logCacheFlushId, true);
   }
   
   Vector<HStoreFile> flushCacheHelper(TreeMap<HStoreKey, BytesWritable> inputCache,
-      long logCacheFlushId, boolean addToAvailableMaps) throws IOException {
+                                      long logCacheFlushId, boolean addToAvailableMaps) throws IOException {
     
     synchronized(flushLock) {
       LOG.debug("flushing HStore " + this.regionName + "/" + this.colFamily);
@@ -270,7 +270,7 @@
       
       Path mapfile = flushedFile.getMapFilePath();
       MapFile.Writer out = new MapFile.Writer(conf, fs, mapfile.toString(), 
-          HStoreKey.class, BytesWritable.class);
+                                              HStoreKey.class, BytesWritable.class);
       
       try {
         for(Iterator<HStoreKey> it = inputCache.keySet().iterator(); it.hasNext(); ) {
@@ -392,8 +392,8 @@
         // Step through them, writing to the brand-new TreeMap
 
         MapFile.Writer compactedOut = new MapFile.Writer(conf, fs, 
-            compactedOutputFile.getMapFilePath().toString(), HStoreKey.class, 
-            BytesWritable.class);
+                                                         compactedOutputFile.getMapFilePath().toString(), HStoreKey.class, 
+                                                         BytesWritable.class);
         
         try {
 
@@ -464,7 +464,7 @@
 
             HStoreKey sk = keys[smallestKey];
             if(lastRow.equals(sk.getRow())
-                && lastColumn.equals(sk.getColumn())) {
+               && lastColumn.equals(sk.getColumn())) {
               
               timesSeen++;
               
@@ -478,7 +478,7 @@
               // Then just skip them.
 
               if(sk.getRow().getLength() != 0
-                  && sk.getColumn().getLength() != 0) {
+                 && sk.getColumn().getLength() != 0) {
                 
                 // Only write out objects which have a non-zero length key and value
 
@@ -683,7 +683,7 @@
       
       mapFiles.put(orderVal, finalCompactedFile);
       maps.put(orderVal, new MapFile.Reader(fs, 
-          finalCompactedFile.getMapFilePath().toString(), conf));
+                                            finalCompactedFile.getMapFilePath().toString(), conf));
       
     } finally {
       
@@ -721,7 +721,7 @@
           do {
             Text readcol = readkey.getColumn();
             if(results.get(readcol) == null
-                && key.matchesWithoutColumn(readkey)) {
+               && key.matchesWithoutColumn(readkey)) {
               results.put(new Text(readcol), readval.get());
               readval = new BytesWritable();
               
@@ -850,7 +850,7 @@
    * These should be closed after the user is done with them.
    */
   public HScannerInterface getScanner(long timestamp, Text targetCols[],
-      Text firstRow) throws IOException {
+                                      Text firstRow) throws IOException {
     
     return new HStoreScanner(timestamp, targetCols, firstRow);
   }

Modified: lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HStoreFile.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HStoreFile.java?view=diff&rev=529756&r1=529755&r2=529756
==============================================================================
--- lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HStoreFile.java (original)
+++ lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HStoreFile.java Tue Apr 17 13:37:59 2007
@@ -61,7 +61,7 @@
   }
   
   public HStoreFile(Configuration conf, Path dir, Text regionName, 
-      Text colFamily, long fileId) {
+                    Text colFamily, long fileId) {
     
     this.conf = conf;
     this.dir = dir;
@@ -92,12 +92,12 @@
   
   public Path getMapFilePath() {
     return new Path(HStoreFile.getMapDir(dir, regionName, colFamily), 
-        HSTORE_DATFILE_PREFIX + fileId);
+                    HSTORE_DATFILE_PREFIX + fileId);
   }
   
   public Path getInfoFilePath() {
     return new Path(HStoreFile.getInfoDir(dir, regionName, colFamily), 
-        HSTORE_INFOFILE_PREFIX + fileId);
+                    HSTORE_INFOFILE_PREFIX + fileId);
   }
 
   // Static methods to build partial paths to internal directories.  Useful for 
@@ -105,17 +105,17 @@
   
   public static Path getMapDir(Path dir, Text regionName, Text colFamily) {
     return new Path(dir, new Path(HREGIONDIR_PREFIX + regionName, 
-        new Path(colFamily.toString(), HSTORE_DATFILE_DIR)));
+                                  new Path(colFamily.toString(), HSTORE_DATFILE_DIR)));
   }
 
   public static Path getInfoDir(Path dir, Text regionName, Text colFamily) {
     return new Path(dir, new Path(HREGIONDIR_PREFIX + regionName, 
-        new Path(colFamily.toString(), HSTORE_INFO_DIR)));
+                                  new Path(colFamily.toString(), HSTORE_INFO_DIR)));
   }
 
   public static Path getHStoreDir(Path dir, Text regionName, Text colFamily) {
     return new Path(dir, new Path(HREGIONDIR_PREFIX + regionName, 
-        colFamily.toString()));
+                                  colFamily.toString()));
   }
 
   public static Path getHRegionDir(Path dir, Text regionName) {
@@ -127,7 +127,7 @@
    * filesystem if the file already exists.
    */
   static HStoreFile obtainNewHStoreFile(Configuration conf, Path dir, 
-      Text regionName, Text colFamily, FileSystem fs) throws IOException {
+                                        Text regionName, Text colFamily, FileSystem fs) throws IOException {
     
     Path mapdir = HStoreFile.getMapDir(dir, regionName, colFamily);
     long fileId = Math.abs(rand.nextLong());
@@ -149,7 +149,7 @@
    * If only one exists, we'll delete it.
    */
   static Vector<HStoreFile> loadHStoreFiles(Configuration conf, Path dir, 
-      Text regionName, Text colFamily, FileSystem fs) throws IOException {
+                                            Text regionName, Text colFamily, FileSystem fs) throws IOException {
     
     Vector<HStoreFile> results = new Vector<HStoreFile>();
     Path mapdir = HStoreFile.getMapDir(dir, regionName, colFamily);
@@ -200,18 +200,18 @@
    * brand-new HRegions.
    */
   public void splitStoreFile(Text midKey, HStoreFile dstA, HStoreFile dstB,
-      FileSystem fs, Configuration conf) throws IOException {
+                             FileSystem fs, Configuration conf) throws IOException {
 
     // Copy the appropriate tuples to one MapFile or the other.
 
     MapFile.Reader in = new MapFile.Reader(fs, getMapFilePath().toString(), conf);
     try {
       MapFile.Writer outA = new MapFile.Writer(conf, fs, 
-          dstA.getMapFilePath().toString(), HStoreKey.class, BytesWritable.class);
+                                               dstA.getMapFilePath().toString(), HStoreKey.class, BytesWritable.class);
       
       try {
         MapFile.Writer outB = new MapFile.Writer(conf, fs, 
-            dstB.getMapFilePath().toString(), HStoreKey.class, BytesWritable.class);
+                                                 dstB.getMapFilePath().toString(), HStoreKey.class, BytesWritable.class);
         
         try {
           HStoreKey readkey = new HStoreKey();
@@ -252,12 +252,12 @@
    * We are merging multiple regions into a single new one.
    */
   public void mergeStoreFiles(Vector<HStoreFile> srcFiles, FileSystem fs, 
-      Configuration conf) throws IOException {
+                              Configuration conf) throws IOException {
 
     // Copy all the source MapFile tuples into this HSF's MapFile
 
     MapFile.Writer out = new MapFile.Writer(conf, fs, getMapFilePath().toString(),
-        HStoreKey.class, BytesWritable.class);
+                                            HStoreKey.class, BytesWritable.class);
     
     try {
       for(Iterator<HStoreFile> it = srcFiles.iterator(); it.hasNext(); ) {

Modified: lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HStoreKey.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HStoreKey.java?view=diff&rev=529756&r1=529755&r2=529756
==============================================================================
--- lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HStoreKey.java (original)
+++ lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HStoreKey.java Tue Apr 17 13:37:59 2007
@@ -95,7 +95,7 @@
   
   public boolean matchesRowCol(HStoreKey other) {
     if(this.row.compareTo(other.row) == 0 &&
-        this.column.compareTo(other.column) == 0) {
+       this.column.compareTo(other.column) == 0) {
       return true;
       
     } else {
@@ -105,7 +105,7 @@
   
   public boolean matchesWithoutColumn(HStoreKey other) {
     if((this.row.compareTo(other.row) == 0) &&
-        (this.timestamp >= other.getTimestamp())) {
+       (this.timestamp >= other.getTimestamp())) {
       return true;
       
     } else {

Modified: lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/Leases.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/Leases.java?view=diff&rev=529756&r1=529755&r2=529756
==============================================================================
--- lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/Leases.java (original)
+++ lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/Leases.java Tue Apr 17 13:37:59 2007
@@ -137,7 +137,7 @@
           synchronized(sortedLeases) {
             Lease top;
             while((sortedLeases.size() > 0)
-                && ((top = sortedLeases.first()) != null)) {
+                  && ((top = sortedLeases.first()) != null)) {
               
               if(top.shouldExpire()) {
                 leases.remove(top.getLeaseId());

Modified: lucene/hadoop/trunk/src/contrib/hbase/src/test/org/apache/hadoop/hbase/TestHRegion.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/contrib/hbase/src/test/org/apache/hadoop/hbase/TestHRegion.java?view=diff&rev=529756&r1=529755&r2=529756
==============================================================================
--- lucene/hadoop/trunk/src/contrib/hbase/src/test/org/apache/hadoop/hbase/TestHRegion.java (original)
+++ lucene/hadoop/trunk/src/contrib/hbase/src/test/org/apache/hadoop/hbase/TestHRegion.java Tue Apr 17 13:37:59 2007
@@ -103,7 +103,7 @@
         rootLogger.setLevel(Level.WARN);
         
         PatternLayout consoleLayout
-            = (PatternLayout)rootLogger.getAppender("console").getLayout();
+          = (PatternLayout)rootLogger.getAppender("console").getLayout();
         consoleLayout.setConversionPattern("%d %-5p [%t] %l: %m%n");
       
         Logger.getLogger("org.apache.hadoop.hbase").setLevel(Environment.logLevel);
@@ -121,7 +121,7 @@
       desc.addFamily(new Text("contents"));
       desc.addFamily(new Text("anchor"));
       region = new HRegion(parentdir, log, fs, conf, 
-          new HRegionInfo(1, desc, null, null), null, oldlogfile);
+                           new HRegionInfo(1, desc, null, null), null, oldlogfile);
       
     } catch(IOException e) {
       failures = true;
@@ -160,27 +160,27 @@
         String bodystr = new String(bodydata).toString().trim();
         String teststr = CONTENTSTR + k;
         assertEquals("Incorrect value for key: (" + rowlabel + "," + CONTENTS_BASIC
-            + "), expected: '" + teststr + "' got: '" + bodystr + "'",
-            bodystr, teststr);
+                     + "), expected: '" + teststr + "' got: '" + bodystr + "'",
+                     bodystr, teststr);
         collabel = new Text(ANCHORNUM + k);
         bodydata = region.get(rowlabel, collabel);
         bodystr = new String(bodydata).toString().trim();
         teststr = ANCHORSTR + k;
         assertEquals("Incorrect value for key: (" + rowlabel + "," + collabel
-            + "), expected: '" + teststr + "' got: '" + bodystr + "'",
-            bodystr, teststr);
-/*
+                     + "), expected: '" + teststr + "' got: '" + bodystr + "'",
+                     bodystr, teststr);
+        /*
         // Check to make sure that null values are actually null
         for (int j = 0; j < Math.min(15, NUM_VALS); j++) {
-          if (k != j) {
-            collabel = new Text(ANCHORNUM + j);
-            byte results[] = region.get(rowlabel, collabel);
-            if (results != null) {
-              throw new IOException("Found incorrect value at [" + rowlabel + ", " + collabel + "] == " + new String(results).toString().trim());
-            }
-          }
+        if (k != j) {
+        collabel = new Text(ANCHORNUM + j);
+        byte results[] = region.get(rowlabel, collabel);
+        if (results != null) {
+        throw new IOException("Found incorrect value at [" + rowlabel + ", " + collabel + "] == " + new String(results).toString().trim());
+        }
         }
-*/
+        }
+        */
       }
     } catch(IOException e) {
       failures = true;
@@ -196,8 +196,8 @@
     }
 
     Text cols[] = new Text[] {
-        CONTENTS_FIRSTCOL,
-        ANCHOR_SECONDCOL
+      CONTENTS_FIRSTCOL,
+      ANCHOR_SECONDCOL
     };
 
     // Test the Scanner!!!
@@ -233,8 +233,8 @@
           for(int j = 0; j < cols.length; j++) {
             if(col.compareTo(cols[j]) == 0) {
               assertEquals("Error at:" + curKey.getRow() + "/" + curKey.getTimestamp()
-                  + ", Value for " + col + " should be: " + k
-                  + ", but was fetched as: " + curval, k, curval);
+                           + ", Value for " + col + " should be: " + k
+                           + ", but was fetched as: " + curval, k, curval);
               numFetched++;
             }
           }
@@ -266,8 +266,8 @@
           for(int j = 0; j < cols.length; j++) {
             if(col.compareTo(cols[j]) == 0) {
               assertEquals("Error at:" + curKey.getRow() + "/" + curKey.getTimestamp()
-                  + ", Value for " + col + " should be: " + k
-                  + ", but was fetched as: " + curval, k, curval);
+                           + ", Value for " + col + " should be: " + k
+                           + ", but was fetched as: " + curval, k, curval);
               numFetched++;
             }
           }
@@ -307,8 +307,8 @@
           for(int j = 0; j < cols.length; j++) {
             if(col.compareTo(cols[j]) == 0) {
               assertEquals("Error at:" + curKey.getRow() + "/" + curKey.getTimestamp()
-                  + ", Value for " + col + " should be: " + k
-                  + ", but was fetched as: " + curval, k, curval);
+                           + ", Value for " + col + " should be: " + k
+                           + ", but was fetched as: " + curval, k, curval);
               numFetched++;
             }
           }
@@ -340,7 +340,7 @@
           for (int j = 0; j < cols.length; j++) {
             if (col.compareTo(cols[j]) == 0) {
               assertEquals("Value for " + col + " should be: " + k
-                  + ", but was fetched as: " + curval, curval, k);
+                           + ", but was fetched as: " + curval, curval, k);
               numFetched++;
             }
           }
@@ -370,7 +370,7 @@
           for (int j = 0; j < cols.length; j++) {
             if (col.compareTo(cols[j]) == 0) {
               assertEquals("Value for " + col + " should be: " + k
-                  + ", but was fetched as: " + curval, curval, k);
+                           + ", but was fetched as: " + curval, curval, k);
               numFetched++;
             }
           }
@@ -511,8 +511,8 @@
     // First verify the data written by testBasic()
 
     Text[] cols = new Text[] {
-        new Text(ANCHORNUM + "[0-9]+"),
-        new Text(CONTENTS_BASIC)
+      new Text(ANCHORNUM + "[0-9]+"),
+      new Text(CONTENTS_BASIC)
     };
     
     HScannerInterface s = region.getScanner(cols, new Text());
@@ -532,16 +532,16 @@
 
           if(col.compareTo(CONTENTS_BASIC) == 0) {
             assertTrue("Error at:" + curKey.getRow() + "/" + curKey.getTimestamp()
-                + ", Value for " + col + " should start with: " + CONTENTSTR
-                + ", but was fetched as: " + curval,
-                curval.startsWith(CONTENTSTR));
+                       + ", Value for " + col + " should start with: " + CONTENTSTR
+                       + ", but was fetched as: " + curval,
+                       curval.startsWith(CONTENTSTR));
             contentsFetched++;
             
           } else if(col.toString().startsWith(ANCHORNUM)) {
             assertTrue("Error at:" + curKey.getRow() + "/" + curKey.getTimestamp()
-                + ", Value for " + col + " should start with: " + ANCHORSTR
-                + ", but was fetched as: " + curval,
-                curval.startsWith(ANCHORSTR));
+                       + ", Value for " + col + " should start with: " + ANCHORSTR
+                       + ", but was fetched as: " + curval,
+                       curval.startsWith(ANCHORSTR));
             anchorFetched++;
             
           } else {
@@ -561,8 +561,8 @@
     // Verify testScan data
     
     cols = new Text[] {
-        CONTENTS_FIRSTCOL,
-        ANCHOR_SECONDCOL
+      CONTENTS_FIRSTCOL,
+      ANCHOR_SECONDCOL
     };
 
     s = region.getScanner(cols, new Text());
@@ -580,7 +580,7 @@
           for (int j = 0; j < cols.length; j++) {
             if (col.compareTo(cols[j]) == 0) {
               assertEquals("Value for " + col + " should be: " + k
-                  + ", but was fetched as: " + curval, curval, k);
+                           + ", but was fetched as: " + curval, curval, k);
               numFetched++;
             }
           }
@@ -625,7 +625,7 @@
     // Test a scanner which only specifies the column family name
     
     cols = new Text[] {
-        new Text("anchor:")
+      new Text("anchor:")
     };
     
     s = region.getScanner(cols, new Text());
@@ -672,5 +672,5 @@
     
     deleteFile(new File(System.getProperty("test.build.data"), "dfs"));
     
-    }
+  }
 }

Modified: lucene/hadoop/trunk/src/contrib/streaming/src/java/org/apache/hadoop/streaming/PipeMapper.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/contrib/streaming/src/java/org/apache/hadoop/streaming/PipeMapper.java?view=diff&rev=529756&r1=529755&r2=529756
==============================================================================
--- lucene/hadoop/trunk/src/contrib/streaming/src/java/org/apache/hadoop/streaming/PipeMapper.java (original)
+++ lucene/hadoop/trunk/src/contrib/streaming/src/java/org/apache/hadoop/streaming/PipeMapper.java Tue Apr 17 13:37:59 2007
@@ -74,7 +74,7 @@
       mapRedFinished();
       throw new IOException ("MROutput/MRErrThread failed:"
                              + StringUtils.stringifyException(
-                                          outerrThreadsThrowable));
+                                                              outerrThreadsThrowable));
     }
     try {
       // 1/4 Hadoop in

Modified: lucene/hadoop/trunk/src/contrib/streaming/src/java/org/apache/hadoop/streaming/PipeReducer.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/contrib/streaming/src/java/org/apache/hadoop/streaming/PipeReducer.java?view=diff&rev=529756&r1=529755&r2=529756
==============================================================================
--- lucene/hadoop/trunk/src/contrib/streaming/src/java/org/apache/hadoop/streaming/PipeReducer.java (original)
+++ lucene/hadoop/trunk/src/contrib/streaming/src/java/org/apache/hadoop/streaming/PipeReducer.java Tue Apr 17 13:37:59 2007
@@ -78,7 +78,7 @@
             mapRedFinished();
             throw new IOException ("MROutput/MRErrThread failed:"
                                    + StringUtils.stringifyException( 
-                                               outerrThreadsThrowable));
+                                                                    outerrThreadsThrowable));
           }
           write(key);
           clientOut_.write('\t');

Modified: lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/DataStorage.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/DataStorage.java?view=diff&rev=529756&r1=529755&r2=529756
==============================================================================
--- lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/DataStorage.java (original)
+++ lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/DataStorage.java Tue Apr 17 13:37:59 2007
@@ -65,7 +65,7 @@
   void recoverTransitionRead( NamespaceInfo nsInfo,
                               Collection<File> dataDirs,
                               StartupOption startOpt
-                            ) throws IOException {
+                              ) throws IOException {
     assert FSConstants.LAYOUT_VERSION == nsInfo.getLayoutVersion() :
       "Data-node and name-node layout versions must be the same.";
     
@@ -112,7 +112,7 @@
 
     if( dataDirs.size() == 0 )  // none of the data dirs exist
       throw new IOException( 
-          "All specified directories are not accessible or do not exist." );
+                            "All specified directories are not accessible or do not exist." );
 
     // 2. Do transitions
     // Each storage directory is treated individually.
@@ -141,21 +141,21 @@
 
   protected void setFields( Properties props, 
                             StorageDirectory sd 
-                          ) throws IOException {
+                            ) throws IOException {
     super.setFields( props, sd );
     props.setProperty( "storageID", storageID );
   }
 
   protected void getFields( Properties props, 
                             StorageDirectory sd 
-                          ) throws IOException {
+                            ) throws IOException {
     super.getFields( props, sd );
     String ssid = props.getProperty( "storageID" );
     if( ssid == null ||
         ! ("".equals( storageID ) || "".equals( ssid ) ||
-            storageID.equals( ssid )))
+           storageID.equals( ssid )))
       throw new InconsistentFSStateException( sd.root,
-                  "has incompatible storage Id." );
+                                              "has incompatible storage Id." );
     if( "".equals( storageID ) ) // update id only if it was empty
       storageID = ssid;
   }
@@ -168,13 +168,13 @@
     File oldDataDir = new File( sd.root, "data" );
     if( ! oldDataDir.exists() ) 
       throw new InconsistentFSStateException( sd.root,
-          "Old layout block directory " + oldDataDir + " is missing" ); 
+                                              "Old layout block directory " + oldDataDir + " is missing" ); 
     if( ! oldDataDir.isDirectory() )
       throw new InconsistentFSStateException( sd.root,
-          oldDataDir + " is not a directory." );
+                                              oldDataDir + " is not a directory." );
     if( ! oldDataDir.canWrite() )
       throw new InconsistentFSStateException( sd.root,
-          oldDataDir + " is not writable." );
+                                              oldDataDir + " is not writable." );
     return true;
   }
   
@@ -187,7 +187,7 @@
    */
   private void convertLayout( StorageDirectory sd,
                               NamespaceInfo nsInfo 
-                            ) throws IOException {
+                              ) throws IOException {
     assert FSConstants.LAYOUT_VERSION < LAST_PRE_UPGRADE_LAYOUT_VERSION :
       "Bad current layout version: FSConstants.LAYOUT_VERSION should decrease";
     File oldF = new File( sd.root, "storage" );
@@ -195,8 +195,8 @@
     assert oldF.exists() : "Old datanode layout \"storage\" file is missing";
     assert oldDataDir.exists() : "Old layout block directory \"data\" is missing";
     LOG.info( "Old layout version file " + oldF
-            + " is found. New layout version is "
-            + FSConstants.LAYOUT_VERSION );
+              + " is found. New layout version is "
+              + FSConstants.LAYOUT_VERSION );
     LOG.info( "Converting ..." );
     
     // Lock and Read old storage file
@@ -211,7 +211,7 @@
       int odlVersion = oldFile.readInt();
       if( odlVersion < LAST_PRE_UPGRADE_LAYOUT_VERSION )
         throw new IncorrectVersionException( odlVersion, "file " + oldF,
-                                              LAST_PRE_UPGRADE_LAYOUT_VERSION );
+                                             LAST_PRE_UPGRADE_LAYOUT_VERSION );
       String odlStorageID = org.apache.hadoop.io.UTF8.readString( oldFile );
   
       // check new storage
@@ -255,7 +255,7 @@
   private void doTransition(  StorageDirectory sd, 
                               NamespaceInfo nsInfo, 
                               StartupOption startOpt
-                            ) throws IOException {
+                              ) throws IOException {
     if( startOpt == StartupOption.ROLLBACK )
       doRollback( sd, nsInfo ); // rollback if applicable
     sd.read();
@@ -263,9 +263,9 @@
       "Future version is not allowed";
     if( getNamespaceID() != nsInfo.getNamespaceID() )
       throw new IOException( 
-          "Incompatible namespaceIDs in " + sd.root.getCanonicalPath()
-          + ": namenode namespaceID = " + nsInfo.getNamespaceID() 
-          + "; datanode namespaceID = " + getNamespaceID() );
+                            "Incompatible namespaceIDs in " + sd.root.getCanonicalPath()
+                            + ": namenode namespaceID = " + nsInfo.getNamespaceID() 
+                            + "; datanode namespaceID = " + getNamespaceID() );
     if( this.layoutVersion == FSConstants.LAYOUT_VERSION 
         && this.cTime == nsInfo.getCTime() )
       return; // regular startup
@@ -292,12 +292,12 @@
    */
   void doUpgrade( StorageDirectory sd,
                   NamespaceInfo nsInfo
-                ) throws IOException {
+                  ) throws IOException {
     LOG.info( "Upgrading storage directory " + sd.root 
-            + ".\n   old LV = " + this.getLayoutVersion()
-            + "; old CTime = " + this.getCTime()
-            + ".\n   new LV = " + nsInfo.getLayoutVersion()
-            + "; new CTime = " + nsInfo.getCTime() );
+              + ".\n   old LV = " + this.getLayoutVersion()
+              + "; old CTime = " + this.getCTime()
+              + ".\n   new LV = " + nsInfo.getLayoutVersion()
+              + "; new CTime = " + nsInfo.getCTime() );
     File curDir = sd.getCurrentDir();
     File prevDir = sd.getPreviousDir();
     assert curDir.exists() : "Current directory must exist.";
@@ -323,7 +323,7 @@
 
   void doRollback(  StorageDirectory sd,
                     NamespaceInfo nsInfo
-                  ) throws IOException {
+                    ) throws IOException {
     File prevDir = sd.getPreviousDir();
     // regular startup if previous dir does not exist
     if( ! prevDir.exists() )
@@ -335,15 +335,15 @@
     // We allow rollback to a state, which is either consistent with
     // the namespace state or can be further upgraded to it.
     if( ! ( prevInfo.getLayoutVersion() >= FSConstants.LAYOUT_VERSION
-        && prevInfo.getCTime() <= nsInfo.getCTime() ))  // cannot rollback
+            && prevInfo.getCTime() <= nsInfo.getCTime() ))  // cannot rollback
       throw new InconsistentFSStateException( prevSD.root,
-          "Cannot rollback to a newer state.\nDatanode previous state: LV = " 
-          + prevInfo.getLayoutVersion() + " CTime = " + prevInfo.getCTime() 
-          + " is newer than the namespace state: LV = "
-          + nsInfo.getLayoutVersion() + " CTime = " + nsInfo.getCTime() );
+                                              "Cannot rollback to a newer state.\nDatanode previous state: LV = " 
+                                              + prevInfo.getLayoutVersion() + " CTime = " + prevInfo.getCTime() 
+                                              + " is newer than the namespace state: LV = "
+                                              + nsInfo.getLayoutVersion() + " CTime = " + nsInfo.getCTime() );
     LOG.info( "Rolling back storage directory " + sd.root 
-        + ".\n   target LV = " + nsInfo.getLayoutVersion()
-        + "; target CTime = " + nsInfo.getCTime() );
+              + ".\n   target LV = " + nsInfo.getLayoutVersion()
+              + "; target CTime = " + nsInfo.getCTime() );
     File tmpDir = sd.getRemovedTmp();
     assert ! tmpDir.exists() : "removed.tmp directory must not exist.";
     // rename current to tmp
@@ -363,9 +363,9 @@
       return; // already discarded
     final String dataDirPath = sd.root.getCanonicalPath();
     LOG.info( "Finalizing upgrade for storage directory " 
-            + dataDirPath 
-            + ".\n   cur LV = " + this.getLayoutVersion()
-            + "; cur CTime = " + this.getCTime() );
+              + dataDirPath 
+              + ".\n   cur LV = " + this.getLayoutVersion()
+              + "; cur CTime = " + this.getCTime() );
     assert sd.getCurrentDir().exists() : "Current directory must exist.";
     final File tmpDir = sd.getFinalizedTmp();
     // rename previous to tmp
@@ -373,16 +373,16 @@
 
     // delete tmp dir in a separate thread
     new Daemon( new Runnable() {
-      public void run() {
-        try {
-          deleteDir( tmpDir );
-        } catch( IOException ex ) {
-          LOG.error( "Finalize upgrade for " + dataDirPath + " failed.", ex );
+        public void run() {
+          try {
+            deleteDir( tmpDir );
+          } catch( IOException ex ) {
+            LOG.error( "Finalize upgrade for " + dataDirPath + " failed.", ex );
+          }
+          LOG.info( "Finalize upgrade for " + dataDirPath + " is complete." );
         }
-        LOG.info( "Finalize upgrade for " + dataDirPath + " is complete." );
-      }
-      public String toString() { return "Finalize " + dataDirPath; }
-    }).start();
+        public String toString() { return "Finalize " + dataDirPath; }
+      }).start();
   }
   
   void finalizeUpgrade() throws IOException {
@@ -400,11 +400,11 @@
     if( ! to.mkdir() )
       throw new IOException("Cannot create directory " + to );
     String[] blockNames = from.list( new java.io.FilenameFilter() {
-      public boolean accept(File dir, String name) {
-        return name.startsWith( BLOCK_SUBDIR_PREFIX ) 
+        public boolean accept(File dir, String name) {
+          return name.startsWith( BLOCK_SUBDIR_PREFIX ) 
             || name.startsWith( BLOCK_FILE_PREFIX );
-      }
-    });
+        }
+      });
     
     for( int i = 0; i < blockNames.length; i++ )
       linkBlocks( new File(from, blockNames[i]), new File(to, blockNames[i]) );

Modified: lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/DatanodeID.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/DatanodeID.java?view=diff&rev=529756&r1=529755&r2=529756
==============================================================================
--- lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/DatanodeID.java (original)
+++ lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/DatanodeID.java Tue Apr 17 13:37:59 2007
@@ -98,7 +98,7 @@
 
   public boolean equals( Object to ) {
     return (name.equals(((DatanodeID)to).getName()) &&
-        storageID.equals(((DatanodeID)to).getStorageID()));
+            storageID.equals(((DatanodeID)to).getStorageID()));
   }
   
   public int hashCode() {
@@ -114,9 +114,9 @@
    * Note that this does not update storageID.
    */
   void updateRegInfo( DatanodeID nodeReg ) {
-      name = nodeReg.getName();
-      infoPort = nodeReg.getInfoPort();
-      // update any more fields added in future.
+    name = nodeReg.getName();
+    infoPort = nodeReg.getInfoPort();
+    // update any more fields added in future.
   }
     
   /** Comparable.

Modified: lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/UnregisteredDatanodeException.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/UnregisteredDatanodeException.java?view=diff&rev=529756&r1=529755&r2=529756
==============================================================================
--- lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/UnregisteredDatanodeException.java (original)
+++ lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/UnregisteredDatanodeException.java Tue Apr 17 13:37:59 2007
@@ -18,8 +18,8 @@
   public UnregisteredDatanodeException( DatanodeID nodeID, 
                                         DatanodeInfo storedNode ) {
     super("Data node " + nodeID.getName() 
-        + " is attempting to report storage ID "
-        + nodeID.getStorageID() + ". Node " 
-        + storedNode.getName() + " is expected to serve this storage.");
+          + " is attempting to report storage ID "
+          + nodeID.getStorageID() + ". Node " 
+          + storedNode.getName() + " is expected to serve this storage.");
   }
 }

Modified: lucene/hadoop/trunk/src/java/org/apache/hadoop/fs/s3/Jets3tFileSystemStore.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/java/org/apache/hadoop/fs/s3/Jets3tFileSystemStore.java?view=diff&rev=529756&r1=529755&r2=529756
==============================================================================
--- lucene/hadoop/trunk/src/java/org/apache/hadoop/fs/s3/Jets3tFileSystemStore.java (original)
+++ lucene/hadoop/trunk/src/java/org/apache/hadoop/fs/s3/Jets3tFileSystemStore.java Tue Apr 17 13:37:59 2007
@@ -48,38 +48,38 @@
       String secretAccessKey = null;
       String userInfo = uri.getUserInfo();
       if (userInfo != null) {
-          int index = userInfo.indexOf(':');
-          if (index != -1) {
-	          accessKey = userInfo.substring(0, index);
-	          secretAccessKey = userInfo.substring(index + 1);
-          } else {
-        	  accessKey = userInfo;
-          }
+        int index = userInfo.indexOf(':');
+        if (index != -1) {
+          accessKey = userInfo.substring(0, index);
+          secretAccessKey = userInfo.substring(index + 1);
+        } else {
+          accessKey = userInfo;
+        }
       }
       if (accessKey == null) {
-    	  accessKey = conf.get("fs.s3.awsAccessKeyId");
+        accessKey = conf.get("fs.s3.awsAccessKeyId");
       }
       if (secretAccessKey == null) {
-    	  secretAccessKey = conf.get("fs.s3.awsSecretAccessKey");
+        secretAccessKey = conf.get("fs.s3.awsSecretAccessKey");
       }
       if (accessKey == null && secretAccessKey == null) {
-    	  throw new IllegalArgumentException("AWS " +
-    	  		"Access Key ID and Secret Access Key " +
-    	  		"must be specified as the username " +
-    	  		"or password (respectively) of a s3 URL, " +
-    	  		"or by setting the " +
-	  		    "fs.s3.awsAccessKeyId or " +    	  		
-    	  		"fs.s3.awsSecretAccessKey properties (respectively).");
+        throw new IllegalArgumentException("AWS " +
+                                           "Access Key ID and Secret Access Key " +
+                                           "must be specified as the username " +
+                                           "or password (respectively) of a s3 URL, " +
+                                           "or by setting the " +
+                                           "fs.s3.awsAccessKeyId or " +    	  		
+                                           "fs.s3.awsSecretAccessKey properties (respectively).");
       } else if (accessKey == null) {
-    	  throw new IllegalArgumentException("AWS " +
-      	  		"Access Key ID must be specified " +
-      	  		"as the username of a s3 URL, or by setting the " +
-      	  		"fs.s3.awsAccessKeyId property.");
+        throw new IllegalArgumentException("AWS " +
+                                           "Access Key ID must be specified " +
+                                           "as the username of a s3 URL, or by setting the " +
+                                           "fs.s3.awsAccessKeyId property.");
       } else if (secretAccessKey == null) {
-    	  throw new IllegalArgumentException("AWS " +
-    	  		"Secret Access Key must be specified " +
-    	  		"as the password of a s3 URL, or by setting the " +
-    	  		"fs.s3.awsSecretAccessKey property.");    	  
+        throw new IllegalArgumentException("AWS " +
+                                           "Secret Access Key must be specified " +
+                                           "as the password of a s3 URL, or by setting the " +
+                                           "fs.s3.awsSecretAccessKey property.");    	  
       }
       AWSCredentials awsCredentials = new AWSCredentials(accessKey, secretAccessKey);
       this.s3Service = new RestS3Service(awsCredentials);
@@ -162,7 +162,7 @@
   private InputStream get(String key, long byteRangeStart) throws IOException {
     try {
       S3Object object = s3Service.getObject(bucket, key, null, null, null,
-          null, byteRangeStart, null);
+                                            null, byteRangeStart, null);
       return object.getDataInputStream();
     } catch (S3ServiceException e) {
       if (e.getS3ErrorCode().equals("NoSuchKey")) {
@@ -180,7 +180,7 @@
   }
 
   public File retrieveBlock(Block block, long byteRangeStart)
-      throws IOException {
+    throws IOException {
     File fileBlock = null;
     InputStream in = null;
     OutputStream out = null;

Modified: lucene/hadoop/trunk/src/java/org/apache/hadoop/fs/s3/S3InputStream.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/java/org/apache/hadoop/fs/s3/S3InputStream.java?view=diff&rev=529756&r1=529755&r2=529756
==============================================================================
--- lucene/hadoop/trunk/src/java/org/apache/hadoop/fs/s3/S3InputStream.java (original)
+++ lucene/hadoop/trunk/src/java/org/apache/hadoop/fs/s3/S3InputStream.java Tue Apr 17 13:37:59 2007
@@ -27,7 +27,7 @@
   private long blockEnd = -1;
 
   public S3InputStream(Configuration conf, FileSystemStore store,
-      INode inode) {
+                       INode inode) {
     
     this.store = store;
     this.blocks = inode.getBlocks();
@@ -37,65 +37,65 @@
   }
 
   @Override
-  public synchronized long getPos() throws IOException {
-    return pos;
-  }
+    public synchronized long getPos() throws IOException {
+      return pos;
+    }
 
   @Override
-  public synchronized int available() throws IOException {
-    return (int) (fileLength - pos);
-  }
+    public synchronized int available() throws IOException {
+      return (int) (fileLength - pos);
+    }
 
   @Override
-  public synchronized void seek(long targetPos) throws IOException {
-    if (targetPos > fileLength) {
-      throw new IOException("Cannot seek after EOF");
+    public synchronized void seek(long targetPos) throws IOException {
+      if (targetPos > fileLength) {
+        throw new IOException("Cannot seek after EOF");
+      }
+      pos = targetPos;
+      blockEnd = -1;
     }
-    pos = targetPos;
-    blockEnd = -1;
-  }
 
   @Override
-  public synchronized boolean seekToNewSource(long targetPos) throws IOException {
-    return false;
-  }
+    public synchronized boolean seekToNewSource(long targetPos) throws IOException {
+      return false;
+    }
 
   @Override
-  public synchronized int read() throws IOException {
-    if (closed) {
-      throw new IOException("Stream closed");
-    }
-    int result = -1;
-    if (pos < fileLength) {
-      if (pos > blockEnd) {
-        blockSeekTo(pos);
+    public synchronized int read() throws IOException {
+      if (closed) {
+        throw new IOException("Stream closed");
       }
-      result = blockStream.read();
-      if (result >= 0) {
-        pos++;
+      int result = -1;
+      if (pos < fileLength) {
+        if (pos > blockEnd) {
+          blockSeekTo(pos);
+        }
+        result = blockStream.read();
+        if (result >= 0) {
+          pos++;
+        }
       }
+      return result;
     }
-    return result;
-  }
 
   @Override
-  public synchronized int read(byte buf[], int off, int len) throws IOException {
-    if (closed) {
-      throw new IOException("Stream closed");
-    }
-    if (pos < fileLength) {
-      if (pos > blockEnd) {
-        blockSeekTo(pos);
-      }
-      int realLen = Math.min(len, (int) (blockEnd - pos + 1));
-      int result = blockStream.read(buf, off, realLen);
-      if (result >= 0) {
-        pos += result;
+    public synchronized int read(byte buf[], int off, int len) throws IOException {
+      if (closed) {
+        throw new IOException("Stream closed");
       }
-      return result;
+      if (pos < fileLength) {
+        if (pos > blockEnd) {
+          blockSeekTo(pos);
+        }
+        int realLen = Math.min(len, (int) (blockEnd - pos + 1));
+        int result = blockStream.read(buf, off, realLen);
+        if (result >= 0) {
+          pos += result;
+        }
+        return result;
+      }
+      return -1;
     }
-    return -1;
-  }
 
   private synchronized void blockSeekTo(long target) throws IOException {
     //
@@ -117,7 +117,7 @@
     }
     if (targetBlock < 0) {
       throw new IOException(
-          "Impossible situation: could not find target position " + target);
+                            "Impossible situation: could not find target position " + target);
     }
     long offsetIntoBlock = target - targetBlockStart;
 
@@ -132,7 +132,7 @@
   }
 
   @Override
-  public void close() throws IOException {
+    public void close() throws IOException {
     if (closed) {
       throw new IOException("Stream closed");
     }
@@ -151,17 +151,17 @@
    * We don't support marks.
    */
   @Override
-  public boolean markSupported() {
+    public boolean markSupported() {
     return false;
   }
 
   @Override
-  public void mark(int readLimit) {
+    public void mark(int readLimit) {
     // Do nothing
   }
 
   @Override
-  public void reset() throws IOException {
+    public void reset() throws IOException {
     throw new IOException("Mark not supported");
   }
 

Modified: lucene/hadoop/trunk/src/java/org/apache/hadoop/fs/s3/S3OutputStream.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/java/org/apache/hadoop/fs/s3/S3OutputStream.java?view=diff&rev=529756&r1=529755&r2=529756
==============================================================================
--- lucene/hadoop/trunk/src/java/org/apache/hadoop/fs/s3/S3OutputStream.java (original)
+++ lucene/hadoop/trunk/src/java/org/apache/hadoop/fs/s3/S3OutputStream.java Tue Apr 17 13:37:59 2007
@@ -46,7 +46,7 @@
   private Block nextBlock;
 
   public S3OutputStream(Configuration conf, FileSystemStore store,
-      Path path, long blockSize, Progressable progress) throws IOException {
+                        Path path, long blockSize, Progressable progress) throws IOException {
     
     this.conf = conf;
     this.store = store;
@@ -74,52 +74,52 @@
   }
 
   @Override
-  public synchronized void write(int b) throws IOException {
-    if (closed) {
-      throw new IOException("Stream closed");
-    }
+    public synchronized void write(int b) throws IOException {
+      if (closed) {
+        throw new IOException("Stream closed");
+      }
 
-    if ((bytesWrittenToBlock + pos == blockSize) || (pos >= bufferSize)) {
-      flush();
+      if ((bytesWrittenToBlock + pos == blockSize) || (pos >= bufferSize)) {
+        flush();
+      }
+      outBuf[pos++] = (byte) b;
+      filePos++;
     }
-    outBuf[pos++] = (byte) b;
-    filePos++;
-  }
 
   @Override
-  public synchronized void write(byte b[], int off, int len) throws IOException {
-    if (closed) {
-      throw new IOException("Stream closed");
-    }
-    while (len > 0) {
-      int remaining = bufferSize - pos;
-      int toWrite = Math.min(remaining, len);
-      System.arraycopy(b, off, outBuf, pos, toWrite);
-      pos += toWrite;
-      off += toWrite;
-      len -= toWrite;
-      filePos += toWrite;
-
-      if ((bytesWrittenToBlock + pos >= blockSize) || (pos == bufferSize)) {
-        flush();
+    public synchronized void write(byte b[], int off, int len) throws IOException {
+      if (closed) {
+        throw new IOException("Stream closed");
+      }
+      while (len > 0) {
+        int remaining = bufferSize - pos;
+        int toWrite = Math.min(remaining, len);
+        System.arraycopy(b, off, outBuf, pos, toWrite);
+        pos += toWrite;
+        off += toWrite;
+        len -= toWrite;
+        filePos += toWrite;
+
+        if ((bytesWrittenToBlock + pos >= blockSize) || (pos == bufferSize)) {
+          flush();
+        }
       }
     }
-  }
 
   @Override
-  public synchronized void flush() throws IOException {
-    if (closed) {
-      throw new IOException("Stream closed");
-    }
+    public synchronized void flush() throws IOException {
+      if (closed) {
+        throw new IOException("Stream closed");
+      }
 
-    if (bytesWrittenToBlock + pos >= blockSize) {
-      flushData((int) blockSize - bytesWrittenToBlock);
-    }
-    if (bytesWrittenToBlock == blockSize) {
-      endBlock();
+      if (bytesWrittenToBlock + pos >= blockSize) {
+        flushData((int) blockSize - bytesWrittenToBlock);
+      }
+      if (bytesWrittenToBlock == blockSize) {
+        endBlock();
+      }
+      flushData(pos);
     }
-    flushData(pos);
-  }
 
   private synchronized void flushData(int maxPos) throws IOException {
     int workingPos = Math.min(pos, maxPos);
@@ -174,27 +174,27 @@
 
   private synchronized void internalClose() throws IOException {
     INode inode = new INode(FileType.FILE, blocks.toArray(new Block[blocks
-        .size()]));
+                                                                    .size()]));
     store.storeINode(path, inode);
   }
 
   @Override
-  public synchronized void close() throws IOException {
-    if (closed) {
-      throw new IOException("Stream closed");
-    }
+    public synchronized void close() throws IOException {
+      if (closed) {
+        throw new IOException("Stream closed");
+      }
 
-    flush();
-    if (filePos == 0 || bytesWrittenToBlock != 0) {
-      endBlock();
-    }
+      flush();
+      if (filePos == 0 || bytesWrittenToBlock != 0) {
+        endBlock();
+      }
 
-    backupStream.close();
-    backupFile.delete();
+      backupStream.close();
+      backupFile.delete();
 
-    super.close();
+      super.close();
 
-    closed = true;
-  }
+      closed = true;
+    }
 
 }

Modified: lucene/hadoop/trunk/src/java/org/apache/hadoop/io/ObjectWritable.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/java/org/apache/hadoop/io/ObjectWritable.java?view=diff&rev=529756&r1=529755&r2=529756
==============================================================================
--- lucene/hadoop/trunk/src/java/org/apache/hadoop/io/ObjectWritable.java (original)
+++ lucene/hadoop/trunk/src/java/org/apache/hadoop/io/ObjectWritable.java Tue Apr 17 13:37:59 2007
@@ -169,7 +169,7 @@
   /** Read a {@link Writable}, {@link String}, primitive type, or an array of
    * the preceding. */
   @SuppressWarnings("unchecked")
-  public static Object readObject(DataInput in, ObjectWritable objectWritable, Configuration conf)
+    public static Object readObject(DataInput in, ObjectWritable objectWritable, Configuration conf)
     throws IOException {
     String className = UTF8.readString(in);
     Class<?> declaredClass = PRIMITIVE_NAMES.get(className);

Modified: lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/ClusterStatus.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/ClusterStatus.java?view=diff&rev=529756&r1=529755&r2=529756
==============================================================================
--- lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/ClusterStatus.java (original)
+++ lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/ClusterStatus.java Tue Apr 17 13:37:59 2007
@@ -20,7 +20,7 @@
        new WritableFactory() {
          public Writable newInstance() { return new ClusterStatus(); }
        });
-    }
+  }
 
   private int task_trackers;
   private int map_tasks;

Modified: lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/DefaultJobHistoryParser.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/DefaultJobHistoryParser.java?view=diff&rev=529756&r1=529755&r2=529756
==============================================================================
--- lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/DefaultJobHistoryParser.java (original)
+++ lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/DefaultJobHistoryParser.java Tue Apr 17 13:37:59 2007
@@ -20,7 +20,7 @@
    * @throws IOException
    */
   public static Map<String, Map<String, JobHistory.JobInfo>> parseMasterIndex(File historyFile)
-      throws IOException {
+    throws IOException {
     MasterIndexParseListener parser = new MasterIndexParseListener();
     JobHistory.parseHistory(historyFile, parser);
 
@@ -34,16 +34,16 @@
    * @throws IOException
    */
   public static void parseJobTasks(File jobHistoryFile, JobHistory.JobInfo job)
-      throws IOException {
+    throws IOException {
     JobHistory.parseHistory(jobHistoryFile, 
-        new JobTasksParseListener(job));
+                            new JobTasksParseListener(job));
   }
-/**
- * Listener for Job's history log file, it populates JobHistory.JobInfo 
- * object with data from log file. 
- */
+  /**
+   * Listener for Job's history log file, it populates JobHistory.JobInfo 
+   * object with data from log file. 
+   */
   static class JobTasksParseListener
-      implements JobHistory.Listener {
+    implements JobHistory.Listener {
     JobHistory.JobInfo job;
 
     JobTasksParseListener(JobHistory.JobInfo job) {
@@ -61,7 +61,7 @@
     }
 
     private JobHistory.MapAttempt getMapAttempt(
-        String jobid, String jobTrackerId, String taskId, String taskAttemptId) {
+                                                String jobid, String jobTrackerId, String taskId, String taskAttemptId) {
 
       JobHistory.Task task = getTask(taskId);
       JobHistory.MapAttempt mapAttempt = 
@@ -75,7 +75,7 @@
     }
 
     private JobHistory.ReduceAttempt getReduceAttempt(
-        String jobid, String jobTrackerId, String taskId, String taskAttemptId) {
+                                                      String jobid, String jobTrackerId, String taskId, String taskAttemptId) {
 
       JobHistory.Task task = getTask(taskId);
       JobHistory.ReduceAttempt reduceAttempt = 
@@ -90,7 +90,7 @@
 
     // JobHistory.Listener implementation 
     public void handle(JobHistory.RecordTypes recType, Map<Keys, String> values)
-        throws IOException {
+      throws IOException {
       String jobTrackerId = values.get(JobHistory.Keys.JOBTRACKERID);
       String jobid = values.get(Keys.JOBID);
       
@@ -119,7 +119,7 @@
    * 
    */
   static class MasterIndexParseListener
-      implements JobHistory.Listener {
+    implements JobHistory.Listener {
     Map<String, Map<String, JobHistory.JobInfo>> jobTrackerToJobs = new TreeMap<String, Map<String, JobHistory.JobInfo>>();
 
     Map<String, JobHistory.JobInfo> activeJobs = null;
@@ -128,7 +128,7 @@
     // Implement JobHistory.Listener
 
     public void handle(JobHistory.RecordTypes recType, Map<Keys, String> values)
-        throws IOException {
+      throws IOException {
  
       if (recType.equals(JobHistory.RecordTypes.Jobtracker)) {
         activeJobs = new TreeMap<String, JobHistory.JobInfo>();



Mime
View raw message