You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@slider.apache.org by go...@apache.org on 2016/03/16 21:58:21 UTC
[30/50] incubator-slider git commit: SLIDER-1077
SLIDER-1077
Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/031d88a7
Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/031d88a7
Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/031d88a7
Branch: refs/heads/feature/SLIDER-906_docker_support
Commit: 031d88a740ec8f461863b91c843144a01764dee1
Parents: 297e931
Author: Steve Loughran <st...@apache.org>
Authored: Wed Feb 3 18:10:01 2016 +0000
Committer: Steve Loughran <st...@apache.org>
Committed: Wed Feb 3 18:10:01 2016 +0000
----------------------------------------------------------------------
.../server/appmaster/SliderAppMaster.java | 36 ++------------------
1 file changed, 3 insertions(+), 33 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/031d88a7/slider-core/src/main/java/org/apache/slider/server/appmaster/SliderAppMaster.java
----------------------------------------------------------------------
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 @@ package org.apache.slider.server.appmaster;
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 class SliderAppMaster extends AbstractSliderLaunchedService
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 @@ public class SliderAppMaster extends AbstractSliderLaunchedService
* @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);