private void updateMetaState(TableName tableName, TableState.State newState) throws IOException { if (tableName.equals(TableName.META_TABLE_NAME)) { if (TableState.State.DISABLING.equals(newState) || TableState.State.DISABLED.equals(newState)) { throw new IllegalArgumentIOException("Cannot disable the meta table; " + newState); } // Otherwise, just return; no need to set ENABLED on meta -- it is always ENABLED. return; } boolean succ = false; try { MetaTableAccessor.updateTableState(master.getConnection(), tableName, newState); tableName2State.put(tableName, newState); succ = true; } finally { if (!succ) { tableName2State.remove(tableName); } } metaStateUpdated(tableName, newState); }
@VisibleForTesting void initiateCompactionStrategy(MemoryCompactionPolicy compType, Configuration configuration, String cfName) throws IllegalArgumentIOException { assert (compType !=MemoryCompactionPolicy.NONE); switch (compType){ case BASIC: strategy = new BasicMemStoreCompactionStrategy(configuration, cfName); break; case EAGER: strategy = new EagerMemStoreCompactionStrategy(configuration, cfName); break; case ADAPTIVE: strategy = new AdaptiveMemStoreCompactionStrategy(configuration, cfName); break; default: // sanity check throw new IllegalArgumentIOException("Unknown memory compaction type " + compType); } } }
throws IllegalArgumentIOException { if (split == null || !(split instanceof TableSplit)) { throw new IllegalArgumentIOException( "InputSplit for CreateNSplitsPerRegion can not be null + " + "and should be instance of TableSplit");
String msg = "subproc[" + i + "] is null, aborting the procedure"; procedure.setFailure(new RemoteProcedureException(msg, new IllegalArgumentIOException(msg))); return null;
throws IllegalArgumentIOException { if (split == null || !(split instanceof TableSplit)) { throw new IllegalArgumentIOException( "InputSplit for CreateNSplitsPerRegion can not be null + " + "and should be instance of TableSplit");
throws IllegalArgumentIOException { if (split == null || !(split instanceof TableSplit)) { throw new IllegalArgumentIOException( "InputSplit for CreateNSplitsPerRegion can not be null + " + "and should be instance of TableSplit");
String msg = "subproc[" + i + "] is null, aborting the procedure"; procedure.setFailure(new RemoteProcedureException(msg, new IllegalArgumentIOException(msg))); return null;
String msg = "subproc[" + i + "] is null, aborting the procedure"; procedure.setFailure(new RemoteProcedureException(msg, new IllegalArgumentIOException(msg))); return null;
String msg = "subproc[" + i + "] is null, aborting the procedure"; procedure.setFailure(new RemoteProcedureException(msg, new IllegalArgumentIOException(msg))); subprocs = null; break;