ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nc...@apache.org
Subject [17/50] [abbrv] ambari git commit: AMBARI-19149. Code cleanup: redundant type arguments
Date Wed, 29 Mar 2017 22:40:35 GMT
http://git-wip-us.apache.org/repos/asf/ambari/blob/edbb5492/ambari-server/src/test/java/org/apache/ambari/server/controller/metrics/JMXPropertyProviderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/metrics/JMXPropertyProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/metrics/JMXPropertyProviderTest.java
index 2225997..bb3240b 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/metrics/JMXPropertyProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/metrics/JMXPropertyProviderTest.java
@@ -219,7 +219,7 @@ public class JMXPropertyProviderTest {
     Request request = PropertyHelper.getReadRequest(Collections.<String>emptySet());
     Assert.assertEquals(1, propertyProvider.populateResources(Collections.singleton(resource), request, null).size());
 
-    List<String> expectedSpecs = new ArrayList<String>();
+    List<String> expectedSpecs = new ArrayList<>();
     expectedSpecs.add(propertyProvider.getSpec("http", "domu-12-31-39-0e-34-e1.compute-1.internal", "50070", "/jmx"));
     expectedSpecs.add(propertyProvider.getSpec("http", "domu-12-31-39-0e-34-e1.compute-1.internal", "50070", "/jmx?get=Hadoop:service=NameNode,name=FSNamesystem::tag.HAState"));
     Assert.assertEquals(expectedSpecs, streamProvider.getSpecs());
@@ -258,7 +258,7 @@ public class JMXPropertyProviderTest {
 
 
     // only ask for specific properties
-    Set<String> properties = new HashSet<String>();
+    Set<String> properties = new HashSet<>();
 
     // hbase master
     resource = new ResourceImpl(Resource.Type.HostComponent);
@@ -268,7 +268,7 @@ public class JMXPropertyProviderTest {
     resource.setProperty(HOST_COMPONENT_STATE_PROPERTY_ID, "STARTED");
 
     // only ask for specific properties
-    properties = new HashSet<String>();
+    properties = new HashSet<>();
     properties.add(PropertyHelper.getPropertyId("metrics/jvm", "HeapMemoryMax"));
     properties.add(PropertyHelper.getPropertyId("metrics/jvm", "HeapMemoryUsed"));
     properties.add(PropertyHelper.getPropertyId("metrics/jvm", "NonHeapMemoryMax"));
@@ -313,7 +313,7 @@ public class JMXPropertyProviderTest {
     resource.setProperty(HOST_COMPONENT_STATE_PROPERTY_ID, "STARTED");
 
     // only ask for one property
-    Map<String, TemporalInfo> temporalInfoMap = new HashMap<String, TemporalInfo>();
+    Map<String, TemporalInfo> temporalInfoMap = new HashMap<>();
     Request request = PropertyHelper.getReadRequest(Collections.singleton("metrics/rpc/ReceivedBytes"), temporalInfoMap);
 
     Assert.assertEquals(1, propertyProvider.populateResources(Collections.singleton(resource), request, null).size());
@@ -349,12 +349,12 @@ public class JMXPropertyProviderTest {
 
     // request with an empty set should get all supported properties
     // only ask for one property
-    Map<String, TemporalInfo> temporalInfoMap = new HashMap<String, TemporalInfo>();
+    Map<String, TemporalInfo> temporalInfoMap = new HashMap<>();
     Request request = PropertyHelper.getReadRequest(Collections.singleton("metrics/dfs"), temporalInfoMap);
 
     Assert.assertEquals(1, propertyProvider.populateResources(Collections.singleton(resource), request, null).size());
 
-    List<String> expectedSpecs = new ArrayList<String>();
+    List<String> expectedSpecs = new ArrayList<>();
     expectedSpecs.add(propertyProvider.getSpec("http", "domu-12-31-39-0e-34-e1.compute-1.internal", "50070", "/jmx"));
     expectedSpecs.add(propertyProvider.getSpec("http", "domu-12-31-39-0e-34-e1.compute-1.internal", "50070", "/jmx?get=Hadoop:service=NameNode,name=FSNamesystem::tag.HAState"));
     Assert.assertEquals(expectedSpecs, streamProvider.getSpecs());
@@ -389,12 +389,12 @@ public class JMXPropertyProviderTest {
 
     // request with an empty set should get all supported properties
     // only ask for one property
-    Map<String, TemporalInfo> temporalInfoMap = new HashMap<String, TemporalInfo>();
+    Map<String, TemporalInfo> temporalInfoMap = new HashMap<>();
     Request request = PropertyHelper.getReadRequest(Collections.singleton("metrics/dfs/FSNamesystem"), temporalInfoMap);
 
     Assert.assertEquals(1, propertyProvider.populateResources(Collections.singleton(resource), request, null).size());
 
-    List<String> expectedSpecs = new ArrayList<String>();
+    List<String> expectedSpecs = new ArrayList<>();
     expectedSpecs.add(propertyProvider.getSpec("http","domu-12-31-39-0e-34-e1.compute-1.internal","50070","/jmx"));
     expectedSpecs.add(propertyProvider.getSpec("http", "domu-12-31-39-0e-34-e1.compute-1.internal", "50070", "/jmx?get=Hadoop:service=NameNode,name=FSNamesystem::tag.HAState"));
 
@@ -417,7 +417,7 @@ public class JMXPropertyProviderTest {
 
     // request with an empty set should get all supported properties
     // only ask for one property
-    temporalInfoMap = new HashMap<String, TemporalInfo>();
+    temporalInfoMap = new HashMap<>();
     request = PropertyHelper.getReadRequest(Collections.singleton("metrics/dfs/FSNamesystem/CapacityUsed"), temporalInfoMap);
 
     Assert.assertEquals(1, propertyProvider.populateResources(Collections.singleton(resource), request, null).size());
@@ -460,7 +460,7 @@ public class JMXPropertyProviderTest {
 
     Assert.assertEquals(1, propertyProvider.populateResources(Collections.singleton(resource), request, null).size());
 
-    List<String> expectedSpecs = new ArrayList<String>();
+    List<String> expectedSpecs = new ArrayList<>();
     expectedSpecs.add(propertyProvider.getSpec("http", "domu-12-31-39-0e-34-e1.compute-1.internal", "50070", "/jmx"));
     expectedSpecs.add(propertyProvider.getSpec("http", "domu-12-31-39-0e-34-e1.compute-1.internal", "50070", "/jmx?get=Hadoop:service=NameNode,name=FSNamesystem::tag.HAState"));
     Assert.assertEquals(expectedSpecs, streamProvider.getSpecs());
@@ -510,7 +510,7 @@ public class JMXPropertyProviderTest {
     TestStreamProvider streamProvider = new TestStreamProvider(50L);
     TestJMXHostProvider hostProvider = new TestJMXHostProvider(true);
     TestMetricHostProvider metricsHostProvider = new TestMetricHostProvider();
-    Set<Resource> resources = new HashSet<Resource>();
+    Set<Resource> resources = new HashSet<>();
 
     JMXPropertyProvider propertyProvider = metricPropertyProviderFactory.createJMXPropertyProvider(
       PropertyHelper.getJMXPropertyIds(Resource.Type.HostComponent),
@@ -556,7 +556,7 @@ public class JMXPropertyProviderTest {
     TestStreamProvider streamProvider = new TestStreamProvider(100L);
     TestJMXHostProvider hostProvider = new TestJMXHostProvider(true);
     TestMetricHostProvider metricsHostProvider = new TestMetricHostProvider();
-    Set<Resource> resources = new HashSet<Resource>();
+    Set<Resource> resources = new HashSet<>();
 
     JMXPropertyProvider propertyProvider = metricPropertyProviderFactory.createJMXPropertyProvider(
       PropertyHelper.getJMXPropertyIds(Resource.Type.HostComponent),

http://git-wip-us.apache.org/repos/asf/ambari/blob/edbb5492/ambari-server/src/test/java/org/apache/ambari/server/controller/metrics/RestMetricsPropertyProviderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/metrics/RestMetricsPropertyProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/metrics/RestMetricsPropertyProviderTest.java
index 05b9835..66e62a0 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/metrics/RestMetricsPropertyProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/metrics/RestMetricsPropertyProviderTest.java
@@ -83,8 +83,8 @@ public class RestMetricsPropertyProviderTest {
   protected static final String HOST_COMPONENT_HOST_NAME_PROPERTY_ID = PropertyHelper.getPropertyId("HostRoles", "host_name");
   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");
-  protected static final Map<String, String> metricsProperties = new HashMap<String, String>();
-  protected static final Map<String, Metric> componentMetrics = new HashMap<String, Metric>();
+  protected static final Map<String, String> metricsProperties = new HashMap<>();
+  protected static final Map<String, Metric> componentMetrics = new HashMap<>();
   private static final String CLUSTER_NAME_PROPERTY_ID = PropertyHelper.getPropertyId("HostRoles", "cluster_name");
   private static final String DEFAULT_STORM_UI_PORT = "8745";
   public static final int NUMBER_OF_RESOURCES = 400;
@@ -244,7 +244,7 @@ public class RestMetricsPropertyProviderTest {
     replay(metricDefinition);
 
     Map<String, PropertyInfo> metrics = StackDefinedPropertyProvider.getPropertyInfo(metricDefinition);
-    HashMap<String, Map<String, PropertyInfo>> componentMetrics = new HashMap<String, Map<String, PropertyInfo>>();
+    HashMap<String, Map<String, PropertyInfo>> componentMetrics = new HashMap<>();
     componentMetrics.put(WRAPPED_METRICS_KEY, metrics);
     TestStreamProvider streamProvider = new TestStreamProvider();
     TestMetricsHostProvider metricsHostProvider = new TestMetricsHostProvider();
@@ -277,7 +277,7 @@ public class RestMetricsPropertyProviderTest {
     replay(metricDefinition);
 
     Map<String, PropertyInfo> metrics = StackDefinedPropertyProvider.getPropertyInfo(metricDefinition);
-    HashMap<String, Map<String, PropertyInfo>> componentMetrics = new HashMap<String, Map<String, PropertyInfo>>();
+    HashMap<String, Map<String, PropertyInfo>> componentMetrics = new HashMap<>();
     componentMetrics.put(WRAPPED_METRICS_KEY, metrics);
     TestStreamProvider streamProvider = new TestStreamProvider();
     TestMetricsHostProvider metricsHostProvider = new TestMetricsHostProvider();
@@ -315,7 +315,7 @@ public class RestMetricsPropertyProviderTest {
     expect(metricDefinition.getProperties()).andReturn(metricsProperties);
     replay(metricDefinition);
     Map<String, PropertyInfo> metrics = StackDefinedPropertyProvider.getPropertyInfo(metricDefinition);
-    HashMap<String, Map<String, PropertyInfo>> componentMetrics = new HashMap<String, Map<String, PropertyInfo>>();
+    HashMap<String, Map<String, PropertyInfo>> componentMetrics = new HashMap<>();
     componentMetrics.put(WRAPPED_METRICS_KEY, metrics);
     TestStreamProvider streamProvider = new TestStreamProvider();
     TestMetricsHostProvider metricsHostProvider = new TestMetricsHostProvider();
@@ -346,7 +346,7 @@ public class RestMetricsPropertyProviderTest {
     expect(metricDefinition.getProperties()).andReturn(metricsProperties);
     replay(metricDefinition);
     Map<String, PropertyInfo> metrics = StackDefinedPropertyProvider.getPropertyInfo(metricDefinition);
-    HashMap<String, Map<String, PropertyInfo>> componentMetrics = new HashMap<String, Map<String, PropertyInfo>>();
+    HashMap<String, Map<String, PropertyInfo>> componentMetrics = new HashMap<>();
     componentMetrics.put(WRAPPED_METRICS_KEY, metrics);
     TestStreamProvider streamProvider = new TestStreamProvider();
     TestMetricsHostProvider metricsHostProvider = new TestMetricsHostProvider();
@@ -363,7 +363,7 @@ public class RestMetricsPropertyProviderTest {
 
     // request with an empty set should get all supported properties
     // only ask for one property
-    Map<String, TemporalInfo> temporalInfoMap = new HashMap<String, TemporalInfo>();
+    Map<String, TemporalInfo> temporalInfoMap = new HashMap<>();
     Request request = PropertyHelper.getReadRequest(Collections.singleton("metrics/api/cluster"), temporalInfoMap);
 
     Assert.assertEquals(1, restMetricsPropertyProvider.populateResources(Collections.singleton(resource), request, null).size());
@@ -381,7 +381,7 @@ public class RestMetricsPropertyProviderTest {
     expect(metricDefinition.getProperties()).andReturn(metricsProperties);
     replay(metricDefinition);
     Map<String, PropertyInfo> metrics = StackDefinedPropertyProvider.getPropertyInfo(metricDefinition);
-    HashMap<String, Map<String, PropertyInfo>> componentMetrics = new HashMap<String, Map<String, PropertyInfo>>();
+    HashMap<String, Map<String, PropertyInfo>> componentMetrics = new HashMap<>();
     componentMetrics.put(WRAPPED_METRICS_KEY, metrics);
     TestStreamProvider streamProvider = new TestStreamProvider();
     TestMetricsHostProvider metricsHostProvider = new TestMetricsHostProvider();
@@ -412,12 +412,12 @@ public class RestMetricsPropertyProviderTest {
     expect(metricDefinition.getProperties()).andReturn(metricsProperties);
     replay(metricDefinition);
     Map<String, PropertyInfo> metrics = StackDefinedPropertyProvider.getPropertyInfo(metricDefinition);
-    HashMap<String, Map<String, PropertyInfo>> componentMetrics = new HashMap<String, Map<String, PropertyInfo>>();
+    HashMap<String, Map<String, PropertyInfo>> componentMetrics = new HashMap<>();
     componentMetrics.put(WRAPPED_METRICS_KEY, metrics);
     TestStreamProvider streamProvider = new TestStreamProvider();
     TestMetricsHostProvider metricsHostProvider = new TestMetricsHostProvider();
 
-    Set<Resource> resources = new HashSet<Resource>();
+    Set<Resource> resources = new HashSet<>();
 
     RestMetricsPropertyProvider restMetricsPropertyProvider = createRestMetricsPropertyProvider(metricDefinition, componentMetrics, streamProvider,
         metricsHostProvider);
@@ -457,12 +457,12 @@ public class RestMetricsPropertyProviderTest {
     expect(metricDefinition.getProperties()).andReturn(metricsProperties);
     replay(metricDefinition);
     Map<String, PropertyInfo> metrics = StackDefinedPropertyProvider.getPropertyInfo(metricDefinition);
-    HashMap<String, Map<String, PropertyInfo>> componentMetrics = new HashMap<String, Map<String, PropertyInfo>>();
+    HashMap<String, Map<String, PropertyInfo>> componentMetrics = new HashMap<>();
     componentMetrics.put(WRAPPED_METRICS_KEY, metrics);
     TestStreamProvider streamProvider = new TestStreamProvider(100L);
     TestMetricsHostProvider metricsHostProvider = new TestMetricsHostProvider();
 
-    Set<Resource> resources = new HashSet<Resource>();
+    Set<Resource> resources = new HashSet<>();
 
     RestMetricsPropertyProvider restMetricsPropertyProvider = createRestMetricsPropertyProvider(metricDefinition, componentMetrics, streamProvider,
         metricsHostProvider);

http://git-wip-us.apache.org/repos/asf/ambari/blob/edbb5492/ambari-server/src/test/java/org/apache/ambari/server/controller/metrics/ganglia/GangliaMetricTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/metrics/ganglia/GangliaMetricTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/metrics/ganglia/GangliaMetricTest.java
index e810fc4..7923a6e 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/metrics/ganglia/GangliaMetricTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/metrics/ganglia/GangliaMetricTest.java
@@ -41,7 +41,7 @@ public class GangliaMetricTest {
   public void testSetDatapointsOfPercentValue() {
     System.out.println("setDatapoints");
     List<GangliaMetric.TemporalMetric> listTemporalMetrics =
-              new ArrayList<GangliaMetric.TemporalMetric>();
+      new ArrayList<>();
     GangliaMetric instance = new GangliaMetric();
     instance.setDs_name("dsName");
     instance.setCluster_name("c1");
@@ -62,7 +62,7 @@ public class GangliaMetricTest {
   public void testSetDatapointsOfgcTimeMillisValue() {
     System.out.println("setDatapoints");
     List<GangliaMetric.TemporalMetric> listTemporalMetrics =
-              new ArrayList<GangliaMetric.TemporalMetric>();
+      new ArrayList<>();
     GangliaMetric instance = new GangliaMetric();
     instance.setDs_name("dsName");
     instance.setCluster_name("c1");

http://git-wip-us.apache.org/repos/asf/ambari/blob/edbb5492/ambari-server/src/test/java/org/apache/ambari/server/controller/metrics/ganglia/GangliaPropertyProviderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/metrics/ganglia/GangliaPropertyProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/metrics/ganglia/GangliaPropertyProviderTest.java
index 6339e79..5ef7117 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/metrics/ganglia/GangliaPropertyProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/metrics/ganglia/GangliaPropertyProviderTest.java
@@ -215,7 +215,7 @@ public class GangliaPropertyProviderTest {
     resource.setProperty(COMPONENT_NAME_PROPERTY_ID, "DATANODE");
 
     // only ask for one property
-    Map<String, TemporalInfo> temporalInfoMap = new HashMap<String, TemporalInfo>();
+    Map<String, TemporalInfo> temporalInfoMap = new HashMap<>();
     temporalInfoMap.put(PROPERTY_ID, new TemporalInfoImpl(10L, 20L, 1L));
     Request  request = PropertyHelper.getReadRequest(Collections.singleton(PROPERTY_ID), temporalInfoMap);
 
@@ -237,9 +237,9 @@ public class GangliaPropertyProviderTest {
     resource.setProperty(COMPONENT_NAME_PROPERTY_ID, "TASKTRACKER");
 
     // only ask for one property
-    temporalInfoMap = new HashMap<String, TemporalInfo>();
+    temporalInfoMap = new HashMap<>();
 
-    Set<String> properties = new HashSet<String>();
+    Set<String> properties = new HashSet<>();
     String shuffle_exceptions_caught = PropertyHelper.getPropertyId("metrics/mapred/shuffleOutput", "shuffle_exceptions_caught");
     String shuffle_failed_outputs    = PropertyHelper.getPropertyId("metrics/mapred/shuffleOutput", "shuffle_failed_outputs");
     String shuffle_output_bytes      = PropertyHelper.getPropertyId("metrics/mapred/shuffleOutput", "shuffle_output_bytes");
@@ -259,7 +259,7 @@ public class GangliaPropertyProviderTest {
     Assert.assertEquals(1, propertyProvider.populateResources(Collections.singleton(resource), request, null).size());
 
     
-    List<String> metricsRegexes = new ArrayList<String>();
+    List<String> metricsRegexes = new ArrayList<>();
     
     metricsRegexes.add("metrics/mapred/shuffleOutput/shuffle_exceptions_caught");
     metricsRegexes.add("metrics/mapred/shuffleOutput/shuffle_failed_outputs");
@@ -328,7 +328,7 @@ public class GangliaPropertyProviderTest {
     resource.setProperty(COMPONENT_NAME_PROPERTY_ID, "DATANODE");
 
     // only ask for one property
-    Map<String, TemporalInfo> temporalInfoMap = new HashMap<String, TemporalInfo>();
+    Map<String, TemporalInfo> temporalInfoMap = new HashMap<>();
     temporalInfoMap.put(PROPERTY_ID, new TemporalInfoImpl(10L, 20L, 1L));
     Request  request = PropertyHelper.getReadRequest(Collections.singleton(PROPERTY_ID), temporalInfoMap);
     
@@ -366,7 +366,7 @@ public class GangliaPropertyProviderTest {
     resource.setProperty(HOST_NAME_PROPERTY_ID, "corp-hadoopda05.client.ext");
 
     // only ask for one property
-    Map<String, TemporalInfo> temporalInfoMap = new HashMap<String, TemporalInfo>();
+    Map<String, TemporalInfo> temporalInfoMap = new HashMap<>();
     temporalInfoMap.put("metrics/process/proc_total", new TemporalInfoImpl(10L, 20L, 1L));
     Request  request = PropertyHelper.getReadRequest(Collections.singleton("metrics/process/proc_total"), temporalInfoMap);
 
@@ -393,7 +393,7 @@ public class GangliaPropertyProviderTest {
         HOST_NAME_PROPERTY_ID
     );
 
-    Set<Resource> resources = new HashSet<Resource>();
+    Set<Resource> resources = new HashSet<>();
 
     // host
     Resource resource = new ResourceImpl(Resource.Type.Host);
@@ -412,7 +412,7 @@ public class GangliaPropertyProviderTest {
     resources.add(resource);
 
     // only ask for one property
-    Map<String, TemporalInfo> temporalInfoMap = new HashMap<String, TemporalInfo>();
+    Map<String, TemporalInfo> temporalInfoMap = new HashMap<>();
     temporalInfoMap.put(PROPERTY_ID, new TemporalInfoImpl(10L, 20L, 1L));
     Request  request = PropertyHelper.getReadRequest(Collections.singleton(PROPERTY_ID), temporalInfoMap);
 
@@ -463,7 +463,7 @@ public class GangliaPropertyProviderTest {
         HOST_NAME_PROPERTY_ID
     );
 
-    Set<Resource> resources = new HashSet<Resource>();
+    Set<Resource> resources = new HashSet<>();
 
     StringBuilder hostsList = new StringBuilder();
     
@@ -480,7 +480,7 @@ public class GangliaPropertyProviderTest {
     }
 
     // only ask for one property
-    Map<String, TemporalInfo> temporalInfoMap = new HashMap<String, TemporalInfo>();
+    Map<String, TemporalInfo> temporalInfoMap = new HashMap<>();
     temporalInfoMap.put(PROPERTY_ID, new TemporalInfoImpl(10L, 20L, 1L));
     Request  request = PropertyHelper.getReadRequest(Collections.singleton(PROPERTY_ID), temporalInfoMap);
 
@@ -531,13 +531,13 @@ public class GangliaPropertyProviderTest {
     resource.setProperty(COMPONENT_NAME_PROPERTY_ID, "FLUME_HANDLER");
 
     // only ask for one property
-    Map<String, TemporalInfo> temporalInfoMap = new HashMap<String, TemporalInfo>();
+    Map<String, TemporalInfo> temporalInfoMap = new HashMap<>();
     temporalInfoMap.put(FLUME_CHANNEL_CAPACITY_PROPERTY, new TemporalInfoImpl(10L, 20L, 1L));
     Request  request = PropertyHelper.getReadRequest(Collections.singleton(FLUME_CHANNEL_CAPACITY_PROPERTY), temporalInfoMap);
 
     Assert.assertEquals(1, propertyProvider.populateResources(Collections.singleton(resource), request, null).size());
 
-    List<String> metricsRegexes = new ArrayList<String>();
+    List<String> metricsRegexes = new ArrayList<>();
     
     metricsRegexes.add(FLUME_CHANNEL_CAPACITY_PROPERTY);
 
@@ -589,9 +589,9 @@ public class GangliaPropertyProviderTest {
     resource.setProperty(COMPONENT_NAME_PROPERTY_ID, "FLUME_HANDLER");
 
     // only ask for one property
-    Map<String, TemporalInfo> temporalInfoMap = new HashMap<String, TemporalInfo>();
+    Map<String, TemporalInfo> temporalInfoMap = new HashMap<>();
 
-    Set<String> ids = new HashSet<String>();
+    Set<String> ids = new HashSet<>();
     ids.add(FLUME_CATEGORY2);
     ids.add(PROPERTY_ID2);
 
@@ -599,7 +599,7 @@ public class GangliaPropertyProviderTest {
 
     Assert.assertEquals(1, propertyProvider.populateResources(Collections.singleton(resource), request, null).size());
 
-    List<String> metricsRegexes = new ArrayList<String>();
+    List<String> metricsRegexes = new ArrayList<>();
     
     metricsRegexes.add("metrics/flume");
     metricsRegexes.add("metrics/cpu/cpu_wio");
@@ -650,7 +650,7 @@ public class GangliaPropertyProviderTest {
     resource.setProperty(HOST_NAME_PROPERTY_ID, "ip-10-39-113-33.ec2.internal");
     resource.setProperty(COMPONENT_NAME_PROPERTY_ID, "FLUME_HANDLER");
 
-    Map<String, TemporalInfo> temporalInfoMap = new HashMap<String, TemporalInfo>();
+    Map<String, TemporalInfo> temporalInfoMap = new HashMap<>();
     Request  request = PropertyHelper.getReadRequest(Collections.<String>emptySet(), temporalInfoMap);
 
     Assert.assertEquals(1, propertyProvider.populateResources(Collections.singleton(resource), request, null).size());
@@ -692,13 +692,13 @@ public class GangliaPropertyProviderTest {
     resource.setProperty(COMPONENT_NAME_PROPERTY_ID, "FLUME_HANDLER");
 
     // only ask for one property
-    Map<String, TemporalInfo> temporalInfoMap = new HashMap<String, TemporalInfo>();
+    Map<String, TemporalInfo> temporalInfoMap = new HashMap<>();
     temporalInfoMap.put(FLUME_CATEGORY, new TemporalInfoImpl(10L, 20L, 1L));
     Request  request = PropertyHelper.getReadRequest(Collections.singleton(FLUME_CATEGORY), temporalInfoMap);
 
     Assert.assertEquals(1, propertyProvider.populateResources(Collections.singleton(resource), request, null).size());
 
-    List<String> metricsRegexes = new ArrayList<String>();
+    List<String> metricsRegexes = new ArrayList<>();
     
     metricsRegexes.add("metrics/flume");
     
@@ -750,13 +750,13 @@ public class GangliaPropertyProviderTest {
     resource.setProperty(COMPONENT_NAME_PROPERTY_ID, "FLUME_HANDLER");
 
     // only ask for one property
-    Map<String, TemporalInfo> temporalInfoMap = new HashMap<String, TemporalInfo>();
+    Map<String, TemporalInfo> temporalInfoMap = new HashMap<>();
     temporalInfoMap.put(FLUME_CATEGORY2, new TemporalInfoImpl(10L, 20L, 1L));
     Request  request = PropertyHelper.getReadRequest(Collections.singleton(FLUME_CATEGORY2), temporalInfoMap);
 
     Assert.assertEquals(1, propertyProvider.populateResources(Collections.singleton(resource), request, null).size());
 
-    List<String> metricsRegexes = new ArrayList<String>();
+    List<String> metricsRegexes = new ArrayList<>();
     
     metricsRegexes.add("metrics/flume/");
     
@@ -808,13 +808,13 @@ public class GangliaPropertyProviderTest {
     resource.setProperty(COMPONENT_NAME_PROPERTY_ID, "FLUME_HANDLER");
 
     // only ask for one property
-    Map<String, TemporalInfo> temporalInfoMap = new HashMap<String, TemporalInfo>();
+    Map<String, TemporalInfo> temporalInfoMap = new HashMap<>();
     temporalInfoMap.put(FLUME_CATEGORY3, new TemporalInfoImpl(10L, 20L, 1L));
     Request  request = PropertyHelper.getReadRequest(Collections.singleton(FLUME_CATEGORY3), temporalInfoMap);
 
     Assert.assertEquals(1, propertyProvider.populateResources(Collections.singleton(resource), request, null).size());
     
-    List<String> metricsRegexes = new ArrayList<String>();
+    List<String> metricsRegexes = new ArrayList<>();
     
     metricsRegexes.add("metrics/flume/$1/CHANNEL/$2/");
     metricsRegexes.add(FLUME_CHANNEL_CAPACITY_PROPERTY);
@@ -867,13 +867,13 @@ public class GangliaPropertyProviderTest {
     resource.setProperty(COMPONENT_NAME_PROPERTY_ID, "FLUME_HANDLER");
 
     // only ask for one property
-    Map<String, TemporalInfo> temporalInfoMap = new HashMap<String, TemporalInfo>();
+    Map<String, TemporalInfo> temporalInfoMap = new HashMap<>();
     temporalInfoMap.put(FLUME_CATEGORY4, new TemporalInfoImpl(10L, 20L, 1L));
     Request  request = PropertyHelper.getReadRequest(Collections.singleton(FLUME_CATEGORY4), temporalInfoMap);
 
     Assert.assertEquals(1, propertyProvider.populateResources(Collections.singleton(resource), request, null).size());
     
-    List<String> metricsRegexes = new ArrayList<String>();
+    List<String> metricsRegexes = new ArrayList<>();
     
     metricsRegexes.add("metrics/flume/$1/CHANNEL/$2");
     metricsRegexes.add(FLUME_CHANNEL_CAPACITY_PROPERTY);
@@ -921,8 +921,8 @@ public class GangliaPropertyProviderTest {
       if (actualParam == null) {
         return false;
       }
-      List<String> actualParamList = new ArrayList<String>(Arrays.asList(actualParam.getValue().split(",")));
-      List<String> expectedParamList = new ArrayList<String>(Arrays.asList(expectedParam.getValue().split(",")));
+      List<String> actualParamList = new ArrayList<>(Arrays.asList(actualParam.getValue().split(",")));
+      List<String> expectedParamList = new ArrayList<>(Arrays.asList(expectedParam.getValue().split(",")));
       
       Collections.sort(actualParamList);
       Collections.sort(expectedParamList);

http://git-wip-us.apache.org/repos/asf/ambari/blob/edbb5492/ambari-server/src/test/java/org/apache/ambari/server/controller/metrics/ganglia/GangliaReportPropertyProviderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/metrics/ganglia/GangliaReportPropertyProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/metrics/ganglia/GangliaReportPropertyProviderTest.java
index 9a4eb03..488e1d6 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/metrics/ganglia/GangliaReportPropertyProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/metrics/ganglia/GangliaReportPropertyProviderTest.java
@@ -91,7 +91,7 @@ public class GangliaReportPropertyProviderTest {
     resource.setProperty(CLUSTER_NAME_PROPERTY_ID, "c1");
 
     // only ask for one property
-    Map<String, TemporalInfo> temporalInfoMap = new HashMap<String, TemporalInfo>();
+    Map<String, TemporalInfo> temporalInfoMap = new HashMap<>();
     temporalInfoMap.put(PROPERTY_ID, new TemporalInfoImpl(10L, 20L, 1L));
     Request request = PropertyHelper.getReadRequest(Collections.singleton(PROPERTY_ID), temporalInfoMap);
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/edbb5492/ambari-server/src/test/java/org/apache/ambari/server/controller/metrics/ganglia/TestStreamProvider.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/metrics/ganglia/TestStreamProvider.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/metrics/ganglia/TestStreamProvider.java
index adc0256..64abe90 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/metrics/ganglia/TestStreamProvider.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/metrics/ganglia/TestStreamProvider.java
@@ -32,7 +32,7 @@ public class TestStreamProvider extends URLStreamProvider {
   // Allow for filename to be set at runtime
   protected String fileName;
   private String lastSpec;
-  protected Set<String> specs = new HashSet<String>();
+  protected Set<String> specs = new HashSet<>();
   private boolean isLastSpecUpdated;
 
   public TestStreamProvider(String fileName) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/edbb5492/ambari-server/src/test/java/org/apache/ambari/server/controller/metrics/timeline/AMSPropertyProviderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/metrics/timeline/AMSPropertyProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/metrics/timeline/AMSPropertyProviderTest.java
index 2ba80b5..24fd47b 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/metrics/timeline/AMSPropertyProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/metrics/timeline/AMSPropertyProviderTest.java
@@ -186,7 +186,7 @@ public class AMSPropertyProviderTest {
     Resource resource = new ResourceImpl(Resource.Type.Host);
     resource.setProperty(CLUSTER_NAME_PROPERTY_ID, "c1");
     resource.setProperty(HOST_NAME_PROPERTY_ID, "h1");
-    Map<String, TemporalInfo> temporalInfoMap = new HashMap<String, TemporalInfo>();
+    Map<String, TemporalInfo> temporalInfoMap = new HashMap<>();
     temporalInfoMap.put(PROPERTY_ID1, new TemporalInfoImpl(1416445244800L, 1416448936474L, 15L));
     Request request = PropertyHelper.getReadRequest(Collections.singleton(PROPERTY_ID1), temporalInfoMap);
     Set<Resource> resources =
@@ -335,7 +335,7 @@ public class AMSPropertyProviderTest {
     Resource resource = new ResourceImpl(Resource.Type.Host);
     resource.setProperty(CLUSTER_NAME_PROPERTY_ID, "c1");
     resource.setProperty(HOST_NAME_PROPERTY_ID, "h1");
-    Map<String, TemporalInfo> temporalInfoMap = new HashMap<String, TemporalInfo>();
+    Map<String, TemporalInfo> temporalInfoMap = new HashMap<>();
     temporalInfoMap.put(PROPERTY_ID1, new TemporalInfoImpl(1416445244701L, 1416448936564L, 15L));
     temporalInfoMap.put(PROPERTY_ID2, new TemporalInfoImpl(1416445244701L, 1416448936564L, 15L));
     Request request = PropertyHelper.getReadRequest(
@@ -364,7 +364,7 @@ public class AMSPropertyProviderTest {
     uriBuilder2.addParameter("startTime", "1416445244701");
     uriBuilder2.addParameter("endTime", "1416448936564");
 
-    List<String> allSpecs = new ArrayList<String>(streamProvider.getAllSpecs());
+    List<String> allSpecs = new ArrayList<>(streamProvider.getAllSpecs());
     Assert.assertEquals(1, allSpecs.size());
     Assert.assertTrue(uriBuilder1.toString().equals(allSpecs.get(0))
       || uriBuilder2.toString().equals(allSpecs.get(0)));
@@ -409,7 +409,7 @@ public class AMSPropertyProviderTest {
     resource.setProperty(CLUSTER_NAME_PROPERTY_ID, "c1");
     resource.setProperty(HOST_NAME_PROPERTY_ID, "h1");// should be set?
     resource.setProperty(COMPONENT_NAME_PROPERTY_ID, "RESOURCEMANAGER");
-    Map<String, TemporalInfo> temporalInfoMap = new HashMap<String, TemporalInfo>();
+    Map<String, TemporalInfo> temporalInfoMap = new HashMap<>();
     temporalInfoMap.put(propertyId1, new TemporalInfoImpl(1416528759233L, 1416531129231L, 1L));
     Request request = PropertyHelper.getReadRequest(
       Collections.singleton(propertyId1), temporalInfoMap);
@@ -459,7 +459,7 @@ public class AMSPropertyProviderTest {
     resource.setProperty(CLUSTER_NAME_PROPERTY_ID, "c1");
     resource.setProperty(HOST_NAME_PROPERTY_ID, "h1");
     resource.setProperty(COMPONENT_NAME_PROPERTY_ID, "NAMENODE");
-    Map<String, TemporalInfo> temporalInfoMap = new HashMap<String, TemporalInfo>();
+    Map<String, TemporalInfo> temporalInfoMap = new HashMap<>();
     temporalInfoMap.put(propertyId, new TemporalInfoImpl(1416528759233L, 1416531129231L, 1L));
     Request request = PropertyHelper.getReadRequest(
       Collections.singleton(propertyId), temporalInfoMap);
@@ -512,7 +512,7 @@ public class AMSPropertyProviderTest {
     namenodeResource.setProperty(HOST_NAME_PROPERTY_ID, "h1");
     namenodeResource.setProperty(COMPONENT_NAME_PROPERTY_ID, "NAMENODE");
 
-    Map<String, TemporalInfo> temporalInfoMap = new HashMap<String, TemporalInfo>();
+    Map<String, TemporalInfo> temporalInfoMap = new HashMap<>();
     for (String propertyId : requestedPropertyIds) {
       temporalInfoMap.put(propertyId, new TemporalInfoImpl(1416528759233L, 1416531129231L, 1L));
     }
@@ -587,7 +587,7 @@ public class AMSPropertyProviderTest {
     resource.setProperty(CLUSTER_NAME_PROPERTY_ID, "c1");
     resource.setProperty(HOST_NAME_PROPERTY_ID, "h1");
     resource.setProperty(COMPONENT_NAME_PROPERTY_ID, "METRICS_COLLECTOR");
-    Map<String, TemporalInfo> temporalInfoMap = new HashMap<String, TemporalInfo>();
+    Map<String, TemporalInfo> temporalInfoMap = new HashMap<>();
     temporalInfoMap.put(propertyId, new TemporalInfoImpl(1421694000L, 1421697600L, 1L));
     Request request = PropertyHelper.getReadRequest(
       Collections.singleton(propertyId), temporalInfoMap);
@@ -661,7 +661,7 @@ public class AMSPropertyProviderTest {
     Resource resource = new ResourceImpl(Resource.Type.Component);
     resource.setProperty(CLUSTER_NAME_PROPERTY_ID, "c1");
     resource.setProperty(COMPONENT_NAME_PROPERTY_ID, "HBASE_REGIONSERVER");
-    Map<String, TemporalInfo> temporalInfoMap = new HashMap<String, TemporalInfo>();
+    Map<String, TemporalInfo> temporalInfoMap = new HashMap<>();
     temporalInfoMap.put(propertyId, new TemporalInfoImpl(1429824611300L, 1429825241400L, 1L));
     Request request = PropertyHelper.getReadRequest(
       Collections.singleton(propertyId), temporalInfoMap);
@@ -706,7 +706,7 @@ public class AMSPropertyProviderTest {
     Resource resource = new ResourceImpl(Resource.Type.Host);
     resource.setProperty(CLUSTER_NAME_PROPERTY_ID, "c1");
     resource.setProperty(HOST_NAME_PROPERTY_ID, "h1");
-    Map<String, TemporalInfo> temporalInfoMap = new HashMap<String, TemporalInfo>();
+    Map<String, TemporalInfo> temporalInfoMap = new HashMap<>();
     // Chopped a section in the middle
     temporalInfoMap.put(PROPERTY_ID1, new TemporalInfoImpl(1416446744801L, 1416447224801L, 1L));
     Request request = PropertyHelper.getReadRequest(Collections.singleton(PROPERTY_ID1), temporalInfoMap);
@@ -780,7 +780,7 @@ public class AMSPropertyProviderTest {
     resource.setProperty(CLUSTER_NAME_PROPERTY_ID, "c1");
     resource.setProperty(HOST_NAME_PROPERTY_ID, "h1");
     resource.setProperty(COMPONENT_NAME_PROPERTY_ID, "DATANODE");
-    Map<String, TemporalInfo> temporalInfoMap = new HashMap<String, TemporalInfo>();
+    Map<String, TemporalInfo> temporalInfoMap = new HashMap<>();
     // Set same time ranges to make sure the query comes in as grouped and
     // then turns into a separate query to the backend
     temporalInfoMap.put(PROPERTY_ID1, new TemporalInfoImpl(1416445244801L, 1416448936464L, 1L));
@@ -906,7 +906,7 @@ public class AMSPropertyProviderTest {
 
     Set<Resource> resources1 =
             propertyProvider.populateResources(resources, request, null);
-    List<String> allSpecs = new ArrayList<String>(streamProvider.getAllSpecs());
+    List<String> allSpecs = new ArrayList<>(streamProvider.getAllSpecs());
     Assert.assertEquals(2, allSpecs.size());
   }
 
@@ -929,7 +929,7 @@ public class AMSPropertyProviderTest {
     resource.setProperty(CLUSTER_NAME_PROPERTY_ID, "c1");
     resource.setProperty(HOST_NAME_PROPERTY_ID, "h1");
     resource.setProperty(COMPONENT_NAME_PROPERTY_ID, "DATANODE");
-    Map<String, TemporalInfo> temporalInfoMap = new HashMap<String, TemporalInfo>();
+    Map<String, TemporalInfo> temporalInfoMap = new HashMap<>();
 
     temporalInfoMap.put(PROPERTY_ID4, new TemporalInfoImpl(1416445244801L, 1416448936464L, 1L));
     Request request = PropertyHelper.getReadRequest(
@@ -967,7 +967,7 @@ public class AMSPropertyProviderTest {
     resource.setProperty(CLUSTER_NAME_PROPERTY_ID, "c1");
     resource.setProperty(HOST_NAME_PROPERTY_ID, "h2");
     resource.setProperty(COMPONENT_NAME_PROPERTY_ID, "DATANODE");
-    temporalInfoMap = new HashMap<String, TemporalInfo>();
+    temporalInfoMap = new HashMap<>();
     temporalInfoMap.put(PROPERTY_ID4, new TemporalInfoImpl(1416445244801L, 1416448936464L, 1L));
     request = PropertyHelper.getReadRequest(
       new HashSet<String>() {{
@@ -1071,7 +1071,7 @@ public class AMSPropertyProviderTest {
     resource2.setProperty(HOST_NAME_PROPERTY_ID, "h2");
 
     // Separating temporal info to ensure multiple requests made
-    Map<String, TemporalInfo> temporalInfoMap = new HashMap<String, TemporalInfo>();
+    Map<String, TemporalInfo> temporalInfoMap = new HashMap<>();
     temporalInfoMap.put(PROPERTY_ID1, new TemporalInfoImpl(1416445244801L, 1416448936464L, 1L));
     temporalInfoMap.put(PROPERTY_ID2, new TemporalInfoImpl(1416445344901L, 1416448946564L, 1L));
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/edbb5492/ambari-server/src/test/java/org/apache/ambari/server/controller/metrics/timeline/AMSReportPropertyProviderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/metrics/timeline/AMSReportPropertyProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/metrics/timeline/AMSReportPropertyProviderTest.java
index 2355d41..2a99d9c 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/metrics/timeline/AMSReportPropertyProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/metrics/timeline/AMSReportPropertyProviderTest.java
@@ -83,7 +83,7 @@ public class AMSReportPropertyProviderTest {
     String propertyId = PropertyHelper.getPropertyId("metrics/cpu", "User");
     Resource resource = new ResourceImpl(Resource.Type.Cluster);
     resource.setProperty(CLUSTER_NAME_PROPERTY_ID, "c1");
-    Map<String, TemporalInfo> temporalInfoMap = new HashMap<String, TemporalInfo>();
+    Map<String, TemporalInfo> temporalInfoMap = new HashMap<>();
     temporalInfoMap.put(propertyId, new TemporalInfoImpl(1416445244800L, 1416448936474L, 1L));
     Request request = PropertyHelper.getReadRequest(
       Collections.singleton(propertyId), temporalInfoMap);
@@ -126,7 +126,7 @@ public class AMSReportPropertyProviderTest {
     String propertyId = PropertyHelper.getPropertyId("metrics/cpu", "User._sum");
     Resource resource = new ResourceImpl(Resource.Type.Cluster);
     resource.setProperty(CLUSTER_NAME_PROPERTY_ID, "c1");
-    Map<String, TemporalInfo> temporalInfoMap = new HashMap<String, TemporalInfo>();
+    Map<String, TemporalInfo> temporalInfoMap = new HashMap<>();
     temporalInfoMap.put(propertyId, new TemporalInfoImpl(1432033257812L, 1432035927922L, 1L));
     Request request = PropertyHelper.getReadRequest(
       Collections.singleton(propertyId), temporalInfoMap);

http://git-wip-us.apache.org/repos/asf/ambari/blob/edbb5492/ambari-server/src/test/java/org/apache/ambari/server/controller/metrics/timeline/MetricsPaddingMethodTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/metrics/timeline/MetricsPaddingMethodTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/metrics/timeline/MetricsPaddingMethodTest.java
index 1a9d789..0ba6fb5 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/metrics/timeline/MetricsPaddingMethodTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/metrics/timeline/MetricsPaddingMethodTest.java
@@ -40,7 +40,7 @@ public class MetricsPaddingMethodTest {
     timelineMetric.setHostName("h1");
     timelineMetric.setAppId("a1");
     timelineMetric.setTimestamp(now);
-    TreeMap<Long, Double> inputValues = new TreeMap<Long, Double>();
+    TreeMap<Long, Double> inputValues = new TreeMap<>();
     inputValues.put(now - 1000, 1.0d);
     inputValues.put(now - 2000, 2.0d);
     inputValues.put(now - 3000, 3.0d);
@@ -68,7 +68,7 @@ public class MetricsPaddingMethodTest {
     timelineMetric.setHostName("h1");
     timelineMetric.setAppId("a1");
     timelineMetric.setTimestamp(now);
-    TreeMap<Long, Double> inputValues = new TreeMap<Long, Double>();
+    TreeMap<Long, Double> inputValues = new TreeMap<>();
     inputValues.put(now - 1000, 1.0d);
     inputValues.put(now - 2000, 2.0d);
     inputValues.put(now - 3000, 3.0d);
@@ -96,7 +96,7 @@ public class MetricsPaddingMethodTest {
     timelineMetric.setHostName("h1");
     timelineMetric.setAppId("a1");
     timelineMetric.setTimestamp(now);
-    TreeMap<Long, Double> inputValues = new TreeMap<Long, Double>();
+    TreeMap<Long, Double> inputValues = new TreeMap<>();
     inputValues.put(now, 0.0d);
     inputValues.put(now - 1000, 1.0d);
     inputValues.put(now - 2000, 2.0d);
@@ -124,7 +124,7 @@ public class MetricsPaddingMethodTest {
     timelineMetric.setHostName("h1");
     timelineMetric.setAppId("a1");
     timelineMetric.setTimestamp(now);
-    TreeMap<Long, Double> inputValues = new TreeMap<Long, Double>();
+    TreeMap<Long, Double> inputValues = new TreeMap<>();
     inputValues.put(now - 1000, 1.0d);
     timelineMetric.setMetricValues(inputValues);
 
@@ -150,7 +150,7 @@ public class MetricsPaddingMethodTest {
     timelineMetric.setHostName("h1");
     timelineMetric.setAppId("a1");
     timelineMetric.setTimestamp(now);
-    TreeMap<Long, Double> inputValues = new TreeMap<Long, Double>();
+    TreeMap<Long, Double> inputValues = new TreeMap<>();
     inputValues.put(now - 1000, 1.0d);
     timelineMetric.setMetricValues(inputValues);
 
@@ -174,7 +174,7 @@ public class MetricsPaddingMethodTest {
     timelineMetric.setHostName("h1");
     timelineMetric.setAppId("a1");
     timelineMetric.setTimestamp(now);
-    TreeMap<Long, Double> inputValues = new TreeMap<Long, Double>();
+    TreeMap<Long, Double> inputValues = new TreeMap<>();
 
     long seconds = 1000;
     long minute = 60*seconds;
@@ -235,7 +235,7 @@ public class MetricsPaddingMethodTest {
     timelineMetric.setHostName("h1");
     timelineMetric.setAppId("a1");
     timelineMetric.setTimestamp(now);
-    TreeMap<Long, Double> inputValues = new TreeMap<Long, Double>();
+    TreeMap<Long, Double> inputValues = new TreeMap<>();
     inputValues.put(now - 100, 1.0d);
     inputValues.put(now - 200, 2.0d);
     inputValues.put(now - 300, 3.0d);

http://git-wip-us.apache.org/repos/asf/ambari/blob/edbb5492/ambari-server/src/test/java/org/apache/ambari/server/controller/metrics/timeline/MetricsRequestHelperTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/metrics/timeline/MetricsRequestHelperTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/metrics/timeline/MetricsRequestHelperTest.java
index 5d55e41..366f5a0 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/metrics/timeline/MetricsRequestHelperTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/metrics/timeline/MetricsRequestHelperTest.java
@@ -53,7 +53,7 @@ public class MetricsRequestHelperTest {
     TimelineMetric timelineMetric = new TimelineMetric();
     timelineMetric.setMetricName("cpu_user");
     timelineMetric.setAppId("app1");
-    TreeMap<Long, Double> metricValues = new TreeMap<Long, Double>();
+    TreeMap<Long, Double> metricValues = new TreeMap<>();
     metricValues.put(now + 100, 1.0);
     metricValues.put(now + 200, 2.0);
     metricValues.put(now + 300, 3.0);

http://git-wip-us.apache.org/repos/asf/ambari/blob/edbb5492/ambari-server/src/test/java/org/apache/ambari/server/controller/metrics/timeline/cache/TimelineMetricCacheTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/metrics/timeline/cache/TimelineMetricCacheTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/metrics/timeline/cache/TimelineMetricCacheTest.java
index ae9e203..e5fc4e1 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/metrics/timeline/cache/TimelineMetricCacheTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/metrics/timeline/cache/TimelineMetricCacheTest.java
@@ -142,7 +142,7 @@ public class TimelineMetricCacheTest {
     TimelineMetric timelineMetric = new TimelineMetric();
     timelineMetric.setMetricName("cpu_user");
     timelineMetric.setAppId("app1");
-    TreeMap<Long, Double> metricValues = new TreeMap<Long, Double>();
+    TreeMap<Long, Double> metricValues = new TreeMap<>();
     metricValues.put(now + 100, 1.0);
     metricValues.put(now + 200, 2.0);
     metricValues.put(now + 300, 3.0);
@@ -315,7 +315,7 @@ public class TimelineMetricCacheTest {
     final TimelineMetric timelineMetric1 = new TimelineMetric();
     timelineMetric1.setMetricName("cpu_user");
     timelineMetric1.setAppId("app1");
-    TreeMap<Long, Double> metricValues = new TreeMap<Long, Double>();
+    TreeMap<Long, Double> metricValues = new TreeMap<>();
     metricValues.put(now - 100, 1.0);
     metricValues.put(now - 200, 2.0);
     metricValues.put(now - 300, 3.0);
@@ -323,7 +323,7 @@ public class TimelineMetricCacheTest {
     final TimelineMetric timelineMetric2 = new TimelineMetric();
     timelineMetric2.setMetricName("cpu_nice");
     timelineMetric2.setAppId("app1");
-    metricValues = new TreeMap<Long, Double>();
+    metricValues = new TreeMap<>();
     metricValues.put(now + 400, 1.0);
     metricValues.put(now + 500, 2.0);
     metricValues.put(now + 600, 3.0);
@@ -341,7 +341,7 @@ public class TimelineMetricCacheTest {
     TimelineMetric timelineMetric3 = new TimelineMetric();
     timelineMetric3.setMetricName("cpu_user");
     timelineMetric3.setAppId("app1");
-    metricValues = new TreeMap<Long, Double>();
+    metricValues = new TreeMap<>();
     metricValues.put(now + 1400, 1.0);
     metricValues.put(now + 1500, 2.0);
     metricValues.put(now + 1600, 3.0);
@@ -420,12 +420,12 @@ public class TimelineMetricCacheTest {
     long year = 365 * day;
 
     //Original Values
-    Map<String, TimelineMetric> valueMap = new HashMap<String, TimelineMetric>();
+    Map<String, TimelineMetric> valueMap = new HashMap<>();
     TimelineMetric timelineMetric = new TimelineMetric();
     timelineMetric.setMetricName("cpu_user");
     timelineMetric.setAppId("app1");
 
-    TreeMap<Long, Double> metricValues = new TreeMap<Long, Double>();
+    TreeMap<Long, Double> metricValues = new TreeMap<>();
     for (long i = 1 * year - 1 * day; i >= 0; i -= 1 * day) {
       metricValues.put(now-i, 1.0);
     }
@@ -446,12 +446,12 @@ public class TimelineMetricCacheTest {
     key.setSpec("");
 
     //Updated values
-    Map<String, TimelineMetric> newValueMap = new HashMap<String, TimelineMetric>();
+    Map<String, TimelineMetric> newValueMap = new HashMap<>();
     TimelineMetric newTimelineMetric = new TimelineMetric();
     newTimelineMetric.setMetricName("cpu_user");
     newTimelineMetric.setAppId("app1");
 
-    TreeMap<Long, Double> newMetricValues = new TreeMap<Long, Double>();
+    TreeMap<Long, Double> newMetricValues = new TreeMap<>();
     for(long i=1*hour;i<=2*day;i+=hour) {
       newMetricValues.put(now-1*day+i, 2.0);
     }

http://git-wip-us.apache.org/repos/asf/ambari/blob/edbb5492/ambari-server/src/test/java/org/apache/ambari/server/controller/predicate/AndPredicateTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/predicate/AndPredicateTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/predicate/AndPredicateTest.java
index cfc401e..ce5900c 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/predicate/AndPredicateTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/predicate/AndPredicateTest.java
@@ -38,9 +38,9 @@ public class AndPredicateTest {
     String propertyId2 = PropertyHelper.getPropertyId("category1", "property2");
     String propertyId3 = PropertyHelper.getPropertyId("category1", "property3");
 
-    EqualsPredicate predicate1 = new EqualsPredicate<String>(propertyId1, "v1");
-    EqualsPredicate predicate2 = new EqualsPredicate<String>(propertyId2, "v2");
-    EqualsPredicate predicate3 = new EqualsPredicate<String>(propertyId3, "v3");
+    EqualsPredicate predicate1 = new EqualsPredicate<>(propertyId1, "v1");
+    EqualsPredicate predicate2 = new EqualsPredicate<>(propertyId2, "v2");
+    EqualsPredicate predicate3 = new EqualsPredicate<>(propertyId3, "v3");
 
     AndPredicate andPredicate = new AndPredicate(predicate1, predicate2, predicate3);
 
@@ -59,9 +59,9 @@ public class AndPredicateTest {
     String propertyId2 = PropertyHelper.getPropertyId("category1", "property2");
     String propertyId3 = PropertyHelper.getPropertyId("category1", "property3");
 
-    EqualsPredicate predicate1 = new EqualsPredicate<String>(propertyId1, "v1");
-    EqualsPredicate predicate2 = new EqualsPredicate<String>(propertyId2, "v2");
-    EqualsPredicate predicate3 = new EqualsPredicate<String>(propertyId3, "v3");
+    EqualsPredicate predicate1 = new EqualsPredicate<>(propertyId1, "v1");
+    EqualsPredicate predicate2 = new EqualsPredicate<>(propertyId2, "v2");
+    EqualsPredicate predicate3 = new EqualsPredicate<>(propertyId3, "v3");
 
     AndPredicate andPredicate = new AndPredicate(predicate1, predicate2, predicate3);
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/edbb5492/ambari-server/src/test/java/org/apache/ambari/server/controller/predicate/CategoryIsEmptyPredicateTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/predicate/CategoryIsEmptyPredicateTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/predicate/CategoryIsEmptyPredicateTest.java
index dd83f5a..27afc18 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/predicate/CategoryIsEmptyPredicateTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/predicate/CategoryIsEmptyPredicateTest.java
@@ -58,7 +58,7 @@ public class CategoryIsEmptyPredicateTest {
 
     Assert.assertTrue(predicate.evaluate(resource));
 
-    Map<String, String> mapProperty = new HashMap<String, String>();
+    Map<String, String> mapProperty = new HashMap<>();
 
     resource.setProperty(propertyId, mapProperty);
     Assert.assertTrue(predicate.evaluate(resource));

http://git-wip-us.apache.org/repos/asf/ambari/blob/edbb5492/ambari-server/src/test/java/org/apache/ambari/server/controller/predicate/EqualsPredicateTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/predicate/EqualsPredicateTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/predicate/EqualsPredicateTest.java
index dd02d22..375ecbc 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/predicate/EqualsPredicateTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/predicate/EqualsPredicateTest.java
@@ -36,7 +36,7 @@ public class EqualsPredicateTest {
   public void testApply() {
     Resource resource = new ResourceImpl(Resource.Type.HostComponent);
     String propertyId = PropertyHelper.getPropertyId("category1", "foo");
-    Predicate predicate = new EqualsPredicate<String>(propertyId, "bar");
+    Predicate predicate = new EqualsPredicate<>(propertyId, "bar");
 
     resource.setProperty(propertyId, "monkey");
     Assert.assertFalse(predicate.evaluate(resource));
@@ -46,7 +46,7 @@ public class EqualsPredicateTest {
 
 
     propertyId = PropertyHelper.getPropertyId("category1", "fun");
-    predicate = new EqualsPredicate<String>(propertyId, "bar");
+    predicate = new EqualsPredicate<>(propertyId, "bar");
 
     Assert.assertFalse(predicate.evaluate(resource));
   }
@@ -67,7 +67,7 @@ public class EqualsPredicateTest {
   @Test
   public void testGetProperties() {
     String propertyId = PropertyHelper.getPropertyId("category1", "foo");
-    EqualsPredicate predicate = new EqualsPredicate<String>(propertyId, "bar");
+    EqualsPredicate predicate = new EqualsPredicate<>(propertyId, "bar");
 
     Set<String> ids = predicate.getPropertyIds();
 
@@ -79,7 +79,7 @@ public class EqualsPredicateTest {
   public void testApplyNumberValues() throws Exception {
     Resource resource = new ResourceImpl(Resource.Type.HostComponent);
     String propertyId = PropertyHelper.getPropertyId("propertyId1", "1");
-    Predicate predicate = new EqualsPredicate<String>(propertyId, "1");
+    Predicate predicate = new EqualsPredicate<>(propertyId, "1");
     resource.setProperty(propertyId, "1");
     Assert.assertTrue(predicate.evaluate(resource));
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/edbb5492/ambari-server/src/test/java/org/apache/ambari/server/controller/predicate/GreaterEqualsPredicateTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/predicate/GreaterEqualsPredicateTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/predicate/GreaterEqualsPredicateTest.java
index 3e0d56e..0f4db03 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/predicate/GreaterEqualsPredicateTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/predicate/GreaterEqualsPredicateTest.java
@@ -36,7 +36,7 @@ public class GreaterEqualsPredicateTest {
   public void testApply() {
     Resource resource = new ResourceImpl(Resource.Type.HostComponent);
     String propertyId = PropertyHelper.getPropertyId("category1", "foo");
-    Predicate predicate = new GreaterEqualsPredicate<Integer>(propertyId, 10);
+    Predicate predicate = new GreaterEqualsPredicate<>(propertyId, 10);
 
     resource.setProperty(propertyId, 1);
     Assert.assertFalse(predicate.evaluate(resource));
@@ -61,7 +61,7 @@ public class GreaterEqualsPredicateTest {
   @Test
   public void testGetProperties() {
     String propertyId = PropertyHelper.getPropertyId("category1", "foo");
-    GreaterEqualsPredicate predicate = new GreaterEqualsPredicate<Integer>(propertyId, 10);
+    GreaterEqualsPredicate predicate = new GreaterEqualsPredicate<>(propertyId, 10);
 
     Set<String> ids = predicate.getPropertyIds();
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/edbb5492/ambari-server/src/test/java/org/apache/ambari/server/controller/predicate/GreaterPredicateTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/predicate/GreaterPredicateTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/predicate/GreaterPredicateTest.java
index c18db98..d11b99e 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/predicate/GreaterPredicateTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/predicate/GreaterPredicateTest.java
@@ -36,7 +36,7 @@ public class GreaterPredicateTest {
   public void testApply() {
     Resource resource = new ResourceImpl(Resource.Type.HostComponent);
     String propertyId = PropertyHelper.getPropertyId("category1", "foo");
-    Predicate predicate = new GreaterPredicate<Integer>(propertyId, 10);
+    Predicate predicate = new GreaterPredicate<>(propertyId, 10);
 
     resource.setProperty(propertyId, 1);
     Assert.assertFalse(predicate.evaluate(resource));
@@ -61,7 +61,7 @@ public class GreaterPredicateTest {
   @Test
   public void testGetProperties() {
     String propertyId = PropertyHelper.getPropertyId("category1", "foo");
-    GreaterPredicate predicate = new GreaterPredicate<Integer>(propertyId, 10);
+    GreaterPredicate predicate = new GreaterPredicate<>(propertyId, 10);
 
     Set<String> ids = predicate.getPropertyIds();
 
@@ -73,7 +73,7 @@ public class GreaterPredicateTest {
   public void testApplyWithSmallFloats() {
     Resource resource = new ResourceImpl(Resource.Type.HostComponent);
     String propertyId = PropertyHelper.getPropertyId("category1", "foo");
-    Predicate predicate = new GreaterPredicate<Double>(propertyId, 0.1);
+    Predicate predicate = new GreaterPredicate<>(propertyId, 0.1);
 
     resource.setProperty(propertyId, 1.3);
     Assert.assertTrue(predicate.evaluate(resource));

http://git-wip-us.apache.org/repos/asf/ambari/blob/edbb5492/ambari-server/src/test/java/org/apache/ambari/server/controller/predicate/LessEqualsPredicateTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/predicate/LessEqualsPredicateTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/predicate/LessEqualsPredicateTest.java
index 4fcb58b..05a901a 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/predicate/LessEqualsPredicateTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/predicate/LessEqualsPredicateTest.java
@@ -36,7 +36,7 @@ public class LessEqualsPredicateTest {
   public void testApply() {
     Resource resource = new ResourceImpl(Resource.Type.HostComponent);
     String propertyId = PropertyHelper.getPropertyId("category1", "foo");
-    Predicate predicate = new LessEqualsPredicate<Integer>(propertyId, 10);
+    Predicate predicate = new LessEqualsPredicate<>(propertyId, 10);
 
     resource.setProperty(propertyId, 1);
     Assert.assertTrue(predicate.evaluate(resource));
@@ -61,7 +61,7 @@ public class LessEqualsPredicateTest {
   @Test
   public void testGetProperties() {
     String propertyId = PropertyHelper.getPropertyId("category1", "foo");
-    LessEqualsPredicate predicate = new LessEqualsPredicate<Integer>(propertyId, 10);
+    LessEqualsPredicate predicate = new LessEqualsPredicate<>(propertyId, 10);
 
     Set<String> ids = predicate.getPropertyIds();
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/edbb5492/ambari-server/src/test/java/org/apache/ambari/server/controller/predicate/LessPredicateTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/predicate/LessPredicateTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/predicate/LessPredicateTest.java
index 12eda1b..1298a2c 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/predicate/LessPredicateTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/predicate/LessPredicateTest.java
@@ -36,7 +36,7 @@ public class LessPredicateTest {
   public void testApply() {
     Resource resource = new ResourceImpl(Resource.Type.HostComponent);
     String propertyId = PropertyHelper.getPropertyId("category1", "foo");
-    Predicate predicate = new LessPredicate<Integer>(propertyId, 10);
+    Predicate predicate = new LessPredicate<>(propertyId, 10);
 
     resource.setProperty(propertyId, 1);
     Assert.assertTrue(predicate.evaluate(resource));
@@ -61,7 +61,7 @@ public class LessPredicateTest {
   @Test
   public void testGetProperties() {
     String propertyId = PropertyHelper.getPropertyId("category1", "foo");
-    LessPredicate predicate = new LessPredicate<Integer>(propertyId, 1);
+    LessPredicate predicate = new LessPredicate<>(propertyId, 1);
 
     Set<String> ids = predicate.getPropertyIds();
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/edbb5492/ambari-server/src/test/java/org/apache/ambari/server/controller/predicate/NotPredicateTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/predicate/NotPredicateTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/predicate/NotPredicateTest.java
index 809b6d5..fe3f7f2 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/predicate/NotPredicateTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/predicate/NotPredicateTest.java
@@ -35,7 +35,7 @@ public class NotPredicateTest {
   public void testApply() {
     Resource resource = new ResourceImpl(Resource.Type.HostComponent);
     String propertyId = PropertyHelper.getPropertyId("category1", "foo");
-    EqualsPredicate predicate = new EqualsPredicate<String>(propertyId, "bar");
+    EqualsPredicate predicate = new EqualsPredicate<>(propertyId, "bar");
     NotPredicate notPredicate = new NotPredicate(predicate);
 
     resource.setProperty(propertyId, "monkey");
@@ -48,7 +48,7 @@ public class NotPredicateTest {
   @Test
   public void testGetProperties() {
     String propertyId = PropertyHelper.getPropertyId("category1", "foo");
-    EqualsPredicate predicate = new EqualsPredicate<String>(propertyId, "bar");
+    EqualsPredicate predicate = new EqualsPredicate<>(propertyId, "bar");
 
     Set<String> ids = predicate.getPropertyIds();
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/edbb5492/ambari-server/src/test/java/org/apache/ambari/server/controller/predicate/OrPredicateTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/predicate/OrPredicateTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/predicate/OrPredicateTest.java
index 02dbd60..f2c5b6b 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/predicate/OrPredicateTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/predicate/OrPredicateTest.java
@@ -38,9 +38,9 @@ public class OrPredicateTest {
     String propertyId2 = PropertyHelper.getPropertyId("category1", "property2");
     String propertyId3 = PropertyHelper.getPropertyId("category1", "property3");
 
-    EqualsPredicate predicate1 = new EqualsPredicate<String>(propertyId1, "v1");
-    EqualsPredicate predicate2 = new EqualsPredicate<String>(propertyId2, "v2");
-    EqualsPredicate predicate3 = new EqualsPredicate<String>(propertyId3, "v3");
+    EqualsPredicate predicate1 = new EqualsPredicate<>(propertyId1, "v1");
+    EqualsPredicate predicate2 = new EqualsPredicate<>(propertyId2, "v2");
+    EqualsPredicate predicate3 = new EqualsPredicate<>(propertyId3, "v3");
 
     OrPredicate orPredicate = new OrPredicate(predicate1, predicate2, predicate3);
 
@@ -59,9 +59,9 @@ public class OrPredicateTest {
     String propertyId2 = PropertyHelper.getPropertyId("category1", "property2");
     String propertyId3 = PropertyHelper.getPropertyId("category1", "property3");
 
-    EqualsPredicate predicate1 = new EqualsPredicate<String>(propertyId1, "v1");
-    EqualsPredicate predicate2 = new EqualsPredicate<String>(propertyId2, "v2");
-    EqualsPredicate predicate3 = new EqualsPredicate<String>(propertyId3, "v3");
+    EqualsPredicate predicate1 = new EqualsPredicate<>(propertyId1, "v1");
+    EqualsPredicate predicate2 = new EqualsPredicate<>(propertyId2, "v2");
+    EqualsPredicate predicate3 = new EqualsPredicate<>(propertyId3, "v3");
 
     OrPredicate orPredicate = new OrPredicate(predicate1, predicate2, predicate3);
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/edbb5492/ambari-server/src/test/java/org/apache/ambari/server/controller/predicate/PredicateVisitorTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/predicate/PredicateVisitorTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/predicate/PredicateVisitorTest.java
index 7bb41b1..cb9f287 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/predicate/PredicateVisitorTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/predicate/PredicateVisitorTest.java
@@ -31,7 +31,7 @@ public class PredicateVisitorTest {
   public void testVisitor() {
 
     String propertyId = PropertyHelper.getPropertyId("category1", "foo");
-    EqualsPredicate equalsPredicate = new EqualsPredicate<String>(propertyId, "bar");
+    EqualsPredicate equalsPredicate = new EqualsPredicate<>(propertyId, "bar");
 
     TestPredicateVisitor visitor = new TestPredicateVisitor();
     equalsPredicate.accept(visitor);

http://git-wip-us.apache.org/repos/asf/ambari/blob/edbb5492/ambari-server/src/test/java/org/apache/ambari/server/controller/test/BufferedThreadPoolExecutorCompletionServiceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/test/BufferedThreadPoolExecutorCompletionServiceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/test/BufferedThreadPoolExecutorCompletionServiceTest.java
index 71dca55..4c1f04f 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/test/BufferedThreadPoolExecutorCompletionServiceTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/test/BufferedThreadPoolExecutorCompletionServiceTest.java
@@ -46,7 +46,7 @@ public class BufferedThreadPoolExecutorCompletionServiceTest {
     int CORE_POOL_SIZE = 2;
     int MAX_POOL_SIZE = 5;
     int TASKS_COUNT = 8;
-    LinkedBlockingQueue<Runnable> queue = new LinkedBlockingQueue<Runnable>();
+    LinkedBlockingQueue<Runnable> queue = new LinkedBlockingQueue<>();
     ThreadPoolExecutor threadPoolExecutor = new ThreadPoolExecutor(CORE_POOL_SIZE, MAX_POOL_SIZE, 30000, TimeUnit.MILLISECONDS, queue);
     BufferedThreadPoolExecutorCompletionService<Runnable> service = new BufferedThreadPoolExecutorCompletionService<>(threadPoolExecutor);
     for (int tc = 0; tc < TASKS_COUNT; tc++) {
@@ -84,7 +84,7 @@ public class BufferedThreadPoolExecutorCompletionServiceTest {
     int CORE_POOL_SIZE = 2;
     int MAX_POOL_SIZE = 10;
     int TASKS_COUNT = 8;
-    LinkedBlockingQueue<Runnable> queue = new LinkedBlockingQueue<Runnable>(CORE_POOL_SIZE);
+    LinkedBlockingQueue<Runnable> queue = new LinkedBlockingQueue<>(CORE_POOL_SIZE);
     ThreadPoolExecutor threadPoolExecutor = new ThreadPoolExecutor(CORE_POOL_SIZE, MAX_POOL_SIZE, 30000, TimeUnit.MILLISECONDS, queue);
     BufferedThreadPoolExecutorCompletionService<Runnable> service = new BufferedThreadPoolExecutorCompletionService<>(threadPoolExecutor);
     for (int tc = 0; tc < TASKS_COUNT; tc++) {
@@ -122,7 +122,7 @@ public class BufferedThreadPoolExecutorCompletionServiceTest {
     int CORE_POOL_SIZE = 2;
     int MAX_POOL_SIZE = 10;
     int TASKS_COUNT = 24;
-    LinkedBlockingQueue<Runnable> queue = new LinkedBlockingQueue<Runnable>(CORE_POOL_SIZE);
+    LinkedBlockingQueue<Runnable> queue = new LinkedBlockingQueue<>(CORE_POOL_SIZE);
     ThreadPoolExecutor threadPoolExecutor = new ThreadPoolExecutor(CORE_POOL_SIZE, MAX_POOL_SIZE, 30000, TimeUnit.MILLISECONDS, queue);
     BufferedThreadPoolExecutorCompletionService<Runnable> service = new BufferedThreadPoolExecutorCompletionService<>(threadPoolExecutor);
     for (int tc = 0; tc < TASKS_COUNT; tc++) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/edbb5492/ambari-server/src/test/java/org/apache/ambari/server/controller/utilities/PropertyHelperTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/utilities/PropertyHelperTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/utilities/PropertyHelperTest.java
index adbafe4..403739e 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/utilities/PropertyHelperTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/utilities/PropertyHelperTest.java
@@ -97,7 +97,7 @@ public class PropertyHelperTest {
     Assert.assertTrue(categories.contains("metrics"));
 
     String propertyId2 = "foo/bar/baz";
-    Set<String> propertyIds = new HashSet<String>();
+    Set<String> propertyIds = new HashSet<>();
     propertyIds.add(propertyId);
     propertyIds.add(propertyId2);
 
@@ -139,7 +139,7 @@ public class PropertyHelperTest {
    * this test.
    */
   public void testDuplicatePointInTimeMetrics() {
-    TreeSet<String> set = new TreeSet<String>();
+    TreeSet<String> set = new TreeSet<>();
 
     for (Resource.Type type : Resource.Type.values()) {
 
@@ -201,7 +201,7 @@ public class PropertyHelperTest {
    * exception to this test.
    */
   public void testTemporalOnlyMetrics() {
-    TreeSet<String> set = new TreeSet<String>();
+    TreeSet<String> set = new TreeSet<>();
 
     for (Resource.Type type : Resource.Type.values()) {
 
@@ -264,7 +264,7 @@ public class PropertyHelperTest {
    * Test to make sure that no JMX metrics are marked as point in time.
    */
   public void testJMXTemporal() {
-    TreeSet<String> set = new TreeSet<String>();
+    TreeSet<String> set = new TreeSet<>();
 
     for (Resource.Type type : Resource.Type.values()) {
 
@@ -369,12 +369,12 @@ public class PropertyHelperTest {
   // remove any replacement tokens (e.g. $1.replaceAll(\",q(\\d+)=\",\"/\").substring(1)) in the metric names
   private static Map<String, Map<String, PropertyInfo>> normalizeMetricNames(Map<String, Map<String, PropertyInfo>> gids) {
 
-    Map<String, Map<String, PropertyInfo>> returnMap = new HashMap<String, Map<String, PropertyInfo>>();
+    Map<String, Map<String, PropertyInfo>> returnMap = new HashMap<>();
 
     for (Map.Entry<String, Map<String, PropertyInfo>> gComponentEntry : gids.entrySet()) {
 
       String gComponent = gComponentEntry.getKey();
-      Map<String, PropertyInfo> newMap = new HashMap<String, PropertyInfo>();
+      Map<String, PropertyInfo> newMap = new HashMap<>();
 
       Set<Map.Entry<String, PropertyInfo>> gComponentEntries = gComponentEntry.getValue().entrySet();
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/edbb5492/ambari-server/src/test/java/org/apache/ambari/server/controller/utilities/webserver/StartServer.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/utilities/webserver/StartServer.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/utilities/webserver/StartServer.java
index bc61685..41cbde6 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/utilities/webserver/StartServer.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/utilities/webserver/StartServer.java
@@ -50,7 +50,7 @@ public class StartServer {
   }
 
   private static Map<String, String> parseArgs(String[] args) {
-    Map<String, String> mapProps = new HashMap<String, String>();
+    Map<String, String> mapProps = new HashMap<>();
     mapProps.put("port", "9998");
     mapProps.put("db", "/var/db/hmc/data/data.db");
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/edbb5492/ambari-server/src/test/java/org/apache/ambari/server/credentialapi/CredentialUtilTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/credentialapi/CredentialUtilTest.java b/ambari-server/src/test/java/org/apache/ambari/server/credentialapi/CredentialUtilTest.java
index abc7cfe..a09f037 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/credentialapi/CredentialUtilTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/credentialapi/CredentialUtilTest.java
@@ -95,7 +95,7 @@ public class CredentialUtilTest {
    * @return
    */
   private String[] getCreateArgs(String alias, String credential, String providerPath) {
-    List<String> args = new ArrayList<String>();
+    List<String> args = new ArrayList<>();
 
     args.add(CREATE_VERB);
     args.add(alias);
@@ -116,7 +116,7 @@ public class CredentialUtilTest {
    * @return
    */
   private String[] getSafeCreateArgs(String alias, String credential, String providerPath) {
-    List<String> args = new ArrayList<String>();
+    List<String> args = new ArrayList<>();
 
     args.add(CREATE_VERB);
     args.add(alias);
@@ -138,7 +138,7 @@ public class CredentialUtilTest {
    * @return
    */
   private String[] getUpdateArgs(String alias, String credential, String providerPath) {
-    List<String> args = new ArrayList<String>();
+    List<String> args = new ArrayList<>();
 
     args.add(CREATE_VERB);
     args.add(alias);
@@ -159,7 +159,7 @@ public class CredentialUtilTest {
    * @return
    */
   private String[] getDeleteArgs(String alias, String providerPath) {
-    List<String> args = new ArrayList<String>();
+    List<String> args = new ArrayList<>();
 
     args.add(DELETE_VERB);
     args.add(alias);
@@ -177,7 +177,7 @@ public class CredentialUtilTest {
    * @return
    */
   private String[] getListArgs(String providerPath) {
-    List<String> args = new ArrayList<String>();
+    List<String> args = new ArrayList<>();
 
     args.add(LIST_VERB);
     args.add("-provider");
@@ -194,7 +194,7 @@ public class CredentialUtilTest {
    * @return
    */
   private String[] getGetArgs(String alias, String providerPath) {
-    List<String> args = new ArrayList<String>();
+    List<String> args = new ArrayList<>();
 
     args.add(GET_VERB);
     args.add(alias);

http://git-wip-us.apache.org/repos/asf/ambari/blob/edbb5492/ambari-server/src/test/java/org/apache/ambari/server/events/EventsTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/events/EventsTest.java b/ambari-server/src/test/java/org/apache/ambari/server/events/EventsTest.java
index 90ac29f..98510db 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/events/EventsTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/events/EventsTest.java
@@ -107,7 +107,7 @@ public class EventsTest {
     m_clusters.addHost(HOSTNAME);
 
     Host host = m_clusters.getHost(HOSTNAME);
-    Map<String, String> hostAttributes = new HashMap<String, String>();
+    Map<String, String> hostAttributes = new HashMap<>();
     hostAttributes.put("os_family", "redhat");
     hostAttributes.put("os_release_version", "6.4");
     host.setHostAttributes(hostAttributes);

http://git-wip-us.apache.org/repos/asf/ambari/blob/edbb5492/ambari-server/src/test/java/org/apache/ambari/server/events/MockEventListener.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/events/MockEventListener.java b/ambari-server/src/test/java/org/apache/ambari/server/events/MockEventListener.java
index f97cbcf..e5f39b1 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/events/MockEventListener.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/events/MockEventListener.java
@@ -38,13 +38,13 @@ public class MockEventListener {
    * When an event is received, its class is captured and the event object is
    * added to the list.
    */
-  private final Map<Class<?>, List<AmbariEvent>> m_receivedAmbariEvents = new HashMap<Class<?>, List<AmbariEvent>>();
+  private final Map<Class<?>, List<AmbariEvent>> m_receivedAmbariEvents = new HashMap<>();
 
   /**
    * When an event is received, its class is captured and the event object is
    * added to the list.
    */
-  private final Map<Class<?>, List<AlertEvent>> m_receivedAlertEvents = new HashMap<Class<?>, List<AlertEvent>>();
+  private final Map<Class<?>, List<AlertEvent>> m_receivedAlertEvents = new HashMap<>();
 
   /**
    * Resets the captured events.
@@ -146,7 +146,7 @@ public class MockEventListener {
   public void onAmbariEvent(AmbariEvent event) {
     List<AmbariEvent> events = m_receivedAmbariEvents.get(event.getClass());
     if (null == events) {
-      events = new ArrayList<AmbariEvent>();
+      events = new ArrayList<>();
       m_receivedAmbariEvents.put(event.getClass(), events);
     }
 
@@ -160,7 +160,7 @@ public class MockEventListener {
   public void onAlertEvent(AlertEvent event) {
     List<AlertEvent> events = m_receivedAlertEvents.get(event.getClass());
     if (null == events) {
-      events = new ArrayList<AlertEvent>();
+      events = new ArrayList<>();
       m_receivedAlertEvents.put(event.getClass(), events);
     }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/edbb5492/ambari-server/src/test/java/org/apache/ambari/server/events/listeners/tasks/TaskStatusListenerTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/events/listeners/tasks/TaskStatusListenerTest.java b/ambari-server/src/test/java/org/apache/ambari/server/events/listeners/tasks/TaskStatusListenerTest.java
index 64a731b..90b8687 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/events/listeners/tasks/TaskStatusListenerTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/events/listeners/tasks/TaskStatusListenerTest.java
@@ -63,7 +63,7 @@ public class TaskStatusListenerTest extends EasyMockSupport {
 
   @Test
   public void testOnTaskUpdateEvent() {
-    List<HostRoleCommand> hostRoleCommands = new ArrayList<HostRoleCommand>();
+    List<HostRoleCommand> hostRoleCommands = new ArrayList<>();
     ServiceComponentHostEvent serviceComponentHostEvent = createNiceMock(ServiceComponentHostEvent.class);
     HostDAO hostDAO = createNiceMock(HostDAO.class);
     replayAll();
@@ -136,7 +136,7 @@ public class TaskStatusListenerTest extends EasyMockSupport {
     // update of all tasks status of skip_failed and  completed states should cascade into request status of completed
     // and request display status to be of skip_failed
     hrcCounter = 1;
-    List<HostRoleCommand> finalHostRoleCommands = new ArrayList<HostRoleCommand>();
+    List<HostRoleCommand> finalHostRoleCommands = new ArrayList<>();
     HostRoleStatus finalHostRoleStatus = HostRoleStatus.COMPLETED;
     for (int stageCounter = 0; stageCounter < 2; stageCounter++) {
       for (int i = 1; i <= hostRoleCommandSize; i++,hrcCounter++) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/edbb5492/ambari-server/src/test/java/org/apache/ambari/server/events/listeners/upgrade/AlertMaintenanceModeListenerTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/events/listeners/upgrade/AlertMaintenanceModeListenerTest.java b/ambari-server/src/test/java/org/apache/ambari/server/events/listeners/upgrade/AlertMaintenanceModeListenerTest.java
index 7de9823..bdc662a 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/events/listeners/upgrade/AlertMaintenanceModeListenerTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/events/listeners/upgrade/AlertMaintenanceModeListenerTest.java
@@ -200,7 +200,7 @@ public class AlertMaintenanceModeListenerTest {
       EasyMock.expect(componentHistory.getComponentName()).andReturn(COMPONENT).atLeastOnce();
     }
 
-    List<AlertCurrentEntity> currentAlerts = new ArrayList<AlertCurrentEntity>();
+    List<AlertCurrentEntity> currentAlerts = new ArrayList<>();
     currentAlerts.add(hostAlert);
     currentAlerts.add(serviceAlert);
     currentAlerts.add(componentAlert);

http://git-wip-us.apache.org/repos/asf/ambari/blob/edbb5492/ambari-server/src/test/java/org/apache/ambari/server/events/listeners/upgrade/HostVersionOutOfSyncListenerTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/events/listeners/upgrade/HostVersionOutOfSyncListenerTest.java b/ambari-server/src/test/java/org/apache/ambari/server/events/listeners/upgrade/HostVersionOutOfSyncListenerTest.java
index 978080a..dc9ce5e 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/events/listeners/upgrade/HostVersionOutOfSyncListenerTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/events/listeners/upgrade/HostVersionOutOfSyncListenerTest.java
@@ -142,13 +142,13 @@ public class HostVersionOutOfSyncListenerTest {
     assertRepoVersionState(stackId.getStackId(), CURRENT_VERSION, RepositoryVersionState.CURRENT);
 
     // Add ZK service with only ZOOKEEPER_SERVER
-    List<String> hostList = new ArrayList<String>();
+    List<String> hostList = new ArrayList<>();
     hostList.add("h1");
     hostList.add("h2");
     hostList.add("h3");
-    Map<String, List<Integer>> zkTopology = new HashMap<String, List<Integer>>();
+    Map<String, List<Integer>> zkTopology = new HashMap<>();
     List<Integer> zkServerHosts = Arrays.asList(0, 1, 2);
-    zkTopology.put("ZOOKEEPER_SERVER", new ArrayList<Integer>(zkServerHosts));
+    zkTopology.put("ZOOKEEPER_SERVER", new ArrayList<>(zkServerHosts));
     addService(c1, hostList, zkTopology, "ZOOKEEPER");
 
     // Register and install new version
@@ -215,19 +215,19 @@ public class HostVersionOutOfSyncListenerTest {
 
 
     //Add HDFS service
-    List<String> hostList = new ArrayList<String>();
+    List<String> hostList = new ArrayList<>();
     hostList.add("h1");
     hostList.add("h2");
     hostList.add("h3");
-    Map<String, List<Integer>> hdfsTopology = new HashMap<String, List<Integer>>();
+    Map<String, List<Integer>> hdfsTopology = new HashMap<>();
     hdfsTopology.put("NAMENODE", Collections.singletonList(0));
     hdfsTopology.put("SECONDARY_NAMENODE", Collections.singletonList(1));
     List<Integer> datanodeHosts = Arrays.asList(0, 1);
-    hdfsTopology.put("DATANODE", new ArrayList<Integer>(datanodeHosts));
+    hdfsTopology.put("DATANODE", new ArrayList<>(datanodeHosts));
     addService(c1, hostList, hdfsTopology, "HDFS");
 
     // Check result
-    Set<String> changedHosts = new HashSet<String>();
+    Set<String> changedHosts = new HashSet<>();
     changedHosts.add("h1");
     changedHosts.add("h2");
 
@@ -264,18 +264,18 @@ public class HostVersionOutOfSyncListenerTest {
     createClusterAndHosts(INSTALLED_VERSION, stackId);
 
     //Add Ganglia service
-    List<String> hostList = new ArrayList<String>();
+    List<String> hostList = new ArrayList<>();
     hostList.add("h1");
     hostList.add("h2");
     hostList.add("h3");
-    Map<String, List<Integer>> hdfsTopology = new HashMap<String, List<Integer>>();
+    Map<String, List<Integer>> hdfsTopology = new HashMap<>();
     hdfsTopology.put("GANGLIA_SERVER", Collections.singletonList(0));
     List<Integer> monitorHosts = Arrays.asList(0, 1);
-    hdfsTopology.put("GANGLIA_MONITOR", new ArrayList<Integer>(monitorHosts));
+    hdfsTopology.put("GANGLIA_MONITOR", new ArrayList<>(monitorHosts));
     addService(c1, hostList, hdfsTopology, "GANGLIA");
 
     // Check result
-    Set<String> changedHosts = new HashSet<String>();
+    Set<String> changedHosts = new HashSet<>();
     changedHosts.add("h1");
     changedHosts.add("h2");
 
@@ -307,14 +307,14 @@ public class HostVersionOutOfSyncListenerTest {
     addRepoVersion(INSTALLED_VERSION_2, yaStackId);
 
     //Add ZOOKEEPER_CLIENT component
-    List<String> hostList = new ArrayList<String>();
+    List<String> hostList = new ArrayList<>();
     hostList.add("h1");
     hostList.add("h2");
     hostList.add("h3");
     addServiceComponent(c1, hostList, "ZOOKEEPER", "ZOOKEEPER_CLIENT");
 
     // Check result
-    Set<String> changedHosts = new HashSet<String>();
+    Set<String> changedHosts = new HashSet<>();
     changedHosts.add("h1");
     changedHosts.add("h2");
     changedHosts.add("h3");
@@ -532,7 +532,7 @@ public class HostVersionOutOfSyncListenerTest {
     host1.setIPv4("ipv4");
     host1.setIPv6("ipv6");
 
-    Map<String, String> hostAttributes = new HashMap<String, String>();
+    Map<String, String> hostAttributes = new HashMap<>();
     hostAttributes.put("os_family", "redhat");
     hostAttributes.put("os_release_version", "6.4");
     host1.setHostAttributes(hostAttributes);

http://git-wip-us.apache.org/repos/asf/ambari/blob/edbb5492/ambari-server/src/test/java/org/apache/ambari/server/hooks/users/UserHookServiceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/hooks/users/UserHookServiceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/hooks/users/UserHookServiceTest.java
index b642d35..e8eb3e8 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/hooks/users/UserHookServiceTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/hooks/users/UserHookServiceTest.java
@@ -105,7 +105,7 @@ public class UserHookServiceTest extends EasyMockSupport {
   @Before
   public void before() throws Exception {
     usersToGroups = new HashMap<>();
-    usersToGroups.put("testUser", new HashSet<String>(Arrays.asList("hdfs", "yarn")));
+    usersToGroups.put("testUser", new HashSet<>(Arrays.asList("hdfs", "yarn")));
     hookContext = new PostUserCreationHookContext(usersToGroups);
 
     userCreatedEvent = new UserCreatedEvent(hookContext);

http://git-wip-us.apache.org/repos/asf/ambari/blob/edbb5492/ambari-server/src/test/java/org/apache/ambari/server/metadata/RoleCommandOrderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/metadata/RoleCommandOrderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/metadata/RoleCommandOrderTest.java
index 2f201c4..d2cc345 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/metadata/RoleCommandOrderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/metadata/RoleCommandOrderTest.java
@@ -224,7 +224,7 @@ public class RoleCommandOrderTest {
     expect(cluster.getService("GLUSTERFS")).andReturn(null);
     expect(cluster.getClusterId()).andReturn(1L);
 
-    Map<String, ServiceComponentHost> hostComponents = new HashMap<String, ServiceComponentHost>();
+    Map<String, ServiceComponentHost> hostComponents = new HashMap<>();
     hostComponents.put("1",sch1);
     hostComponents.put("2",sch2);
 
@@ -415,7 +415,7 @@ public class RoleCommandOrderTest {
         "HBASE_MASTER", hbaseMaster);
     expect(hbaseService.getServiceComponents()).andReturn(hbaseComponents).anyTimes();
 
-    Map<String, Service> installedServices = new HashMap<String, Service>();
+    Map<String, Service> installedServices = new HashMap<>();
     installedServices.put("HDFS", hdfsService);
     installedServices.put("HBASE", hbaseService);
     expect(cluster.getServices()).andReturn(installedServices).atLeastOnce();


Mime
View raw message