Переглянути джерело

HADOOP-13861. Spelling errors in logging and exceptions for code. Contributed by Grant Sohn.

Andrew Wang 8 роки тому
батько
коміт
7b988e8899

+ 1 - 1
hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/security/authentication/util/ZKSignerSecretProvider.java

@@ -258,7 +258,7 @@ public class ZKSignerSecretProvider extends RolloverSignerSecretProvider {
     } catch (KeeperException.BadVersionException bve) {
     } catch (KeeperException.BadVersionException bve) {
       LOG.debug("Unable to push to znode; another server already did it");
       LOG.debug("Unable to push to znode; another server already did it");
     } catch (Exception ex) {
     } catch (Exception ex) {
-      LOG.error("An unexpected exception occured pushing data to ZooKeeper",
+      LOG.error("An unexpected exception occurred pushing data to ZooKeeper",
               ex);
               ex);
     }
     }
   }
   }

+ 1 - 1
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/LocalDirAllocator.java

@@ -525,7 +525,7 @@ public class LocalDirAllocator {
         try {
         try {
           advance();
           advance();
         } catch (IOException ie) {
         } catch (IOException ie) {
-          throw new RuntimeException("Can't check existance of " + next, ie);
+          throw new RuntimeException("Can't check existence of " + next, ie);
         }
         }
         if (result == null) {
         if (result == null) {
           throw new NoSuchElementException();
           throw new NoSuchElementException();

+ 1 - 1
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/CommandFormat.java

@@ -248,7 +248,7 @@ public class CommandFormat {
     private static final long serialVersionUID = 0L;
     private static final long serialVersionUID = 0L;
 
 
     public DuplicatedOptionException(String duplicatedOption) {
     public DuplicatedOptionException(String duplicatedOption) {
-      super("option " + duplicatedOption + " already exsits!");
+      super("option " + duplicatedOption + " already exists!");
     }
     }
   }
   }
 }
 }

+ 1 - 1
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/rawcoder/util/GF256.java

@@ -221,7 +221,7 @@ public final class GF256 {
         }
         }
         if (j == n) {
         if (j == n) {
           // Couldn't find means it's singular
           // Couldn't find means it's singular
-          throw new RuntimeException("Not invertble");
+          throw new RuntimeException("Not invertible");
         }
         }
 
 
         for (int k = 0; k < n; k++) {
         for (int k = 0; k < n; k++) {

+ 1 - 1
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/file/tfile/TFile.java

@@ -1789,7 +1789,7 @@ public class TFile {
         public int getKey(byte[] buf, int offset) throws IOException {
         public int getKey(byte[] buf, int offset) throws IOException {
           if ((offset | (buf.length - offset - klen)) < 0) {
           if ((offset | (buf.length - offset - klen)) < 0) {
             throw new IndexOutOfBoundsException(
             throw new IndexOutOfBoundsException(
-                "Bufer not enough to store the key");
+                "Buffer not enough to store the key");
           }
           }
           System.arraycopy(keyBuffer, 0, buf, offset, klen);
           System.arraycopy(keyBuffer, 0, buf, offset, klen);
           return klen;
           return klen;

+ 1 - 1
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/file/tfile/Utils.java

@@ -153,7 +153,7 @@ public final class Utils {
         out.writeLong(n);
         out.writeLong(n);
         return;
         return;
       default:
       default:
-        throw new RuntimeException("Internel error");
+        throw new RuntimeException("Internal error");
     }
     }
   }
   }
 
 

+ 2 - 2
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/net/NetworkTopology.java

@@ -169,7 +169,7 @@ public class NetworkTopology {
       if (!isAncestor(n)) {
       if (!isAncestor(n)) {
         throw new IllegalArgumentException(n.getName()
         throw new IllegalArgumentException(n.getName()
             + ", which is located at " + n.getNetworkLocation()
             + ", which is located at " + n.getNetworkLocation()
-            + ", is not a descendent of " + getPath(this));
+            + ", is not a descendant of " + getPath(this));
       }
       }
       if (isParent(n)) {
       if (isParent(n)) {
         // this node is the parent of n; add n directly
         // this node is the parent of n; add n directly
@@ -231,7 +231,7 @@ public class NetworkTopology {
       if (!isAncestor(n)) {
       if (!isAncestor(n)) {
         throw new IllegalArgumentException(n.getName()
         throw new IllegalArgumentException(n.getName()
             + ", which is located at " + n.getNetworkLocation()
             + ", which is located at " + n.getNetworkLocation()
-            + ", is not a descendent of " + getPath(this));
+            + ", is not a descendant of " + getPath(this));
       }
       }
       if (isParent(n)) {
       if (isParent(n)) {
         // this node is the parent of n; remove n directly
         // this node is the parent of n; remove n directly

+ 1 - 1
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/KDiag.java

@@ -593,7 +593,7 @@ public class KDiag extends Configured implements Tool, Closeable {
 
 
     Keytab loadKeytab = Keytab.loadKeytab(kt);
     Keytab loadKeytab = Keytab.loadKeytab(kt);
     List<PrincipalName> principals = loadKeytab.getPrincipals();
     List<PrincipalName> principals = loadKeytab.getPrincipals();
-    println("keytab princial count: %d", principals.size());
+    println("keytab principal count: %d", principals.size());
     int entrySize = 0;
     int entrySize = 0;
     for (PrincipalName princ : principals) {
     for (PrincipalName princ : principals) {
       List<KeytabEntry> entries = loadKeytab.getKeytabEntries(princ);
       List<KeytabEntry> entries = loadKeytab.getKeytabEntries(princ);

+ 1 - 1
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/alias/LocalJavaKeyStoreProvider.java

@@ -151,7 +151,7 @@ public final class LocalJavaKeyStoreProvider extends
   public void flush() throws IOException {
   public void flush() throws IOException {
     super.flush();
     super.flush();
     if (LOG.isDebugEnabled()) {
     if (LOG.isDebugEnabled()) {
-      LOG.debug("Reseting permissions to '" + permissions + "'");
+      LOG.debug("Resetting permissions to '" + permissions + "'");
     }
     }
     if (!Shell.WINDOWS) {
     if (!Shell.WINDOWS) {
       Files.setPosixFilePermissions(Paths.get(file.getCanonicalPath()),
       Files.setPosixFilePermissions(Paths.get(file.getCanonicalPath()),