From 7b988e88992528a0cac2ca8893652c5d4a90c6b9 Mon Sep 17 00:00:00 2001 From: Andrew Wang Date: Mon, 5 Dec 2016 23:18:18 -0800 Subject: [PATCH] HADOOP-13861. Spelling errors in logging and exceptions for code. Contributed by Grant Sohn. --- .../security/authentication/util/ZKSignerSecretProvider.java | 2 +- .../src/main/java/org/apache/hadoop/fs/LocalDirAllocator.java | 2 +- .../main/java/org/apache/hadoop/fs/shell/CommandFormat.java | 2 +- .../org/apache/hadoop/io/erasurecode/rawcoder/util/GF256.java | 2 +- .../src/main/java/org/apache/hadoop/io/file/tfile/TFile.java | 2 +- .../src/main/java/org/apache/hadoop/io/file/tfile/Utils.java | 2 +- .../src/main/java/org/apache/hadoop/net/NetworkTopology.java | 4 ++-- .../src/main/java/org/apache/hadoop/security/KDiag.java | 2 +- .../hadoop/security/alias/LocalJavaKeyStoreProvider.java | 2 +- 9 files changed, 10 insertions(+), 10 deletions(-) diff --git a/hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/security/authentication/util/ZKSignerSecretProvider.java b/hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/security/authentication/util/ZKSignerSecretProvider.java index 1d16b2d6bd..48dfaaaf20 100644 --- a/hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/security/authentication/util/ZKSignerSecretProvider.java +++ b/hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/security/authentication/util/ZKSignerSecretProvider.java @@ -258,7 +258,7 @@ private synchronized void pushToZK(byte[] newSecret, byte[] currentSecret, } catch (KeeperException.BadVersionException bve) { LOG.debug("Unable to push to znode; another server already did it"); } catch (Exception ex) { - LOG.error("An unexpected exception occured pushing data to ZooKeeper", + LOG.error("An unexpected exception occurred pushing data to ZooKeeper", ex); } } diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/LocalDirAllocator.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/LocalDirAllocator.java index b14e1f0631..1ed01ea07f 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/LocalDirAllocator.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/LocalDirAllocator.java @@ -525,7 +525,7 @@ public Path next() { try { advance(); } 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) { throw new NoSuchElementException(); diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/CommandFormat.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/CommandFormat.java index 0aa3d654f2..bf30b22e1f 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/CommandFormat.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/CommandFormat.java @@ -248,7 +248,7 @@ public static class DuplicatedOptionException extends IllegalArgumentException { private static final long serialVersionUID = 0L; public DuplicatedOptionException(String duplicatedOption) { - super("option " + duplicatedOption + " already exsits!"); + super("option " + duplicatedOption + " already exists!"); } } } diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/rawcoder/util/GF256.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/rawcoder/util/GF256.java index 03e21b6089..35534f307a 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/rawcoder/util/GF256.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/rawcoder/util/GF256.java @@ -221,7 +221,7 @@ public static void gfInvertMatrix(byte[] inMatrix, byte[] outMatrix, int n) { } if (j == n) { // Couldn't find means it's singular - throw new RuntimeException("Not invertble"); + throw new RuntimeException("Not invertible"); } for (int k = 0; k < n; k++) { diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/file/tfile/TFile.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/file/tfile/TFile.java index f17be1ab90..56739c6c7e 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/file/tfile/TFile.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/file/tfile/TFile.java @@ -1789,7 +1789,7 @@ public int getKey(byte[] buf) throws IOException { public int getKey(byte[] buf, int offset) throws IOException { if ((offset | (buf.length - offset - klen)) < 0) { throw new IndexOutOfBoundsException( - "Bufer not enough to store the key"); + "Buffer not enough to store the key"); } System.arraycopy(keyBuffer, 0, buf, offset, klen); return klen; diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/file/tfile/Utils.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/file/tfile/Utils.java index 12148efa34..5743c66798 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/file/tfile/Utils.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/file/tfile/Utils.java @@ -153,7 +153,7 @@ public static void writeVLong(DataOutput out, long n) throws IOException { out.writeLong(n); return; default: - throw new RuntimeException("Internel error"); + throw new RuntimeException("Internal error"); } } diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/net/NetworkTopology.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/net/NetworkTopology.java index 0e6c253c5b..14c870d7c3 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/net/NetworkTopology.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/net/NetworkTopology.java @@ -169,7 +169,7 @@ boolean add(Node n) { if (!isAncestor(n)) { throw new IllegalArgumentException(n.getName() + ", which is located at " + n.getNetworkLocation() - + ", is not a descendent of " + getPath(this)); + + ", is not a descendant of " + getPath(this)); } if (isParent(n)) { // this node is the parent of n; add n directly @@ -231,7 +231,7 @@ boolean remove(Node n) { if (!isAncestor(n)) { throw new IllegalArgumentException(n.getName() + ", which is located at " + n.getNetworkLocation() - + ", is not a descendent of " + getPath(this)); + + ", is not a descendant of " + getPath(this)); } if (isParent(n)) { // this node is the parent of n; remove n directly diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/KDiag.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/KDiag.java index 542a502912..c8d0b334d3 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/KDiag.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/KDiag.java @@ -593,7 +593,7 @@ private void dumpKeytab(File keytabFile) throws IOException { Keytab loadKeytab = Keytab.loadKeytab(kt); List principals = loadKeytab.getPrincipals(); - println("keytab princial count: %d", principals.size()); + println("keytab principal count: %d", principals.size()); int entrySize = 0; for (PrincipalName princ : principals) { List entries = loadKeytab.getKeytabEntries(princ); diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/alias/LocalJavaKeyStoreProvider.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/alias/LocalJavaKeyStoreProvider.java index 1891cd33bc..9ea9a57965 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/alias/LocalJavaKeyStoreProvider.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/alias/LocalJavaKeyStoreProvider.java @@ -151,7 +151,7 @@ protected void initFileSystem(URI uri) public void flush() throws IOException { super.flush(); if (LOG.isDebugEnabled()) { - LOG.debug("Reseting permissions to '" + permissions + "'"); + LOG.debug("Resetting permissions to '" + permissions + "'"); } if (!Shell.WINDOWS) { Files.setPosixFilePermissions(Paths.get(file.getCanonicalPath()),