Package com.linkedin.helix

Examples of com.linkedin.helix.ClusterMessagingService


      exceptionCaught = true;
    }
    AssertJUnit.assertTrue(exceptionCaught);

    // test message service
    ClusterMessagingService msgService = controller.getMessagingService();

    // test file management tool
    HelixAdmin tool = controller.getClusterManagmentTool();

    exceptionCaught = false;
View Full Code Here


    public void offlineToSlave(Message message, NotificationContext context)
    {
      System.out
          .println("BootstrapProcess.BootstrapStateModel.offlineToSlave()");
      HelixManager manager = context.getManager();
      ClusterMessagingService messagingService = manager.getMessagingService();
      Message requestBackupUriRequest = new Message(
          MessageType.USER_DEFINE_MSG, UUID.randomUUID().toString());
      requestBackupUriRequest
          .setMsgSubType(BootstrapProcess.REQUEST_BOOTSTRAP_URL);
      requestBackupUriRequest.setMsgState(MessageState.NEW);
      Criteria recipientCriteria = new Criteria();
      recipientCriteria.setInstanceName("*");
      recipientCriteria.setRecipientInstanceType(InstanceType.PARTICIPANT);
      recipientCriteria.setResource(message.getResourceName());
      recipientCriteria.setPartition(message.getPartitionName());
      recipientCriteria.setSessionSpecific(true);
      // wait for 30 seconds
      int timeout = 30000;
      BootstrapReplyHandler responseHandler = new BootstrapReplyHandler();

      int sentMessageCount = messagingService.sendAndWait(recipientCriteria,
          requestBackupUriRequest, responseHandler, timeout);
      if (sentMessageCount == 0)
      {
        // could not find any other node hosting the partition
      } else if (responseHandler.getBootstrapUrl() != null)
View Full Code Here

TOP

Related Classes of com.linkedin.helix.ClusterMessagingService

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.