From 5be6722b85c27cb529370eab29403c771c217ff0 Mon Sep 17 00:00:00 2001 From: Shubham Chaurasia Date: Mon, 16 Feb 2015 21:22:43 +0530 Subject: [PATCH] Fixed bug JUM-80: Need to refactor some classes related to validations to make them inheritable --- common/pom.xml | 2 +- .../main/java/org/jumbune/common/utils/HadoopLogParser.java | 2 +- .../yarn => yarn/utils}/DecoratedJobHistoryParser.java | 2 +- .../{utils/yarn => yarn/utils}/YarnJobStatsUtility.java | 6 +++--- utilities/pom.xml | 2 +- .../yarn => yarn/utils}/ApplicationHistoryClient.java | 2 +- .../{utils/yarn => yarn/utils}/ApplicationMasterClient.java | 2 +- .../yarn => yarn/utils}/ApplicationMasterContract.java | 2 +- .../jumbune/{utils/yarn => yarn/utils}/ClientRMProxy.java | 2 +- .../utils}/ContainerManagementProtocolProxy.java | 2 +- .../{utils/yarn => yarn/utils}/ContainerRequest.java | 2 +- .../org/jumbune/{utils/yarn => yarn/utils}/NMClient.java | 4 ++-- .../jumbune/{utils/yarn => yarn/utils}/NMTokenCache.java | 2 +- .../{utils/yarn => yarn/utils}/RMFailoverProxyProvider.java | 2 +- .../org/jumbune/{utils/yarn => yarn/utils}/RMProxy.java | 2 +- .../jumbune/{utils/yarn => yarn/utils}/RackResolver.java | 2 +- .../org/jumbune/{utils/yarn => yarn/utils}/YarnClient.java | 2 +- .../{utils/yarn => yarn/utils}/YarnClientApplication.java | 2 +- .../yarn => yarn/utils}/YarnExecutionCommandsBuilder.java | 2 +- .../jumbune/{utils/yarn => yarn/utils}/YarnOperations.java | 2 +- .../org/jumbune/{utils/yarn => yarn/utils}/YarnRPC.java | 2 +- .../yarn => yarn/utils}/client/ApplicationMaster.java | 2 +- .../yarn => yarn/utils}/client/YarnClientDecorator.java | 2 +- 23 files changed, 26 insertions(+), 26 deletions(-) rename common/src/main/java/org/jumbune/common/{utils/yarn => yarn/utils}/DecoratedJobHistoryParser.java (99%) rename common/src/main/java/org/jumbune/common/{utils/yarn => yarn/utils}/YarnJobStatsUtility.java (99%) rename utilities/src/main/java/org/jumbune/{utils/yarn => yarn/utils}/ApplicationHistoryClient.java (99%) rename utilities/src/main/java/org/jumbune/{utils/yarn => yarn/utils}/ApplicationMasterClient.java (99%) rename utilities/src/main/java/org/jumbune/{utils/yarn => yarn/utils}/ApplicationMasterContract.java (97%) rename utilities/src/main/java/org/jumbune/{utils/yarn => yarn/utils}/ClientRMProxy.java (99%) rename utilities/src/main/java/org/jumbune/{utils/yarn => yarn/utils}/ContainerManagementProtocolProxy.java (99%) rename utilities/src/main/java/org/jumbune/{utils/yarn => yarn/utils}/ContainerRequest.java (98%) rename utilities/src/main/java/org/jumbune/{utils/yarn => yarn/utils}/NMClient.java (99%) rename utilities/src/main/java/org/jumbune/{utils/yarn => yarn/utils}/NMTokenCache.java (99%) rename utilities/src/main/java/org/jumbune/{utils/yarn => yarn/utils}/RMFailoverProxyProvider.java (94%) rename utilities/src/main/java/org/jumbune/{utils/yarn => yarn/utils}/RMProxy.java (99%) rename utilities/src/main/java/org/jumbune/{utils/yarn => yarn/utils}/RackResolver.java (99%) rename utilities/src/main/java/org/jumbune/{utils/yarn => yarn/utils}/YarnClient.java (99%) rename utilities/src/main/java/org/jumbune/{utils/yarn => yarn/utils}/YarnClientApplication.java (96%) rename utilities/src/main/java/org/jumbune/{utils/yarn => yarn/utils}/YarnExecutionCommandsBuilder.java (98%) rename utilities/src/main/java/org/jumbune/{utils/yarn => yarn/utils}/YarnOperations.java (98%) rename utilities/src/main/java/org/jumbune/{utils/yarn => yarn/utils}/YarnRPC.java (98%) rename utilities/src/main/java/org/jumbune/{utils/yarn => yarn/utils}/client/ApplicationMaster.java (98%) rename utilities/src/main/java/org/jumbune/{utils/yarn => yarn/utils}/client/YarnClientDecorator.java (99%) diff --git a/common/pom.xml b/common/pom.xml index 9adc65b1..c9f1bc14 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -39,7 +39,7 @@ maven-compiler-plugin - org/jumbune/common/utils/yarn/**/* + org/jumbune/common/yarn/utils/**/* diff --git a/common/src/main/java/org/jumbune/common/utils/HadoopLogParser.java b/common/src/main/java/org/jumbune/common/utils/HadoopLogParser.java index 27ced6f4..4ac9fb60 100644 --- a/common/src/main/java/org/jumbune/common/utils/HadoopLogParser.java +++ b/common/src/main/java/org/jumbune/common/utils/HadoopLogParser.java @@ -86,7 +86,7 @@ public class HadoopLogParser { /** The Constant RUMEN_MAIN_CLASS_OLD. */ private static final String RUMEN_MAIN_CLASS_OLD = "org.jumbune.org.apache.hadoop.tools.rumen.TraceBuilder"; - private static final String YARN_JOB_STATS_UTILITY_CLASS = "org.jumbune.common.utils.yarn.YarnJobStatsUtility"; + private static final String YARN_JOB_STATS_UTILITY_CLASS = "org.jumbune.common.yarn.utils.YarnJobStatsUtility"; private static final String YARN_JOB_STATS_UTILITY_CLASS_PARSE_METHOD = "parseAndGetJobStats"; diff --git a/common/src/main/java/org/jumbune/common/utils/yarn/DecoratedJobHistoryParser.java b/common/src/main/java/org/jumbune/common/yarn/utils/DecoratedJobHistoryParser.java similarity index 99% rename from common/src/main/java/org/jumbune/common/utils/yarn/DecoratedJobHistoryParser.java rename to common/src/main/java/org/jumbune/common/yarn/utils/DecoratedJobHistoryParser.java index 9bfe0813..b0c8c8d5 100644 --- a/common/src/main/java/org/jumbune/common/utils/yarn/DecoratedJobHistoryParser.java +++ b/common/src/main/java/org/jumbune/common/yarn/utils/DecoratedJobHistoryParser.java @@ -1,4 +1,4 @@ -package org.jumbune.common.utils.yarn; +package org.jumbune.common.yarn.utils; import java.io.IOException; import java.util.Arrays; diff --git a/common/src/main/java/org/jumbune/common/utils/yarn/YarnJobStatsUtility.java b/common/src/main/java/org/jumbune/common/yarn/utils/YarnJobStatsUtility.java similarity index 99% rename from common/src/main/java/org/jumbune/common/utils/yarn/YarnJobStatsUtility.java rename to common/src/main/java/org/jumbune/common/yarn/utils/YarnJobStatsUtility.java index f35b7490..75f559df 100644 --- a/common/src/main/java/org/jumbune/common/utils/yarn/YarnJobStatsUtility.java +++ b/common/src/main/java/org/jumbune/common/yarn/utils/YarnJobStatsUtility.java @@ -1,4 +1,4 @@ -package org.jumbune.common.utils.yarn; +package org.jumbune.common.yarn.utils; @@ -30,8 +30,8 @@ import org.jumbune.common.beans.ResourceUsageMetrics; import org.jumbune.common.beans.TaskOutputDetails; import org.jumbune.common.utils.Constants; -import org.jumbune.common.utils.yarn.DecoratedJobHistoryParser.AdditionalJobInfo; -import org.jumbune.common.utils.yarn.DecoratedJobHistoryParser.AdditionalTaskInfo; +import org.jumbune.common.yarn.utils.DecoratedJobHistoryParser.AdditionalJobInfo; +import org.jumbune.common.yarn.utils.DecoratedJobHistoryParser.AdditionalTaskInfo; /** diff --git a/utilities/pom.xml b/utilities/pom.xml index c70863d2..78baa837 100644 --- a/utilities/pom.xml +++ b/utilities/pom.xml @@ -37,7 +37,7 @@ maven-compiler-plugin - org/jumbune/utils/yarn/**/* + org/jumbune/yarn/utils/**/* diff --git a/utilities/src/main/java/org/jumbune/utils/yarn/ApplicationHistoryClient.java b/utilities/src/main/java/org/jumbune/yarn/utils/ApplicationHistoryClient.java similarity index 99% rename from utilities/src/main/java/org/jumbune/utils/yarn/ApplicationHistoryClient.java rename to utilities/src/main/java/org/jumbune/yarn/utils/ApplicationHistoryClient.java index 42cb9d86..717a3fb6 100644 --- a/utilities/src/main/java/org/jumbune/utils/yarn/ApplicationHistoryClient.java +++ b/utilities/src/main/java/org/jumbune/yarn/utils/ApplicationHistoryClient.java @@ -1,4 +1,4 @@ -package org.jumbune.utils.yarn; +package org.jumbune.yarn.utils; import java.io.IOException; import java.net.InetSocketAddress; diff --git a/utilities/src/main/java/org/jumbune/utils/yarn/ApplicationMasterClient.java b/utilities/src/main/java/org/jumbune/yarn/utils/ApplicationMasterClient.java similarity index 99% rename from utilities/src/main/java/org/jumbune/utils/yarn/ApplicationMasterClient.java rename to utilities/src/main/java/org/jumbune/yarn/utils/ApplicationMasterClient.java index 3e4387fd..fc4975d0 100644 --- a/utilities/src/main/java/org/jumbune/utils/yarn/ApplicationMasterClient.java +++ b/utilities/src/main/java/org/jumbune/yarn/utils/ApplicationMasterClient.java @@ -1,4 +1,4 @@ -package org.jumbune.utils.yarn; +package org.jumbune.yarn.utils; import java.io.IOException; import java.util.ArrayList; diff --git a/utilities/src/main/java/org/jumbune/utils/yarn/ApplicationMasterContract.java b/utilities/src/main/java/org/jumbune/yarn/utils/ApplicationMasterContract.java similarity index 97% rename from utilities/src/main/java/org/jumbune/utils/yarn/ApplicationMasterContract.java rename to utilities/src/main/java/org/jumbune/yarn/utils/ApplicationMasterContract.java index f4c006a5..d8383580 100644 --- a/utilities/src/main/java/org/jumbune/utils/yarn/ApplicationMasterContract.java +++ b/utilities/src/main/java/org/jumbune/yarn/utils/ApplicationMasterContract.java @@ -1,4 +1,4 @@ -package org.jumbune.utils.yarn; +package org.jumbune.yarn.utils; import java.io.IOException; import java.util.Collection; diff --git a/utilities/src/main/java/org/jumbune/utils/yarn/ClientRMProxy.java b/utilities/src/main/java/org/jumbune/yarn/utils/ClientRMProxy.java similarity index 99% rename from utilities/src/main/java/org/jumbune/utils/yarn/ClientRMProxy.java rename to utilities/src/main/java/org/jumbune/yarn/utils/ClientRMProxy.java index 5ea287c9..69551cfd 100644 --- a/utilities/src/main/java/org/jumbune/utils/yarn/ClientRMProxy.java +++ b/utilities/src/main/java/org/jumbune/yarn/utils/ClientRMProxy.java @@ -1,4 +1,4 @@ -package org.jumbune.utils.yarn; +package org.jumbune.yarn.utils; import java.io.IOException; import java.net.InetSocketAddress; diff --git a/utilities/src/main/java/org/jumbune/utils/yarn/ContainerManagementProtocolProxy.java b/utilities/src/main/java/org/jumbune/yarn/utils/ContainerManagementProtocolProxy.java similarity index 99% rename from utilities/src/main/java/org/jumbune/utils/yarn/ContainerManagementProtocolProxy.java rename to utilities/src/main/java/org/jumbune/yarn/utils/ContainerManagementProtocolProxy.java index 42ddead4..e0d7aee2 100644 --- a/utilities/src/main/java/org/jumbune/utils/yarn/ContainerManagementProtocolProxy.java +++ b/utilities/src/main/java/org/jumbune/yarn/utils/ContainerManagementProtocolProxy.java @@ -1,4 +1,4 @@ -package org.jumbune.utils.yarn; +package org.jumbune.yarn.utils; import java.net.InetSocketAddress; import java.security.PrivilegedAction; diff --git a/utilities/src/main/java/org/jumbune/utils/yarn/ContainerRequest.java b/utilities/src/main/java/org/jumbune/yarn/utils/ContainerRequest.java similarity index 98% rename from utilities/src/main/java/org/jumbune/utils/yarn/ContainerRequest.java rename to utilities/src/main/java/org/jumbune/yarn/utils/ContainerRequest.java index 3cc7902c..859b9d02 100644 --- a/utilities/src/main/java/org/jumbune/utils/yarn/ContainerRequest.java +++ b/utilities/src/main/java/org/jumbune/yarn/utils/ContainerRequest.java @@ -1,4 +1,4 @@ -package org.jumbune.utils.yarn; +package org.jumbune.yarn.utils; import java.util.Arrays; import java.util.List; diff --git a/utilities/src/main/java/org/jumbune/utils/yarn/NMClient.java b/utilities/src/main/java/org/jumbune/yarn/utils/NMClient.java similarity index 99% rename from utilities/src/main/java/org/jumbune/utils/yarn/NMClient.java rename to utilities/src/main/java/org/jumbune/yarn/utils/NMClient.java index 8879bda5..97f3c166 100644 --- a/utilities/src/main/java/org/jumbune/utils/yarn/NMClient.java +++ b/utilities/src/main/java/org/jumbune/yarn/utils/NMClient.java @@ -1,4 +1,4 @@ -package org.jumbune.utils.yarn; +package org.jumbune.yarn.utils; import java.io.IOException; import java.nio.ByteBuffer; @@ -30,7 +30,7 @@ import org.apache.hadoop.yarn.ipc.RPCUtil; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -import org.jumbune.utils.yarn.ContainerManagementProtocolProxy.ContainerManagementProtocolProxyData; +import org.jumbune.yarn.utils.ContainerManagementProtocolProxy.ContainerManagementProtocolProxyData; public class NMClient extends AbstractService{ diff --git a/utilities/src/main/java/org/jumbune/utils/yarn/NMTokenCache.java b/utilities/src/main/java/org/jumbune/yarn/utils/NMTokenCache.java similarity index 99% rename from utilities/src/main/java/org/jumbune/utils/yarn/NMTokenCache.java rename to utilities/src/main/java/org/jumbune/yarn/utils/NMTokenCache.java index 91e08072..7c2ade39 100644 --- a/utilities/src/main/java/org/jumbune/utils/yarn/NMTokenCache.java +++ b/utilities/src/main/java/org/jumbune/yarn/utils/NMTokenCache.java @@ -1,4 +1,4 @@ -package org.jumbune.utils.yarn; +package org.jumbune.yarn.utils; import java.util.concurrent.ConcurrentHashMap; diff --git a/utilities/src/main/java/org/jumbune/utils/yarn/RMFailoverProxyProvider.java b/utilities/src/main/java/org/jumbune/yarn/utils/RMFailoverProxyProvider.java similarity index 94% rename from utilities/src/main/java/org/jumbune/utils/yarn/RMFailoverProxyProvider.java rename to utilities/src/main/java/org/jumbune/yarn/utils/RMFailoverProxyProvider.java index 53497213..147b35b6 100644 --- a/utilities/src/main/java/org/jumbune/utils/yarn/RMFailoverProxyProvider.java +++ b/utilities/src/main/java/org/jumbune/yarn/utils/RMFailoverProxyProvider.java @@ -1,4 +1,4 @@ -package org.jumbune.utils.yarn; +package org.jumbune.yarn.utils; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.io.retry.FailoverProxyProvider; diff --git a/utilities/src/main/java/org/jumbune/utils/yarn/RMProxy.java b/utilities/src/main/java/org/jumbune/yarn/utils/RMProxy.java similarity index 99% rename from utilities/src/main/java/org/jumbune/utils/yarn/RMProxy.java rename to utilities/src/main/java/org/jumbune/yarn/utils/RMProxy.java index 44a6d25a..c55f61cb 100644 --- a/utilities/src/main/java/org/jumbune/utils/yarn/RMProxy.java +++ b/utilities/src/main/java/org/jumbune/yarn/utils/RMProxy.java @@ -1,4 +1,4 @@ -package org.jumbune.utils.yarn; +package org.jumbune.yarn.utils; import java.io.IOException; import java.net.ConnectException; diff --git a/utilities/src/main/java/org/jumbune/utils/yarn/RackResolver.java b/utilities/src/main/java/org/jumbune/yarn/utils/RackResolver.java similarity index 99% rename from utilities/src/main/java/org/jumbune/utils/yarn/RackResolver.java rename to utilities/src/main/java/org/jumbune/yarn/utils/RackResolver.java index 820fd143..4ebc43a0 100644 --- a/utilities/src/main/java/org/jumbune/utils/yarn/RackResolver.java +++ b/utilities/src/main/java/org/jumbune/yarn/utils/RackResolver.java @@ -1,4 +1,4 @@ -package org.jumbune.utils.yarn; +package org.jumbune.yarn.utils; import java.util.ArrayList; import java.util.List; diff --git a/utilities/src/main/java/org/jumbune/utils/yarn/YarnClient.java b/utilities/src/main/java/org/jumbune/yarn/utils/YarnClient.java similarity index 99% rename from utilities/src/main/java/org/jumbune/utils/yarn/YarnClient.java rename to utilities/src/main/java/org/jumbune/yarn/utils/YarnClient.java index 2e6e6587..00104042 100644 --- a/utilities/src/main/java/org/jumbune/utils/yarn/YarnClient.java +++ b/utilities/src/main/java/org/jumbune/yarn/utils/YarnClient.java @@ -1,4 +1,4 @@ -package org.jumbune.utils.yarn; +package org.jumbune.yarn.utils; import java.io.File; import java.io.IOException; diff --git a/utilities/src/main/java/org/jumbune/utils/yarn/YarnClientApplication.java b/utilities/src/main/java/org/jumbune/yarn/utils/YarnClientApplication.java similarity index 96% rename from utilities/src/main/java/org/jumbune/utils/yarn/YarnClientApplication.java rename to utilities/src/main/java/org/jumbune/yarn/utils/YarnClientApplication.java index 0097f871..235524a2 100644 --- a/utilities/src/main/java/org/jumbune/utils/yarn/YarnClientApplication.java +++ b/utilities/src/main/java/org/jumbune/yarn/utils/YarnClientApplication.java @@ -1,4 +1,4 @@ -package org.jumbune.utils.yarn; +package org.jumbune.yarn.utils; import org.apache.hadoop.yarn.api.protocolrecords.GetNewApplicationResponse; import org.apache.hadoop.yarn.api.records.ApplicationSubmissionContext; diff --git a/utilities/src/main/java/org/jumbune/utils/yarn/YarnExecutionCommandsBuilder.java b/utilities/src/main/java/org/jumbune/yarn/utils/YarnExecutionCommandsBuilder.java similarity index 98% rename from utilities/src/main/java/org/jumbune/utils/yarn/YarnExecutionCommandsBuilder.java rename to utilities/src/main/java/org/jumbune/yarn/utils/YarnExecutionCommandsBuilder.java index c061320d..078ebdc9 100644 --- a/utilities/src/main/java/org/jumbune/utils/yarn/YarnExecutionCommandsBuilder.java +++ b/utilities/src/main/java/org/jumbune/yarn/utils/YarnExecutionCommandsBuilder.java @@ -1,4 +1,4 @@ -package org.jumbune.utils.yarn; +package org.jumbune.yarn.utils; public class YarnExecutionCommandsBuilder { diff --git a/utilities/src/main/java/org/jumbune/utils/yarn/YarnOperations.java b/utilities/src/main/java/org/jumbune/yarn/utils/YarnOperations.java similarity index 98% rename from utilities/src/main/java/org/jumbune/utils/yarn/YarnOperations.java rename to utilities/src/main/java/org/jumbune/yarn/utils/YarnOperations.java index 91dfe659..a34e3510 100644 --- a/utilities/src/main/java/org/jumbune/utils/yarn/YarnOperations.java +++ b/utilities/src/main/java/org/jumbune/yarn/utils/YarnOperations.java @@ -1,4 +1,4 @@ -package org.jumbune.utils.yarn; +package org.jumbune.yarn.utils; import java.io.IOException; import java.util.List; diff --git a/utilities/src/main/java/org/jumbune/utils/yarn/YarnRPC.java b/utilities/src/main/java/org/jumbune/yarn/utils/YarnRPC.java similarity index 98% rename from utilities/src/main/java/org/jumbune/utils/yarn/YarnRPC.java rename to utilities/src/main/java/org/jumbune/yarn/utils/YarnRPC.java index 847501ab..3e116f92 100644 --- a/utilities/src/main/java/org/jumbune/utils/yarn/YarnRPC.java +++ b/utilities/src/main/java/org/jumbune/yarn/utils/YarnRPC.java @@ -1,4 +1,4 @@ -package org.jumbune.utils.yarn; +package org.jumbune.yarn.utils; import java.net.InetSocketAddress; diff --git a/utilities/src/main/java/org/jumbune/utils/yarn/client/ApplicationMaster.java b/utilities/src/main/java/org/jumbune/yarn/utils/client/ApplicationMaster.java similarity index 98% rename from utilities/src/main/java/org/jumbune/utils/yarn/client/ApplicationMaster.java rename to utilities/src/main/java/org/jumbune/yarn/utils/client/ApplicationMaster.java index 7720ca6d..07ff489d 100644 --- a/utilities/src/main/java/org/jumbune/utils/yarn/client/ApplicationMaster.java +++ b/utilities/src/main/java/org/jumbune/yarn/utils/client/ApplicationMaster.java @@ -1,4 +1,4 @@ -package org.jumbune.utils.yarn.client; +package org.jumbune.yarn.utils.client; import java.util.ArrayList; import java.util.Arrays; diff --git a/utilities/src/main/java/org/jumbune/utils/yarn/client/YarnClientDecorator.java b/utilities/src/main/java/org/jumbune/yarn/utils/client/YarnClientDecorator.java similarity index 99% rename from utilities/src/main/java/org/jumbune/utils/yarn/client/YarnClientDecorator.java rename to utilities/src/main/java/org/jumbune/yarn/utils/client/YarnClientDecorator.java index 60105e23..8fc1ac30 100644 --- a/utilities/src/main/java/org/jumbune/utils/yarn/client/YarnClientDecorator.java +++ b/utilities/src/main/java/org/jumbune/yarn/utils/client/YarnClientDecorator.java @@ -1,4 +1,4 @@ -package org.jumbune.utils.yarn.client; +package org.jumbune.yarn.utils.client; import java.io.File; import java.io.IOException;