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/07/02 18:00:54 UTC

[25/26] git commit: SLIDER-151, drop getNode operation from client and tests

SLIDER-151, drop getNode operation from client and tests


Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/fe513d21
Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/fe513d21
Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/fe513d21

Branch: refs/heads/feature/SLIDER-151_Implement_full_slider_API_in_REST_and_switch_client_to_it
Commit: fe513d214736214e0adfd977ff71867f07b2a825
Parents: 5960dd0
Author: Steve Loughran <st...@apache.org>
Authored: Thu Jun 19 14:55:13 2014 -0700
Committer: Steve Loughran <st...@apache.org>
Committed: Wed Jul 2 17:00:06 2014 +0100

----------------------------------------------------------------------
 .../java/org/apache/slider/client/SliderClient.java  | 12 ------------
 .../org/apache/slider/test/SliderTestUtils.groovy    | 15 ---------------
 .../minicluster/HBaseMiniClusterTestBase.groovy      | 15 ---------------
 3 files changed, 42 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/fe513d21/slider-core/src/main/java/org/apache/slider/client/SliderClient.java
----------------------------------------------------------------------
diff --git a/slider-core/src/main/java/org/apache/slider/client/SliderClient.java b/slider-core/src/main/java/org/apache/slider/client/SliderClient.java
index a337533..c4bacb7 100644
--- a/slider-core/src/main/java/org/apache/slider/client/SliderClient.java
+++ b/slider-core/src/main/java/org/apache/slider/client/SliderClient.java
@@ -1820,18 +1820,6 @@ public class SliderClient extends AbstractSliderLaunchedService implements RunSe
   }
 
   /**
-   * Get a node from the AM
-   * @param uuid uuid of node
-   * @return deserialized node
-   * @throws IOException IO problems
-   * @throws NoSuchNodeException if the node isn't found
-   */
-  @VisibleForTesting
-  public ClusterNode getNode(String uuid) throws IOException, YarnException {
-    return createClusterOperations().getNode(uuid);
-  }
-  
-  /**
    * Get the instance definition from the far end
    */
   @VisibleForTesting

http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/fe513d21/slider-core/src/test/groovy/org/apache/slider/test/SliderTestUtils.groovy
----------------------------------------------------------------------
diff --git a/slider-core/src/test/groovy/org/apache/slider/test/SliderTestUtils.groovy b/slider-core/src/test/groovy/org/apache/slider/test/SliderTestUtils.groovy
index a250e55..ff1be28 100644
--- a/slider-core/src/test/groovy/org/apache/slider/test/SliderTestUtils.groovy
+++ b/slider-core/src/test/groovy/org/apache/slider/test/SliderTestUtils.groovy
@@ -297,21 +297,6 @@ class SliderTestUtils extends Assert {
     return status
   }
 
-  /**
-   * Wait for the hbase master to be live (or past it in the lifecycle)
-   * @param clustername cluster
-   * @param spintime time to wait
-   * @return true if the cluster came out of the sleep time live 
-   * @throws IOException
-   * @throws SliderException
-   */
-  public static boolean spinForClusterStartup(SliderClient client, long spintime,
-      String role)
-      throws WaitTimeoutException, IOException, SliderException {
-    int state = client.waitForRoleInstanceLive(role, spintime);
-    return state == ClusterDescription.STATE_LIVE;
-  }
-
   public static ClusterDescription dumpClusterStatus(SliderClient client, String text) {
     ClusterDescription status = client.clusterDescription;
     dumpClusterDescription(text, status)

http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/fe513d21/slider-providers/hbase/slider-hbase-provider/src/test/groovy/org/apache/slider/providers/hbase/minicluster/HBaseMiniClusterTestBase.groovy
----------------------------------------------------------------------
diff --git a/slider-providers/hbase/slider-hbase-provider/src/test/groovy/org/apache/slider/providers/hbase/minicluster/HBaseMiniClusterTestBase.groovy b/slider-providers/hbase/slider-hbase-provider/src/test/groovy/org/apache/slider/providers/hbase/minicluster/HBaseMiniClusterTestBase.groovy
index 3f49771..a6c5e8a 100644
--- a/slider-providers/hbase/slider-hbase-provider/src/test/groovy/org/apache/slider/providers/hbase/minicluster/HBaseMiniClusterTestBase.groovy
+++ b/slider-providers/hbase/slider-hbase-provider/src/test/groovy/org/apache/slider/providers/hbase/minicluster/HBaseMiniClusterTestBase.groovy
@@ -108,21 +108,6 @@ public abstract class HBaseMiniClusterTestBase extends YarnZKMiniClusterTestBase
   public void stopAllRegionServers() {
     killJavaProcesses(HREGION, SIGTERM);
   }
-
-
-  public static void assertHBaseMasterNotStopped(SliderClient sliderClient,
-                                          String clustername) {
-    String[] nodes = sliderClient.listNodeUUIDsByRole(ROLE_MASTER);
-    int masterNodeCount = nodes.length;
-    assert masterNodeCount > 0;
-    ClusterNode node = sliderClient.getNode(nodes[0]);
-    if (node.state >= ClusterDescription.STATE_STOPPED) {
-      //stopped, not what is wanted
-      log.error("HBase master has stopped");
-      log.error(node.toString());
-      fail("HBase master has stopped " + node.diagnostics);
-    }
-  }
   
   /**
    * Create an (unshared) HConnection talking to the hbase service that