@Test public void testGetDestinationHdfsPath() throws Exception { CelosCiContext context = mock(CelosCiContext.class); File remoteHdfsFolder = tempDir.newFolder(); doReturn(remoteHdfsFolder.getAbsolutePath()).when(context).getHdfsPrefix(); doReturn("workflow").when(context).getWorkflowName(); doReturn("/some/hdfs/root").when(context).getHdfsRoot(); HdfsDeployer deployer = new HdfsDeployer(context); Path path = deployer.getDestinationHdfsPath(); Assert.assertEquals(path, new Path(new File(remoteHdfsFolder, "some/hdfs/root/workflow").getAbsolutePath())); }
Path getDestinationHdfsPath() { return new Path(String.format(REMOTE_HDFS_PATTERN, context.getHdfsPrefix(), context.getHdfsRoot(), context.getWorkflowName())); }
HdfsDeployer { Path getDestinationHdfsPath() { return new Path(String.format(REMOTE_HDFS_PATTERN, context.getHdfsPrefix(), context.getHdfsRoot(), context.getWorkflowName())); } }
HdfsDeployer { Path getDestinationHdfsPath() { return new Path(String.format(REMOTE_HDFS_PATTERN, context.getHdfsPrefix(), context.getHdfsRoot(), context.getWorkflowName())); } HdfsDeployer(CelosCiContext context); }
HdfsDeployer { Path getDestinationHdfsPath() { return new Path(String.format(REMOTE_HDFS_PATTERN, context.getHdfsPrefix(), context.getHdfsRoot(), context.getWorkflowName())); } HdfsDeployer(CelosCiContext context); void undeploy(); void deploy(); }
HdfsDeployer { Path getDestinationHdfsPath() { return new Path(String.format(REMOTE_HDFS_PATTERN, context.getHdfsPrefix(), context.getHdfsRoot(), context.getWorkflowName())); } HdfsDeployer(CelosCiContext context); void undeploy(); void deploy();  }