Examples of MonthFieldPartitioner


Examples of com.cloudera.cdk.data.partition.MonthFieldPartitioner

    Assert.assertEquals("day=01",
        convert.dirnameForValue(
            new DayOfMonthFieldPartitioner("timestamp", "day"), 1));
    Assert.assertEquals("month=01",
        convert.dirnameForValue(
            new MonthFieldPartitioner("timestamp", "month"), 1));
    Assert.assertEquals("year=2013",
        convert.dirnameForValue(
            new YearFieldPartitioner("timestamp", "year"), 2013));
  }
View Full Code Here

Examples of com.cloudera.cdk.data.partition.MonthFieldPartitioner

  public void testIgnoresPartitionName() {
    Assert.assertEquals("10", convert.valueStringForDirname("10"));
    Assert.assertEquals("10", convert.valueStringForDirname("=10"));
    Assert.assertEquals("10", convert.valueStringForDirname("anything=10"));
    Assert.assertEquals(10, (int) convert.valueForDirname(
        new MonthFieldPartitioner("timestamp", "month"), "10"));
    Assert.assertEquals(10, (int) convert.valueForDirname(
        new MonthFieldPartitioner("timestamp", "month"), "=10"));
    Assert.assertEquals(10, (int) convert.valueForDirname(
        new MonthFieldPartitioner("timestamp", "month"), "anything=10"));
    Assert.assertEquals(10, (int) convert.valueForDirname(
        new MonthFieldPartitioner("timestamp", "month"), "even=strange=10"));
  }
View Full Code Here

Examples of com.cloudera.cdk.data.partition.MonthFieldPartitioner

  }

  @Test
  public void testNoValidation() {
    Assert.assertEquals(13, (int) convert.valueForDirname(
        new MonthFieldPartitioner("timestamp", "month"), "month=13"));
  }
View Full Code Here

Examples of org.kitesdk.data.spi.partition.MonthFieldPartitioner

    Assert.assertEquals("day=01",
        convert.dirnameForValue(
            new DayOfMonthFieldPartitioner("timestamp", "day"), 1));
    Assert.assertEquals("month=01",
        convert.dirnameForValue(
            new MonthFieldPartitioner("timestamp", "month"), 1));
    Assert.assertEquals("year=2013",
        convert.dirnameForValue(
            new YearFieldPartitioner("timestamp", "year"), 2013));
  }
View Full Code Here

Examples of org.kitesdk.data.spi.partition.MonthFieldPartitioner

  public void testIgnoresPartitionName() {
    Assert.assertEquals("10", convert.dirnameToValueString("10"));
    Assert.assertEquals("10", convert.dirnameToValueString("=10"));
    Assert.assertEquals("10", convert.dirnameToValueString("anything=10"));
    Assert.assertEquals(10, (int) convert.valueForDirname(
        new MonthFieldPartitioner("timestamp", "month"), "10"));
    Assert.assertEquals(10, (int) convert.valueForDirname(
        new MonthFieldPartitioner("timestamp", "month"), "=10"));
    Assert.assertEquals(10, (int) convert.valueForDirname(
        new MonthFieldPartitioner("timestamp", "month"), "anything=10"));
    Assert.assertEquals(10, (int) convert.valueForDirname(
        new MonthFieldPartitioner("timestamp", "month"), "even=strange=10"));
  }
View Full Code Here

Examples of org.kitesdk.data.spi.partition.MonthFieldPartitioner

  }

  @Test
  public void testNoValidation() {
    Assert.assertEquals(13, (int) convert.valueForDirname(
        new MonthFieldPartitioner("timestamp", "month"), "month=13"));
  }
View Full Code Here

Examples of org.kitesdk.data.spi.partition.MonthFieldPartitioner

     *          The entity field name of the partition.
     * @return An instance of the builder for method chaining.
     * @since 0.3.0
     */
    public Builder month(String sourceName, @Nullable String name) {
      add(new MonthFieldPartitioner(sourceName, name));
      return this;
    }
View Full Code Here

Examples of org.kitesdk.data.spi.partition.MonthFieldPartitioner

     *          partitioned.
     * @return An instance of the builder for method chaining.
     * @since 0.8.0
     */
    public Builder month(String sourceName) {
      add(new MonthFieldPartitioner(sourceName));
      return this;
    }
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.