tez-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jeag...@apache.org
Subject tez git commit: TEZ-3744. Fix findbugs warnings after TEZ-3334 merge (Kuhu Shukla via jeagles)
Date Thu, 25 May 2017 20:41:05 GMT
Repository: tez
Updated Branches:
  refs/heads/master ddfb26222 -> 542a199ba


TEZ-3744. Fix findbugs warnings after TEZ-3334 merge (Kuhu Shukla via jeagles)


Project: http://git-wip-us.apache.org/repos/asf/tez/repo
Commit: http://git-wip-us.apache.org/repos/asf/tez/commit/542a199b
Tree: http://git-wip-us.apache.org/repos/asf/tez/tree/542a199b
Diff: http://git-wip-us.apache.org/repos/asf/tez/diff/542a199b

Branch: refs/heads/master
Commit: 542a199ba02b5441721ea03d46088d226ab57a51
Parents: ddfb262
Author: Jonathan Eagles <jeagles@yahoo-inc.com>
Authored: Thu May 25 15:40:59 2017 -0500
Committer: Jonathan Eagles <jeagles@yahoo-inc.com>
Committed: Thu May 25 15:40:59 2017 -0500

----------------------------------------------------------------------
 .../java/org/apache/tez/dag/app/TaskCommunicatorManager.java   | 6 +++---
 .../apache/tez/dag/app/launcher/ContainerLauncherManager.java  | 6 +++---
 .../src/main/java/org/apache/tez/auxservices/IndexCache.java   | 2 +-
 .../main/java/org/apache/tez/auxservices/ShuffleHandler.java   | 2 +-
 tez-runtime-library/findbugs-exclude.xml                       | 2 +-
 .../org/apache/tez/runtime/library/common/shuffle/Fetcher.java | 2 +-
 .../common/shuffle/orderedgrouped/FetcherOrderedGrouped.java   | 2 +-
 7 files changed, 11 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tez/blob/542a199b/tez-dag/src/main/java/org/apache/tez/dag/app/TaskCommunicatorManager.java
----------------------------------------------------------------------
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/TaskCommunicatorManager.java b/tez-dag/src/main/java/org/apache/tez/dag/app/TaskCommunicatorManager.java
index af82c29..d1b0349 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/TaskCommunicatorManager.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/TaskCommunicatorManager.java
@@ -140,9 +140,9 @@ public class TaskCommunicatorManager extends AbstractService implements
     this.context = context;
     this.taskHeartbeatHandler = thh;
     this.containerHeartbeatHandler = chh;
-    Preconditions.checkArgument(
-        taskCommunicatorDescriptors != null && !taskCommunicatorDescriptors.isEmpty(),
-        "TaskCommunicators must be specified");
+    if (taskCommunicatorDescriptors == null || taskCommunicatorDescriptors.isEmpty()) {
+      throw new IllegalArgumentException("TaskCommunicators must be specified");
+    }
     this.taskCommunicators = new TaskCommunicatorWrapper[taskCommunicatorDescriptors.size()];
     this.taskCommunicatorContexts = new TaskCommunicatorContext[taskCommunicatorDescriptors.size()];
     this.taskCommunicatorServiceWrappers = new ServicePluginLifecycleAbstractService[taskCommunicatorDescriptors.size()];

http://git-wip-us.apache.org/repos/asf/tez/blob/542a199b/tez-dag/src/main/java/org/apache/tez/dag/app/launcher/ContainerLauncherManager.java
----------------------------------------------------------------------
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/launcher/ContainerLauncherManager.java
b/tez-dag/src/main/java/org/apache/tez/dag/app/launcher/ContainerLauncherManager.java
index e3f96ea..58d87c9 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/launcher/ContainerLauncherManager.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/launcher/ContainerLauncherManager.java
@@ -75,9 +75,9 @@ public class ContainerLauncherManager extends AbstractService
 
     this.isIncompleteCtor = false;
     this.appContext = context;
-    Preconditions.checkArgument(
-        containerLauncherDescriptors != null && !containerLauncherDescriptors.isEmpty(),
-        "ContainerLauncherDescriptors must be specified");
+    if (containerLauncherDescriptors == null || containerLauncherDescriptors.isEmpty()) {
+      throw new IllegalArgumentException("ContainerLauncherDescriptors must be specified");
+    }
     containerLauncherContexts = new ContainerLauncherContext[containerLauncherDescriptors.size()];
     containerLaunchers = new ContainerLauncherWrapper[containerLauncherDescriptors.size()];
     containerLauncherServiceWrappers = new ServicePluginLifecycleAbstractService[containerLauncherDescriptors.size()];

http://git-wip-us.apache.org/repos/asf/tez/blob/542a199b/tez-plugins/tez-aux-services/src/main/java/org/apache/tez/auxservices/IndexCache.java
----------------------------------------------------------------------
diff --git a/tez-plugins/tez-aux-services/src/main/java/org/apache/tez/auxservices/IndexCache.java
b/tez-plugins/tez-aux-services/src/main/java/org/apache/tez/auxservices/IndexCache.java
index 247144c..5a945c4 100644
--- a/tez-plugins/tez-aux-services/src/main/java/org/apache/tez/auxservices/IndexCache.java
+++ b/tez-plugins/tez-aux-services/src/main/java/org/apache/tez/auxservices/IndexCache.java
@@ -188,7 +188,7 @@ class IndexCache {
    */
   public void removeMap(String mapId) {
     IndexInformation info = cache.get(mapId);
-    if (info == null || ((info != null) && isUnderConstruction(info))) {
+    if (info == null || isUnderConstruction(info)) {
       return;
     }
     info = cache.remove(mapId);

http://git-wip-us.apache.org/repos/asf/tez/blob/542a199b/tez-plugins/tez-aux-services/src/main/java/org/apache/tez/auxservices/ShuffleHandler.java
----------------------------------------------------------------------
diff --git a/tez-plugins/tez-aux-services/src/main/java/org/apache/tez/auxservices/ShuffleHandler.java
b/tez-plugins/tez-aux-services/src/main/java/org/apache/tez/auxservices/ShuffleHandler.java
index cb68aa4..a829485 100644
--- a/tez-plugins/tez-aux-services/src/main/java/org/apache/tez/auxservices/ShuffleHandler.java
+++ b/tez-plugins/tez-aux-services/src/main/java/org/apache/tez/auxservices/ShuffleHandler.java
@@ -828,7 +828,7 @@ public class ShuffleHandler extends AuxiliaryService {
 
     @Override
     public String toString() {
-      return new String("range: " + first + "-" + last);
+      return "range: " + first + "-" + last;
     }
   }
 

http://git-wip-us.apache.org/repos/asf/tez/blob/542a199b/tez-runtime-library/findbugs-exclude.xml
----------------------------------------------------------------------
diff --git a/tez-runtime-library/findbugs-exclude.xml b/tez-runtime-library/findbugs-exclude.xml
index da7a013..bcdbcc5 100644
--- a/tez-runtime-library/findbugs-exclude.xml
+++ b/tez-runtime-library/findbugs-exclude.xml
@@ -117,7 +117,7 @@
   </Match>
 
   <Match>
-    <Class name="org.apache.tez.runtime.library.common.shuffle.ShuffleUtils"/>
+    <Class name="org.apache.tez.runtime.library.common.TezRuntimeUtils"/>
     <Method name="getHttpConnectionParams" params="org.apache.hadoop.conf.Configuration"
return="org.apache.tez.http.HttpConnectionParams"/>
     <Bug pattern="DC_PARTIALLY_CONSTRUCTED"/>
   </Match>

http://git-wip-us.apache.org/repos/asf/tez/blob/542a199b/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/common/shuffle/Fetcher.java
----------------------------------------------------------------------
diff --git a/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/common/shuffle/Fetcher.java
b/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/common/shuffle/Fetcher.java
index f31425e..fefd53e 100644
--- a/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/common/shuffle/Fetcher.java
+++ b/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/common/shuffle/Fetcher.java
@@ -826,7 +826,7 @@ public class Fetcher extends CallableWithNdc<FetchResult> {
 
     @Override
     public String toString() {
-      return new String("id: " + srcAttemptId + ", decompressed length: " + decompressedLength
+ ", compressed length: " + compressedLength + ", reduce: " + forReduce);
+      return "id: " + srcAttemptId + ", decompressed length: " + decompressedLength + ",
compressed length: " + compressedLength + ", reduce: " + forReduce;
     }
   }
   private InputAttemptIdentifier[] fetchInputs(DataInputStream input,

http://git-wip-us.apache.org/repos/asf/tez/blob/542a199b/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/common/shuffle/orderedgrouped/FetcherOrderedGrouped.java
----------------------------------------------------------------------
diff --git a/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/common/shuffle/orderedgrouped/FetcherOrderedGrouped.java
b/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/common/shuffle/orderedgrouped/FetcherOrderedGrouped.java
index b762c75..2c3aac3 100644
--- a/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/common/shuffle/orderedgrouped/FetcherOrderedGrouped.java
+++ b/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/common/shuffle/orderedgrouped/FetcherOrderedGrouped.java
@@ -417,7 +417,7 @@ class FetcherOrderedGrouped extends CallableWithNdc<Void> {
 
     @Override
     public String toString() {
-      return new String("id: " + srcAttemptId + ", decompressed length: " + decompressedLength
+ ", compressed length: " + compressedLength + ", reduce: " + forReduce);
+      return "id: " + srcAttemptId + ", decompressed length: " + decompressedLength + ",
compressed length: " + compressedLength + ", reduce: " + forReduce;
     }
   }
 


Mime
View raw message