Examples of IntegerSplitter


Examples of com.cloudera.sqoop.mapreduce.db.IntegerSplitter

    case Types.INTEGER:
    case Types.TINYINT:
    case Types.SMALLINT:
    case Types.BIGINT:
      return new IntegerSplitter();

    case Types.REAL:
    case Types.FLOAT:
    case Types.DOUBLE:
      return new FloatSplitter();
View Full Code Here

Examples of com.cloudera.sqoop.mapreduce.db.IntegerSplitter

          + ". Actual array is " + formatLongArray(actual));
    }
  }

  public void testEvenSplits() throws SQLException {
    List<Long> splits = new IntegerSplitter().split(10, 0, 100);
    long [] expected = { 0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, };
    assertLongArrayEquals(expected, toLongArray(splits));
  }
View Full Code Here

Examples of com.cloudera.sqoop.mapreduce.db.IntegerSplitter

    long [] expected = { 0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, };
    assertLongArrayEquals(expected, toLongArray(splits));
  }

  public void testOddSplits() throws SQLException {
    List<Long> splits = new IntegerSplitter().split(10, 0, 95);
    long [] expected = { 0, 10, 20, 30, 40, 50, 59, 68, 77, 86, 95, };
    assertLongArrayEquals(expected, toLongArray(splits));
  }
View Full Code Here

Examples of com.cloudera.sqoop.mapreduce.db.IntegerSplitter

    long [] expected = { 0, 10, 20, 30, 40, 50, 59, 68, 77, 86, 95, };
    assertLongArrayEquals(expected, toLongArray(splits));
  }

  public void testSingletonSplit() throws SQLException {
    List<Long> splits = new IntegerSplitter().split(1, 5, 5);
    long [] expected = { 5, 5 };
    assertLongArrayEquals(expected, toLongArray(splits));
  }
View Full Code Here

Examples of com.cloudera.sqoop.mapreduce.db.IntegerSplitter

    assertLongArrayEquals(expected, toLongArray(splits));
  }

  public void testSingletonSplit2() throws SQLException {
    // Same test, but overly-high numSplits
    List<Long> splits = new IntegerSplitter().split(5, 5, 5);
    long [] expected = { 5, 5 };
    assertLongArrayEquals(expected, toLongArray(splits));
  }
View Full Code Here

Examples of com.cloudera.sqoop.mapreduce.db.IntegerSplitter

    long [] expected = { 5, 5 };
    assertLongArrayEquals(expected, toLongArray(splits));
  }

  public void testTooManySplits() throws SQLException {
    List<Long> splits = new IntegerSplitter().split(5, 3, 5);
    long [] expected = { 3, 4, 5, 5};
    assertLongArrayEquals(expected, toLongArray(splits));
  }
View Full Code Here

Examples of com.cloudera.sqoop.mapreduce.db.IntegerSplitter

    long [] expected = { 3, 4, 5, 5};
    assertLongArrayEquals(expected, toLongArray(splits));
  }

  public void testExactSplitsAsInterval() throws SQLException {
    List<Long> splits = new IntegerSplitter().split(5, 1, 5);
    long [] expected = { 1, 2, 3, 4, 5, 5};
    assertLongArrayEquals(expected, toLongArray(splits));
  }
View Full Code Here

Examples of com.cloudera.sqoop.mapreduce.db.IntegerSplitter

   * algorithm.
   *
   * @throws SQLException
   */
  public void testBigIntSplits() throws SQLException {
    List<Long> splits = new IntegerSplitter().split(4, 14,
        7863696997872966707L);
    assertEquals(splits.size(), 5);
  }
View Full Code Here

Examples of com.cloudera.sqoop.mapreduce.db.IntegerSplitter

    case Types.INTEGER:
    case Types.TINYINT:
    case Types.SMALLINT:
    case Types.BIGINT:
      return new IntegerSplitter();

    case Types.REAL:
    case Types.FLOAT:
    case Types.DOUBLE:
      return new FloatSplitter();
View Full Code Here

Examples of com.cloudera.sqoop.mapreduce.db.IntegerSplitter

    case Types.INTEGER:
    case Types.TINYINT:
    case Types.SMALLINT:
    case Types.BIGINT:
      return new IntegerSplitter();

    case Types.REAL:
    case Types.FLOAT:
    case Types.DOUBLE:
      return new FloatSplitter();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.