hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mbau...@apache.org
Subject svn commit: r1239787 - /hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/regionserver/Store.java
Date Thu, 02 Feb 2012 19:41:01 GMT
Author: mbautin
Date: Thu Feb  2 19:41:00 2012
New Revision: 1239787

URL: http://svn.apache.org/viewvc?rev=1239787&view=rev
Log:
[HBASE-5199] Follow up: Replace the System.currentTimeMillis as
EnvironmentEdgeManager.currentTimeMillis

Summary:
In HBASE-5199, It used System.currentTimeMillis() to calculate the expired time
stamp.

However, I just found out that it is supposed to replace this System runtime as
EnvironmentEdgeManager.

I will update the patch for open source trunk as well.

Test Plan: running all the unit tests

Reviewers: kannan, kranganathan

Reviewed By: kannan

CC: hbase-eng@lists

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

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

Modified: hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/regionserver/Store.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/regionserver/Store.java?rev=1239787&r1=1239786&r2=1239787&view=diff
==============================================================================
--- hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/regionserver/Store.java (original)
+++ hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/regionserver/Store.java Thu
Feb  2 19:41:00 2012
@@ -63,6 +63,7 @@ import org.apache.hadoop.hbase.regionser
 import org.apache.hadoop.hbase.regionserver.metrics.SchemaMetrics;
 import org.apache.hadoop.hbase.util.Bytes;
 import org.apache.hadoop.hbase.util.ClassSize;
+import org.apache.hadoop.hbase.util.EnvironmentEdgeManager;
 import org.apache.hadoop.util.StringUtils;
 
 import com.google.common.base.Preconditions;
@@ -1116,8 +1117,8 @@ public class Store extends SchemaConfigu
       if (conf.getBoolean("hbase.store.delete.expired.storefile", false)
           && (ttl != Long.MAX_VALUE)) {
         CompactSelection expiredSelection = compactSelection
-            .selectExpiredStoreFilesToCompact(System.currentTimeMillis()
-                - this.ttl);
+            .selectExpiredStoreFilesToCompact(
+                EnvironmentEdgeManager.currentTimeMillis() - this.ttl);
 
         // If there is any expired store files, delete them  by compaction.
         if (expiredSelection != null) {



Mime
View raw message