You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@heron.apache.org by GitBox <gi...@apache.org> on 2018/11/05 19:39:42 UTC

[GitHub] nlu90 closed pull request #3102: Fix build error on Mac.

nlu90 closed pull request #3102: Fix build error on Mac.
URL: https://github.com/apache/incubator-heron/pull/3102
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/heron/common/src/java/org/apache/heron/common/basics/ByteAmount.java b/heron/common/src/java/org/apache/heron/common/basics/ByteAmount.java
index e4e3fc95e7..61d9c7133c 100644
--- a/heron/common/src/java/org/apache/heron/common/basics/ByteAmount.java
+++ b/heron/common/src/java/org/apache/heron/common/basics/ByteAmount.java
@@ -25,7 +25,9 @@
 public final class ByteAmount implements Comparable<ByteAmount> {
   private static final long MB = 1024L * 1024;
   private static final long GB = MB * 1024;
+  @SuppressWarnings("MathRoundIntLong")
   private static final long MAX_MB = Math.round(Long.MAX_VALUE / MB);
+  @SuppressWarnings("MathRoundIntLong")
   private static final long MAX_GB = Math.round(Long.MAX_VALUE / GB);
 
   public static final ByteAmount ZERO = ByteAmount.fromBytes(0);
diff --git a/heron/schedulers/src/java/org/apache/heron/scheduler/mesos/framework/LaunchableTask.java b/heron/schedulers/src/java/org/apache/heron/scheduler/mesos/framework/LaunchableTask.java
index da095debe0..7cea0099e0 100644
--- a/heron/schedulers/src/java/org/apache/heron/scheduler/mesos/framework/LaunchableTask.java
+++ b/heron/schedulers/src/java/org/apache/heron/scheduler/mesos/framework/LaunchableTask.java
@@ -67,7 +67,7 @@ public LaunchableTask(String taskId, BaseContainer container, Protos.Offer offer
 
     String role = "*";
     for (Protos.Resource resource : reservedResources) {
-      if (resource.getName() == name && resource.getScalar().getValue() >= value) {
+      if (resource.getName().equals(name) && resource.getScalar().getValue() >= value) {
         role = resource.getRole();
         break;
 
@@ -95,7 +95,7 @@ public LaunchableTask(String taskId, BaseContainer container, Protos.Offer offer
 
     String role = "*";
     for (Protos.Resource resource : reservedResources) {
-      if (resource.getName() == name) {
+      if (resource.getName().equals(name)) {
         Protos.Value.Ranges ranges = resource.getRanges();
         for (Protos.Value.Range range : ranges.getRangeList()) {
           if (range.getBegin() <= begin && range.getEnd() >= end) {


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services