hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmhs...@apache.org
Subject svn commit: r1446179 [2/2] - in /hbase/branches/hbase-7290v2: ./ bin/ hbase-examples/src/main/java/org/apache/hadoop/hbase/coprocessor/example/ hbase-prefix-tree/ hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/ hbase-server/src/main/jav...
Date Thu, 14 Feb 2013 13:59:07 GMT
Modified: hbase/branches/hbase-7290v2/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/SimpleRegionObserver.java
URL: http://svn.apache.org/viewvc/hbase/branches/hbase-7290v2/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/SimpleRegionObserver.java?rev=1446179&r1=1446178&r2=1446179&view=diff
==============================================================================
--- hbase/branches/hbase-7290v2/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/SimpleRegionObserver.java
(original)
+++ hbase/branches/hbase-7290v2/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/SimpleRegionObserver.java
Thu Feb 14 13:59:06 2013
@@ -47,7 +47,7 @@ import org.apache.hadoop.hbase.regionser
 import org.apache.hadoop.hbase.regionserver.Leases;
 import org.apache.hadoop.hbase.regionserver.RegionScanner;
 import org.apache.hadoop.hbase.regionserver.ScanType;
-import org.apache.hadoop.hbase.regionserver.HStore;
+import org.apache.hadoop.hbase.regionserver.Store;
 import org.apache.hadoop.hbase.regionserver.StoreFile;
 import org.apache.hadoop.hbase.regionserver.wal.WALEdit;
 import org.apache.hadoop.hbase.util.Bytes;
@@ -137,20 +137,22 @@ public class SimpleRegionObserver extend
   }
 
   @Override
-  public InternalScanner preFlush(ObserverContext<RegionCoprocessorEnvironment> c,
HStore store, InternalScanner scanner) {
+  public InternalScanner preFlush(ObserverContext<RegionCoprocessorEnvironment> c,
+      Store store, InternalScanner scanner) {
     hadPreFlush = true;
     return scanner;
   }
 
   @Override
   public InternalScanner preFlushScannerOpen(final ObserverContext<RegionCoprocessorEnvironment>
c,
-      HStore store, KeyValueScanner memstoreScanner, InternalScanner s) throws IOException
{
+      Store store, KeyValueScanner memstoreScanner, InternalScanner s) throws IOException
{
     hadPreFlushScannerOpen = true;
     return null;
   }
 
   @Override
-  public void postFlush(ObserverContext<RegionCoprocessorEnvironment> c, HStore store,
StoreFile resultFile) {
+  public void postFlush(ObserverContext<RegionCoprocessorEnvironment> c,
+      Store store, StoreFile resultFile) {
     hadPostFlush = true;
   }
 
@@ -174,26 +176,27 @@ public class SimpleRegionObserver extend
 
   @Override
   public void preCompactSelection(ObserverContext<RegionCoprocessorEnvironment> c,
-      HStore store, List<StoreFile> candidates) {
+      Store store, List<StoreFile> candidates) {
     hadPreCompactSelect = true;
   }
 
   @Override
   public void postCompactSelection(ObserverContext<RegionCoprocessorEnvironment> c,
-      HStore store, ImmutableList<StoreFile> selected) {
+      Store store, ImmutableList<StoreFile> selected) {
     hadPostCompactSelect = true;
   }
 
   @Override
   public InternalScanner preCompact(ObserverContext<RegionCoprocessorEnvironment> e,
-      HStore store, InternalScanner scanner, ScanType scanType) {
+      Store store, InternalScanner scanner, ScanType scanType) {
     hadPreCompact = true;
     return scanner;
   }
 
   @Override
-  public InternalScanner preCompactScannerOpen(final ObserverContext<RegionCoprocessorEnvironment>
c,
-      HStore store, List<? extends KeyValueScanner> scanners, ScanType scanType, long
earliestPutTs,
+  public InternalScanner preCompactScannerOpen(
+      final ObserverContext<RegionCoprocessorEnvironment> c,
+      Store store, List<? extends KeyValueScanner> scanners, ScanType scanType, long
earliestPutTs,
       InternalScanner s) throws IOException {
     hadPreCompactScanner = true;
     return null;
@@ -201,7 +204,7 @@ public class SimpleRegionObserver extend
 
   @Override
   public void postCompact(ObserverContext<RegionCoprocessorEnvironment> e,
-      HStore store, StoreFile resultFile) {
+      Store store, StoreFile resultFile) {
     hadPostCompact = true;
   }
 
@@ -219,7 +222,7 @@ public class SimpleRegionObserver extend
 
   @Override
   public KeyValueScanner preStoreScannerOpen(final ObserverContext<RegionCoprocessorEnvironment>
c,
-      final HStore store, final Scan scan, final NavigableSet<byte[]> targetCols,
+      final Store store, final Scan scan, final NavigableSet<byte[]> targetCols,
       final KeyValueScanner s) throws IOException {
     hadPreStoreScannerOpen = true;
     return null;
@@ -450,7 +453,7 @@ public class SimpleRegionObserver extend
 
   @Override
   public boolean postBulkLoadHFile(ObserverContext<RegionCoprocessorEnvironment> ctx,
-                                   List<Pair<byte[], String>> familyPaths, boolean
hasLoaded) throws IOException {
+      List<Pair<byte[], String>> familyPaths, boolean hasLoaded) throws IOException
{
     RegionCoprocessorEnvironment e = ctx.getEnvironment();
     assertNotNull(e);
     assertNotNull(e.getRegion());

Modified: hbase/branches/hbase-7290v2/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestCoprocessorInterface.java
URL: http://svn.apache.org/viewvc/hbase/branches/hbase-7290v2/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestCoprocessorInterface.java?rev=1446179&r1=1446178&r2=1446179&view=diff
==============================================================================
--- hbase/branches/hbase-7290v2/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestCoprocessorInterface.java
(original)
+++ hbase/branches/hbase-7290v2/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestCoprocessorInterface.java
Thu Feb 14 13:59:06 2013
@@ -46,7 +46,7 @@ import org.apache.hadoop.hbase.SmallTest
 import org.apache.hadoop.hbase.client.Get;
 import org.apache.hadoop.hbase.client.Scan;
 import org.apache.hadoop.hbase.regionserver.HRegion;
-import org.apache.hadoop.hbase.regionserver.HStore;
+import org.apache.hadoop.hbase.regionserver.Store;
 import org.apache.hadoop.hbase.regionserver.InternalScanner;
 import org.apache.hadoop.hbase.regionserver.RegionCoprocessorHost;
 import org.apache.hadoop.hbase.regionserver.RegionScanner;
@@ -187,13 +187,13 @@ public class TestCoprocessorInterface ex
     }
     @Override
     public InternalScanner preCompact(ObserverContext<RegionCoprocessorEnvironment>
e,
-        HStore store, InternalScanner scanner, ScanType scanType) {
+        Store store, InternalScanner scanner, ScanType scanType) {
       preCompactCalled = true;
       return scanner;
     }
     @Override
     public void postCompact(ObserverContext<RegionCoprocessorEnvironment> e,
-        HStore store, StoreFile resultFile) {
+        Store store, StoreFile resultFile) {
       postCompactCalled = true;
     }
     @Override

Modified: hbase/branches/hbase-7290v2/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestRegionObserverInterface.java
URL: http://svn.apache.org/viewvc/hbase/branches/hbase-7290v2/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestRegionObserverInterface.java?rev=1446179&r1=1446178&r2=1446179&view=diff
==============================================================================
--- hbase/branches/hbase-7290v2/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestRegionObserverInterface.java
(original)
+++ hbase/branches/hbase-7290v2/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestRegionObserverInterface.java
Thu Feb 14 13:59:06 2013
@@ -60,7 +60,7 @@ import org.apache.hadoop.hbase.protobuf.
 import org.apache.hadoop.hbase.regionserver.HRegion;
 import org.apache.hadoop.hbase.regionserver.InternalScanner;
 import org.apache.hadoop.hbase.regionserver.RegionCoprocessorHost;
-import org.apache.hadoop.hbase.regionserver.HStore;
+import org.apache.hadoop.hbase.regionserver.Store;
 import org.apache.hadoop.hbase.regionserver.ScanType;
 import org.apache.hadoop.hbase.regionserver.StoreFile;
 import org.apache.hadoop.hbase.util.Bytes;
@@ -316,7 +316,7 @@ public class TestRegionObserverInterface
 
     @Override
     public InternalScanner preCompact(ObserverContext<RegionCoprocessorEnvironment>
e,
-        HStore store, final InternalScanner scanner, final ScanType scanType) {
+        Store store, final InternalScanner scanner, final ScanType scanType) {
       return new InternalScanner() {
         @Override
         public boolean next(List<KeyValue> results) throws IOException {
@@ -368,7 +368,7 @@ public class TestRegionObserverInterface
 
     @Override
     public void postCompact(ObserverContext<RegionCoprocessorEnvironment> e,
-        HStore store, StoreFile resultFile) {
+        Store store, StoreFile resultFile) {
       lastCompaction = EnvironmentEdgeManager.currentTimeMillis();
     }
 

Modified: hbase/branches/hbase-7290v2/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/NoOpScanPolicyObserver.java
URL: http://svn.apache.org/viewvc/hbase/branches/hbase-7290v2/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/NoOpScanPolicyObserver.java?rev=1446179&r1=1446178&r2=1446179&view=diff
==============================================================================
--- hbase/branches/hbase-7290v2/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/NoOpScanPolicyObserver.java
(original)
+++ hbase/branches/hbase-7290v2/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/NoOpScanPolicyObserver.java
Thu Feb 14 13:59:06 2013
@@ -25,15 +25,14 @@ public class NoOpScanPolicyObserver exte
    */
   @Override
   public InternalScanner preFlushScannerOpen(final ObserverContext<RegionCoprocessorEnvironment>
c,
-      HStore store, KeyValueScanner memstoreScanner, InternalScanner s) throws IOException
{
-    HStore.ScanInfo oldSI = store.getScanInfo();
-    HStore.ScanInfo scanInfo = new HStore.ScanInfo(store.getFamily(), oldSI.getTtl(),
+      Store store, KeyValueScanner memstoreScanner, InternalScanner s) throws IOException
{
+    ScanInfo oldSI = store.getScanInfo();
+    ScanInfo scanInfo = new ScanInfo(store.getFamily(), oldSI.getTtl(),
         oldSI.getTimeToPurgeDeletes(), oldSI.getComparator());
     Scan scan = new Scan();
     scan.setMaxVersions(oldSI.getMaxVersions());
     return new StoreScanner(store, scanInfo, scan, Collections.singletonList(memstoreScanner),
-        ScanType.MINOR_COMPACT, store.getHRegion().getSmallestReadPoint(),
-        HConstants.OLDEST_TIMESTAMP);
+        ScanType.MINOR_COMPACT, store.getSmallestReadPoint(), HConstants.OLDEST_TIMESTAMP);
   }
 
   /**
@@ -41,21 +40,21 @@ public class NoOpScanPolicyObserver exte
    */
   @Override
   public InternalScanner preCompactScannerOpen(final ObserverContext<RegionCoprocessorEnvironment>
c,
-      HStore store, List<? extends KeyValueScanner> scanners, ScanType scanType, long
earliestPutTs,
+      Store store, List<? extends KeyValueScanner> scanners, ScanType scanType, long
earliestPutTs,
       InternalScanner s) throws IOException {
     // this demonstrates how to override the scanners default behavior
-    HStore.ScanInfo oldSI = store.getScanInfo();
-    HStore.ScanInfo scanInfo = new HStore.ScanInfo(store.getFamily(), oldSI.getTtl(),
+    ScanInfo oldSI = store.getScanInfo();
+    ScanInfo scanInfo = new ScanInfo(store.getFamily(), oldSI.getTtl(),
         oldSI.getTimeToPurgeDeletes(), oldSI.getComparator());
     Scan scan = new Scan();
     scan.setMaxVersions(oldSI.getMaxVersions());
-    return new StoreScanner(store, scanInfo, scan, scanners, scanType, store.getHRegion()
-        .getSmallestReadPoint(), earliestPutTs);
+    return new StoreScanner(store, scanInfo, scan, scanners, scanType, 
+        store.getSmallestReadPoint(), earliestPutTs);
   }
 
   @Override
   public KeyValueScanner preStoreScannerOpen(final ObserverContext<RegionCoprocessorEnvironment>
c,
-      HStore store, final Scan scan, final NavigableSet<byte[]> targetCols, KeyValueScanner
s)
+      Store store, final Scan scan, final NavigableSet<byte[]> targetCols, KeyValueScanner
s)
       throws IOException {
     return new StoreScanner(store, store.getScanInfo(), scan, targetCols);
   }

Modified: hbase/branches/hbase-7290v2/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestCompaction.java
URL: http://svn.apache.org/viewvc/hbase/branches/hbase-7290v2/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestCompaction.java?rev=1446179&r1=1446178&r2=1446179&view=diff
==============================================================================
--- hbase/branches/hbase-7290v2/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestCompaction.java
(original)
+++ hbase/branches/hbase-7290v2/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestCompaction.java
Thu Feb 14 13:59:06 2013
@@ -281,8 +281,8 @@ public class TestCompaction extends HBas
     final int ttl = 1000;
     for (Store hstore : this.r.stores.values()) {
       HStore store = ((HStore) hstore);
-      HStore.ScanInfo old = store.getScanInfo();
-      HStore.ScanInfo si = new HStore.ScanInfo(old.getFamily(),
+      ScanInfo old = store.getScanInfo();
+      ScanInfo si = new ScanInfo(old.getFamily(),
           old.getMinVersions(), old.getMaxVersions(), ttl,
           old.getKeepDeletedCells(), 0, old.getComparator());
       store.setScanInfo(si);
@@ -540,8 +540,8 @@ public class TestCompaction extends HBas
       final int ttl = 1000;
       for (Store hstore: this.r.stores.values()) {
         HStore store = (HStore)hstore;
-        HStore.ScanInfo old = store.getScanInfo();
-        HStore.ScanInfo si = new HStore.ScanInfo(old.getFamily(),
+        ScanInfo old = store.getScanInfo();
+        ScanInfo si = new ScanInfo(old.getFamily(),
             old.getMinVersions(), old.getMaxVersions(), ttl,
             old.getKeepDeletedCells(), 0, old.getComparator());
         store.setScanInfo(si);

Modified: hbase/branches/hbase-7290v2/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestCompactionState.java
URL: http://svn.apache.org/viewvc/hbase/branches/hbase-7290v2/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestCompactionState.java?rev=1446179&r1=1446178&r2=1446179&view=diff
==============================================================================
--- hbase/branches/hbase-7290v2/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestCompactionState.java
(original)
+++ hbase/branches/hbase-7290v2/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestCompactionState.java
Thu Feb 14 13:59:06 2013
@@ -163,7 +163,7 @@ public class TestCompactionState {
       // otherwise, the compaction should have already been done
       if (expectedState != state) {
         for (HRegion region: regions) {
-          state = CompactionRequest.getCompactionState(region.getRegionId());
+          state = region.getCompactionState();
           assertEquals(CompactionState.NONE, state);
         }
       } else {

Modified: hbase/branches/hbase-7290v2/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestDefaultCompactSelection.java
URL: http://svn.apache.org/viewvc/hbase/branches/hbase-7290v2/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestDefaultCompactSelection.java?rev=1446179&r1=1446178&r2=1446179&view=diff
==============================================================================
--- hbase/branches/hbase-7290v2/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestDefaultCompactSelection.java
(original)
+++ hbase/branches/hbase-7290v2/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestDefaultCompactSelection.java
Thu Feb 14 13:59:06 2013
@@ -39,6 +39,7 @@ import org.apache.hadoop.hbase.HTableDes
 import org.apache.hadoop.hbase.SmallTests;
 import org.apache.hadoop.hbase.io.hfile.CacheConfig;
 import org.apache.hadoop.hbase.io.hfile.NoOpDataBlockEncoder;
+import org.apache.hadoop.hbase.regionserver.compactions.CompactSelection;
 import org.apache.hadoop.hbase.regionserver.wal.HLog;
 import org.apache.hadoop.hbase.regionserver.wal.HLogFactory;
 import org.apache.hadoop.hbase.util.Bytes;
@@ -220,16 +221,25 @@ public class TestDefaultCompactSelection
 
   void compactEquals(List<StoreFile> candidates, long... expected)
     throws IOException {
-    compactEquals(candidates, false, expected);
+    compactEquals(candidates, false, false, expected);
   }
 
-  void compactEquals(List<StoreFile> candidates, boolean forcemajor,
+  void compactEquals(List<StoreFile> candidates, boolean forcemajor, long... expected)
+    throws IOException {
+    compactEquals(candidates, forcemajor, false, expected);
+  }
+
+  void compactEquals(List<StoreFile> candidates, boolean forcemajor, boolean isOffPeak,
       long ... expected)
   throws IOException {
     store.forceMajor = forcemajor;
     //Test Default compactions
-    List<StoreFile> actual = store.compactionPolicy
-      .selectCompaction(candidates, false, forcemajor).getFilesToCompact();
+    CompactSelection result = store.compactionPolicy
+        .selectCompaction(candidates, false, isOffPeak, forcemajor);
+    List<StoreFile> actual = result.getFilesToCompact();
+    if (isOffPeak && !forcemajor) {
+      assertTrue(result.isOffPeakCompaction());
+    }
     assertEquals(Arrays.toString(expected), Arrays.toString(getSizes(actual)));
     store.forceMajor = false;
   }
@@ -309,36 +319,11 @@ public class TestDefaultCompactSelection
      * current compaction algorithm.  Developed to ensure that refactoring
      * doesn't implicitly alter this.
      */
-    //long tooBig = maxSize + 1;
-
-    Calendar calendar = new GregorianCalendar();
-    int hourOfDay = calendar.get(Calendar.HOUR_OF_DAY);
-    LOG.debug("Hour of day = " + hourOfDay);
-    int hourPlusOne = ((hourOfDay+1)%24);
-    int hourMinusOne = ((hourOfDay-1+24)%24);
-    int hourMinusTwo = ((hourOfDay-2+24)%24);
-
-    // check compact selection without peak hour setting
-    LOG.debug("Testing compact selection without off-peak settings...");
-    compactEquals(sfCreate(999,50,12,12,1), 12, 12, 1);
-
     // set an off-peak compaction threshold
     this.conf.setFloat("hbase.hstore.compaction.ratio.offpeak", 5.0F);
-
-    // set peak hour to current time and check compact selection
-    this.conf.setLong("hbase.offpeak.start.hour", hourMinusOne);
-    this.conf.setLong("hbase.offpeak.end.hour", hourPlusOne);
-    LOG.debug("Testing compact selection with off-peak settings (" +
-        hourMinusOne + ", " + hourPlusOne + ")");
-    store.compactionPolicy.updateConfiguration();
-    compactEquals(sfCreate(999, 50, 12, 12, 1), 50, 12, 12, 1);
-
-    // set peak hour outside current selection and check compact selection
-    this.conf.setLong("hbase.offpeak.start.hour", hourMinusTwo);
-    this.conf.setLong("hbase.offpeak.end.hour", hourMinusOne);
     store.compactionPolicy.updateConfiguration();
-    LOG.debug("Testing compact selection with off-peak settings (" +
-        hourMinusTwo + ", " + hourMinusOne + ")");
-    compactEquals(sfCreate(999,50,12,12, 1), 12, 12, 1);
+    // Test with and without the flag.
+    compactEquals(sfCreate(999, 50, 12, 12, 1), false, true, 50, 12, 12, 1);
+    compactEquals(sfCreate(999, 50, 12, 12, 1), 12, 12, 1);
   }
 }

Modified: hbase/branches/hbase-7290v2/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestMemStore.java
URL: http://svn.apache.org/viewvc/hbase/branches/hbase-7290v2/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestMemStore.java?rev=1446179&r1=1446178&r2=1446179&view=diff
==============================================================================
--- hbase/branches/hbase-7290v2/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestMemStore.java
(original)
+++ hbase/branches/hbase-7290v2/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestMemStore.java
Thu Feb 14 13:59:06 2013
@@ -34,7 +34,7 @@ import org.apache.commons.logging.LogFac
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.hbase.*;
 import org.apache.hadoop.hbase.client.Scan;
-import org.apache.hadoop.hbase.regionserver.HStore.ScanInfo;
+import org.apache.hadoop.hbase.regionserver.ScanInfo;
 import org.apache.hadoop.hbase.util.Bytes;
 
 import com.google.common.base.Joiner;

Modified: hbase/branches/hbase-7290v2/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestQueryMatcher.java
URL: http://svn.apache.org/viewvc/hbase/branches/hbase-7290v2/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestQueryMatcher.java?rev=1446179&r1=1446178&r2=1446179&view=diff
==============================================================================
--- hbase/branches/hbase-7290v2/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestQueryMatcher.java
(original)
+++ hbase/branches/hbase-7290v2/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestQueryMatcher.java
Thu Feb 14 13:59:06 2013
@@ -98,7 +98,7 @@ public class TestQueryMatcher extends HB
 
     // 2,4,5
     
-    ScanQueryMatcher qm = new ScanQueryMatcher(scan, new HStore.ScanInfo(fam2,
+    ScanQueryMatcher qm = new ScanQueryMatcher(scan, new ScanInfo(fam2,
         0, 1, ttl, false, 0, rowComparator), get.getFamilyMap().get(fam2),
         EnvironmentEdgeManager.currentTimeMillis() - ttl);
 
@@ -144,7 +144,7 @@ public class TestQueryMatcher extends HB
     expected.add(ScanQueryMatcher.MatchCode.INCLUDE);
     expected.add(ScanQueryMatcher.MatchCode.DONE);
 
-    ScanQueryMatcher qm = new ScanQueryMatcher(scan, new HStore.ScanInfo(fam2,
+    ScanQueryMatcher qm = new ScanQueryMatcher(scan, new ScanInfo(fam2,
         0, 1, ttl, false, 0, rowComparator), null,
         EnvironmentEdgeManager.currentTimeMillis() - ttl);
 
@@ -198,7 +198,7 @@ public class TestQueryMatcher extends HB
     };
 
     long now = EnvironmentEdgeManager.currentTimeMillis();
-    ScanQueryMatcher qm = new ScanQueryMatcher(scan, new HStore.ScanInfo(fam2,
+    ScanQueryMatcher qm = new ScanQueryMatcher(scan, new ScanInfo(fam2,
         0, 1, testTTL, false, 0, rowComparator), get.getFamilyMap().get(fam2),
         now - testTTL);
 
@@ -252,7 +252,7 @@ public class TestQueryMatcher extends HB
     };
 
     long now = EnvironmentEdgeManager.currentTimeMillis();
-    ScanQueryMatcher qm = new ScanQueryMatcher(scan, new HStore.ScanInfo(fam2,
+    ScanQueryMatcher qm = new ScanQueryMatcher(scan, new ScanInfo(fam2,
         0, 1, testTTL, false, 0, rowComparator), null,
         now - testTTL);
 

Modified: hbase/branches/hbase-7290v2/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestStore.java
URL: http://svn.apache.org/viewvc/hbase/branches/hbase-7290v2/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestStore.java?rev=1446179&r1=1446178&r2=1446179&view=diff
==============================================================================
--- hbase/branches/hbase-7290v2/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestStore.java
(original)
+++ hbase/branches/hbase-7290v2/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestStore.java
Thu Feb 14 13:59:06 2013
@@ -324,7 +324,7 @@ public class TestStore extends TestCase 
     this.store = new HStore(storedir.getParent().getParent(),
       this.store.getHRegion(),
       this.store.getFamily(), fs, c);
-    System.out.println(this.store.getHRegionInfo().getEncodedName());
+    System.out.println(this.store.getRegionInfo().getEncodedName());
     assertEquals(2, this.store.getStorefilesCount());
 
     result = HBaseTestingUtility.getFromStoreFile(store,

Modified: hbase/branches/hbase-7290v2/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestStoreScanner.java
URL: http://svn.apache.org/viewvc/hbase/branches/hbase-7290v2/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestStoreScanner.java?rev=1446179&r1=1446178&r2=1446179&view=diff
==============================================================================
--- hbase/branches/hbase-7290v2/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestStoreScanner.java
(original)
+++ hbase/branches/hbase-7290v2/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestStoreScanner.java
Thu Feb 14 13:59:06 2013
@@ -36,7 +36,7 @@ import org.apache.hadoop.hbase.KeyValue;
 import org.apache.hadoop.hbase.KeyValueTestUtil;
 import org.apache.hadoop.hbase.MediumTests;
 import org.apache.hadoop.hbase.client.Scan;
-import org.apache.hadoop.hbase.regionserver.HStore.ScanInfo;
+import org.apache.hadoop.hbase.regionserver.ScanInfo;
 import org.apache.hadoop.hbase.util.Bytes;
 import org.apache.hadoop.hbase.util.EnvironmentEdge;
 import org.apache.hadoop.hbase.util.EnvironmentEdgeManagerTestHelper;
@@ -547,7 +547,7 @@ public class TestStoreScanner extends Te
       List<KeyValueScanner> scanners = scanFixture(kvs);
       Scan scan = new Scan();
       scan.setMaxVersions(2);
-      HStore.ScanInfo scanInfo = new HStore.ScanInfo(Bytes.toBytes("cf"),
+      ScanInfo scanInfo = new ScanInfo(Bytes.toBytes("cf"),
         0 /* minVersions */,
         2 /* maxVersions */, 500 /* ttl */,
         false /* keepDeletedCells */,

Modified: hbase/branches/hbase-7290v2/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/compactions/PerfTestCompactionPolicies.java
URL: http://svn.apache.org/viewvc/hbase/branches/hbase-7290v2/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/compactions/PerfTestCompactionPolicies.java?rev=1446179&r1=1446178&r2=1446179&view=diff
==============================================================================
--- hbase/branches/hbase-7290v2/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/compactions/PerfTestCompactionPolicies.java
(original)
+++ hbase/branches/hbase-7290v2/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/compactions/PerfTestCompactionPolicies.java
Thu Feb 14 13:59:06 2013
@@ -170,7 +170,7 @@ public class PerfTestCompactionPolicies 
   private List<StoreFile> runIteration(List<StoreFile> startingStoreFiles) throws
IOException {
 
     List<StoreFile> storeFiles = new ArrayList<StoreFile>(startingStoreFiles);
-    CompactSelection sel = cp.selectCompaction(storeFiles, false, false);
+    CompactSelection sel = cp.selectCompaction(storeFiles, false, false, false);
     int newFileSize = 0;
 
     List<StoreFile> filesToCompact = sel.getFilesToCompact();

Modified: hbase/branches/hbase-7290v2/hbase-server/src/test/java/org/apache/hadoop/hbase/util/TestCoprocessorScanPolicy.java
URL: http://svn.apache.org/viewvc/hbase/branches/hbase-7290v2/hbase-server/src/test/java/org/apache/hadoop/hbase/util/TestCoprocessorScanPolicy.java?rev=1446179&r1=1446178&r2=1446179&view=diff
==============================================================================
--- hbase/branches/hbase-7290v2/hbase-server/src/test/java/org/apache/hadoop/hbase/util/TestCoprocessorScanPolicy.java
(original)
+++ hbase/branches/hbase-7290v2/hbase-server/src/test/java/org/apache/hadoop/hbase/util/TestCoprocessorScanPolicy.java
Thu Feb 14 13:59:06 2013
@@ -47,7 +47,8 @@ import org.apache.hadoop.hbase.coprocess
 import org.apache.hadoop.hbase.regionserver.InternalScanner;
 import org.apache.hadoop.hbase.regionserver.KeyValueScanner;
 import org.apache.hadoop.hbase.regionserver.ScanType;
-import org.apache.hadoop.hbase.regionserver.HStore;
+import org.apache.hadoop.hbase.regionserver.Store;
+import org.apache.hadoop.hbase.regionserver.ScanInfo;
 import org.apache.hadoop.hbase.regionserver.StoreScanner;
 import org.apache.hadoop.hbase.regionserver.wal.WALEdit;
 import org.apache.hadoop.hbase.util.Bytes;
@@ -204,53 +205,55 @@ public class TestCoprocessorScanPolicy {
     }
 
     @Override
-    public InternalScanner preFlushScannerOpen(final ObserverContext<RegionCoprocessorEnvironment>
c,
-        HStore store, KeyValueScanner memstoreScanner, InternalScanner s) throws IOException
{
+    public InternalScanner preFlushScannerOpen(
+        final ObserverContext<RegionCoprocessorEnvironment> c,
+        Store store, KeyValueScanner memstoreScanner, InternalScanner s) throws IOException
{
       Long newTtl = ttls.get(store.getTableName());
       if (newTtl != null) {
         System.out.println("PreFlush:" + newTtl);
       }
       Integer newVersions = versions.get(store.getTableName());
-      HStore.ScanInfo oldSI = store.getScanInfo();
+      ScanInfo oldSI = store.getScanInfo();
       HColumnDescriptor family = store.getFamily();
-      HStore.ScanInfo scanInfo = new HStore.ScanInfo(family.getName(), family.getMinVersions(),
+      ScanInfo scanInfo = new ScanInfo(family.getName(), family.getMinVersions(),
           newVersions == null ? family.getMaxVersions() : newVersions,
           newTtl == null ? oldSI.getTtl() : newTtl, family.getKeepDeletedCells(),
           oldSI.getTimeToPurgeDeletes(), oldSI.getComparator());
       Scan scan = new Scan();
       scan.setMaxVersions(newVersions == null ? oldSI.getMaxVersions() : newVersions);
       return new StoreScanner(store, scanInfo, scan, Collections.singletonList(memstoreScanner),
-          ScanType.MINOR_COMPACT, store.getHRegion().getSmallestReadPoint(),
+          ScanType.MINOR_COMPACT, store.getSmallestReadPoint(),
           HConstants.OLDEST_TIMESTAMP);
     }
 
     @Override
-    public InternalScanner preCompactScannerOpen(final ObserverContext<RegionCoprocessorEnvironment>
c,
-        HStore store, List<? extends KeyValueScanner> scanners, ScanType scanType,
+    public InternalScanner preCompactScannerOpen(
+        final ObserverContext<RegionCoprocessorEnvironment> c,
+        Store store, List<? extends KeyValueScanner> scanners, ScanType scanType,
         long earliestPutTs, InternalScanner s) throws IOException {
       Long newTtl = ttls.get(store.getTableName());
       Integer newVersions = versions.get(store.getTableName());
-      HStore.ScanInfo oldSI = store.getScanInfo();
+      ScanInfo oldSI = store.getScanInfo();
       HColumnDescriptor family = store.getFamily();
-      HStore.ScanInfo scanInfo = new HStore.ScanInfo(family.getName(), family.getMinVersions(),
+      ScanInfo scanInfo = new ScanInfo(family.getName(), family.getMinVersions(),
           newVersions == null ? family.getMaxVersions() : newVersions,
           newTtl == null ? oldSI.getTtl() : newTtl, family.getKeepDeletedCells(),
           oldSI.getTimeToPurgeDeletes(), oldSI.getComparator());
       Scan scan = new Scan();
       scan.setMaxVersions(newVersions == null ? oldSI.getMaxVersions() : newVersions);
-      return new StoreScanner(store, scanInfo, scan, scanners, scanType, store.getHRegion()
-          .getSmallestReadPoint(), earliestPutTs);
+      return new StoreScanner(store, scanInfo, scan, scanners, scanType,
+          store.getSmallestReadPoint(), earliestPutTs);
     }
 
     @Override
     public KeyValueScanner preStoreScannerOpen(
-        final ObserverContext<RegionCoprocessorEnvironment> c, HStore store, final
Scan scan,
+        final ObserverContext<RegionCoprocessorEnvironment> c, Store store, final Scan
scan,
         final NavigableSet<byte[]> targetCols, KeyValueScanner s) throws IOException
{
       Long newTtl = ttls.get(store.getTableName());
       Integer newVersions = versions.get(store.getTableName());
-      HStore.ScanInfo oldSI = store.getScanInfo();
+      ScanInfo oldSI = store.getScanInfo();
       HColumnDescriptor family = store.getFamily();
-      HStore.ScanInfo scanInfo = new HStore.ScanInfo(family.getName(), family.getMinVersions(),
+      ScanInfo scanInfo = new ScanInfo(family.getName(), family.getMinVersions(),
           newVersions == null ? family.getMaxVersions() : newVersions,
           newTtl == null ? oldSI.getTtl() : newTtl, family.getKeepDeletedCells(),
           oldSI.getTimeToPurgeDeletes(), oldSI.getComparator());



Mime
View raw message