Package org.apache.helix

Examples of org.apache.helix.HelixConnection.disconnect()


        @Override
        public void run() {
          LOG.info("Received a shutdown signal. Stopping participant");
          containerParticipant.stopAsync();
          containerParticipant.awaitTerminated();
          connection.disconnect();
        }
      }) {

      });
      Thread.currentThread().join();
View Full Code Here


    // stop the controller
    helixController.stop();

    // drop the cluster
    dropCluster(clusterId, connection);
    connection.disconnect();
  }

  private static void dropCluster(ClusterId clusterId, HelixConnection connection) {
    ClusterAccessor accessor = connection.createClusterAccessor(clusterId);
    accessor.dropCluster();
View Full Code Here

    // check leader znode is gone
    Assert.assertNull(accessor.getProperty(keyBuilder.controllerLeader()));

    // clean up
    connection.disconnect();

    System.out.println("END " + clusterName + " at " + new Date(System.currentTimeMillis()));
  }

  /**
 
View Full Code Here

    }, 3 * 1000);

    Assert.assertTrue(result, "Fail to re-elect a new leader");

    // clean up
    connection.disconnect();

    // check leader znode is gone
    Assert.assertNull(accessor.getProperty(keyBuilder.controllerLeader()));

    System.out.println("END " + clusterName + " at " + new Date(System.currentTimeMillis()));
View Full Code Here

    // check live-instance znode for localhost_12918 is gone
    Assert.assertNull(accessor.getProperty(keyBuilder.liveInstance(participants[0]
        .getParticipantId().stringify())));

    // clean up
    connection.disconnect();

    // check live-instance znode for localhost_12919 is gone
    Assert.assertNull(accessor.getProperty(keyBuilder.liveInstance(participants[1]
        .getParticipantId().stringify())));
View Full Code Here

      }
    }, 3 * 1000);
    Assert.assertTrue(success, "fail to re-elect new leader");

    // clean up
    connection.disconnect();

    // check live-instance znode for localhost_12919 is gone
    instanceName = controllers[1].getControllerId().stringify();
    Assert.assertNull(accessor.getProperty(keyBuilder.liveInstance(instanceName)));

View Full Code Here

    Assert.assertTrue(success);

    // clean up
    controller.stop();
    participant.stop();
    connection.disconnect();

    System.out.println("END " + clusterName + " at " + new Date(System.currentTimeMillis()));
  }
}
View Full Code Here

    HelixConnection conn = _role.getConnection();

    service.stop();

    if (conn.isConnected()) {
      conn.disconnect();
    }
  }

  @Override
  public void addIdealStateChangeListener(IdealStateChangeListener listener) throws Exception {
View Full Code Here

    // stop the controller
    helixController.stopAsync();

    // drop the cluster
    dropCluster(clusterId, connection);
    connection.disconnect();
  }

  private static void dropCluster(ClusterId clusterId, HelixConnection connection) {
    ClusterAccessor accessor = connection.createClusterAccessor(clusterId);
    accessor.dropCluster();
View Full Code Here

    Assert.assertTrue(success);

    // clean up
    controller.stopAsync();
    participant.stopAsync();
    connection.disconnect();

    System.out.println("END " + clusterName + " at " + new Date(System.currentTimeMillis()));
  }
}
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.