Examples of executeLine()


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

    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

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

  public void testSetChokeLimit() throws InterruptedException,
      TTransportException, IOException {

    FlumeShell sh = new FlumeShell();

    sh
        .executeLine("connect localhost:"
            + FlumeConfiguration.DEFAULT_ADMIN_PORT);
    sh.executeLine("exec setChokeLimit physNode choke 786");
    Clock.sleep(250);
    assertEquals(786, flumeMaster.getSpecMan().getChokeMap("physNode").get(
View Full Code Here

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

    FlumeShell sh = new FlumeShell();

    sh
        .executeLine("connect localhost:"
            + FlumeConfiguration.DEFAULT_ADMIN_PORT);
    sh.executeLine("exec setChokeLimit physNode choke 786");
    Clock.sleep(250);
    assertEquals(786, flumeMaster.getSpecMan().getChokeMap("physNode").get(
        "choke").intValue());
  }
View Full Code Here

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

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

    FlumeShell sh = new FlumeShell();
    sh
        .executeLine("connect localhost:"
            + FlumeConfiguration.DEFAULT_ADMIN_PORT);
    sh.executeLine("exec multiconfig 'localhost:text(\"/var/log/messages\") | "
        + "{delay (250) => console(\"avrojson\") };'");
    Clock.sleep(250);
View Full Code Here

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

    FlumeShell sh = new FlumeShell();
    sh
        .executeLine("connect localhost:"
            + FlumeConfiguration.DEFAULT_ADMIN_PORT);
    sh.executeLine("exec multiconfig 'localhost:text(\"/var/log/messages\") | "
        + "{delay (250) => console(\"avrojson\") };'");
    Clock.sleep(250);
    assertTrue(flumeMaster.getSpecMan().getAllConfigs().size() > 0);
  }
View Full Code Here

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

  @Test
  public void testSaveConfigCommand() throws IOException {
    FlumeShell sh = new FlumeShell();
    long retval;

    retval = sh.executeLine("connect localhost:"
        + FlumeConfiguration.DEFAULT_ADMIN_PORT);
    assertEquals(0, retval);

    retval = sh.executeLine("exec config foo 'null' 'console'");
    assertEquals(0, retval);
View Full Code Here

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

    retval = sh.executeLine("connect localhost:"
        + FlumeConfiguration.DEFAULT_ADMIN_PORT);
    assertEquals(0, retval);

    retval = sh.executeLine("exec config foo 'null' 'console'");
    assertEquals(0, retval);

    File saveFile = File.createTempFile("test-flume", "");
    saveFile.delete();
    saveFile.deleteOnExit();
View Full Code Here

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

    File saveFile = File.createTempFile("test-flume", "");
    saveFile.delete();
    saveFile.deleteOnExit();

    retval = sh.executeLine("exec save '" + saveFile.getAbsolutePath() + "'");
    assertEquals(0, retval);

    BufferedReader in = new BufferedReader(new FileReader(saveFile));
    assertEquals("foo : null | console;", in.readLine());
    assertNull(in.readLine());
View Full Code Here

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

  @Test
  public void testLoadConfigCommand() throws IOException {
    FlumeShell sh = new FlumeShell();
    long retval;

    retval = sh.executeLine("connect localhost:"
        + FlumeConfiguration.DEFAULT_ADMIN_PORT);
    assertEquals(0, retval);

    File saveFile = File.createTempFile("test-flume", "");
    saveFile.deleteOnExit();
View Full Code Here

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

    saveFile.deleteOnExit();
    BufferedWriter out = new BufferedWriter(new FileWriter(saveFile));
    out.write("foo : null | console;\n");
    out.close();

    retval = sh.executeLine("exec load '" + saveFile.getAbsolutePath() + "'");
    assertEquals(0, retval);

    ConfigurationManager manager = flumeMaster.getSpecMan();
    FlumeConfigData data = manager.getConfig("foo");
    assertEquals(data.getSinkConfig(), "console");
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.