浏览代码

AMBARI-16945 - Unit Test Failures On Trunk For Config Upgrades And Metrics Providers (jonathanhurley)

Jonathan Hurley 9 年之前
父节点
当前提交
bd1fc28d80

+ 25 - 0
ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/config-upgrade.xml

@@ -399,6 +399,31 @@
             <transfer operation="delete" delete-key="xasecure.audit.credential.provider.file" />
             <transfer operation="delete" delete-key="xasecure.audit.destination.db.batch.filespool.dir" />
           </definition>
+          
+          <definition xsi:type="configure" id="hdp_2_5_0_0_upgrade_storm_1.0">
+            <type>storm-site</type>
+            <replace key="_storm.thrift.nonsecure.transport" find="backtype.storm.security.auth.SimpleTransportPlugin"
+                     replace-with="org.apache.storm.security.auth.SimpleTransportPlugin" />
+            <replace key="_storm.thrift.secure.transport" find="backtype.storm.security.auth.KerberosSaslTransportPlugin"
+                     replace-with="org.apache.storm.security.auth.KerberosSaslTransportPlugin" />
+            <replace key="storm.messaging.transport" find="backtype.storm.messaging.netty.Context"
+                     replace-with="org.apache.storm.messaging.netty.Context" />
+            <replace key="nimbus.topology.validator" find="backtype.storm.nimbus.DefaultTopologyValidator"
+                     replace-with="org.apache.storm.nimbus.DefaultTopologyValidator" />
+            <replace key="topology.spout.wait.strategy" find="backtype.storm.spout.SleepSpoutWaitStrategy"
+                     replace-with="org.apache.storm.spout.SleepSpoutWaitStrategy" />
+            <replace key="topology.kryo.factory" find="backtype.storm.serialization.DefaultKryoFactory"
+                     replace-with="org.apache.storm.serialization.DefaultKryoFactory" />
+            <replace key="topology.tuple.serializer" find="backtype.storm.serialization.types.ListDelegateSerializer"
+                     replace-with="org.apache.storm.serialization.types.ListDelegateSerializer" />
+            <replace key="nimbus.authorizer" find="backtype.storm.security.auth.authorizer.SimpleACLAuthorizer"
+                     replace-with="org.apache.storm.security.auth.authorizer.SimpleACLAuthorizer" />
+            <replace key="drpc.authorizer" find="backtype.storm.security.auth.authorizer.DRPCSimpleACLAuthorizer"
+                     replace-with="org.apache.storm.security.auth.authorizer.DRPCSimpleACLAuthorizer" />
+            <replace key="ui.filter" find="backtype.storm.security.auth.KerberosPrincipalToLocal"
+                     replace-with="org.apache.storm.security.auth.KerberosPrincipalToLocal" />
+            <set key="client.jartransformer.class" value="org.apache.storm.hack.StormShadeTransformer" />
+          </definition>          
         </changes>
       </component>
     </service>

+ 25 - 0
ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/config-upgrade.xml

@@ -205,6 +205,31 @@
             <transfer operation="delete" delete-key="xasecure.audit.credential.provider.file" />
             <transfer operation="delete" delete-key="xasecure.audit.destination.db.batch.filespool.dir" />
           </definition>
+          
+          <definition xsi:type="configure" id="hdp_2_5_0_0_upgrade_storm_1.0">
+            <type>storm-site</type>
+            <replace key="_storm.thrift.nonsecure.transport" find="backtype.storm.security.auth.SimpleTransportPlugin"
+                     replace-with="org.apache.storm.security.auth.SimpleTransportPlugin" />
+            <replace key="_storm.thrift.secure.transport" find="backtype.storm.security.auth.KerberosSaslTransportPlugin"
+                     replace-with="org.apache.storm.security.auth.KerberosSaslTransportPlugin" />
+            <replace key="storm.messaging.transport" find="backtype.storm.messaging.netty.Context"
+                     replace-with="org.apache.storm.messaging.netty.Context" />
+            <replace key="nimbus.topology.validator" find="backtype.storm.nimbus.DefaultTopologyValidator"
+                     replace-with="org.apache.storm.nimbus.DefaultTopologyValidator" />
+            <replace key="topology.spout.wait.strategy" find="backtype.storm.spout.SleepSpoutWaitStrategy"
+                     replace-with="org.apache.storm.spout.SleepSpoutWaitStrategy" />
+            <replace key="topology.kryo.factory" find="backtype.storm.serialization.DefaultKryoFactory"
+                     replace-with="org.apache.storm.serialization.DefaultKryoFactory" />
+            <replace key="topology.tuple.serializer" find="backtype.storm.serialization.types.ListDelegateSerializer"
+                     replace-with="org.apache.storm.serialization.types.ListDelegateSerializer" />
+            <replace key="nimbus.authorizer" find="backtype.storm.security.auth.authorizer.SimpleACLAuthorizer"
+                     replace-with="org.apache.storm.security.auth.authorizer.SimpleACLAuthorizer" />
+            <replace key="drpc.authorizer" find="backtype.storm.security.auth.authorizer.DRPCSimpleACLAuthorizer"
+                     replace-with="org.apache.storm.security.auth.authorizer.DRPCSimpleACLAuthorizer" />
+            <replace key="ui.filter" find="backtype.storm.security.auth.KerberosPrincipalToLocal"
+                     replace-with="org.apache.storm.security.auth.KerberosPrincipalToLocal" />
+            <set key="client.jartransformer.class" value="org.apache.storm.hack.StormShadeTransformer" />
+          </definition>          
         </changes>
       </component>
     </service>

+ 0 - 26
ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/config-upgrade.xml

@@ -47,32 +47,6 @@
               <value>10001</value>
             </condition>
           </definition>
-
-          <definition xsi:type="configure" id="hdp_2_5_0_0_upgrade_storm_1.0">
-            <type>storm-site</type>
-            <replace key="_storm.thrift.nonsecure.transport" find="backtype.storm.security.auth.SimpleTransportPlugin"
-                     replace-with="org.apache.storm.security.auth.SimpleTransportPlugin" />
-            <replace key="_storm.thrift.secure.transport" find="backtype.storm.security.auth.KerberosSaslTransportPlugin"
-                     replace-with="org.apache.storm.security.auth.KerberosSaslTransportPlugin" />
-            <replace key="storm.messaging.transport" find="backtype.storm.messaging.netty.Context"
-                     replace-with="org.apache.storm.messaging.netty.Context" />
-            <replace key="nimbus.topology.validator" find="backtype.storm.nimbus.DefaultTopologyValidator"
-                     replace-with="org.apache.storm.nimbus.DefaultTopologyValidator" />
-            <replace key="topology.spout.wait.strategy" find="backtype.storm.spout.SleepSpoutWaitStrategy"
-                     replace-with="org.apache.storm.spout.SleepSpoutWaitStrategy" />
-            <replace key="topology.kryo.factory" find="backtype.storm.serialization.DefaultKryoFactory"
-                     replace-with="org.apache.storm.serialization.DefaultKryoFactory" />
-            <replace key="topology.tuple.serializer" find="backtype.storm.serialization.types.ListDelegateSerializer"
-                     replace-with="org.apache.storm.serialization.types.ListDelegateSerializer" />
-            <replace key="nimbus.authorizer" find="backtype.storm.security.auth.authorizer.SimpleACLAuthorizer"
-                     replace-with="org.apache.storm.security.auth.authorizer.SimpleACLAuthorizer" />
-            <replace key="drpc.authorizer" find="backtype.storm.security.auth.authorizer.DRPCSimpleACLAuthorizer"
-                     replace-with="org.apache.storm.security.auth.authorizer.DRPCSimpleACLAuthorizer" />
-            <replace key="ui.filter" find="backtype.storm.security.auth.KerberosPrincipalToLocal"
-                     replace-with="org.apache.storm.security.auth.KerberosPrincipalToLocal" />
-            <set key="client.jartransformer.class" value="org.apache.storm.hack.StormShadeTransformer" />
-          </definition>
-
         </changes>
       </component>
     </service>

+ 2 - 2
ambari-server/src/test/java/org/apache/ambari/server/configuration/ConfigurationTest.java

@@ -813,7 +813,7 @@ public class ConfigurationTest {
     Assert.assertTrue(completionServiceTimeout <= LARGEST_COMPLETION_SERIVCE_TIMEOUT_MS);
     Assert.assertTrue(corePoolSize <= maxPoolSize);
     Assert.assertTrue(corePoolSize > 2 && corePoolSize <= 32);
-    Assert.assertTrue(maxPoolSize > 2 && maxPoolSize <= 32);
+    Assert.assertTrue(maxPoolSize > 2 && maxPoolSize <= processorCount * 4);
     Assert.assertTrue(workerQueueSize > processorCount * 10);
   }
 
@@ -849,7 +849,7 @@ public class ConfigurationTest {
 
     Assert.assertTrue(cacheTimeout >= LOWEST_CACHE_TIMEOUT_MINUTES);
     Assert.assertTrue(corePoolSize > 2 && corePoolSize <= 32);
-    Assert.assertTrue(maxPoolSize > 2 && maxPoolSize <= 32);
+    Assert.assertTrue(maxPoolSize > 2 && maxPoolSize <= processorCount * 4);
     Assert.assertTrue(workerQueueSize >= processorCount * 10);
   }
 }

+ 1 - 1
ambari-server/src/test/java/org/apache/ambari/server/controller/metrics/JMXPropertyProviderTest.java

@@ -71,7 +71,7 @@ public class JMXPropertyProviderTest {
   protected static final String HOST_COMPONENT_COMPONENT_NAME_PROPERTY_ID = PropertyHelper.getPropertyId("HostRoles", "component_name");
   protected static final String HOST_COMPONENT_STATE_PROPERTY_ID = PropertyHelper.getPropertyId("HostRoles", "state");
 
-  public static final int NUMBER_OF_RESOURCES = 400;
+  public static final int NUMBER_OF_RESOURCES = 350;
   private static MetricPropertyProviderFactory metricPropertyProviderFactory;
 
   @BeforeClass