hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zjs...@apache.org
Subject [48/50] [abbrv] hadoop git commit: YARN-3958. TestYarnConfigurationFields should be moved to hadoop-yarn-api module. Contributed by Varun Saxena.
Date Mon, 27 Jul 2015 20:08:30 GMT
YARN-3958. TestYarnConfigurationFields should be moved to hadoop-yarn-api module. Contributed
by Varun Saxena.


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

Branch: refs/heads/YARN-2928
Commit: 64efacf261ad99688973081f3b137349e8b036e0
Parents: d32b8b9
Author: Akira Ajisaka <aajisaka@apache.org>
Authored: Mon Jul 27 11:43:25 2015 +0900
Committer: Zhijie Shen <zjshen@apache.org>
Committed: Mon Jul 27 12:57:38 2015 -0700

----------------------------------------------------------------------
 hadoop-yarn-project/CHANGES.txt                 |   3 +
 .../hadoop-yarn/hadoop-yarn-api/pom.xml         |  34 +++++
 .../yarn/conf/TestYarnConfigurationFields.java  | 136 +++++++++++++++++++
 .../yarn/conf/TestYarnConfigurationFields.java  | 136 -------------------
 4 files changed, 173 insertions(+), 136 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/64efacf2/hadoop-yarn-project/CHANGES.txt
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/CHANGES.txt b/hadoop-yarn-project/CHANGES.txt
index 611fd4b..f2df960 100644
--- a/hadoop-yarn-project/CHANGES.txt
+++ b/hadoop-yarn-project/CHANGES.txt
@@ -800,6 +800,9 @@ Release 2.8.0 - UNRELEASED
     YARN-3973. Recent changes to application priority management break 
     reservation system from YARN-1051. (Carlo Curino via wangda)
 
+    YARN-3958. TestYarnConfigurationFields should be moved to hadoop-yarn-api
+    module. (Varun Saxena via aajisaka)
+
 Release 2.7.2 - UNRELEASED
 
   INCOMPATIBLE CHANGES

http://git-wip-us.apache.org/repos/asf/hadoop/blob/64efacf2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/pom.xml
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/pom.xml b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/pom.xml
index c5e98b5..ed74a44 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/pom.xml
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/pom.xml
@@ -66,9 +66,31 @@
       <groupId>com.google.protobuf</groupId>
       <artifactId>protobuf-java</artifactId>
     </dependency>
+
+    <dependency>
+      <groupId>org.apache.hadoop</groupId>
+      <artifactId>hadoop-common</artifactId>
+      <type>test-jar</type>
+      <scope>test</scope>
+    </dependency>
+
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <scope>test</scope>
+    </dependency>
   </dependencies>
 
   <build>
+    <resources>
+      <resource>
+        <directory>${basedir}/../hadoop-yarn-common/src/main/resources</directory>
+        <includes>
+          <include>yarn-default.xml</include>
+        </includes>
+        <filtering>false</filtering>
+      </resource>
+    </resources>
     <plugins>
       <plugin>
         <groupId>org.apache.hadoop</groupId>
@@ -109,6 +131,18 @@
           </execution>
         </executions>
       </plugin>
+
+      <plugin>
+        <artifactId>maven-jar-plugin</artifactId>
+        <executions>
+          <execution>
+            <goals>
+              <goal>test-jar</goal>
+            </goals>
+            <phase>test-compile</phase>
+          </execution>
+        </executions>
+      </plugin>
     </plugins>
   </build>
 

http://git-wip-us.apache.org/repos/asf/hadoop/blob/64efacf2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/test/java/org/apache/hadoop/yarn/conf/TestYarnConfigurationFields.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/test/java/org/apache/hadoop/yarn/conf/TestYarnConfigurationFields.java
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/test/java/org/apache/hadoop/yarn/conf/TestYarnConfigurationFields.java
new file mode 100644
index 0000000..e89a90d
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/test/java/org/apache/hadoop/yarn/conf/TestYarnConfigurationFields.java
@@ -0,0 +1,136 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.hadoop.yarn.conf;
+
+import java.util.HashSet;
+
+import org.apache.hadoop.conf.TestConfigurationFieldsBase;
+
+/**
+ * Unit test class to compare
+ * {@link org.apache.hadoop.yarn.conf.YarnConfiguration} and
+ * yarn-default.xml for missing properties.  Currently only throws an error
+ * if the class is missing a property.
+ * <p></p>
+ * Refer to {@link org.apache.hadoop.conf.TestConfigurationFieldsBase}
+ * for how this class works.
+ */
+public class TestYarnConfigurationFields extends TestConfigurationFieldsBase {
+
+  @SuppressWarnings("deprecation")
+  @Override
+  public void initializeMemberVariables() {
+    xmlFilename = new String("yarn-default.xml");
+    configurationClasses = new Class[] { YarnConfiguration.class };
+
+    // Allocate for usage
+    configurationPropsToSkipCompare = new HashSet<String>();
+    configurationPrefixToSkipCompare = new HashSet<String>();
+
+    // Set error modes
+    errorIfMissingConfigProps = true;
+    errorIfMissingXmlProps = true;
+
+    // Specific properties to skip
+    configurationPropsToSkipCompare
+        .add(YarnConfiguration.DEFAULT_RM_CONFIGURATION_PROVIDER_CLASS);
+    configurationPropsToSkipCompare
+        .add(YarnConfiguration.DEFAULT_CLIENT_FAILOVER_PROXY_PROVIDER);
+    configurationPropsToSkipCompare
+        .add(YarnConfiguration.DEFAULT_IPC_RECORD_FACTORY_CLASS);
+    configurationPropsToSkipCompare
+        .add(YarnConfiguration.DEFAULT_IPC_CLIENT_FACTORY_CLASS);
+    configurationPropsToSkipCompare
+        .add(YarnConfiguration.DEFAULT_IPC_SERVER_FACTORY_CLASS);
+    configurationPropsToSkipCompare
+        .add(YarnConfiguration.DEFAULT_IPC_RPC_IMPL);
+    configurationPropsToSkipCompare
+        .add(YarnConfiguration.DEFAULT_RM_SCHEDULER);
+    configurationPropsToSkipCompare
+        .add(YarnConfiguration
+            .YARN_SECURITY_SERVICE_AUTHORIZATION_APPLICATIONCLIENT_PROTOCOL);
+    configurationPropsToSkipCompare
+        .add(YarnConfiguration
+            .YARN_SECURITY_SERVICE_AUTHORIZATION_APPLICATIONMASTER_PROTOCOL);
+    configurationPropsToSkipCompare
+        .add(YarnConfiguration
+            .YARN_SECURITY_SERVICE_AUTHORIZATION_CONTAINER_MANAGEMENT_PROTOCOL);
+    configurationPropsToSkipCompare
+        .add(YarnConfiguration
+            .YARN_SECURITY_SERVICE_AUTHORIZATION_RESOURCE_LOCALIZER);
+    configurationPropsToSkipCompare
+        .add(YarnConfiguration
+            .YARN_SECURITY_SERVICE_AUTHORIZATION_RESOURCEMANAGER_ADMINISTRATION_PROTOCOL);
+    configurationPropsToSkipCompare
+        .add(YarnConfiguration
+            .YARN_SECURITY_SERVICE_AUTHORIZATION_RESOURCETRACKER_PROTOCOL);
+    configurationPropsToSkipCompare
+        .add(YarnConfiguration.DEFAULT_SCM_STORE_CLASS);
+    configurationPropsToSkipCompare
+        .add(YarnConfiguration.DEFAULT_SCM_APP_CHECKER_CLASS);
+    configurationPropsToSkipCompare
+        .add(YarnConfiguration.DEFAULT_SHARED_CACHE_CHECKSUM_ALGO_IMPL);
+
+    // Ignore all YARN Application Timeline Service (version 1) properties
+    configurationPrefixToSkipCompare.add("yarn.timeline-service.");
+
+    // Used as Java command line properties, not XML
+    configurationPrefixToSkipCompare.add("yarn.app.container");
+
+    // Ignore NodeManager "work in progress" variables
+    configurationPrefixToSkipCompare
+        .add(YarnConfiguration.NM_NETWORK_RESOURCE_ENABLED);
+    configurationPrefixToSkipCompare
+        .add(YarnConfiguration.NM_NETWORK_RESOURCE_INTERFACE);
+    configurationPrefixToSkipCompare
+        .add(YarnConfiguration.NM_NETWORK_RESOURCE_OUTBOUND_BANDWIDTH_MBIT);
+    configurationPrefixToSkipCompare
+        .add(YarnConfiguration.NM_NETWORK_RESOURCE_OUTBOUND_BANDWIDTH_YARN_MBIT);
+    configurationPrefixToSkipCompare
+        .add(YarnConfiguration.NM_DISK_RESOURCE_ENABLED);
+
+    // Set by container-executor.cfg
+    configurationPrefixToSkipCompare.add(YarnConfiguration.NM_USER_HOME_DIR);
+
+    // Ignore deprecated properties
+    configurationPrefixToSkipCompare
+        .add(YarnConfiguration.YARN_CLIENT_APP_SUBMISSION_POLL_INTERVAL_MS);
+
+    // Allocate for usage
+    xmlPropsToSkipCompare = new HashSet<String>();
+    xmlPrefixToSkipCompare = new HashSet<String>();
+
+    // Should probably be moved from yarn-default.xml to mapred-default.xml
+    xmlPropsToSkipCompare.add("mapreduce.job.hdfs-servers");
+    xmlPropsToSkipCompare.add("mapreduce.job.jar");
+
+    // Possibly obsolete, but unable to verify 100%
+    xmlPropsToSkipCompare.add("yarn.nodemanager.aux-services.mapreduce_shuffle.class");
+    xmlPropsToSkipCompare.add("yarn.resourcemanager.container.liveness-monitor.interval-ms");
+
+    // Used in the XML file as a variable reference internal to the XML file
+    xmlPropsToSkipCompare.add("yarn.nodemanager.hostname");
+
+    // Ignore all YARN Application Timeline Service (version 1) properties
+    xmlPrefixToSkipCompare.add("yarn.timeline-service");
+
+    // Currently defined in RegistryConstants/core-site.xml
+    xmlPrefixToSkipCompare.add("hadoop.registry");
+  }
+}

http://git-wip-us.apache.org/repos/asf/hadoop/blob/64efacf2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/conf/TestYarnConfigurationFields.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/conf/TestYarnConfigurationFields.java
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/conf/TestYarnConfigurationFields.java
deleted file mode 100644
index 10e1ca6..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/conf/TestYarnConfigurationFields.java
+++ /dev/null
@@ -1,136 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.hadoop.yarn.conf;
-
-import java.util.HashSet;
-
-import org.apache.hadoop.conf.TestConfigurationFieldsBase;
-
-/**
- * Unit test class to compare
- * {@link org.apache.hadoop.yarn.conf.YarnConfiguration} and
- * yarn-default.xml for missing properties.  Currently only throws an error
- * if the class is missing a property.
- * <p></p>
- * Refer to {@link org.apache.hadoop.conf.TestConfigurationFieldsBase}
- * for how this class works.
- */
-public class TestYarnConfigurationFields extends TestConfigurationFieldsBase {
-
-  @SuppressWarnings("deprecation")
-  @Override
-  public void initializeMemberVariables() {
-    xmlFilename = new String("yarn-default.xml");
-    configurationClasses = new Class[] { YarnConfiguration.class };
-
-    // Allocate for usage
-    configurationPropsToSkipCompare = new HashSet<String>();
-    configurationPrefixToSkipCompare = new HashSet<String>();
-
-    // Set error modes
-    errorIfMissingConfigProps = true;
-    errorIfMissingXmlProps = true;
-
-    // Specific properties to skip
-    configurationPropsToSkipCompare
-        .add(YarnConfiguration.DEFAULT_RM_CONFIGURATION_PROVIDER_CLASS);
-    configurationPropsToSkipCompare
-        .add(YarnConfiguration.DEFAULT_CLIENT_FAILOVER_PROXY_PROVIDER);
-    configurationPropsToSkipCompare
-        .add(YarnConfiguration.DEFAULT_IPC_RECORD_FACTORY_CLASS);
-    configurationPropsToSkipCompare
-        .add(YarnConfiguration.DEFAULT_IPC_CLIENT_FACTORY_CLASS);
-    configurationPropsToSkipCompare
-        .add(YarnConfiguration.DEFAULT_IPC_SERVER_FACTORY_CLASS);
-    configurationPropsToSkipCompare
-        .add(YarnConfiguration.DEFAULT_IPC_RPC_IMPL);
-    configurationPropsToSkipCompare
-        .add(YarnConfiguration.DEFAULT_RM_SCHEDULER);
-    configurationPropsToSkipCompare
-        .add(YarnConfiguration
-	    .YARN_SECURITY_SERVICE_AUTHORIZATION_APPLICATIONCLIENT_PROTOCOL);
-    configurationPropsToSkipCompare
-        .add(YarnConfiguration
-	    .YARN_SECURITY_SERVICE_AUTHORIZATION_APPLICATIONMASTER_PROTOCOL);
-    configurationPropsToSkipCompare
-        .add(YarnConfiguration
-	    .YARN_SECURITY_SERVICE_AUTHORIZATION_CONTAINER_MANAGEMENT_PROTOCOL);
-    configurationPropsToSkipCompare
-        .add(YarnConfiguration
-	    .YARN_SECURITY_SERVICE_AUTHORIZATION_RESOURCE_LOCALIZER);
-    configurationPropsToSkipCompare
-        .add(YarnConfiguration
-	    .YARN_SECURITY_SERVICE_AUTHORIZATION_RESOURCEMANAGER_ADMINISTRATION_PROTOCOL);
-    configurationPropsToSkipCompare
-        .add(YarnConfiguration
-	    .YARN_SECURITY_SERVICE_AUTHORIZATION_RESOURCETRACKER_PROTOCOL);
-    configurationPropsToSkipCompare
-        .add(YarnConfiguration.DEFAULT_SCM_STORE_CLASS);
-    configurationPropsToSkipCompare
-        .add(YarnConfiguration.DEFAULT_SCM_APP_CHECKER_CLASS);
-    configurationPropsToSkipCompare
-        .add(YarnConfiguration.DEFAULT_SHARED_CACHE_CHECKSUM_ALGO_IMPL);
-
-    // Ignore all YARN Application Timeline Service (version 1) properties
-    configurationPrefixToSkipCompare.add("yarn.timeline-service.");
-
-    // Used as Java command line properties, not XML
-    configurationPrefixToSkipCompare.add("yarn.app.container");
-
-    // Ignore NodeManager "work in progress" variables
-    configurationPrefixToSkipCompare
-        .add(YarnConfiguration.NM_NETWORK_RESOURCE_ENABLED);
-    configurationPrefixToSkipCompare
-        .add(YarnConfiguration.NM_NETWORK_RESOURCE_INTERFACE);
-    configurationPrefixToSkipCompare
-        .add(YarnConfiguration.NM_NETWORK_RESOURCE_OUTBOUND_BANDWIDTH_MBIT);
-    configurationPrefixToSkipCompare
-        .add(YarnConfiguration.NM_NETWORK_RESOURCE_OUTBOUND_BANDWIDTH_YARN_MBIT);
-    configurationPrefixToSkipCompare
-        .add(YarnConfiguration.NM_DISK_RESOURCE_ENABLED);
-
-    // Set by container-executor.cfg
-    configurationPrefixToSkipCompare.add(YarnConfiguration.NM_USER_HOME_DIR);
-
-    // Ignore deprecated properties
-    configurationPrefixToSkipCompare
-        .add(YarnConfiguration.YARN_CLIENT_APP_SUBMISSION_POLL_INTERVAL_MS);
-
-    // Allocate for usage
-    xmlPropsToSkipCompare = new HashSet<String>();
-    xmlPrefixToSkipCompare = new HashSet<String>();
-
-    // Should probably be moved from yarn-default.xml to mapred-default.xml
-    xmlPropsToSkipCompare.add("mapreduce.job.hdfs-servers");
-    xmlPropsToSkipCompare.add("mapreduce.job.jar");
-
-    // Possibly obsolete, but unable to verify 100%
-    xmlPropsToSkipCompare.add("yarn.nodemanager.aux-services.mapreduce_shuffle.class");
-    xmlPropsToSkipCompare.add("yarn.resourcemanager.container.liveness-monitor.interval-ms");
-
-    // Used in the XML file as a variable reference internal to the XML file
-    xmlPropsToSkipCompare.add("yarn.nodemanager.hostname");
-
-    // Ignore all YARN Application Timeline Service (version 1) properties
-    xmlPrefixToSkipCompare.add("yarn.timeline-service");
-
-    // Currently defined in RegistryConstants/core-site.xml
-    xmlPrefixToSkipCompare.add("hadoop.registry");
-  }
-}


Mime
View raw message