Package org.apache.hadoop.hbase.coordination

Examples of org.apache.hadoop.hbase.coordination.ZkCoordinatedStateManager.initialize()


    am.getRegionStates().logSplit(SERVERNAME_A); // Assume log splitting is done
    am.getRegionStates().createRegionState(REGIONINFO);
    am.gate.set(false);

    BaseCoordinatedStateManager cp = new ZkCoordinatedStateManager();
    cp.initialize(server);
    cp.start();

    OpenRegionCoordination orc = cp.getOpenRegionCoordination();
    ZkOpenRegionCoordination.ZkOpenRegionDetails zkOrd =
      new ZkOpenRegionCoordination.ZkOpenRegionDetails();
View Full Code Here


    Mockito.when(server.getConfiguration()).thenReturn(conf);
    Mockito.when(server.getServerName()).thenReturn(ServerName.valueOf("masterMock,1,1"));
    Mockito.when(server.getZooKeeper()).thenReturn(zkWatcher);

    CoordinatedStateManager cp = new ZkCoordinatedStateManager();
    cp.initialize(server);
    cp.start();

    Mockito.when(server.getCoordinatedStateManager()).thenReturn(cp);

    Mockito.when(serverManager.getOnlineServers()).thenReturn(onlineServers);
View Full Code Here

    Mockito.when(server.getConfiguration()).thenReturn(conf);
    Mockito.when(server.getServerName()).thenReturn(ServerName.valueOf("masterMock,1,1"));
    Mockito.when(server.getZooKeeper()).thenReturn(zkWatcher);

    CoordinatedStateManager cp = new ZkCoordinatedStateManager();
    cp.initialize(server);
    cp.start();

    Mockito.when(server.getCoordinatedStateManager()).thenReturn(cp);

    Mockito.when(serverManager.getOnlineServers()).thenReturn(onlineServers);
View Full Code Here

    // Let's start the open handler
    HTableDescriptor htd = getRS().tableDescriptors.get(hri.getTable());

    BaseCoordinatedStateManager csm = new ZkCoordinatedStateManager();
    csm.initialize(getRS());
    csm.start();

    ZkOpenRegionCoordination.ZkOpenRegionDetails zkCrd =
      new ZkOpenRegionCoordination.ZkOpenRegionDetails();
    zkCrd.setServerName(getRS().getServerName());
View Full Code Here

    //  2) The region in RIT was changed.
    // The order is more or less implementation dependant.
    HTableDescriptor htd = getRS().tableDescriptors.get(hri.getTable());

    BaseCoordinatedStateManager csm = new ZkCoordinatedStateManager();
    csm.initialize(getRS());
    csm.start();

    ZkOpenRegionCoordination.ZkOpenRegionDetails zkCrd =
      new ZkOpenRegionCoordination.ZkOpenRegionDetails();
    zkCrd.setServerName(getRS().getServerName());
View Full Code Here

       HTableDescriptor htd = TEST_HTD;
       final HRegionInfo hri = TEST_HRI;

       ZkCoordinatedStateManager coordinationProvider = new ZkCoordinatedStateManager();
       coordinationProvider.initialize(server);
       coordinationProvider.start();

       // open a region first so that it can be closed later
       OpenRegion(server, rss, htd, hri, coordinationProvider.getOpenRegionCoordination());
View Full Code Here

       HTableDescriptor htd = TEST_HTD;
       HRegionInfo hri = TEST_HRI;

       ZkCoordinatedStateManager coordinationProvider = new ZkCoordinatedStateManager();
       coordinationProvider.initialize(server);
       coordinationProvider.start();

       // open a region first so that it can be closed later
       OpenRegion(server, rss, htd, hri, coordinationProvider.getOpenRegionCoordination());
View Full Code Here

         HRegion.createHRegion(hri, HTU.getDataTestDir(), HTU
            .getConfiguration(), htd);
    assertNotNull(region);
    try {
      ZkCoordinatedStateManager csm = new ZkCoordinatedStateManager();
      csm.initialize(server);
      csm.start();

      ZkOpenRegionCoordination.ZkOpenRegionDetails zkCrd =
        new ZkOpenRegionCoordination.ZkOpenRegionDetails();
      zkCrd.setServerName(server.getServerName());
View Full Code Here

            .getConfiguration(), htd);
    assertNotNull(region);
    try {

      ZkCoordinatedStateManager csm = new ZkCoordinatedStateManager();
      csm.initialize(server);
      csm.start();

      ZkOpenRegionCoordination.ZkOpenRegionDetails zkCrd =
        new ZkOpenRegionCoordination.ZkOpenRegionDetails();
      zkCrd.setServerName(server.getServerName());
View Full Code Here

    // Create it OFFLINE, which is what it expects
    ZKAssign.createNodeOffline(server.getZooKeeper(), TEST_HRI, server.getServerName());

    ZkCoordinatedStateManager csm = new ZkCoordinatedStateManager();
    csm.initialize(server);
    csm.start();

    ZkOpenRegionCoordination.ZkOpenRegionDetails zkCrd =
      new ZkOpenRegionCoordination.ZkOpenRegionDetails();
    zkCrd.setServerName(server.getServerName());
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.