Package com.cloudera.cdk.data.partition

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


  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

  }

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

TOP

Related Classes of com.cloudera.cdk.data.partition.MonthFieldPartitioner

Copyright © 2018 www.massapicom. 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.