diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DFSAdmin.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DFSAdmin.java
index 9805972bdfe..6b4edd54b9c 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DFSAdmin.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DFSAdmin.java
@@ -753,7 +753,7 @@ public class DFSAdmin extends FsShell {
} catch (SnapshotException e) {
throw new RemoteException(e.getClass().getName(), e.getMessage());
}
- System.out.println("Allowing snaphot on " + argv[1] + " succeeded");
+ System.out.println("Allowing snapshot on " + argv[1] + " succeeded");
}
/**
@@ -770,7 +770,7 @@ public class DFSAdmin extends FsShell {
} catch (SnapshotException e) {
throw new RemoteException(e.getClass().getName(), e.getMessage());
}
- System.out.println("Disallowing snaphot on " + argv[1] + " succeeded");
+ System.out.println("Disallowing snapshot on " + argv[1] + " succeeded");
}
/**
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestSnapshotCommands.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestSnapshotCommands.java
index 7e1af2aa4de..8d667f27d2c 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestSnapshotCommands.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestSnapshotCommands.java
@@ -85,10 +85,12 @@ public class TestSnapshotCommands {
@Test
public void testAllowSnapshot() throws Exception {
// Idempotent test
- DFSTestUtil.DFSAdminRun("-allowSnapshot /sub1", 0, "Allowing snaphot on /sub1 succeeded", conf);
- // allow normal dir success
+ DFSTestUtil.DFSAdminRun("-allowSnapshot /sub1", 0,
+ "Allowing snapshot " + "on /sub1 succeeded", conf);
+ // allow normal dir success
DFSTestUtil.FsShellRun("-mkdir /sub2", conf);
- DFSTestUtil.DFSAdminRun("-allowSnapshot /sub2", 0, "Allowing snaphot on /sub2 succeeded", conf);
+ DFSTestUtil.DFSAdminRun("-allowSnapshot /sub2", 0,
+ "Allowing snapshot " + "on /sub2 succeeded", conf);
// allow non-exists dir failed
DFSTestUtil.DFSAdminRun("-allowSnapshot /sub3", -1, null, conf);
}
@@ -159,9 +161,11 @@ public class TestSnapshotCommands {
DFSTestUtil.DFSAdminRun("-disallowSnapshot /sub1", -1,
"disallowSnapshot: The directory /sub1 has snapshot(s). Please redo the operation after removing all the snapshots.", conf);
DFSTestUtil.FsShellRun("-deleteSnapshot /sub1 sn1", conf);
- DFSTestUtil.DFSAdminRun("-disallowSnapshot /sub1", 0, "Disallowing snaphot on /sub1 succeeded", conf);
+ DFSTestUtil.DFSAdminRun("-disallowSnapshot /sub1", 0,
+ "Disallowing snapshot on /sub1 succeeded", conf);
// Idempotent test
- DFSTestUtil.DFSAdminRun("-disallowSnapshot /sub1", 0, "Disallowing snaphot on /sub1 succeeded", conf);
+ DFSTestUtil.DFSAdminRun("-disallowSnapshot /sub1", 0,
+ "Disallowing snapshot on /sub1 succeeded", conf);
// now it can be deleted
DFSTestUtil.FsShellRun("-rmr /sub1", conf);
}
@@ -173,7 +177,7 @@ public class TestSnapshotCommands {
config.set("fs.defaultFS", "hdfs://127.0.0.1:1024");
String path = fs.getUri() + "/Fully/QPath";
DFSTestUtil.DFSAdminRun("-allowSnapshot " + path, 0,
- "Allowing snaphot on " + path + " succeeded", config);
+ "Allowing snapshot on " + path + " succeeded", config);
DFSTestUtil.FsShellRun("-createSnapshot " + path + " sn1", config);
// create file1
DFSTestUtil
@@ -193,7 +197,7 @@ public class TestSnapshotCommands {
DFSTestUtil.FsShellRun("-deleteSnapshot " + path + " sn1", config);
DFSTestUtil.FsShellRun("-deleteSnapshot " + path + " sn3", config);
DFSTestUtil.DFSAdminRun("-disallowSnapshot " + path, 0,
- "Disallowing snaphot on " + path + " succeeded", config);
+ "Disallowing snapshot on " + path + " succeeded", config);
fs.delete(new Path("/Fully/QPath"), true);
}
@@ -205,7 +209,7 @@ public class TestSnapshotCommands {
fs.mkdirs(snapDirPath);
DFSTestUtil.DFSAdminRun("-allowSnapshot " + snapDirPath, 0,
- "Allowing snaphot on " + snapDirPath + " succeeded", config);
+ "Allowing snapshot on " + snapDirPath + " succeeded", config);
DFSTestUtil.createFile(fs, new Path(snapDirPath, "file1"),
1024, (short) 1, 100);
DFSTestUtil.FsShellRun("-createSnapshot " + snapDirPath + " sn1", config);
@@ -242,7 +246,7 @@ public class TestSnapshotCommands {
DFSTestUtil.FsShellRun("-deleteSnapshot " + snapDir + " sn3", config);
DFSTestUtil.FsShellRun("-deleteSnapshot " + snapDir + " sn4", config);
DFSTestUtil.DFSAdminRun("-disallowSnapshot " + snapDir, 0,
- "Disallowing snaphot on " + snapDirPath + " succeeded", config);
+ "Disallowing snapshot on " + snapDirPath + " succeeded", config);
fs.delete(new Path("/Fully/QPath"), true);
}
}
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/resources/testHDFSConf.xml b/hadoop-hdfs-project/hadoop-hdfs/src/test/resources/testHDFSConf.xml
index ba90efa77eb..5094183fc3c 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/test/resources/testHDFSConf.xml
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/resources/testHDFSConf.xml
@@ -16863,7 +16863,7 @@
RegexpComparator
- Allowing snaphot on /user/USERNAME/dir1 succeeded
+ Allowing snapshot on /user/USERNAME/dir1 succeeded
@@ -16881,7 +16881,7 @@
RegexpComparator
- Disallowing snaphot on /user/USERNAME/dir1 succeeded
+ Disallowing snapshot on /user/USERNAME/dir1 succeeded