Search in sources :

Example 1 with StoreScanner

use of uk.gov.gchq.gaffer.hbasestore.coprocessor.scanner.StoreScanner in project Gaffer by gchq.

the class GafferCoprocessorTest method shouldDelegatePreFlushToStoreScanner.

@Test
public void shouldDelegatePreFlushToStoreScanner() throws IOException {
    // Given
    final ObserverContext<RegionCoprocessorEnvironment> e = mock(ObserverContext.class);
    final Store store = mock(Store.class);
    final InternalScanner scanner = mock(InternalScanner.class);
    // When
    final StoreScanner storeScanner = (StoreScanner) coprocessor.preFlush(e, store, scanner);
    // Then
    assertNotNull(storeScanner);
}
Also used : RegionCoprocessorEnvironment(org.apache.hadoop.hbase.coprocessor.RegionCoprocessorEnvironment) InternalScanner(org.apache.hadoop.hbase.regionserver.InternalScanner) Store(org.apache.hadoop.hbase.regionserver.Store) StoreScanner(uk.gov.gchq.gaffer.hbasestore.coprocessor.scanner.StoreScanner) Test(org.junit.jupiter.api.Test)

Example 2 with StoreScanner

use of uk.gov.gchq.gaffer.hbasestore.coprocessor.scanner.StoreScanner in project Gaffer by gchq.

the class GafferCoprocessorTest method shouldDelegatePreCompactToStoreScanner.

@Test
public void shouldDelegatePreCompactToStoreScanner() throws IOException {
    // Given
    final ObserverContext<RegionCoprocessorEnvironment> e = mock(ObserverContext.class);
    final Store store = mock(Store.class);
    final InternalScanner scanner = mock(InternalScanner.class);
    // When
    final StoreScanner storeScanner = (StoreScanner) coprocessor.preCompact(e, store, scanner, ScanType.COMPACT_DROP_DELETES);
    // Then
    assertNotNull(storeScanner);
}
Also used : RegionCoprocessorEnvironment(org.apache.hadoop.hbase.coprocessor.RegionCoprocessorEnvironment) InternalScanner(org.apache.hadoop.hbase.regionserver.InternalScanner) Store(org.apache.hadoop.hbase.regionserver.Store) StoreScanner(uk.gov.gchq.gaffer.hbasestore.coprocessor.scanner.StoreScanner) Test(org.junit.jupiter.api.Test)

Example 3 with StoreScanner

use of uk.gov.gchq.gaffer.hbasestore.coprocessor.scanner.StoreScanner in project Gaffer by gchq.

the class GafferCoprocessorTest method shouldDelegatePreCompactWithRequestToStoreScanner.

@Test
public void shouldDelegatePreCompactWithRequestToStoreScanner() throws IOException {
    // Given
    final ObserverContext<RegionCoprocessorEnvironment> e = mock(ObserverContext.class);
    final Store store = mock(Store.class);
    final InternalScanner scanner = mock(InternalScanner.class);
    final CompactionRequest request = mock(CompactionRequest.class);
    // When
    final StoreScanner storeScanner = (StoreScanner) coprocessor.preCompact(e, store, scanner, ScanType.COMPACT_DROP_DELETES, request);
    // Then
    assertNotNull(storeScanner);
}
Also used : RegionCoprocessorEnvironment(org.apache.hadoop.hbase.coprocessor.RegionCoprocessorEnvironment) InternalScanner(org.apache.hadoop.hbase.regionserver.InternalScanner) Store(org.apache.hadoop.hbase.regionserver.Store) CompactionRequest(org.apache.hadoop.hbase.regionserver.compactions.CompactionRequest) StoreScanner(uk.gov.gchq.gaffer.hbasestore.coprocessor.scanner.StoreScanner) Test(org.junit.jupiter.api.Test)

Aggregations

RegionCoprocessorEnvironment (org.apache.hadoop.hbase.coprocessor.RegionCoprocessorEnvironment)3 InternalScanner (org.apache.hadoop.hbase.regionserver.InternalScanner)3 Store (org.apache.hadoop.hbase.regionserver.Store)3 Test (org.junit.jupiter.api.Test)3 StoreScanner (uk.gov.gchq.gaffer.hbasestore.coprocessor.scanner.StoreScanner)3 CompactionRequest (org.apache.hadoop.hbase.regionserver.compactions.CompactionRequest)1