hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apurt...@apache.org
Subject svn commit: r730492 [3/3] - in /hadoop/hbase/branches/0.19_on_hadoop_0.18: ./ src/java/org/apache/hadoop/hbase/ src/java/org/apache/hadoop/hbase/client/ src/java/org/apache/hadoop/hbase/io/ src/java/org/apache/hadoop/hbase/ipc/ src/java/org/apache/hado...
Date Thu, 01 Jan 2009 00:13:06 GMT
Modified: hadoop/hbase/branches/0.19_on_hadoop_0.18/src/java/org/apache/hadoop/hbase/ipc/HBaseRPCProtocolVersion.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/branches/0.19_on_hadoop_0.18/src/java/org/apache/hadoop/hbase/ipc/HBaseRPCProtocolVersion.java?rev=730492&r1=730491&r2=730492&view=diff
==============================================================================
--- hadoop/hbase/branches/0.19_on_hadoop_0.18/src/java/org/apache/hadoop/hbase/ipc/HBaseRPCProtocolVersion.java
(original)
+++ hadoop/hbase/branches/0.19_on_hadoop_0.18/src/java/org/apache/hadoop/hbase/ipc/HBaseRPCProtocolVersion.java
Wed Dec 31 16:13:06 2008
@@ -64,7 +64,8 @@
    * <li>Version 12: HServerLoad extensions (HBASE-1018).</li>
    * <li>Version 13: HBASE-847</li>
    * <li>Version 14: HBASE-900</li>
+   * <li>Version 15: HRegionInterface.exists</li>
    * </ul>
    */
-  public static final long versionID = 14L;
+  public static final long versionID = 15L;
 }

Modified: hadoop/hbase/branches/0.19_on_hadoop_0.18/src/java/org/apache/hadoop/hbase/ipc/HRegionInterface.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/branches/0.19_on_hadoop_0.18/src/java/org/apache/hadoop/hbase/ipc/HRegionInterface.java?rev=730492&r1=730491&r2=730492&view=diff
==============================================================================
--- hadoop/hbase/branches/0.19_on_hadoop_0.18/src/java/org/apache/hadoop/hbase/ipc/HRegionInterface.java
(original)
+++ hadoop/hbase/branches/0.19_on_hadoop_0.18/src/java/org/apache/hadoop/hbase/ipc/HRegionInterface.java
Wed Dec 31 16:13:06 2008
@@ -191,7 +191,21 @@
     long timestamp, long lockId) 
   throws IOException;
 
-  
+  /**
+   * Returns true if any cells exist for the given coordinate.
+   * 
+   * @param regionName The name of the region
+   * @param row The row
+   * @param column The column, or null for any
+   * @param timestamp The timestamp, or LATEST_TIMESTAMP for any
+   * @param lockId lock id
+   * @return true if the row exists, false otherwise
+   * @throws IOException
+   */
+  public boolean exists(byte [] regionName, byte [] row, byte [] column, 
+    long timestamp, long lockID)
+  throws IOException;
+
   //
   // remote scanner interface
   //

Modified: hadoop/hbase/branches/0.19_on_hadoop_0.18/src/java/org/apache/hadoop/hbase/master/ChangeTableState.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/branches/0.19_on_hadoop_0.18/src/java/org/apache/hadoop/hbase/master/ChangeTableState.java?rev=730492&r1=730491&r2=730492&view=diff
==============================================================================
--- hadoop/hbase/branches/0.19_on_hadoop_0.18/src/java/org/apache/hadoop/hbase/master/ChangeTableState.java
(original)
+++ hadoop/hbase/branches/0.19_on_hadoop_0.18/src/java/org/apache/hadoop/hbase/master/ChangeTableState.java
Wed Dec 31 16:13:06 2008
@@ -116,7 +116,6 @@
         }
 
         // Cause regions being served to be taken off-line and disabled
-
         for (HRegionInfo i: e.getValue()) {
           if (LOG.isDebugEnabled()) {
             LOG.debug("adding region " + i.getRegionNameAsString() + " to kill list");

Modified: hadoop/hbase/branches/0.19_on_hadoop_0.18/src/java/org/apache/hadoop/hbase/master/HMaster.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/branches/0.19_on_hadoop_0.18/src/java/org/apache/hadoop/hbase/master/HMaster.java?rev=730492&r1=730491&r2=730492&view=diff
==============================================================================
--- hadoop/hbase/branches/0.19_on_hadoop_0.18/src/java/org/apache/hadoop/hbase/master/HMaster.java
(original)
+++ hadoop/hbase/branches/0.19_on_hadoop_0.18/src/java/org/apache/hadoop/hbase/master/HMaster.java
Wed Dec 31 16:13:06 2008
@@ -420,7 +420,7 @@
     
     try {
       if (LOG.isDebugEnabled()) {
-        LOG.debug("Main processing loop: " + op.toString());
+        LOG.debug("Processing todo: " + op.toString());
       }
       
       // perform the operation. 
@@ -792,6 +792,7 @@
       LOG.info("modifyTable(SET_HTD): " + htd);
       new ModifyTableMeta(this, tableName, htd).process();
       break;
+
     case MODIFY_TABLE_SPLIT:
     case MODIFY_TABLE_COMPACT:
       if (args != null && args.length > 0) {
@@ -833,7 +834,7 @@
       LOG.info("Marking " + hri.getRegionNameAsString() +
         " as closed on " + servername + "; cleaning SERVER + STARTCODE; " +
           "master will tell regionserver to close region on next heartbeat");
-      this.regionManager.setClosing(servername, hri, false);
+      this.regionManager.setClosing(servername, hri, hri.isOffline(), false);
       MetaRegion meta = this.regionManager.getMetaRegionForRow(regionname);
       HRegionInterface srvr = getMETAServer(meta);
       HRegion.cleanRegionInMETA(srvr, meta.getRegionName(), hri);

Modified: hadoop/hbase/branches/0.19_on_hadoop_0.18/src/java/org/apache/hadoop/hbase/master/RegionManager.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/branches/0.19_on_hadoop_0.18/src/java/org/apache/hadoop/hbase/master/RegionManager.java?rev=730492&r1=730491&r2=730492&view=diff
==============================================================================
--- hadoop/hbase/branches/0.19_on_hadoop_0.18/src/java/org/apache/hadoop/hbase/master/RegionManager.java
(original)
+++ hadoop/hbase/branches/0.19_on_hadoop_0.18/src/java/org/apache/hadoop/hbase/master/RegionManager.java
Wed Dec 31 16:13:06 2008
@@ -405,12 +405,10 @@
   private void unassignSomeRegions(final String serverName,
       final HServerLoad load, final double avgLoad,
       final HRegionInfo[] mostLoadedRegions, ArrayList<HMsg> returnMsgs) {
-    
     int numRegionsToClose = load.getNumberOfRegions() - (int)Math.ceil(avgLoad);
     LOG.debug("Choosing to reassign " + numRegionsToClose 
       + " regions. mostLoadedRegions has " + mostLoadedRegions.length 
       + " regions in it.");
-    
     int regionIdx = 0;
     int regionsClosed = 0;
     int skipped = 0;
@@ -422,14 +420,12 @@
       if (currentRegion.isRootRegion() || currentRegion.isMetaTable()) {
         continue;
       }
-      
       byte[] regionName = currentRegion.getRegionName();
       if (isClosing(regionName) || isUnassigned(currentRegion) ||
           isAssigned(regionName) || isPending(regionName)) {
         skipped++;
         continue;
       }
-      
       LOG.debug("Going to close region " +
         currentRegion.getRegionNameAsString());
       // make a message to close the region
@@ -788,21 +784,33 @@
    * @param regionInfo
    * @param setOffline
    */
-  public void setClosing(String serverName, HRegionInfo regionInfo,
-      boolean setOffline) {
-    synchronized (regionsInTransition) {
-      RegionState s = regionsInTransition.get(regionInfo.getRegionName());
-      if (s != null) {
+  public void setClosing(final String serverName, final HRegionInfo regionInfo,
+      final boolean setOffline) {
+    setClosing(serverName, regionInfo, setOffline, true);
+  }
+
+  /**
+   * Mark a region as closing 
+   * @param serverName
+   * @param regionInfo
+   * @param setOffline
+   * @param check False if we are to skip state transition check.
+   */
+  void setClosing(final String serverName, final HRegionInfo regionInfo,
+      final boolean setOffline, final boolean check) {
+    synchronized (this.regionsInTransition) {
+      RegionState s = this.regionsInTransition.get(regionInfo.getRegionName());
+      if (check && s != null) {
         if (!s.isClosing()) {
           throw new IllegalStateException(
-              "Cannot transition to closing from any other state. Region: " +
-              Bytes.toString(regionInfo.getRegionName()));
+            "Cannot transition to closing from any other state. Region: " +
+            Bytes.toString(regionInfo.getRegionName()));
         }
         return;
       }
       s = new RegionState(regionInfo);
-      regionsInTransition.put(regionInfo.getRegionName(), s);
       s.setClosing(serverName, setOffline);
+      this.regionsInTransition.put(regionInfo.getRegionName(), s);
     }
   }
   
@@ -1004,18 +1012,23 @@
     }
   }
   
+  /*
+   * State of a Region.
+   * Used while regions are making transitions from unassigned to assigned to
+   * opened, etc.
+   */
   private static class RegionState implements Comparable<RegionState> {
-    private final byte[] regionName;
+    private final byte [] regionName;
     private HRegionInfo regionInfo = null;
-    private boolean unassigned = false;
-    private boolean assigned = false;
-    private boolean pending = false;
-    private boolean closing = false;
-    private boolean closed = false;
-    private boolean offlined = false;
+    private volatile boolean unassigned = false;
+    private volatile boolean assigned = false;
+    private volatile boolean pending = false;
+    private volatile boolean closing = false;
+    private volatile boolean closed = false;
+    private volatile boolean offlined = false;
     private String serverName = null;
     
-    RegionState(byte[] regionName) {
+    RegionState(byte [] regionName) {
       this.regionName = regionName;
     }
     
@@ -1060,8 +1073,8 @@
     synchronized void setAssigned(String serverName) {
       if (!this.unassigned) {
         throw new IllegalStateException(
-            "Cannot assign a region that is not currently unassigned. Region: " +
-            Bytes.toString(regionName));
+            "Cannot assign a region that is not currently unassigned. " +
+            "State: " + toString());
       }
       this.unassigned = false;
       this.assigned = true;
@@ -1077,8 +1090,8 @@
     synchronized void setPending() {
       if (!assigned) {
         throw new IllegalStateException(
-            "Cannot set a region as pending if it has not been assigned. Region: " +
-            Bytes.toString(regionName));
+            "Cannot set a region as pending if it has not been assigned. " +
+            "State: " + toString());
       }
       this.unassigned = false;
       this.assigned = false;
@@ -1107,8 +1120,9 @@
       if (!closing) {
         throw new IllegalStateException(
             "Cannot set a region to be closed if it was not already marked as" +
-            " closing. Region: " + Bytes.toString(regionName));
+            " closing. State: " + toString());
       }
+      this.closing = false;
       this.closed = true;
     }
     
@@ -1118,10 +1132,10 @@
 
     @Override
     public synchronized String toString() {
-      return "region name: " + Bytes.toString(this.regionName) +
-          ", isUnassigned: " + this.unassigned + ", isAssigned: " +
-          this.assigned + ", isPending: " + this.pending + ", isClosing: " +
-          this.closing + ", isClosed: " + this.closed + ", isOfflined: " +
+      return "name=" + Bytes.toString(this.regionName) +
+          ", isUnassigned=" + this.unassigned + ", isAssigned=" +
+          this.assigned + ", isPending=" + this.pending + ", isClosing=" +
+          this.closing + ", isClosed=" + this.closed + ", isOfflined=" +
           this.offlined;
     }
     
@@ -1143,4 +1157,4 @@
       return Bytes.compareTo(this.regionName, o.getRegionName());
     }
   }
-}
+}
\ No newline at end of file

Modified: hadoop/hbase/branches/0.19_on_hadoop_0.18/src/java/org/apache/hadoop/hbase/regionserver/HRegion.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/branches/0.19_on_hadoop_0.18/src/java/org/apache/hadoop/hbase/regionserver/HRegion.java?rev=730492&r1=730491&r2=730492&view=diff
==============================================================================
--- hadoop/hbase/branches/0.19_on_hadoop_0.18/src/java/org/apache/hadoop/hbase/regionserver/HRegion.java
(original)
+++ hadoop/hbase/branches/0.19_on_hadoop_0.18/src/java/org/apache/hadoop/hbase/regionserver/HRegion.java
Wed Dec 31 16:13:06 2008
@@ -1501,7 +1501,36 @@
       update(edits);
     }
   }
-    
+
+  /**
+   * Tests for the existence of any cells for a given coordinate.
+   * 
+   * @param row the row
+   * @param column the column, or null
+   * @param timestamp the timestamp, or HConstants.LATEST_VERSION for any
+   * @param lockid the existing lock, or null 
+   * @return true if cells exist for the row, false otherwise
+   * @throws IOException
+   */
+  public boolean exists(final byte[] row, final byte[] column, 
+    final long timestamp, final Integer lockid) 
+  throws IOException {
+    checkRow(row);
+    Integer lid = getLock(lockid, row);
+    try {
+      HStoreKey origin;
+      if (column != null) {
+        origin = new HStoreKey(row, column, timestamp);
+      } else {
+        origin = new HStoreKey(row, timestamp);
+      }
+      return !getKeys(origin, 1).isEmpty();
+    } finally {
+      if (lockid == null)
+        releaseRowLock(lid);
+    }
+  }
+
   /**
    * @throws IOException Throws exception if region is in read-only mode.
    */

Modified: hadoop/hbase/branches/0.19_on_hadoop_0.18/src/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/branches/0.19_on_hadoop_0.18/src/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java?rev=730492&r1=730491&r2=730492&view=diff
==============================================================================
--- hadoop/hbase/branches/0.19_on_hadoop_0.18/src/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
(original)
+++ hadoop/hbase/branches/0.19_on_hadoop_0.18/src/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
Wed Dec 31 16:13:06 2008
@@ -1774,6 +1774,13 @@
         getLockFromId(lockId));
   }
 
+  public boolean exists(byte[] regionName, byte[] row, byte[] column,
+      long timestamp, long lockId)
+  throws IOException {
+    return getRegion(regionName).exists(row, column, timestamp, 
+      getLockFromId(lockId));
+  }
+
   public long lockRow(byte [] regionName, byte [] row)
   throws IOException {
     checkOpen();

Modified: hadoop/hbase/branches/0.19_on_hadoop_0.18/src/java/org/apache/hadoop/hbase/regionserver/HStore.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/branches/0.19_on_hadoop_0.18/src/java/org/apache/hadoop/hbase/regionserver/HStore.java?rev=730492&r1=730491&r2=730492&view=diff
==============================================================================
--- hadoop/hbase/branches/0.19_on_hadoop_0.18/src/java/org/apache/hadoop/hbase/regionserver/HStore.java
(original)
+++ hadoop/hbase/branches/0.19_on_hadoop_0.18/src/java/org/apache/hadoop/hbase/regionserver/HStore.java
Wed Dec 31 16:13:06 2008
@@ -33,6 +33,7 @@
 import java.util.Set;
 import java.util.SortedMap;
 import java.util.TreeMap;
+import java.util.concurrent.CopyOnWriteArraySet;
 import java.util.concurrent.locks.ReentrantReadWriteLock;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
@@ -56,8 +57,8 @@
 import org.apache.hadoop.hbase.io.Reference;
 import org.apache.hadoop.hbase.util.Bytes;
 import org.apache.hadoop.hbase.util.FSUtils;
-import org.apache.hadoop.io.MapFile;
-import org.apache.hadoop.io.SequenceFile;
+import org.apache.hadoop.hbase.io.MapFile;
+import org.apache.hadoop.hbase.io.SequenceFile;
 import org.apache.hadoop.util.Progressable;
 import org.apache.hadoop.util.StringUtils;
 
@@ -124,8 +125,8 @@
   private final int compactionThreshold;
   
   // All access must be synchronized.
-  private final Set<ChangedReadersObserver> changedReaderObservers =
-    new HashSet<ChangedReadersObserver>();
+  private final CopyOnWriteArraySet<ChangedReadersObserver> changedReaderObservers
=
+    new CopyOnWriteArraySet<ChangedReadersObserver>();
 
   /**
    * An HStore is a set of zero or more MapFiles, which stretch backwards over 
@@ -456,14 +457,15 @@
           "Cleaned up info file.  Continuing...Probable DATA LOSS!!!");
         continue;
       }
-      if (isEmptyDataFile(mapfile)) {
+      // References don't have data or index components under mapfile.
+      if (!isReference && isEmptyDataFile(mapfile)) {
         curfile.delete();
         // We can have empty data file if data loss in hdfs.
         LOG.warn("Mapfile " + mapfile.toString() + " has empty data. " +
           "Deleting.  Continuing...Probable DATA LOSS!!!  See HBASE-646.");
         continue;
       }
-      if (isEmptyIndexFile(mapfile)) {
+      if (!isReference && isEmptyIndexFile(mapfile)) {
         try {
           // Try fixing this file.. if we can.  Use the hbase version of fix.
           // Need to remove the old index file first else fix won't go ahead.
@@ -551,15 +553,14 @@
   }
 
   /* 
-   * @param mapfile
-   * @return True if the passed mapfile has a zero-length index component (its
+   * @param f
+   * @return True if the passed file does not exist or is zero-length (its
    * broken).
    * @throws IOException
    */
   private boolean isEmptyFile(final Path f)
   throws IOException {
-    return this.fs.exists(f) &&
-      this.fs.getFileStatus(f).getLen() == 0;
+    return !this.fs.exists(f) || this.fs.getFileStatus(f).getLen() == 0;
   }
 
   /**
@@ -726,36 +727,30 @@
       this.lock.writeLock().unlock();
     }
   }
-  
+
   /*
    * Notify all observers that set of Readers has changed.
    * @throws IOException
    */
   private void notifyChangedReadersObservers() throws IOException {
-    synchronized (this.changedReaderObservers) {
-      for (ChangedReadersObserver o: this.changedReaderObservers) {
-        o.updateReaders();
-      }
+    for (ChangedReadersObserver o: this.changedReaderObservers) {
+      o.updateReaders();
     }
   }
-  
+
   /*
    * @param o Observer who wants to know about changes in set of Readers
    */
   void addChangedReaderObserver(ChangedReadersObserver o) {
-    synchronized(this.changedReaderObservers) {
-      this.changedReaderObservers.add(o);
-    }
+    this.changedReaderObservers.add(o);
   }
   
   /*
    * @param o Observer no longer interested in changes in set of Readers.
    */
   void deleteChangedReaderObserver(ChangedReadersObserver o) {
-    synchronized (this.changedReaderObservers) {
-      if (!this.changedReaderObservers.remove(o)) {
-        LOG.warn("Not in set" + o);
-      }
+    if (!this.changedReaderObservers.remove(o)) {
+      LOG.warn("Not in set" + o);
     }
   }
 
@@ -866,6 +861,10 @@
       for (int i = 0; i < countOfFiles; i++) {
         HStoreFile file = filesToCompact.get(i);
         Path path = file.getMapFilePath();
+        if (path == null) {
+          LOG.warn("Path is null for " + file);
+          return null;
+        }
         int len = 0;
         for (FileStatus fstatus:fs.listStatus(path)) {
           len += fstatus.getLen();

Modified: hadoop/hbase/branches/0.19_on_hadoop_0.18/src/java/org/apache/hadoop/hbase/regionserver/HStoreFile.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/branches/0.19_on_hadoop_0.18/src/java/org/apache/hadoop/hbase/regionserver/HStoreFile.java?rev=730492&r1=730491&r2=730492&view=diff
==============================================================================
--- hadoop/hbase/branches/0.19_on_hadoop_0.18/src/java/org/apache/hadoop/hbase/regionserver/HStoreFile.java
(original)
+++ hadoop/hbase/branches/0.19_on_hadoop_0.18/src/java/org/apache/hadoop/hbase/regionserver/HStoreFile.java
Wed Dec 31 16:13:06 2008
@@ -37,8 +37,8 @@
 import org.apache.hadoop.hbase.io.HalfMapFileReader;
 import org.apache.hadoop.hbase.io.Reference;
 import org.apache.hadoop.hbase.util.Bytes;
-import org.apache.hadoop.io.MapFile;
-import org.apache.hadoop.io.SequenceFile;
+import org.apache.hadoop.hbase.io.MapFile;
+import org.apache.hadoop.hbase.io.SequenceFile;
 
 /**
  * A HStore data file.  HStores usually have one or more of these files.  They

Modified: hadoop/hbase/branches/0.19_on_hadoop_0.18/src/java/org/apache/hadoop/hbase/regionserver/HStoreScanner.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/branches/0.19_on_hadoop_0.18/src/java/org/apache/hadoop/hbase/regionserver/HStoreScanner.java?rev=730492&r1=730491&r2=730492&view=diff
==============================================================================
--- hadoop/hbase/branches/0.19_on_hadoop_0.18/src/java/org/apache/hadoop/hbase/regionserver/HStoreScanner.java
(original)
+++ hadoop/hbase/branches/0.19_on_hadoop_0.18/src/java/org/apache/hadoop/hbase/regionserver/HStoreScanner.java
Wed Dec 31 16:13:06 2008
@@ -35,7 +35,7 @@
 import org.apache.hadoop.hbase.filter.RowFilterInterface;
 import org.apache.hadoop.hbase.io.Cell;
 import org.apache.hadoop.hbase.util.Bytes;
-import org.apache.hadoop.io.MapFile;
+import org.apache.hadoop.hbase.io.MapFile;
 
 /**
  * Scanner scans both the memcache and the HStore

Modified: hadoop/hbase/branches/0.19_on_hadoop_0.18/src/java/org/apache/hadoop/hbase/regionserver/StoreFileScanner.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/branches/0.19_on_hadoop_0.18/src/java/org/apache/hadoop/hbase/regionserver/StoreFileScanner.java?rev=730492&r1=730491&r2=730492&view=diff
==============================================================================
--- hadoop/hbase/branches/0.19_on_hadoop_0.18/src/java/org/apache/hadoop/hbase/regionserver/StoreFileScanner.java
(original)
+++ hadoop/hbase/branches/0.19_on_hadoop_0.18/src/java/org/apache/hadoop/hbase/regionserver/StoreFileScanner.java
Wed Dec 31 16:13:06 2008
@@ -29,7 +29,7 @@
 import org.apache.hadoop.hbase.io.ImmutableBytesWritable;
 import org.apache.hadoop.hbase.io.Cell;
 import org.apache.hadoop.hbase.util.Bytes;
-import org.apache.hadoop.io.MapFile;
+import org.apache.hadoop.hbase.io.MapFile;
 
 /**
  * A scanner that iterates through HStore files

Modified: hadoop/hbase/branches/0.19_on_hadoop_0.18/src/test/hbase-site.xml
URL: http://svn.apache.org/viewvc/hadoop/hbase/branches/0.19_on_hadoop_0.18/src/test/hbase-site.xml?rev=730492&r1=730491&r2=730492&view=diff
==============================================================================
--- hadoop/hbase/branches/0.19_on_hadoop_0.18/src/test/hbase-site.xml (original)
+++ hadoop/hbase/branches/0.19_on_hadoop_0.18/src/test/hbase-site.xml Wed Dec 31 16:13:06
2008
@@ -109,6 +109,13 @@
   </property>
   <property>
     <name>hadoop.log.dir</name>
-    <value>${user.dir}/logs</value>
+    <value>${user.dir}/../logs</value>
+  </property>
+  <property>
+    <name>hbase.regionserver.safemode.period</name>
+    <value>0</value>
+    <description>Time to wait on regionserver startup before beginning
+    compactions and memcache flushes.
+    </description>
   </property>
 </configuration>

Modified: hadoop/hbase/branches/0.19_on_hadoop_0.18/src/test/org/apache/hadoop/hbase/MapFilePerformanceEvaluation.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/branches/0.19_on_hadoop_0.18/src/test/org/apache/hadoop/hbase/MapFilePerformanceEvaluation.java?rev=730492&r1=730491&r2=730492&view=diff
==============================================================================
--- hadoop/hbase/branches/0.19_on_hadoop_0.18/src/test/org/apache/hadoop/hbase/MapFilePerformanceEvaluation.java
(original)
+++ hadoop/hbase/branches/0.19_on_hadoop_0.18/src/test/org/apache/hadoop/hbase/MapFilePerformanceEvaluation.java
Wed Dec 31 16:13:06 2008
@@ -29,7 +29,7 @@
 import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.hbase.io.ImmutableBytesWritable;
 import org.apache.hadoop.hbase.util.Bytes;
-import org.apache.hadoop.io.MapFile;
+import org.apache.hadoop.hbase.io.MapFile;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 

Modified: hadoop/hbase/branches/0.19_on_hadoop_0.18/src/test/org/apache/hadoop/hbase/client/TestForceSplit.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/branches/0.19_on_hadoop_0.18/src/test/org/apache/hadoop/hbase/client/TestForceSplit.java?rev=730492&r1=730491&r2=730492&view=diff
==============================================================================
--- hadoop/hbase/branches/0.19_on_hadoop_0.18/src/test/org/apache/hadoop/hbase/client/TestForceSplit.java
(original)
+++ hadoop/hbase/branches/0.19_on_hadoop_0.18/src/test/org/apache/hadoop/hbase/client/TestForceSplit.java
Wed Dec 31 16:13:06 2008
@@ -38,7 +38,6 @@
   private static final byte[] tableName = Bytes.toBytes("test");
   private static final byte[] columnName = Bytes.toBytes("a:");
   private static final byte[] key_mmi = Bytes.toBytes("mmi");
-  private static final byte[] key_ssm = Bytes.toBytes("ssm");
 
   protected void setUp() throws Exception {
     super.setUp();
@@ -96,29 +95,5 @@
       if (Bytes.equals(end, key_mmi))
         assertTrue(Bytes.equals(start, HConstants.EMPTY_BYTE_ARRAY));
     }
-
-    // tell the master to split the table again, the second half
-    admin.modifyTable(tableName, HConstants.MODIFY_TABLE_SPLIT, key_mmi);
-
-    // give some time for the split to happen
-    Thread.sleep(15 * 1000);
-
-    // check again
-    table = new HTable(conf, tableName);
-    m = table.getRegionsInfo();
-    System.out.println("Regions after split (" + m.size() + "): " + m);
-    // should have three regions now
-    assertTrue(m.size() == 3);
-    // and "mmi" and "ssm" should be the midpoints
-    for (HRegionInfo hri: m.keySet()) {
-      byte[] start = hri.getStartKey();
-      byte[] end = hri.getEndKey();
-      if (Bytes.equals(start, HConstants.EMPTY_BYTE_ARRAY))
-        assertTrue(Bytes.equals(end, key_mmi));
-      if (Bytes.equals(start, key_mmi))
-        assertTrue(Bytes.equals(end, key_ssm));
-      if (Bytes.equals(start, key_ssm))
-        assertTrue(Bytes.equals(end, HConstants.EMPTY_BYTE_ARRAY));
-    }
   }
 }

Modified: hadoop/hbase/branches/0.19_on_hadoop_0.18/src/test/org/apache/hadoop/hbase/client/TestHTable.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/branches/0.19_on_hadoop_0.18/src/test/org/apache/hadoop/hbase/client/TestHTable.java?rev=730492&r1=730491&r2=730492&view=diff
==============================================================================
--- hadoop/hbase/branches/0.19_on_hadoop_0.18/src/test/org/apache/hadoop/hbase/client/TestHTable.java
(original)
+++ hadoop/hbase/branches/0.19_on_hadoop_0.18/src/test/org/apache/hadoop/hbase/client/TestHTable.java
Wed Dec 31 16:13:06 2008
@@ -228,7 +228,11 @@
         batchUpdate.put(COLUMN_FAMILY_STR+i, Bytes.toBytes(i));
       
       table.commit(batchUpdate);
-      
+
+      assertTrue(table.exists(row));
+      for(int i = 0; i < 5; i++)
+        assertTrue(table.exists(row, Bytes.toBytes(COLUMN_FAMILY_STR+i)));
+
       RowResult result = null;
       result = table.getRow(row,  new byte[][] {COLUMN_FAMILY});
       for(int i = 0; i < 5; i++)

Modified: hadoop/hbase/branches/0.19_on_hadoop_0.18/src/test/org/apache/hadoop/hbase/regionserver/TestCompaction.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/branches/0.19_on_hadoop_0.18/src/test/org/apache/hadoop/hbase/regionserver/TestCompaction.java?rev=730492&r1=730491&r2=730492&view=diff
==============================================================================
--- hadoop/hbase/branches/0.19_on_hadoop_0.18/src/test/org/apache/hadoop/hbase/regionserver/TestCompaction.java
(original)
+++ hadoop/hbase/branches/0.19_on_hadoop_0.18/src/test/org/apache/hadoop/hbase/regionserver/TestCompaction.java
Wed Dec 31 16:13:06 2008
@@ -26,9 +26,8 @@
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.hadoop.hbase.HBaseTestCase;
-import org.apache.hadoop.io.MapFile;
+import org.apache.hadoop.hbase.io.MapFile;
 
-import org.apache.hadoop.hbase.HColumnDescriptor;
 import org.apache.hadoop.hbase.HConstants;
 import org.apache.hadoop.hbase.HStoreKey;
 import org.apache.hadoop.hbase.HTableDescriptor;

Modified: hadoop/hbase/branches/0.19_on_hadoop_0.18/src/test/org/apache/hadoop/hbase/regionserver/TestHStoreFile.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/branches/0.19_on_hadoop_0.18/src/test/org/apache/hadoop/hbase/regionserver/TestHStoreFile.java?rev=730492&r1=730491&r2=730492&view=diff
==============================================================================
--- hadoop/hbase/branches/0.19_on_hadoop_0.18/src/test/org/apache/hadoop/hbase/regionserver/TestHStoreFile.java
(original)
+++ hadoop/hbase/branches/0.19_on_hadoop_0.18/src/test/org/apache/hadoop/hbase/regionserver/TestHStoreFile.java
Wed Dec 31 16:13:06 2008
@@ -30,11 +30,11 @@
 import org.apache.hadoop.hbase.HStoreKey;
 import org.apache.hadoop.hbase.io.HalfMapFileReader;
 import org.apache.hadoop.hbase.io.ImmutableBytesWritable;
+import org.apache.hadoop.hbase.io.MapFile;
 import org.apache.hadoop.hbase.io.Reference;
+import org.apache.hadoop.hbase.io.SequenceFile;
 import org.apache.hadoop.hbase.util.Bytes;
 import org.apache.hadoop.dfs.MiniDFSCluster;
-import org.apache.hadoop.io.MapFile;
-import org.apache.hadoop.io.SequenceFile;
 import org.apache.hadoop.io.WritableComparable;
 /**
  * Test HStoreFile



Mime
View raw message