Package com.cloudera.flume.master.StatusManager

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


  }

  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


    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

    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

    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

    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

    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

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.