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/11/26 19:36:42 UTC
[4/8] incubator-slider git commit: SLIDER-656 purge providers/hbase
and providers/accumulo : files and modules
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/live/TestAccCorrectInstanceName.groovy
----------------------------------------------------------------------
diff --git a/slider-providers/accumulo/slider-accumulo-provider/src/test/groovy/org/apache/slider/providers/accumulo/live/TestAccCorrectInstanceName.groovy b/slider-providers/accumulo/slider-accumulo-provider/src/test/groovy/org/apache/slider/providers/accumulo/live/TestAccCorrectInstanceName.groovy
deleted file mode 100644
index 1f1b726..0000000
--- a/slider-providers/accumulo/slider-accumulo-provider/src/test/groovy/org/apache/slider/providers/accumulo/live/TestAccCorrectInstanceName.groovy
+++ /dev/null
@@ -1,83 +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.live
-
-import groovy.transform.CompileStatic
-import groovy.util.logging.Slf4j
-import org.apache.hadoop.yarn.api.records.YarnApplicationState
-import org.apache.slider.api.ClusterDescription
-import org.apache.slider.client.SliderClient
-import org.apache.slider.common.params.Arguments
-import org.apache.slider.core.main.ServiceLauncher
-import org.apache.slider.providers.accumulo.AccumuloKeys
-import org.apache.slider.providers.accumulo.AccumuloTestBase
-import org.junit.Test
-
-@CompileStatic
-@Slf4j
-class TestAccCorrectInstanceName extends AccumuloTestBase {
-
- @Test
- public void testAccM1T1GC1Mon1() throws Throwable {
- int tablets = 1
- int monitor = 1
- int gc = 1
- String clustername = createMiniCluster( "",
- configuration, 1, 1, 1, true, false)
- describe(" Create an accumulo cluster");
-
- //make sure that ZK is up and running at the binding string
- //now launch the cluster
- Map<String, Integer> roles = [
- (AccumuloKeys.ROLE_MASTER): 1,
- (AccumuloKeys.ROLE_TABLET): tablets,
- (AccumuloKeys.ROLE_MONITOR): monitor,
- (AccumuloKeys.ROLE_GARBAGE_COLLECTOR): gc
- ];
- String password = "password"
- List<String> extraArgs = [Arguments.ARG_OPTION, AccumuloKeys.OPTION_ACCUMULO_PASSWORD, password]
- ServiceLauncher launcher = createAccCluster(clustername, roles, extraArgs, true, true)
- SliderClient sliderClient = launcher.service
- addToTeardown(sliderClient);
-
-
- waitWhileClusterLive(sliderClient);
- assert sliderClient.applicationReport.yarnApplicationState == YarnApplicationState.RUNNING
- waitForRoleCount(sliderClient, roles, accumulo_cluster_startup_to_live_time)
- describe("Cluster status")
- ClusterDescription status
- status = sliderClient.getClusterDescription(clustername)
- log.info(prettyPrint(status.toJsonString()))
-
- //now give the cluster a bit of time to actually start work
-
- log.info("Sleeping for a while")
- sleep(ACCUMULO_GO_LIVE_TIME);
-
- //verify that all is still there
- waitForRoleCount(sliderClient, roles, 0)
-
- log.info("Finishing")
- status = sliderClient.getClusterDescription(clustername)
- log.info(prettyPrint(status.toJsonString()))
- maybeStopCluster(sliderClient, clustername, "shut down $clustername")
-
- }
-
-}
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/live/TestAccFlexTablets133Mgr113.groovy
----------------------------------------------------------------------
diff --git a/slider-providers/accumulo/slider-accumulo-provider/src/test/groovy/org/apache/slider/providers/accumulo/live/TestAccFlexTablets133Mgr113.groovy b/slider-providers/accumulo/slider-accumulo-provider/src/test/groovy/org/apache/slider/providers/accumulo/live/TestAccFlexTablets133Mgr113.groovy
deleted file mode 100644
index 18c00f5..0000000
--- a/slider-providers/accumulo/slider-accumulo-provider/src/test/groovy/org/apache/slider/providers/accumulo/live/TestAccFlexTablets133Mgr113.groovy
+++ /dev/null
@@ -1,59 +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.live
-
-import groovy.util.logging.Slf4j
-import org.apache.slider.api.ClusterDescription
-import org.apache.slider.providers.accumulo.AccumuloKeys
-import org.apache.slider.providers.accumulo.AccumuloTestBase
-import org.junit.Test
-
-@Slf4j
-class TestAccFlexTablets133Mgr113 extends AccumuloTestBase {
-
- @Test
- public void testAccFlexTablets133Mgr113() throws Throwable {
- ClusterDescription cd = flexAccClusterTestRun(createClusterName(),
- [
- [
- (AccumuloKeys.ROLE_MASTER) : 1,
- (AccumuloKeys.ROLE_TABLET) : 1,
- (AccumuloKeys.ROLE_MONITOR): 1,
- (AccumuloKeys.ROLE_GARBAGE_COLLECTOR): 1
- ],
- [
- (AccumuloKeys.ROLE_MASTER) : 1,
- (AccumuloKeys.ROLE_TABLET) : 3,
- (AccumuloKeys.ROLE_MONITOR): 1,
- (AccumuloKeys.ROLE_GARBAGE_COLLECTOR): 1
- ],
- [
- (AccumuloKeys.ROLE_MASTER) : 3,
- (AccumuloKeys.ROLE_TABLET) : 3,
- (AccumuloKeys.ROLE_MONITOR): 1,
- (AccumuloKeys.ROLE_GARBAGE_COLLECTOR): 1
- ],
-
- ]
- )
-
- log.info("Final CD \n{}", cd)
- }
-
-}
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/live/TestAccFlexTablets1to3.groovy
----------------------------------------------------------------------
diff --git a/slider-providers/accumulo/slider-accumulo-provider/src/test/groovy/org/apache/slider/providers/accumulo/live/TestAccFlexTablets1to3.groovy b/slider-providers/accumulo/slider-accumulo-provider/src/test/groovy/org/apache/slider/providers/accumulo/live/TestAccFlexTablets1to3.groovy
deleted file mode 100644
index 2e8f3c9..0000000
--- a/slider-providers/accumulo/slider-accumulo-provider/src/test/groovy/org/apache/slider/providers/accumulo/live/TestAccFlexTablets1to3.groovy
+++ /dev/null
@@ -1,57 +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.live
-
-import groovy.transform.CompileStatic
-import groovy.util.logging.Slf4j
-import org.apache.slider.api.ClusterDescription
-import org.apache.slider.providers.accumulo.AccumuloKeys
-import org.apache.slider.providers.accumulo.AccumuloTestBase
-import org.junit.Test
-
-@CompileStatic
-@Slf4j
-class TestAccFlexTablets1to3 extends AccumuloTestBase {
-
- @Test
- public void testAccFlexTablets1to3() throws Throwable {
- Map<String, Integer> plan1 = (Map<String, Integer>) [
- (AccumuloKeys.ROLE_MASTER): 1,
- (AccumuloKeys.ROLE_TABLET): 1,
- (AccumuloKeys.ROLE_MONITOR): 1,
- (AccumuloKeys.ROLE_GARBAGE_COLLECTOR): 1]
-
- Map<String, Integer> plan2 = (Map<String, Integer>) [
- (AccumuloKeys.ROLE_MASTER): 1,
- (AccumuloKeys.ROLE_TABLET): 3,
- (AccumuloKeys.ROLE_MONITOR): 1,
- (AccumuloKeys.ROLE_GARBAGE_COLLECTOR): 1]
-
- ClusterDescription cd = flexAccClusterTestRun(
- createClusterName(),
- [plan1, plan2]
- )
-
- log.info("Final CD \n{}", cd)
- }
-
-
-
-
-}
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/live/TestAccFreezeThaw.groovy
----------------------------------------------------------------------
diff --git a/slider-providers/accumulo/slider-accumulo-provider/src/test/groovy/org/apache/slider/providers/accumulo/live/TestAccFreezeThaw.groovy b/slider-providers/accumulo/slider-accumulo-provider/src/test/groovy/org/apache/slider/providers/accumulo/live/TestAccFreezeThaw.groovy
deleted file mode 100644
index f55b73e..0000000
--- a/slider-providers/accumulo/slider-accumulo-provider/src/test/groovy/org/apache/slider/providers/accumulo/live/TestAccFreezeThaw.groovy
+++ /dev/null
@@ -1,113 +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.live
-
-import groovy.transform.CompileStatic
-import groovy.util.logging.Slf4j
-import org.apache.hadoop.yarn.api.records.FinalApplicationStatus
-import org.apache.slider.client.SliderClient
-import org.apache.slider.core.main.ServiceLauncher
-import org.apache.slider.providers.accumulo.AccumuloConfigFileOptions
-import org.apache.slider.providers.accumulo.AccumuloKeys
-import org.apache.slider.providers.accumulo.AccumuloTestBase
-import org.junit.Test
-
-@CompileStatic
-@Slf4j
-class TestAccFreezeThaw extends AccumuloTestBase {
-
- @Test
- public void testAccFreezeThaw() throws Throwable {
- int tablets = 1
- int monitor = 1
- int gc = 1
- String clustername = createMiniCluster("",
- configuration, 1, 1, 1, true, false)
- describe(" Create an accumulo cluster");
-
- //now launch the cluster
- Map<String, Integer> roles = [
- (AccumuloKeys.ROLE_MASTER): 1,
- (AccumuloKeys.ROLE_TABLET): tablets,
- (AccumuloKeys.ROLE_MONITOR): monitor,
- (AccumuloKeys.ROLE_GARBAGE_COLLECTOR): gc
- ];
- ServiceLauncher launcher = createAccCluster(clustername, roles, [], true, true)
- SliderClient sliderClient = launcher.service
- addToTeardown(sliderClient);
-
-
- waitForRoleCount(sliderClient, roles, accumulo_cluster_startup_to_live_time)
- //now give the cluster a bit of time to actually start work
-
- log.info("Sleeping for a while")
- sleepForAccumuloClusterLive();
- //verify that all is still there
- waitForRoleCount(sliderClient, roles, 0, "extended cluster operation")
-
- String page = fetchLocalPage(AccumuloConfigFileOptions.MONITOR_PORT_CLIENT_INT,
- AccumuloKeys.MONITOR_PAGE_JSON)
- log.info(page);
-
- log.info("Stopping")
- clusterActionFreeze(sliderClient, clustername, "stop");
- def finishedAppReport = waitForAppToFinish(sliderClient)
- assert finishedAppReport.finalApplicationStatus ==
- FinalApplicationStatus.SUCCEEDED
-
- //make sure the fetch fails
- try {
- page = fetchLocalPage(AccumuloConfigFileOptions.MONITOR_PORT_CLIENT_INT,
- AccumuloKeys.MONITOR_PAGE_JSON)
- //this should have failed
- log.error("The accumulo monitor is still live")
- log.error(page)
- } catch (ConnectException expected) {
- //
- log.debug("expected exception", expected)
- }
- //force kill any accumulo processes
- if (kill_supported) {
- killAllAccumuloProcesses()
- }
-
- sleepForAccumuloClusterLive();
-
- log.info("Thawing")
-
- ServiceLauncher launcher2 = thawCluster(clustername, [], true);
- SliderClient sliderClient2 = (SliderClient) launcher2.service
- addToTeardown(sliderClient2)
- waitForRoleCount(sliderClient, roles, accumulo_cluster_startup_to_live_time, "thawing")
-
-
- sleepForAccumuloClusterLive();
- //verify that all is still there
- waitForRoleCount(sliderClient, roles, 0, "extended cluster operation after thawing")
- page = fetchLocalPage(
- AccumuloConfigFileOptions.MONITOR_PORT_CLIENT_INT,
- AccumuloKeys.MONITOR_PAGE_JSON)
- log.info(page);
- }
-
- public void sleepForAccumuloClusterLive() {
- sleep(ACCUMULO_GO_LIVE_TIME)
- }
-
-}
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/live/TestAccLiveHDFSArchive.groovy
----------------------------------------------------------------------
diff --git a/slider-providers/accumulo/slider-accumulo-provider/src/test/groovy/org/apache/slider/providers/accumulo/live/TestAccLiveHDFSArchive.groovy b/slider-providers/accumulo/slider-accumulo-provider/src/test/groovy/org/apache/slider/providers/accumulo/live/TestAccLiveHDFSArchive.groovy
deleted file mode 100644
index ecb9062..0000000
--- a/slider-providers/accumulo/slider-accumulo-provider/src/test/groovy/org/apache/slider/providers/accumulo/live/TestAccLiveHDFSArchive.groovy
+++ /dev/null
@@ -1,85 +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.live
-
-import groovy.transform.CompileStatic
-import groovy.util.logging.Slf4j
-import org.apache.hadoop.yarn.api.records.YarnApplicationState
-import org.apache.slider.api.ClusterDescription
-import org.apache.slider.client.SliderClient
-import org.apache.slider.core.main.ServiceLauncher
-import org.apache.slider.providers.accumulo.AccumuloConfigFileOptions
-import org.apache.slider.providers.accumulo.AccumuloKeys
-import org.apache.slider.providers.accumulo.AccumuloTestBase
-import org.junit.Test
-
-@CompileStatic
-@Slf4j
-class TestAccLiveHDFSArchive extends AccumuloTestBase {
-
- @Test
- public void testAccLiveHDFSArchive() throws Throwable {
- int tablets = 1
- int monitor = 1
- int gc = 1
- String clustername = createMiniCluster(
- "", configuration, 1, 1, 1, true, true)
- describe(" Create an accumulo cluster from an archive");
-
- enableTestRunAgainstUploadedArchive();
- //now launch the cluster
- Map<String, Integer> roles = [
- (AccumuloKeys.ROLE_MASTER): 1,
- (AccumuloKeys.ROLE_TABLET): tablets,
- (AccumuloKeys.ROLE_MONITOR): monitor,
- (AccumuloKeys.ROLE_GARBAGE_COLLECTOR): gc
- ];
- ServiceLauncher launcher = createAccCluster(clustername, roles, [], true, true)
- SliderClient sliderClient = launcher.service
- addToTeardown(sliderClient);
-
-
- waitWhileClusterLive(sliderClient);
- assert sliderClient.applicationReport.yarnApplicationState == YarnApplicationState.RUNNING
- waitForRoleCount(sliderClient, roles, accumulo_cluster_startup_to_live_time)
- describe("Cluster status")
- ClusterDescription status
- status = sliderClient.getClusterDescription(clustername)
- log.info(prettyPrint(status.toJsonString()))
-
- //now give the cluster a bit of time to actually start work
-
- log.info("Sleeping for a while")
- sleep(ACCUMULO_GO_LIVE_TIME);
-
- //verify that all is still there
- waitForRoleCount(sliderClient, roles, 0)
-
- String page = fetchLocalPage(AccumuloConfigFileOptions.MONITOR_PORT_CLIENT_INT,
- AccumuloKeys.MONITOR_PAGE_JSON)
- log.info(page);
-
- log.info("Finishing")
- status = sliderClient.getClusterDescription(clustername)
- log.info(prettyPrint(status.toJsonString()))
- maybeStopCluster(sliderClient, clustername, "shut down $clustername")
-
- }
-
-}
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/live/TestAccLiveLocalArchive.groovy
----------------------------------------------------------------------
diff --git a/slider-providers/accumulo/slider-accumulo-provider/src/test/groovy/org/apache/slider/providers/accumulo/live/TestAccLiveLocalArchive.groovy b/slider-providers/accumulo/slider-accumulo-provider/src/test/groovy/org/apache/slider/providers/accumulo/live/TestAccLiveLocalArchive.groovy
deleted file mode 100644
index 997fa19..0000000
--- a/slider-providers/accumulo/slider-accumulo-provider/src/test/groovy/org/apache/slider/providers/accumulo/live/TestAccLiveLocalArchive.groovy
+++ /dev/null
@@ -1,87 +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.live
-
-import groovy.transform.CompileStatic
-import groovy.util.logging.Slf4j
-import org.apache.hadoop.yarn.api.records.YarnApplicationState
-import org.apache.slider.api.ClusterDescription
-import org.apache.slider.client.SliderClient
-import org.apache.slider.core.main.ServiceLauncher
-import org.apache.slider.providers.accumulo.AccumuloConfigFileOptions
-import org.apache.slider.providers.accumulo.AccumuloKeys
-import org.apache.slider.providers.accumulo.AccumuloTestBase
-import org.junit.Test
-
-@CompileStatic
-@Slf4j
-class TestAccLiveLocalArchive extends AccumuloTestBase {
-
- @Test
- public void testAccLiveLocalArchive() throws Throwable {
- int tablets = 1
- int monitor = 1
- int gc = 1
- String clustername = createMiniCluster(
- "", configuration, 1, 1, 1, true, false)
- describe(" Create an accumulo cluster from an archive");
-
- //image mode
- switchToImageDeploy = true
-
- //now launch the cluster
- Map<String, Integer> roles = [
- (AccumuloKeys.ROLE_MASTER): 1,
- (AccumuloKeys.ROLE_TABLET): tablets,
- (AccumuloKeys.ROLE_MONITOR): monitor,
- (AccumuloKeys.ROLE_GARBAGE_COLLECTOR): gc
- ];
- ServiceLauncher launcher = createAccCluster(clustername, roles, [], true, true)
- SliderClient sliderClient = launcher.service
- addToTeardown(sliderClient);
-
-
- waitWhileClusterLive(sliderClient);
- assert sliderClient.applicationReport.yarnApplicationState == YarnApplicationState.RUNNING
- waitForRoleCount(sliderClient, roles, accumulo_cluster_startup_to_live_time)
- describe("Cluster status")
- ClusterDescription status
- status = sliderClient.getClusterDescription(clustername)
- log.info(prettyPrint(status.toJsonString()))
-
- //now give the cluster a bit of time to actually start work
-
- log.info("Sleeping for a while")
- sleep(ACCUMULO_GO_LIVE_TIME);
-
- //verify that all is still there
- waitForRoleCount(sliderClient, roles, 0)
-
- String page = fetchLocalPage(AccumuloConfigFileOptions.MONITOR_PORT_CLIENT_INT,
- AccumuloKeys.MONITOR_PAGE_JSON)
- log.info(page);
-
- log.info("Finishing")
- status = sliderClient.getClusterDescription(clustername)
- log.info(prettyPrint(status.toJsonString()))
- maybeStopCluster(sliderClient, clustername, "shut down $clustername")
-
- }
-
-}
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/live/TestAccM1T1GC1Mon1.groovy
----------------------------------------------------------------------
diff --git a/slider-providers/accumulo/slider-accumulo-provider/src/test/groovy/org/apache/slider/providers/accumulo/live/TestAccM1T1GC1Mon1.groovy b/slider-providers/accumulo/slider-accumulo-provider/src/test/groovy/org/apache/slider/providers/accumulo/live/TestAccM1T1GC1Mon1.groovy
deleted file mode 100644
index 586c4c0..0000000
--- a/slider-providers/accumulo/slider-accumulo-provider/src/test/groovy/org/apache/slider/providers/accumulo/live/TestAccM1T1GC1Mon1.groovy
+++ /dev/null
@@ -1,79 +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.live
-
-import groovy.transform.CompileStatic
-import groovy.util.logging.Slf4j
-import org.apache.hadoop.yarn.api.records.YarnApplicationState
-import org.apache.slider.api.ClusterDescription
-import org.apache.slider.client.SliderClient
-import org.apache.slider.core.main.ServiceLauncher
-import org.apache.slider.providers.accumulo.AccumuloKeys
-import org.apache.slider.providers.accumulo.AccumuloTestBase
-import org.junit.Test
-
-@CompileStatic
-@Slf4j
-class TestAccM1T1GC1Mon1 extends AccumuloTestBase {
-
- @Test
- public void testAccM1T1GC1Mon1() throws Throwable {
- int tablets = 1
- int monitor = 1
- int gc = 1
- String clustername = createMiniCluster( "", configuration, 1, 1, 1, true, false)
- describe(" Create an accumulo cluster");
-
- //now launch the cluster
- Map<String, Integer> roles = [
- (AccumuloKeys.ROLE_MASTER): 1,
- (AccumuloKeys.ROLE_TABLET): tablets,
- (AccumuloKeys.ROLE_MONITOR): monitor,
- (AccumuloKeys.ROLE_GARBAGE_COLLECTOR): gc
- ];
- ServiceLauncher launcher = createAccCluster(clustername, roles, [], true, true)
- SliderClient sliderClient = launcher.service
- addToTeardown(sliderClient);
-
-
- waitWhileClusterLive(sliderClient);
- assert sliderClient.applicationReport.yarnApplicationState == YarnApplicationState.RUNNING
- waitForRoleCount(sliderClient, roles, accumulo_cluster_startup_to_live_time)
- describe("Cluster status")
- ClusterDescription status
- status = sliderClient.getClusterDescription(clustername)
- log.info(prettyPrint(status.toJsonString()))
-
- //now give the cluster a bit of time to actually start work
-
- log.info("Sleeping for a while")
- sleep(ACCUMULO_GO_LIVE_TIME);
-
- //verify that all is still there
- waitForRoleCount(sliderClient, roles, 0)
-
-
- log.info("Finishing")
- status = sliderClient.getClusterDescription(clustername)
- log.info(prettyPrint(status.toJsonString()))
- maybeStopCluster(sliderClient, clustername, "shut down $clustername")
-
- }
-
-}
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/live/TestAccM2T2GC1Mon1.groovy
----------------------------------------------------------------------
diff --git a/slider-providers/accumulo/slider-accumulo-provider/src/test/groovy/org/apache/slider/providers/accumulo/live/TestAccM2T2GC1Mon1.groovy b/slider-providers/accumulo/slider-accumulo-provider/src/test/groovy/org/apache/slider/providers/accumulo/live/TestAccM2T2GC1Mon1.groovy
deleted file mode 100644
index 804d29d..0000000
--- a/slider-providers/accumulo/slider-accumulo-provider/src/test/groovy/org/apache/slider/providers/accumulo/live/TestAccM2T2GC1Mon1.groovy
+++ /dev/null
@@ -1,85 +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.live
-
-import groovy.transform.CompileStatic
-import groovy.util.logging.Slf4j
-import org.apache.hadoop.yarn.api.records.YarnApplicationState
-import org.apache.slider.api.ClusterDescription
-import org.apache.slider.client.SliderClient
-import org.apache.slider.core.main.ServiceLauncher
-import org.apache.slider.providers.accumulo.AccumuloConfigFileOptions
-import org.apache.slider.providers.accumulo.AccumuloKeys
-import org.apache.slider.providers.accumulo.AccumuloTestBase
-import org.junit.Test
-
-@CompileStatic
-@Slf4j
-class TestAccM2T2GC1Mon1 extends AccumuloTestBase {
-
- @Test
- public void testAccM1T1GC1Mon1() throws Throwable {
- int master = 2
- int tablets = 2
- int monitor = 1
- int gc = 1
- String clustername = createMiniCluster(
- "", configuration, 1, 1, 1, true, false)
- describe(" Create an accumulo cluster");
-
- //now launch the cluster
- Map<String, Integer> roles = [
- (AccumuloKeys.ROLE_MASTER): master,
- (AccumuloKeys.ROLE_TABLET): tablets,
- (AccumuloKeys.ROLE_MONITOR): monitor,
- (AccumuloKeys.ROLE_GARBAGE_COLLECTOR): gc
- ];
- ServiceLauncher launcher = createAccCluster(clustername, roles, [], true, true)
- SliderClient sliderClient = launcher.service
- addToTeardown(sliderClient);
-
-
- waitWhileClusterLive(sliderClient);
- assert sliderClient.applicationReport.yarnApplicationState == YarnApplicationState.RUNNING
- waitForRoleCount(sliderClient, roles, accumulo_cluster_startup_to_live_time)
- describe("Cluster status")
- ClusterDescription status
- status = sliderClient.getClusterDescription(clustername)
- log.info(prettyPrint(status.toJsonString()))
-
- //now give the cluster a bit of time to actually start work
-
- log.info("Sleeping for a while")
- sleep(ACCUMULO_GO_LIVE_TIME);
-
- //verify that all is still there
- waitForRoleCount(sliderClient, roles, 0)
-
- String page = fetchLocalPage(AccumuloConfigFileOptions.MONITOR_PORT_CLIENT_INT,
- AccumuloKeys.MONITOR_PAGE_JSON)
- log.info(page);
-
- log.info("Finishing")
- status = sliderClient.getClusterDescription(clustername)
- log.info(prettyPrint(status.toJsonString()))
- maybeStopCluster(sliderClient, clustername, "shut down $clustername")
-
- }
-
-}
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/live/TestAccumuloAMWebApp.groovy
----------------------------------------------------------------------
diff --git a/slider-providers/accumulo/slider-accumulo-provider/src/test/groovy/org/apache/slider/providers/accumulo/live/TestAccumuloAMWebApp.groovy b/slider-providers/accumulo/slider-accumulo-provider/src/test/groovy/org/apache/slider/providers/accumulo/live/TestAccumuloAMWebApp.groovy
deleted file mode 100644
index 7afcd0f..0000000
--- a/slider-providers/accumulo/slider-accumulo-provider/src/test/groovy/org/apache/slider/providers/accumulo/live/TestAccumuloAMWebApp.groovy
+++ /dev/null
@@ -1,110 +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.live
-
-import groovy.transform.CompileStatic
-import groovy.util.logging.Slf4j
-import org.apache.hadoop.yarn.api.records.ApplicationReport
-import org.apache.hadoop.yarn.api.records.YarnApplicationState
-import org.apache.slider.api.ClusterDescription
-import org.apache.slider.client.SliderClient
-import org.apache.slider.core.main.ServiceLauncher
-import org.apache.slider.providers.accumulo.AccumuloConfigFileOptions
-import org.apache.slider.providers.accumulo.AccumuloKeys
-import org.apache.slider.providers.accumulo.AccumuloTestBase
-import org.apache.slider.server.appmaster.web.SliderAMWebApp
-import org.junit.Test
-
-@CompileStatic
-@Slf4j
-class TestAccumuloAMWebApp extends AccumuloTestBase {
-
- @Test
- public void testAccumuloAMWebApp() throws Throwable {
- int tablets = 1
- int monitor = 1
- int gc = 1
- String clustername = createMiniCluster( "",
- configuration, 1, 1, 1, true, false)
- describe(" Create an accumulo cluster");
-
- //now launch the cluster
- Map<String, Integer> roles = [
- (AccumuloKeys.ROLE_MASTER): 1,
- (AccumuloKeys.ROLE_TABLET): tablets,
- (AccumuloKeys.ROLE_MONITOR): monitor,
- (AccumuloKeys.ROLE_GARBAGE_COLLECTOR): gc
- ];
- ServiceLauncher launcher = createAccCluster(clustername, roles, [], true, true)
- SliderClient sliderClient = (SliderClient) launcher.service
- addToTeardown(sliderClient);
-
-
- waitWhileClusterLive(sliderClient);
- assert sliderClient.applicationReport.yarnApplicationState == YarnApplicationState.RUNNING
- waitForRoleCount(sliderClient, roles, accumulo_cluster_startup_to_live_time)
- describe("Cluster status")
- ClusterDescription status
- status = sliderClient.getClusterDescription(clustername)
- log.info(prettyPrint(status.toJsonString()))
-
- //now give the cluster a bit of time to actually start work
-
- log.info("Sleeping for a while")
- sleep(ACCUMULO_GO_LIVE_TIME);
-
- //verify that all is still there
- waitForRoleCount(sliderClient, roles, 0)
-
- String page = fetchLocalPage(AccumuloConfigFileOptions.MONITOR_PORT_CLIENT_INT,
- AccumuloKeys.MONITOR_PAGE_JSON)
- log.info(page);
-
- log.info("Finishing")
-
- ApplicationReport appReport = sliderClient.getApplicationReport();
-
- String url = appReport.getTrackingUrl();
-
- // Should redirect to (or at least serve content from) SliderAMWebApp.BASE_PATH
- fetchWebPageWithoutError(url);
-
- // TrackingUrl has a trailing slash on it already for us (which is apparently very important)
- // let's make sure it's there.
- if ('/' != url.charAt(url.length() -1)) {
- url = url + '/';
- }
-
- url = url + SliderAMWebApp.BASE_PATH;
-
- // This should also give us content
- fetchWebPageWithoutError(url);
-
- url = url + SliderAMWebApp.CONTAINER_STATS;
-
- fetchWebPageWithoutError(url);
-
-
- status = sliderClient.getClusterDescription(clustername)
- log.info(prettyPrint(status.toJsonString()))
- maybeStopCluster(sliderClient, clustername, "shut down $clustername")
-
- }
-
-}
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/live/TestInvalidMonitorAddress.groovy
----------------------------------------------------------------------
diff --git a/slider-providers/accumulo/slider-accumulo-provider/src/test/groovy/org/apache/slider/providers/accumulo/live/TestInvalidMonitorAddress.groovy b/slider-providers/accumulo/slider-accumulo-provider/src/test/groovy/org/apache/slider/providers/accumulo/live/TestInvalidMonitorAddress.groovy
deleted file mode 100644
index a07ddc9..0000000
--- a/slider-providers/accumulo/slider-accumulo-provider/src/test/groovy/org/apache/slider/providers/accumulo/live/TestInvalidMonitorAddress.groovy
+++ /dev/null
@@ -1,67 +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.live
-
-import groovy.transform.CompileStatic
-import groovy.util.logging.Slf4j
-import org.apache.slider.api.ClusterDescription
-import org.apache.slider.api.RoleKeys
-import org.apache.slider.client.SliderClient
-import org.apache.slider.common.SliderExitCodes
-import org.apache.slider.common.params.Arguments
-import org.apache.slider.core.main.ServiceLaunchException
-import org.apache.slider.core.main.ServiceLauncher
-import org.apache.slider.providers.accumulo.AccumuloKeys
-import org.apache.slider.providers.accumulo.AccumuloTestBase
-import org.junit.Test
-
-@CompileStatic
-@Slf4j
-
-class TestInvalidMonitorAddress extends AccumuloTestBase {
-
- @Test
- public void testInvalidMonitorAddress() throws Throwable {
- String clustername = createMiniCluster("", configuration, 1, true)
-
- describe "verify that bad Java heap options are picked up"
-
- Map<String, Integer> roles = [
- (AccumuloKeys.ROLE_MASTER): 1,
- (AccumuloKeys.ROLE_TABLET): 1,
- (AccumuloKeys.ROLE_MONITOR): 1,
- ];
- try {
- ServiceLauncher launcher = createAccCluster(clustername, roles,
- [
- Arguments.ARG_COMP_OPT, AccumuloKeys.ROLE_MONITOR, RoleKeys.ROLE_ADDITIONAL_ARGS, "--address foobar",
- ],
- true,
- true)
- SliderClient sliderClient = launcher.service
- addToTeardown(sliderClient);
- ClusterDescription status = sliderClient.clusterDescription
- dumpClusterDescription("Remote CD", status)
- } catch (ServiceLaunchException e) {
- assertExceptionDetails(e, SliderExitCodes.EXIT_YARN_SERVICE_FAILED)
- }
-
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/5d405543/slider-providers/accumulo/slider-accumulo-provider/src/test/java/org/apache/slider/providers/accumulo/Stub.java
----------------------------------------------------------------------
diff --git a/slider-providers/accumulo/slider-accumulo-provider/src/test/java/org/apache/slider/providers/accumulo/Stub.java b/slider-providers/accumulo/slider-accumulo-provider/src/test/java/org/apache/slider/providers/accumulo/Stub.java
deleted file mode 100644
index 6b70a81..0000000
--- a/slider-providers/accumulo/slider-accumulo-provider/src/test/java/org/apache/slider/providers/accumulo/Stub.java
+++ /dev/null
@@ -1,22 +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;
-
-public class Stub {
-}
http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/5d405543/slider-providers/accumulo/slider-accumulo-provider/src/test/resources/log4j.properties
----------------------------------------------------------------------
diff --git a/slider-providers/accumulo/slider-accumulo-provider/src/test/resources/log4j.properties b/slider-providers/accumulo/slider-accumulo-provider/src/test/resources/log4j.properties
deleted file mode 100644
index a552a55..0000000
--- a/slider-providers/accumulo/slider-accumulo-provider/src/test/resources/log4j.properties
+++ /dev/null
@@ -1,59 +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.
-
-# log4j configuration used during build and unit tests
-
-log4j.rootLogger=INFO,stdout
-log4j.threshhold=ALL
-log4j.appender.stdout=org.apache.log4j.ConsoleAppender
-log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
-log4j.appender.stdout.layout.ConversionPattern=%d{ISO8601} [%t] %-5p %c{2} (%F:%M(%L)) - %m%n
-
-log4j.appender.subprocess=org.apache.log4j.ConsoleAppender
-log4j.appender.subprocess.layout=org.apache.log4j.PatternLayout
-log4j.appender.subprocess.layout.ConversionPattern=[%c{1}]: %m%n
-#log4j.logger.org.apache.slider.yarn.appmaster.SliderAppMasterer.master=INFO,subprocess
-
-log4j.logger.org.apache.slider=DEBUG
-log4j.logger.org.apache.hadoop.yarn.service.launcher=DEBUG
-
-
-
-#log4j.logger.org.apache.hadoop.yarn.service.launcher=DEBUG
-#log4j.logger.org.apache.hadoop.yarn.service=DEBUG
-#log4j.logger.org.apache.hadoop.yarn.client=DEBUG
-
-#crank back on some noise
-log4j.logger.org.apache.hadoop.util.NativeCodeLoader=ERROR
-log4j.logger.org.apache.hadoop.hdfs.server.datanode.BlockPoolSliceScanner=WARN
-log4j.logger.org.apache.hadoop.hdfs.server.blockmanagement=WARN
-log4j.logger.org.apache.hadoop.hdfs.server.namenode.FSNamesystem.audit=WARN
-log4j.logger.org.apache.hadoop.hdfs=WARN
-
-
-log4j.logger.org.apache.hadoop.yarn.server.nodemanager.containermanager.monitor=WARN
-log4j.logger.org.apache.hadoop.yarn.server.nodemanager.NodeStatusUpdaterImpl=WARN
-log4j.logger.org.apache.zookeeper=WARN
-log4j.logger.org.apache.zookeeper.ClientCnxn=FATAL
-
-log4j.logger.org.apache.hadoop.yarn.server.resourcemanager.security=WARN
-log4j.logger.org.apache.hadoop.metrics2=ERROR
-log4j.logger.org.apache.hadoop.util.HostsFileReader=WARN
-log4j.logger.org.apache.hadoop.yarn.event.AsyncDispatcher=WARN
-log4j.logger.org.apache.hadoop.security.token.delegation=WARN
-log4j.logger.org.apache.hadoop.yarn.util.AbstractLivelinessMonitor=WARN
-log4j.logger.org.apache.hadoop.yarn.server.nodemanager.security=WARN
-log4j.logger.org.apache.hadoop.yarn.server.resourcemanager.RMNMInfo=WARN
http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/5d405543/slider-providers/hbase/hbase-funtests/pom.xml
----------------------------------------------------------------------
diff --git a/slider-providers/hbase/hbase-funtests/pom.xml b/slider-providers/hbase/hbase-funtests/pom.xml
deleted file mode 100644
index 6ecd141..0000000
--- a/slider-providers/hbase/hbase-funtests/pom.xml
+++ /dev/null
@@ -1,253 +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.
--->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <artifactId>hbase-funtests</artifactId>
- <name>Slider HBase Provider Functional Tests</name>
- <packaging>jar</packaging>
- <description>
- Functional tests for the hbase provider
-
- </description>
- <parent>
- <groupId>org.apache.slider</groupId>
- <artifactId>slider</artifactId>
- <version>0.61-incubating</version>
- <relativePath>../../../</relativePath>
- </parent>
-
- <build>
-
- <plugins>
-
- <!--read in a build.properties file if defined-->
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>properties-maven-plugin</artifactId>
- <version>${maven.properties.version}</version>
- <executions>
- <execution>
- <phase>initialize</phase>
- <goals>
- <goal>read-project-properties</goal>
- </goals>
- <configuration>
- <quiet>true</quiet>
- <files>
- <file>build.properties</file>
- <file>../../../build.properties</file>
- </files>
- </configuration>
- </execution>
- </executions>
- </plugin>
-
- <plugin>
- <artifactId>maven-compiler-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>org.codehaus.groovy</groupId>
- <artifactId>groovy-eclipse-compiler</artifactId>
- <version>${groovy-eclipse-compiler.version}</version>
- </dependency>
- <dependency>
- <groupId>org.codehaus.groovy</groupId>
- <artifactId>groovy-eclipse-batch</artifactId>
- <version>${groovy-eclipse-batch.version}</version>
- </dependency>
- </dependencies>
- </plugin>
-
-
- <!-- functional test -->
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-failsafe-plugin</artifactId>
- <version>${maven-failsafe-plugin.version}</version>
- <executions>
- <execution>
- <id>run-integration-tests</id>
- <goals>
- <goal>integration-test</goal>
- <goal>verify</goal>
- </goals>
- </execution>
- </executions>
- <configuration>
-
- <!--mvn process fork options-->
- <reuseForks>${test.reuseForks}</reuseForks>
- <forkMode>${test.forkMode}</forkMode>
- <forkCount>1</forkCount>
- <forkedProcessTimeoutInSeconds>${test.forkedProcessTimeoutInSeconds}
- </forkedProcessTimeoutInSeconds>
- <threadCount>1</threadCount>
- <argLine>${test.argLine}</argLine>
- <failIfNoTests>${test.funtests.failIfNoTests}</failIfNoTests>
-
- <trimStackTrace>false</trimStackTrace>
- <redirectTestOutputToFile>${build.redirect.test.output.to.file}</redirectTestOutputToFile>
- <systemPropertyVariables>
- <java.net.preferIPv4Stack>true</java.net.preferIPv4Stack>
- <java.awt.headless>true</java.awt.headless>
- <java.security.krb5.realm>${slider.test.java.security.krb5.realm}</java.security.krb5.realm>
- <java.security.krb5.kdc>${slider.test.java.security.krb5.kdc}</java.security.krb5.kdc>
- <!-- this property must be supplied-->
- <slider.conf.dir>${slider.conf.dir}</slider.conf.dir>
- <slider.bin.dir>../../../slider-assembly/target/slider-${project.version}-all/slider-${project.version}</slider.bin.dir>
- </systemPropertyVariables>
- </configuration>
- </plugin>
-
- </plugins>
- </build>
-
- <reporting>
- <plugins>
-
- </plugins>
- </reporting>
-
- <dependencies>
-
- <dependency>
- <groupId>org.apache.slider</groupId>
- <artifactId>slider-hbase-provider</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.apache.slider</groupId>
- <artifactId>slider-hbase-provider</artifactId>
- <type>test-jar</type>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.slider</groupId>
- <artifactId>slider-core</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.apache.slider</groupId>
- <artifactId>slider-core</artifactId>
- <type>test-jar</type>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>org.codehaus.groovy</groupId>
- <artifactId>groovy-all</artifactId>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.slider</groupId>
- <artifactId>slider-assembly</artifactId>
- <classifier>all</classifier>
- <type>tar.gz</type>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.slider</groupId>
- <artifactId>slider-funtest</artifactId>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.hadoop</groupId>
- <artifactId>hadoop-client</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.apache.hadoop</groupId>
- <artifactId>hadoop-minicluster</artifactId>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.hbase</groupId>
- <artifactId>hbase-client</artifactId>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.hbase</groupId>
- <artifactId>hbase-server</artifactId>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.hbase</groupId>
- <artifactId>hbase-common</artifactId>
- <classifier>tests</classifier>
- </dependency>
-
- <dependency>
- <groupId>org.apache.hbase</groupId>
- <artifactId>hbase-it</artifactId>
- <classifier>tests</classifier>
- <exclusions>
- <exclusion>
- <groupId>org.apache.hadoop</groupId>
- <artifactId>hadoop-client</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
-
- <dependency>
- <groupId>org.apache.hbase</groupId>
- <artifactId>hbase-hadoop-compat</artifactId>
- <classifier>tests</classifier>
- </dependency>
-
- <dependency>
- <groupId>org.apache.hbase</groupId>
- <artifactId>hbase-hadoop2-compat</artifactId>
- <classifier>tests</classifier>
- </dependency>
-
- <dependency>
- <groupId>org.apache.hbase</groupId>
- <artifactId>hbase-server</artifactId>
- <classifier>tests</classifier>
- </dependency>
-
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.zookeeper</groupId>
- <artifactId>zookeeper</artifactId>
- <scope>test</scope>
- </dependency>
-
-
- </dependencies>
-
-
-</project>
http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/5d405543/slider-providers/hbase/hbase-funtests/src/test/groovy/org/apache/slider/providers/hbase/funtest/DemoHBaseCluster.groovy
----------------------------------------------------------------------
diff --git a/slider-providers/hbase/hbase-funtests/src/test/groovy/org/apache/slider/providers/hbase/funtest/DemoHBaseCluster.groovy b/slider-providers/hbase/hbase-funtests/src/test/groovy/org/apache/slider/providers/hbase/funtest/DemoHBaseCluster.groovy
deleted file mode 100644
index 1bef7d3..0000000
--- a/slider-providers/hbase/hbase-funtests/src/test/groovy/org/apache/slider/providers/hbase/funtest/DemoHBaseCluster.groovy
+++ /dev/null
@@ -1,45 +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.hbase.funtest
-
-import org.apache.hadoop.conf.Configuration
-import org.apache.slider.api.ClusterDescription
-import org.apache.slider.client.SliderClient
-
-class DemoHBaseCluster extends FunctionalHBaseClusterIT {
-
-
- @Override
- void clusterOperations(
- String clustername,
- SliderClient sliderClient,
- Configuration clientConf,
- int numWorkers,
- Map<String, Integer> roleMap,
- ClusterDescription cd) {
-
- }
-
- @Override
- void teardownCluster() {
- // dont tear it down
- sleep(5 * 60 * 1000)
-
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/5d405543/slider-providers/hbase/hbase-funtests/src/test/groovy/org/apache/slider/providers/hbase/funtest/FunctionalHBaseClusterIT.groovy
----------------------------------------------------------------------
diff --git a/slider-providers/hbase/hbase-funtests/src/test/groovy/org/apache/slider/providers/hbase/funtest/FunctionalHBaseClusterIT.groovy b/slider-providers/hbase/hbase-funtests/src/test/groovy/org/apache/slider/providers/hbase/funtest/FunctionalHBaseClusterIT.groovy
deleted file mode 100644
index d520471..0000000
--- a/slider-providers/hbase/hbase-funtests/src/test/groovy/org/apache/slider/providers/hbase/funtest/FunctionalHBaseClusterIT.groovy
+++ /dev/null
@@ -1,221 +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.hbase.funtest
-
-import groovy.transform.CompileStatic
-import groovy.util.logging.Slf4j
-import org.apache.hadoop.conf.Configuration
-import org.apache.hadoop.registry.client.api.RegistryConstants
-import org.apache.hadoop.yarn.conf.YarnConfiguration
-import org.apache.slider.api.ClusterDescription
-import org.apache.slider.api.RoleKeys
-import org.apache.slider.client.SliderClient
-import org.apache.slider.common.SliderExitCodes
-import org.apache.slider.common.SliderKeys
-import org.apache.slider.common.params.Arguments
-import org.apache.slider.common.tools.ConfigHelper
-
-import org.apache.slider.funtest.framework.FuntestProperties
-import org.apache.slider.providers.hbase.HBaseConfigFileOptions
-import org.apache.slider.providers.hbase.HBaseTestUtils
-import org.apache.slider.server.appmaster.PublishedArtifacts
-import org.apache.zookeeper.KeeperException
-import org.apache.zookeeper.WatchedEvent
-import org.apache.zookeeper.Watcher
-import org.apache.zookeeper.ZKUtil
-import org.apache.zookeeper.ZooKeeper
-import org.junit.After
-import org.junit.Before
-import org.junit.Test
-
-import static org.apache.slider.providers.hbase.HBaseKeys.ROLE_MASTER
-import static org.apache.slider.providers.hbase.HBaseKeys.ROLE_WORKER
-
-@CompileStatic
-@Slf4j
-public class FunctionalHBaseClusterIT extends HBaseCommandTestBase
- implements FuntestProperties, Arguments, SliderExitCodes {
-
-
- public static final String HBASE_HEAP = "96m"
-
- public String getClusterName() {
- return "test_functional_hbase_cluster"
- }
-
- public String getClusterZNode() {
- return "/yarnapps_slider_yarn_" + clusterName;
- }
-
- @Before
- public void prepareCluster() {
-
- String quorumServers = SLIDER_CONFIG.get(
- RegistryConstants.KEY_REGISTRY_ZK_QUORUM, DEFAULT_SLIDER_ZK_HOSTS)
-
- ZooKeeper monitor = new ZooKeeper(quorumServers,
- 1000, new Watcher(){
- @Override
- public void process(WatchedEvent watchedEvent) {
- }
- }, false)
- try {
- ZKUtil.deleteRecursive(monitor, clusterZNode)
- } catch (KeeperException.NoNodeException ignored) {
- log.info(clusterZNode + " not there")
- }
- setupCluster(clusterName)
- }
-
- @After
- public void teardownCluster() {
- teardown(clusterName)
- }
-
- @Test
- public void testHBaseCreateCluster() throws Throwable {
-
- describe description
-
- int numWorkers = desiredWorkerCount;
-
- def clusterpath = buildClusterPath(clusterName)
- assert !clusterFS.exists(clusterpath)
- Map<String, Integer> roleMap = createHBaseCluster(
- clusterName,
- 1, numWorkers,
- [
- ARG_OPTION,
- HBaseConfigFileOptions.KEY_HBASE_MASTER_INFO_PORT,
- Integer.toString(masterPortAssignment),
- ARG_COMP_OPT, ROLE_MASTER, RoleKeys.JVM_HEAP, HBASE_HEAP,
- ARG_OPTION,
- HBaseConfigFileOptions.KEY_REGIONSERVER_PORT,
- Integer.toString(workerPortAssignment),
- ARG_COMP_OPT, ROLE_WORKER, RoleKeys.JVM_HEAP, HBASE_HEAP,
- ],
- [:]
- )
-
- //get a slider client against the cluster
- SliderClient sliderClient = bondToCluster(SLIDER_CONFIG, clusterName)
- ClusterDescription cd2 = sliderClient.clusterDescription
- assert clusterName == cd2.name
-
- log.info("Connected via Client {} with {} workers", sliderClient.toString(),
- numWorkers)
-
- //wait for the role counts to be reached
- waitForRoleCount(sliderClient, roleMap, HBASE_LAUNCH_WAIT_TIME)
-
- Configuration clientConf = HBaseTestUtils.createHBaseConfiguration(sliderClient)
- HBaseTestUtils.assertHBaseMasterFound(clientConf)
- HBaseTestUtils.waitForHBaseRegionServerCount(sliderClient,
- clusterName,
- numWorkers,
- HBASE_LAUNCH_WAIT_TIME)
-
- clusterOperations(
- clusterName,
- sliderClient,
- clientConf,
- numWorkers,
- roleMap,
- cd2)
- }
-
- /**
- * Override to change policy of the deired no of workers
- * @return
- */
- def int getDesiredWorkerCount() {
- return SLIDER_CONFIG.getInt(KEY_SLIDER_TEST_NUM_WORKERS,
- DEFAULT_SLIDER_NUM_WORKERS)
- }
-
-
- public String getDescription() {
- return "Create a working HBase cluster $clusterName"
- }
-
- /**
- * Override point for any cluster operations
- * @param clustername name of cluster
- * @param sliderClient bonded low level client
- * @param clientConf config
- * @param numWorkers no. of workers created
- * @param roleMap role map
- * @param cd current cluster
- */
- public void clusterOperations(
- String clustername,
- SliderClient sliderClient,
- Configuration clientConf,
- int numWorkers,
- Map<String, Integer> roleMap,
- ClusterDescription cd) {
-
- log.info("Client Configuration = " + ConfigHelper.dumpConfigToString(clientConf))
-
- //grab some registry bits
- registry([ARG_LIST])
- registry([ARG_LIST, ARG_SERVICETYPE, SliderKeys.APP_TYPE , ARG_VERBOSE])
-
- //unknown service type
- registry(EXIT_NOT_FOUND,
- [ARG_LIST, ARG_SERVICETYPE, "org.apache.something"])
-
- registry(EXIT_NOT_FOUND,
- [ARG_LIST, ARG_NAME, "cluster-with-no-name"])
-
- // how to work out the current service name?
- def name = clustername
- registry([ARG_LIST, ARG_VERBOSE, ARG_NAME, name])
-
- registry([ARG_LISTCONF, ARG_NAME, name])
- registry(EXIT_NOT_FOUND, [ARG_LISTCONF, ARG_NAME, name, ARG_INTERNAL])
- registry(EXIT_NOT_FOUND, [ARG_LISTCONF, ARG_NAME, "unknown"])
- registry([ARG_GETCONF, PublishedArtifacts.COMPLETE_CONFIG,
- ARG_NAME, name])
- registry(EXIT_NOT_FOUND, [ARG_GETCONF, "no-such-config",
- ARG_NAME, name])
-
- registry(EXIT_NOT_FOUND, [ARG_GETCONF, "illegal/config/name!",
- ARG_NAME, name])
-
- registry(EXIT_NOT_FOUND,[ARG_GETCONF, PublishedArtifacts.COMPLETE_CONFIG,
- ARG_NAME, name, ARG_INTERNAL])
-
-
- def yarn_site_config = PublishedArtifacts.YARN_SITE_CONFIG
- registry([ARG_GETCONF, yarn_site_config,
- ARG_NAME, name])
-
- File getConfDir = new File("target/$clusterName/getconf")
- getConfDir.mkdirs();
- registry([ARG_GETCONF, yarn_site_config,
- ARG_NAME, name,
- ARG_OUTPUT, getConfDir.absolutePath])
- File retrieved = new File(getConfDir, yarn_site_config +".xml")
- def confFromFile = ConfigHelper.loadConfFromFile(retrieved)
- assert confFromFile.get(YarnConfiguration.RM_ADDRESS)
-
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/5d405543/slider-providers/hbase/hbase-funtests/src/test/groovy/org/apache/slider/providers/hbase/funtest/HBaseBuildSetupIT.groovy
----------------------------------------------------------------------
diff --git a/slider-providers/hbase/hbase-funtests/src/test/groovy/org/apache/slider/providers/hbase/funtest/HBaseBuildSetupIT.groovy b/slider-providers/hbase/hbase-funtests/src/test/groovy/org/apache/slider/providers/hbase/funtest/HBaseBuildSetupIT.groovy
deleted file mode 100644
index 0dcffde..0000000
--- a/slider-providers/hbase/hbase-funtests/src/test/groovy/org/apache/slider/providers/hbase/funtest/HBaseBuildSetupIT.groovy
+++ /dev/null
@@ -1,36 +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.hbase.funtest
-
-import org.apache.hadoop.conf.Configuration
-import org.apache.slider.funtest.abstracttests.AbstractTestBuildSetup
-import org.junit.Test
-
-class HBaseBuildSetupIT extends AbstractTestBuildSetup {
-
- @Test
- public void testHBaseBuildsHavePathsDefined() throws Throwable {
- Configuration conf = loadSliderConf();
-
- assumeBoolOption(conf, KEY_TEST_HBASE_ENABLED, true)
-
- assertStringOptionSet(conf, KEY_TEST_HBASE_APPCONF)
- assertStringOptionSet(conf, KEY_TEST_HBASE_TAR)
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/5d405543/slider-providers/hbase/hbase-funtests/src/test/groovy/org/apache/slider/providers/hbase/funtest/HBaseClusterBuildDestroyIT.groovy
----------------------------------------------------------------------
diff --git a/slider-providers/hbase/hbase-funtests/src/test/groovy/org/apache/slider/providers/hbase/funtest/HBaseClusterBuildDestroyIT.groovy b/slider-providers/hbase/hbase-funtests/src/test/groovy/org/apache/slider/providers/hbase/funtest/HBaseClusterBuildDestroyIT.groovy
deleted file mode 100644
index 63672d6..0000000
--- a/slider-providers/hbase/hbase-funtests/src/test/groovy/org/apache/slider/providers/hbase/funtest/HBaseClusterBuildDestroyIT.groovy
+++ /dev/null
@@ -1,89 +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.hbase.funtest
-
-import groovy.transform.CompileStatic
-import groovy.util.logging.Slf4j
-import org.apache.hadoop.fs.Path
-import org.apache.hadoop.registry.client.api.RegistryConstants
-import org.apache.slider.common.SliderKeys
-import org.apache.slider.common.SliderXmlConfKeys
-import org.apache.slider.common.params.Arguments
-import org.apache.slider.common.params.SliderActions
-import org.apache.slider.core.main.LauncherExitCodes
-import org.apache.slider.funtest.framework.FuntestProperties
-import org.apache.slider.providers.hbase.HBaseKeys
-import org.junit.AfterClass
-import org.junit.BeforeClass
-import org.junit.Test
-
-@CompileStatic
-@Slf4j
-public class HBaseClusterBuildDestroyIT extends HBaseCommandTestBase
- implements FuntestProperties, Arguments {
-
-
- static String CLUSTER = "test_cluster_build_destroy"
-
-
- @BeforeClass
- public static void prepareCluster() {
- setupCluster(CLUSTER)
- }
-
- @AfterClass
- public static void destroyCluster() {
- teardown(CLUSTER)
- }
-
- @Test
- public void testBuildAndDestroyCluster() throws Throwable {
- def clusterDir = SliderKeys.SLIDER_BASE_DIRECTORY + "/cluster/$CLUSTER"
- def clusterDirPath = new Path(clusterFS.homeDirectory, clusterDir)
- clusterFS.delete(clusterDirPath, true)
- slider(0,
- [
- SliderActions.ACTION_BUILD,
- CLUSTER,
- ARG_PROVIDER, HBaseKeys.PROVIDER_HBASE,
- ARG_ZKHOSTS,
- SLIDER_CONFIG.get(
- RegistryConstants.KEY_REGISTRY_ZK_QUORUM, DEFAULT_SLIDER_ZK_HOSTS),
- ARG_IMAGE,
- SLIDER_CONFIG.get(KEY_TEST_HBASE_TAR),
- ARG_CONFDIR,
- SLIDER_CONFIG.get(KEY_TEST_HBASE_APPCONF),
- ARG_COMPONENT, HBaseKeys.ROLE_MASTER, "1",
- ARG_COMPONENT, HBaseKeys.ROLE_WORKER, "1",
- ARG_OPTION, "site.hbase.master.info.port", "8180",
- ])
-
-
-
- assert clusterFS.exists(clusterDirPath)
- //cluster exists if you don't want it to be live
- exists(0, CLUSTER, false)
- // condition returns false if it is required to be live
- exists(LauncherExitCodes.EXIT_FALSE, CLUSTER, true)
- destroy(CLUSTER)
-
- }
-
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/5d405543/slider-providers/hbase/hbase-funtests/src/test/groovy/org/apache/slider/providers/hbase/funtest/HBaseClusterLifecycleIT.groovy
----------------------------------------------------------------------
diff --git a/slider-providers/hbase/hbase-funtests/src/test/groovy/org/apache/slider/providers/hbase/funtest/HBaseClusterLifecycleIT.groovy b/slider-providers/hbase/hbase-funtests/src/test/groovy/org/apache/slider/providers/hbase/funtest/HBaseClusterLifecycleIT.groovy
deleted file mode 100644
index 5ffee83..0000000
--- a/slider-providers/hbase/hbase-funtests/src/test/groovy/org/apache/slider/providers/hbase/funtest/HBaseClusterLifecycleIT.groovy
+++ /dev/null
@@ -1,194 +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.hbase.funtest
-
-import groovy.transform.CompileStatic
-import groovy.util.logging.Slf4j
-import org.apache.slider.server.appmaster.PublishedArtifacts
-import org.apache.slider.api.ClusterDescription
-import org.apache.slider.api.StatusKeys
-import org.apache.slider.client.SliderClient
-import org.apache.slider.common.SliderExitCodes
-import org.apache.slider.common.SliderXmlConfKeys
-import org.apache.slider.common.params.Arguments
-import org.apache.slider.common.params.SliderActions
-import org.apache.slider.funtest.framework.FuntestProperties
-import org.junit.After
-import org.junit.Before
-import org.junit.Test
-
-@CompileStatic
-@Slf4j
-public class HBaseClusterLifecycleIT extends HBaseCommandTestBase
- implements FuntestProperties, Arguments, SliderExitCodes {
-
-
- static String CLUSTER = "test_cluster_lifecycle"
-
-
- @Before
- public void prepareCluster() {
- setupCluster(CLUSTER)
- }
-
- @After
- public void destroyCluster() {
- teardown(CLUSTER)
- }
-
- @Test
- public void testClusterLifecycle() throws Throwable {
-
- describe "Walk a 0-role cluster through its lifecycle"
-
-
- def clusterpath = buildClusterPath(CLUSTER)
- assert !clusterFS.exists(clusterpath)
-
-
- Map<String, Integer> roleMap = createHBaseCluster(CLUSTER,
- 0,
- 0,
- [],
- [:])
-
-
- //at this point the cluster should exist.
- assertPathExists(clusterFS,"Cluster parent directory does not exist", clusterpath.parent)
-
- assertPathExists(clusterFS,"Cluster directory does not exist", clusterpath)
-
- // assert it exists on the command line
- exists(0, CLUSTER)
-
- //destroy will fail in use
-
- destroy(EXIT_APPLICATION_IN_USE, CLUSTER)
-
- //start will fail as cluster is in use
- thaw(EXIT_APPLICATION_IN_USE, CLUSTER)
-
- //it's still there
- exists(0, CLUSTER)
-
- //listing the cluster will succeed
- list(0, [CLUSTER])
-
- //simple status
- status(0, CLUSTER)
-
- //now status to a temp file
- File jsonStatus = File.createTempFile("tempfile", ".json")
- try {
- slider(0,
- [
- SliderActions.ACTION_STATUS, CLUSTER,
- ARG_OUTPUT, jsonStatus.canonicalPath
- ])
-
- assert jsonStatus.exists()
- ClusterDescription cd = ClusterDescription.fromFile(jsonStatus)
-
- assert CLUSTER == cd.name
-
- log.info(cd.toJsonString())
-
- def yarn_site_config = PublishedArtifacts.COMPLETE_CONFIG
- registry([ARG_GETCONF, yarn_site_config,
- ARG_NAME, CLUSTER])
-
- //get a slider client against the cluster
- SliderClient sliderClient = bondToCluster(SLIDER_CONFIG, CLUSTER)
- ClusterDescription cd2 = sliderClient.clusterDescription
- assert CLUSTER == cd2.name
-
- log.info("Connected via Client {}", sliderClient.toString())
-
- //stop
- def frozen = freeze(0, CLUSTER, [
- ARG_WAIT, Integer.toString(FREEZE_WAIT_TIME),
- ARG_MESSAGE, "freeze-in-test-cluster-lifecycle"
- ])
- frozen.assertExitCode(0)
-
-// sleep(FREEZE_WAIT_TIME)
- //cluster exists if you don't want it to be live
- exists(0, CLUSTER, false)
- // condition returns false if it is required to be live
- exists(EXIT_FALSE, CLUSTER, true)
-
-
- // start then stop the cluster
-
- thaw(CLUSTER,
- [
- ARG_WAIT, Integer.toString(THAW_WAIT_TIME),
- ])
- exists(0, CLUSTER)
- freeze(0, CLUSTER,
- [
- ARG_FORCE,
- ARG_WAIT, Integer.toString(FREEZE_WAIT_TIME),
- ARG_MESSAGE, "forced-freeze-in-test"
- ])
-
- //cluster is no longer live
- exists(0, CLUSTER, false)
-
- // condition returns false if it is required to be live
- exists(EXIT_FALSE, CLUSTER, true)
-
- // start with a restart count set to enable restart
-
- describe "the kill/restart phase may fail if yarn.resourcemanager.am.max-attempts is too low"
- thaw(CLUSTER,
- [
- ARG_WAIT, Integer.toString(THAW_WAIT_TIME),
- ARG_DEFINE, SliderXmlConfKeys.KEY_AM_RESTART_LIMIT + "=3"
- ])
-
-
- ClusterDescription status = killAmAndWaitForRestart(sliderClient, CLUSTER)
-
- def restarted = status.getInfo(
- StatusKeys.INFO_CONTAINERS_AM_RESTART)
- assert restarted != null
- assert Integer.parseInt(restarted) == 0
- freeze(0, CLUSTER,
- [
- ARG_FORCE,
- ARG_WAIT, Integer.toString(FREEZE_WAIT_TIME),
- ARG_MESSAGE, "teardown-freeze"
- ])
-
-
- destroy(0, CLUSTER)
-
- //cluster now missing
- exists(EXIT_UNKNOWN_INSTANCE, CLUSTER)
-
- } finally {
- jsonStatus.delete()
- }
-
-
- }
-
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/5d405543/slider-providers/hbase/hbase-funtests/src/test/groovy/org/apache/slider/providers/hbase/funtest/HBaseCommandTestBase.groovy
----------------------------------------------------------------------
diff --git a/slider-providers/hbase/hbase-funtests/src/test/groovy/org/apache/slider/providers/hbase/funtest/HBaseCommandTestBase.groovy b/slider-providers/hbase/hbase-funtests/src/test/groovy/org/apache/slider/providers/hbase/funtest/HBaseCommandTestBase.groovy
deleted file mode 100644
index caaab04..0000000
--- a/slider-providers/hbase/hbase-funtests/src/test/groovy/org/apache/slider/providers/hbase/funtest/HBaseCommandTestBase.groovy
+++ /dev/null
@@ -1,127 +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.hbase.funtest
-
-import org.apache.slider.api.ResourceKeys
-import org.apache.slider.common.params.Arguments
-import org.apache.slider.funtest.categories.FunctionalTests
-import org.apache.slider.funtest.framework.CommandTestBase
-import org.apache.slider.funtest.framework.SliderShell
-import org.apache.slider.providers.hbase.HBaseClientProvider
-import org.apache.slider.providers.hbase.HBaseKeys
-import org.junit.Before
-import org.junit.BeforeClass
-
-import static org.apache.slider.common.SliderXMLConfKeysForTesting.*
-import static org.apache.slider.common.params.Arguments.ARG_RES_COMP_OPT
-import static org.apache.slider.providers.hbase.HBaseKeys.ROLE_MASTER
-import static org.apache.slider.providers.hbase.HBaseKeys.ROLE_WORKER
-
-/**
- * Anything specific to HBase tests
- */
-@org.junit.experimental.categories.Category(FunctionalTests)
-
-abstract class HBaseCommandTestBase extends CommandTestBase {
- public static final boolean HBASE_TESTS_ENABLED
- public static final int HBASE_LAUNCH_WAIT_TIME
-
- static {
- HBASE_TESTS_ENABLED =
- SLIDER_CONFIG.getBoolean(KEY_TEST_HBASE_ENABLED, true)
- HBASE_LAUNCH_WAIT_TIME = getTimeOptionMillis(SLIDER_CONFIG,
- KEY_TEST_HBASE_LAUNCH_TIME,
- 1000 * DEFAULT_HBASE_LAUNCH_TIME_SECONDS)
- }
-
- @BeforeClass
- public static void extendClasspath() {
- addExtraJar(HBaseClientProvider)
- }
-
- @Before
- public void verifyPreconditions() {
- assumeHBaseTestsEnabled()
- getRequiredConfOption(SLIDER_CONFIG, KEY_TEST_HBASE_TAR)
- getRequiredConfOption(SLIDER_CONFIG, KEY_TEST_HBASE_APPCONF)
- }
-
-
- public void assumeHBaseTestsEnabled() {
- assume(HBASE_TESTS_ENABLED, "HBase tests disabled")
- }
-
- /**
- * Create an hbase cluster -this patches in the relevant attributes
- * for the HBase cluster
- * @param name name
- * @param masters no. of master nodes
- * @param workers no. of region servers
- * @param argsList list of arguments
- * @param clusterOps map of cluster options
- * @return the role map -for use when waiting for the cluster to go live
- */
- public Map<String, Integer> createHBaseCluster(
- String name,
- int masters,
- int workers,
- List<String> argsList,
- Map<String, String> clusterOps) {
- Map<String, Integer> roleMap = [
- (HBaseKeys.ROLE_MASTER): masters,
- (HBaseKeys.ROLE_WORKER): workers
- ]
-
- argsList << Arguments.ARG_IMAGE <<
- SLIDER_CONFIG.getTrimmed(KEY_TEST_HBASE_TAR)
-
- argsList << Arguments.ARG_CONFDIR <<
- SLIDER_CONFIG.getTrimmed(KEY_TEST_HBASE_APPCONF)
-
- argsList << Arguments.ARG_PROVIDER << HBaseKeys.PROVIDER_HBASE
- // add the RAM requirements
- argsList << ARG_RES_COMP_OPT << ROLE_MASTER <<
- ResourceKeys.YARN_MEMORY << YARN_RAM_REQUEST
- argsList << ARG_RES_COMP_OPT << ROLE_WORKER <<
- ResourceKeys.YARN_MEMORY << YARN_RAM_REQUEST
-
- SliderShell shell = createSliderApplication(
- name,
- roleMap,
- argsList,
- true,
- clusterOps
- )
- return roleMap
- }
-
-
- public String getDescription() {
- return "Create an HBase"
- }
-
- public int getWorkerPortAssignment() {
- return 0
- }
-
- public int getMasterPortAssignment() {
- return 0
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/5d405543/slider-providers/hbase/hbase-funtests/src/test/groovy/org/apache/slider/providers/hbase/funtest/HBaseIntegrationIT.groovy
----------------------------------------------------------------------
diff --git a/slider-providers/hbase/hbase-funtests/src/test/groovy/org/apache/slider/providers/hbase/funtest/HBaseIntegrationIT.groovy b/slider-providers/hbase/hbase-funtests/src/test/groovy/org/apache/slider/providers/hbase/funtest/HBaseIntegrationIT.groovy
deleted file mode 100644
index 21a7494..0000000
--- a/slider-providers/hbase/hbase-funtests/src/test/groovy/org/apache/slider/providers/hbase/funtest/HBaseIntegrationIT.groovy
+++ /dev/null
@@ -1,72 +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.hbase.funtest
-
-import org.apache.hadoop.conf.Configuration
-import org.apache.hadoop.hbase.IntegrationTestIngest
-import org.apache.hadoop.hbase.IntegrationTestingUtility
-import org.apache.hadoop.util.ToolRunner
-import org.apache.slider.api.ClusterDescription
-import org.apache.slider.client.SliderClient
-import org.apache.slider.providers.hbase.HBaseConfigFileOptions
-import org.junit.Ignore;
-
-/* Runs IntegrationTestIngest on cluster
- *
- * Note: this test runs for about 20 minutes
- * please set slider.test.timeout.seconds accordingly
- */
-
-@Ignore("appears localhost only")
-class HBaseIntegrationIT extends FunctionalHBaseClusterIT {
-
- @Override
- String getClusterName() {
- return "test_hbase_integration"
- }
-
- @Override
- void clusterOperations(
- String clustername,
- SliderClient sliderClient,
- Configuration clientConf,
- int numWorkers,
- Map<String, Integer> roleMap,
- ClusterDescription cd) {
- String parent = "/yarnapps_slider_yarn_" + clustername
- clientConf.set(HBaseConfigFileOptions.KEY_ZNODE_PARENT, parent)
-
- clientConf.set(IntegrationTestingUtility.IS_DISTRIBUTED_CLUSTER, "true")
-
- String[] args = []
- IntegrationTestIngest test = new IntegrationTestIngest();
- test.setConf(clientConf)
- int ret = ToolRunner.run(clientConf, test, args);
- assert ret == 0;
- }
-
-
- public int getWorkerPortAssignment() {
- return 0
- }
-
- public int getMasterPortAssignment() {
- return 0
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/5d405543/slider-providers/hbase/hbase-funtests/src/test/groovy/org/apache/slider/providers/hbase/funtest/HBaseLoadIT.groovy
----------------------------------------------------------------------
diff --git a/slider-providers/hbase/hbase-funtests/src/test/groovy/org/apache/slider/providers/hbase/funtest/HBaseLoadIT.groovy b/slider-providers/hbase/hbase-funtests/src/test/groovy/org/apache/slider/providers/hbase/funtest/HBaseLoadIT.groovy
deleted file mode 100644
index 61bcc70..0000000
--- a/slider-providers/hbase/hbase-funtests/src/test/groovy/org/apache/slider/providers/hbase/funtest/HBaseLoadIT.groovy
+++ /dev/null
@@ -1,71 +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.hbase.funtest
-
-import org.apache.hadoop.conf.Configuration
-import org.apache.hadoop.hbase.util.LoadTestTool
-import org.apache.slider.api.ClusterDescription
-import org.apache.slider.client.SliderClient
-import org.apache.slider.providers.hbase.HBaseConfigFileOptions
-import org.junit.Assume
-import org.junit.Ignore
-
-class HBaseLoadIT extends FunctionalHBaseClusterIT {
-
- @Override
- String getClusterName() {
- return "test_hbase_load"
- }
-
- @Override
- void testHBaseCreateCluster() throws Throwable {
- super.testHBaseCreateCluster()
- }
-
- @Override
- void clusterOperations(
- String clustername,
- SliderClient sliderClient,
- Configuration clientConf,
- int numWorkers,
- Map<String, Integer> roleMap,
- ClusterDescription cd) {
- assert clustername
- int numKeys = 4000 * numWorkers
- String[] args = ["-tn", "test", "-write", "4:100",
- "-num_keys", numKeys,
- "-zk", clientConf.get(HBaseConfigFileOptions.KEY_ZOOKEEPER_QUORUM),
- "-zk_root", clientConf.get(HBaseConfigFileOptions.KEY_ZNODE_PARENT),
-
- ]
- LoadTestTool loadTool = new LoadTestTool();
- loadTool.setConf(clientConf)
- int ret = loadTool.run(args);
- assert ret == 0;
- }
-
-
- public int getWorkerPortAssignment() {
- return 0
- }
-
- public int getMasterPortAssignment() {
- return 0
- }
-}