hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From te...@apache.org
Subject svn commit: r1574152 - in /hbase/branches/0.96/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver: StoreFile.java TimeRangeTracker.java
Date Tue, 04 Mar 2014 17:45:47 GMT
Author: tedyu
Date: Tue Mar  4 17:45:46 2014
New Revision: 1574152

URL: http://svn.apache.org/r1574152
Log:
HBASE-10624 Fix 2 new findbugs warnings introduced by HBASE-10598


Modified:
    hbase/branches/0.96/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StoreFile.java
    hbase/branches/0.96/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/TimeRangeTracker.java

Modified: hbase/branches/0.96/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StoreFile.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.96/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StoreFile.java?rev=1574152&r1=1574151&r2=1574152&view=diff
==============================================================================
--- hbase/branches/0.96/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StoreFile.java
(original)
+++ hbase/branches/0.96/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StoreFile.java
Tue Mar  4 17:45:46 2014
@@ -684,7 +684,7 @@ public class StoreFile {
   public Long getMinimumTimestamp() {
     return (getReader().timeRangeTracker == null) ?
         null :
-        getReader().timeRangeTracker.minimumTimestamp;
+        getReader().timeRangeTracker.getMinimumTimestamp();
   }
 
   /**
@@ -1533,7 +1533,7 @@ public class StoreFile {
     }
 
     public long getMaxTimestamp() {
-      return timeRangeTracker == null ? Long.MAX_VALUE : timeRangeTracker.maximumTimestamp;
+      return timeRangeTracker == null ? Long.MAX_VALUE : timeRangeTracker.getMaximumTimestamp();
     }
   }
 

Modified: hbase/branches/0.96/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/TimeRangeTracker.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.96/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/TimeRangeTracker.java?rev=1574152&r1=1574151&r2=1574152&view=diff
==============================================================================
--- hbase/branches/0.96/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/TimeRangeTracker.java
(original)
+++ hbase/branches/0.96/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/TimeRangeTracker.java
Tue Mar  4 17:45:46 2014
@@ -134,18 +134,18 @@ public class TimeRangeTracker implements
     return maximumTimestamp;
   }
 
-  public void write(final DataOutput out) throws IOException {
+  public synchronized void write(final DataOutput out) throws IOException {
     out.writeLong(minimumTimestamp);
     out.writeLong(maximumTimestamp);
   }
 
-  public void readFields(final DataInput in) throws IOException {
+  public synchronized void readFields(final DataInput in) throws IOException {
     this.minimumTimestamp = in.readLong();
     this.maximumTimestamp = in.readLong();
   }
 
   @Override
-  public String toString() {
+  public synchronized String toString() {
     return "[" + minimumTimestamp + "," + maximumTimestamp + "]";
   }
 }



Mime
View raw message