Package org.apache.hadoop.test.system

Examples of org.apache.hadoop.test.system.AbstractDaemonClient


    Configuration daemonConf =  cluster.getJTClient().getProxy().getDaemonConf();
    Assert.assertTrue("Dummy varialble is expected to be null before restart.",
        daemonConf.get(DUMMY_CONFIG_STRING) == null);
    String newDir = cluster.getClusterManager().pushConfig(localDir);
    cluster.stop();
    AbstractDaemonClient cli = cluster.getJTClient();
    waitForClusterStop(cli);
    // make sure the cluster has actually stopped
    cluster.getClusterManager().start(newDir);
    cli = cluster.getJTClient();
    waitForClusterStart(cli);
View Full Code Here


 
  @Test
  public void testClusterRestart() throws Exception {
    cluster.stop();
    // Give the cluster time to stop the whole cluster.
    AbstractDaemonClient cli = cluster.getJTClient();
    int i = 1;
    while (i < 40) {
      try {
        cli.ping();
        Thread.sleep(1000);
        i++;
      } catch (Exception e) {
        break;
      }
    }
    if (i >= 40) {
      Assert.fail("JT on " + cli.getHostName() + " Should have been down.");
    }
    i = 1;
    for (AbstractDaemonClient tcli : cluster.getTTClients()) {
      i = 1;
      while (i < 40) {
        try {
          tcli.ping();
          Thread.sleep(1000);
          i++;
        } catch (Exception e) {
          break;
        }
      }
      if (i >= 40) {
        Assert.fail("TT on " + tcli.getHostName() + " Should have been down.");
      }
    }
    cluster.start();
    cli = cluster.getJTClient();
    i = 1;
    while (i < 40) {
      try {
        cli.ping();
        break;
      } catch (Exception e) {
        i++;
        Thread.sleep(1000);
        LOG.info("Waiting for Jobtracker on host : "
            + cli.getHostName() + " to come up.");
      }
    }
    if (i >= 40) {
      Assert.fail("JT on " + cli.getHostName() + " Should have been up.");
    }
    for (AbstractDaemonClient tcli : cluster.getTTClients()) {
      i = 1;
      while (i < 40) {
        try {
View Full Code Here

  @Test
  public void testClusterRestart() throws Exception {
    cluster.stop();
    // Give the cluster time to stop the whole cluster.
    AbstractDaemonClient cli = cluster.getJTClient();
    int i = 1;
    while (i < 40) {
      try {
        cli.ping();
        Thread.sleep(1000);
        i++;
      } catch (Exception e) {
        break;
      }
    }
    if (i >= 40) {
      Assert.fail("JT on " + cli.getHostName() + " Should have been down.");
    }
    i = 1;
    for (AbstractDaemonClient tcli : cluster.getTTClients()) {
      i = 1;
      while (i < 40) {
        try {
          tcli.ping();
          Thread.sleep(1000);
          i++;
        } catch (Exception e) {
          break;
        }
      }
      if (i >= 40) {
        Assert.fail("TT on " + tcli.getHostName() + " Should have been down.");
      }
    }
    cluster.start();
    cli = cluster.getJTClient();
    i = 1;
    while (i < 40) {
      try {
        cli.ping();
        break;
      } catch (Exception e) {
        i++;
        Thread.sleep(1000);
        LOG.info("Waiting for Jobtracker on host : "
            + cli.getHostName() + " to come up.");
      }
    }
    if (i >= 40) {
      Assert.fail("JT on " + cli.getHostName() + " Should have been up.");
    }
    for (AbstractDaemonClient tcli : cluster.getTTClients()) {
      i = 1;
      while (i < 40) {
        try {
View Full Code Here

 
  @Test
  public void testClusterRestart() throws Exception {
    cluster.stop();
    // Give the cluster time to stop the whole cluster.
    AbstractDaemonClient cli = cluster.getJTClient();
    int i = 1;
    while (i < 40) {
      try {
        cli.ping();
        Thread.sleep(1000);
        i++;
      } catch (Exception e) {
        break;
      }
    }
    if (i >= 40) {
      Assert.fail("JT on " + cli.getHostName() + " Should have been down.");
    }
    i = 1;
    for (AbstractDaemonClient tcli : cluster.getTTClients()) {
      i = 1;
      while (i < 40) {
        try {
          tcli.ping();
          Thread.sleep(1000);
          i++;
        } catch (Exception e) {
          break;
        }
      }
      if (i >= 40) {
        Assert.fail("TT on " + tcli.getHostName() + " Should have been down.");
      }
    }
    cluster.start();
    cli = cluster.getJTClient();
    i = 1;
    while (i < 40) {
      try {
        cli.ping();
        break;
      } catch (Exception e) {
        i++;
        Thread.sleep(1000);
        LOG.info("Waiting for Jobtracker on host : "
            + cli.getHostName() + " to come up.");
      }
    }
    if (i >= 40) {
      Assert.fail("JT on " + cli.getHostName() + " Should have been up.");
    }
    for (AbstractDaemonClient tcli : cluster.getTTClients()) {
      i = 1;
      while (i < 40) {
        try {
View Full Code Here

    Configuration daemonConf =  cluster.getJTClient().getProxy().getDaemonConf();
    Assert.assertTrue("Dummy varialble is expected to be null before restart.",
        daemonConf.get(DUMMY_CONFIG_STRING) == null);
    String newDir = cluster.getClusterManager().pushConfig(localDir);
    cluster.stop();
    AbstractDaemonClient cli = cluster.getJTClient();
    waitForClusterStop(cli);
    // make sure the cluster has actually stopped
    cluster.getClusterManager().start(newDir);
    cli = cluster.getJTClient();
    waitForClusterStart(cli);
View Full Code Here

  @Test
  public void testClusterRestart() throws Exception {
    cluster.stop();
    // Give the cluster time to stop the whole cluster.
    AbstractDaemonClient cli = cluster.getJTClient();
    int i = 1;
    while (i < 40) {
      try {
        cli.ping();
        Thread.sleep(1000);
        i++;
      } catch (Exception e) {
        break;
      }
    }
    if (i >= 40) {
      Assert.fail("JT on " + cli.getHostName() + " Should have been down.");
    }
    i = 1;
    for (AbstractDaemonClient tcli : cluster.getTTClients()) {
      i = 1;
      while (i < 40) {
        try {
          tcli.ping();
          Thread.sleep(1000);
          i++;
        } catch (Exception e) {
          break;
        }
      }
      if (i >= 40) {
        Assert.fail("TT on " + tcli.getHostName() + " Should have been down.");
      }
    }
    cluster.start();
    cli = cluster.getJTClient();
    i = 1;
    while (i < 40) {
      try {
        cli.ping();
        break;
      } catch (Exception e) {
        i++;
        Thread.sleep(1000);
        LOG.info("Waiting for Jobtracker on host : "
            + cli.getHostName() + " to come up.");
      }
    }
    if (i >= 40) {
      Assert.fail("JT on " + cli.getHostName() + " Should have been up.");
    }
    for (AbstractDaemonClient tcli : cluster.getTTClients()) {
      i = 1;
      while (i < 40) {
        try {
View Full Code Here

TOP

Related Classes of org.apache.hadoop.test.system.AbstractDaemonClient

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.