hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject [50/50] [abbrv] hbase git commit: Merge in master branch
Date Thu, 17 Aug 2017 19:15:48 GMT
Merge in master branch


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/675b63d5
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/675b63d5
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/675b63d5

Branch: refs/heads/HBASE-14070.HLC
Commit: 675b63d5055dfb27fc74b5c59a80bf8fc7b33ab5
Parents: 75a6b36 82a9cec
Author: Michael Stack <stack@apache.org>
Authored: Thu Aug 17 12:14:23 2017 -0700
Committer: Michael Stack <stack@apache.org>
Committed: Thu Aug 17 12:14:23 2017 -0700

----------------------------------------------------------------------
 .../apache/hadoop/hbase/HTableDescriptor.java   |  12 +
 .../apache/hadoop/hbase/MetaTableAccessor.java  | 144 ++-----
 .../hadoop/hbase/client/RawAsyncHBaseAdmin.java |   2 +-
 .../hadoop/hbase/client/TableDescriptor.java    |   9 +
 .../hbase/client/TableDescriptorBuilder.java    |  45 +++
 .../hbase/shaded/protobuf/ProtobufUtil.java     |  55 ++-
 .../hbase/shaded/protobuf/RequestConverter.java |  28 +-
 .../java/org/apache/hadoop/hbase/Clock.java     | 107 ++++++
 .../org/apache/hadoop/hbase/ClockException.java |  33 ++
 .../java/org/apache/hadoop/hbase/ClockType.java |  38 ++
 .../apache/hadoop/hbase/HybridLogicalClock.java | 134 +++++++
 .../apache/hadoop/hbase/SettableTimestamp.java  |   2 +-
 .../org/apache/hadoop/hbase/SystemClock.java    |  44 +++
 .../hadoop/hbase/SystemMonotonicClock.java      |  83 +++++
 .../org/apache/hadoop/hbase/TimestampType.java  | 312 ++++++++++++++++
 .../apache/hadoop/hbase/util/AtomicUtils.java   |   1 +
 .../java/org/apache/hadoop/hbase/TestClock.java | 307 +++++++++++++++
 .../apache/hadoop/hbase/TestTimestampType.java  | 213 +++++++++++
 .../src/main/protobuf/Admin.proto               |   8 +
 .../src/main/protobuf/HBase.proto               |  13 +
 hbase-protocol/src/main/protobuf/Admin.proto    |   8 +-
 .../org/apache/hadoop/hbase/master/HMaster.java |   2 +
 .../hadoop/hbase/master/MasterServices.java     |   8 +
 .../hadoop/hbase/master/ServerManager.java      |   1 +
 .../master/assignment/RegionStateStore.java     |   5 +-
 .../master/procedure/ModifyTableProcedure.java  |   4 +
 .../master/procedure/RSProcedureDispatcher.java |  55 ++-
 .../hadoop/hbase/regionserver/HRegion.java      |  81 +++-
 .../hbase/regionserver/HRegionServer.java       |  63 +++-
 .../hadoop/hbase/regionserver/HStore.java       |  14 +-
 .../hbase/regionserver/RSRpcServices.java       |  41 +-
 .../hadoop/hbase/regionserver/Region.java       |   6 +
 .../hbase/regionserver/RegionMergeRequest.java  |   3 +-
 .../regionserver/RegionServerServices.java      |  23 +-
 .../apache/hadoop/hbase/regionserver/Store.java |   7 +
 .../hadoop/hbase/regionserver/StoreScanner.java | 102 +++--
 .../hadoop/hbase/regionserver/StoreUtils.java   |   8 +
 .../regionserver/handler/OpenMetaHandler.java   |   4 +-
 .../handler/OpenPriorityRegionHandler.java      |   4 +-
 .../regionserver/handler/OpenRegionHandler.java |  20 +-
 .../DropDeletesCompactionScanQueryMatcher.java  |  19 +-
 .../querymatcher/LegacyScanQueryMatcher.java    |   3 +-
 .../MajorCompactionScanQueryMatcher.java        |   5 +-
 .../MinorCompactionScanQueryMatcher.java        |   3 +-
 .../NormalUserScanQueryMatcher.java             |   3 +-
 .../querymatcher/RawScanQueryMatcher.java       |   3 +-
 .../querymatcher/ScanQueryMatcher.java          |  24 +-
 .../StripeCompactionScanQueryMatcher.java       |   5 +-
 .../hbase/security/access/AccessController.java |  10 +-
 .../hadoop/hbase/util/FSTableDescriptors.java   |   1 +
 .../hadoop/hbase/util/HBaseFsckRepair.java      |   2 +-
 .../hadoop/hbase/HBaseTestingUtility.java       |  28 ++
 .../hadoop/hbase/MockRegionServerServices.java  |   5 +
 .../hadoop/hbase/TestClockWithCluster.java      | 373 +++++++++++++++++++
 .../hadoop/hbase/TestMetaTableAccessor.java     | 101 +----
 .../hadoop/hbase/client/TestReplicasClient.java |   4 +-
 .../coprocessor/TestIncrementTimeRange.java     |  41 +-
 .../hadoop/hbase/mapreduce/TestCopyTable.java   |  31 +-
 .../hbase/master/MockNoopMasterServices.java    |   5 +
 .../hadoop/hbase/master/MockRegionServer.java   |   8 +
 .../hadoop/hbase/master/TestMasterFailover.java |   2 +-
 .../hbase/master/TestMasterNoCluster.java       |   1 +
 .../regionserver/TestCompactingMemStore.java    |  46 ++-
 .../hbase/regionserver/TestDefaultMemStore.java |  62 ++-
 .../hadoop/hbase/regionserver/TestHRegion.java  | 185 ++++++++-
 .../regionserver/TestHRegionReplayEvents.java   |   3 +
 .../regionserver/TestRegionServerNoMaster.java  |  10 +-
 .../regionserver/TestRegionSplitPolicy.java     |   4 +
 .../hbase/regionserver/TestStoreScanner.java    | 168 ++++++---
 .../hbase/regionserver/TestWALLockup.java       |   3 +
 .../TestCompactionScanQueryMatcher.java         |   3 +-
 .../querymatcher/TestUserScanQueryMatcher.java  |  12 +-
 .../regionserver/wal/AbstractTestWALReplay.java |  49 ++-
 .../access/TestCellACLWithMultipleVersions.java | 179 ++++++---
 .../hbase/util/TestCoprocessorScanPolicy.java   |  30 +-
 .../hbase/util/TestHBaseFsckReplicas.java       |   2 +-
 .../apache/hadoop/hbase/util/TestTableName.java |   5 +-
 77 files changed, 2980 insertions(+), 507 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/675b63d5/hbase-client/src/main/java/org/apache/hadoop/hbase/HTableDescriptor.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/hbase/blob/675b63d5/hbase-client/src/main/java/org/apache/hadoop/hbase/MetaTableAccessor.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/hbase/blob/675b63d5/hbase-client/src/main/java/org/apache/hadoop/hbase/client/RawAsyncHBaseAdmin.java
----------------------------------------------------------------------
diff --cc hbase-client/src/main/java/org/apache/hadoop/hbase/client/RawAsyncHBaseAdmin.java
index ba68a96,1ae0eec..8f4e34a
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/RawAsyncHBaseAdmin.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/RawAsyncHBaseAdmin.java
@@@ -2897,4 -2917,4 +2897,4 @@@ public class RawAsyncHBaseAdmin impleme
          .pause(pauseNs, TimeUnit.NANOSECONDS).maxAttempts(maxAttempts)
          .startLogErrorsCnt(startLogErrorsCnt);
    }
--}
++}

http://git-wip-us.apache.org/repos/asf/hbase/blob/675b63d5/hbase-client/src/main/java/org/apache/hadoop/hbase/shaded/protobuf/ProtobufUtil.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/hbase/blob/675b63d5/hbase-client/src/main/java/org/apache/hadoop/hbase/shaded/protobuf/RequestConverter.java
----------------------------------------------------------------------
diff --cc hbase-client/src/main/java/org/apache/hadoop/hbase/shaded/protobuf/RequestConverter.java
index 08ed3dc,d57ffb7..e79b991
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/shaded/protobuf/RequestConverter.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/shaded/protobuf/RequestConverter.java
@@@ -26,7 -26,7 +26,8 @@@ import java.util.Set
  import java.util.regex.Pattern;
  
  import org.apache.hadoop.hbase.CellScannable;
 +import org.apache.hadoop.hbase.ClusterStatus.Options;
+ import org.apache.hadoop.hbase.ClockType;
  import org.apache.hadoop.hbase.DoNotRetryIOException;
  import org.apache.hadoop.hbase.HConstants;
  import org.apache.hadoop.hbase.HRegionInfo;

http://git-wip-us.apache.org/repos/asf/hbase/blob/675b63d5/hbase-protocol-shaded/src/main/protobuf/Admin.proto
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/hbase/blob/675b63d5/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java
----------------------------------------------------------------------
diff --cc hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java
index 6b4d4e9,fb9d611..975f17a
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java
@@@ -53,8 -53,9 +53,10 @@@ import org.apache.commons.logging.LogFa
  import org.apache.hadoop.conf.Configuration;
  import org.apache.hadoop.fs.FileSystem;
  import org.apache.hadoop.fs.Path;
+ import org.apache.hadoop.hbase.Clock;
+ import org.apache.hadoop.hbase.ClockType;
  import org.apache.hadoop.hbase.ClusterStatus;
 +import org.apache.hadoop.hbase.ClusterStatus.Options;
  import org.apache.hadoop.hbase.CoordinatedStateException;
  import org.apache.hadoop.hbase.CoordinatedStateManager;
  import org.apache.hadoop.hbase.DoNotRetryIOException;

http://git-wip-us.apache.org/repos/asf/hbase/blob/675b63d5/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterServices.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/hbase/blob/675b63d5/hbase-server/src/main/java/org/apache/hadoop/hbase/master/ServerManager.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/hbase/blob/675b63d5/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/RegionStateStore.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/hbase/blob/675b63d5/hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/RSProcedureDispatcher.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/hbase/blob/675b63d5/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/hbase/blob/675b63d5/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
----------------------------------------------------------------------
diff --cc hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
index 0c1814f,bf6dc3a..fad0d96
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
@@@ -591,7 -600,14 +603,13 @@@ public class HRegionServer extends HasT
      this.abortRequested = false;
      this.stopped = false;
  
+     final long maxClockSkew =
+         conf.getLong("hbase.max.clock.skew.in.ms", Clock.DEFAULT_MAX_CLOCK_SKEW_IN_MS);
+     this.hybridLogicalClock = new HybridLogicalClock(maxClockSkew);
+     this.systemMonotonicClock = new SystemMonotonicClock(maxClockSkew);
+     this.systemClock = new SystemClock();
+ 
      rpcServices = createRpcServices();
 -    this.startcode = System.currentTimeMillis();
      if (this instanceof HMaster) {
        useThisHostnameInstead = conf.get(MASTER_HOSTNAME_KEY);
      } else {

http://git-wip-us.apache.org/repos/asf/hbase/blob/675b63d5/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HStore.java
----------------------------------------------------------------------
diff --cc hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HStore.java
index 882e1fc,7245597..42fea4c
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HStore.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HStore.java
@@@ -92,14 -92,15 +92,15 @@@ import org.apache.hadoop.hbase.util.Pai
  import org.apache.hadoop.hbase.util.ReflectionUtils;
  import org.apache.hadoop.util.StringUtils;
  import org.apache.hadoop.util.StringUtils.TraditionalBinaryPrefix;
+ import org.apache.hadoop.hbase.Clock;
  
 -import com.google.common.annotations.VisibleForTesting;
 -import com.google.common.base.Preconditions;
 -import com.google.common.collect.ImmutableCollection;
 -import com.google.common.collect.ImmutableList;
 -import com.google.common.collect.Lists;
 -import com.google.common.collect.Sets;
  import org.apache.hadoop.hbase.client.ColumnFamilyDescriptor;
 +import org.apache.hadoop.hbase.shaded.com.google.common.annotations.VisibleForTesting;
 +import org.apache.hadoop.hbase.shaded.com.google.common.base.Preconditions;
 +import org.apache.hadoop.hbase.shaded.com.google.common.collect.ImmutableCollection;
 +import org.apache.hadoop.hbase.shaded.com.google.common.collect.ImmutableList;
 +import org.apache.hadoop.hbase.shaded.com.google.common.collect.Lists;
 +import org.apache.hadoop.hbase.shaded.com.google.common.collect.Sets;
  
  /**
   * A Store holds a column family in a Region.  Its a memstore and a set of zero

http://git-wip-us.apache.org/repos/asf/hbase/blob/675b63d5/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RSRpcServices.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/hbase/blob/675b63d5/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/Region.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/hbase/blob/675b63d5/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RegionMergeRequest.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/hbase/blob/675b63d5/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StoreScanner.java
----------------------------------------------------------------------
diff --cc hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StoreScanner.java
index 5286c39,3f453fd..951f47c
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StoreScanner.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StoreScanner.java
@@@ -48,10 -42,10 +42,9 @@@ import org.apache.hadoop.hbase.regionse
  import org.apache.hadoop.hbase.regionserver.querymatcher.LegacyScanQueryMatcher;
  import org.apache.hadoop.hbase.regionserver.querymatcher.ScanQueryMatcher;
  import org.apache.hadoop.hbase.regionserver.querymatcher.UserScanQueryMatcher;
 +import org.apache.hadoop.hbase.shaded.com.google.common.annotations.VisibleForTesting;
  import org.apache.hadoop.hbase.util.CollectionUtils;
- import org.apache.hadoop.hbase.util.EnvironmentEdgeManager;
  
 -import com.google.common.annotations.VisibleForTesting;
 -
  /**
   * Scanner scans both the memstore and the Store. Coalesce KeyValue stream into List&lt;KeyValue&gt;
   * for a single row.
@@@ -603,9 -663,8 +661,9 @@@ public class StoreScanner extends NonRe
        int cellSize = CellUtil.estimatedSerializedSizeOf(cell);
        bytesRead += cellSize;
        prevCell = cell;
 +      scannerContext.setLastPeekedCell(cell);
        topChanged = false;
-       ScanQueryMatcher.MatchCode qcode = matcher.match(cell);
+       ScanQueryMatcher.MatchCode qcode = matcher.match(cell, timestampType);
        switch (qcode) {
          case INCLUDE:
          case INCLUDE_AND_SEEK_NEXT_ROW:

http://git-wip-us.apache.org/repos/asf/hbase/blob/675b63d5/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/querymatcher/DropDeletesCompactionScanQueryMatcher.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/hbase/blob/675b63d5/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/querymatcher/LegacyScanQueryMatcher.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/hbase/blob/675b63d5/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/querymatcher/MajorCompactionScanQueryMatcher.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/hbase/blob/675b63d5/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/querymatcher/MinorCompactionScanQueryMatcher.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/hbase/blob/675b63d5/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/querymatcher/NormalUserScanQueryMatcher.java
----------------------------------------------------------------------
diff --cc hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/querymatcher/NormalUserScanQueryMatcher.java
index b168034,c97614c..51489c3
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/querymatcher/NormalUserScanQueryMatcher.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/querymatcher/NormalUserScanQueryMatcher.java
@@@ -22,8 -22,10 +22,9 @@@ import java.io.IOException
  import org.apache.hadoop.hbase.Cell;
  import org.apache.hadoop.hbase.CellUtil;
  import org.apache.hadoop.hbase.KeepDeletedCells;
+ import org.apache.hadoop.hbase.TimestampType;
  import org.apache.hadoop.hbase.classification.InterfaceAudience;
  import org.apache.hadoop.hbase.client.Scan;
 -import org.apache.hadoop.hbase.regionserver.RegionCoprocessorHost;
  import org.apache.hadoop.hbase.regionserver.ScanInfo;
  
  /**

http://git-wip-us.apache.org/repos/asf/hbase/blob/675b63d5/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/querymatcher/ScanQueryMatcher.java
----------------------------------------------------------------------
diff --cc hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/querymatcher/ScanQueryMatcher.java
index 524d3f7,c38e408..b925668
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/querymatcher/ScanQueryMatcher.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/querymatcher/ScanQueryMatcher.java
@@@ -32,16 -31,15 +32,18 @@@ import org.apache.hadoop.hbase.Tag
  import org.apache.hadoop.hbase.TagType;
  import org.apache.hadoop.hbase.TagUtil;
  import org.apache.hadoop.hbase.classification.InterfaceAudience;
 +import org.apache.hadoop.hbase.client.Scan;
+ import org.apache.hadoop.hbase.TimestampType;
  import org.apache.hadoop.hbase.filter.Filter;
 -import org.apache.hadoop.hbase.regionserver.KeyValueScanner;
  import org.apache.hadoop.hbase.regionserver.RegionCoprocessorHost;
  import org.apache.hadoop.hbase.regionserver.ScanInfo;
  import org.apache.hadoop.hbase.regionserver.ShipperListener;
  import org.apache.hadoop.hbase.regionserver.querymatcher.DeleteTracker.DeleteResult;
 +import org.apache.hadoop.hbase.security.visibility.VisibilityNewVersionBehaivorTracker;
 +import org.apache.hadoop.hbase.security.visibility.VisibilityScanDeleteTracker;
+ import org.apache.hadoop.hbase.shaded.com.google.protobuf.Timestamp;
  import org.apache.hadoop.hbase.util.Bytes;
 +import org.apache.hadoop.hbase.util.Pair;
  
  /**
   * A query matcher that is specifically designed for the scan case.

http://git-wip-us.apache.org/repos/asf/hbase/blob/675b63d5/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/querymatcher/StripeCompactionScanQueryMatcher.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/hbase/blob/675b63d5/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/AccessController.java
----------------------------------------------------------------------
diff --cc hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/AccessController.java
index c40d481,f58e24f..429180d
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/AccessController.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/AccessController.java
@@@ -53,9 -55,9 +53,10 @@@ import org.apache.hadoop.hbase.Procedur
  import org.apache.hadoop.hbase.ServerName;
  import org.apache.hadoop.hbase.TableName;
  import org.apache.hadoop.hbase.Tag;
+ import org.apache.hadoop.hbase.TimestampType;
  import org.apache.hadoop.hbase.classification.InterfaceAudience;
  import org.apache.hadoop.hbase.client.Append;
 +import org.apache.hadoop.hbase.client.ColumnFamilyDescriptor;
  import org.apache.hadoop.hbase.client.Delete;
  import org.apache.hadoop.hbase.client.Durability;
  import org.apache.hadoop.hbase.client.Get;

http://git-wip-us.apache.org/repos/asf/hbase/blob/675b63d5/hbase-server/src/main/java/org/apache/hadoop/hbase/util/FSTableDescriptors.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/hbase/blob/675b63d5/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/hbase/blob/675b63d5/hbase-server/src/test/java/org/apache/hadoop/hbase/TestMetaTableAccessor.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/hbase/blob/675b63d5/hbase-server/src/test/java/org/apache/hadoop/hbase/master/MockNoopMasterServices.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/hbase/blob/675b63d5/hbase-server/src/test/java/org/apache/hadoop/hbase/master/MockRegionServer.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/hbase/blob/675b63d5/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestMasterNoCluster.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/hbase/blob/675b63d5/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestCompactingMemStore.java
----------------------------------------------------------------------
diff --cc hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestCompactingMemStore.java
index 8118e41,b7a5168..2e20a9a
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestCompactingMemStore.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestCompactingMemStore.java
@@@ -193,11 -216,12 +216,12 @@@ public class TestCompactingMemStore ext
      Configuration conf = HBaseConfiguration.create();
      for (int startRowId = 0; startRowId < ROW_COUNT; startRowId++) {
        ScanInfo scanInfo = new ScanInfo(conf, FAMILY, 0, 1, Integer.MAX_VALUE,
 -          KeepDeletedCells.FALSE, HConstants.DEFAULT_BLOCKSIZE, 0, this.memstore.getComparator());
 +          KeepDeletedCells.FALSE, HConstants.DEFAULT_BLOCKSIZE, 0, this.memstore.getComparator(),
false);
        ScanType scanType = ScanType.USER_SCAN;
-       InternalScanner scanner = new StoreScanner(new Scan(
-           Bytes.toBytes(startRowId)), scanInfo, scanType, null,
-           memstore.getScanners(0));
+       Store mockStore = mock(HStore.class);
+       when(mockStore.getClock()).thenReturn(Clock.getDummyClockOfGivenClockType(clock.getClockType()));
+       InternalScanner scanner = new StoreScanner(mockStore, new Scan(Bytes.toBytes(startRowId)),
+           scanInfo, scanType, null, memstore.getScanners(0)) ;
        List<Cell> results = new ArrayList<>();
        for (int i = 0; scanner.next(results); i++) {
          int rowId = startRowId + i;

http://git-wip-us.apache.org/repos/asf/hbase/blob/675b63d5/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestDefaultMemStore.java
----------------------------------------------------------------------
diff --cc hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestDefaultMemStore.java
index 7b10846,f9ad88f..efec800
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestDefaultMemStore.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestDefaultMemStore.java
@@@ -601,11 -627,13 +627,13 @@@ public class TestDefaultMemStore 
      Configuration conf = HBaseConfiguration.create();
      for (int startRowId = 0; startRowId < ROW_COUNT; startRowId++) {
        ScanInfo scanInfo = new ScanInfo(conf, FAMILY, 0, 1, Integer.MAX_VALUE,
 -          KeepDeletedCells.FALSE, HConstants.DEFAULT_BLOCKSIZE, 0, this.memstore.getComparator());
 +          KeepDeletedCells.FALSE, HConstants.DEFAULT_BLOCKSIZE, 0, this.memstore.getComparator(),
false);
        ScanType scanType = ScanType.USER_SCAN;
-       try (InternalScanner scanner = new StoreScanner(new Scan(
-           Bytes.toBytes(startRowId)), scanInfo, scanType, null,
-           memstore.getScanners(0))) {
+       Store store = mock(HStore.class);
+       when(store.getClock()).thenReturn(Clock.getDummyClockOfGivenClockType(clock.getClockType()));
+ 
+       try (InternalScanner scanner = new StoreScanner(store, new Scan(Bytes.toBytes(startRowId)),
+           scanInfo, scanType, null, memstore.getScanners(0))) {
          List<Cell> results = new ArrayList<>();
          for (int i = 0; scanner.next(results); i++) {
            int rowId = startRowId + i;

http://git-wip-us.apache.org/repos/asf/hbase/blob/675b63d5/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestHRegion.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/hbase/blob/675b63d5/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestHRegionReplayEvents.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/hbase/blob/675b63d5/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestStoreScanner.java
----------------------------------------------------------------------
diff --cc hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestStoreScanner.java
index 1653728,c7ccc57..a3ceb14
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestStoreScanner.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestStoreScanner.java
@@@ -831,9 -854,11 +854,11 @@@ public class TestStoreScanner 
      Scan scan = new Scan();
      scan.setMaxVersions(1);
      ScanInfo scanInfo = new ScanInfo(CONF, CF, 0, 1, 500, KeepDeletedCells.FALSE,
 -        HConstants.DEFAULT_BLOCKSIZE, 0, CellComparator.COMPARATOR);
 +        HConstants.DEFAULT_BLOCKSIZE, 0, CellComparator.COMPARATOR, false);
      ScanType scanType = ScanType.USER_SCAN;
-     try (StoreScanner scanner = new StoreScanner(scan, scanInfo, scanType, null, scanners))
{
+     Store store = mock(HStore.class);
+     when(store.getClock()).thenReturn(Clock.getDummyClockOfGivenClockType(clockType));
+     try (StoreScanner scanner = new StoreScanner(store, scan, scanInfo, scanType, null,
scanners)) {
        List<Cell> results = new ArrayList<>();
        Assert.assertEquals(true, scanner.next(results));
        Assert.assertEquals(2, results.size());
@@@ -904,11 -944,12 +944,12 @@@
      scan.setMaxVersions(1);
      // scanner with ttl equal to 500
      ScanInfo scanInfo = new ScanInfo(CONF, CF, 0, 1, 500, KeepDeletedCells.FALSE,
 -        HConstants.DEFAULT_BLOCKSIZE, 0, CellComparator.COMPARATOR);
 +        HConstants.DEFAULT_BLOCKSIZE, 0, CellComparator.COMPARATOR, false);
      ScanType scanType = ScanType.USER_SCAN;
+     Store store = mock(HStore.class);
+     when(store.getClock()).thenReturn(clock);
      try (StoreScanner scanner =
-         new StoreScanner(scan, scanInfo, scanType, null, scanners)) {
- 
+         new StoreScanner(store, scan, scanInfo, scanType, null, scanners)) {
        List<Cell> results = new ArrayList<>();
        Assert.assertEquals(true, scanner.next(results));
        Assert.assertEquals(1, results.size());
@@@ -1008,4 -1080,4 +1080,4 @@@
      StoreScanner storeScanner = new StoreScanner(scan, scanInfo, scanType, null, scanners);
      assertFalse(storeScanner.isScanUsePread());
    }
--}
++}

http://git-wip-us.apache.org/repos/asf/hbase/blob/675b63d5/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/querymatcher/TestCompactionScanQueryMatcher.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/hbase/blob/675b63d5/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/querymatcher/TestUserScanQueryMatcher.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/hbase/blob/675b63d5/hbase-server/src/test/java/org/apache/hadoop/hbase/util/TestCoprocessorScanPolicy.java
----------------------------------------------------------------------
diff --cc hbase-server/src/test/java/org/apache/hadoop/hbase/util/TestCoprocessorScanPolicy.java
index 993a1fd,d1f0282..2b204dc
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/util/TestCoprocessorScanPolicy.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/util/TestCoprocessorScanPolicy.java
@@@ -31,7 -31,7 +31,8 @@@ import java.util.NavigableSet
  import org.apache.hadoop.conf.Configuration;
  import org.apache.hadoop.hbase.Cell;
  import org.apache.hadoop.hbase.CellUtil;
 +import org.apache.hadoop.hbase.HBaseCommonTestingUtility;
+ import org.apache.hadoop.hbase.ClockType;
  import org.apache.hadoop.hbase.HBaseTestingUtility;
  import org.apache.hadoop.hbase.HColumnDescriptor;
  import org.apache.hadoop.hbase.HConstants;

http://git-wip-us.apache.org/repos/asf/hbase/blob/675b63d5/hbase-server/src/test/java/org/apache/hadoop/hbase/util/TestHBaseFsckReplicas.java
----------------------------------------------------------------------


Mime
View raw message