You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by li...@apache.org on 2014/02/11 19:28:34 UTC

svn commit: r1567268 - in /hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase: client/HConnectionManager.java filter/CompoundRowPrefixFilter.java

Author: liyin
Date: Tue Feb 11 18:28:34 2014
New Revision: 1567268

URL: http://svn.apache.org/r1567268
Log:
[HBASE-10027] Bug Fix : The CompoundRowPrefixFilter needs to sort the prefixes before we initialize the state.

Author: manukranthk

Summary: The filter state needs to be set after the list of prefixes are sorted. This avoids any possible errors.

Test Plan: Run TestCompoundRowPrefixFilter.

Reviewers: adela, liyintang

Reviewed By: liyintang

CC: hbase-eng@

Differential Revision: https://phabricator.fb.com/D1158146

Modified:
    hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/client/HConnectionManager.java
    hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/filter/CompoundRowPrefixFilter.java

Modified: hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/client/HConnectionManager.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/client/HConnectionManager.java?rev=1567268&r1=1567267&r2=1567268&view=diff
==============================================================================
--- hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/client/HConnectionManager.java (original)
+++ hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/client/HConnectionManager.java Tue Feb 11 18:28:34 2014
@@ -1445,7 +1445,7 @@ public class HConnectionManager {
           // Sleep and retry finding root region.
           try {
             if (LOG.isDebugEnabled()) {
-              LOG.debug("Root region location changed. Sleeping.");
+              LOG.debug("Root region location changed. Sleeping.", t);
             }
             Thread.sleep(getPauseTime(tries));
             if (LOG.isDebugEnabled()) {

Modified: hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/filter/CompoundRowPrefixFilter.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/filter/CompoundRowPrefixFilter.java?rev=1567268&r1=1567267&r2=1567268&view=diff
==============================================================================
--- hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/filter/CompoundRowPrefixFilter.java (original)
+++ hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/filter/CompoundRowPrefixFilter.java Tue Feb 11 18:28:34 2014
@@ -57,8 +57,8 @@ public class CompoundRowPrefixFilter ext
     Preconditions.checkArgument(rowPrefixes.size() > 0,
         "Requires atleast one row prefix to initialize.");
     // sorting the rowPrefixes to keep them in increasing order.
-    this.resetFilterProgress();
     Collections.sort(this.rowPrefixes, Bytes.BYTES_COMPARATOR);
+    this.resetFilterProgress();
   }
 
   /**
@@ -151,6 +151,7 @@ public class CompoundRowPrefixFilter ext
       rowPrefixes.add(Bytes.readByteArray(in));
     }
     Preconditions.checkArgument(rowPrefixes.size() > 0);
+    Collections.sort(this.rowPrefixes, Bytes.BYTES_COMPARATOR);
     this.resetFilterProgress();
   }