HDFS-12627. Fix typo in DFSAdmin command output. Contributed by Ajay Kumar.


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/bb0a742a
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/bb0a742a
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/bb0a742a

Branch: refs/heads/YARN-5881
Commit: bb0a742aac1dc03d08beff3cb4b7b04b8036fdcc
Parents: fa5cfc6
Author: Arpit Agarwal <[email protected]>
Authored: Wed Oct 11 12:26:14 2017 -0700
Committer: Arpit Agarwal <[email protected]>
Committed: Wed Oct 11 12:26:14 2017 -0700

----------------------------------------------------------------------
 .../org/apache/hadoop/hdfs/tools/DFSAdmin.java  |  4 ++--
 .../hadoop/hdfs/TestSnapshotCommands.java       | 22 ++++++++++++--------
 .../src/test/resources/testHDFSConf.xml         |  4 ++--
 3 files changed, 17 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/bb0a742a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DFSAdmin.java
----------------------------------------------------------------------
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 9805972..6b4edd5 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");
   }
   
   /**

http://git-wip-us.apache.org/repos/asf/hadoop/blob/bb0a742a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestSnapshotCommands.java
----------------------------------------------------------------------
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 7e1af2a..8d667f2 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);
   }
 }

http://git-wip-us.apache.org/repos/asf/hadoop/blob/bb0a742a/hadoop-hdfs-project/hadoop-hdfs/src/test/resources/testHDFSConf.xml
----------------------------------------------------------------------
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 ba90efa..5094183 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 @@
       <comparators>
         <comparator>
           <type>RegexpComparator</type>
-          <expected-output>Allowing snaphot on /user/USERNAME/dir1 
succeeded</expected-output>
+          <expected-output>Allowing snapshot on /user/USERNAME/dir1 
succeeded</expected-output>
         </comparator>
       </comparators>
     </test>
@@ -16881,7 +16881,7 @@
       <comparators>
         <comparator>
           <type>RegexpComparator</type>
-          <expected-output>Disallowing snaphot on /user/USERNAME/dir1 
succeeded</expected-output>
+          <expected-output>Disallowing snapshot on /user/USERNAME/dir1 
succeeded</expected-output>
         </comparator>
       </comparators>
     </test>


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to