Package com.cloudera.cdk.data.spi

Examples of com.cloudera.cdk.data.spi.Marker


    assertIterableEquals(keys, partitions);
  }

  @Test
  public void testFromKey() throws Exception {
    Marker october_24_2013 = new Marker.Builder().add("year", 2013).add("month", 10).add("day", 24).build();
    Iterable<StorageKey> partitions = new FileSystemPartitionIterator(
        fileSystem, testDirectory, strategy, unbounded.from(october_24_2013));
    assertIterableEquals(keys.subList(16, 24), partitions);
  }
View Full Code Here


    assertIterableEquals(keys.subList(16, 24), partitions);
  }

  @Test
  public void testAfterKey() throws Exception {
    Marker october_24_2013 = new Marker.Builder().add("year", 2013).add("month", 10).add("day", 24).build();
    Iterable<StorageKey> partitions = new FileSystemPartitionIterator(
        fileSystem, testDirectory, strategy, unbounded.fromAfter(october_24_2013));
    assertIterableEquals(keys.subList(17, 24), partitions);
  }
View Full Code Here

    assertIterableEquals(keys.subList(17, 24), partitions);
  }

  @Test
  public void testToKey() throws Exception {
    Marker october_25_2012 = new Marker.Builder().add("year", 2012).add("month", 10).add("day", 25).build();
    Iterable<StorageKey> partitions = new FileSystemPartitionIterator(
        fileSystem, testDirectory, strategy, unbounded.to(october_25_2012));
    assertIterableEquals(keys.subList(0, 6), partitions);
  }
View Full Code Here

    assertIterableEquals(keys.subList(0, 6), partitions);
  }

  @Test
  public void testBeforeKey() throws Exception {
    Marker october_25_2012 = new Marker.Builder().add("year", 2012).add("month", 10).add("day", 25).build();
    Iterable <StorageKey> partitions = new FileSystemPartitionIterator(
        fileSystem, testDirectory, strategy, unbounded.toBefore(october_25_2012));
    assertIterableEquals(keys.subList(0, 5), partitions);
  }
View Full Code Here

    assertIterableEquals(keys.subList(0, 5), partitions);
  }

  @Test
  public void testInKey() throws Exception {
    Marker october_24_2013 = new Marker.Builder().add("year", 2013).add("month", 10).add("day", 24).build();
    Iterable<StorageKey> partitions = new FileSystemPartitionIterator(
        fileSystem, testDirectory, strategy, unbounded.of(october_24_2013));
    assertIterableEquals(keys.subList(16, 17), partitions);
  }
View Full Code Here

    assertIterableEquals(keys.subList(16, 17), partitions);
  }

  @Test
  public void testKeyRange() throws Exception {
    Marker october_25_2012 = new Marker.Builder().add("year", 2012).add("month", 10).add("day", 25).build();
    Marker october_24_2013 = new Marker.Builder().add("year", 2013).add("month", 10).add("day", 24).build();
    Iterable <StorageKey> partitions = new FileSystemPartitionIterator(
        fileSystem, testDirectory, strategy, unbounded.from(october_25_2012).to(october_24_2013));
    assertIterableEquals(keys.subList(5, 17), partitions);
  }
View Full Code Here

    assertIterableEquals(keys.subList(5, 17), partitions);
  }

  @Test
  public void testFromMarker() throws Exception {
    Marker october_2013 = new Marker.Builder().add("year", 2013).add("month", 10).build();
    Iterable <StorageKey> partitions = new FileSystemPartitionIterator(
        fileSystem, testDirectory, strategy, unbounded.from(october_2013));
    assertIterableEquals(keys.subList(15, 24), partitions);
  }
View Full Code Here

    assertIterableEquals(keys.subList(15, 24), partitions);
  }

  @Test
  public void testAfterMarker() throws Exception {
    Marker october_2013 = new Marker.Builder().add("year", 2013).add("month", 10).build();
    Iterable<StorageKey> partitions = new FileSystemPartitionIterator(
        fileSystem, testDirectory, strategy, unbounded.fromAfter(october_2013));
    assertIterableEquals(keys.subList(18, 24), partitions);
  }
View Full Code Here

    assertIterableEquals(keys.subList(18, 24), partitions);
  }

  @Test
  public void testToMarker() throws Exception {
    Marker october_2012 = new Marker.Builder().add("year", 2012).add("month", 10).build();
    Iterable <StorageKey> partitions = new FileSystemPartitionIterator(
        fileSystem, testDirectory, strategy, unbounded.to(october_2012));
    assertIterableEquals(keys.subList(0, 6), partitions);
  }
View Full Code Here

    assertIterableEquals(keys.subList(0, 6), partitions);
  }

  @Test
  public void testBeforeMarker() throws Exception {
    Marker october_2012 = new Marker.Builder().add("year", 2012).add("month", 10).build();
    Iterable<StorageKey> partitions = new FileSystemPartitionIterator(
        fileSystem, testDirectory, strategy, unbounded.toBefore(october_2012));
    assertIterableEquals(keys.subList(0, 3), partitions);
  }
View Full Code Here

TOP

Related Classes of com.cloudera.cdk.data.spi.Marker

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.