Search in sources :

Example 6 with BigtableSource

use of org.apache.beam.sdk.io.gcp.bigtable.BigtableIO.BigtableSource in project beam by apache.

the class BigtableIOTest method testReadingSplitAtFractionExhaustive.

/**
   * Tests dynamic work rebalancing exhaustively.
   */
@Test
public void testReadingSplitAtFractionExhaustive() throws Exception {
    final String table = "TEST-FEW-ROWS-SPLIT-EXHAUSTIVE-TABLE";
    final int numRows = 10;
    final int numSamples = 1;
    final long bytesPerRow = 1L;
    makeTableData(table, numRows);
    service.setupSampleRowKeys(table, numSamples, bytesPerRow);
    BigtableSource source = new BigtableSource(serviceFactory, table, null, service.getTableRange(table), null);
    assertSplitAtFractionExhaustive(source, null);
}
Also used : ByteString(com.google.protobuf.ByteString) BigtableSource(org.apache.beam.sdk.io.gcp.bigtable.BigtableIO.BigtableSource) Test(org.junit.Test)

Aggregations

ByteString (com.google.protobuf.ByteString)6 BigtableSource (org.apache.beam.sdk.io.gcp.bigtable.BigtableIO.BigtableSource)6 Test (org.junit.Test)6 Row (com.google.bigtable.v2.Row)1 RowFilter (com.google.bigtable.v2.RowFilter)1