Package com.cloudera.flume.util

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


    FlumeConfigData fcd = flumeMaster.getSpecMan().getConfig("foo");
    assertEquals("{delay(100) => accumulator(\"count\") }", fcd.sinkConfig);
    assertEquals("synth(100)", fcd.sourceConfig);
    assertTrue(0 != fcd.timestamp);

    sh.executeLine("waitForNodesActive 0 foo");
    n.getLivenessManager().heartbeatChecks();
    NodeStatus status = flumeMaster.getStatMan().getNodeStatuses()
        .get(nodename);
    NodeState active = NodeState.ACTIVE;
    assertEquals(status.state, active);
View Full Code Here


    NodeStatus status = flumeMaster.getStatMan().getNodeStatuses()
        .get(nodename);
    NodeState active = NodeState.ACTIVE;
    assertEquals(status.state, active);

    sh.executeLine("waitForNodesDone 0 foo");
    n.getLivenessManager().heartbeatChecks();
    status = flumeMaster.getStatMan().getNodeStatuses().get(nodename);
    NodeState idle = NodeState.IDLE;
    assertEquals(status.state, idle);
    AccumulatorSink cnt = (AccumulatorSink) ReportManager.get().getReportable(
View Full Code Here

    PrintStream olderr = System.err;
    ByteArrayOutputStream tmpErr = new ByteArrayOutputStream();
    System.setErr(new PrintStream(tmpErr));

    FlumeShell sh = new FlumeShell();
    sh.executeLine("connect localhost: "
        + FlumeConfiguration.DEFAULT_ADMIN_PORT);

    // this is a bad command line
    long task = sh.executeLine("exec config foo 'blah' "
        + "'{delay(100) => accumulator(\"count\") }' ");
View Full Code Here

    FlumeShell sh = new FlumeShell();
    sh.executeLine("connect localhost: "
        + FlumeConfiguration.DEFAULT_ADMIN_PORT);

    // this is a bad command line
    long task = sh.executeLine("exec config foo 'blah' "
        + "'{delay(100) => accumulator(\"count\") }' ");

    // restore err
    System.setErr(olderr);
    ByteArrayInputStream bais = new ByteArrayInputStream(tmpErr.toByteArray());
View Full Code Here

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

    FlumeShell sh = new FlumeShell();
    sh
        .executeLine("connect localhost:"
            + FlumeConfiguration.DEFAULT_ADMIN_PORT);

    flumeMaster.getStatMan().updateHeartbeatStatus("foo", "foo", "foo",
        NodeState.HELLO, 1);
View Full Code Here

    flumeMaster.getStatMan().updateHeartbeatStatus("foo", "foo", "foo",
        NodeState.HELLO, 1);
    assertNotNull(flumeMaster.getStatMan().getStatus("foo"));

    // no exception when called with node that doesn't exist.
    sh.executeLine("exec purge wackadoodle");

    // successful case
    sh.executeLine("exec purge foo");
    Clock.sleep(250);
View Full Code Here

    // no exception when called with node that doesn't exist.
    sh.executeLine("exec purge wackadoodle");

    // successful case
    sh.executeLine("exec purge foo");
    Clock.sleep(250);

    NodeStatus stat = flumeMaster.getStatMan().getStatus("foo");
    assertNull(stat);
View Full Code Here

        NodeState.HELLO, 1);

    assertNotNull(flumeMaster.getStatMan().getStatus("foo"));
    assertNotNull(flumeMaster.getStatMan().getStatus("bar"));
    assertNotNull(flumeMaster.getStatMan().getStatus("baz"));
    sh.executeLine("exec purgeAll");
    Clock.sleep(250);

    assertNull(flumeMaster.getStatMan().getStatus("foo"));
    assertNull(flumeMaster.getStatMan().getStatus("foo"));
    assertNull(flumeMaster.getStatMan().getStatus("foo"));
View Full Code Here

      TTransportException, IOException {
    assertEquals(0, flumeMaster.getSpecMan().getAllConfigs().size());

    FlumeShell sh = new FlumeShell();

    sh
        .executeLine("connect localhost:"
            + FlumeConfiguration.DEFAULT_ADMIN_PORT);
    sh.executeLine("exec config localhost null null");
    Clock.sleep(250);
    assertTrue(flumeMaster.getSpecMan().getAllConfigs().size() > 0);
View Full Code Here

    FlumeShell sh = new FlumeShell();

    sh
        .executeLine("connect localhost:"
            + FlumeConfiguration.DEFAULT_ADMIN_PORT);
    sh.executeLine("exec config localhost null null");
    Clock.sleep(250);
    assertTrue(flumeMaster.getSpecMan().getAllConfigs().size() > 0);
  }

  /**
 
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.