Search in sources :

Example 1 with AssignProcedure

use of org.apache.hadoop.hbase.master.assignment.AssignProcedure in project hbase by apache.

the class TestRegionProcedureStoreMigration method testMigrateWithUnsupportedProcedures.

@Test
public void testMigrateWithUnsupportedProcedures() throws IOException {
    AssignProcedure assignProc = new AssignProcedure();
    assignProc.setProcId(1L);
    assignProc.setRegionInfo(RegionInfoBuilder.newBuilder(TableName.valueOf("table")).build());
    walStore.insert(assignProc, null);
    walStore.stop(true);
    try {
        store = RegionProcedureStoreTestHelper.createStore(server, region, new LoadCounter());
        fail("Should fail since AssignProcedure is not supported");
    } catch (HBaseIOException e) {
        assertThat(e.getMessage(), startsWith("Unsupported"));
    }
}
Also used : LoadCounter(org.apache.hadoop.hbase.procedure2.ProcedureTestingUtility.LoadCounter) HBaseIOException(org.apache.hadoop.hbase.HBaseIOException) AssignProcedure(org.apache.hadoop.hbase.master.assignment.AssignProcedure) Test(org.junit.Test)

Aggregations

HBaseIOException (org.apache.hadoop.hbase.HBaseIOException)1 AssignProcedure (org.apache.hadoop.hbase.master.assignment.AssignProcedure)1 LoadCounter (org.apache.hadoop.hbase.procedure2.ProcedureTestingUtility.LoadCounter)1 Test (org.junit.Test)1