target
stringlengths
20
113k
src_fm
stringlengths
11
86.3k
src_fm_fc
stringlengths
21
86.4k
src_fm_fc_co
stringlengths
30
86.4k
src_fm_fc_ms
stringlengths
42
86.8k
src_fm_fc_ms_ff
stringlengths
43
86.8k
@Test public void testToProtobuFileStatusWithDefault() throws IOException { FileStatus status = new FileStatus(); DFS.FileStatus result = RemoteNodeFileSystem.toProtoFileStatus(status); assertFalse(result.hasPath()); assertEquals(0, result.getLength()); assertFalse(result.getIsDirectory()); assertEquals(0, result.getBl...
static DFS.FileStatus toProtoFileStatus(FileStatus status) throws IOException { DFS.FileStatus.Builder builder = DFS.FileStatus.newBuilder(); builder .setLength(status.getLen()) .setIsDirectory(status.isDirectory()) .setBlockReplication(status.getReplication()) .setBlockSize(status.getBlockSize()) .setModificationTime(...
RemoteNodeFileSystem extends FileSystem { static DFS.FileStatus toProtoFileStatus(FileStatus status) throws IOException { DFS.FileStatus.Builder builder = DFS.FileStatus.newBuilder(); builder .setLength(status.getLen()) .setIsDirectory(status.isDirectory()) .setBlockReplication(status.getReplication()) .setBlockSize(st...
RemoteNodeFileSystem extends FileSystem { static DFS.FileStatus toProtoFileStatus(FileStatus status) throws IOException { DFS.FileStatus.Builder builder = DFS.FileStatus.newBuilder(); builder .setLength(status.getLen()) .setIsDirectory(status.isDirectory()) .setBlockReplication(status.getReplication()) .setBlockSize(st...
RemoteNodeFileSystem extends FileSystem { static DFS.FileStatus toProtoFileStatus(FileStatus status) throws IOException { DFS.FileStatus.Builder builder = DFS.FileStatus.newBuilder(); builder .setLength(status.getLen()) .setIsDirectory(status.isDirectory()) .setBlockReplication(status.getReplication()) .setBlockSize(st...
RemoteNodeFileSystem extends FileSystem { static DFS.FileStatus toProtoFileStatus(FileStatus status) throws IOException { DFS.FileStatus.Builder builder = DFS.FileStatus.newBuilder(); builder .setLength(status.getLen()) .setIsDirectory(status.isDirectory()) .setBlockReplication(status.getReplication()) .setBlockSize(st...
@Test public void testToProtobuFileStatusWithDirectory() throws IOException { FileStatus status = new FileStatus(0, true, 0, 0, 1, 2, null, null, null, TEST_PATH); DFS.FileStatus result = RemoteNodeFileSystem.toProtoFileStatus(status); assertEquals(TEST_PATH_STRING, result.getPath()); assertEquals(0, result.getLength()...
static DFS.FileStatus toProtoFileStatus(FileStatus status) throws IOException { DFS.FileStatus.Builder builder = DFS.FileStatus.newBuilder(); builder .setLength(status.getLen()) .setIsDirectory(status.isDirectory()) .setBlockReplication(status.getReplication()) .setBlockSize(status.getBlockSize()) .setModificationTime(...
RemoteNodeFileSystem extends FileSystem { static DFS.FileStatus toProtoFileStatus(FileStatus status) throws IOException { DFS.FileStatus.Builder builder = DFS.FileStatus.newBuilder(); builder .setLength(status.getLen()) .setIsDirectory(status.isDirectory()) .setBlockReplication(status.getReplication()) .setBlockSize(st...
RemoteNodeFileSystem extends FileSystem { static DFS.FileStatus toProtoFileStatus(FileStatus status) throws IOException { DFS.FileStatus.Builder builder = DFS.FileStatus.newBuilder(); builder .setLength(status.getLen()) .setIsDirectory(status.isDirectory()) .setBlockReplication(status.getReplication()) .setBlockSize(st...
RemoteNodeFileSystem extends FileSystem { static DFS.FileStatus toProtoFileStatus(FileStatus status) throws IOException { DFS.FileStatus.Builder builder = DFS.FileStatus.newBuilder(); builder .setLength(status.getLen()) .setIsDirectory(status.isDirectory()) .setBlockReplication(status.getReplication()) .setBlockSize(st...
RemoteNodeFileSystem extends FileSystem { static DFS.FileStatus toProtoFileStatus(FileStatus status) throws IOException { DFS.FileStatus.Builder builder = DFS.FileStatus.newBuilder(); builder .setLength(status.getLen()) .setIsDirectory(status.isDirectory()) .setBlockReplication(status.getReplication()) .setBlockSize(st...
@Test public void testGetFileStatusRoot() throws Exception { { DFS.FileStatus status = newFileStatus(1024L, true, 0, 4096L, 37L, 42L, 0755, "root", "wheel", "/"); setupRPC( DFS.RpcType.GET_FILE_STATUS_REQUEST, DFS.GetFileStatusRequest.newBuilder().setPath("/").build(), DFS.RpcType.GET_FILE_STATUS_RESPONSE, DFS.GetFileS...
@Override public FileStatus getFileStatus(Path f) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); final GetFileStatusCommand command = new GetFileStatusCommand(absolutePath.toUri().getPath()); runner.runCommand(command); RpcFuture<DFS.GetFileStatusResponse> future = command.getFutur...
RemoteNodeFileSystem extends FileSystem { @Override public FileStatus getFileStatus(Path f) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); final GetFileStatusCommand command = new GetFileStatusCommand(absolutePath.toUri().getPath()); runner.runCommand(command); RpcFuture<DFS.GetFil...
RemoteNodeFileSystem extends FileSystem { @Override public FileStatus getFileStatus(Path f) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); final GetFileStatusCommand command = new GetFileStatusCommand(absolutePath.toUri().getPath()); runner.runCommand(command); RpcFuture<DFS.GetFil...
RemoteNodeFileSystem extends FileSystem { @Override public FileStatus getFileStatus(Path f) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); final GetFileStatusCommand command = new GetFileStatusCommand(absolutePath.toUri().getPath()); runner.runCommand(command); RpcFuture<DFS.GetFil...
RemoteNodeFileSystem extends FileSystem { @Override public FileStatus getFileStatus(Path f) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); final GetFileStatusCommand command = new GetFileStatusCommand(absolutePath.toUri().getPath()); runner.runCommand(command); RpcFuture<DFS.GetFil...
@Test(expected = FileNotFoundException.class) public void testGetFileStatusWithInvalidPath() throws Exception { { setupRPC( DFS.RpcType.GET_FILE_STATUS_REQUEST, DFS.GetFileStatusRequest.newBuilder().setPath("/foo/bar").build(), DFS.GetFileStatusResponse.class, newRPCException(LOCAL_ENDPOINT, new FileNotFoundException("...
@Override public FileStatus getFileStatus(Path f) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); final GetFileStatusCommand command = new GetFileStatusCommand(absolutePath.toUri().getPath()); runner.runCommand(command); RpcFuture<DFS.GetFileStatusResponse> future = command.getFutur...
RemoteNodeFileSystem extends FileSystem { @Override public FileStatus getFileStatus(Path f) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); final GetFileStatusCommand command = new GetFileStatusCommand(absolutePath.toUri().getPath()); runner.runCommand(command); RpcFuture<DFS.GetFil...
RemoteNodeFileSystem extends FileSystem { @Override public FileStatus getFileStatus(Path f) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); final GetFileStatusCommand command = new GetFileStatusCommand(absolutePath.toUri().getPath()); runner.runCommand(command); RpcFuture<DFS.GetFil...
RemoteNodeFileSystem extends FileSystem { @Override public FileStatus getFileStatus(Path f) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); final GetFileStatusCommand command = new GetFileStatusCommand(absolutePath.toUri().getPath()); runner.runCommand(command); RpcFuture<DFS.GetFil...
RemoteNodeFileSystem extends FileSystem { @Override public FileStatus getFileStatus(Path f) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); final GetFileStatusCommand command = new GetFileStatusCommand(absolutePath.toUri().getPath()); runner.runCommand(command); RpcFuture<DFS.GetFil...
@Test public void testGetFileStatusWithValidPath() throws Exception { { DFS.FileStatus status = newFileStatus(1024, false, 1, 4096, 42, 37, 0644 , "root", "wheel", "/foo/bar"); setupRPC( DFS.RpcType.GET_FILE_STATUS_REQUEST, DFS.GetFileStatusRequest.newBuilder().setPath("/foo/bar").build(), DFS.RpcType.GET_FILE_STATUS_R...
@Override public FileStatus getFileStatus(Path f) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); final GetFileStatusCommand command = new GetFileStatusCommand(absolutePath.toUri().getPath()); runner.runCommand(command); RpcFuture<DFS.GetFileStatusResponse> future = command.getFutur...
RemoteNodeFileSystem extends FileSystem { @Override public FileStatus getFileStatus(Path f) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); final GetFileStatusCommand command = new GetFileStatusCommand(absolutePath.toUri().getPath()); runner.runCommand(command); RpcFuture<DFS.GetFil...
RemoteNodeFileSystem extends FileSystem { @Override public FileStatus getFileStatus(Path f) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); final GetFileStatusCommand command = new GetFileStatusCommand(absolutePath.toUri().getPath()); runner.runCommand(command); RpcFuture<DFS.GetFil...
RemoteNodeFileSystem extends FileSystem { @Override public FileStatus getFileStatus(Path f) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); final GetFileStatusCommand command = new GetFileStatusCommand(absolutePath.toUri().getPath()); runner.runCommand(command); RpcFuture<DFS.GetFil...
RemoteNodeFileSystem extends FileSystem { @Override public FileStatus getFileStatus(Path f) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); final GetFileStatusCommand command = new GetFileStatusCommand(absolutePath.toUri().getPath()); runner.runCommand(command); RpcFuture<DFS.GetFil...
@Test public void splitListCardGen() throws Exception { File dataFile = temp.newFile("splitExact.json"); try (PrintWriter writer = new PrintWriter(dataFile)) { writer.append("{ \"col\" : \"aBa\" }"); writer.append("{ \"col\" : \"abaBa\" }"); writer.append("{ \"col\" : null }"); writer.append("{ \"col\" : \"abababa\" }"...
public TransformRuleWrapper<SplitRule> wrapRule(SplitRule rule) { return new SplitTransformRuleWrapper(rule); }
SplitRecommender extends Recommender<SplitRule, Selection> { public TransformRuleWrapper<SplitRule> wrapRule(SplitRule rule) { return new SplitTransformRuleWrapper(rule); } }
SplitRecommender extends Recommender<SplitRule, Selection> { public TransformRuleWrapper<SplitRule> wrapRule(SplitRule rule) { return new SplitTransformRuleWrapper(rule); } }
SplitRecommender extends Recommender<SplitRule, Selection> { public TransformRuleWrapper<SplitRule> wrapRule(SplitRule rule) { return new SplitTransformRuleWrapper(rule); } @Override List<SplitRule> getRules(Selection selection, DataType selColType); TransformRuleWrapper<SplitRule> wrapRule(SplitRule rule); }
SplitRecommender extends Recommender<SplitRule, Selection> { public TransformRuleWrapper<SplitRule> wrapRule(SplitRule rule) { return new SplitTransformRuleWrapper(rule); } @Override List<SplitRule> getRules(Selection selection, DataType selColType); TransformRuleWrapper<SplitRule> wrapRule(SplitRule rule); }
@Test public void testListStatusRoot() throws Exception { { DFS.ListStatusResponse listStatusResponse = DFS.ListStatusResponse.newBuilder() .addStatuses(newFileStatus(42, true, 0, 0, 456, 879, 0755, "root", "wheel", "/foo")) .addStatuses(newFileStatus(1024, false, 1, 4096, 354, 435, 0644, "admin", "admin", "/bar")) .bu...
@Override public FileStatus[] listStatus(Path f) throws FileNotFoundException, IOException { RemoteIterator<FileStatus> remoteIterator = listStatusIterator(f); List<FileStatus> statuses = new ArrayList<>(); while(remoteIterator.hasNext()) { statuses.add(remoteIterator.next()); } return statuses.toArray(new FileStatus[0...
RemoteNodeFileSystem extends FileSystem { @Override public FileStatus[] listStatus(Path f) throws FileNotFoundException, IOException { RemoteIterator<FileStatus> remoteIterator = listStatusIterator(f); List<FileStatus> statuses = new ArrayList<>(); while(remoteIterator.hasNext()) { statuses.add(remoteIterator.next()); ...
RemoteNodeFileSystem extends FileSystem { @Override public FileStatus[] listStatus(Path f) throws FileNotFoundException, IOException { RemoteIterator<FileStatus> remoteIterator = listStatusIterator(f); List<FileStatus> statuses = new ArrayList<>(); while(remoteIterator.hasNext()) { statuses.add(remoteIterator.next()); ...
RemoteNodeFileSystem extends FileSystem { @Override public FileStatus[] listStatus(Path f) throws FileNotFoundException, IOException { RemoteIterator<FileStatus> remoteIterator = listStatusIterator(f); List<FileStatus> statuses = new ArrayList<>(); while(remoteIterator.hasNext()) { statuses.add(remoteIterator.next()); ...
RemoteNodeFileSystem extends FileSystem { @Override public FileStatus[] listStatus(Path f) throws FileNotFoundException, IOException { RemoteIterator<FileStatus> remoteIterator = listStatusIterator(f); List<FileStatus> statuses = new ArrayList<>(); while(remoteIterator.hasNext()) { statuses.add(remoteIterator.next()); ...
@Test public void testListStatusRootOneByOne() throws Exception { { DFS.ListStatusContinuationHandle handle = DFS.ListStatusContinuationHandle.newBuilder().setId("test-handle").build(); DFS.ListStatusResponse listStatusInitialResponse = DFS.ListStatusResponse.newBuilder() .addStatuses(newFileStatus(42, true, 0, 0, 456,...
@Override public FileStatus[] listStatus(Path f) throws FileNotFoundException, IOException { RemoteIterator<FileStatus> remoteIterator = listStatusIterator(f); List<FileStatus> statuses = new ArrayList<>(); while(remoteIterator.hasNext()) { statuses.add(remoteIterator.next()); } return statuses.toArray(new FileStatus[0...
RemoteNodeFileSystem extends FileSystem { @Override public FileStatus[] listStatus(Path f) throws FileNotFoundException, IOException { RemoteIterator<FileStatus> remoteIterator = listStatusIterator(f); List<FileStatus> statuses = new ArrayList<>(); while(remoteIterator.hasNext()) { statuses.add(remoteIterator.next()); ...
RemoteNodeFileSystem extends FileSystem { @Override public FileStatus[] listStatus(Path f) throws FileNotFoundException, IOException { RemoteIterator<FileStatus> remoteIterator = listStatusIterator(f); List<FileStatus> statuses = new ArrayList<>(); while(remoteIterator.hasNext()) { statuses.add(remoteIterator.next()); ...
RemoteNodeFileSystem extends FileSystem { @Override public FileStatus[] listStatus(Path f) throws FileNotFoundException, IOException { RemoteIterator<FileStatus> remoteIterator = listStatusIterator(f); List<FileStatus> statuses = new ArrayList<>(); while(remoteIterator.hasNext()) { statuses.add(remoteIterator.next()); ...
RemoteNodeFileSystem extends FileSystem { @Override public FileStatus[] listStatus(Path f) throws FileNotFoundException, IOException { RemoteIterator<FileStatus> remoteIterator = listStatusIterator(f); List<FileStatus> statuses = new ArrayList<>(); while(remoteIterator.hasNext()) { statuses.add(remoteIterator.next()); ...
@Test public void testListStatusWithValidPath() throws Exception { { DFS.ListStatusResponse listStatusResponse = DFS.ListStatusResponse.newBuilder() .addStatuses(newFileStatus(42, true, 0, 0, 456, 879, 0755, "root", "wheel", "/foo/bar/dir")) .addStatuses(newFileStatus(1024, false, 1, 4096, 354, 435, 0644, "admin", "adm...
@Override public FileStatus[] listStatus(Path f) throws FileNotFoundException, IOException { RemoteIterator<FileStatus> remoteIterator = listStatusIterator(f); List<FileStatus> statuses = new ArrayList<>(); while(remoteIterator.hasNext()) { statuses.add(remoteIterator.next()); } return statuses.toArray(new FileStatus[0...
RemoteNodeFileSystem extends FileSystem { @Override public FileStatus[] listStatus(Path f) throws FileNotFoundException, IOException { RemoteIterator<FileStatus> remoteIterator = listStatusIterator(f); List<FileStatus> statuses = new ArrayList<>(); while(remoteIterator.hasNext()) { statuses.add(remoteIterator.next()); ...
RemoteNodeFileSystem extends FileSystem { @Override public FileStatus[] listStatus(Path f) throws FileNotFoundException, IOException { RemoteIterator<FileStatus> remoteIterator = listStatusIterator(f); List<FileStatus> statuses = new ArrayList<>(); while(remoteIterator.hasNext()) { statuses.add(remoteIterator.next()); ...
RemoteNodeFileSystem extends FileSystem { @Override public FileStatus[] listStatus(Path f) throws FileNotFoundException, IOException { RemoteIterator<FileStatus> remoteIterator = listStatusIterator(f); List<FileStatus> statuses = new ArrayList<>(); while(remoteIterator.hasNext()) { statuses.add(remoteIterator.next()); ...
RemoteNodeFileSystem extends FileSystem { @Override public FileStatus[] listStatus(Path f) throws FileNotFoundException, IOException { RemoteIterator<FileStatus> remoteIterator = listStatusIterator(f); List<FileStatus> statuses = new ArrayList<>(); while(remoteIterator.hasNext()) { statuses.add(remoteIterator.next()); ...
@Test(expected = FileNotFoundException.class) public void testListStatusWithInvalidPath() throws Exception { setupRPC( DFS.RpcType.LIST_STATUS_REQUEST, DFS.ListStatusRequest.newBuilder().setPath("/foo/bar").setLimit(RemoteNodeFileSystem.LIST_STATUS_BATCH_SIZE_DEFAULT).build(), DFS.ListStatusResponse.class, newRPCExcept...
@Override public FileStatus[] listStatus(Path f) throws FileNotFoundException, IOException { RemoteIterator<FileStatus> remoteIterator = listStatusIterator(f); List<FileStatus> statuses = new ArrayList<>(); while(remoteIterator.hasNext()) { statuses.add(remoteIterator.next()); } return statuses.toArray(new FileStatus[0...
RemoteNodeFileSystem extends FileSystem { @Override public FileStatus[] listStatus(Path f) throws FileNotFoundException, IOException { RemoteIterator<FileStatus> remoteIterator = listStatusIterator(f); List<FileStatus> statuses = new ArrayList<>(); while(remoteIterator.hasNext()) { statuses.add(remoteIterator.next()); ...
RemoteNodeFileSystem extends FileSystem { @Override public FileStatus[] listStatus(Path f) throws FileNotFoundException, IOException { RemoteIterator<FileStatus> remoteIterator = listStatusIterator(f); List<FileStatus> statuses = new ArrayList<>(); while(remoteIterator.hasNext()) { statuses.add(remoteIterator.next()); ...
RemoteNodeFileSystem extends FileSystem { @Override public FileStatus[] listStatus(Path f) throws FileNotFoundException, IOException { RemoteIterator<FileStatus> remoteIterator = listStatusIterator(f); List<FileStatus> statuses = new ArrayList<>(); while(remoteIterator.hasNext()) { statuses.add(remoteIterator.next()); ...
RemoteNodeFileSystem extends FileSystem { @Override public FileStatus[] listStatus(Path f) throws FileNotFoundException, IOException { RemoteIterator<FileStatus> remoteIterator = listStatusIterator(f); List<FileStatus> statuses = new ArrayList<>(); while(remoteIterator.hasNext()) { statuses.add(remoteIterator.next()); ...
@Test public void testDeleteWithValidPath() throws Exception { setupRPC( DFS.RpcType.DELETE_REQUEST, DFS.DeleteRequest.newBuilder().setPath("/foo/bar").setRecursive(true).build(), DFS.RpcType.DELETE_RESPONSE, DFS.DeleteResponse.newBuilder().setValue(true).build()); FileSystem fs = newRemoteNodeFileSystem(); Path path =...
@Override public boolean delete(Path f, boolean recursive) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); final DeleteCommand command = new DeleteCommand(absolutePath.toUri().getPath(), recursive); runner.runCommand(command); RpcFuture<DFS.DeleteResponse> future = command.getFuture...
RemoteNodeFileSystem extends FileSystem { @Override public boolean delete(Path f, boolean recursive) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); final DeleteCommand command = new DeleteCommand(absolutePath.toUri().getPath(), recursive); runner.runCommand(command); RpcFuture<DFS....
RemoteNodeFileSystem extends FileSystem { @Override public boolean delete(Path f, boolean recursive) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); final DeleteCommand command = new DeleteCommand(absolutePath.toUri().getPath(), recursive); runner.runCommand(command); RpcFuture<DFS....
RemoteNodeFileSystem extends FileSystem { @Override public boolean delete(Path f, boolean recursive) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); final DeleteCommand command = new DeleteCommand(absolutePath.toUri().getPath(), recursive); runner.runCommand(command); RpcFuture<DFS....
RemoteNodeFileSystem extends FileSystem { @Override public boolean delete(Path f, boolean recursive) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); final DeleteCommand command = new DeleteCommand(absolutePath.toUri().getPath(), recursive); runner.runCommand(command); RpcFuture<DFS....
@Test public void testDeleteWithValidPathButNotDeleted() throws Exception { setupRPC( DFS.RpcType.DELETE_REQUEST, DFS.DeleteRequest.newBuilder().setPath("/foo/bar").setRecursive(true).build(), DFS.RpcType.DELETE_RESPONSE, DFS.DeleteResponse.newBuilder().setValue(false).build()); FileSystem fs = newRemoteNodeFileSystem(...
@Override public boolean delete(Path f, boolean recursive) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); final DeleteCommand command = new DeleteCommand(absolutePath.toUri().getPath(), recursive); runner.runCommand(command); RpcFuture<DFS.DeleteResponse> future = command.getFuture...
RemoteNodeFileSystem extends FileSystem { @Override public boolean delete(Path f, boolean recursive) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); final DeleteCommand command = new DeleteCommand(absolutePath.toUri().getPath(), recursive); runner.runCommand(command); RpcFuture<DFS....
RemoteNodeFileSystem extends FileSystem { @Override public boolean delete(Path f, boolean recursive) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); final DeleteCommand command = new DeleteCommand(absolutePath.toUri().getPath(), recursive); runner.runCommand(command); RpcFuture<DFS....
RemoteNodeFileSystem extends FileSystem { @Override public boolean delete(Path f, boolean recursive) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); final DeleteCommand command = new DeleteCommand(absolutePath.toUri().getPath(), recursive); runner.runCommand(command); RpcFuture<DFS....
RemoteNodeFileSystem extends FileSystem { @Override public boolean delete(Path f, boolean recursive) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); final DeleteCommand command = new DeleteCommand(absolutePath.toUri().getPath(), recursive); runner.runCommand(command); RpcFuture<DFS....
@Test public void testDeleteWithInvalidPath() throws Exception { setupRPC( DFS.RpcType.DELETE_REQUEST, DFS.DeleteRequest.newBuilder().setPath("/foo/bar").setRecursive(true).build(), DFS.DeleteResponse.class, newRPCException(LOCAL_ENDPOINT, new FileNotFoundException("File not found"))); FileSystem fs = newRemoteNodeFile...
@Override public boolean delete(Path f, boolean recursive) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); final DeleteCommand command = new DeleteCommand(absolutePath.toUri().getPath(), recursive); runner.runCommand(command); RpcFuture<DFS.DeleteResponse> future = command.getFuture...
RemoteNodeFileSystem extends FileSystem { @Override public boolean delete(Path f, boolean recursive) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); final DeleteCommand command = new DeleteCommand(absolutePath.toUri().getPath(), recursive); runner.runCommand(command); RpcFuture<DFS....
RemoteNodeFileSystem extends FileSystem { @Override public boolean delete(Path f, boolean recursive) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); final DeleteCommand command = new DeleteCommand(absolutePath.toUri().getPath(), recursive); runner.runCommand(command); RpcFuture<DFS....
RemoteNodeFileSystem extends FileSystem { @Override public boolean delete(Path f, boolean recursive) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); final DeleteCommand command = new DeleteCommand(absolutePath.toUri().getPath(), recursive); runner.runCommand(command); RpcFuture<DFS....
RemoteNodeFileSystem extends FileSystem { @Override public boolean delete(Path f, boolean recursive) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); final DeleteCommand command = new DeleteCommand(absolutePath.toUri().getPath(), recursive); runner.runCommand(command); RpcFuture<DFS....
@Test public void testMkdirsWithValidPath() throws Exception { setupRPC( DFS.RpcType.MKDIRS_REQUEST, DFS.MkdirsRequest.newBuilder().setPath("/foo/bar").setPermission(0755).build(), DFS.RpcType.MKDIRS_RESPONSE, DFS.MkdirsResponse.newBuilder().setValue(true).build()); FileSystem fs = newRemoteNodeFileSystem(); Path path ...
@Override public boolean mkdirs(Path f, FsPermission permission) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); final MkdirsCommand command = new MkdirsCommand( absolutePath.toUri().getPath(), permission != null ? (int) permission.toExtendedShort() : null); runner.runCommand(comman...
RemoteNodeFileSystem extends FileSystem { @Override public boolean mkdirs(Path f, FsPermission permission) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); final MkdirsCommand command = new MkdirsCommand( absolutePath.toUri().getPath(), permission != null ? (int) permission.toExtende...
RemoteNodeFileSystem extends FileSystem { @Override public boolean mkdirs(Path f, FsPermission permission) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); final MkdirsCommand command = new MkdirsCommand( absolutePath.toUri().getPath(), permission != null ? (int) permission.toExtende...
RemoteNodeFileSystem extends FileSystem { @Override public boolean mkdirs(Path f, FsPermission permission) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); final MkdirsCommand command = new MkdirsCommand( absolutePath.toUri().getPath(), permission != null ? (int) permission.toExtende...
RemoteNodeFileSystem extends FileSystem { @Override public boolean mkdirs(Path f, FsPermission permission) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); final MkdirsCommand command = new MkdirsCommand( absolutePath.toUri().getPath(), permission != null ? (int) permission.toExtende...
@Test public void testMkdirsWithValidPathButNotCreated() throws Exception { setupRPC( DFS.RpcType.MKDIRS_REQUEST, DFS.MkdirsRequest.newBuilder().setPath("/foo/bar").setPermission(0755).build(), DFS.RpcType.MKDIRS_RESPONSE, DFS.MkdirsResponse.newBuilder().setValue(false).build()); FileSystem fs = newRemoteNodeFileSystem...
@Override public boolean mkdirs(Path f, FsPermission permission) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); final MkdirsCommand command = new MkdirsCommand( absolutePath.toUri().getPath(), permission != null ? (int) permission.toExtendedShort() : null); runner.runCommand(comman...
RemoteNodeFileSystem extends FileSystem { @Override public boolean mkdirs(Path f, FsPermission permission) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); final MkdirsCommand command = new MkdirsCommand( absolutePath.toUri().getPath(), permission != null ? (int) permission.toExtende...
RemoteNodeFileSystem extends FileSystem { @Override public boolean mkdirs(Path f, FsPermission permission) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); final MkdirsCommand command = new MkdirsCommand( absolutePath.toUri().getPath(), permission != null ? (int) permission.toExtende...
RemoteNodeFileSystem extends FileSystem { @Override public boolean mkdirs(Path f, FsPermission permission) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); final MkdirsCommand command = new MkdirsCommand( absolutePath.toUri().getPath(), permission != null ? (int) permission.toExtende...
RemoteNodeFileSystem extends FileSystem { @Override public boolean mkdirs(Path f, FsPermission permission) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); final MkdirsCommand command = new MkdirsCommand( absolutePath.toUri().getPath(), permission != null ? (int) permission.toExtende...
@Test public void testMkdirsWithInvalidPath() throws Exception { setupRPC( DFS.RpcType.MKDIRS_REQUEST, DFS.MkdirsRequest.newBuilder().setPath("/foo/bar").setPermission(0755).build(), DFS.MkdirsResponse.class, newRPCException(LOCAL_ENDPOINT, new FileNotFoundException("File not found"))); FileSystem fs = newRemoteNodeFil...
@Override public boolean mkdirs(Path f, FsPermission permission) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); final MkdirsCommand command = new MkdirsCommand( absolutePath.toUri().getPath(), permission != null ? (int) permission.toExtendedShort() : null); runner.runCommand(comman...
RemoteNodeFileSystem extends FileSystem { @Override public boolean mkdirs(Path f, FsPermission permission) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); final MkdirsCommand command = new MkdirsCommand( absolutePath.toUri().getPath(), permission != null ? (int) permission.toExtende...
RemoteNodeFileSystem extends FileSystem { @Override public boolean mkdirs(Path f, FsPermission permission) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); final MkdirsCommand command = new MkdirsCommand( absolutePath.toUri().getPath(), permission != null ? (int) permission.toExtende...
RemoteNodeFileSystem extends FileSystem { @Override public boolean mkdirs(Path f, FsPermission permission) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); final MkdirsCommand command = new MkdirsCommand( absolutePath.toUri().getPath(), permission != null ? (int) permission.toExtende...
RemoteNodeFileSystem extends FileSystem { @Override public boolean mkdirs(Path f, FsPermission permission) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); final MkdirsCommand command = new MkdirsCommand( absolutePath.toUri().getPath(), permission != null ? (int) permission.toExtende...
@Test public void splitRegex() throws Exception { File dataFile = temp.newFile("splitRegex.json"); try (PrintWriter writer = new PrintWriter(dataFile)) { writer.append("{ \"col\" : \"aaa111BBB222cc33d\" }"); writer.append("{ \"col\" : \"a1b2c3\" }"); writer.append("{ \"col\" : null }"); writer.append("{ \"col\" : \"aba...
public TransformRuleWrapper<SplitRule> wrapRule(SplitRule rule) { return new SplitTransformRuleWrapper(rule); }
SplitRecommender extends Recommender<SplitRule, Selection> { public TransformRuleWrapper<SplitRule> wrapRule(SplitRule rule) { return new SplitTransformRuleWrapper(rule); } }
SplitRecommender extends Recommender<SplitRule, Selection> { public TransformRuleWrapper<SplitRule> wrapRule(SplitRule rule) { return new SplitTransformRuleWrapper(rule); } }
SplitRecommender extends Recommender<SplitRule, Selection> { public TransformRuleWrapper<SplitRule> wrapRule(SplitRule rule) { return new SplitTransformRuleWrapper(rule); } @Override List<SplitRule> getRules(Selection selection, DataType selColType); TransformRuleWrapper<SplitRule> wrapRule(SplitRule rule); }
SplitRecommender extends Recommender<SplitRule, Selection> { public TransformRuleWrapper<SplitRule> wrapRule(SplitRule rule) { return new SplitTransformRuleWrapper(rule); } @Override List<SplitRule> getRules(Selection selection, DataType selColType); TransformRuleWrapper<SplitRule> wrapRule(SplitRule rule); }
@Test public void testRenameWithValidPath() throws Exception { setupRPC( DFS.RpcType.RENAME_REQUEST, DFS.RenameRequest.newBuilder().setOldpath("/foo/bar").setNewpath("/foo/bar2").build(), DFS.RpcType.RENAME_RESPONSE, DFS.RenameResponse.newBuilder().setValue(true).build()); FileSystem fs = newRemoteNodeFileSystem(); Pat...
@Override public boolean rename(Path src, Path dst) throws IOException { Path absoluteSrc = toAbsolutePath(src); Path absoluteDst = toAbsolutePath(dst); checkPath(absoluteSrc); checkPath(absoluteDst); final RenameCommand command = new RenameCommand(absoluteSrc.toUri().getPath(), absoluteDst.toUri().getPath()); runner.r...
RemoteNodeFileSystem extends FileSystem { @Override public boolean rename(Path src, Path dst) throws IOException { Path absoluteSrc = toAbsolutePath(src); Path absoluteDst = toAbsolutePath(dst); checkPath(absoluteSrc); checkPath(absoluteDst); final RenameCommand command = new RenameCommand(absoluteSrc.toUri().getPath()...
RemoteNodeFileSystem extends FileSystem { @Override public boolean rename(Path src, Path dst) throws IOException { Path absoluteSrc = toAbsolutePath(src); Path absoluteDst = toAbsolutePath(dst); checkPath(absoluteSrc); checkPath(absoluteDst); final RenameCommand command = new RenameCommand(absoluteSrc.toUri().getPath()...
RemoteNodeFileSystem extends FileSystem { @Override public boolean rename(Path src, Path dst) throws IOException { Path absoluteSrc = toAbsolutePath(src); Path absoluteDst = toAbsolutePath(dst); checkPath(absoluteSrc); checkPath(absoluteDst); final RenameCommand command = new RenameCommand(absoluteSrc.toUri().getPath()...
RemoteNodeFileSystem extends FileSystem { @Override public boolean rename(Path src, Path dst) throws IOException { Path absoluteSrc = toAbsolutePath(src); Path absoluteDst = toAbsolutePath(dst); checkPath(absoluteSrc); checkPath(absoluteDst); final RenameCommand command = new RenameCommand(absoluteSrc.toUri().getPath()...
@Test public void testRenameWithButNotRenamed() throws Exception { setupRPC( DFS.RpcType.RENAME_REQUEST, DFS.RenameRequest.newBuilder().setOldpath("/foo/bar").setNewpath("/foo/bar2").build(), DFS.RpcType.RENAME_RESPONSE, DFS.RenameResponse.newBuilder().setValue(false).build()); FileSystem fs = newRemoteNodeFileSystem()...
@Override public boolean rename(Path src, Path dst) throws IOException { Path absoluteSrc = toAbsolutePath(src); Path absoluteDst = toAbsolutePath(dst); checkPath(absoluteSrc); checkPath(absoluteDst); final RenameCommand command = new RenameCommand(absoluteSrc.toUri().getPath(), absoluteDst.toUri().getPath()); runner.r...
RemoteNodeFileSystem extends FileSystem { @Override public boolean rename(Path src, Path dst) throws IOException { Path absoluteSrc = toAbsolutePath(src); Path absoluteDst = toAbsolutePath(dst); checkPath(absoluteSrc); checkPath(absoluteDst); final RenameCommand command = new RenameCommand(absoluteSrc.toUri().getPath()...
RemoteNodeFileSystem extends FileSystem { @Override public boolean rename(Path src, Path dst) throws IOException { Path absoluteSrc = toAbsolutePath(src); Path absoluteDst = toAbsolutePath(dst); checkPath(absoluteSrc); checkPath(absoluteDst); final RenameCommand command = new RenameCommand(absoluteSrc.toUri().getPath()...
RemoteNodeFileSystem extends FileSystem { @Override public boolean rename(Path src, Path dst) throws IOException { Path absoluteSrc = toAbsolutePath(src); Path absoluteDst = toAbsolutePath(dst); checkPath(absoluteSrc); checkPath(absoluteDst); final RenameCommand command = new RenameCommand(absoluteSrc.toUri().getPath()...
RemoteNodeFileSystem extends FileSystem { @Override public boolean rename(Path src, Path dst) throws IOException { Path absoluteSrc = toAbsolutePath(src); Path absoluteDst = toAbsolutePath(dst); checkPath(absoluteSrc); checkPath(absoluteDst); final RenameCommand command = new RenameCommand(absoluteSrc.toUri().getPath()...
@Test public void testRenameWithInvalidPath() throws Exception { setupRPC( DFS.RpcType.RENAME_REQUEST, DFS.RenameRequest.newBuilder().setOldpath("/foo/bar").setNewpath("/foo/bar2").build(), DFS.RenameResponse.class, newRPCException(LOCAL_ENDPOINT, new FileNotFoundException("File not found"))); FileSystem fs = newRemote...
@Override public boolean rename(Path src, Path dst) throws IOException { Path absoluteSrc = toAbsolutePath(src); Path absoluteDst = toAbsolutePath(dst); checkPath(absoluteSrc); checkPath(absoluteDst); final RenameCommand command = new RenameCommand(absoluteSrc.toUri().getPath(), absoluteDst.toUri().getPath()); runner.r...
RemoteNodeFileSystem extends FileSystem { @Override public boolean rename(Path src, Path dst) throws IOException { Path absoluteSrc = toAbsolutePath(src); Path absoluteDst = toAbsolutePath(dst); checkPath(absoluteSrc); checkPath(absoluteDst); final RenameCommand command = new RenameCommand(absoluteSrc.toUri().getPath()...
RemoteNodeFileSystem extends FileSystem { @Override public boolean rename(Path src, Path dst) throws IOException { Path absoluteSrc = toAbsolutePath(src); Path absoluteDst = toAbsolutePath(dst); checkPath(absoluteSrc); checkPath(absoluteDst); final RenameCommand command = new RenameCommand(absoluteSrc.toUri().getPath()...
RemoteNodeFileSystem extends FileSystem { @Override public boolean rename(Path src, Path dst) throws IOException { Path absoluteSrc = toAbsolutePath(src); Path absoluteDst = toAbsolutePath(dst); checkPath(absoluteSrc); checkPath(absoluteDst); final RenameCommand command = new RenameCommand(absoluteSrc.toUri().getPath()...
RemoteNodeFileSystem extends FileSystem { @Override public boolean rename(Path src, Path dst) throws IOException { Path absoluteSrc = toAbsolutePath(src); Path absoluteDst = toAbsolutePath(dst); checkPath(absoluteSrc); checkPath(absoluteDst); final RenameCommand command = new RenameCommand(absoluteSrc.toUri().getPath()...
@Test public void testInputStream() throws Exception { Path filePath = new Path("/foo/bar"); byte[] data = new byte[100]; for (int i = 0; i < 100; ++i) { data[i] = (byte)i; } byte [] readBuf = new byte[1000]; ByteBuf byteBuf = Unpooled.wrappedBuffer(data, 0, 100); setupRPC( DFS.RpcType.GET_FILE_DATA_REQUEST, DFS.GetFil...
@Override public FSDataInputStream open(Path f, int bufferSize) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); final String path = absolutePath.toUri().getPath(); return new FSDataInputStream(new RemoteNodeInputStream(path, bufferSize)); }
RemoteNodeFileSystem extends FileSystem { @Override public FSDataInputStream open(Path f, int bufferSize) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); final String path = absolutePath.toUri().getPath(); return new FSDataInputStream(new RemoteNodeInputStream(path, bufferSize)); } ...
RemoteNodeFileSystem extends FileSystem { @Override public FSDataInputStream open(Path f, int bufferSize) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); final String path = absolutePath.toUri().getPath(); return new FSDataInputStream(new RemoteNodeInputStream(path, bufferSize)); } ...
RemoteNodeFileSystem extends FileSystem { @Override public FSDataInputStream open(Path f, int bufferSize) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); final String path = absolutePath.toUri().getPath(); return new FSDataInputStream(new RemoteNodeInputStream(path, bufferSize)); } ...
RemoteNodeFileSystem extends FileSystem { @Override public FSDataInputStream open(Path f, int bufferSize) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); final String path = absolutePath.toUri().getPath(); return new FSDataInputStream(new RemoteNodeInputStream(path, bufferSize)); } ...
@Test public void testGetFileStatusRoot() throws IOException { Path root = new Path("/"); FileStatus status = fs.getFileStatus(root); assertEquals(new Path("pdfs:/"), status.getPath()); assertTrue(status.isDirectory()); assertEquals(0555, status.getPermission().toExtendedShort()); }
@Override public FileStatus getFileStatus(Path f) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); if (!isRemoteFile(absolutePath)) { return new GetFileStatusTask(absolutePath).get(); } try { RemotePath remotePath = getRemotePath(absolutePath); FileSystem delegate = getDelegateFileSy...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public FileStatus getFileStatus(Path f) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); if (!isRemoteFile(absolutePath)) { return new GetFileStatusTask(absolutePath).get(); } try { RemotePath rem...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public FileStatus getFileStatus(Path f) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); if (!isRemoteFile(absolutePath)) { return new GetFileStatusTask(absolutePath).get(); } try { RemotePath rem...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public FileStatus getFileStatus(Path f) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); if (!isRemoteFile(absolutePath)) { return new GetFileStatusTask(absolutePath).get(); } try { RemotePath rem...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public FileStatus getFileStatus(Path f) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); if (!isRemoteFile(absolutePath)) { return new GetFileStatusTask(absolutePath).get(); } try { RemotePath rem...
@Test public void testGetFileStatusForInvalidPath() throws IOException { Path path = new Path("/foo/baz"); try { fs.getFileStatus(path); fail("Expected getFileStatus to throw FileNotFoundException"); } catch (FileNotFoundException e) { } }
@Override public FileStatus getFileStatus(Path f) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); if (!isRemoteFile(absolutePath)) { return new GetFileStatusTask(absolutePath).get(); } try { RemotePath remotePath = getRemotePath(absolutePath); FileSystem delegate = getDelegateFileSy...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public FileStatus getFileStatus(Path f) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); if (!isRemoteFile(absolutePath)) { return new GetFileStatusTask(absolutePath).get(); } try { RemotePath rem...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public FileStatus getFileStatus(Path f) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); if (!isRemoteFile(absolutePath)) { return new GetFileStatusTask(absolutePath).get(); } try { RemotePath rem...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public FileStatus getFileStatus(Path f) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); if (!isRemoteFile(absolutePath)) { return new GetFileStatusTask(absolutePath).get(); } try { RemotePath rem...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public FileStatus getFileStatus(Path f) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); if (!isRemoteFile(absolutePath)) { return new GetFileStatusTask(absolutePath).get(); } try { RemotePath rem...
@Test public void testGetFileStatusForValidDirectory() throws IOException { Path path = new Path("/foo/bar"); FileStatus status = fs.getFileStatus(path); assertEquals(new Path("pdfs:/foo/bar"), status.getPath()); assertTrue(status.isDirectory()); assertEquals(69, status.getModificationTime()); assertEquals(90, status.g...
@Override public FileStatus getFileStatus(Path f) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); if (!isRemoteFile(absolutePath)) { return new GetFileStatusTask(absolutePath).get(); } try { RemotePath remotePath = getRemotePath(absolutePath); FileSystem delegate = getDelegateFileSy...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public FileStatus getFileStatus(Path f) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); if (!isRemoteFile(absolutePath)) { return new GetFileStatusTask(absolutePath).get(); } try { RemotePath rem...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public FileStatus getFileStatus(Path f) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); if (!isRemoteFile(absolutePath)) { return new GetFileStatusTask(absolutePath).get(); } try { RemotePath rem...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public FileStatus getFileStatus(Path f) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); if (!isRemoteFile(absolutePath)) { return new GetFileStatusTask(absolutePath).get(); } try { RemotePath rem...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public FileStatus getFileStatus(Path f) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); if (!isRemoteFile(absolutePath)) { return new GetFileStatusTask(absolutePath).get(); } try { RemotePath rem...
@Test public void testGetFileStatusForUnaccessibleDirectory() throws IOException { doThrow(new AccessControlException()).when(mockRemoteFS).getFileStatus(new Path("/foo/baz")); Path path = new Path("/foo/baz"); try { fs.getFileStatus(path); fail("Expected some IOException"); } catch(AccessControlException e) { } }
@Override public FileStatus getFileStatus(Path f) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); if (!isRemoteFile(absolutePath)) { return new GetFileStatusTask(absolutePath).get(); } try { RemotePath remotePath = getRemotePath(absolutePath); FileSystem delegate = getDelegateFileSy...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public FileStatus getFileStatus(Path f) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); if (!isRemoteFile(absolutePath)) { return new GetFileStatusTask(absolutePath).get(); } try { RemotePath rem...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public FileStatus getFileStatus(Path f) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); if (!isRemoteFile(absolutePath)) { return new GetFileStatusTask(absolutePath).get(); } try { RemotePath rem...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public FileStatus getFileStatus(Path f) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); if (!isRemoteFile(absolutePath)) { return new GetFileStatusTask(absolutePath).get(); } try { RemotePath rem...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public FileStatus getFileStatus(Path f) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); if (!isRemoteFile(absolutePath)) { return new GetFileStatusTask(absolutePath).get(); } try { RemotePath rem...
@Test public void testGetFileStatusWithValidRemotePath() throws IOException { doReturn(new FileStatus(1024, false, 1, 4096, 37, 42, FsPermission.createImmutable((short) 0644), "root", "wheel", new Path("sabot: .when(mockRemoteFS).getFileStatus(new Path("/tmp/file")); Path path = new Path("/tmp/10.0.0.2@file"); FileStat...
@Override public FileStatus getFileStatus(Path f) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); if (!isRemoteFile(absolutePath)) { return new GetFileStatusTask(absolutePath).get(); } try { RemotePath remotePath = getRemotePath(absolutePath); FileSystem delegate = getDelegateFileSy...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public FileStatus getFileStatus(Path f) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); if (!isRemoteFile(absolutePath)) { return new GetFileStatusTask(absolutePath).get(); } try { RemotePath rem...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public FileStatus getFileStatus(Path f) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); if (!isRemoteFile(absolutePath)) { return new GetFileStatusTask(absolutePath).get(); } try { RemotePath rem...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public FileStatus getFileStatus(Path f) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); if (!isRemoteFile(absolutePath)) { return new GetFileStatusTask(absolutePath).get(); } try { RemotePath rem...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public FileStatus getFileStatus(Path f) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); if (!isRemoteFile(absolutePath)) { return new GetFileStatusTask(absolutePath).get(); } try { RemotePath rem...
@Test public void testGetFileStatusWithValidLocalPath() throws IOException { Path tmpPath = new Path("/tmp/file"); doReturn(new FileStatus(1024, false, 1, 4096, 37, 42, FsPermission.createImmutable((short) 0644), "root", "wheel", tmpPath)).when(mockLocalFS).getFileStatus(tmpPath); Path path = new Path("/tmp/10.0.0.1@fi...
@Override public FileStatus getFileStatus(Path f) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); if (!isRemoteFile(absolutePath)) { return new GetFileStatusTask(absolutePath).get(); } try { RemotePath remotePath = getRemotePath(absolutePath); FileSystem delegate = getDelegateFileSy...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public FileStatus getFileStatus(Path f) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); if (!isRemoteFile(absolutePath)) { return new GetFileStatusTask(absolutePath).get(); } try { RemotePath rem...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public FileStatus getFileStatus(Path f) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); if (!isRemoteFile(absolutePath)) { return new GetFileStatusTask(absolutePath).get(); } try { RemotePath rem...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public FileStatus getFileStatus(Path f) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); if (!isRemoteFile(absolutePath)) { return new GetFileStatusTask(absolutePath).get(); } try { RemotePath rem...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public FileStatus getFileStatus(Path f) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); if (!isRemoteFile(absolutePath)) { return new GetFileStatusTask(absolutePath).get(); } try { RemotePath rem...
@Test public void testBrokenHistory() throws Exception { DatasetPath datasetPath = new DatasetPath(Arrays.asList("space", "dataset")); DatasetVersion current = new DatasetVersion("123"); DatasetVersion tip = new DatasetVersion("456"); DatasetVersion broken = new DatasetVersion("001"); VirtualDatasetUI tipDataset = new ...
History getHistory(final DatasetPath datasetPath, DatasetVersion currentDataset) throws DatasetVersionNotFoundException { return getHistory(datasetPath, currentDataset, currentDataset); }
DatasetTool { History getHistory(final DatasetPath datasetPath, DatasetVersion currentDataset) throws DatasetVersionNotFoundException { return getHistory(datasetPath, currentDataset, currentDataset); } }
DatasetTool { History getHistory(final DatasetPath datasetPath, DatasetVersion currentDataset) throws DatasetVersionNotFoundException { return getHistory(datasetPath, currentDataset, currentDataset); } DatasetTool( DatasetVersionMutator datasetService, JobsService jobsService, QueryExecutor executor, Se...
DatasetTool { History getHistory(final DatasetPath datasetPath, DatasetVersion currentDataset) throws DatasetVersionNotFoundException { return getHistory(datasetPath, currentDataset, currentDataset); } DatasetTool( DatasetVersionMutator datasetService, JobsService jobsService, QueryExecutor executor, Se...
DatasetTool { History getHistory(final DatasetPath datasetPath, DatasetVersion currentDataset) throws DatasetVersionNotFoundException { return getHistory(datasetPath, currentDataset, currentDataset); } DatasetTool( DatasetVersionMutator datasetService, JobsService jobsService, QueryExecutor executor, Se...
@Test public void testGetFileStatusWithLocalPath() throws IOException { try { Path path = new Path("/tmp/file"); @SuppressWarnings("unused") FileStatus status = fs.getFileStatus(path); fail("Expected getFileStatus call to throw an exception"); } catch (IOException e) { } }
@Override public FileStatus getFileStatus(Path f) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); if (!isRemoteFile(absolutePath)) { return new GetFileStatusTask(absolutePath).get(); } try { RemotePath remotePath = getRemotePath(absolutePath); FileSystem delegate = getDelegateFileSy...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public FileStatus getFileStatus(Path f) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); if (!isRemoteFile(absolutePath)) { return new GetFileStatusTask(absolutePath).get(); } try { RemotePath rem...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public FileStatus getFileStatus(Path f) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); if (!isRemoteFile(absolutePath)) { return new GetFileStatusTask(absolutePath).get(); } try { RemotePath rem...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public FileStatus getFileStatus(Path f) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); if (!isRemoteFile(absolutePath)) { return new GetFileStatusTask(absolutePath).get(); } try { RemotePath rem...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public FileStatus getFileStatus(Path f) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); if (!isRemoteFile(absolutePath)) { return new GetFileStatusTask(absolutePath).get(); } try { RemotePath rem...
@Test public void testGetFileStatusWithUnknownRemotePath() throws IOException { Path path = new Path("/tmp/10.0.0.3@file"); try { fs.getFileStatus(path); fail("Expected getFileStatus to throw FileNotFoundException"); } catch (FileNotFoundException e) { } }
@Override public FileStatus getFileStatus(Path f) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); if (!isRemoteFile(absolutePath)) { return new GetFileStatusTask(absolutePath).get(); } try { RemotePath remotePath = getRemotePath(absolutePath); FileSystem delegate = getDelegateFileSy...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public FileStatus getFileStatus(Path f) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); if (!isRemoteFile(absolutePath)) { return new GetFileStatusTask(absolutePath).get(); } try { RemotePath rem...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public FileStatus getFileStatus(Path f) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); if (!isRemoteFile(absolutePath)) { return new GetFileStatusTask(absolutePath).get(); } try { RemotePath rem...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public FileStatus getFileStatus(Path f) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); if (!isRemoteFile(absolutePath)) { return new GetFileStatusTask(absolutePath).get(); } try { RemotePath rem...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public FileStatus getFileStatus(Path f) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); if (!isRemoteFile(absolutePath)) { return new GetFileStatusTask(absolutePath).get(); } try { RemotePath rem...
@Test public void testListStatusRoot() throws IOException { Path root = new Path("/"); FileStatus[] statuses = fs.listStatus(root); assertEquals(1, statuses.length); assertEquals(new Path("pdfs:/foo"), statuses[0].getPath()); assertTrue(statuses[0].isDirectory()); assertEquals(0755, statuses[0].getPermission().toExtend...
@Override public FileStatus[] listStatus(Path f) throws FileNotFoundException, IOException { final RemoteIterator<FileStatus> remoteIterator = listStatusIterator(f); final List<FileStatus> statuses = Lists.newArrayList(); while (remoteIterator.hasNext()) { statuses.add(remoteIterator.next()); } return statuses.toArray(...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public FileStatus[] listStatus(Path f) throws FileNotFoundException, IOException { final RemoteIterator<FileStatus> remoteIterator = listStatusIterator(f); final List<FileStatus> statuses = Lists.newArrayList(); while (remoteIterato...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public FileStatus[] listStatus(Path f) throws FileNotFoundException, IOException { final RemoteIterator<FileStatus> remoteIterator = listStatusIterator(f); final List<FileStatus> statuses = Lists.newArrayList(); while (remoteIterato...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public FileStatus[] listStatus(Path f) throws FileNotFoundException, IOException { final RemoteIterator<FileStatus> remoteIterator = listStatusIterator(f); final List<FileStatus> statuses = Lists.newArrayList(); while (remoteIterato...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public FileStatus[] listStatus(Path f) throws FileNotFoundException, IOException { final RemoteIterator<FileStatus> remoteIterator = listStatusIterator(f); final List<FileStatus> statuses = Lists.newArrayList(); while (remoteIterato...
@Test public void testListStatusWithValidPath() throws IOException { Path path = new Path("/foo/bar"); FileStatus[] statuses = fs.listStatus(path); assertEquals(5, statuses.length); Arrays.sort(statuses); final FileStatus searchKeyStatus = new FileStatus(); searchKeyStatus.setPath(new Path("pdfs:/foo/bar/10.0.0.1@file1...
@Override public FileStatus[] listStatus(Path f) throws FileNotFoundException, IOException { final RemoteIterator<FileStatus> remoteIterator = listStatusIterator(f); final List<FileStatus> statuses = Lists.newArrayList(); while (remoteIterator.hasNext()) { statuses.add(remoteIterator.next()); } return statuses.toArray(...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public FileStatus[] listStatus(Path f) throws FileNotFoundException, IOException { final RemoteIterator<FileStatus> remoteIterator = listStatusIterator(f); final List<FileStatus> statuses = Lists.newArrayList(); while (remoteIterato...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public FileStatus[] listStatus(Path f) throws FileNotFoundException, IOException { final RemoteIterator<FileStatus> remoteIterator = listStatusIterator(f); final List<FileStatus> statuses = Lists.newArrayList(); while (remoteIterato...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public FileStatus[] listStatus(Path f) throws FileNotFoundException, IOException { final RemoteIterator<FileStatus> remoteIterator = listStatusIterator(f); final List<FileStatus> statuses = Lists.newArrayList(); while (remoteIterato...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public FileStatus[] listStatus(Path f) throws FileNotFoundException, IOException { final RemoteIterator<FileStatus> remoteIterator = listStatusIterator(f); final List<FileStatus> statuses = Lists.newArrayList(); while (remoteIterato...
@Test public void testListStatusWithUnknownRemotePath() throws IOException { Path path = new Path("/foo/10.0.0.3@bar"); try { fs.listStatus(path); fail("Expected getFileStatus to throw FileNotFoundException"); } catch (FileNotFoundException e) { } }
@Override public FileStatus[] listStatus(Path f) throws FileNotFoundException, IOException { final RemoteIterator<FileStatus> remoteIterator = listStatusIterator(f); final List<FileStatus> statuses = Lists.newArrayList(); while (remoteIterator.hasNext()) { statuses.add(remoteIterator.next()); } return statuses.toArray(...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public FileStatus[] listStatus(Path f) throws FileNotFoundException, IOException { final RemoteIterator<FileStatus> remoteIterator = listStatusIterator(f); final List<FileStatus> statuses = Lists.newArrayList(); while (remoteIterato...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public FileStatus[] listStatus(Path f) throws FileNotFoundException, IOException { final RemoteIterator<FileStatus> remoteIterator = listStatusIterator(f); final List<FileStatus> statuses = Lists.newArrayList(); while (remoteIterato...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public FileStatus[] listStatus(Path f) throws FileNotFoundException, IOException { final RemoteIterator<FileStatus> remoteIterator = listStatusIterator(f); final List<FileStatus> statuses = Lists.newArrayList(); while (remoteIterato...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public FileStatus[] listStatus(Path f) throws FileNotFoundException, IOException { final RemoteIterator<FileStatus> remoteIterator = listStatusIterator(f); final List<FileStatus> statuses = Lists.newArrayList(); while (remoteIterato...
@Test public void testListStatusIteratorPastLastElement() throws IOException { final Path root = new Path("/"); final RemoteIterator<FileStatus> statusIter = fs.listStatusIterator(root); while (statusIter.hasNext()) { statusIter.next(); } try { statusIter.next(); fail("NoSuchElementException should be throw when next()...
@Override public RemoteIterator<FileStatus> listStatusIterator(Path f) throws FileNotFoundException, IOException { final Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); if (isRemoteFile(absolutePath)) { return new RemoteIterator<FileStatus>() { private boolean hasNext = true; @Override public boolean ha...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public RemoteIterator<FileStatus> listStatusIterator(Path f) throws FileNotFoundException, IOException { final Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); if (isRemoteFile(absolutePath)) { return new RemoteIterat...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public RemoteIterator<FileStatus> listStatusIterator(Path f) throws FileNotFoundException, IOException { final Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); if (isRemoteFile(absolutePath)) { return new RemoteIterat...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public RemoteIterator<FileStatus> listStatusIterator(Path f) throws FileNotFoundException, IOException { final Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); if (isRemoteFile(absolutePath)) { return new RemoteIterat...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public RemoteIterator<FileStatus> listStatusIterator(Path f) throws FileNotFoundException, IOException { final Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); if (isRemoteFile(absolutePath)) { return new RemoteIterat...
@Test public void testListStatusIteratorRoot() throws IOException { final Path root = new Path("/"); final RemoteIterator<FileStatus> statusIterator = fs.listStatusIterator(root); assertTrue(statusIterator.hasNext()); final FileStatus onlyStatus = statusIterator.next(); assertEquals(new Path("pdfs:/foo"), onlyStatus.ge...
@Override public RemoteIterator<FileStatus> listStatusIterator(Path f) throws FileNotFoundException, IOException { final Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); if (isRemoteFile(absolutePath)) { return new RemoteIterator<FileStatus>() { private boolean hasNext = true; @Override public boolean ha...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public RemoteIterator<FileStatus> listStatusIterator(Path f) throws FileNotFoundException, IOException { final Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); if (isRemoteFile(absolutePath)) { return new RemoteIterat...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public RemoteIterator<FileStatus> listStatusIterator(Path f) throws FileNotFoundException, IOException { final Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); if (isRemoteFile(absolutePath)) { return new RemoteIterat...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public RemoteIterator<FileStatus> listStatusIterator(Path f) throws FileNotFoundException, IOException { final Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); if (isRemoteFile(absolutePath)) { return new RemoteIterat...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public RemoteIterator<FileStatus> listStatusIterator(Path f) throws FileNotFoundException, IOException { final Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); if (isRemoteFile(absolutePath)) { return new RemoteIterat...
@Test public void testOpenRoot() throws IOException { Path root = new Path("/"); try { fs.open(root); fail("Expected open call to throw an exception"); } catch (AccessControlException e) { } }
@Override public FSDataInputStream open(Path f, int bufferSize) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); if (absolutePath.isRoot()) { throw new AccessControlException("Cannot open " + f); } try { RemotePath remotePath = getRemotePath(absolutePath); FileSystem delegate = getDe...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public FSDataInputStream open(Path f, int bufferSize) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); if (absolutePath.isRoot()) { throw new AccessControlException("Cannot open " + f); } try { Re...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public FSDataInputStream open(Path f, int bufferSize) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); if (absolutePath.isRoot()) { throw new AccessControlException("Cannot open " + f); } try { Re...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public FSDataInputStream open(Path f, int bufferSize) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); if (absolutePath.isRoot()) { throw new AccessControlException("Cannot open " + f); } try { Re...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public FSDataInputStream open(Path f, int bufferSize) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); if (absolutePath.isRoot()) { throw new AccessControlException("Cannot open " + f); } try { Re...
@Test public void testOpenFile() throws IOException { FSDataInputStream mockFDIS = mock(FSDataInputStream.class); doReturn(mockFDIS).when(mockLocalFS).open(new Path("/foo/bar/file"), 32768); Path root = new Path("/foo/bar/10.0.0.1@file"); FSDataInputStream fdis = fs.open(root, 32768); assertNotNull(fdis); }
@Override public FSDataInputStream open(Path f, int bufferSize) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); if (absolutePath.isRoot()) { throw new AccessControlException("Cannot open " + f); } try { RemotePath remotePath = getRemotePath(absolutePath); FileSystem delegate = getDe...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public FSDataInputStream open(Path f, int bufferSize) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); if (absolutePath.isRoot()) { throw new AccessControlException("Cannot open " + f); } try { Re...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public FSDataInputStream open(Path f, int bufferSize) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); if (absolutePath.isRoot()) { throw new AccessControlException("Cannot open " + f); } try { Re...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public FSDataInputStream open(Path f, int bufferSize) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); if (absolutePath.isRoot()) { throw new AccessControlException("Cannot open " + f); } try { Re...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public FSDataInputStream open(Path f, int bufferSize) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); if (absolutePath.isRoot()) { throw new AccessControlException("Cannot open " + f); } try { Re...
@Test public void testOpenLocalFile() throws IOException { try { Path path = new Path("/tmp/file"); @SuppressWarnings("unused") FSDataInputStream fdis = fs.open(path, 32768); fail("Expected open call to throw an exception"); } catch (IOException e) { } }
@Override public FSDataInputStream open(Path f, int bufferSize) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); if (absolutePath.isRoot()) { throw new AccessControlException("Cannot open " + f); } try { RemotePath remotePath = getRemotePath(absolutePath); FileSystem delegate = getDe...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public FSDataInputStream open(Path f, int bufferSize) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); if (absolutePath.isRoot()) { throw new AccessControlException("Cannot open " + f); } try { Re...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public FSDataInputStream open(Path f, int bufferSize) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); if (absolutePath.isRoot()) { throw new AccessControlException("Cannot open " + f); } try { Re...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public FSDataInputStream open(Path f, int bufferSize) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); if (absolutePath.isRoot()) { throw new AccessControlException("Cannot open " + f); } try { Re...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public FSDataInputStream open(Path f, int bufferSize) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); if (absolutePath.isRoot()) { throw new AccessControlException("Cannot open " + f); } try { Re...
@Test public void testTransformWithExtract() throws Exception { setSpace(); DatasetPath myDatasetPath = new DatasetPath("spacefoo.folderbar.folderbaz.datasetbuzz"); createDatasetFromParentAndSave(myDatasetPath, "cp.\"tpch/supplier.parquet\""); DatasetUI dataset = getDataset(myDatasetPath); Transformer testTransformer =...
public VirtualDatasetUI transformWithExtract(DatasetVersion newVersion, DatasetPath path, VirtualDatasetUI baseDataset, TransformBase transform) throws DatasetNotFoundException, NamespaceException{ final ExtractTransformActor actor = new ExtractTransformActor(baseDataset.getState(), false, username(), executor); final ...
Transformer { public VirtualDatasetUI transformWithExtract(DatasetVersion newVersion, DatasetPath path, VirtualDatasetUI baseDataset, TransformBase transform) throws DatasetNotFoundException, NamespaceException{ final ExtractTransformActor actor = new ExtractTransformActor(baseDataset.getState(), false, username(), exe...
Transformer { public VirtualDatasetUI transformWithExtract(DatasetVersion newVersion, DatasetPath path, VirtualDatasetUI baseDataset, TransformBase transform) throws DatasetNotFoundException, NamespaceException{ final ExtractTransformActor actor = new ExtractTransformActor(baseDataset.getState(), false, username(), exe...
Transformer { public VirtualDatasetUI transformWithExtract(DatasetVersion newVersion, DatasetPath path, VirtualDatasetUI baseDataset, TransformBase transform) throws DatasetNotFoundException, NamespaceException{ final ExtractTransformActor actor = new ExtractTransformActor(baseDataset.getState(), false, username(), exe...
Transformer { public VirtualDatasetUI transformWithExtract(DatasetVersion newVersion, DatasetPath path, VirtualDatasetUI baseDataset, TransformBase transform) throws DatasetNotFoundException, NamespaceException{ final ExtractTransformActor actor = new ExtractTransformActor(baseDataset.getState(), false, username(), exe...
@Test public void testCreateRoot() throws IOException { Path root = new Path("/"); try { fs.create(root, FsPermission.getFileDefault(), true, 0, (short) 1, 4096, null); fail("Expected create call to throw an exception"); } catch (AccessControlException e) { } }
@Override public FSDataOutputStream create(Path f, FsPermission permission, boolean overwrite, int bufferSize, short replication, long blockSize, Progressable progress) throws IOException { final Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); if (absolutePath.isRoot()) { throw new AccessControlExceptio...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public FSDataOutputStream create(Path f, FsPermission permission, boolean overwrite, int bufferSize, short replication, long blockSize, Progressable progress) throws IOException { final Path absolutePath = toAbsolutePath(f); checkPa...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public FSDataOutputStream create(Path f, FsPermission permission, boolean overwrite, int bufferSize, short replication, long blockSize, Progressable progress) throws IOException { final Path absolutePath = toAbsolutePath(f); checkPa...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public FSDataOutputStream create(Path f, FsPermission permission, boolean overwrite, int bufferSize, short replication, long blockSize, Progressable progress) throws IOException { final Path absolutePath = toAbsolutePath(f); checkPa...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public FSDataOutputStream create(Path f, FsPermission permission, boolean overwrite, int bufferSize, short replication, long blockSize, Progressable progress) throws IOException { final Path absolutePath = toAbsolutePath(f); checkPa...
@Test public void testCreateFile() throws IOException { FSDataOutputStream mockFDOS = mock(FSDataOutputStream.class); doReturn(mockFDOS).when(mockLocalFS).create( new Path("/foo/bar/file"), FsPermission.getFileDefault(), true, 0, (short) 1, 4096L,null); Path path = new Path("/foo/bar/10.0.0.1@file"); FSDataOutputStream...
@Override public FSDataOutputStream create(Path f, FsPermission permission, boolean overwrite, int bufferSize, short replication, long blockSize, Progressable progress) throws IOException { final Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); if (absolutePath.isRoot()) { throw new AccessControlExceptio...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public FSDataOutputStream create(Path f, FsPermission permission, boolean overwrite, int bufferSize, short replication, long blockSize, Progressable progress) throws IOException { final Path absolutePath = toAbsolutePath(f); checkPa...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public FSDataOutputStream create(Path f, FsPermission permission, boolean overwrite, int bufferSize, short replication, long blockSize, Progressable progress) throws IOException { final Path absolutePath = toAbsolutePath(f); checkPa...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public FSDataOutputStream create(Path f, FsPermission permission, boolean overwrite, int bufferSize, short replication, long blockSize, Progressable progress) throws IOException { final Path absolutePath = toAbsolutePath(f); checkPa...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public FSDataOutputStream create(Path f, FsPermission permission, boolean overwrite, int bufferSize, short replication, long blockSize, Progressable progress) throws IOException { final Path absolutePath = toAbsolutePath(f); checkPa...
@Test public void testCreateLocalFile() throws IOException { try { Path path = new Path("foo/bar/file"); @SuppressWarnings("unused") FSDataOutputStream fdos = fs.create(path, FsPermission.getFileDefault(), true, 0, (short) 1, 4096, null); fail("Expected create call to throw an exception"); } catch (IOException e) { } }
@Override public FSDataOutputStream create(Path f, FsPermission permission, boolean overwrite, int bufferSize, short replication, long blockSize, Progressable progress) throws IOException { final Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); if (absolutePath.isRoot()) { throw new AccessControlExceptio...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public FSDataOutputStream create(Path f, FsPermission permission, boolean overwrite, int bufferSize, short replication, long blockSize, Progressable progress) throws IOException { final Path absolutePath = toAbsolutePath(f); checkPa...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public FSDataOutputStream create(Path f, FsPermission permission, boolean overwrite, int bufferSize, short replication, long blockSize, Progressable progress) throws IOException { final Path absolutePath = toAbsolutePath(f); checkPa...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public FSDataOutputStream create(Path f, FsPermission permission, boolean overwrite, int bufferSize, short replication, long blockSize, Progressable progress) throws IOException { final Path absolutePath = toAbsolutePath(f); checkPa...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public FSDataOutputStream create(Path f, FsPermission permission, boolean overwrite, int bufferSize, short replication, long blockSize, Progressable progress) throws IOException { final Path absolutePath = toAbsolutePath(f); checkPa...
@Test public void testAppendRoot() throws IOException { Path root = new Path("/"); try { fs.append(root, 4096, null); fail("Expected append call to throw an exception"); } catch (AccessControlException e) { } }
@Override public FSDataOutputStream append(Path f, int bufferSize, Progressable progress) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); if (absolutePath.isRoot()) { throw new AccessControlException("Cannot open " + f); } if(!isRemoteFile(f)){ if (isDirectory(absolutePath)) { throw...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public FSDataOutputStream append(Path f, int bufferSize, Progressable progress) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); if (absolutePath.isRoot()) { throw new AccessControlException("Cann...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public FSDataOutputStream append(Path f, int bufferSize, Progressable progress) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); if (absolutePath.isRoot()) { throw new AccessControlException("Cann...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public FSDataOutputStream append(Path f, int bufferSize, Progressable progress) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); if (absolutePath.isRoot()) { throw new AccessControlException("Cann...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public FSDataOutputStream append(Path f, int bufferSize, Progressable progress) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); if (absolutePath.isRoot()) { throw new AccessControlException("Cann...
@Test public void testAppendFile() throws IOException { FSDataOutputStream mockFDOS = mock(FSDataOutputStream.class); doReturn(mockFDOS).when(mockRemoteFS).append( new Path("/foo/bar/file"), 4096, null); Path path = new Path("/foo/bar/10.0.0.2@file"); FSDataOutputStream fdos = fs.append(path, 4096, null); assertNotNull...
@Override public FSDataOutputStream append(Path f, int bufferSize, Progressable progress) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); if (absolutePath.isRoot()) { throw new AccessControlException("Cannot open " + f); } if(!isRemoteFile(f)){ if (isDirectory(absolutePath)) { throw...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public FSDataOutputStream append(Path f, int bufferSize, Progressable progress) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); if (absolutePath.isRoot()) { throw new AccessControlException("Cann...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public FSDataOutputStream append(Path f, int bufferSize, Progressable progress) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); if (absolutePath.isRoot()) { throw new AccessControlException("Cann...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public FSDataOutputStream append(Path f, int bufferSize, Progressable progress) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); if (absolutePath.isRoot()) { throw new AccessControlException("Cann...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public FSDataOutputStream append(Path f, int bufferSize, Progressable progress) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); if (absolutePath.isRoot()) { throw new AccessControlException("Cann...
@Test public void testAppendLocalFile() throws IOException { try { Path path = new Path("/foo/bar/file"); @SuppressWarnings("unused") FSDataOutputStream fdos = fs.append(path, 4096, null); fail("Expected append call to throw an exception"); } catch (IOException e) { } }
@Override public FSDataOutputStream append(Path f, int bufferSize, Progressable progress) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); if (absolutePath.isRoot()) { throw new AccessControlException("Cannot open " + f); } if(!isRemoteFile(f)){ if (isDirectory(absolutePath)) { throw...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public FSDataOutputStream append(Path f, int bufferSize, Progressable progress) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); if (absolutePath.isRoot()) { throw new AccessControlException("Cann...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public FSDataOutputStream append(Path f, int bufferSize, Progressable progress) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); if (absolutePath.isRoot()) { throw new AccessControlException("Cann...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public FSDataOutputStream append(Path f, int bufferSize, Progressable progress) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); if (absolutePath.isRoot()) { throw new AccessControlException("Cann...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public FSDataOutputStream append(Path f, int bufferSize, Progressable progress) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); if (absolutePath.isRoot()) { throw new AccessControlException("Cann...
@Test public void testDeleteRoot() throws IOException { Path root = new Path("/"); try { fs.delete(root, false); fail("Expected delete call to throw an exception"); } catch (AccessControlException e) { } }
@Override public boolean delete(Path f, boolean recursive) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); if (absolutePath.isRoot()) { throw new AccessControlException("Cannot delete " + f); } if (!isRemoteFile(f)) { return new DeleteTask(absolutePath, recursive).get(); } try { Rem...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public boolean delete(Path f, boolean recursive) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); if (absolutePath.isRoot()) { throw new AccessControlException("Cannot delete " + f); } if (!isRemo...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public boolean delete(Path f, boolean recursive) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); if (absolutePath.isRoot()) { throw new AccessControlException("Cannot delete " + f); } if (!isRemo...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public boolean delete(Path f, boolean recursive) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); if (absolutePath.isRoot()) { throw new AccessControlException("Cannot delete " + f); } if (!isRemo...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public boolean delete(Path f, boolean recursive) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); if (absolutePath.isRoot()) { throw new AccessControlException("Cannot delete " + f); } if (!isRemo...
@Test public void testDeleteLocalFile() throws IOException { try { Path path = new Path("/foo/bar/file"); fs.delete(path, false); fail("Expected delete call to throw an exception"); } catch (IOException e) { } }
@Override public boolean delete(Path f, boolean recursive) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); if (absolutePath.isRoot()) { throw new AccessControlException("Cannot delete " + f); } if (!isRemoteFile(f)) { return new DeleteTask(absolutePath, recursive).get(); } try { Rem...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public boolean delete(Path f, boolean recursive) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); if (absolutePath.isRoot()) { throw new AccessControlException("Cannot delete " + f); } if (!isRemo...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public boolean delete(Path f, boolean recursive) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); if (absolutePath.isRoot()) { throw new AccessControlException("Cannot delete " + f); } if (!isRemo...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public boolean delete(Path f, boolean recursive) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); if (absolutePath.isRoot()) { throw new AccessControlException("Cannot delete " + f); } if (!isRemo...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public boolean delete(Path f, boolean recursive) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); if (absolutePath.isRoot()) { throw new AccessControlException("Cannot delete " + f); } if (!isRemo...
@Test public void testDeleteFile() throws IOException { doReturn(true).when(mockRemoteFS).delete( new Path("/foo/bar"), false); Path path = new Path("/foo/10.0.0.2@bar"); assertTrue(fs.delete(path, false)); }
@Override public boolean delete(Path f, boolean recursive) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); if (absolutePath.isRoot()) { throw new AccessControlException("Cannot delete " + f); } if (!isRemoteFile(f)) { return new DeleteTask(absolutePath, recursive).get(); } try { Rem...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public boolean delete(Path f, boolean recursive) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); if (absolutePath.isRoot()) { throw new AccessControlException("Cannot delete " + f); } if (!isRemo...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public boolean delete(Path f, boolean recursive) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); if (absolutePath.isRoot()) { throw new AccessControlException("Cannot delete " + f); } if (!isRemo...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public boolean delete(Path f, boolean recursive) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); if (absolutePath.isRoot()) { throw new AccessControlException("Cannot delete " + f); } if (!isRemo...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public boolean delete(Path f, boolean recursive) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); if (absolutePath.isRoot()) { throw new AccessControlException("Cannot delete " + f); } if (!isRemo...
@Test public void testDeleteUnknownLocalFile() throws IOException { doThrow(FileNotFoundException.class).when(mockLocalFS).delete( new Path("/foo/unknown"), false); Path path = new Path("/foo/10.0.0.1@unknown"); try{ fs.delete(path, false); fail("Expecting FileNotFoundException"); } catch(FileNotFoundException e) { } }
@Override public boolean delete(Path f, boolean recursive) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); if (absolutePath.isRoot()) { throw new AccessControlException("Cannot delete " + f); } if (!isRemoteFile(f)) { return new DeleteTask(absolutePath, recursive).get(); } try { Rem...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public boolean delete(Path f, boolean recursive) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); if (absolutePath.isRoot()) { throw new AccessControlException("Cannot delete " + f); } if (!isRemo...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public boolean delete(Path f, boolean recursive) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); if (absolutePath.isRoot()) { throw new AccessControlException("Cannot delete " + f); } if (!isRemo...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public boolean delete(Path f, boolean recursive) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); if (absolutePath.isRoot()) { throw new AccessControlException("Cannot delete " + f); } if (!isRemo...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public boolean delete(Path f, boolean recursive) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); if (absolutePath.isRoot()) { throw new AccessControlException("Cannot delete " + f); } if (!isRemo...
@Test public void testReplaceInvalidReplacedValues() { boolean exThrown = false; try { VirtualDatasetState state = new VirtualDatasetState() .setFrom(nameDSRef); Expression exp0 = new ExpColumnReference("bar").wrap(); FieldTransformationBase transf1 = new FieldReplaceValue() .setReplacedValuesList(Collections.<String>e...
public static String generateSQL(VirtualDatasetState vss){ return new SQLGenerator().innerGenerateSQL(vss); }
SQLGenerator { public static String generateSQL(VirtualDatasetState vss){ return new SQLGenerator().innerGenerateSQL(vss); } }
SQLGenerator { public static String generateSQL(VirtualDatasetState vss){ return new SQLGenerator().innerGenerateSQL(vss); } SQLGenerator(); }
SQLGenerator { public static String generateSQL(VirtualDatasetState vss){ return new SQLGenerator().innerGenerateSQL(vss); } SQLGenerator(); static String generateSQL(VirtualDatasetState vss); static String getTableAlias(From from); }
SQLGenerator { public static String generateSQL(VirtualDatasetState vss){ return new SQLGenerator().innerGenerateSQL(vss); } SQLGenerator(); static String generateSQL(VirtualDatasetState vss); static String getTableAlias(From from); }
@Test public void testDeleteUnknownRemoteFile() throws IOException { doThrow(FileNotFoundException.class).when(mockRemoteFS).delete( new Path("/foo/unknown"), false); Path path = new Path("/foo/10.0.0.2@unknown"); try{ fs.delete(path, false); fail("Expecting FileNotFoundException"); } catch(FileNotFoundException e) { }...
@Override public boolean delete(Path f, boolean recursive) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); if (absolutePath.isRoot()) { throw new AccessControlException("Cannot delete " + f); } if (!isRemoteFile(f)) { return new DeleteTask(absolutePath, recursive).get(); } try { Rem...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public boolean delete(Path f, boolean recursive) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); if (absolutePath.isRoot()) { throw new AccessControlException("Cannot delete " + f); } if (!isRemo...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public boolean delete(Path f, boolean recursive) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); if (absolutePath.isRoot()) { throw new AccessControlException("Cannot delete " + f); } if (!isRemo...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public boolean delete(Path f, boolean recursive) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); if (absolutePath.isRoot()) { throw new AccessControlException("Cannot delete " + f); } if (!isRemo...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public boolean delete(Path f, boolean recursive) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); if (absolutePath.isRoot()) { throw new AccessControlException("Cannot delete " + f); } if (!isRemo...
@Test public void testMkdirsRoot() throws IOException { Path root = new Path("/"); assertTrue(fs.mkdirs(root, FsPermission.getDirDefault())); }
@Override public boolean mkdirs(Path f, FsPermission permission) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); if (absolutePath.isRoot()) { return true; } if (isRemoteFile(absolutePath)) { throw new IOException("Cannot create a directory under file " + f); } return new MkdirsTask(...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public boolean mkdirs(Path f, FsPermission permission) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); if (absolutePath.isRoot()) { return true; } if (isRemoteFile(absolutePath)) { throw new IOEx...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public boolean mkdirs(Path f, FsPermission permission) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); if (absolutePath.isRoot()) { return true; } if (isRemoteFile(absolutePath)) { throw new IOEx...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public boolean mkdirs(Path f, FsPermission permission) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); if (absolutePath.isRoot()) { return true; } if (isRemoteFile(absolutePath)) { throw new IOEx...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public boolean mkdirs(Path f, FsPermission permission) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); if (absolutePath.isRoot()) { return true; } if (isRemoteFile(absolutePath)) { throw new IOEx...
@Test public void testMkdirsRemoteFile() throws IOException { doReturn(true).when(mockLocalFS).mkdirs( new Path("/foo/bar/dir2"), FsPermission.getFileDefault()); doReturn(true).when(mockRemoteFS).mkdirs( new Path("/foo/bar/dir2"), FsPermission.getFileDefault()); Path path = new Path("/foo/bar/dir2"); assertTrue(fs.mkdi...
@Override public boolean mkdirs(Path f, FsPermission permission) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); if (absolutePath.isRoot()) { return true; } if (isRemoteFile(absolutePath)) { throw new IOException("Cannot create a directory under file " + f); } return new MkdirsTask(...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public boolean mkdirs(Path f, FsPermission permission) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); if (absolutePath.isRoot()) { return true; } if (isRemoteFile(absolutePath)) { throw new IOEx...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public boolean mkdirs(Path f, FsPermission permission) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); if (absolutePath.isRoot()) { return true; } if (isRemoteFile(absolutePath)) { throw new IOEx...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public boolean mkdirs(Path f, FsPermission permission) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); if (absolutePath.isRoot()) { return true; } if (isRemoteFile(absolutePath)) { throw new IOEx...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public boolean mkdirs(Path f, FsPermission permission) throws IOException { Path absolutePath = toAbsolutePath(f); checkPath(absolutePath); if (absolutePath.isRoot()) { return true; } if (isRemoteFile(absolutePath)) { throw new IOEx...
@Test public void testRenameFromRoot() throws IOException { Path root = new Path("/"); Path dst = new Path("/foo/baz"); try { fs.rename(root, dst); fail("Expected rename to throw an exception"); } catch(IOException e) { } }
@Override public boolean rename(Path src, Path dst) throws IOException { Path absoluteSrc = toAbsolutePath(src); Path absoluteDst = toAbsolutePath(dst); checkPath(absoluteSrc); checkPath(absoluteDst); if (absoluteSrc.isRoot()) { throw new IOException("Cannot rename " + absoluteSrc); } if (absoluteDst.isRoot()) { throw ...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public boolean rename(Path src, Path dst) throws IOException { Path absoluteSrc = toAbsolutePath(src); Path absoluteDst = toAbsolutePath(dst); checkPath(absoluteSrc); checkPath(absoluteDst); if (absoluteSrc.isRoot()) { throw new IOE...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public boolean rename(Path src, Path dst) throws IOException { Path absoluteSrc = toAbsolutePath(src); Path absoluteDst = toAbsolutePath(dst); checkPath(absoluteSrc); checkPath(absoluteDst); if (absoluteSrc.isRoot()) { throw new IOE...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public boolean rename(Path src, Path dst) throws IOException { Path absoluteSrc = toAbsolutePath(src); Path absoluteDst = toAbsolutePath(dst); checkPath(absoluteSrc); checkPath(absoluteDst); if (absoluteSrc.isRoot()) { throw new IOE...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public boolean rename(Path src, Path dst) throws IOException { Path absoluteSrc = toAbsolutePath(src); Path absoluteDst = toAbsolutePath(dst); checkPath(absoluteSrc); checkPath(absoluteDst); if (absoluteSrc.isRoot()) { throw new IOE...
@Test public void testRenameToRoot() throws IOException { Path root = new Path("/"); Path src = new Path("/foo/bar"); try { fs.rename(src, root); fail("Expected rename to throw an exception"); } catch(IOException e) { } }
@Override public boolean rename(Path src, Path dst) throws IOException { Path absoluteSrc = toAbsolutePath(src); Path absoluteDst = toAbsolutePath(dst); checkPath(absoluteSrc); checkPath(absoluteDst); if (absoluteSrc.isRoot()) { throw new IOException("Cannot rename " + absoluteSrc); } if (absoluteDst.isRoot()) { throw ...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public boolean rename(Path src, Path dst) throws IOException { Path absoluteSrc = toAbsolutePath(src); Path absoluteDst = toAbsolutePath(dst); checkPath(absoluteSrc); checkPath(absoluteDst); if (absoluteSrc.isRoot()) { throw new IOE...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public boolean rename(Path src, Path dst) throws IOException { Path absoluteSrc = toAbsolutePath(src); Path absoluteDst = toAbsolutePath(dst); checkPath(absoluteSrc); checkPath(absoluteDst); if (absoluteSrc.isRoot()) { throw new IOE...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public boolean rename(Path src, Path dst) throws IOException { Path absoluteSrc = toAbsolutePath(src); Path absoluteDst = toAbsolutePath(dst); checkPath(absoluteSrc); checkPath(absoluteDst); if (absoluteSrc.isRoot()) { throw new IOE...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public boolean rename(Path src, Path dst) throws IOException { Path absoluteSrc = toAbsolutePath(src); Path absoluteDst = toAbsolutePath(dst); checkPath(absoluteSrc); checkPath(absoluteDst); if (absoluteSrc.isRoot()) { throw new IOE...
@Test public void testRenameFileSameEndpoint() throws IOException { doReturn(true).when(mockLocalFS).rename( new Path("/foo/bar/file1"), new Path("/foo/bar/file3")); Path src = new Path("/foo/bar/10.0.0.1@file1"); Path dst = new Path("/foo/bar/10.0.0.1@file3"); assertTrue(fs.rename(src, dst)); }
@Override public boolean rename(Path src, Path dst) throws IOException { Path absoluteSrc = toAbsolutePath(src); Path absoluteDst = toAbsolutePath(dst); checkPath(absoluteSrc); checkPath(absoluteDst); if (absoluteSrc.isRoot()) { throw new IOException("Cannot rename " + absoluteSrc); } if (absoluteDst.isRoot()) { throw ...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public boolean rename(Path src, Path dst) throws IOException { Path absoluteSrc = toAbsolutePath(src); Path absoluteDst = toAbsolutePath(dst); checkPath(absoluteSrc); checkPath(absoluteDst); if (absoluteSrc.isRoot()) { throw new IOE...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public boolean rename(Path src, Path dst) throws IOException { Path absoluteSrc = toAbsolutePath(src); Path absoluteDst = toAbsolutePath(dst); checkPath(absoluteSrc); checkPath(absoluteDst); if (absoluteSrc.isRoot()) { throw new IOE...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public boolean rename(Path src, Path dst) throws IOException { Path absoluteSrc = toAbsolutePath(src); Path absoluteDst = toAbsolutePath(dst); checkPath(absoluteSrc); checkPath(absoluteDst); if (absoluteSrc.isRoot()) { throw new IOE...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public boolean rename(Path src, Path dst) throws IOException { Path absoluteSrc = toAbsolutePath(src); Path absoluteDst = toAbsolutePath(dst); checkPath(absoluteSrc); checkPath(absoluteDst); if (absoluteSrc.isRoot()) { throw new IOE...
@Test public void testRenameRemoteFileDifferentEndpoints() throws IOException { Path src = new Path("/foo/bar/10.0.0.1@file1"); Path dst = new Path("/foo/bar/10.0.0.2@file3"); try { fs.rename(src, dst); fail("Expected rename across endpoints to fail"); } catch(IOException e) { } }
@Override public boolean rename(Path src, Path dst) throws IOException { Path absoluteSrc = toAbsolutePath(src); Path absoluteDst = toAbsolutePath(dst); checkPath(absoluteSrc); checkPath(absoluteDst); if (absoluteSrc.isRoot()) { throw new IOException("Cannot rename " + absoluteSrc); } if (absoluteDst.isRoot()) { throw ...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public boolean rename(Path src, Path dst) throws IOException { Path absoluteSrc = toAbsolutePath(src); Path absoluteDst = toAbsolutePath(dst); checkPath(absoluteSrc); checkPath(absoluteDst); if (absoluteSrc.isRoot()) { throw new IOE...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public boolean rename(Path src, Path dst) throws IOException { Path absoluteSrc = toAbsolutePath(src); Path absoluteDst = toAbsolutePath(dst); checkPath(absoluteSrc); checkPath(absoluteDst); if (absoluteSrc.isRoot()) { throw new IOE...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public boolean rename(Path src, Path dst) throws IOException { Path absoluteSrc = toAbsolutePath(src); Path absoluteDst = toAbsolutePath(dst); checkPath(absoluteSrc); checkPath(absoluteDst); if (absoluteSrc.isRoot()) { throw new IOE...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public boolean rename(Path src, Path dst) throws IOException { Path absoluteSrc = toAbsolutePath(src); Path absoluteDst = toAbsolutePath(dst); checkPath(absoluteSrc); checkPath(absoluteDst); if (absoluteSrc.isRoot()) { throw new IOE...
@Test public void testRenameDirectories() throws IOException { doReturn(true).when(mockLocalFS).rename( new Path("/foo/bar"), new Path("/foo/baz")); doReturn(true).when(mockRemoteFS).rename( new Path("/foo/bar"), new Path("/foo/baz")); Path src = new Path("/foo/bar"); Path dst = new Path("/foo/baz"); assertTrue(fs.rena...
@Override public boolean rename(Path src, Path dst) throws IOException { Path absoluteSrc = toAbsolutePath(src); Path absoluteDst = toAbsolutePath(dst); checkPath(absoluteSrc); checkPath(absoluteDst); if (absoluteSrc.isRoot()) { throw new IOException("Cannot rename " + absoluteSrc); } if (absoluteDst.isRoot()) { throw ...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public boolean rename(Path src, Path dst) throws IOException { Path absoluteSrc = toAbsolutePath(src); Path absoluteDst = toAbsolutePath(dst); checkPath(absoluteSrc); checkPath(absoluteDst); if (absoluteSrc.isRoot()) { throw new IOE...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public boolean rename(Path src, Path dst) throws IOException { Path absoluteSrc = toAbsolutePath(src); Path absoluteDst = toAbsolutePath(dst); checkPath(absoluteSrc); checkPath(absoluteDst); if (absoluteSrc.isRoot()) { throw new IOE...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public boolean rename(Path src, Path dst) throws IOException { Path absoluteSrc = toAbsolutePath(src); Path absoluteDst = toAbsolutePath(dst); checkPath(absoluteSrc); checkPath(absoluteDst); if (absoluteSrc.isRoot()) { throw new IOE...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public boolean rename(Path src, Path dst) throws IOException { Path absoluteSrc = toAbsolutePath(src); Path absoluteDst = toAbsolutePath(dst); checkPath(absoluteSrc); checkPath(absoluteDst); if (absoluteSrc.isRoot()) { throw new IOE...
@Test public void testGetFileBlockLocations() throws IOException { Path path = new Path("/foo/10.0.0.1@bar"); BlockLocation[] locations = fs.getFileBlockLocations(new FileStatus(1027, false, 1, 4096, 123456, path), 7, 1024); assertEquals(1, locations.length); BlockLocation location = locations[0]; assertArrayEquals(new...
@Override public BlockLocation[] getFileBlockLocations(FileStatus file, long start, long len) throws IOException { Preconditions.checkArgument(start >= 0, "start should be positive"); Preconditions.checkArgument(len >= 0, "len should be positive"); if (start >= file.getLen()) { return new BlockLocation[] {}; } try { fi...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public BlockLocation[] getFileBlockLocations(FileStatus file, long start, long len) throws IOException { Preconditions.checkArgument(start >= 0, "start should be positive"); Preconditions.checkArgument(len >= 0, "len should be posit...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public BlockLocation[] getFileBlockLocations(FileStatus file, long start, long len) throws IOException { Preconditions.checkArgument(start >= 0, "start should be positive"); Preconditions.checkArgument(len >= 0, "len should be posit...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public BlockLocation[] getFileBlockLocations(FileStatus file, long start, long len) throws IOException { Preconditions.checkArgument(start >= 0, "start should be positive"); Preconditions.checkArgument(len >= 0, "len should be posit...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public BlockLocation[] getFileBlockLocations(FileStatus file, long start, long len) throws IOException { Preconditions.checkArgument(start >= 0, "start should be positive"); Preconditions.checkArgument(len >= 0, "len should be posit...
@Test public void testGetFileBlockLocationsStartGreaterThanLen() throws IOException { Path path = new Path("/foo/10.0.0.1@bar"); assertArrayEquals(new BlockLocation[]{}, fs.getFileBlockLocations(new FileStatus(1024, false, 1,4096, 123456, path), 4096, 8192)); }
@Override public BlockLocation[] getFileBlockLocations(FileStatus file, long start, long len) throws IOException { Preconditions.checkArgument(start >= 0, "start should be positive"); Preconditions.checkArgument(len >= 0, "len should be positive"); if (start >= file.getLen()) { return new BlockLocation[] {}; } try { fi...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public BlockLocation[] getFileBlockLocations(FileStatus file, long start, long len) throws IOException { Preconditions.checkArgument(start >= 0, "start should be positive"); Preconditions.checkArgument(len >= 0, "len should be posit...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public BlockLocation[] getFileBlockLocations(FileStatus file, long start, long len) throws IOException { Preconditions.checkArgument(start >= 0, "start should be positive"); Preconditions.checkArgument(len >= 0, "len should be posit...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public BlockLocation[] getFileBlockLocations(FileStatus file, long start, long len) throws IOException { Preconditions.checkArgument(start >= 0, "start should be positive"); Preconditions.checkArgument(len >= 0, "len should be posit...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public BlockLocation[] getFileBlockLocations(FileStatus file, long start, long len) throws IOException { Preconditions.checkArgument(start >= 0, "start should be positive"); Preconditions.checkArgument(len >= 0, "len should be posit...
@Test public void testTimeIntervals() throws Exception { HistogramGenerator hg = new HistogramGenerator(null); String myTimeStr = "2016-02-29 13:59:01"; DateTimeFormatter dtf = DateFunctionsUtils.getISOFormatterForFormatString("YYYY-MM-DD HH24:MI:SS"); LocalDateTime myTime = dtf.parseLocalDateTime(myTimeStr); System.ou...
@VisibleForTesting protected static LocalDateTime roundTime(LocalDateTime tmpValue, TruncEvalEnum trucateTo, boolean isRoundDown) { switch (trucateTo) { case SECOND: if (isRoundDown) { return tmpValue.secondOfMinute().roundFloorCopy(); } else { return tmpValue.secondOfMinute().roundCeilingCopy(); } case MINUTE: if (isR...
HistogramGenerator { @VisibleForTesting protected static LocalDateTime roundTime(LocalDateTime tmpValue, TruncEvalEnum trucateTo, boolean isRoundDown) { switch (trucateTo) { case SECOND: if (isRoundDown) { return tmpValue.secondOfMinute().roundFloorCopy(); } else { return tmpValue.secondOfMinute().roundCeilingCopy(); }...
HistogramGenerator { @VisibleForTesting protected static LocalDateTime roundTime(LocalDateTime tmpValue, TruncEvalEnum trucateTo, boolean isRoundDown) { switch (trucateTo) { case SECOND: if (isRoundDown) { return tmpValue.secondOfMinute().roundFloorCopy(); } else { return tmpValue.secondOfMinute().roundCeilingCopy(); }...
HistogramGenerator { @VisibleForTesting protected static LocalDateTime roundTime(LocalDateTime tmpValue, TruncEvalEnum trucateTo, boolean isRoundDown) { switch (trucateTo) { case SECOND: if (isRoundDown) { return tmpValue.secondOfMinute().roundFloorCopy(); } else { return tmpValue.secondOfMinute().roundCeilingCopy(); }...
HistogramGenerator { @VisibleForTesting protected static LocalDateTime roundTime(LocalDateTime tmpValue, TruncEvalEnum trucateTo, boolean isRoundDown) { switch (trucateTo) { case SECOND: if (isRoundDown) { return tmpValue.secondOfMinute().roundFloorCopy(); } else { return tmpValue.secondOfMinute().roundCeilingCopy(); }...
@Test public void testGetFileBlockLocationsNegativeStart() throws IOException { Path path = new Path("/foo/10.0.0.1@bar"); try { fs.getFileBlockLocations(new FileStatus(1024, false, 1,4096, 123456, path), -22, 8192); fail("Expected getFileBlockLocation to throw an exception"); } catch (IllegalArgumentException e) { } }
@Override public BlockLocation[] getFileBlockLocations(FileStatus file, long start, long len) throws IOException { Preconditions.checkArgument(start >= 0, "start should be positive"); Preconditions.checkArgument(len >= 0, "len should be positive"); if (start >= file.getLen()) { return new BlockLocation[] {}; } try { fi...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public BlockLocation[] getFileBlockLocations(FileStatus file, long start, long len) throws IOException { Preconditions.checkArgument(start >= 0, "start should be positive"); Preconditions.checkArgument(len >= 0, "len should be posit...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public BlockLocation[] getFileBlockLocations(FileStatus file, long start, long len) throws IOException { Preconditions.checkArgument(start >= 0, "start should be positive"); Preconditions.checkArgument(len >= 0, "len should be posit...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public BlockLocation[] getFileBlockLocations(FileStatus file, long start, long len) throws IOException { Preconditions.checkArgument(start >= 0, "start should be positive"); Preconditions.checkArgument(len >= 0, "len should be posit...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public BlockLocation[] getFileBlockLocations(FileStatus file, long start, long len) throws IOException { Preconditions.checkArgument(start >= 0, "start should be positive"); Preconditions.checkArgument(len >= 0, "len should be posit...
@Test public void testGetFileBlockLocationsNegativeLen() throws IOException { Path path = new Path("/foo/10.0.0.1@bar"); try { fs.getFileBlockLocations(new FileStatus(1024, false, 1,4096, 123456, path), 18, -2); fail("Expected getFileBlockLocation to throw an exception"); } catch (IllegalArgumentException e) { } }
@Override public BlockLocation[] getFileBlockLocations(FileStatus file, long start, long len) throws IOException { Preconditions.checkArgument(start >= 0, "start should be positive"); Preconditions.checkArgument(len >= 0, "len should be positive"); if (start >= file.getLen()) { return new BlockLocation[] {}; } try { fi...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public BlockLocation[] getFileBlockLocations(FileStatus file, long start, long len) throws IOException { Preconditions.checkArgument(start >= 0, "start should be positive"); Preconditions.checkArgument(len >= 0, "len should be posit...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public BlockLocation[] getFileBlockLocations(FileStatus file, long start, long len) throws IOException { Preconditions.checkArgument(start >= 0, "start should be positive"); Preconditions.checkArgument(len >= 0, "len should be posit...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public BlockLocation[] getFileBlockLocations(FileStatus file, long start, long len) throws IOException { Preconditions.checkArgument(start >= 0, "start should be positive"); Preconditions.checkArgument(len >= 0, "len should be posit...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public BlockLocation[] getFileBlockLocations(FileStatus file, long start, long len) throws IOException { Preconditions.checkArgument(start >= 0, "start should be positive"); Preconditions.checkArgument(len >= 0, "len should be posit...
@Test public void testCanonicalizeRemoteFile() throws IOException { Path path = new Path("/foo/bar/10.0.0.2@file"); Path resolvedPath = fs.canonicalizePath(path); assertEquals(new Path("/foo/bar/10.0.0.2@file"), resolvedPath); }
@Override public Path canonicalizePath(Path p) throws IOException { Path absolutePath = toAbsolutePath(p); checkPath(absolutePath); if (isRemoteFile(absolutePath)) { return absolutePath; } if (isDirectory(absolutePath)) { return absolutePath; } if (localAccessAllowed) { return createRemotePath(localIdentity.getAddress(...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public Path canonicalizePath(Path p) throws IOException { Path absolutePath = toAbsolutePath(p); checkPath(absolutePath); if (isRemoteFile(absolutePath)) { return absolutePath; } if (isDirectory(absolutePath)) { return absolutePath;...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public Path canonicalizePath(Path p) throws IOException { Path absolutePath = toAbsolutePath(p); checkPath(absolutePath); if (isRemoteFile(absolutePath)) { return absolutePath; } if (isDirectory(absolutePath)) { return absolutePath;...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public Path canonicalizePath(Path p) throws IOException { Path absolutePath = toAbsolutePath(p); checkPath(absolutePath); if (isRemoteFile(absolutePath)) { return absolutePath; } if (isDirectory(absolutePath)) { return absolutePath;...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public Path canonicalizePath(Path p) throws IOException { Path absolutePath = toAbsolutePath(p); checkPath(absolutePath); if (isRemoteFile(absolutePath)) { return absolutePath; } if (isDirectory(absolutePath)) { return absolutePath;...
@Test public void testCanonicalizeDirectoryFile() throws IOException { Path path = new Path("/foo/bar"); Path resolvedPath = fs.canonicalizePath(path); assertEquals(new Path("/foo/bar"), resolvedPath); }
@Override public Path canonicalizePath(Path p) throws IOException { Path absolutePath = toAbsolutePath(p); checkPath(absolutePath); if (isRemoteFile(absolutePath)) { return absolutePath; } if (isDirectory(absolutePath)) { return absolutePath; } if (localAccessAllowed) { return createRemotePath(localIdentity.getAddress(...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public Path canonicalizePath(Path p) throws IOException { Path absolutePath = toAbsolutePath(p); checkPath(absolutePath); if (isRemoteFile(absolutePath)) { return absolutePath; } if (isDirectory(absolutePath)) { return absolutePath;...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public Path canonicalizePath(Path p) throws IOException { Path absolutePath = toAbsolutePath(p); checkPath(absolutePath); if (isRemoteFile(absolutePath)) { return absolutePath; } if (isDirectory(absolutePath)) { return absolutePath;...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public Path canonicalizePath(Path p) throws IOException { Path absolutePath = toAbsolutePath(p); checkPath(absolutePath); if (isRemoteFile(absolutePath)) { return absolutePath; } if (isDirectory(absolutePath)) { return absolutePath;...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public Path canonicalizePath(Path p) throws IOException { Path absolutePath = toAbsolutePath(p); checkPath(absolutePath); if (isRemoteFile(absolutePath)) { return absolutePath; } if (isDirectory(absolutePath)) { return absolutePath;...
@Test public void testCanonicalizeLocalFile() throws IOException { Path path = new Path("/foo/bar/file"); Path resolvedPath = fs.canonicalizePath(path); assertEquals(new Path("/foo/bar/10.0.0.1@file"), resolvedPath); }
@Override public Path canonicalizePath(Path p) throws IOException { Path absolutePath = toAbsolutePath(p); checkPath(absolutePath); if (isRemoteFile(absolutePath)) { return absolutePath; } if (isDirectory(absolutePath)) { return absolutePath; } if (localAccessAllowed) { return createRemotePath(localIdentity.getAddress(...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public Path canonicalizePath(Path p) throws IOException { Path absolutePath = toAbsolutePath(p); checkPath(absolutePath); if (isRemoteFile(absolutePath)) { return absolutePath; } if (isDirectory(absolutePath)) { return absolutePath;...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public Path canonicalizePath(Path p) throws IOException { Path absolutePath = toAbsolutePath(p); checkPath(absolutePath); if (isRemoteFile(absolutePath)) { return absolutePath; } if (isDirectory(absolutePath)) { return absolutePath;...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public Path canonicalizePath(Path p) throws IOException { Path absolutePath = toAbsolutePath(p); checkPath(absolutePath); if (isRemoteFile(absolutePath)) { return absolutePath; } if (isDirectory(absolutePath)) { return absolutePath;...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public Path canonicalizePath(Path p) throws IOException { Path absolutePath = toAbsolutePath(p); checkPath(absolutePath); if (isRemoteFile(absolutePath)) { return absolutePath; } if (isDirectory(absolutePath)) { return absolutePath;...
@Test public void testCanonicalizeLocalFileIfNoLocalAccess() throws IOException { Provider<Iterable<NodeEndpoint>> endpointsProvider = DirectProvider.<Iterable<NodeEndpoint>>wrap((Arrays.asList(REMOTE_ENDPOINT_1, REMOTE_ENDPOINT_2))); PDFSConfig pdfsConfig = new PDFSConfig(MoreExecutors.newDirectExecutorService(), null...
@Override public Path canonicalizePath(Path p) throws IOException { Path absolutePath = toAbsolutePath(p); checkPath(absolutePath); if (isRemoteFile(absolutePath)) { return absolutePath; } if (isDirectory(absolutePath)) { return absolutePath; } if (localAccessAllowed) { return createRemotePath(localIdentity.getAddress(...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public Path canonicalizePath(Path p) throws IOException { Path absolutePath = toAbsolutePath(p); checkPath(absolutePath); if (isRemoteFile(absolutePath)) { return absolutePath; } if (isDirectory(absolutePath)) { return absolutePath;...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public Path canonicalizePath(Path p) throws IOException { Path absolutePath = toAbsolutePath(p); checkPath(absolutePath); if (isRemoteFile(absolutePath)) { return absolutePath; } if (isDirectory(absolutePath)) { return absolutePath;...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public Path canonicalizePath(Path p) throws IOException { Path absolutePath = toAbsolutePath(p); checkPath(absolutePath); if (isRemoteFile(absolutePath)) { return absolutePath; } if (isDirectory(absolutePath)) { return absolutePath;...
PseudoDistributedFileSystem extends FileSystem implements PathCanonicalizer { @Override public Path canonicalizePath(Path p) throws IOException { Path absolutePath = toAbsolutePath(p); checkPath(absolutePath); if (isRemoteFile(absolutePath)) { return absolutePath; } if (isDirectory(absolutePath)) { return absolutePath;...
@Test public void impersonationDisabledShouldReturnSystemUser() { final HiveConf hiveConf = new HiveConf(); hiveConf.setBoolVar(HIVE_SERVER2_ENABLE_DOAS, false); final SabotContext context = mock(SabotContext.class); final Hive3StoragePlugin plugin = createHiveStoragePlugin(hiveConf, context); final String userName = p...
public String getUsername(String name) { if (isStorageImpersonationEnabled()) { return name; } return SystemUser.SYSTEM_USERNAME; }
Hive3StoragePlugin extends BaseHiveStoragePlugin implements StoragePluginCreator.PF4JStoragePlugin, SupportsReadSignature, SupportsListingDatasets, SupportsAlteringDatasetMetadata, SupportsPF4JStoragePlugin { public String getUsername(String name) { if (isStorageImpersonationEnabled()) { return name; } return Syste...
Hive3StoragePlugin extends BaseHiveStoragePlugin implements StoragePluginCreator.PF4JStoragePlugin, SupportsReadSignature, SupportsListingDatasets, SupportsAlteringDatasetMetadata, SupportsPF4JStoragePlugin { public String getUsername(String name) { if (isStorageImpersonationEnabled()) { return name; } return Syste...
Hive3StoragePlugin extends BaseHiveStoragePlugin implements StoragePluginCreator.PF4JStoragePlugin, SupportsReadSignature, SupportsListingDatasets, SupportsAlteringDatasetMetadata, SupportsPF4JStoragePlugin { public String getUsername(String name) { if (isStorageImpersonationEnabled()) { return name; } return Syste...
Hive3StoragePlugin extends BaseHiveStoragePlugin implements StoragePluginCreator.PF4JStoragePlugin, SupportsReadSignature, SupportsListingDatasets, SupportsAlteringDatasetMetadata, SupportsPF4JStoragePlugin { public String getUsername(String name) { if (isStorageImpersonationEnabled()) { return name; } return Syste...
@Test public void impersonationEnabledShouldReturnUser() { final HiveConf hiveConf = new HiveConf(); hiveConf.setBoolVar(HIVE_SERVER2_ENABLE_DOAS, true); final SabotContext context = mock(SabotContext.class); final Hive3StoragePlugin plugin = new Hive3StoragePlugin(hiveConf, context, "foo"); final String userName = plu...
public String getUsername(String name) { if (isStorageImpersonationEnabled()) { return name; } return SystemUser.SYSTEM_USERNAME; }
Hive3StoragePlugin extends BaseHiveStoragePlugin implements StoragePluginCreator.PF4JStoragePlugin, SupportsReadSignature, SupportsListingDatasets, SupportsAlteringDatasetMetadata, SupportsPF4JStoragePlugin { public String getUsername(String name) { if (isStorageImpersonationEnabled()) { return name; } return Syste...
Hive3StoragePlugin extends BaseHiveStoragePlugin implements StoragePluginCreator.PF4JStoragePlugin, SupportsReadSignature, SupportsListingDatasets, SupportsAlteringDatasetMetadata, SupportsPF4JStoragePlugin { public String getUsername(String name) { if (isStorageImpersonationEnabled()) { return name; } return Syste...
Hive3StoragePlugin extends BaseHiveStoragePlugin implements StoragePluginCreator.PF4JStoragePlugin, SupportsReadSignature, SupportsListingDatasets, SupportsAlteringDatasetMetadata, SupportsPF4JStoragePlugin { public String getUsername(String name) { if (isStorageImpersonationEnabled()) { return name; } return Syste...
Hive3StoragePlugin extends BaseHiveStoragePlugin implements StoragePluginCreator.PF4JStoragePlugin, SupportsReadSignature, SupportsListingDatasets, SupportsAlteringDatasetMetadata, SupportsPF4JStoragePlugin { public String getUsername(String name) { if (isStorageImpersonationEnabled()) { return name; } return Syste...
@Test public void ensureStoragePluginIsUsedForUsername() throws Exception { final String originalName = "Test"; final String finalName = "Replaced"; final HiveScanBatchCreator creator = new HiveScanBatchCreator(); final Hive3StoragePlugin plugin = mock(Hive3StoragePlugin.class); when(plugin.getUsername(originalName)).t...
@VisibleForTesting public UserGroupInformation getUGI(Hive3StoragePlugin storagePlugin, HiveProxyingSubScan config) { final String userName = storagePlugin.getUsername(config.getProps().getUserName()); return HiveImpersonationUtil.createProxyUgi(userName); }
HiveScanBatchCreator implements HiveProxiedScanBatchCreator { @VisibleForTesting public UserGroupInformation getUGI(Hive3StoragePlugin storagePlugin, HiveProxyingSubScan config) { final String userName = storagePlugin.getUsername(config.getProps().getUserName()); return HiveImpersonationUtil.createProxyUgi(userName); }...
HiveScanBatchCreator implements HiveProxiedScanBatchCreator { @VisibleForTesting public UserGroupInformation getUGI(Hive3StoragePlugin storagePlugin, HiveProxyingSubScan config) { final String userName = storagePlugin.getUsername(config.getProps().getUserName()); return HiveImpersonationUtil.createProxyUgi(userName); }...
HiveScanBatchCreator implements HiveProxiedScanBatchCreator { @VisibleForTesting public UserGroupInformation getUGI(Hive3StoragePlugin storagePlugin, HiveProxyingSubScan config) { final String userName = storagePlugin.getUsername(config.getProps().getUserName()); return HiveImpersonationUtil.createProxyUgi(userName); }...
HiveScanBatchCreator implements HiveProxiedScanBatchCreator { @VisibleForTesting public UserGroupInformation getUGI(Hive3StoragePlugin storagePlugin, HiveProxyingSubScan config) { final String userName = storagePlugin.getUsername(config.getProps().getUserName()); return HiveImpersonationUtil.createProxyUgi(userName); }...
@Test public void testShouldReturnPluginRoot() { properties.set(DremioConfig.PLUGINS_ROOT_PATH_PROPERTY, "/tmp/plugins"); Path expectedPath = Paths.get("/tmp/plugins/connectors"); Path actualPath = nativeLibPluginManager.createPluginsRoot(); Assert.assertEquals(expectedPath, actualPath); }
@Override protected Path createPluginsRoot() { final Path pluginsPath = this.isDevelopment() ? Paths.get(PLUGINS_PATH_DEV_MODE) : DremioConfig.getPluginsRootPath().resolve("connectors"); return pluginsPath; }
NativeLibPluginManager extends DefaultPluginManager { @Override protected Path createPluginsRoot() { final Path pluginsPath = this.isDevelopment() ? Paths.get(PLUGINS_PATH_DEV_MODE) : DremioConfig.getPluginsRootPath().resolve("connectors"); return pluginsPath; } }
NativeLibPluginManager extends DefaultPluginManager { @Override protected Path createPluginsRoot() { final Path pluginsPath = this.isDevelopment() ? Paths.get(PLUGINS_PATH_DEV_MODE) : DremioConfig.getPluginsRootPath().resolve("connectors"); return pluginsPath; } }
NativeLibPluginManager extends DefaultPluginManager { @Override protected Path createPluginsRoot() { final Path pluginsPath = this.isDevelopment() ? Paths.get(PLUGINS_PATH_DEV_MODE) : DremioConfig.getPluginsRootPath().resolve("connectors"); return pluginsPath; } }
NativeLibPluginManager extends DefaultPluginManager { @Override protected Path createPluginsRoot() { final Path pluginsPath = this.isDevelopment() ? Paths.get(PLUGINS_PATH_DEV_MODE) : DremioConfig.getPluginsRootPath().resolve("connectors"); return pluginsPath; } }
@Test public void testProduceRanges() { List<Number> ranges = new ArrayList<>(); HistogramGenerator.produceRanges(ranges , new LocalDateTime(1970, 1, 1, 1, 0, 0), new LocalDateTime(1970, 1, 1, 11, 59, 0), TruncEvalEnum.HOUR); List<Number> expected = new ArrayList<>(); for (int i = 0; i < 13; i++) { expected.add((i + 1 ...
@VisibleForTesting static void produceRanges(List<Number> ranges, LocalDateTime min, LocalDateTime max, TruncEvalEnum truncateTo) { long timeValue = toMillis(roundTime(min, truncateTo, true)); long maxTimeValue = toMillis(roundTime(max, truncateTo, false)); ranges.add(timeValue); while ( timeValue <= maxTimeValue) { Lo...
HistogramGenerator { @VisibleForTesting static void produceRanges(List<Number> ranges, LocalDateTime min, LocalDateTime max, TruncEvalEnum truncateTo) { long timeValue = toMillis(roundTime(min, truncateTo, true)); long maxTimeValue = toMillis(roundTime(max, truncateTo, false)); ranges.add(timeValue); while ( timeValue ...
HistogramGenerator { @VisibleForTesting static void produceRanges(List<Number> ranges, LocalDateTime min, LocalDateTime max, TruncEvalEnum truncateTo) { long timeValue = toMillis(roundTime(min, truncateTo, true)); long maxTimeValue = toMillis(roundTime(max, truncateTo, false)); ranges.add(timeValue); while ( timeValue ...
HistogramGenerator { @VisibleForTesting static void produceRanges(List<Number> ranges, LocalDateTime min, LocalDateTime max, TruncEvalEnum truncateTo) { long timeValue = toMillis(roundTime(min, truncateTo, true)); long maxTimeValue = toMillis(roundTime(max, truncateTo, false)); ranges.add(timeValue); while ( timeValue ...
HistogramGenerator { @VisibleForTesting static void produceRanges(List<Number> ranges, LocalDateTime min, LocalDateTime max, TruncEvalEnum truncateTo) { long timeValue = toMillis(roundTime(min, truncateTo, true)); long maxTimeValue = toMillis(roundTime(max, truncateTo, false)); ranges.add(timeValue); while ( timeValue ...
@Test public void testLegalUpgrade() throws Exception { final ByteString prevEdition = ByteString.copyFrom("OSS".getBytes()); final ConfigurationEntry configurationEntry = new ConfigurationEntry(); configurationEntry.setValue(prevEdition); final LegacyKVStoreProvider kvStoreProvider = LegacyKVStoreProviderAdapter.inMem...
@VisibleForTesting public void validateUpgrade(final LegacyKVStoreProvider storeProvider, final String curEdition) throws Exception { if (!getDACConfig().isMigrationEnabled()) { final ConfigurationStore configurationStore = new ConfigurationStore(storeProvider); final ConfigurationEntry entry = configurationStore.get(S...
Upgrade { @VisibleForTesting public void validateUpgrade(final LegacyKVStoreProvider storeProvider, final String curEdition) throws Exception { if (!getDACConfig().isMigrationEnabled()) { final ConfigurationStore configurationStore = new ConfigurationStore(storeProvider); final ConfigurationEntry entry = configurationS...
Upgrade { @VisibleForTesting public void validateUpgrade(final LegacyKVStoreProvider storeProvider, final String curEdition) throws Exception { if (!getDACConfig().isMigrationEnabled()) { final ConfigurationStore configurationStore = new ConfigurationStore(storeProvider); final ConfigurationEntry entry = configurationS...
Upgrade { @VisibleForTesting public void validateUpgrade(final LegacyKVStoreProvider storeProvider, final String curEdition) throws Exception { if (!getDACConfig().isMigrationEnabled()) { final ConfigurationStore configurationStore = new ConfigurationStore(storeProvider); final ConfigurationEntry entry = configurationS...
Upgrade { @VisibleForTesting public void validateUpgrade(final LegacyKVStoreProvider storeProvider, final String curEdition) throws Exception { if (!getDACConfig().isMigrationEnabled()) { final ConfigurationStore configurationStore = new ConfigurationStore(storeProvider); final ConfigurationEntry entry = configurationS...
@Test public void validateZipDirectoryValidNatural() throws IOException { ZipEntry entry = new ZipEntry("somedir/somefile"); NativeLibPluginClassLoader.validateZipDirectory(mockTempDir, entry); NativeLibPluginClassLoader.validateZipDirectory(mockTempDirWithTrailingSlash, entry); NativeLibPluginClassLoader.validateZipDi...
@VisibleForTesting static void validateZipDirectory(Path tempDirectory, final ZipEntry entry) throws IOException { final Path destinationPath = tempDirectory.resolve(entry.getName()).normalize(); if (!destinationPath.startsWith(tempDirectory)) { throw new IOException(String.format("JAR entry %s is outside of the target...
NativeLibPluginClassLoader extends PluginClassLoader { @VisibleForTesting static void validateZipDirectory(Path tempDirectory, final ZipEntry entry) throws IOException { final Path destinationPath = tempDirectory.resolve(entry.getName()).normalize(); if (!destinationPath.startsWith(tempDirectory)) { throw new IOExcepti...
NativeLibPluginClassLoader extends PluginClassLoader { @VisibleForTesting static void validateZipDirectory(Path tempDirectory, final ZipEntry entry) throws IOException { final Path destinationPath = tempDirectory.resolve(entry.getName()).normalize(); if (!destinationPath.startsWith(tempDirectory)) { throw new IOExcepti...
NativeLibPluginClassLoader extends PluginClassLoader { @VisibleForTesting static void validateZipDirectory(Path tempDirectory, final ZipEntry entry) throws IOException { final Path destinationPath = tempDirectory.resolve(entry.getName()).normalize(); if (!destinationPath.startsWith(tempDirectory)) { throw new IOExcepti...
NativeLibPluginClassLoader extends PluginClassLoader { @VisibleForTesting static void validateZipDirectory(Path tempDirectory, final ZipEntry entry) throws IOException { final Path destinationPath = tempDirectory.resolve(entry.getName()).normalize(); if (!destinationPath.startsWith(tempDirectory)) { throw new IOExcepti...
@Test public void validateZipDirectoryValidSelfref() throws IOException { ZipEntry entry = new ZipEntry("./somedir/somefile"); NativeLibPluginClassLoader.validateZipDirectory(mockTempDir, entry); NativeLibPluginClassLoader.validateZipDirectory(mockTempDirWithTrailingSlash, entry); NativeLibPluginClassLoader.validateZip...
@VisibleForTesting static void validateZipDirectory(Path tempDirectory, final ZipEntry entry) throws IOException { final Path destinationPath = tempDirectory.resolve(entry.getName()).normalize(); if (!destinationPath.startsWith(tempDirectory)) { throw new IOException(String.format("JAR entry %s is outside of the target...
NativeLibPluginClassLoader extends PluginClassLoader { @VisibleForTesting static void validateZipDirectory(Path tempDirectory, final ZipEntry entry) throws IOException { final Path destinationPath = tempDirectory.resolve(entry.getName()).normalize(); if (!destinationPath.startsWith(tempDirectory)) { throw new IOExcepti...
NativeLibPluginClassLoader extends PluginClassLoader { @VisibleForTesting static void validateZipDirectory(Path tempDirectory, final ZipEntry entry) throws IOException { final Path destinationPath = tempDirectory.resolve(entry.getName()).normalize(); if (!destinationPath.startsWith(tempDirectory)) { throw new IOExcepti...
NativeLibPluginClassLoader extends PluginClassLoader { @VisibleForTesting static void validateZipDirectory(Path tempDirectory, final ZipEntry entry) throws IOException { final Path destinationPath = tempDirectory.resolve(entry.getName()).normalize(); if (!destinationPath.startsWith(tempDirectory)) { throw new IOExcepti...
NativeLibPluginClassLoader extends PluginClassLoader { @VisibleForTesting static void validateZipDirectory(Path tempDirectory, final ZipEntry entry) throws IOException { final Path destinationPath = tempDirectory.resolve(entry.getName()).normalize(); if (!destinationPath.startsWith(tempDirectory)) { throw new IOExcepti...
@Test public void validateZipDirectoryValidUpdirThenCorrectDir() throws IOException { ZipEntry entry = new ZipEntry("../tmpDir/somedir/somefile"); NativeLibPluginClassLoader.validateZipDirectory(mockTempDir, entry); NativeLibPluginClassLoader.validateZipDirectory(mockTempDirWithTrailingSlash, entry); }
@VisibleForTesting static void validateZipDirectory(Path tempDirectory, final ZipEntry entry) throws IOException { final Path destinationPath = tempDirectory.resolve(entry.getName()).normalize(); if (!destinationPath.startsWith(tempDirectory)) { throw new IOException(String.format("JAR entry %s is outside of the target...
NativeLibPluginClassLoader extends PluginClassLoader { @VisibleForTesting static void validateZipDirectory(Path tempDirectory, final ZipEntry entry) throws IOException { final Path destinationPath = tempDirectory.resolve(entry.getName()).normalize(); if (!destinationPath.startsWith(tempDirectory)) { throw new IOExcepti...
NativeLibPluginClassLoader extends PluginClassLoader { @VisibleForTesting static void validateZipDirectory(Path tempDirectory, final ZipEntry entry) throws IOException { final Path destinationPath = tempDirectory.resolve(entry.getName()).normalize(); if (!destinationPath.startsWith(tempDirectory)) { throw new IOExcepti...
NativeLibPluginClassLoader extends PluginClassLoader { @VisibleForTesting static void validateZipDirectory(Path tempDirectory, final ZipEntry entry) throws IOException { final Path destinationPath = tempDirectory.resolve(entry.getName()).normalize(); if (!destinationPath.startsWith(tempDirectory)) { throw new IOExcepti...
NativeLibPluginClassLoader extends PluginClassLoader { @VisibleForTesting static void validateZipDirectory(Path tempDirectory, final ZipEntry entry) throws IOException { final Path destinationPath = tempDirectory.resolve(entry.getName()).normalize(); if (!destinationPath.startsWith(tempDirectory)) { throw new IOExcepti...
@Test public void validateZipDirectoryValidUpdirMoreTheCorrectDir() throws IOException { ZipEntry entry = new ZipEntry("../../../../../tmpDir/somedir/somefile"); NativeLibPluginClassLoader.validateZipDirectory(mockTempDir, entry); NativeLibPluginClassLoader.validateZipDirectory(mockTempDirWithTrailingSlash, entry); }
@VisibleForTesting static void validateZipDirectory(Path tempDirectory, final ZipEntry entry) throws IOException { final Path destinationPath = tempDirectory.resolve(entry.getName()).normalize(); if (!destinationPath.startsWith(tempDirectory)) { throw new IOException(String.format("JAR entry %s is outside of the target...
NativeLibPluginClassLoader extends PluginClassLoader { @VisibleForTesting static void validateZipDirectory(Path tempDirectory, final ZipEntry entry) throws IOException { final Path destinationPath = tempDirectory.resolve(entry.getName()).normalize(); if (!destinationPath.startsWith(tempDirectory)) { throw new IOExcepti...
NativeLibPluginClassLoader extends PluginClassLoader { @VisibleForTesting static void validateZipDirectory(Path tempDirectory, final ZipEntry entry) throws IOException { final Path destinationPath = tempDirectory.resolve(entry.getName()).normalize(); if (!destinationPath.startsWith(tempDirectory)) { throw new IOExcepti...
NativeLibPluginClassLoader extends PluginClassLoader { @VisibleForTesting static void validateZipDirectory(Path tempDirectory, final ZipEntry entry) throws IOException { final Path destinationPath = tempDirectory.resolve(entry.getName()).normalize(); if (!destinationPath.startsWith(tempDirectory)) { throw new IOExcepti...
NativeLibPluginClassLoader extends PluginClassLoader { @VisibleForTesting static void validateZipDirectory(Path tempDirectory, final ZipEntry entry) throws IOException { final Path destinationPath = tempDirectory.resolve(entry.getName()).normalize(); if (!destinationPath.startsWith(tempDirectory)) { throw new IOExcepti...
@Test public void validateZipDirectoryValidNestedUpdirThenCorrectDir() throws IOException { ZipEntry entry = new ZipEntry("../nestedTmpDir/somedir/somefile"); NativeLibPluginClassLoader.validateZipDirectory(mockNestedTempDir, entry); }
@VisibleForTesting static void validateZipDirectory(Path tempDirectory, final ZipEntry entry) throws IOException { final Path destinationPath = tempDirectory.resolve(entry.getName()).normalize(); if (!destinationPath.startsWith(tempDirectory)) { throw new IOException(String.format("JAR entry %s is outside of the target...
NativeLibPluginClassLoader extends PluginClassLoader { @VisibleForTesting static void validateZipDirectory(Path tempDirectory, final ZipEntry entry) throws IOException { final Path destinationPath = tempDirectory.resolve(entry.getName()).normalize(); if (!destinationPath.startsWith(tempDirectory)) { throw new IOExcepti...
NativeLibPluginClassLoader extends PluginClassLoader { @VisibleForTesting static void validateZipDirectory(Path tempDirectory, final ZipEntry entry) throws IOException { final Path destinationPath = tempDirectory.resolve(entry.getName()).normalize(); if (!destinationPath.startsWith(tempDirectory)) { throw new IOExcepti...
NativeLibPluginClassLoader extends PluginClassLoader { @VisibleForTesting static void validateZipDirectory(Path tempDirectory, final ZipEntry entry) throws IOException { final Path destinationPath = tempDirectory.resolve(entry.getName()).normalize(); if (!destinationPath.startsWith(tempDirectory)) { throw new IOExcepti...
NativeLibPluginClassLoader extends PluginClassLoader { @VisibleForTesting static void validateZipDirectory(Path tempDirectory, final ZipEntry entry) throws IOException { final Path destinationPath = tempDirectory.resolve(entry.getName()).normalize(); if (!destinationPath.startsWith(tempDirectory)) { throw new IOExcepti...
@Test public void validateZipDirectoryValidUpdirMoreThanNestedCorrectDir() throws IOException { ZipEntry entry = new ZipEntry("../../../../baseTmpDir/nestedTmpDir/somedir/somefile"); NativeLibPluginClassLoader.validateZipDirectory(mockNestedTempDir, entry); }
@VisibleForTesting static void validateZipDirectory(Path tempDirectory, final ZipEntry entry) throws IOException { final Path destinationPath = tempDirectory.resolve(entry.getName()).normalize(); if (!destinationPath.startsWith(tempDirectory)) { throw new IOException(String.format("JAR entry %s is outside of the target...
NativeLibPluginClassLoader extends PluginClassLoader { @VisibleForTesting static void validateZipDirectory(Path tempDirectory, final ZipEntry entry) throws IOException { final Path destinationPath = tempDirectory.resolve(entry.getName()).normalize(); if (!destinationPath.startsWith(tempDirectory)) { throw new IOExcepti...
NativeLibPluginClassLoader extends PluginClassLoader { @VisibleForTesting static void validateZipDirectory(Path tempDirectory, final ZipEntry entry) throws IOException { final Path destinationPath = tempDirectory.resolve(entry.getName()).normalize(); if (!destinationPath.startsWith(tempDirectory)) { throw new IOExcepti...
NativeLibPluginClassLoader extends PluginClassLoader { @VisibleForTesting static void validateZipDirectory(Path tempDirectory, final ZipEntry entry) throws IOException { final Path destinationPath = tempDirectory.resolve(entry.getName()).normalize(); if (!destinationPath.startsWith(tempDirectory)) { throw new IOExcepti...
NativeLibPluginClassLoader extends PluginClassLoader { @VisibleForTesting static void validateZipDirectory(Path tempDirectory, final ZipEntry entry) throws IOException { final Path destinationPath = tempDirectory.resolve(entry.getName()).normalize(); if (!destinationPath.startsWith(tempDirectory)) { throw new IOExcepti...
@Test public void validateZipDirectoryZipSlipTestUpdirMoreThanNestedCorrectDir() throws IOException { ZipEntry entry = new ZipEntry("../../../../../baseTmpDir/nestedTmpDir/somedir/somefile"); NativeLibPluginClassLoader.validateZipDirectory(mockNestedTempDir, entry); }
@VisibleForTesting static void validateZipDirectory(Path tempDirectory, final ZipEntry entry) throws IOException { final Path destinationPath = tempDirectory.resolve(entry.getName()).normalize(); if (!destinationPath.startsWith(tempDirectory)) { throw new IOException(String.format("JAR entry %s is outside of the target...
NativeLibPluginClassLoader extends PluginClassLoader { @VisibleForTesting static void validateZipDirectory(Path tempDirectory, final ZipEntry entry) throws IOException { final Path destinationPath = tempDirectory.resolve(entry.getName()).normalize(); if (!destinationPath.startsWith(tempDirectory)) { throw new IOExcepti...
NativeLibPluginClassLoader extends PluginClassLoader { @VisibleForTesting static void validateZipDirectory(Path tempDirectory, final ZipEntry entry) throws IOException { final Path destinationPath = tempDirectory.resolve(entry.getName()).normalize(); if (!destinationPath.startsWith(tempDirectory)) { throw new IOExcepti...
NativeLibPluginClassLoader extends PluginClassLoader { @VisibleForTesting static void validateZipDirectory(Path tempDirectory, final ZipEntry entry) throws IOException { final Path destinationPath = tempDirectory.resolve(entry.getName()).normalize(); if (!destinationPath.startsWith(tempDirectory)) { throw new IOExcepti...
NativeLibPluginClassLoader extends PluginClassLoader { @VisibleForTesting static void validateZipDirectory(Path tempDirectory, final ZipEntry entry) throws IOException { final Path destinationPath = tempDirectory.resolve(entry.getName()).normalize(); if (!destinationPath.startsWith(tempDirectory)) { throw new IOExcepti...
@Test public void validateZipDirectoryZipSlipTestUpdirMoreThanNestedCorrectDir2() throws IOException { ZipEntry entry = new ZipEntry("../../../../../../../../../../../baseTmpDir/nestedTmpDir/somedir/somefile"); NativeLibPluginClassLoader.validateZipDirectory(mockNestedTempDir, entry); }
@VisibleForTesting static void validateZipDirectory(Path tempDirectory, final ZipEntry entry) throws IOException { final Path destinationPath = tempDirectory.resolve(entry.getName()).normalize(); if (!destinationPath.startsWith(tempDirectory)) { throw new IOException(String.format("JAR entry %s is outside of the target...
NativeLibPluginClassLoader extends PluginClassLoader { @VisibleForTesting static void validateZipDirectory(Path tempDirectory, final ZipEntry entry) throws IOException { final Path destinationPath = tempDirectory.resolve(entry.getName()).normalize(); if (!destinationPath.startsWith(tempDirectory)) { throw new IOExcepti...
NativeLibPluginClassLoader extends PluginClassLoader { @VisibleForTesting static void validateZipDirectory(Path tempDirectory, final ZipEntry entry) throws IOException { final Path destinationPath = tempDirectory.resolve(entry.getName()).normalize(); if (!destinationPath.startsWith(tempDirectory)) { throw new IOExcepti...
NativeLibPluginClassLoader extends PluginClassLoader { @VisibleForTesting static void validateZipDirectory(Path tempDirectory, final ZipEntry entry) throws IOException { final Path destinationPath = tempDirectory.resolve(entry.getName()).normalize(); if (!destinationPath.startsWith(tempDirectory)) { throw new IOExcepti...
NativeLibPluginClassLoader extends PluginClassLoader { @VisibleForTesting static void validateZipDirectory(Path tempDirectory, final ZipEntry entry) throws IOException { final Path destinationPath = tempDirectory.resolve(entry.getName()).normalize(); if (!destinationPath.startsWith(tempDirectory)) { throw new IOExcepti...
@Test(expected = IOException.class) public void validateZipDirectoryZipSlipTestUpdirMoreThanNestedCorrectDirFinalDirDifferent() throws IOException { ZipEntry entry = new ZipEntry("../../../../../baseTmpDir/nestedTmpDir2/somedir/somefile"); NativeLibPluginClassLoader.validateZipDirectory(mockNestedTempDir, entry); }
@VisibleForTesting static void validateZipDirectory(Path tempDirectory, final ZipEntry entry) throws IOException { final Path destinationPath = tempDirectory.resolve(entry.getName()).normalize(); if (!destinationPath.startsWith(tempDirectory)) { throw new IOException(String.format("JAR entry %s is outside of the target...
NativeLibPluginClassLoader extends PluginClassLoader { @VisibleForTesting static void validateZipDirectory(Path tempDirectory, final ZipEntry entry) throws IOException { final Path destinationPath = tempDirectory.resolve(entry.getName()).normalize(); if (!destinationPath.startsWith(tempDirectory)) { throw new IOExcepti...
NativeLibPluginClassLoader extends PluginClassLoader { @VisibleForTesting static void validateZipDirectory(Path tempDirectory, final ZipEntry entry) throws IOException { final Path destinationPath = tempDirectory.resolve(entry.getName()).normalize(); if (!destinationPath.startsWith(tempDirectory)) { throw new IOExcepti...
NativeLibPluginClassLoader extends PluginClassLoader { @VisibleForTesting static void validateZipDirectory(Path tempDirectory, final ZipEntry entry) throws IOException { final Path destinationPath = tempDirectory.resolve(entry.getName()).normalize(); if (!destinationPath.startsWith(tempDirectory)) { throw new IOExcepti...
NativeLibPluginClassLoader extends PluginClassLoader { @VisibleForTesting static void validateZipDirectory(Path tempDirectory, final ZipEntry entry) throws IOException { final Path destinationPath = tempDirectory.resolve(entry.getName()).normalize(); if (!destinationPath.startsWith(tempDirectory)) { throw new IOExcepti...
@Test(expected = IOException.class) public void validateZipDirectoryZipSlipTestNested() throws IOException { ZipEntry entry = new ZipEntry("../tmpDir/somedir/somefile"); NativeLibPluginClassLoader.validateZipDirectory(mockNestedTempDir, entry); }
@VisibleForTesting static void validateZipDirectory(Path tempDirectory, final ZipEntry entry) throws IOException { final Path destinationPath = tempDirectory.resolve(entry.getName()).normalize(); if (!destinationPath.startsWith(tempDirectory)) { throw new IOException(String.format("JAR entry %s is outside of the target...
NativeLibPluginClassLoader extends PluginClassLoader { @VisibleForTesting static void validateZipDirectory(Path tempDirectory, final ZipEntry entry) throws IOException { final Path destinationPath = tempDirectory.resolve(entry.getName()).normalize(); if (!destinationPath.startsWith(tempDirectory)) { throw new IOExcepti...
NativeLibPluginClassLoader extends PluginClassLoader { @VisibleForTesting static void validateZipDirectory(Path tempDirectory, final ZipEntry entry) throws IOException { final Path destinationPath = tempDirectory.resolve(entry.getName()).normalize(); if (!destinationPath.startsWith(tempDirectory)) { throw new IOExcepti...
NativeLibPluginClassLoader extends PluginClassLoader { @VisibleForTesting static void validateZipDirectory(Path tempDirectory, final ZipEntry entry) throws IOException { final Path destinationPath = tempDirectory.resolve(entry.getName()).normalize(); if (!destinationPath.startsWith(tempDirectory)) { throw new IOExcepti...
NativeLibPluginClassLoader extends PluginClassLoader { @VisibleForTesting static void validateZipDirectory(Path tempDirectory, final ZipEntry entry) throws IOException { final Path destinationPath = tempDirectory.resolve(entry.getName()).normalize(); if (!destinationPath.startsWith(tempDirectory)) { throw new IOExcepti...
@Test public void testExtractMapRules() throws Exception { List<ExtractMapRule> rules = recommender.getRules(new MapSelection("foo", ImmutableList.of("a")), DataType.MAP); assertEquals(1, rules.size()); assertEquals("a", rules.get(0).getPath()); }
@Override public List<ExtractMapRule> getRules(MapSelection selection, DataType selColType) { checkArgument(selColType == DataType.MAP, "Extract map entries is supported only on MAP type columns"); return Collections.singletonList(new ExtractMapRule(Joiner.on(".").join(selection.getMapPathList()))); }
ExtractMapRecommender extends Recommender<ExtractMapRule, MapSelection> { @Override public List<ExtractMapRule> getRules(MapSelection selection, DataType selColType) { checkArgument(selColType == DataType.MAP, "Extract map entries is supported only on MAP type columns"); return Collections.singletonList(new ExtractMapR...
ExtractMapRecommender extends Recommender<ExtractMapRule, MapSelection> { @Override public List<ExtractMapRule> getRules(MapSelection selection, DataType selColType) { checkArgument(selColType == DataType.MAP, "Extract map entries is supported only on MAP type columns"); return Collections.singletonList(new ExtractMapR...
ExtractMapRecommender extends Recommender<ExtractMapRule, MapSelection> { @Override public List<ExtractMapRule> getRules(MapSelection selection, DataType selColType) { checkArgument(selColType == DataType.MAP, "Extract map entries is supported only on MAP type columns"); return Collections.singletonList(new ExtractMapR...
ExtractMapRecommender extends Recommender<ExtractMapRule, MapSelection> { @Override public List<ExtractMapRule> getRules(MapSelection selection, DataType selColType) { checkArgument(selColType == DataType.MAP, "Extract map entries is supported only on MAP type columns"); return Collections.singletonList(new ExtractMapR...
@Test(expected = IOException.class) public void validateZipDirectoryZipSlipTestNestedUpdirMore() throws IOException { ZipEntry entry = new ZipEntry("../../../../../tmpDir/somedir/somefile"); NativeLibPluginClassLoader.validateZipDirectory(mockNestedTempDir, entry); }
@VisibleForTesting static void validateZipDirectory(Path tempDirectory, final ZipEntry entry) throws IOException { final Path destinationPath = tempDirectory.resolve(entry.getName()).normalize(); if (!destinationPath.startsWith(tempDirectory)) { throw new IOException(String.format("JAR entry %s is outside of the target...
NativeLibPluginClassLoader extends PluginClassLoader { @VisibleForTesting static void validateZipDirectory(Path tempDirectory, final ZipEntry entry) throws IOException { final Path destinationPath = tempDirectory.resolve(entry.getName()).normalize(); if (!destinationPath.startsWith(tempDirectory)) { throw new IOExcepti...
NativeLibPluginClassLoader extends PluginClassLoader { @VisibleForTesting static void validateZipDirectory(Path tempDirectory, final ZipEntry entry) throws IOException { final Path destinationPath = tempDirectory.resolve(entry.getName()).normalize(); if (!destinationPath.startsWith(tempDirectory)) { throw new IOExcepti...
NativeLibPluginClassLoader extends PluginClassLoader { @VisibleForTesting static void validateZipDirectory(Path tempDirectory, final ZipEntry entry) throws IOException { final Path destinationPath = tempDirectory.resolve(entry.getName()).normalize(); if (!destinationPath.startsWith(tempDirectory)) { throw new IOExcepti...
NativeLibPluginClassLoader extends PluginClassLoader { @VisibleForTesting static void validateZipDirectory(Path tempDirectory, final ZipEntry entry) throws IOException { final Path destinationPath = tempDirectory.resolve(entry.getName()).normalize(); if (!destinationPath.startsWith(tempDirectory)) { throw new IOExcepti...
@Test(expected = IOException.class) public void validateZipDirectoryZipSlipTest() throws IOException { ZipEntry entry = new ZipEntry("../somefile"); NativeLibPluginClassLoader.validateZipDirectory(mockTempDir, entry); }
@VisibleForTesting static void validateZipDirectory(Path tempDirectory, final ZipEntry entry) throws IOException { final Path destinationPath = tempDirectory.resolve(entry.getName()).normalize(); if (!destinationPath.startsWith(tempDirectory)) { throw new IOException(String.format("JAR entry %s is outside of the target...
NativeLibPluginClassLoader extends PluginClassLoader { @VisibleForTesting static void validateZipDirectory(Path tempDirectory, final ZipEntry entry) throws IOException { final Path destinationPath = tempDirectory.resolve(entry.getName()).normalize(); if (!destinationPath.startsWith(tempDirectory)) { throw new IOExcepti...
NativeLibPluginClassLoader extends PluginClassLoader { @VisibleForTesting static void validateZipDirectory(Path tempDirectory, final ZipEntry entry) throws IOException { final Path destinationPath = tempDirectory.resolve(entry.getName()).normalize(); if (!destinationPath.startsWith(tempDirectory)) { throw new IOExcepti...
NativeLibPluginClassLoader extends PluginClassLoader { @VisibleForTesting static void validateZipDirectory(Path tempDirectory, final ZipEntry entry) throws IOException { final Path destinationPath = tempDirectory.resolve(entry.getName()).normalize(); if (!destinationPath.startsWith(tempDirectory)) { throw new IOExcepti...
NativeLibPluginClassLoader extends PluginClassLoader { @VisibleForTesting static void validateZipDirectory(Path tempDirectory, final ZipEntry entry) throws IOException { final Path destinationPath = tempDirectory.resolve(entry.getName()).normalize(); if (!destinationPath.startsWith(tempDirectory)) { throw new IOExcepti...
@Test(expected = IOException.class) public void validateZipDirectoryZipSlipTestUpMoreDirs() throws IOException { ZipEntry entry = new ZipEntry("../../../../../somefile"); NativeLibPluginClassLoader.validateZipDirectory(mockTempDir, entry); }
@VisibleForTesting static void validateZipDirectory(Path tempDirectory, final ZipEntry entry) throws IOException { final Path destinationPath = tempDirectory.resolve(entry.getName()).normalize(); if (!destinationPath.startsWith(tempDirectory)) { throw new IOException(String.format("JAR entry %s is outside of the target...
NativeLibPluginClassLoader extends PluginClassLoader { @VisibleForTesting static void validateZipDirectory(Path tempDirectory, final ZipEntry entry) throws IOException { final Path destinationPath = tempDirectory.resolve(entry.getName()).normalize(); if (!destinationPath.startsWith(tempDirectory)) { throw new IOExcepti...
NativeLibPluginClassLoader extends PluginClassLoader { @VisibleForTesting static void validateZipDirectory(Path tempDirectory, final ZipEntry entry) throws IOException { final Path destinationPath = tempDirectory.resolve(entry.getName()).normalize(); if (!destinationPath.startsWith(tempDirectory)) { throw new IOExcepti...
NativeLibPluginClassLoader extends PluginClassLoader { @VisibleForTesting static void validateZipDirectory(Path tempDirectory, final ZipEntry entry) throws IOException { final Path destinationPath = tempDirectory.resolve(entry.getName()).normalize(); if (!destinationPath.startsWith(tempDirectory)) { throw new IOExcepti...
NativeLibPluginClassLoader extends PluginClassLoader { @VisibleForTesting static void validateZipDirectory(Path tempDirectory, final ZipEntry entry) throws IOException { final Path destinationPath = tempDirectory.resolve(entry.getName()).normalize(); if (!destinationPath.startsWith(tempDirectory)) { throw new IOExcepti...
@Test public void validateZipDirectoryZipSlipTestUpDirsMispelledCorrectDir() throws IOException { ZipEntry entry = new ZipEntry("../../../.. NativeLibPluginClassLoader.validateZipDirectory(mockTempDir, entry); }
@VisibleForTesting static void validateZipDirectory(Path tempDirectory, final ZipEntry entry) throws IOException { final Path destinationPath = tempDirectory.resolve(entry.getName()).normalize(); if (!destinationPath.startsWith(tempDirectory)) { throw new IOException(String.format("JAR entry %s is outside of the target...
NativeLibPluginClassLoader extends PluginClassLoader { @VisibleForTesting static void validateZipDirectory(Path tempDirectory, final ZipEntry entry) throws IOException { final Path destinationPath = tempDirectory.resolve(entry.getName()).normalize(); if (!destinationPath.startsWith(tempDirectory)) { throw new IOExcepti...
NativeLibPluginClassLoader extends PluginClassLoader { @VisibleForTesting static void validateZipDirectory(Path tempDirectory, final ZipEntry entry) throws IOException { final Path destinationPath = tempDirectory.resolve(entry.getName()).normalize(); if (!destinationPath.startsWith(tempDirectory)) { throw new IOExcepti...
NativeLibPluginClassLoader extends PluginClassLoader { @VisibleForTesting static void validateZipDirectory(Path tempDirectory, final ZipEntry entry) throws IOException { final Path destinationPath = tempDirectory.resolve(entry.getName()).normalize(); if (!destinationPath.startsWith(tempDirectory)) { throw new IOExcepti...
NativeLibPluginClassLoader extends PluginClassLoader { @VisibleForTesting static void validateZipDirectory(Path tempDirectory, final ZipEntry entry) throws IOException { final Path destinationPath = tempDirectory.resolve(entry.getName()).normalize(); if (!destinationPath.startsWith(tempDirectory)) { throw new IOExcepti...
@Test public void testYarnController() throws Exception { assumeNonMaprProfile(); YarnController yarnController = new YarnController(); YarnConfiguration yarnConfiguration = createYarnConfig("resource-manager", "hdfs: String jvmOptions = yarnController.prepareCommandOptions(yarnConfiguration, getProperties()); logger.i...
public YarnController() { this(DremioConfig.create()); }
YarnController { public YarnController() { this(DremioConfig.create()); } }
YarnController { public YarnController() { this(DremioConfig.create()); } YarnController(); YarnController(DremioConfig config); }
YarnController { public YarnController() { this(DremioConfig.create()); } YarnController(); YarnController(DremioConfig config); TwillRunnerService getTwillService(ClusterId key); void invalidateTwillService(final ClusterId key); TwillRunnerService startTwillRunner(YarnConfiguration yarnConfiguration); TwillController...
YarnController { public YarnController() { this(DremioConfig.create()); } YarnController(); YarnController(DremioConfig config); TwillRunnerService getTwillService(ClusterId key); void invalidateTwillService(final ClusterId key); TwillRunnerService startTwillRunner(YarnConfiguration yarnConfiguration); TwillController...
@Test public void testStartCluster() throws Exception { assumeNonMaprProfile(); YarnController controller = Mockito.mock(YarnController.class); YarnService yarnService = new YarnService(new TestListener(), controller, Mockito.mock(NodeProvider.class)); Cluster cluster = new Cluster(); cluster.setState(ClusterState.CREA...
@Override public ClusterEnriched startCluster(Cluster cluster) throws YarnProvisioningHandlingException { Preconditions.checkArgument(cluster.getState() != ClusterState.RUNNING); return startClusterAsync(cluster); }
YarnService implements ProvisioningServiceDelegate { @Override public ClusterEnriched startCluster(Cluster cluster) throws YarnProvisioningHandlingException { Preconditions.checkArgument(cluster.getState() != ClusterState.RUNNING); return startClusterAsync(cluster); } }
YarnService implements ProvisioningServiceDelegate { @Override public ClusterEnriched startCluster(Cluster cluster) throws YarnProvisioningHandlingException { Preconditions.checkArgument(cluster.getState() != ClusterState.RUNNING); return startClusterAsync(cluster); } YarnService(DremioConfig config, ProvisioningStateL...
YarnService implements ProvisioningServiceDelegate { @Override public ClusterEnriched startCluster(Cluster cluster) throws YarnProvisioningHandlingException { Preconditions.checkArgument(cluster.getState() != ClusterState.RUNNING); return startClusterAsync(cluster); } YarnService(DremioConfig config, ProvisioningStateL...
YarnService implements ProvisioningServiceDelegate { @Override public ClusterEnriched startCluster(Cluster cluster) throws YarnProvisioningHandlingException { Preconditions.checkArgument(cluster.getState() != ClusterState.RUNNING); return startClusterAsync(cluster); } YarnService(DremioConfig config, ProvisioningStateL...
@Test public void testDistroDefaults() throws Exception { assumeNonMaprProfile(); YarnController controller = Mockito.mock(YarnController.class); YarnService yarnService = new YarnService(new TestListener(), controller, Mockito.mock(NodeProvider.class)); Cluster cluster = new Cluster(); cluster.setState(ClusterState.CR...
@VisibleForTesting protected String updateYarnConfiguration(Cluster cluster, YarnConfiguration yarnConfiguration) { String rmAddress = null; setYarnDefaults(cluster, yarnConfiguration); List<Property> keyValues = cluster.getClusterConfig().getSubPropertyList(); if ( keyValues != null && !keyValues.isEmpty()) { for (Pro...
YarnService implements ProvisioningServiceDelegate { @VisibleForTesting protected String updateYarnConfiguration(Cluster cluster, YarnConfiguration yarnConfiguration) { String rmAddress = null; setYarnDefaults(cluster, yarnConfiguration); List<Property> keyValues = cluster.getClusterConfig().getSubPropertyList(); if ( ...
YarnService implements ProvisioningServiceDelegate { @VisibleForTesting protected String updateYarnConfiguration(Cluster cluster, YarnConfiguration yarnConfiguration) { String rmAddress = null; setYarnDefaults(cluster, yarnConfiguration); List<Property> keyValues = cluster.getClusterConfig().getSubPropertyList(); if ( ...
YarnService implements ProvisioningServiceDelegate { @VisibleForTesting protected String updateYarnConfiguration(Cluster cluster, YarnConfiguration yarnConfiguration) { String rmAddress = null; setYarnDefaults(cluster, yarnConfiguration); List<Property> keyValues = cluster.getClusterConfig().getSubPropertyList(); if ( ...
YarnService implements ProvisioningServiceDelegate { @VisibleForTesting protected String updateYarnConfiguration(Cluster cluster, YarnConfiguration yarnConfiguration) { String rmAddress = null; setYarnDefaults(cluster, yarnConfiguration); List<Property> keyValues = cluster.getClusterConfig().getSubPropertyList(); if ( ...
@Test public void testDistroMapRDefaults() throws Exception { assumeNonMaprProfile(); YarnController controller = Mockito.mock(YarnController.class); YarnService yarnService = new YarnService(new TestListener(), controller, Mockito.mock(NodeProvider.class)); properties.clear(MAPR_IMPALA_RA_THROTTLE); properties.clear(M...
@VisibleForTesting protected String updateYarnConfiguration(Cluster cluster, YarnConfiguration yarnConfiguration) { String rmAddress = null; setYarnDefaults(cluster, yarnConfiguration); List<Property> keyValues = cluster.getClusterConfig().getSubPropertyList(); if ( keyValues != null && !keyValues.isEmpty()) { for (Pro...
YarnService implements ProvisioningServiceDelegate { @VisibleForTesting protected String updateYarnConfiguration(Cluster cluster, YarnConfiguration yarnConfiguration) { String rmAddress = null; setYarnDefaults(cluster, yarnConfiguration); List<Property> keyValues = cluster.getClusterConfig().getSubPropertyList(); if ( ...
YarnService implements ProvisioningServiceDelegate { @VisibleForTesting protected String updateYarnConfiguration(Cluster cluster, YarnConfiguration yarnConfiguration) { String rmAddress = null; setYarnDefaults(cluster, yarnConfiguration); List<Property> keyValues = cluster.getClusterConfig().getSubPropertyList(); if ( ...
YarnService implements ProvisioningServiceDelegate { @VisibleForTesting protected String updateYarnConfiguration(Cluster cluster, YarnConfiguration yarnConfiguration) { String rmAddress = null; setYarnDefaults(cluster, yarnConfiguration); List<Property> keyValues = cluster.getClusterConfig().getSubPropertyList(); if ( ...
YarnService implements ProvisioningServiceDelegate { @VisibleForTesting protected String updateYarnConfiguration(Cluster cluster, YarnConfiguration yarnConfiguration) { String rmAddress = null; setYarnDefaults(cluster, yarnConfiguration); List<Property> keyValues = cluster.getClusterConfig().getSubPropertyList(); if ( ...
@Test public void testDistroMapRDefaultsWithMaprRAStreams() throws Exception { assumeNonMaprProfile(); YarnController controller = Mockito.mock(YarnController.class); YarnService yarnService = new YarnService(new TestListener(), controller, Mockito.mock(NodeProvider.class)); properties.set("MAPR_IMPALA_RA_THROTTLE", ""...
@VisibleForTesting protected String updateYarnConfiguration(Cluster cluster, YarnConfiguration yarnConfiguration) { String rmAddress = null; setYarnDefaults(cluster, yarnConfiguration); List<Property> keyValues = cluster.getClusterConfig().getSubPropertyList(); if ( keyValues != null && !keyValues.isEmpty()) { for (Pro...
YarnService implements ProvisioningServiceDelegate { @VisibleForTesting protected String updateYarnConfiguration(Cluster cluster, YarnConfiguration yarnConfiguration) { String rmAddress = null; setYarnDefaults(cluster, yarnConfiguration); List<Property> keyValues = cluster.getClusterConfig().getSubPropertyList(); if ( ...
YarnService implements ProvisioningServiceDelegate { @VisibleForTesting protected String updateYarnConfiguration(Cluster cluster, YarnConfiguration yarnConfiguration) { String rmAddress = null; setYarnDefaults(cluster, yarnConfiguration); List<Property> keyValues = cluster.getClusterConfig().getSubPropertyList(); if ( ...
YarnService implements ProvisioningServiceDelegate { @VisibleForTesting protected String updateYarnConfiguration(Cluster cluster, YarnConfiguration yarnConfiguration) { String rmAddress = null; setYarnDefaults(cluster, yarnConfiguration); List<Property> keyValues = cluster.getClusterConfig().getSubPropertyList(); if ( ...
YarnService implements ProvisioningServiceDelegate { @VisibleForTesting protected String updateYarnConfiguration(Cluster cluster, YarnConfiguration yarnConfiguration) { String rmAddress = null; setYarnDefaults(cluster, yarnConfiguration); List<Property> keyValues = cluster.getClusterConfig().getSubPropertyList(); if ( ...
@Test public void testDistroHDPDefaults() throws Exception { assumeNonMaprProfile(); YarnController controller = Mockito.mock(YarnController.class); YarnService yarnService = new YarnService(new TestListener(), controller, Mockito.mock(NodeProvider.class)); Cluster myCluster = createCluster(); myCluster.getClusterConfi...
@VisibleForTesting protected String updateYarnConfiguration(Cluster cluster, YarnConfiguration yarnConfiguration) { String rmAddress = null; setYarnDefaults(cluster, yarnConfiguration); List<Property> keyValues = cluster.getClusterConfig().getSubPropertyList(); if ( keyValues != null && !keyValues.isEmpty()) { for (Pro...
YarnService implements ProvisioningServiceDelegate { @VisibleForTesting protected String updateYarnConfiguration(Cluster cluster, YarnConfiguration yarnConfiguration) { String rmAddress = null; setYarnDefaults(cluster, yarnConfiguration); List<Property> keyValues = cluster.getClusterConfig().getSubPropertyList(); if ( ...
YarnService implements ProvisioningServiceDelegate { @VisibleForTesting protected String updateYarnConfiguration(Cluster cluster, YarnConfiguration yarnConfiguration) { String rmAddress = null; setYarnDefaults(cluster, yarnConfiguration); List<Property> keyValues = cluster.getClusterConfig().getSubPropertyList(); if ( ...
YarnService implements ProvisioningServiceDelegate { @VisibleForTesting protected String updateYarnConfiguration(Cluster cluster, YarnConfiguration yarnConfiguration) { String rmAddress = null; setYarnDefaults(cluster, yarnConfiguration); List<Property> keyValues = cluster.getClusterConfig().getSubPropertyList(); if ( ...
YarnService implements ProvisioningServiceDelegate { @VisibleForTesting protected String updateYarnConfiguration(Cluster cluster, YarnConfiguration yarnConfiguration) { String rmAddress = null; setYarnDefaults(cluster, yarnConfiguration); List<Property> keyValues = cluster.getClusterConfig().getSubPropertyList(); if ( ...
@Test public void testGenExtractMapRuleWrapper() throws Exception { TransformRuleWrapper<ExtractMapRule> wrapper = recommender.wrapRule(new ExtractMapRule("a")); assertEquals("a", wrapper.getRule().getPath()); assertEquals("extract from map a", wrapper.describe()); assertEquals("tbl.foo.a IS NOT NULL", wrapper.getMatch...
@Override public TransformRuleWrapper<ExtractMapRule> wrapRule(ExtractMapRule rule) { return new ExtractMapTransformRuleWrapper(rule); }
ExtractMapRecommender extends Recommender<ExtractMapRule, MapSelection> { @Override public TransformRuleWrapper<ExtractMapRule> wrapRule(ExtractMapRule rule) { return new ExtractMapTransformRuleWrapper(rule); } }
ExtractMapRecommender extends Recommender<ExtractMapRule, MapSelection> { @Override public TransformRuleWrapper<ExtractMapRule> wrapRule(ExtractMapRule rule) { return new ExtractMapTransformRuleWrapper(rule); } }
ExtractMapRecommender extends Recommender<ExtractMapRule, MapSelection> { @Override public TransformRuleWrapper<ExtractMapRule> wrapRule(ExtractMapRule rule) { return new ExtractMapTransformRuleWrapper(rule); } @Override List<ExtractMapRule> getRules(MapSelection selection, DataType selColType); @Override TransformRul...
ExtractMapRecommender extends Recommender<ExtractMapRule, MapSelection> { @Override public TransformRuleWrapper<ExtractMapRule> wrapRule(ExtractMapRule rule) { return new ExtractMapTransformRuleWrapper(rule); } @Override List<ExtractMapRule> getRules(MapSelection selection, DataType selColType); @Override TransformRul...
@Test public void testDistroDefaultsOverwrite() throws Exception { assumeNonMaprProfile(); YarnController controller = Mockito.mock(YarnController.class); YarnService yarnService = new YarnService(new TestListener(), controller, Mockito.mock(NodeProvider.class)); Cluster myCluster = createCluster(); List<Property> prop...
@VisibleForTesting protected String updateYarnConfiguration(Cluster cluster, YarnConfiguration yarnConfiguration) { String rmAddress = null; setYarnDefaults(cluster, yarnConfiguration); List<Property> keyValues = cluster.getClusterConfig().getSubPropertyList(); if ( keyValues != null && !keyValues.isEmpty()) { for (Pro...
YarnService implements ProvisioningServiceDelegate { @VisibleForTesting protected String updateYarnConfiguration(Cluster cluster, YarnConfiguration yarnConfiguration) { String rmAddress = null; setYarnDefaults(cluster, yarnConfiguration); List<Property> keyValues = cluster.getClusterConfig().getSubPropertyList(); if ( ...
YarnService implements ProvisioningServiceDelegate { @VisibleForTesting protected String updateYarnConfiguration(Cluster cluster, YarnConfiguration yarnConfiguration) { String rmAddress = null; setYarnDefaults(cluster, yarnConfiguration); List<Property> keyValues = cluster.getClusterConfig().getSubPropertyList(); if ( ...
YarnService implements ProvisioningServiceDelegate { @VisibleForTesting protected String updateYarnConfiguration(Cluster cluster, YarnConfiguration yarnConfiguration) { String rmAddress = null; setYarnDefaults(cluster, yarnConfiguration); List<Property> keyValues = cluster.getClusterConfig().getSubPropertyList(); if ( ...
YarnService implements ProvisioningServiceDelegate { @VisibleForTesting protected String updateYarnConfiguration(Cluster cluster, YarnConfiguration yarnConfiguration) { String rmAddress = null; setYarnDefaults(cluster, yarnConfiguration); List<Property> keyValues = cluster.getClusterConfig().getSubPropertyList(); if ( ...
@Test public void testMemorySplit() throws Exception { assumeNonMaprProfile(); try ( final LegacyKVStoreProvider kvstore = LegacyKVStoreProviderAdapter.inMemory(DremioTest.CLASSPATH_SCAN_RESULT)) { SingletonRegistry registry = new SingletonRegistry(); registry.bind(LegacyKVStoreProvider.class, kvstore); registry.start(...
@Override public ClusterEnriched startCluster(Cluster cluster) throws YarnProvisioningHandlingException { Preconditions.checkArgument(cluster.getState() != ClusterState.RUNNING); return startClusterAsync(cluster); }
YarnService implements ProvisioningServiceDelegate { @Override public ClusterEnriched startCluster(Cluster cluster) throws YarnProvisioningHandlingException { Preconditions.checkArgument(cluster.getState() != ClusterState.RUNNING); return startClusterAsync(cluster); } }
YarnService implements ProvisioningServiceDelegate { @Override public ClusterEnriched startCluster(Cluster cluster) throws YarnProvisioningHandlingException { Preconditions.checkArgument(cluster.getState() != ClusterState.RUNNING); return startClusterAsync(cluster); } YarnService(DremioConfig config, ProvisioningStateL...
YarnService implements ProvisioningServiceDelegate { @Override public ClusterEnriched startCluster(Cluster cluster) throws YarnProvisioningHandlingException { Preconditions.checkArgument(cluster.getState() != ClusterState.RUNNING); return startClusterAsync(cluster); } YarnService(DremioConfig config, ProvisioningStateL...
YarnService implements ProvisioningServiceDelegate { @Override public ClusterEnriched startCluster(Cluster cluster) throws YarnProvisioningHandlingException { Preconditions.checkArgument(cluster.getState() != ClusterState.RUNNING); return startClusterAsync(cluster); } YarnService(DremioConfig config, ProvisioningStateL...
@Test public void testUpdater() throws Exception { assumeNonMaprProfile(); YarnController controller = Mockito.mock(YarnController.class); final TestListener listener = new TestListener(); YarnService yarnService = new YarnService(listener, controller, Mockito.mock(NodeProvider.class)); final Cluster cluster = createCl...
@Override public ClusterEnriched startCluster(Cluster cluster) throws YarnProvisioningHandlingException { Preconditions.checkArgument(cluster.getState() != ClusterState.RUNNING); return startClusterAsync(cluster); }
YarnService implements ProvisioningServiceDelegate { @Override public ClusterEnriched startCluster(Cluster cluster) throws YarnProvisioningHandlingException { Preconditions.checkArgument(cluster.getState() != ClusterState.RUNNING); return startClusterAsync(cluster); } }
YarnService implements ProvisioningServiceDelegate { @Override public ClusterEnriched startCluster(Cluster cluster) throws YarnProvisioningHandlingException { Preconditions.checkArgument(cluster.getState() != ClusterState.RUNNING); return startClusterAsync(cluster); } YarnService(DremioConfig config, ProvisioningStateL...
YarnService implements ProvisioningServiceDelegate { @Override public ClusterEnriched startCluster(Cluster cluster) throws YarnProvisioningHandlingException { Preconditions.checkArgument(cluster.getState() != ClusterState.RUNNING); return startClusterAsync(cluster); } YarnService(DremioConfig config, ProvisioningStateL...
YarnService implements ProvisioningServiceDelegate { @Override public ClusterEnriched startCluster(Cluster cluster) throws YarnProvisioningHandlingException { Preconditions.checkArgument(cluster.getState() != ClusterState.RUNNING); return startClusterAsync(cluster); } YarnService(DremioConfig config, ProvisioningStateL...
@Test public void testFailedUpdater() throws Exception { assumeNonMaprProfile(); YarnController controller = Mockito.mock(YarnController.class); final TestListener listener = new TestListener(); YarnService yarnService = new YarnService(listener, controller, Mockito.mock(NodeProvider.class)); final Cluster cluster = cr...
@Override public ClusterEnriched startCluster(Cluster cluster) throws YarnProvisioningHandlingException { Preconditions.checkArgument(cluster.getState() != ClusterState.RUNNING); return startClusterAsync(cluster); }
YarnService implements ProvisioningServiceDelegate { @Override public ClusterEnriched startCluster(Cluster cluster) throws YarnProvisioningHandlingException { Preconditions.checkArgument(cluster.getState() != ClusterState.RUNNING); return startClusterAsync(cluster); } }
YarnService implements ProvisioningServiceDelegate { @Override public ClusterEnriched startCluster(Cluster cluster) throws YarnProvisioningHandlingException { Preconditions.checkArgument(cluster.getState() != ClusterState.RUNNING); return startClusterAsync(cluster); } YarnService(DremioConfig config, ProvisioningStateL...
YarnService implements ProvisioningServiceDelegate { @Override public ClusterEnriched startCluster(Cluster cluster) throws YarnProvisioningHandlingException { Preconditions.checkArgument(cluster.getState() != ClusterState.RUNNING); return startClusterAsync(cluster); } YarnService(DremioConfig config, ProvisioningStateL...
YarnService implements ProvisioningServiceDelegate { @Override public ClusterEnriched startCluster(Cluster cluster) throws YarnProvisioningHandlingException { Preconditions.checkArgument(cluster.getState() != ClusterState.RUNNING); return startClusterAsync(cluster); } YarnService(DremioConfig config, ProvisioningStateL...
@Test public void testStopCluster() throws Exception { assumeNonMaprProfile(); Cluster myCluster = createCluster(); myCluster.setState(ClusterState.RUNNING); myCluster.setStateChangeTime(System.currentTimeMillis()); YarnController controller = Mockito.mock(YarnController.class); YarnService yarnService = new YarnServic...
@Override public void stopCluster(Cluster cluster) throws YarnProvisioningHandlingException { stopClusterAsync(cluster); }
YarnService implements ProvisioningServiceDelegate { @Override public void stopCluster(Cluster cluster) throws YarnProvisioningHandlingException { stopClusterAsync(cluster); } }
YarnService implements ProvisioningServiceDelegate { @Override public void stopCluster(Cluster cluster) throws YarnProvisioningHandlingException { stopClusterAsync(cluster); } YarnService(DremioConfig config, ProvisioningStateListener stateListener, NodeProvider executionNodeProvider, OptionManager...
YarnService implements ProvisioningServiceDelegate { @Override public void stopCluster(Cluster cluster) throws YarnProvisioningHandlingException { stopClusterAsync(cluster); } YarnService(DremioConfig config, ProvisioningStateListener stateListener, NodeProvider executionNodeProvider, OptionManager...
YarnService implements ProvisioningServiceDelegate { @Override public void stopCluster(Cluster cluster) throws YarnProvisioningHandlingException { stopClusterAsync(cluster); } YarnService(DremioConfig config, ProvisioningStateListener stateListener, NodeProvider executionNodeProvider, OptionManager...