Package com.cloudera.flume.master.StatusManager

Examples of com.cloudera.flume.master.StatusManager.NodeStatus


    this.nodeName = name;
    this.ctx = ctx;

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


    delegate.acknowledge("foo");
    delegate.checkAck("foo");
   
    Map<String, NodeStatus> statuses = master.getStatMan().getNodeStatuses();
    assertEquals(1, statuses.size());
    NodeStatus s = statuses.get("foo");
    assertNotNull(s);
    assertEquals("phys-node", s.physicalNode);

    delegate.getConfig("host");
    delegate.getLogicalNodes("host");
View Full Code Here

  @Override
  public synchronized boolean heartbeat(LogicalNode n) throws IOException {
    try {
      ensureInitialized();
      NodeStatus status = n.getStatus();
      return masterClient.heartbeat(n.getName(), status.physicalNode,
          status.host, MasterClientServerAvro.stateToAvro(status.state), n
              .getConfigVersion());
    } catch (AvroRemoteException e) {
      LOG.debug("Avro error on " + toString(), e);
View Full Code Here

    FlumeConfigData fcd = cfgMan.getConfig(ln);
    if (fcd == null) {
      return;
    }

    NodeStatus stat = statMan.getStatus(ln);
    if (stat == null) {
      // only get live nodes (or formerly live nodes)

      // set entry to null.
      nameMap.put(ln, null);
View Full Code Here

  }

  public synchronized boolean heartbeat(LogicalNode n) throws IOException {
    try {
      ensureConnected();
      NodeStatus status = n.getStatus();
      return masterClient.heartbeat(n.getName(), status.physicalNode,
          status.host, MasterClientServerThrift.stateToThrift(status.state), n
              .getConfigVersion());

    } catch (TException e) {
View Full Code Here

    start.lastseen = time;
    start.lastSeenDeltaMillis = time;
    start.physicalNode = "PHYSICAL_NODE";
    start.state = FlumeNodeState.ACTIVE;

    NodeStatus middle = MasterAdminServerAvro.statusFromAvro(start);

    assertEquals("HOST", middle.host);
    assertEquals(start.lastseen, middle.lastseen);
    assertEquals("PHYSICAL_NODE", middle.physicalNode);
    assertEquals(NodeState.ACTIVE, middle.state);
View Full Code Here

    start.lastseen = time;
    start.lastSeenDeltaMillis = time;
    start.physicalNode = "PHYSICAL_NODE";
    start.state = FlumeNodeState.ACTIVE;
   
    NodeStatus middle = MasterAdminServerThrift.statusFromThrift(start);
   
    assertEquals("HOST", middle.host);
    assertEquals(start.lastseen, middle.lastseen);
    assertEquals("PHYSICAL_NODE", middle.physicalNode);
    assertEquals(NodeState.ACTIVE, middle.state);
View Full Code Here

    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);

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

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

    NodeStatus stat = flumeMaster.getStatMan().getStatus("foo");
    assertNull(stat);

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

  @Override
  public synchronized boolean heartbeat(LogicalNode n) throws IOException {
    try {
      ensureInitialized();
      NodeStatus status = n.getStatus();
      return masterClient.heartbeat(n.getName(), status.physicalNode,
          status.host, MasterClientServerAvro.stateToAvro(status.state),
          n.getConfigVersion());
    } catch (AvroRemoteException e) {
      LOG.debug("Avro error on " + toString(), e);
View Full Code Here

TOP

Related Classes of com.cloudera.flume.master.StatusManager.NodeStatus

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.