Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3716,7 +3716,7 @@ void incrUserConnections(String user) {
if (count == null) {
count = 1;
} else {
count++;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dead local store?
Can someone educate me on why this is an issue?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change is a workaround for the bug of the javac compiler.
spotbugs/spotbugs#571 (comment)

count = count + 1;
}
userToConnectionsMap.put(user, count);
}
Expand All @@ -3728,7 +3728,7 @@ void decrUserConnections(String user) {
if (count == null) {
return;
} else {
count--;
count = count - 1;
}
if (count == 0) {
userToConnectionsMap.remove(user);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -352,23 +352,29 @@ private class ResultHandler
}

@Override
public void onSuccess(@Nonnull VolumeCheckResult result) {
switch(result) {
case HEALTHY:
case DEGRADED:
LOG.debug("Volume {} is {}.", reference.getVolume(), result);
markHealthy();
break;
case FAILED:
LOG.warn("Volume {} detected as being unhealthy",
public void onSuccess(VolumeCheckResult result) {
if (result == null) {
LOG.error("Unexpected health check result null for volume {}",
reference.getVolume());
markFailed();
break;
default:
LOG.error("Unexpected health check result {} for volume {}",
result, reference.getVolume());
markHealthy();
break;
} else {
switch(result) {
case HEALTHY:
case DEGRADED:
LOG.debug("Volume {} is {}.", reference.getVolume(), result);
markHealthy();
break;
case FAILED:
LOG.warn("Volume {} detected as being unhealthy",
reference.getVolume());
markFailed();
break;
default:
LOG.error("Unexpected health check result {} for volume {}",
result, reference.getVolume());
markHealthy();
break;
}
}
cleanup();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ private void addResultCachingCallback(
Checkable<K, V> target, ListenableFuture<V> lf) {
Futures.addCallback(lf, new FutureCallback<V>() {
@Override
public void onSuccess(@Nullable V result) {
public void onSuccess(V result) {
synchronized (ThrottledAsyncChecker.this) {
checksInProgress.remove(target);
completedChecks.put(target, new LastCheckResult<>(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1237,7 +1237,7 @@ private void incrOpCount(FSEditLogOpCodes opCode,
holder = new Holder<Integer>(1);
opCounts.put(opCode, holder);
} else {
holder.held++;
holder.held = holder.held + 1;
}
counter.increment();
}
Expand Down
14 changes: 13 additions & 1 deletion hadoop-mapreduce-project/dev-support/findbugs-exclude.xml
Original file line number Diff line number Diff line change
Expand Up @@ -533,5 +533,17 @@
<Class name="org.apache.hadoop.mapreduce.v2.hs.CachedHistoryStorage$1" />
<Bug pattern="SE_BAD_FIELD_INNER_CLASS" />
</Match>


<!--
HADOOP-17138: Suppress warnings about unchecked Nullable
since the methoad catches NullPointerException then registerError.
-->
<Match>
<Or>
<Class name="org.apache.hadoop.mapred.LocatedFileStatusFetcher$ProcessInputDirCallback" />
<Class name="org.apache.hadoop.mapred.LocatedFileStatusFetcher$ProcessInitialInputPathCallback" />
</Or>
<Method name="onSuccess" />
<Bug pattern="NP_PARAMETER_MUST_BE_NONNULL_BUT_MARKED_AS_NULLABLE" />
</Match>
</FindBugsFilter>
Original file line number Diff line number Diff line change
Expand Up @@ -764,7 +764,7 @@ private void increaseQueueAppNum(String queue) throws YarnException {
if (appNum == null) {
appNum = 1;
} else {
appNum++;
appNum = appNum + 1;
}

queueAppNumMap.put(queueName, appNum);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -711,4 +711,9 @@
<Bug pattern="NP_NONNULL_PARAM_VIOLATION"/>
</Match>

<!-- Suppress warning about anonymous class for mocking. -->
<Match>
<Class name="~org\.apache\.hadoop\.yarn\.server\.timelineservice\.reader\.TestTimelineReaderWebServicesHBaseStorage.*" />
<Bug pattern="UMAC_UNCALLABLE_METHOD_OF_ANONYMOUS_CLASS" />
</Match>
</FindBugsFilter>
Original file line number Diff line number Diff line change
Expand Up @@ -181,14 +181,13 @@ private static void waitForHBaseDown(HBaseTimelineReaderImpl htr) throws
}
}

private static void checkQuery(HBaseTimelineReaderImpl htr) throws
IOException {
private static Set<TimelineEntity> checkQuery(HBaseTimelineReaderImpl htr)
throws IOException {
TimelineReaderContext context =
new TimelineReaderContext(YarnConfiguration.DEFAULT_RM_CLUSTER_ID,
null, null, null, null, TimelineEntityType
.YARN_FLOW_ACTIVITY.toString(), null, null);
Set<TimelineEntity> entities = htr.getEntities(context, MONITOR_FILTERS,
DATA_TO_RETRIEVE);
return htr.getEntities(context, MONITOR_FILTERS, DATA_TO_RETRIEVE);
}

private static void configure(HBaseTestingUtility util) {
Expand Down