/** * If there are query specific settings to overlay, then create a copy of config * There are two cases we need to clone the session config that's being passed to hive driver * 1. Async query - * If the client changes a config setting, that shouldn't reflect in the execution already underway * 2. confOverlay - * The query specific settings should only be applied to the query config and not session * @return new configuration * @throws HiveSQLException */ private HiveConf getConfigForOperation() throws HiveSQLException { HiveConf sqlOperationConf = getParentSession().getHiveConf(); if (!getConfOverlay().isEmpty() || shouldRunAsync()) { // clone the partent session config for this query sqlOperationConf = new HiveConf(sqlOperationConf); // apply overlay query specific settings, if any for (Map.Entry<String, String> confEntry : getConfOverlay().entrySet()) { try { sqlOperationConf.verifyAndSet(confEntry.getKey(), confEntry.getValue()); } catch (IllegalArgumentException e) { throw new HiveSQLException("Error applying statement specific settings", e); } } } return sqlOperationConf; } }
/** * If there are query specific settings to overlay, then create a copy of config * There are two cases we need to clone the session config that's being passed to hive driver * 1. Async query - * If the client changes a config setting, that shouldn't reflect in the execution already underway * 2. confOverlay - * The query specific settings should only be applied to the query config and not session * @return new configuration * @throws HiveSQLException */ private HiveConf getConfigForOperation() throws HiveSQLException { HiveConf sqlOperationConf = getParentSession().getHiveConf(); if (!getConfOverlay().isEmpty() || shouldRunAsync()) { // clone the parent session config for this query sqlOperationConf = new HiveConf(sqlOperationConf); // apply overlay query specific settings, if any for (Map.Entry<String, String> confEntry : getConfOverlay().entrySet()) { try { sqlOperationConf.verifyAndSet(confEntry.getKey(), confEntry.getValue()); } catch (IllegalArgumentException e) { throw new HiveSQLException("Error applying statement specific settings", e); } } } return sqlOperationConf; } }
/** * If there are query specific settings to overlay, then create a copy of config * There are two cases we need to clone the session config that's being passed to hive driver * 1. Async query - * If the client changes a config setting, that shouldn't reflect in the execution already underway * 2. confOverlay - * The query specific settings should only be applied to the query config and not session * @return new configuration * @throws HiveSQLException */ private HiveConf getConfigForOperation() throws HiveSQLException { HiveConf sqlOperationConf = getParentSession().getHiveConf(); if (!getConfOverlay().isEmpty() || shouldRunAsync()) { // clone the parent session config for this query sqlOperationConf = new HiveConf(sqlOperationConf); // apply overlay query specific settings, if any for (Map.Entry<String, String> confEntry : getConfOverlay().entrySet()) { try { sqlOperationConf.verifyAndSet(confEntry.getKey(), confEntry.getValue()); } catch (IllegalArgumentException e) { throw new HiveSQLException("Error applying statement specific settings", e); } } } return sqlOperationConf; } }
/** * If there are query specific settings to overlay, then create a copy of config * There are two cases we need to clone the session config that's being passed to hive driver * 1. Async query - * If the client changes a config setting, that shouldn't reflect in the execution already underway * 2. confOverlay - * The query specific settings should only be applied to the query config and not session * @return new configuration * @throws HiveSQLException */ private HiveConf getConfigForOperation() throws HiveSQLException { HiveConf sqlOperationConf = getParentSession().getHiveConf(); if (!getConfOverlay().isEmpty() || shouldRunAsync()) { // clone the partent session config for this query sqlOperationConf = new HiveConf(sqlOperationConf); // apply overlay query specific settings, if any for (Map.Entry<String, String> confEntry : getConfOverlay().entrySet()) { try { sqlOperationConf.verifyAndSet(confEntry.getKey(), confEntry.getValue()); } catch (IllegalArgumentException e) { throw new HiveSQLException("Error applying statement specific settings", e); } } } return sqlOperationConf; } }