hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject svn commit: r685421 - in /hadoop/hbase/trunk: ./ src/java/org/apache/hadoop/hbase/ src/java/org/apache/hadoop/hbase/client/ src/java/org/apache/hadoop/hbase/regionserver/ src/test/org/apache/hadoop/hbase/ src/test/org/apache/hadoop/hbase/regionserver/ ...
Date Wed, 13 Aug 2008 02:33:09 GMT
Author: jimk
Date: Tue Aug 12 19:33:09 2008
New Revision: 685421

URL: http://svn.apache.org/viewvc?rev=685421&view=rev
Log:
HBASE-798  Add missing classes: UnknownRowLockException and RowLock which were present in
previous versions of the patches for this issue, but not in the version that was committed.
Also fix a number of compilation problems that were introduced by patch.

Added:
    hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/UnknownRowLockException.java
    hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/client/RowLock.java
Modified:
    hadoop/hbase/trunk/CHANGES.txt
    hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
    hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/AbstractMergeTestBase.java
    hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/HBaseTestCase.java
    hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/TestRegionRebalancing.java
    hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/TestScanMultipleVersions.java
    hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/regionserver/OOMERegionServer.java
    hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/regionserver/TestCompaction.java
    hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/regionserver/TestDeleteAll.java
    hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/regionserver/TestDeleteFamily.java
    hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/regionserver/TestGet2.java
    hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/util/TestMergeTool.java

Modified: hadoop/hbase/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/CHANGES.txt?rev=685421&r1=685420&r2=685421&view=diff
==============================================================================
--- hadoop/hbase/trunk/CHANGES.txt (original)
+++ hadoop/hbase/trunk/CHANGES.txt Tue Aug 12 19:33:09 2008
@@ -35,6 +35,10 @@
    HBASE-787  Postgresql to HBase table replication example (Tim Sell via Stack)
    HBASE-798  Provide Client API to explicitly lock and unlock rows (Jonathan
               Gray via Jim Kellerman)
+   HBASE-798  Add missing classes: UnknownRowLockException and RowLock which
+              were present in previous versions of the patches for this issue,
+              but not in the version that was committed. Also fix a number of
+              compilation problems that were introduced by patch.
 
   OPTIMIZATIONS
 

Added: hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/UnknownRowLockException.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/UnknownRowLockException.java?rev=685421&view=auto
==============================================================================
--- hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/UnknownRowLockException.java (added)
+++ hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/UnknownRowLockException.java Tue Aug
12 19:33:09 2008
@@ -0,0 +1,41 @@
+/**
+ * Copyright 2007 The Apache Software Foundation
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hadoop.hbase;
+
+
+/**
+ * Thrown if a region server is passed an unknown row lock id
+ */
+public class UnknownRowLockException extends DoNotRetryIOException {
+  private static final long serialVersionUID = 993179627856392526L;
+
+  /** constructor */
+  public UnknownRowLockException() {
+    super();
+  }
+
+  /**
+   * Constructor
+   * @param s message
+   */
+  public UnknownRowLockException(String s) {
+    super(s);
+  }
+}

Added: hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/client/RowLock.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/client/RowLock.java?rev=685421&view=auto
==============================================================================
--- hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/client/RowLock.java (added)
+++ hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/client/RowLock.java Tue Aug 12 19:33:09
2008
@@ -0,0 +1,62 @@
+/**
+ * Copyright 2008 The Apache Software Foundation
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hadoop.hbase.client;
+
+/**
+ * Holds row name and lock id.
+ */
+public class RowLock {
+  private byte [] row = null;
+  private long lockId = -1L;
+
+  /**
+   * Creates a RowLock from a row and lock id
+   * @param row
+   * @param lockId
+   */
+  public RowLock(final byte [] row, final long lockId) {
+    this.row = row;
+    this.lockId = lockId;
+  }
+  
+  /**
+   * Creates a RowLock with only a lock id
+   * @param lockId
+   */
+  public RowLock(final long lockId) {
+    this.lockId = lockId;
+  }
+
+  /**
+   * Get the row for this RowLock
+   * @return the row
+   */
+  public byte [] getRow() {
+    return row;
+  }
+
+  /**
+   * Get the lock id from this RowLock
+   * @return the lock id
+   */
+  public long getLockId() {
+    return lockId;
+  }
+}

Modified: hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java?rev=685421&r1=685420&r2=685421&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java (original)
+++ hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java Tue
Aug 12 19:33:09 2008
@@ -28,7 +28,6 @@
 import java.util.Collection;
 import java.util.Collections;
 import java.util.Comparator;
-import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Iterator;
 import java.util.LinkedList;

Modified: hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/AbstractMergeTestBase.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/AbstractMergeTestBase.java?rev=685421&r1=685420&r2=685421&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/AbstractMergeTestBase.java (original)
+++ hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/AbstractMergeTestBase.java Tue Aug
12 19:33:09 2008
@@ -123,7 +123,7 @@
           + String.format("%1$05d", i)));
 
       batchUpdate.put(COLUMN_NAME, value.get());
-      region.batchUpdate(batchUpdate);
+      region.batchUpdate(batchUpdate, null);
       if(i % 10000 == 0) {
         System.out.println("Flushing write #" + i);
         r.flushcache();

Modified: hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/HBaseTestCase.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/HBaseTestCase.java?rev=685421&r1=685420&r2=685421&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/HBaseTestCase.java (original)
+++ hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/HBaseTestCase.java Tue Aug 12 19:33:09
2008
@@ -401,13 +401,13 @@
     
     /** {@inheritDoc} */
     public void commit(BatchUpdate batchUpdate) throws IOException {
-      region.batchUpdate(batchUpdate);
+      region.batchUpdate(batchUpdate, null);
     };
     
     /** {@inheritDoc} */
     public void deleteAll(byte [] row, byte [] column, long ts)
     throws IOException {
-      this.region.deleteAll(row, column, ts);
+      this.region.deleteAll(row, column, ts, null);
     }
 
     /** {@inheritDoc} */
@@ -441,7 +441,7 @@
      * @throws IOException
      */
     public Map<byte [], Cell> getFull(byte [] row) throws IOException {
-      return region.getFull(row, null, HConstants.LATEST_TIMESTAMP);
+      return region.getFull(row, null, HConstants.LATEST_TIMESTAMP, null);
     }
 
     /** {@inheritDoc} */
@@ -569,7 +569,7 @@
   protected void assertCellEquals(final HRegion region, final byte [] row,
     final byte [] column, final long timestamp, final String value)
   throws IOException {
-    Map<byte [], Cell> result = region.getFull(row, null, timestamp);
+    Map<byte [], Cell> result = region.getFull(row, null, timestamp, null);
     Cell cell_value = result.get(column);
     if(value == null){
       assertEquals(column.toString() + " at timestamp " + timestamp, null, cell_value);

Modified: hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/TestRegionRebalancing.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/TestRegionRebalancing.java?rev=685421&r1=685420&r2=685421&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/TestRegionRebalancing.java (original)
+++ hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/TestRegionRebalancing.java Tue Aug
12 19:33:09 2008
@@ -216,7 +216,7 @@
     BatchUpdate bu = new BatchUpdate(keyToWrite);
     bu.put(COLUMN_NAME, "test".getBytes());
 
-    region.batchUpdate(bu);
+    region.batchUpdate(bu, null);
 
     region.close();
     region.getLog().closeAndDelete();

Modified: hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/TestScanMultipleVersions.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/TestScanMultipleVersions.java?rev=685421&r1=685420&r2=685421&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/TestScanMultipleVersions.java (original)
+++ hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/TestScanMultipleVersions.java Tue
Aug 12 19:33:09 2008
@@ -70,7 +70,7 @@
       for (int j = 0; j < TIMESTAMPS.length; j++) {
         BatchUpdate b = new BatchUpdate(ROWS[i], TIMESTAMPS[j]);
         b.put(HConstants.COLUMN_FAMILY, Bytes.toBytes(TIMESTAMPS[j]));
-        REGIONS[i].batchUpdate(b);
+        REGIONS[i].batchUpdate(b, null);
       }
       // Insert the region we created into the meta
       HRegion.addRegionToMETA(meta, REGIONS[i]);

Modified: hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/regionserver/OOMERegionServer.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/regionserver/OOMERegionServer.java?rev=685421&r1=685420&r2=685421&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/regionserver/OOMERegionServer.java
(original)
+++ hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/regionserver/OOMERegionServer.java
Tue Aug 12 19:33:09 2008
@@ -48,7 +48,7 @@
   
   public void batchUpdate(byte [] regionName, BatchUpdate b)
   throws IOException {
-    super.batchUpdate(regionName, b);
+    super.batchUpdate(regionName, b, -1L);
     for (int i = 0; i < 30; i++) {
       // Add the batch update 30 times to bring on the OOME faster.
       this.retainer.add(b);

Modified: hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/regionserver/TestCompaction.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/regionserver/TestCompaction.java?rev=685421&r1=685420&r2=685421&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/regionserver/TestCompaction.java (original)
+++ hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/regionserver/TestCompaction.java Tue
Aug 12 19:33:09 2008
@@ -127,7 +127,7 @@
     // the compaction threshold of 3 store files.  Compacting these store files
     // should result in a compacted store file that has no references to the
     // deleted row.
-    r.deleteAll(STARTROW, COLUMN_FAMILY_TEXT, System.currentTimeMillis());
+    r.deleteAll(STARTROW, COLUMN_FAMILY_TEXT, System.currentTimeMillis(),null);
     // Now, before compacting, remove all instances of the first row so can
     // verify that it is removed as we compact.
     // Assert all delted.

Modified: hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/regionserver/TestDeleteAll.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/regionserver/TestDeleteAll.java?rev=685421&r1=685420&r2=685421&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/regionserver/TestDeleteAll.java (original)
+++ hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/regionserver/TestDeleteAll.java Tue
Aug 12 19:33:09 2008
@@ -116,7 +116,7 @@
     if (flush) {region_incommon.flushcache();}
 
     // call delete all at a timestamp, make sure only the most recent stuff is left behind
-    region.deleteAll(row, t1);
+    region.deleteAll(row, t1, null);
     if (flush) {region_incommon.flushcache();}    
     assertCellEquals(region, row, colA, t0, cellData(0, flush));
     assertCellEquals(region, row, colA, t1, null);
@@ -126,7 +126,7 @@
     assertCellEquals(region, row, colD, t2, null);
 
     // call delete all w/o a timestamp, make sure nothing is left.
-    region.deleteAll(row, HConstants.LATEST_TIMESTAMP);
+    region.deleteAll(row, HConstants.LATEST_TIMESTAMP, null);
     if (flush) {region_incommon.flushcache();}    
     assertCellEquals(region, row, colA, t0, null);
     assertCellEquals(region, row, colA, t1, null);

Modified: hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/regionserver/TestDeleteFamily.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/regionserver/TestDeleteFamily.java?rev=685421&r1=685420&r2=685421&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/regionserver/TestDeleteFamily.java
(original)
+++ hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/regionserver/TestDeleteFamily.java
Tue Aug 12 19:33:09 2008
@@ -110,7 +110,7 @@
 
     // call delete family at a timestamp, make sure only the most recent stuff
     // for column c is left behind
-    region.deleteFamily(row, COLUMNS[0], t1);
+    region.deleteFamily(row, COLUMNS[0], t1, null);
     if (flush) {region_incommon.flushcache();}
     // most recent for A,B,C should be fine
     // A,B at older timestamps should be gone
@@ -127,7 +127,7 @@
 
     // call delete family w/o a timestamp, make sure nothing is left except for
     // column C.
-    region.deleteFamily(row, COLUMNS[0], HConstants.LATEST_TIMESTAMP);
+    region.deleteFamily(row, COLUMNS[0], HConstants.LATEST_TIMESTAMP, null);
     if (flush) {region_incommon.flushcache();}
     // A,B for latest timestamp should be gone
     // C should still be fine

Modified: hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/regionserver/TestGet2.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/regionserver/TestGet2.java?rev=685421&r1=685420&r2=685421&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/regionserver/TestGet2.java (original)
+++ hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/regionserver/TestGet2.java Tue Aug
12 19:33:09 2008
@@ -73,15 +73,15 @@
       
       batchUpdate = new BatchUpdate(T00);
       batchUpdate.put(COLUMNS[0], T00.getBytes());
-      region.batchUpdate(batchUpdate);
+      region.batchUpdate(batchUpdate, null);
       
       batchUpdate = new BatchUpdate(T10);
       batchUpdate.put(COLUMNS[0], T10.getBytes());
-      region.batchUpdate(batchUpdate);
+      region.batchUpdate(batchUpdate, null);
       
       batchUpdate = new BatchUpdate(T20);
       batchUpdate.put(COLUMNS[0], T20.getBytes());
-      region.batchUpdate(batchUpdate);
+      region.batchUpdate(batchUpdate, null);
       
       Map<byte [], Cell> results =
         region.getClosestRowBefore(Bytes.toBytes(T20));
@@ -89,21 +89,21 @@
       
       batchUpdate = new BatchUpdate(T20);
       batchUpdate.delete(COLUMNS[0]);
-      region.batchUpdate(batchUpdate);
+      region.batchUpdate(batchUpdate, null);
       
       results = region.getClosestRowBefore(Bytes.toBytes(T20));
       assertEquals(T10, new String(results.get(COLUMNS[0]).getValue()));
       
       batchUpdate = new BatchUpdate(T30);
       batchUpdate.put(COLUMNS[0], T30.getBytes());
-      region.batchUpdate(batchUpdate);
+      region.batchUpdate(batchUpdate, null);
       
       results = region.getClosestRowBefore(Bytes.toBytes(T30));
       assertEquals(T30, new String(results.get(COLUMNS[0]).getValue()));
       
       batchUpdate = new BatchUpdate(T30);
       batchUpdate.delete(COLUMNS[0]);
-      region.batchUpdate(batchUpdate);
+      region.batchUpdate(batchUpdate, null);
 
       results = region.getClosestRowBefore(Bytes.toBytes(T30));
       assertEquals(T10, new String(results.get(COLUMNS[0]).getValue()));
@@ -122,7 +122,7 @@
       // and answer of t20.
       batchUpdate = new BatchUpdate(T20);
       batchUpdate.put(COLUMNS[1], T20.getBytes());
-      region.batchUpdate(batchUpdate);
+      region.batchUpdate(batchUpdate, null);
       
       results = region.getClosestRowBefore(Bytes.toBytes(T30));
       assertEquals(T20, new String(results.get(COLUMNS[1]).getValue()));
@@ -138,7 +138,7 @@
       // in memory; make sure we get back t10 again.
       batchUpdate = new BatchUpdate(T20);
       batchUpdate.delete(COLUMNS[1]);
-      region.batchUpdate(batchUpdate);
+      region.batchUpdate(batchUpdate, null);
       results = region.getClosestRowBefore(Bytes.toBytes(T30));
       assertEquals(T10, new String(results.get(COLUMNS[0]).getValue()));
       
@@ -153,10 +153,10 @@
       // the candidate be in memory.
       batchUpdate = new BatchUpdate(T11);
       batchUpdate.put(COLUMNS[0], T11.getBytes());
-      region.batchUpdate(batchUpdate);
+      region.batchUpdate(batchUpdate, null);
       batchUpdate = new BatchUpdate(T10);
       batchUpdate.delete(COLUMNS[0]);
-      region.batchUpdate(batchUpdate);
+      region.batchUpdate(batchUpdate, null);
       results = region.getClosestRowBefore(Bytes.toBytes(T12));
       assertEquals(T11, new String(results.get(COLUMNS[0]).getValue()));
     } finally {
@@ -296,27 +296,27 @@
       
       batchUpdate = new BatchUpdate(t10);
       batchUpdate.put(COLUMNS[0], "t10 bytes".getBytes());
-      region.batchUpdate(batchUpdate);
+      region.batchUpdate(batchUpdate, null);
       
       batchUpdate = new BatchUpdate(t20);
       batchUpdate.put(COLUMNS[0], "t20 bytes".getBytes());
-      region.batchUpdate(batchUpdate);
+      region.batchUpdate(batchUpdate, null);
       
       batchUpdate = new BatchUpdate(t30);
       batchUpdate.put(COLUMNS[0], "t30 bytes".getBytes());
-      region.batchUpdate(batchUpdate);
+      region.batchUpdate(batchUpdate, null);
       
       batchUpdate = new BatchUpdate(t35);
       batchUpdate.put(COLUMNS[0], "t35 bytes".getBytes());
-      region.batchUpdate(batchUpdate);
+      region.batchUpdate(batchUpdate, null);
       
       batchUpdate = new BatchUpdate(t35);
       batchUpdate.delete(COLUMNS[0]);
-      region.batchUpdate(batchUpdate);
+      region.batchUpdate(batchUpdate, null);
       
       batchUpdate = new BatchUpdate(t40);
       batchUpdate.put(COLUMNS[0], "t40 bytes".getBytes());
-      region.batchUpdate(batchUpdate);
+      region.batchUpdate(batchUpdate, null);
       
       // try finding "015"
       String t15 = "015";
@@ -386,15 +386,15 @@
       
       batchUpdate = new BatchUpdate(t10);
       batchUpdate.put(COLUMNS[0], "t10 bytes".getBytes());
-      region.batchUpdate(batchUpdate);
+      region.batchUpdate(batchUpdate, null);
       
       batchUpdate = new BatchUpdate(t30);
       batchUpdate.put(COLUMNS[0], "t30 bytes".getBytes());
-      region.batchUpdate(batchUpdate);
+      region.batchUpdate(batchUpdate, null);
       
       batchUpdate = new BatchUpdate(t40);
       batchUpdate.put(COLUMNS[0], "t40 bytes".getBytes());
-      region.batchUpdate(batchUpdate);
+      region.batchUpdate(batchUpdate, null);
 
       // try finding "035"
       String t35 = "035";
@@ -410,7 +410,7 @@
 
       batchUpdate = new BatchUpdate(t20);
       batchUpdate.put(COLUMNS[0], "t20 bytes".getBytes());
-      region.batchUpdate(batchUpdate);
+      region.batchUpdate(batchUpdate, null);
       
       // try finding "035"
       results = region.getClosestRowBefore(Bytes.toBytes(t35));
@@ -450,7 +450,7 @@
       bu.put(COLUMNS[0], "column 0".getBytes());
       bu.put(COLUMNS[1], "column 1".getBytes());
       bu.put(COLUMNS[2], "column 2".getBytes());
-      region.batchUpdate(bu);
+      region.batchUpdate(bu, null);
       
       assertSpecifiedColumns(region, row);
       // try it again with a cache flush to involve the store, not just the 
@@ -483,25 +483,25 @@
 
     // make sure we get all of them with standard getFull
     Map<byte [], Cell> result = region.getFull(row, null, 
-      HConstants.LATEST_TIMESTAMP);
+      HConstants.LATEST_TIMESTAMP, null);
     assertEquals(new String(result.get(COLUMNS[0]).getValue()), "column 0");
     assertEquals(new String(result.get(COLUMNS[1]).getValue()), "column 1");
     assertEquals(new String(result.get(COLUMNS[2]).getValue()), "column 2");
           
     // try to get just one
-    result = region.getFull(row, one, HConstants.LATEST_TIMESTAMP);
+    result = region.getFull(row, one, HConstants.LATEST_TIMESTAMP, null);
     assertEquals(new String(result.get(COLUMNS[0]).getValue()), "column 0");
     assertNull(result.get(COLUMNS[1]));                                   
     assertNull(result.get(COLUMNS[2]));                                   
                                                                           
     // try to get all of them (specified)                                 
-    result = region.getFull(row, all, HConstants.LATEST_TIMESTAMP);       
+    result = region.getFull(row, all, HConstants.LATEST_TIMESTAMP, null);       
     assertEquals(new String(result.get(COLUMNS[0]).getValue()), "column 0");
     assertEquals(new String(result.get(COLUMNS[1]).getValue()), "column 1");
     assertEquals(new String(result.get(COLUMNS[2]).getValue()), "column 2");
     
     // try to get none with empty column set
-    result = region.getFull(row, none, HConstants.LATEST_TIMESTAMP);
+    result = region.getFull(row, none, HConstants.LATEST_TIMESTAMP, null);
     assertNull(result.get(COLUMNS[0]));
     assertNull(result.get(COLUMNS[1]));
     assertNull(result.get(COLUMNS[2]));    
@@ -526,25 +526,25 @@
       // write some data
       batchUpdate = new BatchUpdate(row);
       batchUpdate.put(COLUMNS[0], "olderValue".getBytes());
-      region.batchUpdate(batchUpdate);
+      region.batchUpdate(batchUpdate, null);
 
       // flush
       region.flushcache();
       
       // assert that getFull gives us the older value
-      results = region.getFull(row, (Set<byte []>)null, LATEST_TIMESTAMP);
+      results = region.getFull(row, (Set<byte []>)null, LATEST_TIMESTAMP, null);
       assertEquals("olderValue", new String(results.get(COLUMNS[0]).getValue()));
       
       // write a new value for the cell
       batchUpdate = new BatchUpdate(row);
       batchUpdate.put(COLUMNS[0], "newerValue".getBytes());
-      region.batchUpdate(batchUpdate);
+      region.batchUpdate(batchUpdate, null);
       
       // flush
       region.flushcache();
       
       // assert that getFull gives us the later value
-      results = region.getFull(row, (Set<byte []>)null, LATEST_TIMESTAMP);
+      results = region.getFull(row, (Set<byte []>)null, LATEST_TIMESTAMP, null);
       assertEquals("newerValue", new String(results.get(COLUMNS[0]).getValue()));
      
       //
@@ -559,13 +559,13 @@
       batchUpdate = new BatchUpdate(row2);
       batchUpdate.put(cell1, "column0 value".getBytes());
       batchUpdate.put(cell2, "column1 value".getBytes());
-      region.batchUpdate(batchUpdate);
+      region.batchUpdate(batchUpdate, null);
       
       // flush
       region.flushcache();
       
       // assert i get both columns
-      results = region.getFull(row2, (Set<byte []>)null, LATEST_TIMESTAMP);
+      results = region.getFull(row2, (Set<byte []>)null, LATEST_TIMESTAMP, null);
       assertEquals("Should have two columns in the results map", 2, results.size());
       assertEquals("column0 value", new String(results.get(cell1).getValue()));
       assertEquals("column1 value", new String(results.get(cell2).getValue()));
@@ -574,13 +574,13 @@
       batchUpdate = new BatchUpdate(row2);
       batchUpdate.delete(cell1);
       batchUpdate.put(cell2, "column1 new value".getBytes());      
-      region.batchUpdate(batchUpdate);
+      region.batchUpdate(batchUpdate, null);
             
       // flush
       region.flushcache(); 
       
       // assert i get the second column only
-      results = region.getFull(row2, (Set<byte []>)null, LATEST_TIMESTAMP);
+      results = region.getFull(row2, (Set<byte []>)null, LATEST_TIMESTAMP, null);
       assertEquals("Should have one column in the results map", 1, results.size());
       assertNull("column0 value", results.get(cell1));
       assertEquals("column1 new value", new String(results.get(cell2).getValue()));
@@ -591,10 +591,10 @@
       batchUpdate = new BatchUpdate(row2);
       batchUpdate.delete(cell2);      
       batchUpdate.put(cell3, "column2 value!".getBytes());
-      region.batchUpdate(batchUpdate);
+      region.batchUpdate(batchUpdate, null);
       
       // assert i get the third column only
-      results = region.getFull(row2, (Set<byte []>)null, LATEST_TIMESTAMP);
+      results = region.getFull(row2, (Set<byte []>)null, LATEST_TIMESTAMP, null);
       assertEquals("Should have one column in the results map", 1, results.size());
       assertNull("column0 value", results.get(cell1));
       assertNull("column1 value", results.get(cell2));
@@ -614,7 +614,8 @@
   
   private void assertColumnsPresent(final HRegion r, final byte [] row)
   throws IOException {
-    Map<byte [], Cell> result = r.getFull(row, null, HConstants.LATEST_TIMESTAMP);
+    Map<byte [], Cell> result = 
+      r.getFull(row, null, HConstants.LATEST_TIMESTAMP, null);
     int columnCount = 0;
     for (Map.Entry<byte [], Cell> e: result.entrySet()) {
       columnCount++;

Modified: hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/util/TestMergeTool.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/util/TestMergeTool.java?rev=685421&r1=685420&r2=685421&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/util/TestMergeTool.java (original)
+++ hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/util/TestMergeTool.java Tue Aug 12
19:33:09 2008
@@ -125,7 +125,7 @@
           byte [] row = rows[i][j];
           BatchUpdate b = new BatchUpdate(row);
           b.put(COLUMN_NAME, new ImmutableBytesWritable(row).get());
-          regions[i].batchUpdate(b);
+          regions[i].batchUpdate(b, null);
         }
         HRegion.addRegionToMETA(meta, regions[i]);
       }



Mime
View raw message