MAPREDUCE-3296. Fixed the remaining nine FindBugs warnings. (vinodkv)

svn merge -c r1190187 --ignore-ancestry ../../trunk/


git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.23@1190188 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Vinod Kumar Vavilapalli 2011-10-28 07:46:21 +00:00
parent fc8079e054
commit 4fbaa0ff46
6 changed files with 30 additions and 10 deletions

View File

@ -1780,9 +1780,11 @@ Release 0.23.0 - Unreleased
MAPREDUCE-3185. RM Web UI does not sort the columns in some cases.
(Jonathan Eagles via mahadev)
MAPREDUCE-3292. In secure mode job submission fails with Provider
org.apache.hadoop.mapreduce.security.token.JobTokenIndentifier$Renewer
not found. (mahadev)
MAPREDUCE-3292. In secure mode job submission fails with Provider
org.apache.hadoop.mapreduce.security.token.JobTokenIndentifier$Renewer
not found. (mahadev)
MAPREDUCE-3296. Fixed the remaining nine FindBugs warnings. (vinodkv)
Release 0.22.0 - Unreleased

View File

@ -44,8 +44,8 @@ import org.mortbay.log.Log;
* </p>
*/
public class JobEndNotifier implements Configurable {
final String JOB_ID = "$jobId";
final String JOB_STATUS = "$jobStatus";
private static final String JOB_ID = "$jobId";
private static final String JOB_STATUS = "$jobStatus";
private Configuration conf;
protected String userUrl;

View File

@ -171,6 +171,10 @@
<Class name="org.apache.hadoop.yarn.webapp.WebApps$Builder" />
<Bug pattern="DM_EXIT" />
</Match>
<Match>
<Class name="org.apache.hadoop.yarn.server.resourcemanager.security.DelegationTokenRenewer$DelegationTokenCancelThread" />
<Bug pattern="DM_EXIT" />
</Match>
<!-- AsyncDispatcher will kill the process if there is an error dispatching -->
<Match>
<Class name="org.apache.hadoop.yarn.event.AsyncDispatcher" />
@ -185,6 +189,17 @@
<Bug pattern="DE_MIGHT_IGNORE" />
</Match>
<!-- Ignore EI_EXPOSE_REP in PolicyProviders -->
<Match>
<Class name="org.apache.hadoop.yarn.server.resourcemanager.security.authorize.RMPolicyProvider" />
<Bug pattern="EI_EXPOSE_REP" />
</Match>
<Match>
<Class name="org.apache.hadoop.yarn.server.nodemanager.security.authorize.NMPolicyProvider" />
<Bug pattern="EI_EXPOSE_REP" />
</Match>
<!-- Ignore EI_EXPOSE_REP2 in Log services -->
<Match>
<Class name="org.apache.hadoop.yarn.server.nodemanager.containermanager.logaggregation.AggregatedLogFormat$LogValue" />

View File

@ -20,6 +20,7 @@ package org.apache.hadoop.yarn.webapp;
import static com.google.common.base.Preconditions.checkNotNull;
import java.io.IOException;
import java.net.ConnectException;
import java.net.URL;
import java.util.HashMap;
@ -191,7 +192,9 @@ public class WebApps {
webapp.setHttpServer(server);
server.start();
LOG.info("Web app /"+ name +" started at "+ server.getPort());
} catch (Exception e) {
} catch (ClassNotFoundException e) {
throw new WebAppException("Error starting http server", e);
} catch (IOException e) {
throw new WebAppException("Error starting http server", e);
}
Injector injector = Guice.createInjector(webapp, new AbstractModule() {

View File

@ -92,7 +92,7 @@ public class ProxyUriUtils {
newp.append(getPath(id, path));
boolean first = appendQuery(newp, query, true);
if(approved) {
first = appendQuery(newp, PROXY_APPROVAL_PARAM+"=true", first);
appendQuery(newp, PROXY_APPROVAL_PARAM+"=true", first);
}
return newp.toString();
}

View File

@ -59,8 +59,8 @@ public class AmIpFilter implements Filter {
private Set<String> getProxyAddresses() throws ServletException {
long now = System.currentTimeMillis();
if(proxyAddresses == null || (lastUpdate + updateInterval) >= now) {
synchronized(this) {
synchronized(this) {
if(proxyAddresses == null || (lastUpdate + updateInterval) >= now) {
try {
proxyAddresses = new HashSet<String>();
for(InetAddress add : InetAddress.getAllByName(proxyHost)) {
@ -71,8 +71,8 @@ public class AmIpFilter implements Filter {
throw new ServletException("Could not locate "+proxyHost, e);
}
}
return proxyAddresses;
}
return proxyAddresses;
}
@Override