totalQueryParallelism += pool.getQueryParallelism(); if (!MetaStoreUtils.isValidSchedulingPolicy(pool.getSchedulingPolicy())) { response.addToErrors("Invalid scheduling policy " + pool.getSchedulingPolicy() + " for pool: " + pool.getPath());
case HiveParser.TOK_SCHEDULING_POLICY: String schedulingPolicyStr = PlanUtils.stripQuotes(param); if (!MetaStoreUtils.isValidSchedulingPolicy(schedulingPolicyStr)) { throw new SemanticException("Invalid scheduling policy " + schedulingPolicyStr);
@Override public void createPool(WMPool pool) throws AlreadyExistsException, NoSuchObjectException, InvalidOperationException, MetaException { boolean commited = false; try { openTransaction(); MWMResourcePlan resourcePlan = getMWMResourcePlan( pool.getResourcePlanName(), pool.getNs(), true); if (!poolParentExists(resourcePlan, pool.getPoolPath())) { throw new NoSuchObjectException("Pool path is invalid, the parent does not exist"); } String policy = pool.getSchedulingPolicy(); if (!MetaStoreUtils.isValidSchedulingPolicy(policy)) { throw new InvalidOperationException("Invalid scheduling policy " + policy); } MWMPool mPool = new MWMPool(resourcePlan, pool.getPoolPath(), pool.getAllocFraction(), pool.getQueryParallelism(), policy); pm.makePersistent(mPool); commited = commitTransaction(); } catch (Exception e) { checkForConstraintException(e, "Pool already exists: "); throw e; } finally { rollbackAndCleanup(commited, (Query)null); } }
if (pool.isSetSchedulingPolicy()) { String policy = pool.getSchedulingPolicy(); if (!MetaStoreUtils.isValidSchedulingPolicy(policy)) { throw new InvalidOperationException("Invalid scheduling policy " + policy);
totalQueryParallelism += pool.getQueryParallelism(); if (!MetaStoreUtils.isValidSchedulingPolicy(pool.getSchedulingPolicy())) { response.addToErrors("Invalid scheduling policy " + pool.getSchedulingPolicy() + " for pool: " + pool.getPath());
@Override public void createPool(WMPool pool) throws AlreadyExistsException, NoSuchObjectException, InvalidOperationException, MetaException { boolean commited = false; try { openTransaction(); MWMResourcePlan resourcePlan = getMWMResourcePlan(pool.getResourcePlanName(), true); if (!poolParentExists(resourcePlan, pool.getPoolPath())) { throw new NoSuchObjectException("Pool path is invalid, the parent does not exist"); } String policy = pool.getSchedulingPolicy(); if (!MetaStoreUtils.isValidSchedulingPolicy(policy)) { throw new InvalidOperationException("Invalid scheduling policy " + policy); } MWMPool mPool = new MWMPool(resourcePlan, pool.getPoolPath(), pool.getAllocFraction(), pool.getQueryParallelism(), policy); pm.makePersistent(mPool); commited = commitTransaction(); } catch (Exception e) { checkForConstraintException(e, "Pool already exists: "); throw e; } finally { rollbackAndCleanup(commited, (Query)null); } }
if (pool.isSetSchedulingPolicy()) { String policy = pool.getSchedulingPolicy(); if (!MetaStoreUtils.isValidSchedulingPolicy(policy)) { throw new InvalidOperationException("Invalid scheduling policy " + policy);