Package com.cloudera.flume.util

Examples of com.cloudera.flume.util.FlumeShell.executeLine()


    retval = sh.executeLine("exec spawn localhost foo");
    assertEquals(0, retval);
    assertEquals(1, flumeMaster.getSpecMan().getLogicalNodeMap().size());

    retval = sh.executeLine("getmappings");
    assertEquals(0, retval);

    retval = sh.executeLine("exec spawn localhost bar");
    assertEquals(0, retval);
    assertEquals(2, flumeMaster.getSpecMan().getLogicalNodeMap().size());
View Full Code Here


    assertEquals(1, flumeMaster.getSpecMan().getLogicalNodeMap().size());

    retval = sh.executeLine("getmappings");
    assertEquals(0, retval);

    retval = sh.executeLine("exec spawn localhost bar");
    assertEquals(0, retval);
    assertEquals(2, flumeMaster.getSpecMan().getLogicalNodeMap().size());

    retval = sh.executeLine("getmappings");
    assertEquals(0, retval);
View Full Code Here

    retval = sh.executeLine("exec spawn localhost bar");
    assertEquals(0, retval);
    assertEquals(2, flumeMaster.getSpecMan().getLogicalNodeMap().size());

    retval = sh.executeLine("getmappings");
    assertEquals(0, retval);

    retval = sh.executeLine("getmappings idonotexist");
    assertEquals(0, retval);
View Full Code Here

    assertEquals(2, flumeMaster.getSpecMan().getLogicalNodeMap().size());

    retval = sh.executeLine("getmappings");
    assertEquals(0, retval);

    retval = sh.executeLine("getmappings idonotexist");
    assertEquals(0, retval);

    retval = sh.executeLine("getmappings localhost");
    assertEquals(0, retval);
  }
View Full Code Here

    assertEquals(0, retval);

    retval = sh.executeLine("getmappings idonotexist");
    assertEquals(0, retval);

    retval = sh.executeLine("getmappings localhost");
    assertEquals(0, retval);
  }

  /**
   * Create a master, then connect via shell, and then issue a long noop
View Full Code Here

  public void testCommitTimeOut() throws InterruptedException,
      TTransportException, IOException {
    assertEquals(0, flumeMaster.getSpecMan().getAllConfigs().size());

    FlumeShell sh = new FlumeShell();
    sh
        .executeLine("connect localhost:"
            + FlumeConfiguration.DEFAULT_ADMIN_PORT);
    long start = Clock.unixTime();
    // wait for a ridiculous amount of time, and force timeout to happen.
    sh.executeLine("exec noop 20000");
View Full Code Here

    sh
        .executeLine("connect localhost:"
            + FlumeConfiguration.DEFAULT_ADMIN_PORT);
    long start = Clock.unixTime();
    // wait for a ridiculous amount of time, and force timeout to happen.
    sh.executeLine("exec noop 20000");

    long delta = Clock.unixTime() - start;
    assertTrue(delta < 20000);
    assertTrue(delta > FlumeShell.CMD_WAIT_TIME_MS);
  }
View Full Code Here

  public void testSubmitWait() throws InterruptedException,
      TTransportException, IOException {
    assertEquals(0, flumeMaster.getSpecMan().getAllConfigs().size());

    FlumeShell sh = new FlumeShell();
    sh
        .executeLine("connect localhost:"
            + FlumeConfiguration.DEFAULT_ADMIN_PORT);
    long start = Clock.unixTime();
    // wait for a ridiculous amount of time, and force timeout to happen.
    sh.executeLine("submit noop 3000");
View Full Code Here

    sh
        .executeLine("connect localhost:"
            + FlumeConfiguration.DEFAULT_ADMIN_PORT);
    long start = Clock.unixTime();
    // wait for a ridiculous amount of time, and force timeout to happen.
    sh.executeLine("submit noop 3000");
    long delta = Clock.unixTime() - start;

    assertTrue(delta < 3000);

    // implicit wait.
View Full Code Here

    long delta = Clock.unixTime() - start;

    assertTrue(delta < 3000);

    // implicit wait.
    sh.executeLine("wait");
    delta = Clock.unixTime() - start;
    assertTrue(delta > 3000);
  }

  /**
 
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.