hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject svn commit: r752524 - in /hadoop/hbase/branches/0.19: CHANGES.txt src/java/org/apache/hadoop/hbase/regionserver/HAbstractScanner.java
Date Wed, 11 Mar 2009 16:57:36 GMT
Author: stack
Date: Wed Mar 11 16:57:35 2009
New Revision: 752524

URL: http://svn.apache.org/viewvc?rev=752524&view=rev
Log:
HBASE-1253 Remove unnecessary, expensive column matcher lookup

Modified:
    hadoop/hbase/branches/0.19/CHANGES.txt
    hadoop/hbase/branches/0.19/src/java/org/apache/hadoop/hbase/regionserver/HAbstractScanner.java

Modified: hadoop/hbase/branches/0.19/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/hbase/branches/0.19/CHANGES.txt?rev=752524&r1=752523&r2=752524&view=diff
==============================================================================
--- hadoop/hbase/branches/0.19/CHANGES.txt (original)
+++ hadoop/hbase/branches/0.19/CHANGES.txt Wed Mar 11 16:57:35 2009
@@ -49,6 +49,7 @@
    HBASE-803   Atomic increment operations (Ryan Rawson and Jon Gray via Stack)
    HBASE-1252  Make atomic increment perform a binary increment
                (Jonathan Gray via Stack)
+   HBASE-1253  Remove unnecessary, expensive column matcher lookup
 
 Release 0.19.0
   INCOMPATIBLE CHANGES

Modified: hadoop/hbase/branches/0.19/src/java/org/apache/hadoop/hbase/regionserver/HAbstractScanner.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/branches/0.19/src/java/org/apache/hadoop/hbase/regionserver/HAbstractScanner.java?rev=752524&r1=752523&r2=752524&view=diff
==============================================================================
--- hadoop/hbase/branches/0.19/src/java/org/apache/hadoop/hbase/regionserver/HAbstractScanner.java
(original)
+++ hadoop/hbase/branches/0.19/src/java/org/apache/hadoop/hbase/regionserver/HAbstractScanner.java
Wed Mar 11 16:57:35 2009
@@ -20,8 +20,6 @@
 package org.apache.hadoop.hbase.regionserver;
 
 import java.io.IOException;
-import java.util.HashMap;
-import java.util.Map;
 import java.util.SortedMap;
 import java.util.Vector;
 import java.util.regex.Pattern;
@@ -112,8 +110,7 @@
 
   // Holds matchers for each column family.  Its keyed by the byte [] hashcode
   // which you can get by calling Bytes.mapKey.
-  private Map<Integer, Vector<ColumnMatcher>> okCols =
-    new HashMap<Integer, Vector<ColumnMatcher>>();
+  private Vector<ColumnMatcher> matchers = new Vector<ColumnMatcher>();
   
   // True when scanning is done
   protected volatile boolean scannerClosed = false;
@@ -130,11 +127,6 @@
     this.wildcardMatch = false;
     this.multipleMatchers = false;
     for(int i = 0; i < targetCols.length; i++) {
-      Integer key = HStoreKey.getFamilyMapKey(targetCols[i]);
-      Vector<ColumnMatcher> matchers = okCols.get(key);
-      if (matchers == null) {
-        matchers = new Vector<ColumnMatcher>();
-      }
       ColumnMatcher matcher = new ColumnMatcher(targetCols[i]);
       if (matcher.isWildCardMatch()) {
         this.wildcardMatch = true;
@@ -143,7 +135,6 @@
       if (matchers.size() > 1) {
         this.multipleMatchers = true;
       }
-      okCols.put(key, matchers);
     }
   }
 
@@ -159,8 +150,6 @@
    * @throws IOException
    */
   protected boolean columnMatch(final byte [] column) throws IOException {
-    Vector<ColumnMatcher> matchers =
-      this.okCols.get(HStoreKey.getFamilyMapKey(column));
     if (matchers == null) {
       return false;
     }



Mime
View raw message