/** * Returns the correct metadata path for the given dataset. * @param root A Path * @param name A String dataset name * @return the metadata Path */ private static Path pathForMetadata(Path root, String namespace, String name) { return new Path( FileSystemDatasetRepository.pathForDataset(root, namespace, name), METADATA_DIRECTORY); }
private Path expectedPathForDataset(String namespace, String name) { return rootFileSystem.makeQualified( FileSystemDatasetRepository.pathForDataset(rootDirectory, namespace, name)); }
public Path pathForDataset(String namespace, String name) { return fs.makeQualified(pathForDataset(rootDirectory, namespace, name)); }
@Override public void partitionAdded(String namespace, String name, String partition) { Path root = getRootDirectory(); Path partitionPath = new Path( FileSystemDatasetRepository.pathForDataset(root, namespace, name), partition); try { Assert.assertFalse("Partition path " + partitionPath + " does not exist", getFileSytem().exists(partitionPath)); } catch (IOException ex) { Assert.fail(ex.getMessage()); } }
} else if (isFileDataset) { dataPath = ((FileSystemDatasetRepository) repo) .pathForDataset(namespace, name);
Path suggestedLocation = pathForDataset(namespace, name);