falcon-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rostafiyc...@apache.org
Subject [1/2] falcon git commit: FALCON-1197 Use diamond operator in merlin and merlin-core. Contributed by Ruslan Ostafiychuk
Date Wed, 06 May 2015 09:12:09 GMT
Repository: falcon
Updated Branches:
  refs/heads/master 844dab219 -> 0015a3b76


http://git-wip-us.apache.org/repos/asf/falcon/blob/0015a3b7/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/lineage/ProcessPipelineTest.java
----------------------------------------------------------------------
diff --git a/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/lineage/ProcessPipelineTest.java
b/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/lineage/ProcessPipelineTest.java
index 36d1ce0..719c30b 100644
--- a/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/lineage/ProcessPipelineTest.java
+++ b/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/lineage/ProcessPipelineTest.java
@@ -82,7 +82,7 @@ public class ProcessPipelineTest extends BaseTestClass{
         throws URISyntaxException, IOException, AuthenticationException, JAXBException,
         InterruptedException {
         //match processes to pipelines
-        HashMap<String, List<String>> map = new HashMap<String, List<String>>();
+        HashMap<String, List<String>> map = new HashMap<>();
         //index for few different pipelines
         for(int p = 0, i = 0, n = 0, d = 3; p < 3; p++, d++){
             n += d + 1;

http://git-wip-us.apache.org/repos/asf/falcon/blob/0015a3b7/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/prism/FeedDelayTest.java
----------------------------------------------------------------------
diff --git a/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/prism/FeedDelayTest.java
b/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/prism/FeedDelayTest.java
index b9d9b97..e43621a 100644
--- a/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/prism/FeedDelayTest.java
+++ b/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/prism/FeedDelayTest.java
@@ -141,7 +141,7 @@ public class FeedDelayTest extends BaseTestClass {
         String startTimeExpected = getStartTime(sourceStartTime, targetStartTime, new Frequency(sourceDelay),
flag);
 
         List<String> missingDep = getAndCreateDependencies(cluster1FS, cluster1.getPrefix(),
cluster2OC, bundleId);
-        List<String> qaDep = new ArrayList<String>();
+        List<String> qaDep = new ArrayList<>();
 
         if (flag) {
             qaDep.add(sourcePath + "/" + sourceStartTime.replaceAll("-", "/").

http://git-wip-us.apache.org/repos/asf/falcon/blob/0015a3b7/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/prism/PrismFeedDeleteTest.java
----------------------------------------------------------------------
diff --git a/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/prism/PrismFeedDeleteTest.java
b/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/prism/PrismFeedDeleteTest.java
index 470f1b8..b7e6861 100644
--- a/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/prism/PrismFeedDeleteTest.java
+++ b/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/prism/PrismFeedDeleteTest.java
@@ -1061,7 +1061,7 @@ public class PrismFeedDeleteTest extends BaseTestClass {
 
     private void compareDataStoreStates(List<String> initialState, List<String>
finalState,
                                         String filename) {
-        List<String> temp = new ArrayList<String>();
+        List<String> temp = new ArrayList<>();
         temp.addAll(initialState);
         temp.removeAll(finalState);
         Assert.assertEquals(temp.size(), 1);
@@ -1092,7 +1092,7 @@ public class PrismFeedDeleteTest extends BaseTestClass {
             server2Helper = cluster2.getProcessHelper();
         }
 
-        HashMap<String, List<String>> temp = new HashMap<String, List<String>>();
+        HashMap<String, List<String>> temp = new HashMap<>();
         temp.put("prismArchive", prismHelper.getArchiveInfo());
         temp.put("prismStore", prismHelper.getStoreInfo());
         temp.put("Server1Archive", server1Helper.getArchiveInfo());

http://git-wip-us.apache.org/repos/asf/falcon/blob/0015a3b7/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/prism/PrismFeedUpdateTest.java
----------------------------------------------------------------------
diff --git a/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/prism/PrismFeedUpdateTest.java
b/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/prism/PrismFeedUpdateTest.java
index cbd704f..bc18715 100644
--- a/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/prism/PrismFeedUpdateTest.java
+++ b/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/prism/PrismFeedUpdateTest.java
@@ -186,7 +186,7 @@ public class PrismFeedUpdateTest extends BaseTestClass {
         ProcessMerlin process02 = new ProcessMerlin(process01);
         process02.setName(this.getClass().getSimpleName() + "-zeroInputProcess"
             + new Random().nextInt());
-        List<String> feed = new ArrayList<String>();
+        List<String> feed = new ArrayList<>();
         feed.add(outputFeed.toString());
         process02.setProcessFeeds(feed, 0, 0, 1);
 

http://git-wip-us.apache.org/repos/asf/falcon/blob/0015a3b7/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/prism/PrismProcessDeleteTest.java
----------------------------------------------------------------------
diff --git a/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/prism/PrismProcessDeleteTest.java
b/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/prism/PrismProcessDeleteTest.java
index e2f01c5..4558646 100644
--- a/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/prism/PrismProcessDeleteTest.java
+++ b/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/prism/PrismProcessDeleteTest.java
@@ -922,7 +922,7 @@ public class PrismProcessDeleteTest extends BaseTestClass {
     private void compareDataStoreStates(List<String> initialState, List<String>
finalState,
                                         String filename) {
 
-        List<String> temp = new ArrayList<String>(initialState);
+        List<String> temp = new ArrayList<>(initialState);
         temp.removeAll(finalState);
         Assert.assertEquals(temp.size(), 1);
         Assert.assertTrue(temp.get(0).contains(filename));
@@ -952,7 +952,7 @@ public class PrismProcessDeleteTest extends BaseTestClass {
             ua2 = cluster1.getProcessHelper();
         }
 
-        HashMap<String, List<String>> temp = new HashMap<String, List<String>>();
+        HashMap<String, List<String>> temp = new HashMap<>();
         temp.put("prismArchive", prizm.getArchiveInfo());
         temp.put("prismStore", prizm.getStoreInfo());
         temp.put("ua1Archive", ua1.getArchiveInfo());

http://git-wip-us.apache.org/repos/asf/falcon/blob/0015a3b7/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/prism/ProcessPartitionExpVariableTest.java
----------------------------------------------------------------------
diff --git a/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/prism/ProcessPartitionExpVariableTest.java
b/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/prism/ProcessPartitionExpVariableTest.java
index f407601..20c60d2 100644
--- a/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/prism/ProcessPartitionExpVariableTest.java
+++ b/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/prism/ProcessPartitionExpVariableTest.java
@@ -132,7 +132,7 @@ public class ProcessPartitionExpVariableTest extends BaseTestClass {
         LOGGER.info("generating data between " + formatter.print(startDate) + " and "
             + formatter.print(endDate));
 
-        List<String> dates = new ArrayList<String>();
+        List<String> dates = new ArrayList<>();
         while (!startDate.isAfter(endDate)) {
             final DateTime nextDate = startDate.plusMinutes(minuteSkip);
             dates.add(formatter.print(nextDate) + formatter2.print(nextDate.plusDays(1)));

http://git-wip-us.apache.org/repos/asf/falcon/blob/0015a3b7/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/prism/RescheduleKilledProcessTest.java
----------------------------------------------------------------------
diff --git a/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/prism/RescheduleKilledProcessTest.java
b/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/prism/RescheduleKilledProcessTest.java
index 2a73538..86eeb4e 100644
--- a/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/prism/RescheduleKilledProcessTest.java
+++ b/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/prism/RescheduleKilledProcessTest.java
@@ -78,7 +78,7 @@ public class RescheduleKilledProcessTest extends BaseTestClass {
         ProcessMerlin process = bundles[0].getProcessObject();
         process.setName(this.getClass().getSimpleName() + "-zeroInputProcess"
             + new Random().nextInt());
-        List<String> feed = new ArrayList<String>();
+        List<String> feed = new ArrayList<>();
         feed.add(bundles[0].getOutputFeedFromBundle());
         process.setProcessFeeds(feed, 0, 0, 1);
 

http://git-wip-us.apache.org/repos/asf/falcon/blob/0015a3b7/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/prism/RetentionTest.java
----------------------------------------------------------------------
diff --git a/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/prism/RetentionTest.java
b/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/prism/RetentionTest.java
index 39b7d37..628dca1 100644
--- a/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/prism/RetentionTest.java
+++ b/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/prism/RetentionTest.java
@@ -198,7 +198,7 @@ public class RetentionTest extends BaseTestClass {
         LOGGER.info("finalData = " + finalData);
         LOGGER.info("expectedOutput = " + expectedOutput);
 
-        final List<String> missingData = new ArrayList<String>(initialData);
+        final List<String> missingData = new ArrayList<>(initialData);
         missingData.removeAll(expectedOutput);
         validateDataFromFeedQueue(feedName, messageConsumer.getReceivedMessages(), missingData);
         Assert.assertEquals(finalData.size(), expectedOutput.size(),
@@ -225,7 +225,7 @@ public class RetentionTest extends BaseTestClass {
                 OozieUtil.getBundles(clusterOC, feedName, EntityType.FEED).get(0));
 
         //create queue data folderList:
-        List<String> deletedFolders = new ArrayList<String>();
+        List<String> deletedFolders = new ArrayList<>();
         for (MapMessage message : messages) {
             if (message != null) {
                 Assert.assertEquals(message.getString("entityName"), feedName);
@@ -258,7 +258,7 @@ public class RetentionTest extends BaseTestClass {
      */
     private List<String> filterDataOnRetention(List<String> inputData, DateTime
currentTime,
         RetentionUnit retentionUnit, int retentionPeriod, FreqType freqType) {
-        final List<String> finalData = new ArrayList<String>();
+        final List<String> finalData = new ArrayList<>();
         //end date is today's date
         final String startLimit = freqType.getFormatter().print(
                 retentionUnit.minusTime(currentTime, retentionPeriod));

http://git-wip-us.apache.org/repos/asf/falcon/blob/0015a3b7/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/ui/LineageGraphTest.java
----------------------------------------------------------------------
diff --git a/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/ui/LineageGraphTest.java
b/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/ui/LineageGraphTest.java
index 9018148..dbad9a8 100644
--- a/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/ui/LineageGraphTest.java
+++ b/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/ui/LineageGraphTest.java
@@ -222,7 +222,7 @@ public class LineageGraphTest extends BaseUITestClass {
      */
     @Test
     public void testTitlesAndDescriptions() {
-        HashMap<String, String> expectedDescriptions = new HashMap<String, String>();
+        HashMap<String, String> expectedDescriptions = new HashMap<>();
         expectedDescriptions.put("lineage-legend-process-inst", "Process instance");
         expectedDescriptions.put("lineage-legend-process-inst lineage-legend-terminal",
             "Process instance (terminal)");
@@ -295,7 +295,7 @@ public class LineageGraphTest extends BaseUITestClass {
             String nominalTime = piVertex.getNominalTime();
             processPage.openLineage(nominalTime);
             /**get expected edges */
-            List<Edge> expectedEdgesAPI = new ArrayList<Edge>();
+            List<Edge> expectedEdgesAPI = new ArrayList<>();
             List<Edge> incEdges = lineageHelper.getEdgesByDirection(piVertex.getId(),
                 Direction.inComingEdges).getResults();
             List<Edge> outcEdges = lineageHelper.getEdgesByDirection(piVertex.getId(),
@@ -342,7 +342,7 @@ public class LineageGraphTest extends BaseUITestClass {
     public void testLineageOpenClose() {
         ProcessPage processPage = new ProcessPage(getDriver(), prism, processName);
         processPage.navigateTo();
-        List<String> previous = new ArrayList<String>();
+        List<String> previous = new ArrayList<>();
         for (Vertex piVertex : piVertices) {
             String nominalTime = piVertex.getNominalTime();
             processPage.openLineage(nominalTime);


Mime
View raw message