Package com.alibaba.wasp.master

Examples of com.alibaba.wasp.master.FMaster


   */
  public static JVMClusterUtil.MasterThread createMasterThread(
      final Configuration c, final Class<? extends FMaster> hmc,
      final int index)
  throws IOException {
    FMaster server;
    try {
      server = hmc.getConstructor(Configuration.class).newInstance(c);
    } catch (InvocationTargetException ite) {
      Throwable target = ite.getTargetException();
      throw new RuntimeException("Failed construction of Master: " +
View Full Code Here


          EventHandler.EventType.FSERVER_ZK_ENTITYGROUP_SPLIT)
          || rtd.getEventType().equals(
              EventHandler.EventType.FSERVER_ZK_ENTITYGROUP_SPLITTING));

      // abort and wait for new master.
      FMaster master = abortAndWaitForMaster();

      admin = new WaspAdmin(TESTING_UTIL.getConfiguration());

      // update the egi to be offlined and splitted.
      egi.setOffline(true);
      egi.setSplit(true);
      EntityGroupPlan egPlan = master.getAssignmentManager()
          .getEntityGroupReopenPlan(egi);
      assertTrue(egPlan != null);

    } catch (Exception e) {
      e.printStackTrace();
View Full Code Here

      InterruptedException {
    cluster.abortMaster(0);
    cluster.waitOnMaster(0);
    cluster.getConfiguration().setClass(FConstants.MASTER_IMPL, FMaster.class,
        FMaster.class);
    FMaster master = cluster.startMaster().getMaster();
    cluster.waitForActiveAndReadyMaster();
    return master;
  }
View Full Code Here

   *
   * @param serverNumber
   *          Used as index into a list.
   */
  public String abortMaster(int serverNumber) {
    FMaster server = getMaster(serverNumber);
    LOG.info("Aborting " + server.toString());
    server.abort("Aborting for tests", new Exception("Trace info"));
    return server.toString();
  }
View Full Code Here

  public void close() throws IOException {
  }

  @Override
  public ClusterStatus getClusterStatus() throws IOException {
    FMaster master = getMaster();
    return master == null ? null : master.getClusterStatus();
  }
View Full Code Here

TOP

Related Classes of com.alibaba.wasp.master.FMaster

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.