Examples of waitForAssignment()


Examples of org.apache.hadoop.hbase.master.AssignmentManager.waitForAssignment()

    HBaseAdmin localAdmin = createTable(tableName);
    List<HRegionInfo> tableRegions = localAdmin.getTableRegions(tableName);
    HRegionInfo hri = tableRegions.get(0);
    AssignmentManager am = master.getAssignmentManager();
    assertTrue("Region " + hri.getRegionNameAsString()
      + " should be assigned properly", am.waitForAssignment(hri));
    ServerName server = am.getRegionStates().getRegionServerOfRegion(hri);
    localAdmin.move(hri.getEncodedNameAsBytes(), Bytes.toBytes(server.getServerName()));
    assertEquals("Current region server and region server before move should be same.", server,
      am.getRegionStates().getRegionServerOfRegion(hri));
  }
View Full Code Here

Examples of org.apache.hadoop.hbase.master.AssignmentManager.waitForAssignment()

    HBaseAdmin localAdmin = createTable(tableName);
    List<HRegionInfo> tableRegions = localAdmin.getTableRegions(tableName);
    HRegionInfo hri = tableRegions.get(0);
    AssignmentManager am = master.getAssignmentManager();
    assertTrue("Region " + hri.getRegionNameAsString()
      + " should be assigned properly", am.waitForAssignment(hri));
    ServerName server = am.getRegionStates().getRegionServerOfRegion(hri);
    localAdmin.move(hri.getEncodedNameAsBytes(), Bytes.toBytes(server.getServerName()));
    assertEquals("Current region server and region server before move should be same.", server,
      am.getRegionStates().getRegionServerOfRegion(hri));
  }
View Full Code Here

Examples of org.apache.hadoop.hbase.master.AssignmentManager.waitForAssignment()

    am.assign(REGIONINFO, true);

    setRegionOpenedOnZK(zkWatcher, SERVERNAME_A, REGIONINFO);
    setRegionOpenedOnZK(zkWatcher, SERVERNAME_B, REGIONINFO);

    am.waitForAssignment(REGIONINFO);

    assertTrue(am.getRegionStates().isRegionOnline(REGIONINFO));
    assertNotEquals(am.getRegionStates().getRegionServerOfRegion(REGIONINFO), SERVERNAME_A);
  }
View Full Code Here

Examples of org.apache.hadoop.hbase.master.AssignmentManager.waitForAssignment()

    for (Entry<String, RegionState> entry : regionsInTransition.entrySet()) {
      setRegionOpenedOnZK(zkWatcher, entry.getValue().getServerName(),
        entry.getValue().getRegion());
    }
   
    am.waitForAssignment(REGIONINFO_A);
    am.waitForAssignment(REGIONINFO_B);
    am.waitForAssignment(REGIONINFO_C);
    am.waitForAssignment(REGIONINFO_D);
    am.waitForAssignment(REGIONINFO_E);
   
View Full Code Here

Examples of org.apache.hadoop.hbase.master.AssignmentManager.waitForAssignment()

      setRegionOpenedOnZK(zkWatcher, entry.getValue().getServerName(),
        entry.getValue().getRegion());
    }
   
    am.waitForAssignment(REGIONINFO_A);
    am.waitForAssignment(REGIONINFO_B);
    am.waitForAssignment(REGIONINFO_C);
    am.waitForAssignment(REGIONINFO_D);
    am.waitForAssignment(REGIONINFO_E);
   
    Map<HRegionInfo, ServerName> regionAssignments = am.getRegionStates().getRegionAssignments();
View Full Code Here

Examples of org.apache.hadoop.hbase.master.AssignmentManager.waitForAssignment()

        entry.getValue().getRegion());
    }
   
    am.waitForAssignment(REGIONINFO_A);
    am.waitForAssignment(REGIONINFO_B);
    am.waitForAssignment(REGIONINFO_C);
    am.waitForAssignment(REGIONINFO_D);
    am.waitForAssignment(REGIONINFO_E);
   
    Map<HRegionInfo, ServerName> regionAssignments = am.getRegionStates().getRegionAssignments();
    for (Entry<HRegionInfo, ServerName> entry : regionAssignments.entrySet()) {
View Full Code Here

Examples of org.apache.hadoop.hbase.master.AssignmentManager.waitForAssignment()

    }
   
    am.waitForAssignment(REGIONINFO_A);
    am.waitForAssignment(REGIONINFO_B);
    am.waitForAssignment(REGIONINFO_C);
    am.waitForAssignment(REGIONINFO_D);
    am.waitForAssignment(REGIONINFO_E);
   
    Map<HRegionInfo, ServerName> regionAssignments = am.getRegionStates().getRegionAssignments();
    for (Entry<HRegionInfo, ServerName> entry : regionAssignments.entrySet()) {
      LOG.info("Region Assignment: "
View Full Code Here

Examples of org.apache.hadoop.hbase.master.AssignmentManager.waitForAssignment()

   
    am.waitForAssignment(REGIONINFO_A);
    am.waitForAssignment(REGIONINFO_B);
    am.waitForAssignment(REGIONINFO_C);
    am.waitForAssignment(REGIONINFO_D);
    am.waitForAssignment(REGIONINFO_E);
   
    Map<HRegionInfo, ServerName> regionAssignments = am.getRegionStates().getRegionAssignments();
    for (Entry<HRegionInfo, ServerName> entry : regionAssignments.entrySet()) {
      LOG.info("Region Assignment: "
          + entry.getKey().getRegionNameAsString() + " Server: " + entry.getValue());
View Full Code Here

Examples of org.apache.hadoop.hbase.master.AssignmentManager.waitForAssignment()

    HBaseAdmin localAdmin = createTable(tableName);
    List<HRegionInfo> tableRegions = localAdmin.getTableRegions(tableName);
    HRegionInfo hri = tableRegions.get(0);
    AssignmentManager am = master.getAssignmentManager();
    assertTrue("Region " + hri.getRegionNameAsString()
      + " should be assigned properly", am.waitForAssignment(hri));
    ServerName server = am.getRegionStates().getRegionServerOfRegion(hri);
    localAdmin.move(hri.getEncodedNameAsBytes(), Bytes.toBytes(server.getServerName()));
    assertEquals("Current region server and region server before move should be same.", server,
      am.getRegionStates().getRegionServerOfRegion(hri));
  }
View Full Code Here

Examples of org.apache.hadoop.hbase.master.AssignmentManager.waitForAssignment()

    MasterServices services = TEST_UTIL.getMiniHBaseCluster().getMaster();
    AssignmentManager am = services.getAssignmentManager();
    Map<HRegionInfo,HServerAddress> regions = ht.getRegionsInfo();
    for (HRegionInfo regionInfo : regions.keySet()) {
      try {
        am.waitForAssignment(regionInfo);
      } catch (InterruptedException e) {
        LOG.info("Interrupted waiting for region to be assigned during " +
            "create table call", e);
        Thread.currentThread().interrupt();
        return;
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.