You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by st...@apache.org on 2009/05/03 08:21:22 UTC

svn commit: r771031 - in /hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/regionserver: HAbstractScanner.java HRegion.java

Author: stack
Date: Sun May  3 06:21:21 2009
New Revision: 771031

URL: http://svn.apache.org/viewvc?rev=771031&view=rev
Log:
HBASE-1366 HBASE-1342 broke splitting (broke build)

Modified:
    hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/regionserver/HAbstractScanner.java
    hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/regionserver/HRegion.java

Modified: hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/regionserver/HAbstractScanner.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/regionserver/HAbstractScanner.java?rev=771031&r1=771030&r2=771031&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/regionserver/HAbstractScanner.java (original)
+++ hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/regionserver/HAbstractScanner.java Sun May  3 06:21:21 2009
@@ -144,7 +144,8 @@
           this.wildCardmatch = true;
         } else if (isRegexPattern.matcher(Bytes.toString(qualifier)).matches()) {
           this.matchType = MATCH_TYPE.REGEX;
-          this.columnMatcher = Pattern.compile(Bytes.toString(columnWithoutDelimiter));
+          this.columnMatcher =
+            Pattern.compile(Bytes.toString(columnWithoutDelimiter));
           this.wildCardmatch = true;
         } else {
           this.matchType = MATCH_TYPE.SIMPLE;

Modified: hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/regionserver/HRegion.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/regionserver/HRegion.java?rev=771031&r1=771030&r2=771031&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/regionserver/HRegion.java (original)
+++ hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/regionserver/HRegion.java Sun May  3 06:21:21 2009
@@ -247,7 +247,7 @@
     this.historian = RegionHistorian.getInstance();
     if (LOG.isDebugEnabled()) {
       // Write out region name as string and its encoded name.
-      LOG.debug("Opening region " + this + "/" +
+      LOG.debug("Opening region " + this + ", encoded=" +
         this.regionInfo.getEncodedName());
     }
     this.regionCompactionDir =
@@ -270,12 +270,9 @@
    * @param reporter
    * @throws IOException
    */
-  public void initialize( Path initialFiles, final Progressable reporter)
+  public void initialize(Path initialFiles, final Progressable reporter)
   throws IOException {
     Path oldLogFile = new Path(regiondir, HREGION_OLDLOGFILE_NAME);
-    
-    // Write HRI to a file in case we need to recover .META.
-    checkRegioninfoOnFilesystem();
 
     // Move prefab HStore files into place (if any).  This picks up split files
     // and any merges from splits and merges dirs.
@@ -283,6 +280,9 @@
       fs.rename(initialFiles, this.regiondir);
     }
 
+    // Write HRI to a file in case we need to recover .META.
+    checkRegioninfoOnFilesystem();
+
     // Load in all the HStores.
     long maxSeqId = -1;
     long minSeqId = Integer.MAX_VALUE;
@@ -2079,7 +2079,6 @@
       activeScannerCount.incrementAndGet();
     }
 
-    @SuppressWarnings("null")
     public boolean next(List<KeyValue> results)
     throws IOException {
       boolean moreToFollow = false;
@@ -2538,7 +2537,6 @@
         Bytes.toString(endKey) + ">");
 
     // Move HStoreFiles under new region directory
-    
     Map<byte [], List<StoreFile>> byFamily =
       new TreeMap<byte [], List<StoreFile>>(Bytes.BYTES_COMPARATOR);
     byFamily = filesByFamily(byFamily, a.close());
@@ -2546,7 +2544,6 @@
     for (Map.Entry<byte [], List<StoreFile>> es : byFamily.entrySet()) {
       byte [] colFamily = es.getKey();
       makeColumnFamilyDirs(fs, basedir, newRegionInfo, colFamily);
-      
       // Because we compacted the source regions we should have no more than two
       // HStoreFiles per family and there will be no reference store
       List<StoreFile> srcFiles = es.getValue();
@@ -2606,13 +2603,6 @@
     return byFamily;
   }
 
-  /*
-   * Method to list files in use by region
-   */
-  static void listFiles(FileSystem fs, HRegion r) throws IOException {
-    listPaths(fs, r.getRegionDir());
-  }
-
   /**
    * @return True if needs a mojor compaction.
    * @throws IOException 
@@ -2625,7 +2615,7 @@
     }
     return false;
   }
-  
+
   /*
    * List the files under the specified directory
    *