http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/5d405543/slider-providers/accumulo/slider-accumulo-provider/src/main/java/org/apache/slider/providers/accumulo/AccumuloProviderService.java ---------------------------------------------------------------------- diff --git a/slider-providers/accumulo/slider-accumulo-provider/src/main/java/org/apache/slider/providers/accumulo/AccumuloProviderService.java b/slider-providers/accumulo/slider-accumulo-provider/src/main/java/org/apache/slider/providers/accumulo/AccumuloProviderService.java deleted file mode 100644 index c1bc9fe..0000000 --- a/slider-providers/accumulo/slider-accumulo-provider/src/main/java/org/apache/slider/providers/accumulo/AccumuloProviderService.java +++ /dev/null @@ -1,440 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.apache.slider.providers.accumulo; - -import com.google.common.net.HostAndPort; -import org.apache.commons.lang.StringUtils; -import org.apache.hadoop.conf.Configuration; -import org.apache.hadoop.fs.FileSystem; -import org.apache.hadoop.fs.Path; -import org.apache.hadoop.service.Service; -import org.apache.hadoop.yarn.api.ApplicationConstants; -import org.apache.hadoop.yarn.api.records.Container; -import org.apache.slider.api.InternalKeys; -import org.apache.slider.common.SliderKeys; -import org.apache.slider.api.ClusterDescription; -import org.apache.slider.api.OptionKeys; -import org.apache.slider.api.RoleKeys; -import org.apache.slider.core.conf.AggregateConf; -import org.apache.slider.core.conf.ConfTreeOperations; -import org.apache.slider.core.conf.MapOperations; -import org.apache.slider.core.launch.CommandLineBuilder; -import org.apache.slider.core.launch.ContainerLauncher; -import org.apache.slider.core.exceptions.BadClusterStateException; -import org.apache.slider.core.exceptions.BadCommandArgumentsException; -import org.apache.slider.core.exceptions.BadConfigException; -import org.apache.slider.core.exceptions.SliderException; -import org.apache.slider.providers.AbstractProviderService; -import org.apache.slider.providers.ProviderCompleted; -import org.apache.slider.providers.ProviderCompletedCallable; -import org.apache.slider.providers.ProviderCore; -import org.apache.slider.providers.ProviderRole; -import org.apache.slider.providers.ProviderUtils; -import org.apache.slider.common.tools.SliderFileSystem; -import org.apache.slider.common.tools.SliderUtils; -import org.apache.slider.core.zk.BlockingZKWatcher; -import org.apache.slider.common.tools.ConfigHelper; -import org.apache.slider.server.services.workflow.ForkedProcessService; -import org.apache.slider.server.services.workflow.WorkflowCallbackService; -import org.apache.zookeeper.KeeperException; -import org.apache.zookeeper.ZooKeeper; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.io.File; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - - -/** - * Server-side accumulo provider - */ -public class AccumuloProviderService extends AbstractProviderService implements - ProviderCore, - AccumuloKeys, - SliderKeys { - - protected static final Logger log = - LoggerFactory.getLogger(AccumuloClientProvider.class); - private AccumuloClientProvider clientProvider; - private static final ProviderUtils providerUtils = new ProviderUtils(log); - - private SliderFileSystem fileSystem = null; - - public AccumuloProviderService() { - super("accumulo"); - } - - - @Override - public List<ProviderRole> getRoles() { - return AccumuloRoles.ROLES; - } - - @Override - protected void serviceInit(Configuration conf) throws Exception { - super.serviceInit(conf); - clientProvider = new AccumuloClientProvider(conf); - } - - @Override - public void validateInstanceDefinition(AggregateConf instanceDefinition) throws - SliderException { - clientProvider.validateInstanceDefinition(instanceDefinition, null); - } - - @Override - public Configuration loadProviderConfigurationInformation(File confDir) - throws BadCommandArgumentsException, IOException { - - return loadProviderConfigurationInformation(confDir, SITE_XML); - } - - /* - ====================================================================== - Server interface below here - ====================================================================== - */ - - @Override - public void buildContainerLaunchContext(ContainerLauncher launcher, - AggregateConf instanceDefinition, - Container container, - String role, - SliderFileSystem fileSystem, - Path generatedConfPath, - MapOperations resourceComponent, - MapOperations appComponent, - Path containerTmpDirPath) throws IOException, SliderException { - - this.fileSystem = fileSystem; - - // Set the environment - launcher.putEnv(SliderUtils.buildEnvMap(appComponent)); - - Map<String, String> env = SliderUtils.buildEnvMap(appComponent); - launcher.setEnv(ACCUMULO_LOG_DIR, ApplicationConstants.LOG_DIR_EXPANSION_VAR); - ConfTreeOperations appConf = - instanceDefinition.getAppConfOperations(); - String hadoop_home = - ApplicationConstants.Environment.HADOOP_COMMON_HOME.$(); - MapOperations appConfGlobal = appConf.getGlobalOptions(); - hadoop_home = appConfGlobal.getOption(OPTION_HADOOP_HOME, hadoop_home); - launcher.setEnv(HADOOP_HOME, hadoop_home); - launcher.setEnv(HADOOP_PREFIX, hadoop_home); - - // By not setting ACCUMULO_HOME, this will cause the Accumulo script to - // compute it on its own to an absolute path. - - launcher.setEnv(ACCUMULO_CONF_DIR, - ProviderUtils.convertToAppRelativePath( - SliderKeys.PROPAGATED_CONF_DIR_NAME)); - launcher.setEnv(ZOOKEEPER_HOME, appConfGlobal.getMandatoryOption(OPTION_ZK_HOME)); - - //local resources - - - //add the configuration resources - launcher.addLocalResources(fileSystem.submitDirectory( - generatedConfPath, - SliderKeys.PROPAGATED_CONF_DIR_NAME)); - - //Add binaries - //now add the image if it was set - String imageURI = instanceDefinition.getInternalOperations() - .get(InternalKeys.INTERNAL_APPLICATION_IMAGE_PATH); - fileSystem.maybeAddImagePath(launcher.getLocalResources(), imageURI); - - CommandLineBuilder commandLine = new CommandLineBuilder(); - - String heap = "-Xmx" + appComponent.getOption(RoleKeys.JVM_HEAP, DEFAULT_JVM_HEAP); - String opt = "ACCUMULO_OTHER_OPTS"; - if (SliderUtils.isSet(heap)) { -/* JDK7 - - switch (role) { - case AccumuloKeys.ROLE_MASTER: - opt = "ACCUMULO_MASTER_OPTS"; - break; - case AccumuloKeys.ROLE_TABLET: - opt = "ACCUMULO_TSERVER_OPTS"; - break; - case AccumuloKeys.ROLE_MONITOR: - opt = "ACCUMULO_MONITOR_OPTS"; - break; - case AccumuloKeys.ROLE_GARBAGE_COLLECTOR: - opt = "ACCUMULO_GC_OPTS"; - break; - } -*/ - if (AccumuloKeys.ROLE_MASTER.equals(role)) { - opt = "ACCUMULO_MASTER_OPTS"; - } else if (AccumuloKeys.ROLE_TABLET.equals(role)) { - opt = "ACCUMULO_TSERVER_OPTS"; - } else if (AccumuloKeys.ROLE_MONITOR.equals(role)) { - opt = "ACCUMULO_MONITOR_OPTS"; - } else if (AccumuloKeys.ROLE_GARBAGE_COLLECTOR.equals(role)) { - opt = "ACCUMULO_GC_OPTS"; - } - launcher.setEnv(opt, heap); - } - - //this must stay relative if it is an image - commandLine.add(providerUtils.buildPathToScript(instanceDefinition, - "bin", "accumulo")); - - //role is translated to the accumulo one - commandLine.add(AccumuloRoles.serviceForRole(role)); - - // Add any role specific arguments to the command line - String additionalArgs = ProviderUtils.getAdditionalArgs(appComponent); - if (!StringUtils.isBlank(additionalArgs)) { - commandLine.add(additionalArgs); - } - - commandLine.addOutAndErrFiles(role + "-out.txt", role + "-err.txt"); - - - launcher.addCommand(commandLine.build()); - } - - public List<String> buildProcessCommandList(AggregateConf instance, - File confDir, - Map<String, String> env, - String... commands) throws - IOException, - SliderException { - env.put(ACCUMULO_LOG_DIR, ApplicationConstants.LOG_DIR_EXPANSION_VAR); - String hadoop_home = System.getenv(HADOOP_HOME); - MapOperations globalOptions = - instance.getAppConfOperations().getGlobalOptions(); - hadoop_home = globalOptions.getOption(OPTION_HADOOP_HOME, hadoop_home); - if (hadoop_home == null) { - throw new BadConfigException( - "Undefined env variable/config option: " + HADOOP_HOME); - } - ProviderUtils.validatePathReferencesLocalDir("HADOOP_HOME", hadoop_home); - env.put(HADOOP_HOME, hadoop_home); - env.put(HADOOP_PREFIX, hadoop_home); - //buildup accumulo home env variable to be absolute or relative - String accumulo_home = providerUtils.buildPathToHomeDir(instance, - "bin", "accumulo"); - File image = new File(accumulo_home); - String accumuloPath = image.getAbsolutePath(); - env.put(ACCUMULO_HOME, accumuloPath); - ProviderUtils.validatePathReferencesLocalDir("ACCUMULO_HOME", accumuloPath); - env.put(ACCUMULO_CONF_DIR, confDir.getAbsolutePath()); - String zkHome = globalOptions.getMandatoryOption(OPTION_ZK_HOME); - ProviderUtils.validatePathReferencesLocalDir("ZOOKEEPER_HOME", zkHome); - - env.put(ZOOKEEPER_HOME, zkHome); - - - String accumuloScript = AccumuloClientProvider.buildScriptBinPath(instance); - List<String> launchSequence = new ArrayList<String>(8); - launchSequence.add(0, accumuloScript); - Collections.addAll(launchSequence, commands); - return launchSequence; - } - - /** - * Accumulo startup is a bit more complex than HBase, as it needs - * to pre-initialize the data directory. - * - * This is done by running an init operation before starting the - * real master. If the init fails, that is reported to the AM, which - * then fails the application. - * If the init succeeds, the next service in the queue is started - - * a composite service that starts the Accumulo Master and, in parallel, - * sends a delayed event to the AM - * - * @param instanceDefinition component description - * @param confDir local dir with the config - * @param env environment variables above those generated by - * @param execInProgress callback for the event notification - * @throws IOException IO problems - * @throws SliderException anything internal - */ - @Override - public boolean exec(AggregateConf instanceDefinition, - File confDir, - Map<String, String> env, - ProviderCompleted execInProgress) - throws IOException, SliderException { - - - //now pull in these files and do a bit of last-minute validation - File siteXML = new File(confDir, SITE_XML); - Configuration accumuloSite = ConfigHelper.loadConfFromFile( - siteXML); - String zkQuorum = - accumuloSite.get(AccumuloConfigFileOptions.ZOOKEEPER_HOST); - if (zkQuorum == null) { - throw new BadConfigException("Accumulo site.xml %s does not contain %s", - siteXML, - AccumuloConfigFileOptions.ZOOKEEPER_HOST); - } else { - log.info("ZK Quorum is {}", zkQuorum); - } - //now test this - int timeout = 5000; - try { - verifyZookeeperLive(zkQuorum, timeout); - log.info("Zookeeper is live"); - } catch (KeeperException e) { - throw new BadClusterStateException("Failed to connect to Zookeeper at %s after %d seconds", - zkQuorum, timeout); - } catch (InterruptedException ignored) { - throw new BadClusterStateException( - "Interrupted while trying to connect to Zookeeper at %s", - zkQuorum); - } - boolean inited = isInited(instanceDefinition); - if (inited) { - // cluster is inited, so don't run anything - return false; - } - List<String> commands; - - log.info("Initializing accumulo datastore {}"); - ConfTreeOperations appConfOperations = - instanceDefinition.getAppConfOperations(); - - ConfTreeOperations internalOperations = - instanceDefinition.getInternalOperations(); - ConfTreeOperations resourceOperations = - instanceDefinition.getResourceOperations(); - String accumuloInstanceName = internalOperations.get(OptionKeys.APPLICATION_NAME); - commands = buildProcessCommandList(instanceDefinition, confDir, env, - "init", - PARAM_INSTANCE_NAME, - providerUtils.getUserName() + "-" + accumuloInstanceName, - PARAM_PASSWORD, - appConfOperations.getGlobalOptions().getMandatoryOption( - OPTION_ACCUMULO_PASSWORD), - "--clear-instance-name"); - - - ForkedProcessService accumulo = - queueCommand(getName(), env, commands); - //add a timeout to this process - accumulo.setTimeout( - appConfOperations.getGlobalOptions().getOptionInt( - OPTION_ACCUMULO_INIT_TIMEOUT, - INIT_TIMEOUT_DEFAULT), 1); - - //callback to AM to trigger cluster review is set up to happen after - //the init/verify action has succeeded - int delay = internalOperations.getGlobalOptions().getOptionInt( - InternalKeys.INTERNAL_CONTAINER_STARTUP_DELAY, - InternalKeys.DEFAULT_INTERNAL_CONTAINER_STARTUP_DELAY); - ProviderCompletedCallable completedCallable = - new ProviderCompletedCallable(execInProgress, null); - // JDK7 - Service notifier = new WorkflowCallbackService( - "accumulo notifier", - completedCallable, - delay, - true); - - // register the service for lifecycle management; - // this service is started after the accumulo process completes - addService(notifier); - - // now trigger the command sequence - maybeStartCommandSequence(); - return true; - } - - /** - * probe to see if accumulo has already been installed. - * @param cd cluster description - * @return true if the relevant data directory looks inited - * @throws IOException IO problems - */ - private boolean isInited(AggregateConf cd) throws - IOException, - BadConfigException { - String dataDir = cd.getInternalOperations() - .getGlobalOptions() - .getMandatoryOption( - InternalKeys.INTERNAL_DATA_DIR_PATH); - Path accumuloInited = new Path(dataDir, INSTANCE_ID); - FileSystem fs2 = FileSystem.get(accumuloInited.toUri(), getConf()); - return fs2.exists(accumuloInited); - } - - - - private void verifyZookeeperLive(String zkQuorum, int timeout) throws - IOException, - KeeperException, - InterruptedException { - - BlockingZKWatcher watcher = new BlockingZKWatcher(); - ZooKeeper zookeeper = new ZooKeeper(zkQuorum, 10000, watcher, true); - zookeeper.getChildren("/", watcher); - - watcher.waitForZKConnection(timeout); - - } - - @Override - public Map<String, String> buildProviderStatus() { - - Map<String,String> status = new HashMap<String, String>(); - - - return status; - } - - - /* non-javadoc - * @see org.apache.slider.providers.ProviderService#buildMonitorDetails() - */ - @Override - public Map<String, String> buildMonitorDetails(ClusterDescription clusterDesc) { - Map<String, String> details = super.buildMonitorDetails(clusterDesc); - - - details.put("Active Accumulo Master (RPC): " + - getInfoAvoidingNull(clusterDesc, - AccumuloKeys.MASTER_ADDRESS), null); - - String monitorKey = "Active Accumulo Monitor: "; - String monitorAddr = getInfoAvoidingNull(clusterDesc, AccumuloKeys.MONITOR_ADDRESS); - if (!StringUtils.isBlank(monitorAddr)) { - try { - HostAndPort hostPort = HostAndPort.fromString(monitorAddr); - details.put(monitorKey, - String.format("http://%s:%d", hostPort.getHostText(), hostPort.getPort())); - } catch (Exception e) { - details.put(monitorKey + "N/A", null); - } - } else { - details.put(monitorKey + "N/A", null); - } - - return details; - } -}
http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/5d405543/slider-providers/accumulo/slider-accumulo-provider/src/main/java/org/apache/slider/providers/accumulo/AccumuloRoles.java ---------------------------------------------------------------------- diff --git a/slider-providers/accumulo/slider-accumulo-provider/src/main/java/org/apache/slider/providers/accumulo/AccumuloRoles.java b/slider-providers/accumulo/slider-accumulo-provider/src/main/java/org/apache/slider/providers/accumulo/AccumuloRoles.java deleted file mode 100644 index 6144f9b..0000000 --- a/slider-providers/accumulo/slider-accumulo-provider/src/main/java/org/apache/slider/providers/accumulo/AccumuloRoles.java +++ /dev/null @@ -1,96 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.apache.slider.providers.accumulo; - -import org.apache.slider.common.SliderKeys; -import org.apache.slider.providers.ProviderRole; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.util.ArrayList; -import java.util.List; - -import static org.apache.slider.providers.accumulo.AccumuloKeys.ROLE_GARBAGE_COLLECTOR; -import static org.apache.slider.providers.accumulo.AccumuloKeys.ROLE_MASTER; -import static org.apache.slider.providers.accumulo.AccumuloKeys.ROLE_MONITOR; -import static org.apache.slider.providers.accumulo.AccumuloKeys.ROLE_TABLET; -import static org.apache.slider.providers.accumulo.AccumuloKeys.ROLE_TRACER; - -public class AccumuloRoles { - protected static final Logger log = - LoggerFactory.getLogger(AccumuloRoles.class); - - /** - * List of roles - */ - public static final List<ProviderRole> ROLES = - new ArrayList<ProviderRole>(); - - private static int BASE; - - /** - * Initialize role list - */ - static { - BASE = SliderKeys.ROLE_AM_PRIORITY_INDEX; - AccumuloRoles.ROLES.add(new ProviderRole(ROLE_MASTER, BASE + 1)); - AccumuloRoles.ROLES.add(new ProviderRole(ROLE_TABLET, BASE + 2)); - AccumuloRoles.ROLES.add(new ProviderRole(ROLE_GARBAGE_COLLECTOR, BASE + 3)); - AccumuloRoles.ROLES.add(new ProviderRole(ROLE_MONITOR, BASE + 4)); - AccumuloRoles.ROLES.add(new ProviderRole(ROLE_TRACER, BASE + 5)); - } - - - /** - * Convert a Slider role into the service/classname passed down - * to accumulo, (and implicitly , item to grep and kill when force - * killing services at the end of a test run) - * @param role role being instantiated - * @return first argument to Accumulo - */ - public static String serviceForRole(String role) { - for (ProviderRole providerRole : ROLES) { - if (providerRole.name.equals(role)) { - return role; - } - } - //unknown role - log.warn("unknown accumulo role {}", role); - return role; - } - - public static List<String> roleList() { - List<String> l = new ArrayList<String>(ROLES.size()); - for (ProviderRole providerRole : ROLES) { - l.add(providerRole.name); - } - return l; - } - - public static List<String> serviceList() { - List<String> l = new ArrayList<String>(ROLES.size()); - for (ProviderRole providerRole : ROLES) { - l.add(serviceForRole(providerRole.name)); - } - return l; - } - - - -} http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/5d405543/slider-providers/accumulo/slider-accumulo-provider/src/main/resources/org/apache/slider/providers/accumulo/conf/accumulo-env.sh ---------------------------------------------------------------------- diff --git a/slider-providers/accumulo/slider-accumulo-provider/src/main/resources/org/apache/slider/providers/accumulo/conf/accumulo-env.sh b/slider-providers/accumulo/slider-accumulo-provider/src/main/resources/org/apache/slider/providers/accumulo/conf/accumulo-env.sh deleted file mode 100755 index b7a11ee..0000000 --- a/slider-providers/accumulo/slider-accumulo-provider/src/main/resources/org/apache/slider/providers/accumulo/conf/accumulo-env.sh +++ /dev/null @@ -1,56 +0,0 @@ -#! /usr/bin/env bash - -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -### -### Configure these environment variables to point to your local installations. -### -### The functional tests require conditional values, so keep this style: -### -### test -z "$JAVA_HOME" && export JAVA_HOME=/usr/local/lib/jdk-1.6.0 -### -### -### Note that the -Xmx -Xms settings below require substantial free memory: -### you may want to use smaller values, especially when running everything -### on a single machine. -### -if [ -z "$HADOOP_HOME" ] -then - test -z "$HADOOP_PREFIX" && export HADOOP_PREFIX=/path/to/hadoop -else - HADOOP_PREFIX="$HADOOP_HOME" - unset HADOOP_HOME -fi -test -z "$HADOOP_CONF_DIR" && export HADOOP_CONF_DIR="$HADOOP_PREFIX/conf" -# hadoop-2.0: -# test -z "$HADOOP_CONF_DIR" && export HADOOP_CONF_DIR="$HADOOP_PREFIX/etc/hadoop" - -test -z "$JAVA_HOME" && export JAVA_HOME=/path/to/java -test -z "$ZOOKEEPER_HOME" && export ZOOKEEPER_HOME=/path/to/zookeeper -test -z "$ACCUMULO_LOG_DIR" && export ACCUMULO_LOG_DIR=$ACCUMULO_HOME/logs -if [ -f ${ACCUMULO_CONF_DIR}/accumulo.policy ] -then - POLICY="-Djava.security.manager -Djava.security.policy=${ACCUMULO_CONF_DIR}/accumulo.policy" -fi -test -z "$ACCUMULO_TSERVER_OPTS" && export ACCUMULO_TSERVER_OPTS="${POLICY} -Xmx128m -Xms128m " -test -z "$ACCUMULO_MASTER_OPTS" && export ACCUMULO_MASTER_OPTS="${POLICY} -Xmx128m -Xms128m" -test -z "$ACCUMULO_MONITOR_OPTS" && export ACCUMULO_MONITOR_OPTS="${POLICY} -Xmx64m -Xms64m" -test -z "$ACCUMULO_GC_OPTS" && export ACCUMULO_GC_OPTS="-Xmx64m -Xms64m" -test -z "$ACCUMULO_GENERAL_OPTS" && export ACCUMULO_GENERAL_OPTS="-XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -Dorg.apache.slider.container=${CONTAINER_ID}" -test -z "$ACCUMULO_OTHER_OPTS" && export ACCUMULO_OTHER_OPTS="-Xmx128m -Xms64m" -export ACCUMULO_LOG_HOST=`(grep -v '^#' $ACCUMULO_HOME/conf/monitor ; echo localhost ) 2>/dev/null | head -1` -# what do when the JVM runs out of heap memory -export ACCUMULO_KILL_CMD='kill -9 %p' http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/5d405543/slider-providers/accumulo/slider-accumulo-provider/src/main/resources/org/apache/slider/providers/accumulo/conf/accumulo-metrics.xml ---------------------------------------------------------------------- diff --git a/slider-providers/accumulo/slider-accumulo-provider/src/main/resources/org/apache/slider/providers/accumulo/conf/accumulo-metrics.xml b/slider-providers/accumulo/slider-accumulo-provider/src/main/resources/org/apache/slider/providers/accumulo/conf/accumulo-metrics.xml deleted file mode 100644 index 60f9f8d..0000000 --- a/slider-providers/accumulo/slider-accumulo-provider/src/main/resources/org/apache/slider/providers/accumulo/conf/accumulo-metrics.xml +++ /dev/null @@ -1,60 +0,0 @@ -<!-- - Licensed to the Apache Software Foundation (ASF) under one or more - contributor license agreements. See the NOTICE file distributed with - this work for additional information regarding copyright ownership. - The ASF licenses this file to You under the Apache License, Version 2.0 - (the "License"); you may not use this file except in compliance with - the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. ---> -<!-- - This file follows the conventions for XMLConfiguration files specified in the Apache Commons Configuration 1.5 Library. Changes to this file will be noticed - at runtime (see the FileChangedReloadingStrategy class in Commons Configuration). ---> -<config> -<!-- - Metrics log directory ---> - <logging> - <dir>${ACCUMULO_HOME}/metrics</dir> - </logging> -<!-- - Enable/Disable metrics accumulation on the different servers and their components - NOTE: Turning on logging can be expensive because it will use several more file handles and will create a lot of short lived objects. ---> - <master> - <enabled type="boolean">false</enabled> - <logging type="boolean">false</logging> - </master> - <logger> - <enabled type="boolean">false</enabled> - <logging type="boolean">false</logging> - </logger> - <tserver> - <enabled type="boolean">false</enabled> - <logging type="boolean">false</logging> - <update> - <enabled type="boolean">false</enabled> - <logging type="boolean">false</logging> - </update> - <scan> - <enabled type="boolean">false</enabled> - <logging type="boolean">false</logging> - </scan> - <minc> - <enabled type="boolean">false</enabled> - <logging type="boolean">false</logging> - </minc> - </tserver> - <thrift> - <enabled type="boolean">false</enabled> - <logging type="boolean">false</logging> - </thrift> -</config> http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/5d405543/slider-providers/accumulo/slider-accumulo-provider/src/main/resources/org/apache/slider/providers/accumulo/conf/accumulo-site.xml ---------------------------------------------------------------------- diff --git a/slider-providers/accumulo/slider-accumulo-provider/src/main/resources/org/apache/slider/providers/accumulo/conf/accumulo-site.xml b/slider-providers/accumulo/slider-accumulo-provider/src/main/resources/org/apache/slider/providers/accumulo/conf/accumulo-site.xml deleted file mode 100644 index b2dd1cf..0000000 --- a/slider-providers/accumulo/slider-accumulo-provider/src/main/resources/org/apache/slider/providers/accumulo/conf/accumulo-site.xml +++ /dev/null @@ -1,125 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<?xml-stylesheet type="text/xsl" href="configuration.xsl"?> -<!-- - Licensed to the Apache Software Foundation (ASF) under one or more - contributor license agreements. See the NOTICE file distributed with - this work for additional information regarding copyright ownership. - The ASF licenses this file to You under the Apache License, Version 2.0 - (the "License"); you may not use this file except in compliance with - the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. ---> - -<configuration> - <!-- Put your site-specific accumulo configurations here. The available configuration values along with their defaults are documented in docs/config.html Unless - you are simply testing at your workstation, you will most definitely need to change the three entries below. --> - - <property> - <name>instance.zookeeper.host</name> - <value>localhost:2181</value> - <description>comma separated list of zookeeper servers</description> - </property> - - <property> - <name>logger.dir.walog</name> - <value>walogs</value> - <description>The property only needs to be set if upgrading from 1.4 which used to store write-ahead logs on the local - filesystem. In 1.5 write-ahead logs are stored in DFS. When 1.5 is started for the first time it will copy any 1.4 - write ahead logs into DFS. It is possible to specify a comma-separated list of directories. - </description> - </property> - - <property> - <name>instance.secret</name> - <value>DEFAULT</value> - <description>A secret unique to a given instance that all servers - must know in order to communicate with one another. - Change it before initialization. To - change it later use ./bin/accumulo org.apache.accumulo.server.util.ChangeSecret --old [oldpasswd] --new [newpasswd], - and then update this file. - </description> - </property> - - <property> - <name>tserver.memory.maps.max</name> - <value>80M</value> - </property> - - <property> - <name>tserver.memory.maps.native.enabled</name> - <value>false</value> - </property> - - <property> - <name>tserver.cache.data.size</name> - <value>7M</value> - </property> - - <property> - <name>tserver.cache.index.size</name> - <value>20M</value> - </property> - - <property> - <name>trace.token.property.password</name> - <!-- change this to the root user's password, and/or change the user below --> - <value>secret</value> - </property> - - <property> - <name>trace.user</name> - <value>root</value> - </property> - - <property> - <name>tserver.sort.buffer.size</name> - <value>50M</value> - </property> - - <property> - <name>tserver.walog.max.size</name> - <value>100M</value> - </property> - - <property> - <name>general.maven.project.basedir</name> - <value></value> - </property> - - <property> - <name>general.classpaths</name> - <!-- - Add the following for hadoop-2.0 - $HADOOP_PREFIX/share/hadoop/common/.*.jar, - $HADOOP_PREFIX/share/hadoop/common/lib/.*.jar, - $HADOOP_PREFIX/share/hadoop/hdfs/.*.jar, - $HADOOP_PREFIX/share/hadoop/mapreduce/.*.jar, - $HADOOP_PREFIX/share/hadoop/yarn/.*.jar, - --> - <value> - $ACCUMULO_HOME/lib/accumulo-server.jar, - $ACCUMULO_HOME/lib/accumulo-core.jar, - $ACCUMULO_HOME/lib/accumulo-start.jar, - $ACCUMULO_HOME/lib/accumulo-fate.jar, - $ACCUMULO_HOME/lib/accumulo-proxy.jar, - $ACCUMULO_HOME/lib/[^.].*.jar, - $ZOOKEEPER_HOME/zookeeper[^.].*.jar, - $HADOOP_CONF_DIR, - $HADOOP_PREFIX/[^.].*.jar, - $HADOOP_PREFIX/lib/[^.].*.jar, - $HADOOP_PREFIX/share/hadoop/common/.*.jar, - $HADOOP_PREFIX/share/hadoop/common/lib/.*.jar, - $HADOOP_PREFIX/share/hadoop/hdfs/.*.jar, - $HADOOP_PREFIX/share/hadoop/mapreduce/.*.jar, - $HADOOP_PREFIX/share/hadoop/yarn/.*.jar, - </value> - <description>Classpaths that accumulo checks for updates and class files.</description> - </property> -</configuration> http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/5d405543/slider-providers/accumulo/slider-accumulo-provider/src/main/resources/org/apache/slider/providers/accumulo/conf/accumulo.policy.example ---------------------------------------------------------------------- diff --git a/slider-providers/accumulo/slider-accumulo-provider/src/main/resources/org/apache/slider/providers/accumulo/conf/accumulo.policy.example b/slider-providers/accumulo/slider-accumulo-provider/src/main/resources/org/apache/slider/providers/accumulo/conf/accumulo.policy.example deleted file mode 100644 index 2964f06..0000000 --- a/slider-providers/accumulo/slider-accumulo-provider/src/main/resources/org/apache/slider/providers/accumulo/conf/accumulo.policy.example +++ /dev/null @@ -1,143 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -grant codeBase "file:${java.home}/lib/ext/*" { - permission java.security.AllPermission; -}; - -// These should all be empty in a fielded system -grant codeBase "file:${org.apache.accumulo.core.home.dir}/src/server/target/classes/" { - permission java.security.AllPermission; -}; -grant codeBase "file:${org.apache.accumulo.core.home.dir}/src/core/target/classes/" { - permission java.security.AllPermission; -}; -grant codeBase "file:${org.apache.accumulo.core.home.dir}/src/start/target/classes/" { - permission java.security.AllPermission; -}; -grant codeBase "file:${org.apache.accumulo.core.home.dir}/src/examples/target/classes/" { - permission java.security.AllPermission; -}; - -grant codebase "file:${hadoop.home.dir}/*" { - permission java.lang.reflect.ReflectPermission "suppressAccessChecks"; - permission java.lang.RuntimePermission "shutdownHooks"; // hadoop libs use executables to discover usernames, groups, etc. - permission java.lang.RuntimePermission "loadLibrary.*"; - permission java.io.FilePermission "<<ALL FILES>>", "read, execute"; - permission java.io.FilePermission "/tmp", "write, delete"; - permission java.io.FilePermission "/tmp/-", "write, delete"; - permission java.io.FilePermission "/", "write"; - permission java.net.SocketPermission "*", "connect, resolve"; - permission java.util.PropertyPermission "java.library.path", "read"; - permission java.util.PropertyPermission "user.dir", "read"; - permission java.util.PropertyPermission "org.apache.commons.logging.*", "read"; - permission java.util.PropertyPermission "entityExpansionLimit", "read"; - permission java.util.PropertyPermission "maxOccurLimit", "read"; - permission java.util.PropertyPermission "os.name", "read"; -}; - -grant codebase "file:${hadoop.home.dir}/lib/*" { - // monitor's jetty web service - permission java.security.SecurityPermission "configurationPermission"; - permission java.security.SecurityPermission "tablesPermission"; - permission java.security.SecurityPermission "zookeeperWriterPermission"; - permission java.security.SecurityPermission "tableManagerPermission"; - permission java.security.SecurityPermission "transportPoolPermission"; - permission java.security.SecurityPermission "systemCredentialsPermission"; - permission java.lang.reflect.ReflectPermission "suppressAccessChecks"; - // need to accept web requests, and talk to job tracker, name node, etc. - permission java.net.SocketPermission "*", "accept, listen, resolve, connect, resolve"; - permission java.lang.RuntimePermission "getenv.*"; - permission java.lang.RuntimePermission "loadLibrary.*"; - permission java.util.PropertyPermission "org.mortbay.*", "read"; - permission java.util.PropertyPermission "VERBOSE", "read"; - permission java.util.PropertyPermission "IGNORED", "read"; - permission java.util.PropertyPermission "ISO_8859_1", "read"; - permission java.util.PropertyPermission "org.apache.commons.logging.*", "read"; - permission java.util.PropertyPermission "accumulo.*", "read"; - permission java.util.PropertyPermission "org.jfree.*", "read"; - permission java.util.PropertyPermission "elementAttributeLimit", "read"; - permission java.util.PropertyPermission "entityExpansionLimit", "read"; - permission java.util.PropertyPermission "maxOccurLimit", "read"; - // some resources come out of accumulo jars - permission java.lang.RuntimePermission "getClassLoader"; - permission java.io.FilePermission "${org.apache.accumulo.core.home.dir}/lib/*", "read"; - permission java.io.FilePermission "${org.apache.accumulo.core.home.dir}/src/-", "read"; - permission java.io.FilePermission "${hadoop.home.dir}/lib/*", "read"; - // images are cached in /tmp - permission java.io.FilePermission "/tmp/*", "read, write"; - permission java.io.FilePermission "/", "write"; -}; - -grant codebase "file:${zookeeper.home.dir}/*" { - permission java.net.SocketPermission "*", "connect, resolve"; - permission java.util.PropertyPermission "user.*", "read"; - permission java.util.PropertyPermission "java.*", "read"; - permission java.util.PropertyPermission "zookeeper.*", "read"; - permission java.util.PropertyPermission "jute.*", "read"; - permission java.util.PropertyPermission "os.*", "read"; - // accumulo properties read in callbacks - permission java.util.PropertyPermission "accumulo.*", "read"; - permission java.security.SecurityPermission "configurationPermission"; - permission java.security.SecurityPermission "tablesPermission"; - permission java.security.SecurityPermission "zookeeperWriterPermission"; - permission java.security.SecurityPermission "tableManagerPermission"; - permission java.security.SecurityPermission "transportPoolPermission"; - permission java.security.SecurityPermission "systemCredentialsPermission"; - permission java.lang.reflect.ReflectPermission "suppressAccessChecks"; - permission java.lang.RuntimePermission "exitVM"; -}; - -grant codebase "file:${org.apache.accumulo.core.home.dir}/lib/ext/*" { -}; - -grant codebase "file:${org.apache.accumulo.core.home.dir}/lib/*" { - permission java.lang.reflect.ReflectPermission "suppressAccessChecks"; - // logging, configuration and getting user id - permission java.io.FilePermission "<<ALL FILES>>", "read, write, execute, delete"; - permission java.util.PropertyPermission "*", "read, write"; - permission java.lang.RuntimePermission "getenv.*"; - permission java.lang.RuntimePermission "getClassLoader"; - permission java.lang.RuntimePermission "loadLibrary.*"; - permission java.lang.RuntimePermission "accessDeclaredMembers"; - permission java.lang.RuntimePermission "selectorProvider"; - permission java.lang.RuntimePermission "accessClassInPackage.*"; - permission java.lang.RuntimePermission "readFileDescriptor"; - permission java.lang.RuntimePermission "writeFileDescriptor"; - permission java.lang.RuntimePermission "modifyThread"; - permission java.lang.RuntimePermission "modifyThreadGroup"; - permission java.lang.RuntimePermission "createClassLoader"; - permission java.lang.RuntimePermission "setContextClassLoader"; - permission java.lang.RuntimePermission "exitVM"; - permission java.lang.RuntimePermission "shutdownHooks"; - permission java.security.SecurityPermission "getPolicy"; - permission java.security.SecurityPermission "getProperty.*"; - permission java.security.SecurityPermission "putProviderProperty.*"; - permission java.security.SecurityPermission "setSystemScope"; - permission java.security.SecurityPermission "configurationPermission"; - permission java.security.SecurityPermission "tablesPermission"; - permission java.security.SecurityPermission "zookeeperWriterPermission"; - permission java.security.SecurityPermission "tableManagerPermission"; - permission java.security.SecurityPermission "transportPoolPermission"; - permission java.security.SecurityPermission "systemCredentialsPermission"; - permission java.util.logging.LoggingPermission "control"; - permission java.net.NetPermission "getProxySelector"; - permission javax.management.MBeanServerPermission "createMBeanServer"; - permission javax.management.MBeanTrustPermission "register"; - permission javax.management.MBeanPermission "*", "registerMBean"; - permission java.net.SocketPermission "*", "accept, connect, listen, resolve"; -}; http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/5d405543/slider-providers/accumulo/slider-accumulo-provider/src/main/resources/org/apache/slider/providers/accumulo/conf/auditLog.xml ---------------------------------------------------------------------- diff --git a/slider-providers/accumulo/slider-accumulo-provider/src/main/resources/org/apache/slider/providers/accumulo/conf/auditLog.xml b/slider-providers/accumulo/slider-accumulo-provider/src/main/resources/org/apache/slider/providers/accumulo/conf/auditLog.xml deleted file mode 100644 index 327f181..0000000 --- a/slider-providers/accumulo/slider-accumulo-provider/src/main/resources/org/apache/slider/providers/accumulo/conf/auditLog.xml +++ /dev/null @@ -1,41 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - Licensed to the Apache Software Foundation (ASF) under one or more - contributor license agreements. See the NOTICE file distributed with - this work for additional information regarding copyright ownership. - The ASF licenses this file to You under the Apache License, Version 2.0 - (the "License"); you may not use this file except in compliance with - the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. ---> -<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd"> -<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/"> - - - - <!-- Write out Audit info to an Audit file --> - <appender name="Audit" class="org.apache.log4j.DailyRollingFileAppender"> - <param name="File" value="${org.apache.accumulo.core.dir.log}/${org.apache.accumulo.core.ip.localhost.hostname}_${org.apache.slider.container}.audit"/> - <param name="MaxBackupIndex" value="10"/> - <param name="DatePattern" value="'.'yyyy-MM-dd"/> - <layout class="org.apache.log4j.PatternLayout"> - <param name="ConversionPattern" value="%d{yyyy-MM-dd HH:mm:ss,SSS/Z} [%c{2}] %-5p: %m%n"/> - </layout> - </appender> - <logger name="Audit" additivity="false"> - <appender-ref ref="Audit" /> - <level value="OFF"/> - </logger> - - - - - -</log4j:configuration> http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/5d405543/slider-providers/accumulo/slider-accumulo-provider/src/main/resources/org/apache/slider/providers/accumulo/conf/gc ---------------------------------------------------------------------- diff --git a/slider-providers/accumulo/slider-accumulo-provider/src/main/resources/org/apache/slider/providers/accumulo/conf/gc b/slider-providers/accumulo/slider-accumulo-provider/src/main/resources/org/apache/slider/providers/accumulo/conf/gc deleted file mode 100644 index 63fb8bb..0000000 --- a/slider-providers/accumulo/slider-accumulo-provider/src/main/resources/org/apache/slider/providers/accumulo/conf/gc +++ /dev/null @@ -1,16 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -localhost http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/5d405543/slider-providers/accumulo/slider-accumulo-provider/src/main/resources/org/apache/slider/providers/accumulo/conf/generic_logger.xml ---------------------------------------------------------------------- diff --git a/slider-providers/accumulo/slider-accumulo-provider/src/main/resources/org/apache/slider/providers/accumulo/conf/generic_logger.xml b/slider-providers/accumulo/slider-accumulo-provider/src/main/resources/org/apache/slider/providers/accumulo/conf/generic_logger.xml deleted file mode 100644 index 19537e9..0000000 --- a/slider-providers/accumulo/slider-accumulo-provider/src/main/resources/org/apache/slider/providers/accumulo/conf/generic_logger.xml +++ /dev/null @@ -1,83 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - Licensed to the Apache Software Foundation (ASF) under one or more - contributor license agreements. See the NOTICE file distributed with - this work for additional information regarding copyright ownership. - The ASF licenses this file to You under the Apache License, Version 2.0 - (the "License"); you may not use this file except in compliance with - the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. ---> -<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd"> -<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/"> - - <!-- Write out everything at the DEBUG level to the debug log --> - <appender name="A2" class="org.apache.log4j.RollingFileAppender"> - <param name="File" value="${org.apache.accumulo.core.dir.log}/${org.apache.accumulo.core.application}_${org.apache.accumulo.core.ip.localhost.hostname}_${org.apache.slider.container}.debug.log"/> - <param name="MaxFileSize" value="1000MB"/> - <param name="MaxBackupIndex" value="10"/> - <param name="Threshold" value="DEBUG"/> - <layout class="org.apache.log4j.PatternLayout"> - <param name="ConversionPattern" value="%d{ISO8601} [%-8c{2}] %-5p: %m%n"/> - </layout> - </appender> - - <!-- Write out INFO and higher to the regular log --> - <appender name="A3" class="org.apache.log4j.RollingFileAppender"> - <param name="File" value="${org.apache.accumulo.core.dir.log}/${org.apache.accumulo.core.application}_${org.apache.accumulo.core.ip.localhost.hostname}_${org.apache.slider.container}.log"/> - <param name="MaxFileSize" value="1000MB"/> - <param name="MaxBackupIndex" value="10"/> - <param name="Threshold" value="INFO"/> - <layout class="org.apache.log4j.PatternLayout"> - <param name="ConversionPattern" value="%d{ISO8601} [%-8c{2}] %-5p: %m%n"/> - </layout> - </appender> - - <!-- Send all logging data to a centralized logger --> - <appender name="N1" class="org.apache.log4j.net.SocketAppender"> - <param name="remoteHost" value="${org.apache.accumulo.core.host.log}"/> - <param name="port" value="4560"/> - <param name="application" value="${org.apache.accumulo.core.application}:${org.apache.accumulo.core.ip.localhost.hostname}"/> - <param name="Threshold" value="WARN"/> - </appender> - - <!-- If the centralized logger is down, buffer the log events, but drop them if it stays down --> - <appender name="ASYNC" class="org.apache.log4j.AsyncAppender"> - <appender-ref ref="N1" /> - </appender> - - <!-- Log accumulo events to the debug, normal and remote logs. --> - <logger name="org.apache.accumulo" additivity="false"> - <level value="DEBUG"/> - <appender-ref ref="A2" /> - <appender-ref ref="A3" /> - <appender-ref ref="ASYNC" /> - </logger> - - <logger name="org.apache.accumulo.core.file.rfile.bcfile"> - <level value="INFO"/> - </logger> - - <logger name="org.mortbay.log"> - <level value="WARN"/> - </logger> - - <logger name="org.apache.zookeeper"> - <level value="ERROR"/> - </logger> - - <!-- Log non-accumulo events to the debug and normal logs. --> - <root> - <level value="INFO"/> - <appender-ref ref="A2" /> - <appender-ref ref="A3" /> - </root> - -</log4j:configuration> http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/5d405543/slider-providers/accumulo/slider-accumulo-provider/src/main/resources/org/apache/slider/providers/accumulo/conf/log4j.properties ---------------------------------------------------------------------- diff --git a/slider-providers/accumulo/slider-accumulo-provider/src/main/resources/org/apache/slider/providers/accumulo/conf/log4j.properties b/slider-providers/accumulo/slider-accumulo-provider/src/main/resources/org/apache/slider/providers/accumulo/conf/log4j.properties deleted file mode 100644 index a4bcb2e..0000000 --- a/slider-providers/accumulo/slider-accumulo-provider/src/main/resources/org/apache/slider/providers/accumulo/conf/log4j.properties +++ /dev/null @@ -1,41 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# default logging properties: -# by default, log everything at INFO or higher to the console -log4j.rootLogger=INFO,A1 - -# hide Jetty junk -log4j.logger.org.mortbay.log=WARN,A1 - -# hide "Got brand-new compresssor" messages -log4j.logger.org.apache.hadoop.io.compress=WARN,A1 - -# hide junk from TestRandomDeletes -log4j.logger.org.apache.accumulo.test.TestRandomDeletes=WARN,A1 - -# hide junk from VFS -log4j.logger.org.apache.commons.vfs2.impl.DefaultFileSystemManager=WARN,A1 - -# hide almost everything from zookeeper -log4j.logger.org.apache.zookeeper=ERROR,A1 - -# hide AUDIT messages in the shell, alternatively you could send them to a different logger -log4j.logger.org.apache.accumulo.core.util.shell.Shell.audit=WARN,A1 - -# Send most things to the console -log4j.appender.A1=org.apache.log4j.ConsoleAppender -log4j.appender.A1.layout.ConversionPattern=%d{ISO8601} [%-8c{2}] %-5p: %m%n -log4j.appender.A1.layout=org.apache.log4j.PatternLayout http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/5d405543/slider-providers/accumulo/slider-accumulo-provider/src/main/resources/org/apache/slider/providers/accumulo/conf/masters ---------------------------------------------------------------------- diff --git a/slider-providers/accumulo/slider-accumulo-provider/src/main/resources/org/apache/slider/providers/accumulo/conf/masters b/slider-providers/accumulo/slider-accumulo-provider/src/main/resources/org/apache/slider/providers/accumulo/conf/masters deleted file mode 100644 index 63fb8bb..0000000 --- a/slider-providers/accumulo/slider-accumulo-provider/src/main/resources/org/apache/slider/providers/accumulo/conf/masters +++ /dev/null @@ -1,16 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -localhost http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/5d405543/slider-providers/accumulo/slider-accumulo-provider/src/main/resources/org/apache/slider/providers/accumulo/conf/monitor ---------------------------------------------------------------------- diff --git a/slider-providers/accumulo/slider-accumulo-provider/src/main/resources/org/apache/slider/providers/accumulo/conf/monitor b/slider-providers/accumulo/slider-accumulo-provider/src/main/resources/org/apache/slider/providers/accumulo/conf/monitor deleted file mode 100644 index 63fb8bb..0000000 --- a/slider-providers/accumulo/slider-accumulo-provider/src/main/resources/org/apache/slider/providers/accumulo/conf/monitor +++ /dev/null @@ -1,16 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -localhost http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/5d405543/slider-providers/accumulo/slider-accumulo-provider/src/main/resources/org/apache/slider/providers/accumulo/conf/monitor_logger.xml ---------------------------------------------------------------------- diff --git a/slider-providers/accumulo/slider-accumulo-provider/src/main/resources/org/apache/slider/providers/accumulo/conf/monitor_logger.xml b/slider-providers/accumulo/slider-accumulo-provider/src/main/resources/org/apache/slider/providers/accumulo/conf/monitor_logger.xml deleted file mode 100644 index 7e42a4f..0000000 --- a/slider-providers/accumulo/slider-accumulo-provider/src/main/resources/org/apache/slider/providers/accumulo/conf/monitor_logger.xml +++ /dev/null @@ -1,64 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - Licensed to the Apache Software Foundation (ASF) under one or more - contributor license agreements. See the NOTICE file distributed with - this work for additional information regarding copyright ownership. - The ASF licenses this file to You under the Apache License, Version 2.0 - (the "License"); you may not use this file except in compliance with - the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. ---> -<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd"> -<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/"> - - <!-- Write out everything at the DEBUG level to the debug log --> - <appender name="A2" class="org.apache.log4j.RollingFileAppender"> - <param name="File" value="${org.apache.accumulo.core.dir.log}/${org.apache.accumulo.core.application}_${org.apache.accumulo.core.ip.localhost.hostname}_${org.apache.slider.container}.debug.log"/> - <param name="MaxFileSize" value="100MB"/> - <param name="MaxBackupIndex" value="10"/> - <param name="Threshold" value="DEBUG"/> - <layout class="org.apache.log4j.PatternLayout"> - <param name="ConversionPattern" value="%d{ISO8601} [%-8c{2}] %-5p: %X{application} %m%n"/> - </layout> - </appender> - - <!-- Write out INFO and higher to the regular log --> - <appender name="A3" class="org.apache.log4j.RollingFileAppender"> - <param name="File" value="${org.apache.accumulo.core.dir.log}/${org.apache.accumulo.core.application}_${org.apache.accumulo.core.ip.localhost.hostname}_${org.apache.slider.container}.log"/> - <param name="MaxFileSize" value="100MB"/> - <param name="MaxBackupIndex" value="10"/> - <param name="Threshold" value="INFO"/> - <layout class="org.apache.log4j.PatternLayout"> - <param name="ConversionPattern" value="%d{ISO8601} [%-8c{2}] %-5p: %X{application} %m%n"/> - </layout> - </appender> - - <!-- Keep the last few log messages for display to the user --> - <appender name="GUI" class="org.apache.accumulo.server.monitor.LogService"> - <param name="keep" value="40"/> - <param name="Threshold" value="WARN"/> - </appender> - - <!-- Log accumulo messages to debug, normal and GUI --> - <logger name="org.apache.accumulo" additivity="false"> - <level value="DEBUG"/> - <appender-ref ref="A2" /> - <appender-ref ref="A3" /> - <appender-ref ref="GUI" /> - </logger> - - <!-- Log non-accumulo messages to debug, normal logs. --> - <root> - <level value="INFO"/> - <appender-ref ref="A2" /> - <appender-ref ref="A3" /> - </root> - -</log4j:configuration> http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/5d405543/slider-providers/accumulo/slider-accumulo-provider/src/main/resources/org/apache/slider/providers/accumulo/conf/slaves ---------------------------------------------------------------------- diff --git a/slider-providers/accumulo/slider-accumulo-provider/src/main/resources/org/apache/slider/providers/accumulo/conf/slaves b/slider-providers/accumulo/slider-accumulo-provider/src/main/resources/org/apache/slider/providers/accumulo/conf/slaves deleted file mode 100644 index 63fb8bb..0000000 --- a/slider-providers/accumulo/slider-accumulo-provider/src/main/resources/org/apache/slider/providers/accumulo/conf/slaves +++ /dev/null @@ -1,16 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -localhost http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/5d405543/slider-providers/accumulo/slider-accumulo-provider/src/main/resources/org/apache/slider/providers/accumulo/conf/tracers ---------------------------------------------------------------------- diff --git a/slider-providers/accumulo/slider-accumulo-provider/src/main/resources/org/apache/slider/providers/accumulo/conf/tracers b/slider-providers/accumulo/slider-accumulo-provider/src/main/resources/org/apache/slider/providers/accumulo/conf/tracers deleted file mode 100644 index 63fb8bb..0000000 --- a/slider-providers/accumulo/slider-accumulo-provider/src/main/resources/org/apache/slider/providers/accumulo/conf/tracers +++ /dev/null @@ -1,16 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -localhost http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/5d405543/slider-providers/accumulo/slider-accumulo-provider/src/main/resources/org/apache/slider/providers/accumulo/instance/appconf.json ---------------------------------------------------------------------- diff --git a/slider-providers/accumulo/slider-accumulo-provider/src/main/resources/org/apache/slider/providers/accumulo/instance/appconf.json b/slider-providers/accumulo/slider-accumulo-provider/src/main/resources/org/apache/slider/providers/accumulo/instance/appconf.json deleted file mode 100644 index d6ac754..0000000 --- a/slider-providers/accumulo/slider-accumulo-provider/src/main/resources/org/apache/slider/providers/accumulo/instance/appconf.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "schema": "http://example.org/specification/v2.0.0", - - "metadata": { - - - }, - - "global": { - - "site.master.port.client": "0", - "site.trace.port.client": "0", - "site.tserver.port.client": "0", - "site.gc.port.client": "0", - "site.monitor.port.log4j": "0", - "site.instance.secret": "secret", - "site.accumulo.password": "secret", - - "jvm.heapsize": "256M" - }, - - - "components": { - "master": { - }, - "tserver": { - }, - "monitor": { - "role.additional.args": "--address 0.0.0.0" - }, - "tracer": { - }, - "gc": { - "role.additional.args":"--address 0.0.0.0" - } - } -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/5d405543/slider-providers/accumulo/slider-accumulo-provider/src/main/resources/org/apache/slider/providers/accumulo/instance/resources.json ---------------------------------------------------------------------- diff --git a/slider-providers/accumulo/slider-accumulo-provider/src/main/resources/org/apache/slider/providers/accumulo/instance/resources.json b/slider-providers/accumulo/slider-accumulo-provider/src/main/resources/org/apache/slider/providers/accumulo/instance/resources.json deleted file mode 100644 index 7068570..0000000 --- a/slider-providers/accumulo/slider-accumulo-provider/src/main/resources/org/apache/slider/providers/accumulo/instance/resources.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "schema": "http://example.org/specification/v2.0.0", - - "metadata": { - - }, - - "global": { - "yarn.vcores": "1", - "yarn.memory": "512" - }, - - "components": { - "master": { - "yarn.component.instances": "1" - }, - "tserver": { - "yarn.component.instances": "2" - }, - "monitor": { - "yarn.component.instances": "0" - }, - "tracer": { - "yarn.component.instances": "0" - }, - "gc": { - "yarn.component.instances": "0" - } - } -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/5d405543/slider-providers/accumulo/slider-accumulo-provider/src/main/resources/org/apache/slider/providers/accumulo/role-accumulo-gc.xml ---------------------------------------------------------------------- diff --git a/slider-providers/accumulo/slider-accumulo-provider/src/main/resources/org/apache/slider/providers/accumulo/role-accumulo-gc.xml b/slider-providers/accumulo/slider-accumulo-provider/src/main/resources/org/apache/slider/providers/accumulo/role-accumulo-gc.xml deleted file mode 100644 index 92308ad..0000000 --- a/slider-providers/accumulo/slider-accumulo-provider/src/main/resources/org/apache/slider/providers/accumulo/role-accumulo-gc.xml +++ /dev/null @@ -1,55 +0,0 @@ -<?xml version="1.0"?> -<?xml-stylesheet type="text/xsl" href="configuration.xsl"?> -<!-- - ~ Licensed to the Apache Software Foundation (ASF) under one - ~ or more contributor license agreements. See the NOTICE file - ~ distributed with this work for additional information - ~ regarding copyright ownership. The ASF licenses this file - ~ to you under the Apache License, Version 2.0 (the - ~ "License"); you may not use this file except in compliance - ~ with the License. You may obtain a copy of the License at - ~ - ~ http://www.apache.org/licenses/LICENSE-2.0 - ~ - ~ Unless required by applicable law or agreed to in writing, software - ~ distributed under the License is distributed on an "AS IS" BASIS, - ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - ~ See the License for the specific language governing permissions and - ~ limitations under the License. - --> - - <!-- - Garbage collector - --> -<configuration> - <property> - <name>role.name</name> - <value>gc</value> - </property> - - <property> - <name>role.instances</name> - <value>1</value> - </property> - - <property> - <name>role.additional.args</name> - <value>--address 0.0.0.0</value> - </property> - - <property> - <name>yarn.vcores</name> - <value>1</value> - </property> - - <property> - <name>yarn.memory</name> - <value>1024</value> - </property> - - <property> - <name>jvm.heapsize</name> - <value>512M</value> - </property> - -</configuration> http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/5d405543/slider-providers/accumulo/slider-accumulo-provider/src/main/resources/org/apache/slider/providers/accumulo/role-accumulo-master.xml ---------------------------------------------------------------------- diff --git a/slider-providers/accumulo/slider-accumulo-provider/src/main/resources/org/apache/slider/providers/accumulo/role-accumulo-master.xml b/slider-providers/accumulo/slider-accumulo-provider/src/main/resources/org/apache/slider/providers/accumulo/role-accumulo-master.xml deleted file mode 100644 index 9e36eea..0000000 --- a/slider-providers/accumulo/slider-accumulo-provider/src/main/resources/org/apache/slider/providers/accumulo/role-accumulo-master.xml +++ /dev/null @@ -1,55 +0,0 @@ -<?xml version="1.0"?> -<?xml-stylesheet type="text/xsl" href="configuration.xsl"?> -<!-- - ~ Licensed to the Apache Software Foundation (ASF) under one - ~ or more contributor license agreements. See the NOTICE file - ~ distributed with this work for additional information - ~ regarding copyright ownership. The ASF licenses this file - ~ to you under the Apache License, Version 2.0 (the - ~ "License"); you may not use this file except in compliance - ~ with the License. You may obtain a copy of the License at - ~ - ~ http://www.apache.org/licenses/LICENSE-2.0 - ~ - ~ Unless required by applicable law or agreed to in writing, software - ~ distributed under the License is distributed on an "AS IS" BASIS, - ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - ~ See the License for the specific language governing permissions and - ~ limitations under the License. - --> - - <!-- - These are the default cluster options for a Slider cluster - --> -<configuration> - <property> - <name>role.name</name> - <value>master</value> - </property> - - <property> - <name>role.instances</name> - <value>1</value> - </property> - - <property> - <name>yarn.vcores</name> - <value>1</value> - </property> - - <property> - <name>yarn.memory</name> - <value>1024</value> - </property> - - <property> - <name>jvm.heapsize</name> - <value>512M</value> - </property> - - <property> - <name>app.infoport</name> - <value>0</value> - </property> - -</configuration> http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/5d405543/slider-providers/accumulo/slider-accumulo-provider/src/main/resources/org/apache/slider/providers/accumulo/role-accumulo-monitor.xml ---------------------------------------------------------------------- diff --git a/slider-providers/accumulo/slider-accumulo-provider/src/main/resources/org/apache/slider/providers/accumulo/role-accumulo-monitor.xml b/slider-providers/accumulo/slider-accumulo-provider/src/main/resources/org/apache/slider/providers/accumulo/role-accumulo-monitor.xml deleted file mode 100644 index 0d55fa3..0000000 --- a/slider-providers/accumulo/slider-accumulo-provider/src/main/resources/org/apache/slider/providers/accumulo/role-accumulo-monitor.xml +++ /dev/null @@ -1,52 +0,0 @@ -<?xml version="1.0"?> -<?xml-stylesheet type="text/xsl" href="configuration.xsl"?> -<!-- - ~ Licensed to the Apache Software Foundation (ASF) under one - ~ or more contributor license agreements. See the NOTICE file - ~ distributed with this work for additional information - ~ regarding copyright ownership. The ASF licenses this file - ~ to you under the Apache License, Version 2.0 (the - ~ "License"); you may not use this file except in compliance - ~ with the License. You may obtain a copy of the License at - ~ - ~ http://www.apache.org/licenses/LICENSE-2.0 - ~ - ~ Unless required by applicable law or agreed to in writing, software - ~ distributed under the License is distributed on an "AS IS" BASIS, - ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - ~ See the License for the specific language governing permissions and - ~ limitations under the License. - --> - -<configuration> - <property> - <name>role.name</name> - <value>monitor</value> - </property> - - <property> - <name>role.instances</name> - <value>1</value> - </property> - - <property> - <name>role.additional.args</name> - <value>--address 0.0.0.0</value> - </property> - - <property> - <name>yarn.vcores</name> - <value>1</value> - </property> - - <property> - <name>yarn.memory</name> - <value>384</value> - </property> - - <property> - <name>jvm.heapsize</name> - <value>256M</value> - </property> - -</configuration> http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/5d405543/slider-providers/accumulo/slider-accumulo-provider/src/main/resources/org/apache/slider/providers/accumulo/role-accumulo-other.xml ---------------------------------------------------------------------- diff --git a/slider-providers/accumulo/slider-accumulo-provider/src/main/resources/org/apache/slider/providers/accumulo/role-accumulo-other.xml b/slider-providers/accumulo/slider-accumulo-provider/src/main/resources/org/apache/slider/providers/accumulo/role-accumulo-other.xml deleted file mode 100644 index 54669d1..0000000 --- a/slider-providers/accumulo/slider-accumulo-provider/src/main/resources/org/apache/slider/providers/accumulo/role-accumulo-other.xml +++ /dev/null @@ -1,51 +0,0 @@ -<?xml version="1.0"?> -<?xml-stylesheet type="text/xsl" href="configuration.xsl"?> -<!-- - ~ Licensed to the Apache Software Foundation (ASF) under one - ~ or more contributor license agreements. See the NOTICE file - ~ distributed with this work for additional information - ~ regarding copyright ownership. The ASF licenses this file - ~ to you under the Apache License, Version 2.0 (the - ~ "License"); you may not use this file except in compliance - ~ with the License. You may obtain a copy of the License at - ~ - ~ http://www.apache.org/licenses/LICENSE-2.0 - ~ - ~ Unless required by applicable law or agreed to in writing, software - ~ distributed under the License is distributed on an "AS IS" BASIS, - ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - ~ See the License for the specific language governing permissions and - ~ limitations under the License. - --> - - <!-- - Accumulo options for any role that doesn't - have an explicit configuration - --> -<configuration> - <property> - <name>role.name</name> - <value>other</value> - </property> - - <property> - <name>role.instances</name> - <value>1</value> - </property> - - <property> - <name>yarn.vcores</name> - <value>1</value> - </property> - - <property> - <name>yarn.memory</name> - <value>1024</value> - </property> - - <property> - <name>jvm.heapsize</name> - <value>512M</value> - </property> - -</configuration> http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/5d405543/slider-providers/accumulo/slider-accumulo-provider/src/main/resources/org/apache/slider/providers/accumulo/role-accumulo-tablet.xml ---------------------------------------------------------------------- diff --git a/slider-providers/accumulo/slider-accumulo-provider/src/main/resources/org/apache/slider/providers/accumulo/role-accumulo-tablet.xml b/slider-providers/accumulo/slider-accumulo-provider/src/main/resources/org/apache/slider/providers/accumulo/role-accumulo-tablet.xml deleted file mode 100644 index 56ad727..0000000 --- a/slider-providers/accumulo/slider-accumulo-provider/src/main/resources/org/apache/slider/providers/accumulo/role-accumulo-tablet.xml +++ /dev/null @@ -1,55 +0,0 @@ -<?xml version="1.0"?> -<?xml-stylesheet type="text/xsl" href="configuration.xsl"?> -<!-- - ~ Licensed to the Apache Software Foundation (ASF) under one - ~ or more contributor license agreements. See the NOTICE file - ~ distributed with this work for additional information - ~ regarding copyright ownership. The ASF licenses this file - ~ to you under the Apache License, Version 2.0 (the - ~ "License"); you may not use this file except in compliance - ~ with the License. You may obtain a copy of the License at - ~ - ~ http://www.apache.org/licenses/LICENSE-2.0 - ~ - ~ Unless required by applicable law or agreed to in writing, software - ~ distributed under the License is distributed on an "AS IS" BASIS, - ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - ~ See the License for the specific language governing permissions and - ~ limitations under the License. - --> - - <!-- - These are the default cluster options for a Slider cluster - --> -<configuration> - <property> - <name>role.name</name> - <value>tablet</value> - </property> - - <property> - <name>role.instances</name> - <value>2</value> - </property> - - <property> - <name>yarn.vcores</name> - <value>1</value> - </property> - - <property> - <name>yarn.memory</name> - <value>768</value> - </property> - - <property> - <name>jvm.heapsize</name> - <value>512M</value> - </property> - - <property> - <name>app.infoport</name> - <value>0</value> - </property> - -</configuration> http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/5d405543/slider-providers/accumulo/slider-accumulo-provider/src/main/resources/org/apache/slider/providers/accumulo/role-accumulo-tracer.xml ---------------------------------------------------------------------- diff --git a/slider-providers/accumulo/slider-accumulo-provider/src/main/resources/org/apache/slider/providers/accumulo/role-accumulo-tracer.xml b/slider-providers/accumulo/slider-accumulo-provider/src/main/resources/org/apache/slider/providers/accumulo/role-accumulo-tracer.xml deleted file mode 100644 index 8003c9f..0000000 --- a/slider-providers/accumulo/slider-accumulo-provider/src/main/resources/org/apache/slider/providers/accumulo/role-accumulo-tracer.xml +++ /dev/null @@ -1,51 +0,0 @@ -<?xml version="1.0"?> -<?xml-stylesheet type="text/xsl" href="configuration.xsl"?> -<!-- - ~ Licensed to the Apache Software Foundation (ASF) under one - ~ or more contributor license agreements. See the NOTICE file - ~ distributed with this work for additional information - ~ regarding copyright ownership. The ASF licenses this file - ~ to you under the Apache License, Version 2.0 (the - ~ "License"); you may not use this file except in compliance - ~ with the License. You may obtain a copy of the License at - ~ - ~ http://www.apache.org/licenses/LICENSE-2.0 - ~ - ~ Unless required by applicable law or agreed to in writing, software - ~ distributed under the License is distributed on an "AS IS" BASIS, - ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - ~ See the License for the specific language governing permissions and - ~ limitations under the License. - --> - - <!-- - Accumulo options for any role that doesn't - have an explicit configuration - --> -<configuration> - <property> - <name>role.name</name> - <value>tracer</value> - </property> - - <property> - <name>role.instances</name> - <value>1</value> - </property> - - <property> - <name>yarn.vcores</name> - <value>1</value> - </property> - - <property> - <name>yarn.memory</name> - <value>384</value> - </property> - - <property> - <name>jvm.heapsize</name> - <value>256M</value> - </property> - -</configuration> http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/5d405543/slider-providers/accumulo/slider-accumulo-provider/src/test/groovy/org/apache/slider/providers/accumulo/AccumuloTestBase.groovy ---------------------------------------------------------------------- diff --git a/slider-providers/accumulo/slider-accumulo-provider/src/test/groovy/org/apache/slider/providers/accumulo/AccumuloTestBase.groovy b/slider-providers/accumulo/slider-accumulo-provider/src/test/groovy/org/apache/slider/providers/accumulo/AccumuloTestBase.groovy deleted file mode 100644 index 2a87cf0..0000000 --- a/slider-providers/accumulo/slider-accumulo-provider/src/test/groovy/org/apache/slider/providers/accumulo/AccumuloTestBase.groovy +++ /dev/null @@ -1,247 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.apache.slider.providers.accumulo - -import groovy.transform.CompileStatic -import groovy.util.logging.Slf4j -import org.apache.accumulo.core.client.ZooKeeperInstance -import org.apache.hadoop.yarn.conf.YarnConfiguration -import org.apache.slider.core.main.ServiceLauncher -import org.apache.slider.api.ClusterDescription -import org.apache.slider.api.ResourceKeys -import org.apache.slider.client.SliderClient -import org.apache.slider.test.YarnZKMiniClusterTestBase -import org.junit.internal.AssumptionViolatedException - -import static org.apache.slider.common.SliderXMLConfKeysForTesting.* -import static org.apache.slider.providers.accumulo.AccumuloKeys.* -import static org.apache.slider.common.params.Arguments.ARG_PROVIDER -import static org.apache.slider.common.params.Arguments.ARG_RES_COMP_OPT - -/** - * test base for accumulo clusters - */ -@CompileStatic -@Slf4j -public abstract class AccumuloTestBase extends YarnZKMiniClusterTestBase { - - - public final int accumulo_cluster_startup_time = accumuloLaunchWaitTime - - /** - * The time to sleep before trying to talk to the HBase Master and - * expect meaningful results. - */ - public final int accumulo_cluster_startup_to_live_time = accumulo_cluster_startup_time - public static final int ACCUMULO_GO_LIVE_TIME = 60000 - @Override - public String getTestConfigurationPath() { - return "src/main/resources/" + CONF_RESOURCE; - } - - @Override - void setup() { - super.setup() - assumeBoolOption(SLIDER_CONFIG, KEY_TEST_ACCUMULO_ENABLED, true) - assumeArchiveDefined(); - assumeApplicationHome(); - YarnConfiguration conf = testConfiguration - assumeOtherSettings(conf) - } - - /** - * Teardown - */ - @Override - void teardown() { - super.teardown(); - if (teardownKillall && kill_supported) { - try { - killAllAccumuloProcesses(); - } catch (AssumptionViolatedException e) { - log.info e.toString(); - } - } - } - - void killAllAccumuloProcesses() { - killJavaProcesses("org.apache.accumulo.start.Main", SIGKILL) - } - - @Override - public String getArchiveKey() { - return KEY_TEST_ACCUMULO_TAR - } - - /** - * Get the key for the application - * @return - */ - @Override - public String getApplicationHomeKey() { - return KEY_TEST_ACCUMULO_HOME - } - - /** - * Assume that HBase home is defined. This does not check that the - * path is valid -that is expected to be a failure on tests that require - * HBase home to be set. - */ - - public void assumeOtherSettings(YarnConfiguration conf) { - assumeStringOptionSet(conf, OPTION_ZK_HOME) - } - - /** - * Create a full cluster with a master & the requested no. of region servers - * @param clustername cluster name - * @param tablets # of nodes - * @param extraArgs list of extra args to add to the creation command - * @param deleteExistingData should the data of any existing cluster - * of this name be deleted - * @param blockUntilRunning block until the AM is running - * @return launcher which will have executed the command. - */ - public ServiceLauncher<SliderClient> createAccCluster( - String clustername, - int tablets, - List<String> extraArgs, - boolean deleteExistingData, - boolean blockUntilRunning) { - Map<String, Integer> roles = [ - (ROLE_MASTER): 1, - (ROLE_TABLET): tablets, - ]; - return createAccCluster( - clustername, - roles, - extraArgs, - deleteExistingData, - blockUntilRunning); - } - - /** - * Create an accumulo cluster - * @param clustername - * @param roles - * @param extraArgs - * @param deleteExistingData - * @param blockUntilRunning - * @return the cluster launcher - */ - public ServiceLauncher<SliderClient> createAccCluster( - String clustername, - Map<String, Integer> roles, - List<String> extraArgs, - boolean deleteExistingData, - boolean blockUntilRunning) { - extraArgs << ARG_PROVIDER << PROVIDER_ACCUMULO; - - YarnConfiguration conf = testConfiguration - - def clusterOps = [ - (OPTION_ZK_HOME) : conf.getTrimmed( - OPTION_ZK_HOME), - (OPTION_HADOOP_HOME) : conf.getTrimmed( - OPTION_HADOOP_HOME), - ("site." + - AccumuloConfigFileOptions.MONITOR_PORT_CLIENT) : AccumuloConfigFileOptions.MONITOR_PORT_CLIENT_DEFAULT, - ("site." + - AccumuloConfigFileOptions.MASTER_PORT_CLIENT) : AccumuloConfigFileOptions.MASTER_PORT_CLIENT_DEFAULT, - ] - - - extraArgs << ARG_RES_COMP_OPT << ROLE_MASTER << ResourceKeys.YARN_MEMORY << - YRAM; - extraArgs << ARG_RES_COMP_OPT << ROLE_TABLET << ResourceKeys.YARN_MEMORY << - YRAM - extraArgs << ARG_RES_COMP_OPT << ROLE_MONITOR << ResourceKeys.YARN_MEMORY << - YRAM - extraArgs << ARG_RES_COMP_OPT << ROLE_GARBAGE_COLLECTOR << - ResourceKeys.YARN_MEMORY << YRAM - - return createCluster(clustername, - roles, - extraArgs, - deleteExistingData, - blockUntilRunning, - clusterOps) - } - - def getAccClusterStatus() { - ZooKeeperInstance instance = new ZooKeeperInstance("", "localhost:4"); - instance.getConnector("user", "pass").instanceOperations().tabletServers; - } - - - public String fetchLocalPage(int port, String page) { - String url = "http://localhost:" + port + page - return fetchWebPage(url) - - } - - public ClusterDescription flexAccClusterTestRun( - String clustername, List<Map<String, Integer>> plan) { - int planCount = plan.size() - assert planCount > 0 - createMiniCluster(clustername, configuration, - 1, - true); - //now launch the cluster - SliderClient sliderClient = null; - ServiceLauncher launcher = createAccCluster(clustername, - plan[0], - [], - true, - true); - sliderClient = (SliderClient) launcher.service; - try { - - //verify the #of roles is as expected - //get the hbase status - waitForRoleCount(sliderClient, plan[0], - accumulo_cluster_startup_to_live_time); - sleep(ACCUMULO_GO_LIVE_TIME); - - plan.remove(0) - - ClusterDescription cd = null - while (!plan.empty) { - - Map<String, Integer> flexTarget = plan.remove(0) - //now flex - describe( - "Flexing " + roleMapToString(flexTarget)); - sliderClient.flex(clustername, flexTarget); - cd = waitForRoleCount(sliderClient, flexTarget, - accumulo_cluster_startup_to_live_time); - - sleep(ACCUMULO_GO_LIVE_TIME); - - } - - return cd; - - } finally { - maybeStopCluster(sliderClient, null, "end of flex test run"); - } - - } - -}
