Skip to content

Commit

Permalink
Fix IntelliJ warnings in StageStateMachine
Browse files Browse the repository at this point in the history
  • Loading branch information
dain committed Jan 8, 2019
1 parent c70e57e commit b440bd4
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
import java.util.OptionalDouble;
import java.util.Set;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicLong;
import java.util.concurrent.atomic.AtomicReference;
Expand All @@ -59,6 +58,7 @@
import static com.google.common.base.MoreObjects.toStringHelper;
import static io.airlift.units.DataSize.succinctBytes;
import static io.airlift.units.Duration.succinctDuration;
import static java.lang.Math.max;
import static java.lang.Math.min;
import static java.lang.Math.toIntExact;
import static java.util.Objects.requireNonNull;
Expand Down Expand Up @@ -237,7 +237,7 @@ public void updateMemoryUsage(long deltaUserMemoryInBytes, long deltaTotalMemory
{
currentTotalMemory.addAndGet(deltaTotalMemoryInBytes);
currentUserMemory.addAndGet(deltaUserMemoryInBytes);
peakUserMemory.updateAndGet(currentPeakValue -> Math.max(currentUserMemory.get(), currentPeakValue));
peakUserMemory.updateAndGet(currentPeakValue -> max(currentUserMemory.get(), currentPeakValue));
}

public BasicStageStats getBasicStageStats(Supplier<Iterable<TaskInfo>> taskInfosSupplier)
Expand Down Expand Up @@ -428,8 +428,8 @@ public StageInfo getStageInfo(Supplier<Iterable<TaskInfo>> taskInfosSupplier, Su

int gcSec = toIntExact(taskStats.getFullGcTime().roundTo(SECONDS));
totalFullGcSec += gcSec;
minFullGcSec = Math.min(minFullGcSec, gcSec);
maxFullGcSec = Math.max(maxFullGcSec, gcSec);
minFullGcSec = min(minFullGcSec, gcSec);
maxFullGcSec = max(maxFullGcSec, gcSec);

for (PipelineStats pipeline : taskStats.getPipelines()) {
for (OperatorStats operatorStats : pipeline.getOperatorSummaries()) {
Expand Down Expand Up @@ -504,7 +504,7 @@ public void recordGetSplitTime(long startNanos)
{
long elapsedNanos = System.nanoTime() - startNanos;
getSplitDistribution.add(elapsedNanos);
scheduledStats.getGetSplitTime().add(elapsedNanos, TimeUnit.NANOSECONDS);
scheduledStats.getGetSplitTime().add(elapsedNanos, NANOSECONDS);
}

public void recordScheduleTaskTime(long startNanos)
Expand Down

0 comments on commit b440bd4

Please sign in to comment.