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

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1190187 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Vinod Kumar Vavilapalli 2011-10-28 07:44:35 +00:00
parent 670fa24b48
commit a39992ea63
6 changed files with 30 additions and 10 deletions

View File

@ -1841,9 +1841,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 @@
* </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 @@
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 void setup() {
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 static String getPathAndQuery(ApplicationId id, String path,
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 void init(FilterConfig conf) throws ServletException {
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 @@ private Set<String> getProxyAddresses() throws ServletException {
throw new ServletException("Could not locate "+proxyHost, e);
}
}
return proxyAddresses;
}
return proxyAddresses;
}
@Override