From 2fa7963c3d8cdfc65f90efabc6fe51a160be5c78 Mon Sep 17 00:00:00 2001 From: Arpit Agarwal Date: Sat, 24 Feb 2018 14:41:55 -0800 Subject: [PATCH] HADOOP-15254. Correct the wrong word spelling 'intialize'. Contributed by fang zhenyi. --- .../main/java/org/apache/hadoop/log/Log4Json.java | 2 +- .../hadoop/crypto/key/kms/server/KMSWebApp.java | 2 +- .../federation/store/driver/StateStoreDriver.java | 2 +- .../web/resources/NamenodeWebHdfsMethods.java | 2 +- .../web/resources/TestWebHdfsDataLocality.java | 2 +- .../apache/hadoop/mapreduce/v2/app/MRAppMaster.java | 2 +- .../apache/hadoop/mapreduce/v2/hs/JobHistory.java | 2 +- .../java/org/apache/hadoop/streaming/StreamJob.java | 2 +- .../QueuePriorityContainerCandidateSelector.java | 4 ++-- .../resourcemanager/TestResourceTrackerService.java | 12 ++++++------ 10 files changed, 16 insertions(+), 16 deletions(-) diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/log/Log4Json.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/log/Log4Json.java index a2bbbfc2d8..68cf680a02 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/log/Log4Json.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/log/Log4Json.java @@ -103,7 +103,7 @@ public class Log4Json extends Layout { /** * Jackson factories are thread safe when constructing parsers and generators. * They are not thread safe in configure methods; if there is to be any - * configuration it must be done in a static intializer block. + * configuration it must be done in a static initializer block. */ private static final JsonFactory factory = new MappingJsonFactory(); private static final ObjectReader READER = new ObjectMapper(factory).reader(); diff --git a/hadoop-common-project/hadoop-kms/src/main/java/org/apache/hadoop/crypto/key/kms/server/KMSWebApp.java b/hadoop-common-project/hadoop-kms/src/main/java/org/apache/hadoop/crypto/key/kms/server/KMSWebApp.java index 9a71fa20ae..1817a13a77 100644 --- a/hadoop-common-project/hadoop-kms/src/main/java/org/apache/hadoop/crypto/key/kms/server/KMSWebApp.java +++ b/hadoop-common-project/hadoop-kms/src/main/java/org/apache/hadoop/crypto/key/kms/server/KMSWebApp.java @@ -152,7 +152,7 @@ public void contextInitialized(ServletContextEvent sce) { kmsAudit = new KMSAudit(kmsConf); - // intializing the KeyProvider + // initializing the KeyProvider String providerString = kmsConf.get(KMSConfiguration.KEY_PROVIDER_URI); if (providerString == null) { throw new IllegalStateException("No KeyProvider has been defined"); diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/federation/store/driver/StateStoreDriver.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/federation/store/driver/StateStoreDriver.java index c9b1ce6900..d595a97d01 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/federation/store/driver/StateStoreDriver.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/federation/store/driver/StateStoreDriver.java @@ -73,7 +73,7 @@ public boolean init(final Configuration config, final String id, boolean success = initDriver(); if (!success) { - LOG.error("Cannot intialize driver for {}", getDriverName()); + LOG.error("Cannot initialize driver for {}", getDriverName()); return false; } diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/web/resources/NamenodeWebHdfsMethods.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/web/resources/NamenodeWebHdfsMethods.java index 5cb958a3ec..f186169eaa 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/web/resources/NamenodeWebHdfsMethods.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/web/resources/NamenodeWebHdfsMethods.java @@ -240,7 +240,7 @@ static DatanodeInfo chooseDatanode(final NameNode namenode, final String remoteAddr, final HdfsFileStatus status) throws IOException { FSNamesystem fsn = namenode.getNamesystem(); if (fsn == null) { - throw new IOException("Namesystem has not been intialized yet."); + throw new IOException("Namesystem has not been initialized yet."); } final BlockManager bm = fsn.getBlockManager(); diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/web/resources/TestWebHdfsDataLocality.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/web/resources/TestWebHdfsDataLocality.java index 759719d6c3..d00ed62a0a 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/web/resources/TestWebHdfsDataLocality.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/web/resources/TestWebHdfsDataLocality.java @@ -243,7 +243,7 @@ public void testChooseDatanodeBeforeNamesystemInit() throws Exception { NameNode nn = mock(NameNode.class); when(nn.getNamesystem()).thenReturn(null); exception.expect(IOException.class); - exception.expectMessage("Namesystem has not been intialized yet."); + exception.expectMessage("Namesystem has not been initialized yet."); NamenodeWebHdfsMethods.chooseDatanode(nn, "/path", PutOpParam.Op.CREATE, 0, DFSConfigKeys.DFS_BLOCK_SIZE_DEFAULT, null, LOCALHOST, null); } diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/MRAppMaster.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/MRAppMaster.java index cb65b89f87..def987207a 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/MRAppMaster.java +++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/MRAppMaster.java @@ -1255,7 +1255,7 @@ protected void serviceStart() throws Exception { boolean initFailed = false; if (!errorHappenedShutDown) { - // create a job event for job intialization + // create a job event for job initialization JobEvent initJobEvent = new JobEvent(job.getID(), JobEventType.JOB_INIT); // Send init to the job (this does NOT trigger job execution) // This is a synchronous call, not an event through dispatcher. We want diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/JobHistory.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/JobHistory.java index 2d263dd739..a7d1370b16 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/JobHistory.java +++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/JobHistory.java @@ -98,7 +98,7 @@ protected void serviceInit(Configuration conf) throws Exception { try { hsManager.initExisting(); } catch (IOException e) { - throw new YarnRuntimeException("Failed to intialize existing directories", e); + throw new YarnRuntimeException("Failed to initialize existing directories", e); } storage = createHistoryStorage(); diff --git a/hadoop-tools/hadoop-streaming/src/main/java/org/apache/hadoop/streaming/StreamJob.java b/hadoop-tools/hadoop-streaming/src/main/java/org/apache/hadoop/streaming/StreamJob.java index 0b239d0ea4..9b09729741 100644 --- a/hadoop-tools/hadoop-streaming/src/main/java/org/apache/hadoop/streaming/StreamJob.java +++ b/hadoop-tools/hadoop-streaming/src/main/java/org/apache/hadoop/streaming/StreamJob.java @@ -154,7 +154,7 @@ static public JobConf createJob(String[] argv) throws IOException { /** * This is the method that actually - * intializes the job conf and submits the job + * initializes the job conf and submits the job * to the jobtracker * @throws IOException * @deprecated use {@link #run(String[])} instead. diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/monitor/capacity/QueuePriorityContainerCandidateSelector.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/monitor/capacity/QueuePriorityContainerCandidateSelector.java index d75f329c17..4a169af1a5 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/monitor/capacity/QueuePriorityContainerCandidateSelector.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/monitor/capacity/QueuePriorityContainerCandidateSelector.java @@ -117,7 +117,7 @@ private List getPathToRoot(TempQueuePerPartition tq) { return list; } - private void intializePriorityDigraph() { + private void initializePriorityDigraph() { if (LOG.isDebugEnabled()) { LOG.debug("Initializing priority preemption directed graph:"); } @@ -383,7 +383,7 @@ public Map> selectCandidates( // Initialize digraph from queues // TODO (wangda): only do this when queue refreshed. priorityDigraph.clear(); - intializePriorityDigraph(); + initializePriorityDigraph(); // When all queues are set to same priority, or priority is not respected, // direct return. diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/TestResourceTrackerService.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/TestResourceTrackerService.java index de8f8f646b..fa0f5fd7a4 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/TestResourceTrackerService.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/TestResourceTrackerService.java @@ -540,7 +540,7 @@ protected RMNodeLabelsManager createNodeLabelManager() { try { nodeLabelsMgr.addToCluserNodeLabelsWithDefaultExclusivity(toSet("A", "B", "C")); } catch (IOException e) { - Assert.fail("Caught Exception while intializing"); + Assert.fail("Caught Exception while initializing"); e.printStackTrace(); } @@ -589,7 +589,7 @@ protected RMNodeLabelsManager createNodeLabelManager() { try { nodeLabelsMgr.addToCluserNodeLabelsWithDefaultExclusivity(toSet("X", "Y", "Z")); } catch (IOException e) { - Assert.fail("Caught Exception while intializing"); + Assert.fail("Caught Exception while initializing"); e.printStackTrace(); } @@ -642,7 +642,7 @@ protected RMNodeLabelsManager createNodeLabelManager() { try { nodeLabelsMgr.addToCluserNodeLabelsWithDefaultExclusivity(toSet("X", "Y", "Z")); } catch (IOException e) { - Assert.fail("Caught Exception while intializing"); + Assert.fail("Caught Exception while initializing"); e.printStackTrace(); } @@ -694,7 +694,7 @@ protected RMNodeLabelsManager createNodeLabelManager() { try { nodeLabelsMgr.addToCluserNodeLabelsWithDefaultExclusivity(toSet("A", "B", "C")); } catch (IOException e) { - Assert.fail("Caught Exception while intializing"); + Assert.fail("Caught Exception while initializing"); e.printStackTrace(); } ResourceTrackerService resourceTrackerService = @@ -754,7 +754,7 @@ protected RMNodeLabelsManager createNodeLabelManager() { try { nodeLabelsMgr.addToCluserNodeLabelsWithDefaultExclusivity(toSet("A", "B", "C")); } catch (IOException e) { - Assert.fail("Caught Exception while intializing"); + Assert.fail("Caught Exception while initializing"); e.printStackTrace(); } @@ -839,7 +839,7 @@ protected RMNodeLabelsManager createNodeLabelManager() { try { nodeLabelsMgr.addToCluserNodeLabelsWithDefaultExclusivity(toSet("A", "B", "C")); } catch (IOException e) { - Assert.fail("Caught Exception while intializing"); + Assert.fail("Caught Exception while initializing"); e.printStackTrace(); }