Package com.cloudera.flume.conf

Examples of com.cloudera.flume.conf.FlumeConfigData


  public static FlumeConfigData configFromAvro(AvroFlumeConfigData in) {
    if (in == null) {
      return null;
    }
    FlumeConfigData out = new FlumeConfigData();
    out.timestamp = in.timestamp;
    out.sourceConfig = in.sourceConfig.toString();
    out.sinkConfig = in.sinkConfig.toString();
    out.sourceVersion = in.sourceVersion;
    out.sinkVersion = in.sinkVersion;
View Full Code Here


    assertEquals("one", logicalNodes.get(0));
    assertEquals("two", logicalNodes.get(1));
    assertEquals("three", logicalNodes.get(2));
    assertEquals("four", logicalNodes.get(3));

    FlumeConfigData data = masterRPC.getConfig("");
    assertEquals("flowID", data.flowID);
    assertEquals("sinkConfig", data.sinkConfig);
    assertEquals(112233, data.sinkVersion);
    assertEquals("sourceConfig", data.sourceConfig);
    assertEquals(445566, data.sourceVersion);
View Full Code Here

    }

    @Override
    public AvroFlumeConfigData getConfig(CharSequence sourceId)
        throws AvroRemoteException {
      return MasterClientServerAvro.configToAvro(new FlumeConfigData());
    }
View Full Code Here

    // Note: version and lastSeen aren't kept up-to-date on the logical node.
    // The master fills them in when it receives a NodeStatus heartbeat.
    state = new NodeStatus(NodeState.HELLO, 0, 0, NetUtils.localhost(),
        FlumeNode.getInstance().getPhysicalNodeName());
    // Set version to -1 so that all non-negative versions will be 'later'
    lastGoodCfg = new FlumeConfigData(0, "null", "null", VERSION_INFIMUM,
        VERSION_INFIMUM, FlumeConfiguration.get().getDefaultFlowName());
  }
View Full Code Here

    }

    boolean configChanged = master.getStatMan().updateHeartbeatStatus(
        NetUtils.localhost(), n.getStatus().physicalNode, logicalNode,
        n.getStatus().state, version);
    FlumeConfigData cfg = master.getSpecMan().getConfig(logicalNode);

    if (cfg == null || version < cfg.getTimestamp()) {
      configChanged = true;
      // version sent by node is older than current, return true to force
      // config
      // upgrade
    }
View Full Code Here

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

    ConfigurationManager manager = flumeMaster.getSpecMan();
    FlumeConfigData data = manager.getConfig("foo");
    assertEquals(data.getSinkConfig(), "console");
    assertEquals(data.getSourceConfig(), "null");
  }
View Full Code Here

  public static FlumeConfigData configFromThrift(ThriftFlumeConfigData in) {
    if (in == null) {
      return null;
    }
    FlumeConfigData out = new FlumeConfigData();
    out.timestamp = in.timestamp;
    out.sourceConfig = in.sourceConfig;
    out.sinkConfig = in.sinkConfig;
    out.sourceVersion = in.sourceVersion;
    out.sinkVersion = in.sinkVersion;
View Full Code Here

    sh.executeLine("connect localhost: "
        + FlumeConfiguration.DEFAULT_ADMIN_PORT);
    sh
        .executeLine("exec config foo 'synth(100)' '{delay(100) => accumulator(\"count\") }' ");

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

    sh.executeLine("waitForNodesDone 0 foo");
View Full Code Here

    sh
        .executeLine("exec config bar 'synth(50)' '{delay(100) => accumulator(\"count2\") }' ");
    sh
        .executeLine("exec config baz 'synth(75)' '{delay(100) => accumulator(\"count3\") }' ");

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

    sh.executeLine("waitForNodesDone 0 foo bar baz");
View Full Code Here

        + FlumeConfiguration.DEFAULT_ADMIN_PORT);
    // this will run for 10 seconds
    sh
        .executeLine("exec config foo 'synth(100)' '{delay(100) => accumulator(\"count\") }' ");

    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");
View Full Code Here

TOP

Related Classes of com.cloudera.flume.conf.FlumeConfigData

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.