Package org.apache.helix

Examples of org.apache.helix.HelixParticipant.start()


    // start the specified participant
    HelixParticipant helixParticipant = connection.createParticipant(clusterId, participant.getId());
    helixParticipant.getStateMachineEngine().registerStateModelFactory(lockUnlock.getStateModelDefId(),
        new LockUnlockFactory());
    helixParticipant.start();

    // start another participant via auto join
    HelixParticipant autoJoinParticipant =
        connection.createParticipant(clusterId, ParticipantId.from("localhost_12120"));
    autoJoinParticipant.getStateMachineEngine().registerStateModelFactory(lockUnlock.getStateModelDefId(),
View Full Code Here


    // start another participant via auto join
    HelixParticipant autoJoinParticipant =
        connection.createParticipant(clusterId, ParticipantId.from("localhost_12120"));
    autoJoinParticipant.getStateMachineEngine().registerStateModelFactory(lockUnlock.getStateModelDefId(),
        new LockUnlockFactory());
    autoJoinParticipant.start();

    Thread.sleep(5000);
    printExternalView(connection, clusterId, resource.getId());

    // stop the participants
View Full Code Here

    // start participant
    HelixParticipant participant = connection.createParticipant(clusterId, participantId);
    participant.getStateMachineEngine().registerStateModelFactory(
        StateModelDefId.from("MasterSlave"), new MockStateModelFactory());

    participant.start();
    Thread.sleep(1000);

    // verify
    final HelixDataAccessor accessor = connection.createDataAccessor(clusterId);
    final PropertyKey.Builder keyBuilder = accessor.keyBuilder();
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.