DistCpOptions { public Path getAtomicWorkPath() { return atomicWorkPath; } private  DistCpOptions(Builder builder); Path getSourceFileListing(); List<Path> getSourcePaths(); Path getTargetPath(); boolean shouldAtomicCommit(); Path getAtomicWorkPath(); boolean shouldSyncFolder(); boolean shouldDeleteMissing(); boolean shouldIgnoreFailures(); boolean shouldOverwrite(); boolean shouldAppend(); boolean shouldSkipCRC(); boolean shouldBlock(); boolean shouldUseDiff(); boolean shouldUseRdiff(); boolean shouldUseSnapshotDiff(); String getFromSnapshot(); String getToSnapshot(); String getFiltersFile(); Path getLogPath(); String getCopyStrategy(); int getNumListstatusThreads(); int getMaxMaps(); float getMapBandwidth(); Set<FileAttribute> getPreserveAttributes(); boolean shouldPreserve(FileAttribute attribute); int getBlocksPerChunk(); int getCopyBufferSize(); boolean shouldVerboseLog(); Path getTrackPath(); void appendToConf(Configuration conf); @Override String toString(); static final int MAX_NUM_LISTSTATUS_THREADS; }
@Test public void testSetWorkPath() { final DistCpOptions.Builder builder = new DistCpOptions.Builder( Collections.singletonList(new Path("hdfs: new Path("hdfs: Assert.assertNull(builder.build().getAtomicWorkPath()); builder.withAtomicCommit(true); Assert.assertNull(builder.build().getAtomicWorkPath()); final Path workPath = new Path("hdfs: builder.withAtomicWorkPath(workPath); Assert.assertEquals(workPath, builder.build().getAtomicWorkPath()); }