hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rohithsharm...@apache.org
Subject [15/50] [abbrv] hadoop git commit: YARN-7985. Removed duplicate service name validation in Yarn Service. Contributed by Chandni Singh
Date Fri, 02 Mar 2018 05:47:53 GMT
YARN-7985.  Removed duplicate service name validation in Yarn Service.
            Contributed by Chandni Singh


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

Branch: refs/heads/YARN-7055
Commit: e15126be426d54d8f43a2c4822b42fc2dddcb07d
Parents: 4fe4f18
Author: Eric Yang <eyang@apache.org>
Authored: Wed Feb 28 20:48:55 2018 -0500
Committer: Rohith Sharma K S <rohithsharmaks@apache.org>
Committed: Fri Mar 2 11:08:28 2018 +0530

----------------------------------------------------------------------
 .../org/apache/hadoop/yarn/service/ServiceClientTest.java     | 7 ++++---
 .../org/apache/hadoop/yarn/service/client/ServiceClient.java  | 1 -
 2 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/e15126be/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-services-api/src/test/java/org/apache/hadoop/yarn/service/ServiceClientTest.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-services-api/src/test/java/org/apache/hadoop/yarn/service/ServiceClientTest.java
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-services-api/src/test/java/org/apache/hadoop/yarn/service/ServiceClientTest.java
index 8e5fd5c..5d959da 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-services-api/src/test/java/org/apache/hadoop/yarn/service/ServiceClientTest.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-services-api/src/test/java/org/apache/hadoop/yarn/service/ServiceClientTest.java
@@ -26,6 +26,7 @@ import org.apache.hadoop.yarn.exceptions.YarnException;
 import org.apache.hadoop.yarn.service.api.records.Service;
 import org.apache.hadoop.yarn.service.client.ServiceClient;
 import org.apache.hadoop.yarn.service.utils.ServiceApiUtil;
+import org.apache.hadoop.yarn.service.utils.SliderFileSystem;
 
 /**
  * A mock version of ServiceClient - This class is design
@@ -49,9 +50,9 @@ public class ServiceClientTest extends ServiceClient {
   }
 
   @Override
-  public ApplicationId actionCreate(Service service) {
-    String serviceName = service.getName();
-    ServiceApiUtil.validateNameFormat(serviceName, getConfig());
+  public ApplicationId actionCreate(Service service) throws IOException {
+    ServiceApiUtil.validateAndResolveService(service,
+        new SliderFileSystem(conf), getConfig());
     return ApplicationId.newInstance(System.currentTimeMillis(), 1);
   }
 

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e15126be/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-services/hadoop-yarn-services-core/src/main/java/org/apache/hadoop/yarn/service/client/ServiceClient.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-services/hadoop-yarn-services-core/src/main/java/org/apache/hadoop/yarn/service/client/ServiceClient.java
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-services/hadoop-yarn-services-core/src/main/java/org/apache/hadoop/yarn/service/client/ServiceClient.java
index f5e21ab..5731e11 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-services/hadoop-yarn-services-core/src/main/java/org/apache/hadoop/yarn/service/client/ServiceClient.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-services/hadoop-yarn-services-core/src/main/java/org/apache/hadoop/yarn/service/client/ServiceClient.java
@@ -210,7 +210,6 @@ public class ServiceClient extends AppAdminClient implements SliderExitCodes,
   public ApplicationId actionCreate(Service service)
       throws IOException, YarnException {
     String serviceName = service.getName();
-    ServiceApiUtil.validateNameFormat(serviceName, getConfig());
     ServiceApiUtil.validateAndResolveService(service, fs, getConfig());
     verifyNoLiveAppInRM(serviceName, "create");
     Path appDir = checkAppNotExistOnHdfs(service);


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org


Mime
View raw message