java/kudu-client/src/test/java/org/apache/kudu/client/TestKuduClient.java
@Test(timeout = 100000)
  public void testScanNonCoveredTable() throws Exception {
    syncClient.createTable(tableName, basicSchema, getBasicTableOptionsWithNonCoveredRange());

    KuduSession session = syncClient.newSession();
    session.setFlushMode(SessionConfiguration.FlushMode.AUTO_FLUSH_BACKGROUND);
    KuduTable table = syncClient.openTable(tableName);

    for (int key = 0; key < 100; key++) {
      session.apply(createBasicSchemaInsert(table, key));
    }
    for (int key = 200; key < 300; key++) {
      session.apply(createBasicSchemaInsert(table, key));
    }
    session.flush();
    assertEquals(0, session.countPendingErrors());

    assertEquals(200, countRowsForTestScanNonCoveredTable(table, null, null));
    assertEquals(100, countRowsForTestScanNonCoveredTable(table, null, 200));
    assertEquals(0, countRowsForTestScanNonCoveredTable(table, null, -1));
    assertEquals(0, countRowsForTestScanNonCoveredTable(table, 120, 180));
    assertEquals(0, countRowsForTestScanNonCoveredTable(table, 300, null));
  }
/**
   * Tests scanning a table with non-covering range partitions.
   */
Tests scanning a table with non-covering range partitions.
Tests scanning a table with non - covering range partitions .
@Test(timeout = 100000)
  public void testScanNonCoveredTable() throws Exception {
    syncClient.createTable(tableName, basicSchema, getBasicTableOptionsWithNonCoveredRange());
    KuduSession session = syncClient.newSession();
    session.setFlushMode(SessionConfiguration.FlushMode.AUTO_FLUSH_BACKGROUND);
    KuduTable table = syncClient.openTable(tableName);
    for (int key = 0; key < 100; key++) {
      session.apply(createBasicSchemaInsert(table, key));
    }
    for (int key = 200; key < 300; key++) {
      session.apply(createBasicSchemaInsert(table, key));
    }
    session.flush();
    assertEquals(0, session.countPendingErrors());
    assertEquals(200, countRowsForTestScanNonCoveredTable(table, null, null));
    assertEquals(100, countRowsForTestScanNonCoveredTable(table, null, 200));
    assertEquals(0, countRowsForTestScanNonCoveredTable(table, null, -1));
    assertEquals(0, countRowsForTestScanNonCoveredTable(table, 120, 180));
    assertEquals(0, countRowsForTestScanNonCoveredTable(table, 300, null));
  }
@ Test ( timeout = 100000 ) public void testScanNonCoveredTable ( ) throws Exception { syncClient . createTable ( tableName , basicSchema , getBasicTableOptionsWithNonCoveredRange ( ) ) ; KuduSession session = syncClient . newSession ( ) ; session . setFlushMode ( SessionConfiguration . FlushMode . AUTO_FLUSH_BACKGROUND ) ; KuduTable table = syncClient . openTable ( tableName ) ; for ( int key = 0 ; key < 100 ; key ++ ) { session . apply ( createBasicSchemaInsert ( table , key ) ) ; } for ( int key = 200 ; key < 300 ; key ++ ) { session . apply ( createBasicSchemaInsert ( table , key ) ) ; } session . flush ( ) ; assertEquals ( 0 , session . countPendingErrors ( ) ) ; assertEquals ( 200 , countRowsForTestScanNonCoveredTable ( table , null , null ) ) ; assertEquals ( 100 , countRowsForTestScanNonCoveredTable ( table , null , 200 ) ) ; assertEquals ( 0 , countRowsForTestScanNonCoveredTable ( table , null , - 1 ) ) ; assertEquals ( 0 , countRowsForTestScanNonCoveredTable ( table , 120 , 180 ) ) ; assertEquals ( 0 , countRowsForTestScanNonCoveredTable ( table , 300 , null ) ) ; }
Tests scanning a table with non-covering range partitions.
Tests scanning a table with non - covering range partitions .