hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nspiegelb...@apache.org
Subject svn commit: r1181537 - in /hbase/branches/0.89/src/main/java/org/apache/hadoop/hbase/regionserver: HRegion.java Store.java
Date Tue, 11 Oct 2011 02:17:51 GMT
Author: nspiegelberg
Date: Tue Oct 11 02:17:50 2011
New Revision: 1181537

URL: http://svn.apache.org/viewvc?rev=1181537&view=rev
Log:
Unit Test fix for HBASE-3797. Use String.equals() instead of ==

Modified:
    hbase/branches/0.89/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
    hbase/branches/0.89/src/main/java/org/apache/hadoop/hbase/regionserver/Store.java

Modified: hbase/branches/0.89/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.89/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java?rev=1181537&r1=1181536&r2=1181537&view=diff
==============================================================================
--- hbase/branches/0.89/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java (original)
+++ hbase/branches/0.89/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java Tue
Oct 11 02:17:50 2011
@@ -935,7 +935,7 @@ public class HRegion implements HeapSize
       LOG.debug("Skipping compaction on " + this + " because closing/closed");
       return false;
     }
-    Preconditions.checkArgument(cr.getHRegion().toString() == this.toString());
+    Preconditions.checkArgument(cr.getHRegion().equals(this));
     splitsAndClosesLock.readLock().lock();
     try {
       if (this.closed.get()) {

Modified: hbase/branches/0.89/src/main/java/org/apache/hadoop/hbase/regionserver/Store.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.89/src/main/java/org/apache/hadoop/hbase/regionserver/Store.java?rev=1181537&r1=1181536&r2=1181537&view=diff
==============================================================================
--- hbase/branches/0.89/src/main/java/org/apache/hadoop/hbase/regionserver/Store.java (original)
+++ hbase/branches/0.89/src/main/java/org/apache/hadoop/hbase/regionserver/Store.java Tue
Oct 11 02:17:50 2011
@@ -597,7 +597,8 @@ public class Store implements HeapSize {
     if (cr == null || cr.getFiles().isEmpty()) {
       return;
     }
-    Preconditions.checkArgument(cr.getStore().toString() == this.toString());
+    Preconditions.checkArgument(cr.getStore().toString()
+        .equals(this.toString()));
 
     List<StoreFile> filesToCompact = cr.getFiles();
 



Mime
View raw message