示例#1
0
 public virtual void SetUp()
 {
     configuration = new Configuration();
     UserGroupInformation.SetConfiguration(configuration);
     configuration.SetBoolean(YarnConfiguration.RmHaEnabled, true);
     configuration.Set(YarnConfiguration.RmHaIds, Rm1NodeId + "," + Rm2NodeId);
     foreach (string confKey in YarnConfiguration.GetServiceAddressConfKeys(configuration
                                                                            ))
     {
         configuration.Set(HAUtil.AddSuffix(confKey, Rm1NodeId), Rm1Address);
         configuration.Set(HAUtil.AddSuffix(confKey, Rm2NodeId), Rm2Address);
         configuration.Set(HAUtil.AddSuffix(confKey, Rm3NodeId), Rm3Address);
     }
     // Enable webapp to test web-services also
     configuration.SetBoolean(MockRM.EnableWebapp, true);
     configuration.SetBoolean(YarnConfiguration.YarnAclEnable, true);
     ClusterMetrics.Destroy();
     QueueMetrics.ClearQueueMetrics();
     DefaultMetricsSystem.Shutdown();
 }
示例#2
0
 // Explicitly reset queue metrics for testing.
 public virtual void ClearQueueMetrics(RMApp app)
 {
     QueueMetrics.ClearQueueMetrics();
 }
示例#3
0
 public virtual void TearDown()
 {
     ClusterMetrics.Destroy();
     QueueMetrics.ClearQueueMetrics();
     DefaultMetricsSystem.Shutdown();
 }