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:
parent
670fa24b48
commit
a39992ea63
|
@ -1841,9 +1841,11 @@ Release 0.23.0 - Unreleased
|
||||||
MAPREDUCE-3185. RM Web UI does not sort the columns in some cases.
|
MAPREDUCE-3185. RM Web UI does not sort the columns in some cases.
|
||||||
(Jonathan Eagles via mahadev)
|
(Jonathan Eagles via mahadev)
|
||||||
|
|
||||||
MAPREDUCE-3292. In secure mode job submission fails with Provider
|
MAPREDUCE-3292. In secure mode job submission fails with Provider
|
||||||
org.apache.hadoop.mapreduce.security.token.JobTokenIndentifier$Renewer
|
org.apache.hadoop.mapreduce.security.token.JobTokenIndentifier$Renewer
|
||||||
not found. (mahadev)
|
not found. (mahadev)
|
||||||
|
|
||||||
|
MAPREDUCE-3296. Fixed the remaining nine FindBugs warnings. (vinodkv)
|
||||||
|
|
||||||
Release 0.22.0 - Unreleased
|
Release 0.22.0 - Unreleased
|
||||||
|
|
||||||
|
|
|
@ -44,8 +44,8 @@ import org.mortbay.log.Log;
|
||||||
* </p>
|
* </p>
|
||||||
*/
|
*/
|
||||||
public class JobEndNotifier implements Configurable {
|
public class JobEndNotifier implements Configurable {
|
||||||
final String JOB_ID = "$jobId";
|
private static final String JOB_ID = "$jobId";
|
||||||
final String JOB_STATUS = "$jobStatus";
|
private static final String JOB_STATUS = "$jobStatus";
|
||||||
|
|
||||||
private Configuration conf;
|
private Configuration conf;
|
||||||
protected String userUrl;
|
protected String userUrl;
|
||||||
|
|
|
@ -171,6 +171,10 @@
|
||||||
<Class name="org.apache.hadoop.yarn.webapp.WebApps$Builder" />
|
<Class name="org.apache.hadoop.yarn.webapp.WebApps$Builder" />
|
||||||
<Bug pattern="DM_EXIT" />
|
<Bug pattern="DM_EXIT" />
|
||||||
</Match>
|
</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 -->
|
<!-- AsyncDispatcher will kill the process if there is an error dispatching -->
|
||||||
<Match>
|
<Match>
|
||||||
<Class name="org.apache.hadoop.yarn.event.AsyncDispatcher" />
|
<Class name="org.apache.hadoop.yarn.event.AsyncDispatcher" />
|
||||||
|
@ -185,6 +189,17 @@
|
||||||
<Bug pattern="DE_MIGHT_IGNORE" />
|
<Bug pattern="DE_MIGHT_IGNORE" />
|
||||||
</Match>
|
</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 -->
|
<!-- Ignore EI_EXPOSE_REP2 in Log services -->
|
||||||
<Match>
|
<Match>
|
||||||
<Class name="org.apache.hadoop.yarn.server.nodemanager.containermanager.logaggregation.AggregatedLogFormat$LogValue" />
|
<Class name="org.apache.hadoop.yarn.server.nodemanager.containermanager.logaggregation.AggregatedLogFormat$LogValue" />
|
||||||
|
|
|
@ -20,6 +20,7 @@ package org.apache.hadoop.yarn.webapp;
|
||||||
|
|
||||||
import static com.google.common.base.Preconditions.checkNotNull;
|
import static com.google.common.base.Preconditions.checkNotNull;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
import java.net.ConnectException;
|
import java.net.ConnectException;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
@ -191,7 +192,9 @@ public class WebApps {
|
||||||
webapp.setHttpServer(server);
|
webapp.setHttpServer(server);
|
||||||
server.start();
|
server.start();
|
||||||
LOG.info("Web app /"+ name +" started at "+ server.getPort());
|
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);
|
throw new WebAppException("Error starting http server", e);
|
||||||
}
|
}
|
||||||
Injector injector = Guice.createInjector(webapp, new AbstractModule() {
|
Injector injector = Guice.createInjector(webapp, new AbstractModule() {
|
||||||
|
|
|
@ -92,7 +92,7 @@ public class ProxyUriUtils {
|
||||||
newp.append(getPath(id, path));
|
newp.append(getPath(id, path));
|
||||||
boolean first = appendQuery(newp, query, true);
|
boolean first = appendQuery(newp, query, true);
|
||||||
if(approved) {
|
if(approved) {
|
||||||
first = appendQuery(newp, PROXY_APPROVAL_PARAM+"=true", first);
|
appendQuery(newp, PROXY_APPROVAL_PARAM+"=true", first);
|
||||||
}
|
}
|
||||||
return newp.toString();
|
return newp.toString();
|
||||||
}
|
}
|
||||||
|
|
|
@ -59,8 +59,8 @@ public class AmIpFilter implements Filter {
|
||||||
|
|
||||||
private Set<String> getProxyAddresses() throws ServletException {
|
private Set<String> getProxyAddresses() throws ServletException {
|
||||||
long now = System.currentTimeMillis();
|
long now = System.currentTimeMillis();
|
||||||
if(proxyAddresses == null || (lastUpdate + updateInterval) >= now) {
|
synchronized(this) {
|
||||||
synchronized(this) {
|
if(proxyAddresses == null || (lastUpdate + updateInterval) >= now) {
|
||||||
try {
|
try {
|
||||||
proxyAddresses = new HashSet<String>();
|
proxyAddresses = new HashSet<String>();
|
||||||
for(InetAddress add : InetAddress.getAllByName(proxyHost)) {
|
for(InetAddress add : InetAddress.getAllByName(proxyHost)) {
|
||||||
|
@ -71,8 +71,8 @@ public class AmIpFilter implements Filter {
|
||||||
throw new ServletException("Could not locate "+proxyHost, e);
|
throw new ServletException("Could not locate "+proxyHost, e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return proxyAddresses;
|
||||||
}
|
}
|
||||||
return proxyAddresses;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in New Issue