HDFS-7561. TestFetchImage should write fetched-image-dir under target. Contributed by Liang Xie.
This commit is contained in:
parent
e13a484a2b
commit
e86943fd64
|
@ -647,6 +647,9 @@ Release 2.7.0 - UNRELEASED
|
|||
HDFS-7564. NFS gateway dynamically reload UID/GID mapping file /etc/nfs.map
|
||||
(Yongjun Zhang via brandonli)
|
||||
|
||||
HDFS-7561. TestFetchImage should write fetched-image-dir under target.
|
||||
(Liang Xie via shv)
|
||||
|
||||
Release 2.6.1 - UNRELEASED
|
||||
|
||||
INCOMPATIBLE CHANGES
|
||||
|
|
|
@ -26,20 +26,27 @@ import java.util.regex.Pattern;
|
|||
|
||||
import org.apache.hadoop.conf.Configuration;
|
||||
import org.apache.hadoop.fs.FileSystem;
|
||||
import org.apache.hadoop.fs.FileUtil;
|
||||
import org.apache.hadoop.fs.Path;
|
||||
import org.apache.hadoop.hdfs.protocol.HdfsConstants.SafeModeAction;
|
||||
import org.apache.hadoop.hdfs.tools.DFSAdmin;
|
||||
import org.apache.hadoop.hdfs.util.MD5FileUtils;
|
||||
import org.apache.hadoop.io.MD5Hash;
|
||||
import org.junit.AfterClass;
|
||||
import org.junit.Test;
|
||||
|
||||
public class TestFetchImage {
|
||||
|
||||
private static final File FETCHED_IMAGE_FILE = new File(
|
||||
System.getProperty("build.test.dir"), "fetched-image-dir");
|
||||
System.getProperty("test.build.dir"), "target/fetched-image-dir");
|
||||
// Shamelessly stolen from NNStorage.
|
||||
private static final Pattern IMAGE_REGEX = Pattern.compile("fsimage_(\\d+)");
|
||||
|
||||
@AfterClass
|
||||
public static void cleanup() {
|
||||
FileUtil.fullyDelete(FETCHED_IMAGE_FILE);
|
||||
}
|
||||
|
||||
/**
|
||||
* Download a few fsimages using `hdfs dfsadmin -fetchImage ...' and verify
|
||||
* the results.
|
||||
|
|
Loading…
Reference in New Issue