SLIDER-1077
diff --git a/slider-core/src/main/java/org/apache/slider/server/appmaster/SliderAppMaster.java b/slider-core/src/main/java/org/apache/slider/server/appmaster/SliderAppMaster.java
index 9a284e3..24c32bb 100644
--- a/slider-core/src/main/java/org/apache/slider/server/appmaster/SliderAppMaster.java
+++ b/slider-core/src/main/java/org/apache/slider/server/appmaster/SliderAppMaster.java
@@ -20,6 +20,9 @@
import com.codahale.metrics.MetricRegistry;
import com.codahale.metrics.health.HealthCheckRegistry;
+import com.codahale.metrics.jvm.GarbageCollectorMetricSet;
+import com.codahale.metrics.jvm.MemoryUsageGaugeSet;
+import com.codahale.metrics.jvm.ThreadStatesGaugeSet;
import com.google.common.base.Preconditions;
import com.google.protobuf.BlockingService;
@@ -2205,25 +2208,6 @@
public void startContainer(Container container,
ContainerLaunchContext ctx,
RoleInstance instance) throws IOException {
- // Set up tokens for the container too. Today, for normal shell commands,
- // the container in distribute-shell doesn't need any tokens. We are
- // populating them mainly for NodeManagers to be able to download any
- // files in the distributed file-system. The tokens are otherwise also
- // useful in cases, for e.g., when one is running a "hadoop dfs" command
- // inside the distributed shell.
-
- // add current HDFS delegation token with an up to date token
- ByteBuffer tokens = getContainerCredentials();
-
- /*
- ByteBuffer tokens = getContainerCredentials();
-
- if (tokens != null) {
- ctx.setTokens(tokens);
- } else {
- log.warn("No delegation tokens obtained and set for launch context");
- }
-*/
appState.containerStartSubmitted(container, instance);
nmClientAsync.startContainerAsync(container, ctx);
}
@@ -2235,20 +2219,6 @@
* @return a buffer of credentials
* @throws IOException
*/
- private ByteBuffer getContainerCredentials() throws IOException {
- // a delegation token can be retrieved from filesystem since
- // the login is via a keytab (see above)
- Credentials credentials = buildContainerCredentials();
- return CredentialUtils.marshallCredentials(credentials);
- }
-
- /**
- * Build the credentials needed for containers. This will include
- * getting new delegation tokens for HDFS if the AM is running
- * with a keytab.
- * @return a buffer of credentials
- * @throws IOException
- */
private Credentials buildContainerCredentials() throws IOException {
Credentials credentials = new Credentials(containerCredentials);