You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@slider.apache.org by st...@apache.org on 2014/08/21 21:34:26 UTC
[18/50] [abbrv] git commit: SLIDER-325 codahale metrics not being
uploaded to AM classpath
SLIDER-325 codahale metrics not being uploaded to AM classpath
Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/388805a1
Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/388805a1
Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/388805a1
Branch: refs/heads/feature/SLIDER-151_REST_API
Commit: 388805a1db2342973f3dcc6355a4205f01bd7a5a
Parents: 599e972
Author: Steve Loughran <st...@apache.org>
Authored: Fri Aug 15 13:05:53 2014 +0100
Committer: Steve Loughran <st...@apache.org>
Committed: Fri Aug 15 13:05:53 2014 +0100
----------------------------------------------------------------------
.../slideram/SliderAMClientProvider.java | 28 ++++++++++----------
1 file changed, 14 insertions(+), 14 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/388805a1/slider-core/src/main/java/org/apache/slider/providers/slideram/SliderAMClientProvider.java
----------------------------------------------------------------------
diff --git a/slider-core/src/main/java/org/apache/slider/providers/slideram/SliderAMClientProvider.java b/slider-core/src/main/java/org/apache/slider/providers/slideram/SliderAMClientProvider.java
index ffff76c..dc84f02 100644
--- a/slider-core/src/main/java/org/apache/slider/providers/slideram/SliderAMClientProvider.java
+++ b/slider-core/src/main/java/org/apache/slider/providers/slideram/SliderAMClientProvider.java
@@ -19,6 +19,7 @@
package org.apache.slider.providers.slideram;
import com.beust.jcommander.JCommander;
+import com.codahale.metrics.MetricRegistry;
import com.google.gson.GsonBuilder;
import org.apache.curator.CuratorZookeeperClient;
import org.apache.curator.framework.CuratorFramework;
@@ -59,8 +60,8 @@ import java.util.Map;
* This keeps aspects of role, cluster validation and Clusterspec setup
* out of the core slider client
*/
-public class SliderAMClientProvider extends AbstractClientProvider implements
- SliderKeys {
+public class SliderAMClientProvider extends AbstractClientProvider
+ implements SliderKeys {
protected static final Logger log =
@@ -113,9 +114,8 @@ public class SliderAMClientProvider extends AbstractClientProvider implements
AggregateConf instanceDefinition,
Path clusterDirPath,
Path generatedConfDirPath,
- boolean secure) throws
- SliderException,
- IOException {
+ boolean secure)
+ throws SliderException, IOException {
super.preflightValidateClusterConfiguration(sliderFileSystem, clustername, configuration, instanceDefinition, clusterDirPath, generatedConfDirPath, secure);
//add a check for the directory being writeable by the current user
@@ -167,7 +167,7 @@ public class SliderAMClientProvider extends AbstractClientProvider implements
CuratorZookeeperClient.class,
ServiceInstance.class,
ServiceNames.class,
-
+ MetricRegistry.class
};
String[] jars =
{
@@ -179,6 +179,7 @@ public class SliderAMClientProvider extends AbstractClientProvider implements
"curator-client.jar",
"curator-x-discovery.jar",
"curator-x-discovery-service.jar",
+ "metrics-core.jar"
};
ProviderUtils.addDependencyJars(providerResources, fileSystem, tempPath,
libdir, jars,
@@ -209,11 +210,11 @@ public class SliderAMClientProvider extends AbstractClientProvider implements
* add them to the command line
*/
public void addJVMOptions(AggregateConf aggregateConf,
- JavaCommandLineBuilder cmdLine) throws
- BadConfigException {
-
+ JavaCommandLineBuilder cmdLine)
+ throws BadConfigException {
+
MapOperations sliderAM =
- aggregateConf.getAppConfOperations().getMandatoryComponent(
+ aggregateConf.getAppConfOperations().getMandatoryComponent(
SliderKeys.COMPONENT_AM);
cmdLine.forceIPv4().headless();
String heap = sliderAM.getOption(RoleKeys.JVM_HEAP,
@@ -227,11 +228,10 @@ public class SliderAMClientProvider extends AbstractClientProvider implements
@Override
- public void prepareInstanceConfiguration(AggregateConf aggregateConf) throws
- SliderException,
- IOException {
+ public void prepareInstanceConfiguration(AggregateConf aggregateConf)
+ throws SliderException, IOException {
mergeTemplates(aggregateConf,
- INTERNAL_JSON, RESOURCES_JSON, APPCONF_JSON
+ INTERNAL_JSON, RESOURCES_JSON, APPCONF_JSON
);
}
}