本文整理汇总了Java中org.apache.hadoop.tools.util.TestDistCpUtils.delete方法的典型用法代码示例。如果您正苦于以下问题:Java TestDistCpUtils.delete方法的具体用法?Java TestDistCpUtils.delete怎么用?Java TestDistCpUtils.delete使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.hadoop.tools.util.TestDistCpUtils
的用法示例。
在下文中一共展示了TestDistCpUtils.delete方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testUpdateGlobTargetDirMultiLevel
import org.apache.hadoop.tools.util.TestDistCpUtils; //导入方法依赖的package包/类
@Test
public void testUpdateGlobTargetDirMultiLevel() {
try {
Path listFile = new Path("/tmp1/listing");
Path target = new Path("/tmp/target");
addEntries(listFile, "/tmp/*/*");
createFiles("/tmp/Umultifile/Ufile3", "/tmp/Umultifile/Ufile4", "/tmp/Umultifile/Ufile5");
createFiles("/tmp/Usingledir1/Udir3/Ufile7", "/tmp/Usingledir1/Udir3/Ufile8",
"/tmp/Usingledir1/Udir3/Ufile9");
mkdirs(target.toString());
runTest(listFile, target, true);
checkResult(listFile, 6);
} catch (IOException e) {
LOG.error("Exception encountered while testing build listing", e);
Assert.fail("build listing failure");
} finally {
TestDistCpUtils.delete(fs, "/tmp");
TestDistCpUtils.delete(fs, "/tmp1");
}
}
示例2: caseGlobTargetMissingSingleLevel
import org.apache.hadoop.tools.util.TestDistCpUtils; //导入方法依赖的package包/类
private void caseGlobTargetMissingSingleLevel(boolean sync) {
try {
Path listFile = new Path("/tmp1/listing");
Path target = new Path("/tmp/target");
addEntries(listFile, "/tmp/*");
createFiles("/tmp/multifile/file3", "/tmp/multifile/file4", "/tmp/multifile/file5");
createFiles("/tmp/singledir/dir2/file6");
runTest(listFile, target, sync);
checkResult(listFile, 5);
} catch (IOException e) {
LOG.error("Exception encountered while testing build listing", e);
Assert.fail("build listing failure");
} finally {
TestDistCpUtils.delete(fs, "/tmp");
TestDistCpUtils.delete(fs, "/tmp1");
}
}
示例3: caseMultiFileTargetPresent
import org.apache.hadoop.tools.util.TestDistCpUtils; //导入方法依赖的package包/类
private void caseMultiFileTargetPresent(boolean sync) {
try {
addEntries(listFile, "multifile/file3", "multifile/file4", "multifile/file5");
createFiles("multifile/file3", "multifile/file4", "multifile/file5");
mkdirs(target.toString());
runTest(listFile, target, true, sync);
checkResult(target, 3, "file3", "file4", "file5");
} catch (IOException e) {
LOG.error("Exception encountered while testing distcp", e);
Assert.fail("distcp failure");
} finally {
TestDistCpUtils.delete(fs, root);
}
}
示例4: caseSingleFileMissingTarget
import org.apache.hadoop.tools.util.TestDistCpUtils; //导入方法依赖的package包/类
private void caseSingleFileMissingTarget(boolean sync) {
try {
addEntries(listFile, "singlefile1/file1");
createFiles("singlefile1/file1");
runTest(listFile, target, false, sync);
checkResult(target, 1);
} catch (IOException e) {
LOG.error("Exception encountered while testing distcp", e);
Assert.fail("distcp failure");
} finally {
TestDistCpUtils.delete(fs, root);
}
}
示例5: caseSingleFileTargetFile
import org.apache.hadoop.tools.util.TestDistCpUtils; //导入方法依赖的package包/类
private void caseSingleFileTargetFile(boolean sync) {
try {
addEntries(listFile, "singlefile1/file1");
createFiles("singlefile1/file1", target.toString());
runTest(listFile, target, false, sync);
checkResult(target, 1);
} catch (IOException e) {
LOG.error("Exception encountered while testing distcp", e);
Assert.fail("distcp failure");
} finally {
TestDistCpUtils.delete(fs, root);
}
}
示例6: caseSingleFileTargetDir
import org.apache.hadoop.tools.util.TestDistCpUtils; //导入方法依赖的package包/类
private void caseSingleFileTargetDir(boolean sync) {
try {
addEntries(listFile, "singlefile2/file2");
createFiles("singlefile2/file2");
mkdirs(target.toString());
runTest(listFile, target, true, sync);
checkResult(target, 1, "file2");
} catch (IOException e) {
LOG.error("Exception encountered while testing distcp", e);
Assert.fail("distcp failure");
} finally {
TestDistCpUtils.delete(fs, root);
}
}
示例7: caseSingleFileTargetDir
import org.apache.hadoop.tools.util.TestDistCpUtils; //导入方法依赖的package包/类
private void caseSingleFileTargetDir(boolean sync) {
try {
Path listFile = new Path("/tmp/listing");
Path target = new Path("/tmp/target");
addEntries(listFile, "/tmp/singlefile2/file2");
createFiles("/tmp/singlefile2/file2");
mkdirs(target.toString());
runTest(listFile, target, true, sync);
checkResult(listFile, 1);
} catch (IOException e) {
LOG.error("Exception encountered while testing build listing", e);
Assert.fail("build listing failure");
} finally {
TestDistCpUtils.delete(fs, "/tmp");
}
}
示例8: testSingleDirTargetPresent
import org.apache.hadoop.tools.util.TestDistCpUtils; //导入方法依赖的package包/类
@Test
public void testSingleDirTargetPresent() {
try {
addEntries(listFile, "singledir");
mkdirs(root + "/singledir/dir1");
mkdirs(target.toString());
runTest(listFile, target, true, false);
checkResult(target, 1, "singledir/dir1");
} catch (IOException e) {
LOG.error("Exception encountered while testing distcp", e);
Assert.fail("distcp failure");
} finally {
TestDistCpUtils.delete(fs, root);
}
}
示例9: testUpdateSingleDirTargetPresent
import org.apache.hadoop.tools.util.TestDistCpUtils; //导入方法依赖的package包/类
@Test(timeout=100000)
public void testUpdateSingleDirTargetPresent() {
try {
addEntries(listFile, "Usingledir");
mkdirs(root + "/Usingledir/Udir1");
mkdirs(target.toString());
runTest(listFile, target, true, true);
checkResult(target, 1, "Udir1");
} catch (IOException e) {
LOG.error("Exception encountered while testing distcp", e);
Assert.fail("distcp failure");
} finally {
TestDistCpUtils.delete(fs, root);
}
}
示例10: caseGlobTargetMissingMultiLevel
import org.apache.hadoop.tools.util.TestDistCpUtils; //导入方法依赖的package包/类
private void caseGlobTargetMissingMultiLevel(boolean sync) {
try {
Path listFile = new Path("/tmp1/listing");
Path target = new Path("/tmp/target");
addEntries(listFile, "/tmp/*/*");
createFiles("/tmp/multifile/file3", "/tmp/multifile/file4", "/tmp/multifile/file5");
createFiles("/tmp/singledir1/dir3/file7", "/tmp/singledir1/dir3/file8",
"/tmp/singledir1/dir3/file9");
runTest(listFile, target, sync);
checkResult(listFile, 6);
} catch (IOException e) {
LOG.error("Exception encountered while testing build listing", e);
Assert.fail("build listing failure");
} finally {
TestDistCpUtils.delete(fs, "/tmp");
TestDistCpUtils.delete(fs, "/tmp1");
}
}
示例11: testMultiDirTargetPresent
import org.apache.hadoop.tools.util.TestDistCpUtils; //导入方法依赖的package包/类
@Test
public void testMultiDirTargetPresent() {
try {
addEntries(listFile, "multifile", "singledir");
createFiles("multifile/file3", "multifile/file4", "multifile/file5");
mkdirs(target.toString(), root + "/singledir/dir1");
runTest(listFile, target, true, false);
checkResult(target, 2, "multifile/file3", "multifile/file4", "multifile/file5", "singledir/dir1");
} catch (IOException e) {
LOG.error("Exception encountered while testing distcp", e);
Assert.fail("distcp failure");
} finally {
TestDistCpUtils.delete(fs, root);
}
}
示例12: testUpdateMultiDirTargetPresent
import org.apache.hadoop.tools.util.TestDistCpUtils; //导入方法依赖的package包/类
@Test
public void testUpdateMultiDirTargetPresent() {
try {
addEntries(listFile, "Umultifile", "Usingledir");
createFiles("Umultifile/Ufile3", "Umultifile/Ufile4", "Umultifile/Ufile5");
mkdirs(target.toString(), root + "/Usingledir/Udir1");
runTest(listFile, target, true, true);
checkResult(target, 4, "Ufile3", "Ufile4", "Ufile5", "Udir1");
} catch (IOException e) {
LOG.error("Exception encountered while testing distcp", e);
Assert.fail("distcp failure");
} finally {
TestDistCpUtils.delete(fs, root);
}
}
示例13: testMultiDirTargetMissing
import org.apache.hadoop.tools.util.TestDistCpUtils; //导入方法依赖的package包/类
@Test
public void testMultiDirTargetMissing() {
try {
addEntries(listFile, "multifile", "singledir");
createFiles("multifile/file3", "multifile/file4", "multifile/file5");
mkdirs(root + "/singledir/dir1");
runTest(listFile, target, false, false);
checkResult(target, 2, "multifile/file3", "multifile/file4",
"multifile/file5", "singledir/dir1");
} catch (IOException e) {
LOG.error("Exception encountered while testing distcp", e);
Assert.fail("distcp failure");
} finally {
TestDistCpUtils.delete(fs, root);
}
}
示例14: caseSingleFileTargetFile
import org.apache.hadoop.tools.util.TestDistCpUtils; //导入方法依赖的package包/类
private void caseSingleFileTargetFile(boolean sync) {
try {
addEntries(listFile, "singlefile1/file1");
createFiles("singlefile1/file1", "target");
runTest(listFile, target, false, sync);
checkResult(target, 1);
} catch (IOException e) {
LOG.error("Exception encountered while testing distcp", e);
Assert.fail("distcp failure");
} finally {
TestDistCpUtils.delete(fs, root);
}
}
示例15: testGlobTargetMissingSingleLevel
import org.apache.hadoop.tools.util.TestDistCpUtils; //导入方法依赖的package包/类
@Test(timeout=100000)
public void testGlobTargetMissingSingleLevel() {
try {
Path listFile = new Path("target/tmp1/listing").makeQualified(fs.getUri(),
fs.getWorkingDirectory());
addEntries(listFile, "*");
createFiles("multifile/file3", "multifile/file4", "multifile/file5");
createFiles("singledir/dir2/file6");
runTest(listFile, target, false, false);
checkResult(target, 2, "multifile/file3", "multifile/file4", "multifile/file5",
"singledir/dir2/file6");
} catch (IOException e) {
LOG.error("Exception encountered while testing distcp", e);
Assert.fail("distcp failure");
} finally {
TestDistCpUtils.delete(fs, root);
TestDistCpUtils.delete(fs, "target/tmp1");
}
}