private void createQuotaTable() throws IOException { masterServices.createSystemTable(QuotaUtil.QUOTA_TABLE_DESC); }
procId = optProcId.getAsLong(); } else { procId = masterServices.createSystemTable(RSGROUP_TABLE_DESC);
private void createRSGroupTable() throws IOException { Long procId = masterServices.createSystemTable(RSGROUP_TABLE_DESC); // wait for region to be online int tries = 600; while (!(masterServices.getMasterProcedureExecutor().isFinished(procId)) && masterServices.getMasterProcedureExecutor().isRunning() && tries > 0) { try { Thread.sleep(100); } catch (InterruptedException e) { throw new IOException("Wait interrupted ", e); } tries--; } if(tries <= 0) { throw new IOException("Failed to create group table in a given time."); } else { Procedure<?> result = masterServices.getMasterProcedureExecutor().getResult(procId); if (result != null && result.isFailed()) { throw new IOException("Failed to create group table. " + MasterProcedureUtil.unwrapRemoteIOException(result)); } } }
private void createRSGroupTable() throws IOException { Long procId = masterServices.createSystemTable(RSGROUP_TABLE_DESC); // wait for region to be online int tries = 600; while (!(masterServices.getMasterProcedureExecutor().isFinished(procId)) && masterServices.getMasterProcedureExecutor().isRunning() && tries > 0) { try { Thread.sleep(100); } catch (InterruptedException e) { throw new IOException("Wait interrupted ", e); } tries--; } if(tries <= 0) { throw new IOException("Failed to create group table in a given time."); } else { Procedure<?> result = masterServices.getMasterProcedureExecutor().getResult(procId); if (result != null && result.isFailed()) { throw new IOException("Failed to create group table. " + result.getException().unwrapRemoteIOException()); } } }