@Test public void testViewForRelativeUri() { Path path = new Path("/tmp/datasets/ns/test/y=2014/m=03/d=14"); View<GenericRecord> view = FileSystemDatasets.viewForUri( dataset, "y=2014/m=03/d=14"); Assert.assertEquals("Should create correct view", view, dataset.getPartitionView(path)); Constraints expected = ((AbstractRefinableView<GenericRecord>) dataset.with("y", 2014).with("m", 3).with("d", 14)).getConstraints(); Constraints actual = ((AbstractRefinableView<GenericRecord>) view) .getConstraints(); Assert.assertEquals("Constraints should match expected", expected, actual); }
public static <E> View<E> viewForUri(Dataset<E> dataset, URI uri) { if (dataset instanceof FileSystemDataset) { return ((FileSystemDataset<E>) dataset).viewForUri(uri); } throw new IllegalArgumentException("Not a file system dataset: " + dataset); }
FileSystemDatasets { public static <E> View<E> viewForUri(Dataset<E> dataset, URI uri) { if (dataset instanceof FileSystemDataset) { return ((FileSystemDataset<E>) dataset).viewForUri(uri); } throw new IllegalArgumentException("Not a file system dataset: " + dataset); } }
FileSystemDatasets { public static <E> View<E> viewForUri(Dataset<E> dataset, URI uri) { if (dataset instanceof FileSystemDataset) { return ((FileSystemDataset<E>) dataset).viewForUri(uri); } throw new IllegalArgumentException("Not a file system dataset: " + dataset); }  }
FileSystemDatasets { public static <E> View<E> viewForUri(Dataset<E> dataset, URI uri) { if (dataset instanceof FileSystemDataset) { return ((FileSystemDataset<E>) dataset).viewForUri(uri); } throw new IllegalArgumentException("Not a file system dataset: " + dataset); }  static View<E> viewForUri(Dataset<E> dataset, URI uri); static View<E> viewForUri(Dataset<E> dataset, String uri); static View<E> viewForPath(Dataset<E> dataset, Path path); }
FileSystemDatasets { public static <E> View<E> viewForUri(Dataset<E> dataset, URI uri) { if (dataset instanceof FileSystemDataset) { return ((FileSystemDataset<E>) dataset).viewForUri(uri); } throw new IllegalArgumentException("Not a file system dataset: " + dataset); }  static View<E> viewForUri(Dataset<E> dataset, URI uri); static View<E> viewForUri(Dataset<E> dataset, String uri); static View<E> viewForPath(Dataset<E> dataset, Path path);  }