PageRenderTime 105ms CodeModel.GetById 22ms RepoModel.GetById 0ms app.codeStats 1ms

/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java

http://github.com/apache/hive
Java | 7091 lines | 5926 code | 441 blank | 724 comment | 244 complexity | 42af9764bf3fb855919baa7cfb92315e MD5 | raw file
Possible License(s): Apache-2.0
  1. /*
  2. * Licensed to the Apache Software Foundation (ASF) under one
  3. * or more contributor license agreements. See the NOTICE file
  4. * distributed with this work for additional information
  5. * regarding copyright ownership. The ASF licenses this file
  6. * to you under the Apache License, Version 2.0 (the
  7. * "License"); you may not use this file except in compliance
  8. * with the License. You may obtain a copy of the License at
  9. *
  10. * http://www.apache.org/licenses/LICENSE-2.0
  11. *
  12. * Unless required by applicable law or agreed to in writing, software
  13. * distributed under the License is distributed on an "AS IS" BASIS,
  14. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  15. * See the License for the specific language governing permissions and
  16. * limitations under the License.
  17. */
  18. package org.apache.hadoop.hive.conf;
  19. import com.google.common.base.Joiner;
  20. import com.google.common.collect.ImmutableSet;
  21. import com.google.common.collect.Iterables;
  22. import org.apache.commons.lang3.StringUtils;
  23. import org.apache.hadoop.conf.Configuration;
  24. import org.apache.hadoop.hive.common.FileUtils;
  25. import org.apache.hadoop.hive.common.ZooKeeperHiveHelper;
  26. import org.apache.hadoop.hive.common.classification.InterfaceAudience;
  27. import org.apache.hadoop.hive.common.classification.InterfaceAudience.LimitedPrivate;
  28. import org.apache.hadoop.hive.common.type.TimestampTZUtil;
  29. import org.apache.hadoop.hive.conf.Validator.PatternSet;
  30. import org.apache.hadoop.hive.conf.Validator.RangeValidator;
  31. import org.apache.hadoop.hive.conf.Validator.RatioValidator;
  32. import org.apache.hadoop.hive.conf.Validator.SizeValidator;
  33. import org.apache.hadoop.hive.conf.Validator.StringSet;
  34. import org.apache.hadoop.hive.conf.Validator.TimeValidator;
  35. import org.apache.hadoop.hive.conf.Validator.WritableDirectoryValidator;
  36. import org.apache.hadoop.hive.shims.ShimLoader;
  37. import org.apache.hadoop.hive.shims.Utils;
  38. import org.apache.hadoop.mapred.JobConf;
  39. import org.apache.hadoop.mapreduce.lib.input.CombineFileInputFormat;
  40. import org.apache.hadoop.mapreduce.lib.input.FileInputFormat;
  41. import org.apache.hadoop.security.UserGroupInformation;
  42. import org.apache.hive.common.HiveCompat;
  43. import org.apache.hive.common.util.SuppressFBWarnings;
  44. import org.slf4j.Logger;
  45. import org.slf4j.LoggerFactory;
  46. import javax.security.auth.login.LoginException;
  47. import java.io.ByteArrayOutputStream;
  48. import java.io.File;
  49. import java.io.IOException;
  50. import java.io.InputStream;
  51. import java.io.PrintStream;
  52. import java.io.UnsupportedEncodingException;
  53. import java.net.URI;
  54. import java.net.URL;
  55. import java.net.URLDecoder;
  56. import java.net.URLEncoder;
  57. import java.nio.charset.StandardCharsets;
  58. import java.time.ZoneId;
  59. import java.util.ArrayList;
  60. import java.util.Collections;
  61. import java.util.EnumSet;
  62. import java.util.HashMap;
  63. import java.util.HashSet;
  64. import java.util.Iterator;
  65. import java.util.LinkedHashSet;
  66. import java.util.List;
  67. import java.util.Map;
  68. import java.util.Map.Entry;
  69. import java.util.Properties;
  70. import java.util.Set;
  71. import java.util.concurrent.TimeUnit;
  72. import java.util.regex.Matcher;
  73. import java.util.regex.Pattern;
  74. /**
  75. * Hive Configuration.
  76. */
  77. public class HiveConf extends Configuration {
  78. protected String hiveJar;
  79. protected Properties origProp;
  80. protected String auxJars;
  81. private static final Logger LOG = LoggerFactory.getLogger(HiveConf.class);
  82. private static boolean loadMetastoreConfig = false;
  83. private static boolean loadHiveServer2Config = false;
  84. private static URL hiveDefaultURL = null;
  85. private static URL hiveSiteURL = null;
  86. private static URL hivemetastoreSiteUrl = null;
  87. private static URL hiveServer2SiteUrl = null;
  88. private static byte[] confVarByteArray = null;
  89. private static final Map<String, ConfVars> vars = new HashMap<String, ConfVars>();
  90. private static final Map<String, ConfVars> metaConfs = new HashMap<String, ConfVars>();
  91. private final List<String> restrictList = new ArrayList<String>();
  92. private final Set<String> hiddenSet = new HashSet<String>();
  93. private final List<String> rscList = new ArrayList<>();
  94. private Pattern modWhiteListPattern = null;
  95. private volatile boolean isSparkConfigUpdated = false;
  96. private static final int LOG_PREFIX_LENGTH = 64;
  97. public enum ResultFileFormat {
  98. INVALID_FORMAT {
  99. @Override
  100. public String toString() {
  101. return "invalid result file format";
  102. }
  103. },
  104. TEXTFILE {
  105. @Override
  106. public String toString() {
  107. return "TextFile";
  108. }
  109. },
  110. SEQUENCEFILE {
  111. @Override
  112. public String toString() {
  113. return "SequenceFile";
  114. }
  115. },
  116. RCFILE {
  117. @Override
  118. public String toString() {
  119. return "RCfile";
  120. }
  121. },
  122. LLAP {
  123. @Override
  124. public String toString() {
  125. return "Llap";
  126. }
  127. };
  128. public static ResultFileFormat getInvalid() {
  129. return INVALID_FORMAT;
  130. }
  131. public static EnumSet<ResultFileFormat> getValidSet() {
  132. return EnumSet.complementOf(EnumSet.of(getInvalid()));
  133. }
  134. public static ResultFileFormat from(String value) {
  135. try {
  136. return valueOf(value.toUpperCase());
  137. } catch (Exception e) {
  138. return getInvalid();
  139. }
  140. }
  141. }
  142. public ResultFileFormat getResultFileFormat() {
  143. return ResultFileFormat.from(this.getVar(ConfVars.HIVEQUERYRESULTFILEFORMAT));
  144. }
  145. public boolean getSparkConfigUpdated() {
  146. return isSparkConfigUpdated;
  147. }
  148. public void setSparkConfigUpdated(boolean isSparkConfigUpdated) {
  149. this.isSparkConfigUpdated = isSparkConfigUpdated;
  150. }
  151. public interface EncoderDecoder<K, V> {
  152. V encode(K key);
  153. K decode(V value);
  154. }
  155. public static class URLEncoderDecoder implements EncoderDecoder<String, String> {
  156. @Override
  157. public String encode(String key) {
  158. try {
  159. return URLEncoder.encode(key, StandardCharsets.UTF_8.name());
  160. } catch (UnsupportedEncodingException e) {
  161. return key;
  162. }
  163. }
  164. @Override
  165. public String decode(String value) {
  166. try {
  167. return URLDecoder.decode(value, StandardCharsets.UTF_8.name());
  168. } catch (UnsupportedEncodingException e) {
  169. return value;
  170. }
  171. }
  172. }
  173. public static class EncoderDecoderFactory {
  174. public static final URLEncoderDecoder URL_ENCODER_DECODER = new URLEncoderDecoder();
  175. }
  176. static {
  177. ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
  178. if (classLoader == null) {
  179. classLoader = HiveConf.class.getClassLoader();
  180. }
  181. hiveDefaultURL = classLoader.getResource("hive-default.xml");
  182. // Look for hive-site.xml on the CLASSPATH and log its location if found.
  183. hiveSiteURL = findConfigFile(classLoader, "hive-site.xml", true);
  184. hivemetastoreSiteUrl = findConfigFile(classLoader, "hivemetastore-site.xml", false);
  185. hiveServer2SiteUrl = findConfigFile(classLoader, "hiveserver2-site.xml", false);
  186. for (ConfVars confVar : ConfVars.values()) {
  187. vars.put(confVar.varname, confVar);
  188. }
  189. Set<String> llapDaemonConfVarsSetLocal = new LinkedHashSet<>();
  190. populateLlapDaemonVarsSet(llapDaemonConfVarsSetLocal);
  191. llapDaemonVarsSet = Collections.unmodifiableSet(llapDaemonConfVarsSetLocal);
  192. }
  193. private static URL findConfigFile(ClassLoader classLoader, String name, boolean doLog) {
  194. URL result = classLoader.getResource(name);
  195. if (result == null) {
  196. String confPath = System.getenv("HIVE_CONF_DIR");
  197. result = checkConfigFile(new File(confPath, name));
  198. if (result == null) {
  199. String homePath = System.getenv("HIVE_HOME");
  200. String nameInConf = "conf" + File.separator + name;
  201. result = checkConfigFile(new File(homePath, nameInConf));
  202. if (result == null) {
  203. try {
  204. // Handle both file:// and jar:<url>!{entry} in the case of shaded hive libs
  205. URL sourceUrl = HiveConf.class.getProtectionDomain().getCodeSource().getLocation();
  206. URI jarUri = sourceUrl.getProtocol().equalsIgnoreCase("jar") ? new URI(sourceUrl.getPath()) : sourceUrl.toURI();
  207. // From the jar file, the parent is /lib folder
  208. File parent = new File(jarUri).getParentFile();
  209. if (parent != null) {
  210. result = checkConfigFile(new File(parent.getParentFile(), nameInConf));
  211. }
  212. } catch (Throwable e) {
  213. LOG.info("Cannot get jar URI", e);
  214. System.err.println("Cannot get jar URI: " + e.getMessage());
  215. }
  216. }
  217. }
  218. }
  219. if (doLog) {
  220. LOG.info("Found configuration file {}", result);
  221. }
  222. return result;
  223. }
  224. private static URL checkConfigFile(File f) {
  225. try {
  226. return (f.exists() && f.isFile()) ? f.toURI().toURL() : null;
  227. } catch (Throwable e) {
  228. LOG.info("Error looking for config {}", f, e);
  229. System.err.println("Error looking for config " + f + ": " + e.getMessage());
  230. return null;
  231. }
  232. }
  233. @InterfaceAudience.Private
  234. public static final String PREFIX_LLAP = "llap.";
  235. @InterfaceAudience.Private
  236. public static final String PREFIX_HIVE_LLAP = "hive.llap.";
  237. /**
  238. * Metastore related options that the db is initialized against. When a conf
  239. * var in this is list is changed, the metastore instance for the CLI will
  240. * be recreated so that the change will take effect.
  241. */
  242. public static final HiveConf.ConfVars[] metaVars = {
  243. HiveConf.ConfVars.METASTOREWAREHOUSE,
  244. HiveConf.ConfVars.REPLDIR,
  245. HiveConf.ConfVars.METASTOREURIS,
  246. HiveConf.ConfVars.METASTORESELECTION,
  247. HiveConf.ConfVars.METASTORE_SERVER_PORT,
  248. HiveConf.ConfVars.METASTORETHRIFTCONNECTIONRETRIES,
  249. HiveConf.ConfVars.METASTORETHRIFTFAILURERETRIES,
  250. HiveConf.ConfVars.METASTORE_CLIENT_CONNECT_RETRY_DELAY,
  251. HiveConf.ConfVars.METASTORE_CLIENT_SOCKET_TIMEOUT,
  252. HiveConf.ConfVars.METASTORE_CLIENT_SOCKET_LIFETIME,
  253. HiveConf.ConfVars.METASTOREPWD,
  254. HiveConf.ConfVars.METASTORECONNECTURLHOOK,
  255. HiveConf.ConfVars.METASTORECONNECTURLKEY,
  256. HiveConf.ConfVars.METASTORESERVERMINTHREADS,
  257. HiveConf.ConfVars.METASTORESERVERMAXTHREADS,
  258. HiveConf.ConfVars.METASTORE_TCP_KEEP_ALIVE,
  259. HiveConf.ConfVars.METASTORE_INT_ORIGINAL,
  260. HiveConf.ConfVars.METASTORE_INT_ARCHIVED,
  261. HiveConf.ConfVars.METASTORE_INT_EXTRACTED,
  262. HiveConf.ConfVars.METASTORE_KERBEROS_KEYTAB_FILE,
  263. HiveConf.ConfVars.METASTORE_KERBEROS_PRINCIPAL,
  264. HiveConf.ConfVars.METASTORE_USE_THRIFT_SASL,
  265. HiveConf.ConfVars.METASTORE_TOKEN_SIGNATURE,
  266. HiveConf.ConfVars.METASTORE_CACHE_PINOBJTYPES,
  267. HiveConf.ConfVars.METASTORE_CONNECTION_POOLING_TYPE,
  268. HiveConf.ConfVars.METASTORE_VALIDATE_TABLES,
  269. HiveConf.ConfVars.METASTORE_DATANUCLEUS_INIT_COL_INFO,
  270. HiveConf.ConfVars.METASTORE_VALIDATE_COLUMNS,
  271. HiveConf.ConfVars.METASTORE_VALIDATE_CONSTRAINTS,
  272. HiveConf.ConfVars.METASTORE_STORE_MANAGER_TYPE,
  273. HiveConf.ConfVars.METASTORE_AUTO_CREATE_ALL,
  274. HiveConf.ConfVars.METASTORE_TRANSACTION_ISOLATION,
  275. HiveConf.ConfVars.METASTORE_CACHE_LEVEL2,
  276. HiveConf.ConfVars.METASTORE_CACHE_LEVEL2_TYPE,
  277. HiveConf.ConfVars.METASTORE_IDENTIFIER_FACTORY,
  278. HiveConf.ConfVars.METASTORE_PLUGIN_REGISTRY_BUNDLE_CHECK,
  279. HiveConf.ConfVars.METASTORE_AUTHORIZATION_STORAGE_AUTH_CHECKS,
  280. HiveConf.ConfVars.METASTORE_BATCH_RETRIEVE_MAX,
  281. HiveConf.ConfVars.METASTORE_EVENT_LISTENERS,
  282. HiveConf.ConfVars.METASTORE_TRANSACTIONAL_EVENT_LISTENERS,
  283. HiveConf.ConfVars.METASTORE_EVENT_CLEAN_FREQ,
  284. HiveConf.ConfVars.METASTORE_EVENT_EXPIRY_DURATION,
  285. HiveConf.ConfVars.METASTORE_EVENT_MESSAGE_FACTORY,
  286. HiveConf.ConfVars.METASTORE_FILTER_HOOK,
  287. HiveConf.ConfVars.METASTORE_RAW_STORE_IMPL,
  288. HiveConf.ConfVars.METASTORE_END_FUNCTION_LISTENERS,
  289. HiveConf.ConfVars.METASTORE_PART_INHERIT_TBL_PROPS,
  290. HiveConf.ConfVars.METASTORE_BATCH_RETRIEVE_OBJECTS_MAX,
  291. HiveConf.ConfVars.METASTORE_INIT_HOOKS,
  292. HiveConf.ConfVars.METASTORE_PRE_EVENT_LISTENERS,
  293. HiveConf.ConfVars.HMSHANDLERATTEMPTS,
  294. HiveConf.ConfVars.HMSHANDLERINTERVAL,
  295. HiveConf.ConfVars.HMSHANDLERFORCERELOADCONF,
  296. HiveConf.ConfVars.METASTORE_PARTITION_NAME_WHITELIST_PATTERN,
  297. HiveConf.ConfVars.METASTORE_ORM_RETRIEVE_MAPNULLS_AS_EMPTY_STRINGS,
  298. HiveConf.ConfVars.METASTORE_DISALLOW_INCOMPATIBLE_COL_TYPE_CHANGES,
  299. HiveConf.ConfVars.USERS_IN_ADMIN_ROLE,
  300. HiveConf.ConfVars.HIVE_AUTHORIZATION_MANAGER,
  301. HiveConf.ConfVars.HIVE_TXN_MANAGER,
  302. HiveConf.ConfVars.HIVE_TXN_TIMEOUT,
  303. HiveConf.ConfVars.HIVE_TXN_OPERATIONAL_PROPERTIES,
  304. HiveConf.ConfVars.HIVE_TXN_HEARTBEAT_THREADPOOL_SIZE,
  305. HiveConf.ConfVars.HIVE_TXN_MAX_OPEN_BATCH,
  306. HiveConf.ConfVars.HIVE_TXN_RETRYABLE_SQLEX_REGEX,
  307. HiveConf.ConfVars.HIVE_METASTORE_STATS_NDV_TUNER,
  308. HiveConf.ConfVars.HIVE_METASTORE_STATS_NDV_DENSITY_FUNCTION,
  309. HiveConf.ConfVars.METASTORE_AGGREGATE_STATS_CACHE_ENABLED,
  310. HiveConf.ConfVars.METASTORE_AGGREGATE_STATS_CACHE_SIZE,
  311. HiveConf.ConfVars.METASTORE_AGGREGATE_STATS_CACHE_MAX_PARTITIONS,
  312. HiveConf.ConfVars.METASTORE_AGGREGATE_STATS_CACHE_FPP,
  313. HiveConf.ConfVars.METASTORE_AGGREGATE_STATS_CACHE_MAX_VARIANCE,
  314. HiveConf.ConfVars.METASTORE_AGGREGATE_STATS_CACHE_TTL,
  315. HiveConf.ConfVars.METASTORE_AGGREGATE_STATS_CACHE_MAX_WRITER_WAIT,
  316. HiveConf.ConfVars.METASTORE_AGGREGATE_STATS_CACHE_MAX_READER_WAIT,
  317. HiveConf.ConfVars.METASTORE_AGGREGATE_STATS_CACHE_MAX_FULL,
  318. HiveConf.ConfVars.METASTORE_AGGREGATE_STATS_CACHE_CLEAN_UNTIL,
  319. HiveConf.ConfVars.METASTORE_FASTPATH,
  320. HiveConf.ConfVars.METASTORE_HBASE_FILE_METADATA_THREADS,
  321. HiveConf.ConfVars.METASTORE_WM_DEFAULT_POOL_SIZE
  322. };
  323. /**
  324. * User configurable Metastore vars
  325. */
  326. static final HiveConf.ConfVars[] metaConfVars = {
  327. HiveConf.ConfVars.METASTORE_TRY_DIRECT_SQL,
  328. HiveConf.ConfVars.METASTORE_TRY_DIRECT_SQL_DDL,
  329. HiveConf.ConfVars.METASTORE_CLIENT_SOCKET_TIMEOUT,
  330. HiveConf.ConfVars.METASTORE_PARTITION_NAME_WHITELIST_PATTERN,
  331. HiveConf.ConfVars.METASTORE_CAPABILITY_CHECK,
  332. HiveConf.ConfVars.METASTORE_DISALLOW_INCOMPATIBLE_COL_TYPE_CHANGES
  333. };
  334. static {
  335. for (ConfVars confVar : metaConfVars) {
  336. metaConfs.put(confVar.varname, confVar);
  337. }
  338. }
  339. public static final String HIVE_LLAP_DAEMON_SERVICE_PRINCIPAL_NAME = "hive.llap.daemon.service.principal";
  340. public static final String HIVE_SERVER2_AUTHENTICATION_LDAP_USERMEMBERSHIPKEY_NAME =
  341. "hive.server2.authentication.ldap.userMembershipKey";
  342. public static final String HIVE_SPARK_SUBMIT_CLIENT = "spark-submit";
  343. public static final String HIVE_SPARK_LAUNCHER_CLIENT = "spark-launcher";
  344. /**
  345. * dbVars are the parameters can be set per database. If these
  346. * parameters are set as a database property, when switching to that
  347. * database, the HiveConf variable will be changed. The change of these
  348. * parameters will effectively change the DFS and MapReduce clusters
  349. * for different databases.
  350. */
  351. public static final HiveConf.ConfVars[] dbVars = {
  352. HiveConf.ConfVars.HADOOPBIN,
  353. HiveConf.ConfVars.METASTOREWAREHOUSE,
  354. HiveConf.ConfVars.SCRATCHDIR
  355. };
  356. /**
  357. * encoded parameter values are ;-) encoded. Use decoder to get ;-) decoded string
  358. */
  359. static final HiveConf.ConfVars[] ENCODED_CONF = {
  360. ConfVars.HIVEQUERYSTRING
  361. };
  362. /**
  363. * Variables used by LLAP daemons.
  364. * TODO: Eventually auto-populate this based on prefixes. The conf variables
  365. * will need to be renamed for this.
  366. */
  367. private static final Set<String> llapDaemonVarsSet;
  368. private static void populateLlapDaemonVarsSet(Set<String> llapDaemonVarsSetLocal) {
  369. llapDaemonVarsSetLocal.add(ConfVars.LLAP_IO_ENABLED.varname);
  370. llapDaemonVarsSetLocal.add(ConfVars.LLAP_IO_MEMORY_MODE.varname);
  371. llapDaemonVarsSetLocal.add(ConfVars.LLAP_ALLOCATOR_MIN_ALLOC.varname);
  372. llapDaemonVarsSetLocal.add(ConfVars.LLAP_ALLOCATOR_MAX_ALLOC.varname);
  373. llapDaemonVarsSetLocal.add(ConfVars.LLAP_ALLOCATOR_ARENA_COUNT.varname);
  374. llapDaemonVarsSetLocal.add(ConfVars.LLAP_IO_MEMORY_MAX_SIZE.varname);
  375. llapDaemonVarsSetLocal.add(ConfVars.LLAP_ALLOCATOR_DIRECT.varname);
  376. llapDaemonVarsSetLocal.add(ConfVars.LLAP_USE_LRFU.varname);
  377. llapDaemonVarsSetLocal.add(ConfVars.LLAP_LRFU_LAMBDA.varname);
  378. llapDaemonVarsSetLocal.add(ConfVars.LLAP_LRFU_BP_WRAPPER_SIZE.varname);
  379. llapDaemonVarsSetLocal.add(ConfVars.LLAP_CACHE_ALLOW_SYNTHETIC_FILEID.varname);
  380. llapDaemonVarsSetLocal.add(ConfVars.LLAP_IO_USE_FILEID_PATH.varname);
  381. llapDaemonVarsSetLocal.add(ConfVars.LLAP_IO_DECODING_METRICS_PERCENTILE_INTERVALS.varname);
  382. llapDaemonVarsSetLocal.add(ConfVars.LLAP_ORC_ENABLE_TIME_COUNTERS.varname);
  383. llapDaemonVarsSetLocal.add(ConfVars.LLAP_IO_THREADPOOL_SIZE.varname);
  384. llapDaemonVarsSetLocal.add(ConfVars.LLAP_KERBEROS_PRINCIPAL.varname);
  385. llapDaemonVarsSetLocal.add(ConfVars.LLAP_KERBEROS_KEYTAB_FILE.varname);
  386. llapDaemonVarsSetLocal.add(ConfVars.LLAP_ZKSM_ZK_CONNECTION_STRING.varname);
  387. llapDaemonVarsSetLocal.add(ConfVars.LLAP_SECURITY_ACL.varname);
  388. llapDaemonVarsSetLocal.add(ConfVars.LLAP_MANAGEMENT_ACL.varname);
  389. llapDaemonVarsSetLocal.add(ConfVars.LLAP_SECURITY_ACL_DENY.varname);
  390. llapDaemonVarsSetLocal.add(ConfVars.LLAP_MANAGEMENT_ACL_DENY.varname);
  391. llapDaemonVarsSetLocal.add(ConfVars.LLAP_DELEGATION_TOKEN_LIFETIME.varname);
  392. llapDaemonVarsSetLocal.add(ConfVars.LLAP_MANAGEMENT_RPC_PORT.varname);
  393. llapDaemonVarsSetLocal.add(ConfVars.LLAP_WEB_AUTO_AUTH.varname);
  394. llapDaemonVarsSetLocal.add(ConfVars.LLAP_DAEMON_RPC_NUM_HANDLERS.varname);
  395. llapDaemonVarsSetLocal.add(ConfVars.LLAP_DAEMON_WORK_DIRS.varname);
  396. llapDaemonVarsSetLocal.add(ConfVars.LLAP_DAEMON_YARN_SHUFFLE_PORT.varname);
  397. llapDaemonVarsSetLocal.add(ConfVars.LLAP_DAEMON_YARN_CONTAINER_MB.varname);
  398. llapDaemonVarsSetLocal.add(ConfVars.LLAP_DAEMON_SHUFFLE_DIR_WATCHER_ENABLED.varname);
  399. llapDaemonVarsSetLocal.add(ConfVars.LLAP_DAEMON_AM_LIVENESS_HEARTBEAT_INTERVAL_MS.varname);
  400. llapDaemonVarsSetLocal.add(ConfVars.LLAP_DAEMON_AM_LIVENESS_CONNECTION_TIMEOUT_MS.varname);
  401. llapDaemonVarsSetLocal.add(ConfVars.LLAP_DAEMON_AM_LIVENESS_CONNECTION_SLEEP_BETWEEN_RETRIES_MS.varname);
  402. llapDaemonVarsSetLocal.add(ConfVars.LLAP_DAEMON_NUM_EXECUTORS.varname);
  403. llapDaemonVarsSetLocal.add(ConfVars.LLAP_DAEMON_RPC_PORT.varname);
  404. llapDaemonVarsSetLocal.add(ConfVars.LLAP_DAEMON_MEMORY_PER_INSTANCE_MB.varname);
  405. llapDaemonVarsSetLocal.add(ConfVars.LLAP_DAEMON_XMX_HEADROOM.varname);
  406. llapDaemonVarsSetLocal.add(ConfVars.LLAP_DAEMON_VCPUS_PER_INSTANCE.varname);
  407. llapDaemonVarsSetLocal.add(ConfVars.LLAP_DAEMON_NUM_FILE_CLEANER_THREADS.varname);
  408. llapDaemonVarsSetLocal.add(ConfVars.LLAP_FILE_CLEANUP_DELAY_SECONDS.varname);
  409. llapDaemonVarsSetLocal.add(ConfVars.LLAP_DAEMON_SERVICE_HOSTS.varname);
  410. llapDaemonVarsSetLocal.add(ConfVars.LLAP_DAEMON_SERVICE_REFRESH_INTERVAL.varname);
  411. llapDaemonVarsSetLocal.add(ConfVars.LLAP_ALLOW_PERMANENT_FNS.varname);
  412. llapDaemonVarsSetLocal.add(ConfVars.LLAP_DAEMON_DOWNLOAD_PERMANENT_FNS.varname);
  413. llapDaemonVarsSetLocal.add(ConfVars.LLAP_DAEMON_TASK_SCHEDULER_WAIT_QUEUE_SIZE.varname);
  414. llapDaemonVarsSetLocal.add(ConfVars.LLAP_DAEMON_WAIT_QUEUE_COMPARATOR_CLASS_NAME.varname);
  415. llapDaemonVarsSetLocal.add(ConfVars.LLAP_DAEMON_TASK_SCHEDULER_ENABLE_PREEMPTION.varname);
  416. llapDaemonVarsSetLocal.add(ConfVars.LLAP_DAEMON_TASK_PREEMPTION_METRICS_INTERVALS.varname);
  417. llapDaemonVarsSetLocal.add(ConfVars.LLAP_DAEMON_WEB_PORT.varname);
  418. llapDaemonVarsSetLocal.add(ConfVars.LLAP_DAEMON_WEB_SSL.varname);
  419. llapDaemonVarsSetLocal.add(ConfVars.LLAP_DAEMON_CONTAINER_ID.varname);
  420. llapDaemonVarsSetLocal.add(ConfVars.LLAP_VALIDATE_ACLS.varname);
  421. llapDaemonVarsSetLocal.add(ConfVars.LLAP_DAEMON_LOGGER.varname);
  422. llapDaemonVarsSetLocal.add(ConfVars.LLAP_DAEMON_AM_USE_FQDN.varname);
  423. llapDaemonVarsSetLocal.add(ConfVars.LLAP_OUTPUT_FORMAT_ARROW.varname);
  424. llapDaemonVarsSetLocal.add(ConfVars.LLAP_IO_PATH_CACHE_SIZE.varname);
  425. }
  426. /**
  427. * Get a set containing configuration parameter names used by LLAP Server isntances
  428. * @return an unmodifiable set containing llap ConfVars
  429. */
  430. public static final Set<String> getLlapDaemonConfVars() {
  431. return llapDaemonVarsSet;
  432. }
  433. /**
  434. * ConfVars.
  435. *
  436. * These are the default configuration properties for Hive. Each HiveConf
  437. * object is initialized as follows:
  438. *
  439. * 1) Hadoop configuration properties are applied.
  440. * 2) ConfVar properties with non-null values are overlayed.
  441. * 3) hive-site.xml properties are overlayed.
  442. * 4) System Properties and Manual Overrides are overlayed.
  443. *
  444. * WARNING: think twice before adding any Hadoop configuration properties
  445. * with non-null values to this list as they will override any values defined
  446. * in the underlying Hadoop configuration.
  447. */
  448. public static enum ConfVars {
  449. MSC_CACHE_ENABLED("hive.metastore.client.cache.v2.enabled", true,
  450. "This property enables a Caffeine Cache for Metastore client"),
  451. MSC_CACHE_MAX_SIZE("hive.metastore.client.cache.v2.maxSize", "1Gb", new SizeValidator(),
  452. "Set the maximum size (number of bytes) of the metastore client cache (DEFAULT: 1GB). " +
  453. "Only in effect when the cache is enabled"),
  454. MSC_CACHE_RECORD_STATS("hive.metastore.client.cache.v2.recordStats", false,
  455. "This property enables recording metastore client cache stats in DEBUG logs"),
  456. // QL execution stuff
  457. SCRIPTWRAPPER("hive.exec.script.wrapper", null, ""),
  458. PLAN("hive.exec.plan", "", ""),
  459. STAGINGDIR("hive.exec.stagingdir", ".hive-staging",
  460. "Directory name that will be created inside table locations in order to support HDFS encryption. " +
  461. "This is replaces ${hive.exec.scratchdir} for query results with the exception of read-only tables. " +
  462. "In all cases ${hive.exec.scratchdir} is still used for other temporary files, such as job plans."),
  463. SCRATCHDIR("hive.exec.scratchdir", "/tmp/hive",
  464. "HDFS root scratch dir for Hive jobs which gets created with write all (733) permission. " +
  465. "For each connecting user, an HDFS scratch dir: ${hive.exec.scratchdir}/<username> is created, " +
  466. "with ${hive.scratch.dir.permission}."),
  467. REPLDIR("hive.repl.rootdir","/user/${system:user.name}/repl/",
  468. "HDFS root dir for all replication dumps."),
  469. REPLCMENABLED("hive.repl.cm.enabled", false,
  470. "Turn on ChangeManager, so delete files will go to cmrootdir."),
  471. REPLCMDIR("hive.repl.cmrootdir","/user/${system:user.name}/cmroot/",
  472. "Root dir for ChangeManager, used for deleted files."),
  473. REPLCMRETIAN("hive.repl.cm.retain","10d",
  474. new TimeValidator(TimeUnit.DAYS),
  475. "Time to retain removed files in cmrootdir."),
  476. REPLCMENCRYPTEDDIR("hive.repl.cm.encryptionzone.rootdir", ".cmroot",
  477. "Root dir for ChangeManager if encryption zones are enabled, used for deleted files."),
  478. REPLCMFALLBACKNONENCRYPTEDDIR("hive.repl.cm.nonencryptionzone.rootdir",
  479. "",
  480. "Root dir for ChangeManager for non encrypted paths if hive.repl.cmrootdir is encrypted."),
  481. REPLCMINTERVAL("hive.repl.cm.interval","3600s",
  482. new TimeValidator(TimeUnit.SECONDS),
  483. "Inteval for cmroot cleanup thread."),
  484. REPL_HA_DATAPATH_REPLACE_REMOTE_NAMESERVICE("hive.repl.ha.datapath.replace.remote.nameservice", false,
  485. "When HDFS is HA enabled and both source and target clusters are configured with same nameservice name," +
  486. "enable this flag and provide a new unique logical name for representing the remote cluster " +
  487. "nameservice using config " + "'hive.repl.ha.datapath.replace.remote.nameservice.name'."),
  488. REPL_HA_DATAPATH_REPLACE_REMOTE_NAMESERVICE_NAME("hive.repl.ha.datapath.replace.remote.nameservice.name", null,
  489. "When HDFS is HA enabled and both source and target clusters are configured with same nameservice name, " +
  490. "use this config to provide a unique logical name for nameservice on the remote cluster (should " +
  491. "be different from nameservice name on the local cluster)"),
  492. REPL_FUNCTIONS_ROOT_DIR("hive.repl.replica.functions.root.dir","/user/${system:user.name}/repl/functions/",
  493. "Root directory on the replica warehouse where the repl sub-system will store jars from the primary warehouse"),
  494. REPL_APPROX_MAX_LOAD_TASKS("hive.repl.approx.max.load.tasks", 10000,
  495. "Provide an approximation of the maximum number of tasks that should be executed before \n"
  496. + "dynamically generating the next set of tasks. The number is approximate as Hive \n"
  497. + "will stop at a slightly higher number, the reason being some events might lead to a \n"
  498. + "task increment that would cross the specified limit."),
  499. REPL_PARTITIONS_DUMP_PARALLELISM("hive.repl.partitions.dump.parallelism",100,
  500. "Number of threads that will be used to dump partition data information during repl dump."),
  501. REPL_RUN_DATA_COPY_TASKS_ON_TARGET("hive.repl.run.data.copy.tasks.on.target", true,
  502. "Indicates whether replication should run data copy tasks during repl load operation."),
  503. REPL_DUMP_METADATA_ONLY("hive.repl.dump.metadata.only", false,
  504. "Indicates whether replication dump only metadata information or data + metadata. \n"
  505. + "This config makes hive.repl.include.external.tables config ineffective."),
  506. REPL_RETAIN_PREV_DUMP_DIR("hive.repl.retain.prev.dump.dir", false,
  507. "If this is set to false, then all previously used dump-directories will be deleted after repl-dump. " +
  508. "If true, a number of latest dump-directories specified by hive.repl.retain.prev.dump.dir.count will be retained"),
  509. REPL_RETAIN_PREV_DUMP_DIR_COUNT("hive.repl.retain.prev.dump.dir.count", 3,
  510. "Indicates maximium number of latest previously used dump-directories which would be retained when " +
  511. "hive.repl.retain.prev.dump.dir is set to true"),
  512. REPL_RETAIN_CUSTOM_LOCATIONS_FOR_DB_ON_TARGET("hive.repl.retain.custom.db.locations.on.target", true,
  513. "Indicates if source database has custom warehouse locations, whether that should be retained on target as well"),
  514. REPL_INCLUDE_MATERIALIZED_VIEWS("hive.repl.include.materialized.views", false,
  515. "Indicates whether replication of materialized views is enabled."),
  516. REPL_DUMP_SKIP_IMMUTABLE_DATA_COPY("hive.repl.dump.skip.immutable.data.copy", false,
  517. "Indicates whether replication dump can skip copyTask and refer to \n"
  518. + " original path instead. This would retain all table and partition meta"),
  519. REPL_DUMP_METADATA_ONLY_FOR_EXTERNAL_TABLE("hive.repl.dump.metadata.only.for.external.table",
  520. true,
  521. "Indicates whether external table replication dump only metadata information or data + metadata"),
  522. REPL_BOOTSTRAP_ACID_TABLES("hive.repl.bootstrap.acid.tables", false,
  523. "Indicates if repl dump should bootstrap the information about ACID tables along with \n"
  524. + "incremental dump for replication. It is recommended to keep this config parameter \n"
  525. + "as false always and should be set to true only via WITH clause of REPL DUMP \n"
  526. + "command. It should be set to true only once for incremental repl dump on \n"
  527. + "each of the existing replication policies after enabling acid tables replication."),
  528. REPL_BOOTSTRAP_DUMP_OPEN_TXN_TIMEOUT("hive.repl.bootstrap.dump.open.txn.timeout", "1h",
  529. new TimeValidator(TimeUnit.HOURS),
  530. "Indicates the timeout for all transactions which are opened before triggering bootstrap REPL DUMP. "
  531. + "If these open transactions are not closed within the timeout value, then REPL DUMP will "
  532. + "forcefully abort those transactions and continue with bootstrap dump."),
  533. REPL_BOOTSTRAP_DUMP_ABORT_WRITE_TXN_AFTER_TIMEOUT("hive.repl.bootstrap.dump.abort.write.txn.after.timeout",
  534. true,
  535. "Indicates whether to abort write transactions belonging to the db under replication while doing a" +
  536. " bootstrap dump after the timeout configured by hive.repl.bootstrap.dump.open.txn.timeout. If set to false," +
  537. " bootstrap dump will fail."),
  538. //https://hadoop.apache.org/docs/stable/hadoop-project-dist/hadoop-hdfs/TransparentEncryption.html#Running_as_the_superuser
  539. REPL_ADD_RAW_RESERVED_NAMESPACE("hive.repl.add.raw.reserved.namespace", false,
  540. "For TDE with same encryption keys on source and target, allow Distcp super user to access \n"
  541. + "the raw bytes from filesystem without decrypting on source and then encrypting on target."),
  542. REPL_INCLUDE_EXTERNAL_TABLES("hive.repl.include.external.tables", true,
  543. "Indicates if repl dump should include information about external tables. It should be \n"
  544. + "used in conjunction with 'hive.repl.dump.metadata.only' set to false. if 'hive.repl.dump.metadata.only' \n"
  545. + " is set to true then this config parameter has no effect as external table meta data is flushed \n"
  546. + " always by default. If this config parameter is enabled on an on-going replication policy which is in\n"
  547. + " incremental phase, then need to set 'hive.repl.bootstrap.external.tables' to true for the first \n"
  548. + " repl dump to bootstrap all external tables."),
  549. REPL_BOOTSTRAP_EXTERNAL_TABLES("hive.repl.bootstrap.external.tables", false,
  550. "Indicates if repl dump should bootstrap the information about external tables along with incremental \n"
  551. + "dump for replication. It is recommended to keep this config parameter as false always and should be \n"
  552. + "set to true only via WITH clause of REPL DUMP command. It should be used in conjunction with \n"
  553. + "'hive.repl.include.external.tables' when sets to true. If 'hive.repl.include.external.tables' is \n"
  554. + "set to false, then this config parameter has no effect. It should be set to true only once for \n"
  555. + "incremental repl dump on each existing replication policy after enabling external tables replication."),
  556. REPL_EXTERNAL_TABLE_BASE_DIR("hive.repl.replica.external.table.base.dir", null,
  557. "This is the fully qualified base directory on the target/replica warehouse under which data for "
  558. + "external tables is stored. This is relative base path and hence prefixed to the source "
  559. + "external table path on target cluster."),
  560. REPL_EXTERNAL_WAREHOUSE_SINGLE_COPY_TASK("hive.repl.external.warehouse.single.copy.task",
  561. false, "Should create single copy task for all the external tables "
  562. + "within the database default location for external tables, Would require more memory "
  563. + "for preparing the initial listing, Should be used if the memory "
  564. + "requirements can be fulfilled. If any specific configuration needs to be passed for these copy task it can"
  565. + " be specified using the prefix hive.dbpath."),
  566. REPL_EXTERNAL_WAREHOUSE_SINGLE_COPY_TASK_PATHS("hive.repl.external.warehouse.single.copy.task.paths",
  567. "", "Comma seperated list of paths for which single copy task shall be created for all the external tables "
  568. + "within the locations Would require more memory for preparing the initial listing, Should be used if the memory "
  569. + "requirements can be fulfilled. If the directory contains data not part of the database, that data would "
  570. + "also get copied, so only locations which contains tables only belonging to the same database should be "
  571. + "provided. This has no effect in case of table level replication or if hive.repl.bootstrap.external.tables "
  572. + "isn't enabled. If any specific configuration needs to be passed for these copy task it can be specified "
  573. + "using the prefix hive.dbpath."),
  574. REPL_INCLUDE_AUTHORIZATION_METADATA("hive.repl.include.authorization.metadata", false,
  575. "This configuration will enable security and authorization related metadata along "
  576. + "with the hive data and metadata replication. "),
  577. REPL_AUTHORIZATION_PROVIDER_SERVICE("hive.repl.authorization.provider.service", "ranger",
  578. "This configuration will define which service will provide the security and authorization "
  579. + "related metadata that needs to be replicated along "
  580. + "with the hive data and metadata replication. Set the configuration "
  581. + "hive.repl.include.authorization.metadata to false to disable "
  582. + "security policies being replicated "),
  583. REPL_RANGER_HANDLE_DENY_POLICY_TARGET("hive.repl.handle.ranger.deny.policy",
  584. false,
  585. "Indicates whether ranger deny policy for target database should be handled automatically by hive or not."),
  586. HIVE_REPL_FAILOVER_START("hive.repl.failover.start",false,
  587. "A replication policy level config to indicate if user wants to initiate fail-over " +
  588. "to replicate the database in reverse direction."),
  589. REPL_RANGER_ADD_DENY_POLICY_TARGET("hive.repl.ranger.target.deny.policy",
  590. true,
  591. "This configuration will add a deny policy on the target database for all users except hive"
  592. + " to avoid any update to the target database. Effective only if hive.repl.handle.ranger.deny.policy is set" +
  593. "to true."),
  594. REPL_RANGER_CLIENT_READ_TIMEOUT("hive.repl.ranger.client.read.timeout", "300s",
  595. new TimeValidator(TimeUnit.SECONDS), "Ranger client read timeout for Ranger REST API calls."),
  596. REPL_INCLUDE_ATLAS_METADATA("hive.repl.include.atlas.metadata", false,
  597. "Indicates if Atlas metadata should be replicated along with Hive data and metadata or not."),
  598. REPL_ATLAS_ENDPOINT("hive.repl.atlas.endpoint", null,
  599. "Atlas endpoint of the current cluster hive database is getting replicated from/to."),
  600. REPL_ATLAS_REPLICATED_TO_DB("hive.repl.atlas.replicatedto", null,
  601. "Target hive database name Atlas metadata of source hive database is being replicated to."),
  602. REPL_ATLAS_CLIENT_READ_TIMEOUT("hive.repl.atlas.client.read.timeout", "7200s",
  603. new TimeValidator(TimeUnit.SECONDS), "Atlas client read timeout for Atlas REST API calls."),
  604. REPL_EXTERNAL_CLIENT_CONNECT_TIMEOUT("hive.repl.external.client.connect.timeout", "10s",
  605. new TimeValidator(TimeUnit.SECONDS), "Client connect timeout for REST API calls to external service."),
  606. REPL_SOURCE_CLUSTER_NAME("hive.repl.source.cluster.name", null,
  607. "Name of the source cluster for the replication."),
  608. REPL_TARGET_CLUSTER_NAME("hive.repl.target.cluster.name", null,
  609. "Name of the target cluster for the replication."),
  610. REPL_RETRY_INTIAL_DELAY("hive.repl.retry.initial.delay", "60s",
  611. new TimeValidator(TimeUnit.SECONDS),
  612. "Initial Delay before retry starts."),
  613. REPL_RETRY_BACKOFF_COEFFICIENT("hive.repl.retry.backoff.coefficient", 1.2f,
  614. "The backoff coefficient for exponential retry delay between retries. " +
  615. "Previous Delay * Backoff Coefficient will determine the next retry interval"),
  616. REPL_RETRY_JITTER("hive.repl.retry.jitter", "30s", new TimeValidator(TimeUnit.SECONDS),
  617. "A random jitter to be applied to avoid all retries happening at the same time."),
  618. REPL_RETRY_MAX_DELAY_BETWEEN_RETRIES("hive.repl.retry.max.delay.between.retries", "60m",
  619. new TimeValidator(TimeUnit.MINUTES),
  620. "Maximum allowed retry delay in minutes after including exponential backoff. " +
  621. "If this limit is reached, retry will continue with this retry duration."),
  622. REPL_RETRY_TOTAL_DURATION("hive.repl.retry.total.duration", "24h",
  623. new TimeValidator(TimeUnit.HOURS),
  624. "Total allowed retry duration in hours inclusive of all retries. Once this is exhausted, " +
  625. "the policy instance will be marked as failed and will need manual intervention to restart."),
  626. REPL_COPY_FILE_LIST_ITERATOR_RETRY("hive.repl.copy.file.list.iterator.retry", true,
  627. "Determines whether writes happen with retry upon encountering filesystem errors for data-copy \n"
  628. + "iterator files. It should be disabled when we do not want retry on a per-line basis while writing \n"
  629. + "to the files and in cases when flushing capabilities are not available on the stream. If disabled, then retry \n"
  630. + "is only attempted during file creation, not for errors encountered while writing entries."),
  631. REPL_LOAD_PARTITIONS_BATCH_SIZE("hive.repl.load.partitions.batch.size", 10000,
  632. "Provide the maximum number of partitions of a table that will be batched together during \n"
  633. + "repl load. All the partitions in a batch will make a single metastore call to update the metadata. \n"
  634. + "The data for these partitions will be copied before copying the metadata batch. "),
  635. REPL_LOAD_PARTITIONS_WITH_DATA_COPY_BATCH_SIZE("hive.repl.load.partitions.with.data.copy.batch.size",1000,
  636. "Provide the maximum number of partitions of a table that will be batched together during \n"
  637. + "repl load. All the partitions in a batch will make a single metastore call to update the metadata. \n"
  638. + "The data for these partitions will be copied before copying the metadata batch. "),
  639. REPL_PARALLEL_COPY_TASKS("hive.repl.parallel.copy.tasks",100,
  640. "Provide the maximum number of parallel copy operation(distcp or regular copy) launched for a table \n"
  641. + "or partition. This will create at max 100 threads which will run copy in parallel for the data files at \n"
  642. + " table or partition level. If hive.exec.parallel \n"
  643. + "is set to true then max worker threads created for copy can be hive.exec.parallel.thread.number(determines \n"
  644. + "number of copy tasks in parallel) * hive.repl.parallel.copy.tasks "),
  645. REPL_SNAPSHOT_DIFF_FOR_EXTERNAL_TABLE_COPY("hive.repl.externaltable.snapshotdiff.copy",
  646. false,"Use snapshot diff for copying data from source to "
  647. + "destination cluster for external table in distcp. If true it uses snapshot based distcp for all the paths "
  648. + "configured as part of hive.repl.external.warehouse.single.copy.task along with the external warehouse "
  649. + "default location."),
  650. REPL_SNAPSHOT_OVERWRITE_TARGET_FOR_EXTERNAL_TABLE_COPY("hive.repl.externaltable.snapshot.overwrite.target",
  651. true,"If this is enabled, in case the target is modified, when using snapshot for external table"
  652. + "data copy, the target data is overwritten and the modifications are removed and the copy is again "
  653. + "attempted using the snapshot based approach. If disabled, the replication will fail in case the target is "
  654. + "modified."),
  655. REPL_STATS_TOP_EVENTS_COUNTS("hive.repl.stats.events.count", 5,
  656. "Number of topmost expensive events that needs to be maintained per event type for the replication statistics." +
  657. " Maximum permissible limit is 10."),
  658. LOCALSCRATCHDIR("hive.exec.local.scratchdir",
  659. "${system:java.io.tmpdir}" + File.separator + "${system:user.name}",
  660. "Local scratch space for Hive jobs"),
  661. DOWNLOADED_RESOURCES_DIR("hive.downloaded.resources.dir",
  662. "${system:java.io.tmpdir}" + File.separator + "${hive.session.id}_resources",
  663. "Temporary local directory for added resources in the remote file system."),
  664. SCRATCHDIRPERMISSION("hive.scratch.dir.permission", "700",
  665. "The permission for the user specific scratch directories that get created."),
  666. SUBMITVIACHILD("hive.exec.submitviachild", false, ""),
  667. SUBMITLOCALTASKVIACHILD("hive.exec.submit.local.task.via.child", true,
  668. "Determines whether local tasks (typically mapjoin hashtable generation phase) runs in \n" +
  669. "separate JVM (true recommended) or not. \n" +
  670. "Avoids the overhead of spawning new JVM, but can lead to out-of-memory issues."),
  671. SCRIPTERRORLIMIT("hive.exec.script.maxerrsize", 100000,
  672. "Maximum number of bytes a script is allowed to emit to standard error (per map-reduce task). \n" +
  673. "This prevents runaway scripts from filling logs partitions to capacity"),
  674. ALLOWPARTIALCONSUMP("hive.exec.script.allow.partial.consumption", false,
  675. "When enabled, this option allows a user script to exit successfully without consuming \n" +
  676. "all the data from the standard input."),
  677. STREAMREPORTERPERFIX("stream.stderr.reporter.prefix", "reporter:",
  678. "Streaming jobs that log to standard error with this prefix can log counter or status information."),
  679. STREAMREPORTERENABLED("stream.stderr.reporter.enabled", true,
  680. "Enable consumption of status and counter messages for streaming jobs."),
  681. COMPRESSRESULT("hive.exec.compress.output", false,
  682. "This controls whether the final outputs of a query (to a local/HDFS file or a Hive table) is compressed. \n" +
  683. "The compression codec and other options are determined from Hadoop config variables mapred.output.compress*"),
  684. COMPRESSINTERMEDIATE("hive.exec.compress.intermediate", false,
  685. "This controls whether intermediate files produced by Hive between multiple map-reduce jobs are compressed. \n" +
  686. "The compression codec and other options are determined from Hadoop config variables mapred.output.compress*"),
  687. COMPRESSINTERMEDIATECODEC("hive.intermediate.compression.codec", "", ""),
  688. COMPRESSINTERMEDIATETYPE("hive.intermediate.compression.type", "", ""),
  689. BYTESPERREDUCER("hive.exec.reducers.bytes.per.reducer", (long) (256 * 1000 * 1000),
  690. "size per reducer.The default is 256Mb, i.e if the input size is 1G, it will use 4 reducers."),
  691. MAXREDUCERS("hive.exec.reducers.max", 1009,
  692. "max number of reducers will be used. If the one specified in the configuration parameter mapred.reduce.tasks is\n" +
  693. "negative, Hive will use this one as the max number of reducers when automatically determine number of reducers."),
  694. PREEXECHOOKS("hive.exec.pre.hooks", "",
  695. "Comma-separated list of pre-execution hooks to be invoked for each statement. \n" +
  696. "A pre-execution hook is specified as the name of a Java class which implements the \n" +
  697. "org.apache.hadoop.hive.ql.hooks.ExecuteWithHookContext interface."),
  698. POSTEXECHOOKS("hive.exec.post.hooks", "",
  699. "Comma-separated list of post-execution hooks to be invoked for each statement. \n" +
  700. "A post-execution hook is specified as the name of a Java class which implements the \n" +
  701. "org.apache.hadoop.hive.ql.hooks.ExecuteWithHookContext interface."),
  702. ONFAILUREHOOKS("hive.exec.failure.hooks", "",
  703. "Comma-separated list of on-failure hooks to be invoked for each statement. \n" +
  704. "An on-failure hook is specified as the name of Java class which implements the \n" +
  705. "org.apache.hadoop.hive.ql.hooks.ExecuteWithHookContext interface."),
  706. QUERYREDACTORHOOKS("hive.exec.query.redactor.hooks", "",
  707. "Comma-separated list of hooks to be invoked for each query which can \n" +
  708. "tranform the query before it's placed in the job.xml file. Must be a Java class which \n" +
  709. "extends from the org.apache.hadoop.hive.ql.hooks.Redactor abstract class."),
  710. CLIENTSTATSPUBLISHERS("hive.client.stats.publishers", "",
  711. "Comma-separated list of statistics publishers to be invoked on counters on each job. \n" +
  712. "A client stats publisher is specified as the name of a Java class which implements the \n" +
  713. "org.apache.hadoop.hive.ql.stats.ClientStatsPublisher interface."),
  714. EXECPARALLEL("hive.exec.parallel", false, "Whether to execute jobs in parallel"),
  715. EXECPARALLETHREADNUMBER("hive.exec.parallel.thread.number", 8,
  716. "How many jobs at most can be executed in parallel"),
  717. @Deprecated
  718. HIVESPECULATIVEEXECREDUCERS("hive.mapred.reduce.tasks.speculative.execution", false,
  719. "(Deprecated) Whether speculative execution for reducers should be turned on. "),
  720. HIVECOUNTERSPULLINTERVAL("hive.exec.counters.pull.interval", 1000L,
  721. "The interval with which to poll the JobTracker for the counters the running job. \n" +
  722. "The smaller it is the more load there will be on the jobtracker, the higher it is the less granular the caught will be."),
  723. DYNAMICPARTITIONING("hive.exec.dynamic.partition", true,
  724. "Whether or not to allow dynamic partitions in DML/DDL."),
  725. DYNAMICPARTITIONINGMODE("hive.exec.dynamic.partition.mode", "nonstrict",
  726. new StringSet("strict", "nonstrict"),
  727. "In strict mode, the user must specify at least one static partition\n" +
  728. "in case the user accidentally overwrites all partitions.\n" +
  729. "In nonstrict mode all partitions are allowed to be dynamic."),
  730. DYNAMICPARTITIONMAXPARTS("hive.exec.max.dynamic.partitions", 1000,
  731. "Maximum number of dynamic partitions allowed to be created in total."),
  732. DYNAMICPARTITIONMAXPARTSPERNODE("hive.exec.max.dynamic.partitions.pernode", 100,
  733. "Maximum number of dynamic partitions allowed to be created in each mapper/reducer node."),
  734. DYNAMICPARTITIONCONVERT("hive.exec.dynamic.partition.type.conversion", true,
  735. "Whether to check and cast a dynamic partition column before creating the partition " +
  736. "directory. For example, if partition p is type int and we insert string '001', then if " +
  737. "this value is true, directory p=1 will be created; if false, p=001"),
  738. MAXCREATEDFILES("hive.exec.max.created.files", 100000L,
  739. "Maximum number of HDFS files created by all mappers/reducers in a MapReduce job."),
  740. DEFAULTPARTITIONNAME("hive.exec.default.partition.name", "__HIVE_DEFAULT_PARTITION__",
  741. "The default partition name in case the dynamic partition column value is null/empty string or any other values that cannot be escaped. \n" +
  742. "This value must not contain any special character used in HDFS URI (e.g., ':', '%', '/' etc). \n" +
  743. "The user has to be aware that the dynamic partition value should not contain this value to avoid confusions."),
  744. DEFAULT_ZOOKEEPER_PARTITION_NAME("hive.lockmgr.zookeeper.default.partition.name", "__HIVE_DEFAULT_ZOOKEEPER_PARTITION__", ""),
  745. // Whether to show a link to the most failed task + debugging tips
  746. SHOW_JOB_FAIL_DEBUG_INFO("hive.exec.show.job.failure.debug.info", true,
  747. "If a job fails, whether to provide a link in the CLI to the task with the\n" +
  748. "most failures, along with debugging hints if applicable."),
  749. JOB_DEBUG_CAPTURE_STACKTRACES("hive.exec.job.debug.capture.stacktraces", true,
  750. "Whether or not stack traces parsed from the task logs of a sampled failed task \n" +
  751. "for each failed job should be stored in the SessionState"),
  752. JOB_DEBUG_TIMEOUT("hive.exec.job.debug.timeout", 30000, ""),
  753. TASKLOG_DEBUG_TIMEOUT("hive.exec.tasklog.debug.timeout", 20000, ""),
  754. OUTPUT_FILE_EXTENSION("hive.output.file.extension", null,
  755. "String used as a file extension for output files. \n" +
  756. "If not set, defaults to the codec extension for text files (e.g. \".gz\"), or no extension otherwise."),
  757. HIVE_IN_TEST("hive.in.test", false, "internal usage only, true in test mode", true),
  758. HIVE_IN_TEST_ICEBERG("hive.in.iceberg.test", false, "internal usage only, true when " +
  759. "testing iceberg", true),
  760. HIVE_IN_TEST_SSL("hive.in.ssl.test", false, "internal usage only, true in SSL test mode", true),
  761. // TODO: this needs to be removed; see TestReplicationScenarios* comments.
  762. HIVE_IN_TEST_REPL("hive.in.repl.test", false, "internal usage only, true in replication test mode", true),
  763. HIVE_IN_TEST_IDE("hive.in.ide.test", false, "internal usage only, true if test running in ide",
  764. true),
  765. HIVE_TESTING_SHORT_LOGS("hive.testing.short.logs", false,
  766. "internal usage only, used only in test mode. If set true, when requesting the " +
  767. "operation logs the short version (generated by LogDivertAppenderForTest) will be " +
  768. "returned"),
  769. HIVE_TESTING_REMOVE_LOGS("hive.testing.remove.logs", true,
  770. "internal usage only, used only in test mode. If set false, the operation logs, and the " +
  771. "operation log directory will not be removed, so they can be found after the test runs."),
  772. HIVE_TEST_LOAD_HOSTNAMES("hive.test.load.hostnames", "",
  773. "Specify host names for load testing. (e.g., \"host1,host2,host3\"). Leave it empty if no " +
  774. "load generation is needed (eg. for production)."),
  775. HIVE_TEST_LOAD_INTERVAL("hive.test.load.interval", "10ms", new TimeValidator(TimeUnit.MILLISECONDS),
  776. "The interval length used for load and idle periods in milliseconds."),
  777. HIVE_TEST_LOAD_UTILIZATION("hive.test.load.utilization", 0.2f,
  778. "Specify processor load utilization between 0.0 (not loaded on all threads) and 1.0 " +
  779. "(fully loaded on all threads). Comparing this with a random value the load generator creates " +
  780. "hive.test.load.interval length active loops or idle periods"),
  781. HIVE_IN_TEZ_TEST("hive.in.tez.test", false, "internal use only, true when in testing tez",
  782. true),
  783. HIVE_MAPJOIN_TESTING_NO_HASH_TABLE_LOAD("hive.mapjoin.testing.no.hash.table.load", false, "internal use only, true when in testing map join",
  784. true),
  785. HIVE_ADDITIONAL_PARTIAL_MASKS_PATTERN("hive.qtest.additional.partial.mask.pattern", "",
  786. "internal use only, used in only qtests. Provide additional partial masks pattern" +
  787. "for qtests as a ',' separated list"),
  788. HIVE_ADDITIONAL_PARTIAL_MASKS_REPLACEMENT_TEXT("hive.qtest.additional.partial.mask.replacement.text", "",
  789. "internal use only, used in only qtests. Provide additional partial masks replacement" +
  790. "text for qtests as a ',' separated list"),
  791. HIVE_IN_REPL_TEST_FILES_SORTED("hive.in.repl.test.files.sorted", false,
  792. "internal usage only, set to true if the file listing is required in sorted order during bootstrap load", true),
  793. LOCALMODEAUTO("hive.exec.mode.local.auto", false,
  794. "Let Hive determine whether to run in local mode automatically"),
  795. LOCALMODEMAXBYTES("hive.exec.mode.local.auto.inputbytes.max", 134217728L,
  796. "When hive.exec.mode.local.auto is true, input bytes should less than this for local mode."),
  797. LOCALMODEMAXINPUTFILES("hive.exec.mode.local.auto.input.files.max", 4,
  798. "When hive.exec.mode.local.auto is true, the number of tasks should less than this for local mode."),
  799. DROP_IGNORES_NON_EXISTENT("hive.exec.drop.ignorenonexistent", true,
  800. "Do not report an error if DROP TABLE/VIEW/Index/Function specifies a non-existent table/view/function"),
  801. HIVEIGNOREMAPJOINHINT("hive.ignore.mapjoin.hint", true, "Ignore the mapjoin hint"),
  802. HIVE_FILE_MAX_FOOTER("hive.file.max.footer", 100,
  803. "maximum number of lines for footer user can define for a table file"),
  804. HIVE_RESULTSET_USE_UNIQUE_COLUMN_NAMES("hive.resultset.use.unique.column.names", true,
  805. "Make column names unique in the result set by qualifying column names with table alias if needed.\n" +
  806. "Table alias will be added to column names for queries of type \"select *\" or \n" +
  807. "if query explicitly uses table alias \"select r1.x..\"."),
  808. HIVE_PROTO_EVENTS_QUEUE_CAPACITY("hive.hook.proto.queue.capacity", 64,
  809. "Queue capacity for the proto events logging threads."),
  810. HIVE_PROTO_EVENTS_BASE_PATH("hive.hook.proto.base-directory", "",
  811. "Base directory into which the proto event messages are written by HiveProtoLoggingHook."),
  812. HIVE_PROTO_EVENTS_ROLLOVER_CHECK_INTERVAL("hive.hook.proto.rollover-interval", "600s",
  813. new TimeValidator(TimeUnit.SECONDS, 0L, true, 3600 * 24L, true),
  814. "Frequency at which the file rollover check is triggered."),
  815. HIVE_PROTO_EVENTS_CLEAN_FREQ("hive.hook.proto.events.clean.freq", "1d",
  816. new TimeValidator(TimeUnit.DAYS),
  817. "Frequency at which timer task runs to purge expired proto event files."),
  818. HIVE_PROTO_EVENTS_TTL("hive.hook.proto.events.ttl", "7d",
  819. new TimeValidator(TimeUnit.DAYS),
  820. "Time-To-Live (TTL) of proto event files before cleanup."),
  821. HIVE_PROTO_FILE_PER_EVENT("hive.hook.proto.file.per.event", false,
  822. "Whether each proto event has to be written to separate file. " +
  823. "(Use this for FS that does not hflush immediately like S3A)"),
  824. // Hadoop Configuration Properties
  825. // Properties with null values are ignored and exist only for the purpose of giving us
  826. // a symbolic name to reference in the Hive source code. Properties with non-null
  827. // values will override any values set in the underlying Hadoop configuration.
  828. HADOOPBIN("hadoop.bin.path", findHadoopBinary(), "", true),
  829. YARNBIN("yarn.bin.path", findYarnBinary(), "", true),
  830. MAPREDBIN("mapred.bin.path", findMapRedBinary(), "", true),
  831. HIVE_FS_HAR_IMPL("fs.har.impl", "org.apache.hadoop.hive.shims.HiveHarFileSystem",
  832. "The implementation for accessing Hadoop Archives. Note that this won't be applicable to Hadoop versions less than 0.20"),
  833. MAPREDMAXSPLITSIZE(FileInputFormat.SPLIT_MAXSIZE, 256000000L, "", true),
  834. MAPREDMINSPLITSIZE(FileInputFormat.SPLIT_MINSIZE, 1L, "", true),
  835. MAPREDMINSPLITSIZEPERNODE(CombineFileInputFormat.SPLIT_MINSIZE_PERNODE, 1L, "", true),
  836. MAPREDMINSPLITSIZEPERRACK(CombineFileInputFormat.SPLIT_MINSIZE_PERRACK, 1L, "", true),
  837. // The number of reduce tasks per job. Hadoop sets this value to 1 by default
  838. // By setting this property to -1, Hive will automatically determine the correct
  839. // number of reducers.
  840. HADOOPNUMREDUCERS("mapreduce.job.reduces", -1, "", true),
  841. // Metastore stuff. Be sure to update HiveConf.metaVars when you add something here!
  842. METASTOREDBTYPE("hive.metastore.db.type", "DERBY", new StringSet("DERBY", "ORACLE", "MYSQL", "MSSQL", "POSTGRES"),
  843. "Type of database used by the metastore. Information schema & JDBCStorageHandler depend on it."),
  844. /**
  845. * @deprecated Use MetastoreConf.WAREHOUSE
  846. */
  847. @Deprecated
  848. METASTOREWAREHOUSE("hive.metastore.warehouse.dir", "/user/hive/warehouse",
  849. "location of default database for the warehouse"),
  850. HIVE_METASTORE_WAREHOUSE_EXTERNAL("hive.metastore.warehouse.external.dir", null,
  851. "Default location for external tables created in the warehouse. " +
  852. "If not set or null, then the normal warehouse location will be used as the default location."),
  853. /**
  854. * @deprecated Use MetastoreConf.THRIFT_URIS
  855. */
  856. @Deprecated
  857. METASTOREURIS("hive.metastore.uris", "",
  858. "Thrift URI for the remote metastore. Used by metastore client to connect to remote metastore."),
  859. /**
  860. * @deprecated Use MetastoreConf.THRIFT_URI_SELECTION
  861. */
  862. @Deprecated
  863. METASTORESELECTION("hive.metastore.uri.selection", "RANDOM",
  864. new StringSet("SEQUENTIAL", "RANDOM"),
  865. "Determines the selection mechanism used by metastore client to connect to remote " +
  866. "metastore. SEQUENTIAL implies that the first valid metastore from the URIs specified " +
  867. "as part of hive.metastore.uris will be picked. RANDOM implies that the metastore " +
  868. "will be picked randomly"),
  869. /**
  870. * @deprecated Use MetastoreConf.CAPABILITY_CHECK
  871. */
  872. @Deprecated
  873. METASTORE_CAPABILITY_CHECK("hive.metastore.client.capability.check", true,
  874. "Whether to check client capabilities for potentially breaking API usage."),
  875. METASTORE_CLIENT_CAPABILITIES("hive.metastore.client.capabilities", "", "Capabilities possessed by HiveServer"),
  876. METASTORE_CLIENT_CACHE_ENABLED("hive.metastore.client.cache.enabled", false,
  877. "Whether to enable metastore client cache"),
  878. METASTORE_CLIENT_CACHE_EXPIRY_TIME("hive.metastore.client.cache.expiry.time", "120s",
  879. new TimeValidator(TimeUnit.SECONDS), "Expiry time for metastore client cache"),
  880. METASTORE_CLIENT_CACHE_INITIAL_CAPACITY("hive.metastore.client.cache.initial.capacity", 50,
  881. "Initial capacity for metastore client cache"),
  882. METASTORE_CLIENT_CACHE_MAX_CAPACITY("hive.metastore.client.cache.max.capacity", 50,
  883. "Max capacity for metastore client cache"),
  884. METASTORE_CLIENT_CACHE_STATS_ENABLED("hive.metastore.client.cache.stats.enabled", false,
  885. "Whether to enable metastore client cache stats"),
  886. METASTORE_FASTPATH("hive.metastore.fastpath", false,
  887. "Used to avoid all of the proxies and object copies in the metastore. Note, if this is " +
  888. "set, you MUST use a local metastore (hive.metastore.uris must be empty) otherwise " +
  889. "undefined and most likely undesired behavior will result"),
  890. /**
  891. * @deprecated Use MetastoreConf.FS_HANDLER_THREADS_COUNT
  892. */
  893. @Deprecated
  894. METASTORE_FS_HANDLER_THREADS_COUNT("hive.metastore.fshandler.threads", 15,
  895. "Number of threads to be allocated for metastore handler for fs operations."),
  896. /**
  897. * @deprecated Use MetastoreConf.FILE_METADATA_THREADS
  898. */
  899. @Deprecated
  900. METASTORE_HBASE_FILE_METADATA_THREADS("hive.metastore.hbase.file.metadata.threads", 1,
  901. "Number of threads to use to read file metadata in background to cache it."),
  902. /**
  903. * @deprecated Use MetastoreConf.URI_RESOLVER
  904. */
  905. @Deprecated
  906. METASTORE_URI_RESOLVER("hive.metastore.uri.resolver", "",
  907. "If set, fully qualified class name of resolver for hive metastore uri's"),
  908. /**
  909. * @deprecated Use MetastoreConf.THRIFT_CONNECTION_RETRIES
  910. */
  911. @Deprecated
  912. METASTORETHRIFTCONNECTIONRETRIES("hive.metastore.connect.retries", 3,
  913. "Number of retries while opening a connection to metastore"),
  914. /**
  915. * @deprecated Use MetastoreConf.THRIFT_FAILURE_RETRIES
  916. */
  917. @Deprecated
  918. METASTORETHRIFTFAILURERETRIES("hive.metastore.failure.retries", 1,
  919. "Number of retries upon failure of Thrift metastore calls"),
  920. /**
  921. * @deprecated Use MetastoreConf.SERVER_PORT
  922. */
  923. @Deprecated
  924. METASTORE_SERVER_PORT("hive.metastore.port", 9083, "Hive metastore listener port"),
  925. /**
  926. * @deprecated Use MetastoreConf.CLIENT_CONNECT_RETRY_DELAY
  927. */
  928. @Deprecated
  929. METASTORE_CLIENT_CONNECT_RETRY_DELAY("hive.metastore.client.connect.retry.delay", "1s",
  930. new TimeValidator(TimeUnit.SECONDS),
  931. "Number of seconds for the client to wait between consecutive connection attempts"),
  932. /**
  933. * @deprecated Use MetastoreConf.CLIENT_SOCKET_TIMEOUT
  934. */
  935. @Deprecated
  936. METASTORE_CLIENT_SOCKET_TIMEOUT("hive.metastore.client.socket.timeout", "600s",
  937. new TimeValidator(TimeUnit.SECONDS),
  938. "MetaStore Client socket timeout in seconds"),
  939. /**
  940. * @deprecated Use MetastoreConf.CLIENT_SOCKET_LIFETIME
  941. */
  942. @Deprecated
  943. METASTORE_CLIENT_SOCKET_LIFETIME("hive.metastore.client.socket.lifetime", "0s",
  944. new TimeValidator(TimeUnit.SECONDS),
  945. "MetaStore Client socket lifetime in seconds. After this time is exceeded, client\n" +
  946. "reconnects on the next MetaStore operation. A value of 0s means the connection\n" +
  947. "has an infinite lifetime."),
  948. /**
  949. * @deprecated Use MetastoreConf.PWD
  950. */
  951. @Deprecated
  952. METASTOREPWD("javax.jdo.option.ConnectionPassword", "mine",
  953. "password to use against metastore database"),
  954. /**
  955. * @deprecated Use MetastoreConf.CONNECT_URL_HOOK
  956. */
  957. @Deprecated
  958. METASTORECONNECTURLHOOK("hive.metastore.ds.connection.url.hook", "",
  959. "Name of the hook to use for retrieving the JDO connection URL. If empty, the value in javax.jdo.option.ConnectionURL is used"),
  960. /**
  961. * @deprecated Use MetastoreConf.MULTITHREADED
  962. */
  963. @Deprecated
  964. METASTOREMULTITHREADED("javax.jdo.option.Multithreaded", true,
  965. "Set this to true if multiple threads access metastore through JDO concurrently."),
  966. /**
  967. * @deprecated Use MetastoreConf.CONNECT_URL_KEY
  968. */
  969. @Deprecated
  970. METASTORECONNECTURLKEY("javax.jdo.option.ConnectionURL",
  971. "jdbc:derby:;databaseName=metastore_db;create=true",
  972. "JDBC connect string for a JDBC metastore.\n" +
  973. "To use SSL to encrypt/authenticate the connection, provide database-specific SSL flag in the connection URL.\n" +
  974. "For example, jdbc:postgresql://myhost/db?ssl=true for postgres database."),
  975. /**
  976. * @deprecated Use MetastoreConf.DBACCESS_SSL_PROPS
  977. */
  978. @Deprecated
  979. METASTORE_DBACCESS_SSL_PROPS("hive.metastore.dbaccess.ssl.properties", "",
  980. "Comma-separated SSL properties for metastore to access database when JDO connection URL\n" +
  981. "enables SSL access. e.g. javax.net.ssl.trustStore=/tmp/truststore,javax.net.ssl.trustStorePassword=pwd."),
  982. /**
  983. * @deprecated Use MetastoreConf.HMS_HANDLER_ATTEMPTS
  984. */
  985. @Deprecated
  986. HMSHANDLERATTEMPTS("hive.hmshandler.retry.attempts", 10,
  987. "The number of times to retry a HMSHandler call if there were a connection error."),
  988. /**
  989. * @deprecated Use MetastoreConf.HMS_HANDLER_INTERVAL
  990. */
  991. @Deprecated
  992. HMSHANDLERINTERVAL("hive.hmshandler.retry.interval", "2000ms",
  993. new TimeValidator(TimeUnit.MILLISECONDS), "The time between HMSHandler retry attempts on failure."),
  994. /**
  995. * @deprecated Use MetastoreConf.HMS_HANDLER_FORCE_RELOAD_CONF
  996. */
  997. @Deprecated
  998. HMSHANDLERFORCERELOADCONF("hive.hmshandler.force.reload.conf", false,
  999. "Whether to force reloading of the HMSHandler configuration (including\n" +
  1000. "the connection URL, before the next metastore query that accesses the\n" +
  1001. "datastore. Once reloaded, this value is reset to false. Used for\n" +
  1002. "testing only."),
  1003. /**
  1004. * @deprecated Use MetastoreConf.SERVER_MAX_MESSAGE_SIZE
  1005. */
  1006. @Deprecated
  1007. METASTORESERVERMAXMESSAGESIZE("hive.metastore.server.max.message.size", 100*1024*1024L,
  1008. "Maximum message size in bytes a HMS will accept."),
  1009. /**
  1010. * @deprecated Use MetastoreConf.SERVER_MIN_THREADS
  1011. */
  1012. @Deprecated
  1013. METASTORESERVERMINTHREADS("hive.metastore.server.min.threads", 200,
  1014. "Minimum number of worker threads in the Thrift server's pool."),
  1015. /**
  1016. * @deprecated Use MetastoreConf.SERVER_MAX_THREADS
  1017. */
  1018. @Deprecated
  1019. METASTORESERVERMAXTHREADS("hive.metastore.server.max.threads", 1000,
  1020. "Maximum number of worker threads in the Thrift server's pool."),
  1021. /**
  1022. * @deprecated Use MetastoreConf.TCP_KEEP_ALIVE
  1023. */
  1024. @Deprecated
  1025. METASTORE_TCP_KEEP_ALIVE("hive.metastore.server.tcp.keepalive", true,
  1026. "Whether to enable TCP keepalive for the metastore server. Keepalive will prevent accumulation of half-open connections."),
  1027. /**
  1028. * @deprecated Use MetastoreConf.WM_DEFAULT_POOL_SIZE
  1029. */
  1030. @Deprecated
  1031. METASTORE_WM_DEFAULT_POOL_SIZE("hive.metastore.wm.default.pool.size", 4,
  1032. "The size of a default pool to create when creating an empty resource plan;\n" +
  1033. "If not positive, no default pool will be created."),
  1034. METASTORE_INT_ORIGINAL("hive.metastore.archive.intermediate.original",
  1035. "_INTERMEDIATE_ORIGINAL",
  1036. "Intermediate dir suffixes used for archiving. Not important what they\n" +
  1037. "are, as long as collisions are avoided"),
  1038. METASTORE_INT_ARCHIVED("hive.metastore.archive.intermediate.archived",
  1039. "_INTERMEDIATE_ARCHIVED", ""),
  1040. METASTORE_INT_EXTRACTED("hive.metastore.archive.intermediate.extracted",
  1041. "_INTERMEDIATE_EXTRACTED", ""),
  1042. /**
  1043. * @deprecated Use MetastoreConf.KERBEROS_KEYTAB_FILE
  1044. */
  1045. @Deprecated
  1046. METASTORE_KERBEROS_KEYTAB_FILE("hive.metastore.kerberos.keytab.file", "",
  1047. "The path to the Kerberos Keytab file containing the metastore Thrift server's service principal."),
  1048. /**
  1049. * @deprecated Use MetastoreConf.KERBEROS_PRINCIPAL
  1050. */
  1051. @Deprecated
  1052. METASTORE_KERBEROS_PRINCIPAL("hive.metastore.kerberos.principal",
  1053. "hive-metastore/_HOST@EXAMPLE.COM",
  1054. "The service principal for the metastore Thrift server. \n" +
  1055. "The special string _HOST will be replaced automatically with the correct host name."),
  1056. /**
  1057. * @deprecated Use MetastoreConf.CLIENT_KERBEROS_PRINCIPAL
  1058. */
  1059. @Deprecated
  1060. METASTORE_CLIENT_KERBEROS_PRINCIPAL("hive.metastore.client.kerberos.principal",
  1061. "", // E.g. "hive-metastore/_HOST@EXAMPLE.COM".
  1062. "The Kerberos principal associated with the HA cluster of hcat_servers."),
  1063. /**
  1064. * @deprecated Use MetastoreConf.USE_THRIFT_SASL
  1065. */
  1066. @Deprecated
  1067. METASTORE_USE_THRIFT_SASL("hive.metastore.sasl.enabled", false,
  1068. "If true, the metastore Thrift interface will be secured with SASL. Clients must authenticate with Kerberos."),
  1069. /**
  1070. * @deprecated Use MetastoreConf.USE_THRIFT_FRAMED_TRANSPORT
  1071. */
  1072. @Deprecated
  1073. METASTORE_USE_THRIFT_FRAMED_TRANSPORT("hive.metastore.thrift.framed.transport.enabled", false,
  1074. "If true, the metastore Thrift interface will use TFramedTransport. When false (default) a standard TTransport is used."),
  1075. /**
  1076. * @deprecated Use MetastoreConf.USE_THRIFT_COMPACT_PROTOCOL
  1077. */
  1078. @Deprecated
  1079. METASTORE_USE_THRIFT_COMPACT_PROTOCOL("hive.metastore.thrift.compact.protocol.enabled", false,
  1080. "If true, the metastore Thrift interface will use TCompactProtocol. When false (default) TBinaryProtocol will be used.\n" +
  1081. "Setting it to true will break compatibility with older clients running TBinaryProtocol."),
  1082. /**
  1083. * @deprecated Use MetastoreConf.TOKEN_SIGNATURE
  1084. */
  1085. @Deprecated
  1086. METASTORE_TOKEN_SIGNATURE("hive.metastore.token.signature", "",
  1087. "The delegation token service name to match when selecting a token from the current user's tokens."),
  1088. /**
  1089. * @deprecated Use MetastoreConf.DELEGATION_TOKEN_STORE_CLS
  1090. */
  1091. @Deprecated
  1092. METASTORE_CLUSTER_DELEGATION_TOKEN_STORE_CLS("hive.cluster.delegation.token.store.class",
  1093. "org.apache.hadoop.hive.thrift.MemoryTokenStore",
  1094. "The delegation token store implementation. Set to org.apache.hadoop.hive.thrift.ZooKeeperTokenStore for load-balanced cluster."),
  1095. METASTORE_CLUSTER_DELEGATION_TOKEN_STORE_ZK_CONNECTSTR(
  1096. "hive.cluster.delegation.token.store.zookeeper.connectString", "",
  1097. "The ZooKeeper token store connect string. You can re-use the configuration value\n" +
  1098. "set in hive.zookeeper.quorum, by leaving this parameter unset."),
  1099. METASTORE_CLUSTER_DELEGATION_TOKEN_STORE_ZK_ZNODE(
  1100. "hive.cluster.delegation.token.store.zookeeper.znode", "/hivedelegation",
  1101. "The root path for token store data. Note that this is used by both HiveServer2 and\n" +
  1102. "MetaStore to store delegation Token. One directory gets created for each of them.\n" +
  1103. "The final directory names would have the servername appended to it (HIVESERVER2,\n" +
  1104. "METASTORE)."),
  1105. METASTORE_CLUSTER_DELEGATION_TOKEN_STORE_ZK_ACL(
  1106. "hive.cluster.delegation.token.store.zookeeper.acl", "",
  1107. "ACL for token store entries. Comma separated list of ACL entries. For example:\n" +
  1108. "sasl:hive/host1@MY.DOMAIN:cdrwa,sasl:hive/host2@MY.DOMAIN:cdrwa\n" +
  1109. "Defaults to all permissions for the hiveserver2/metastore process user."),
  1110. /**
  1111. * @deprecated Use MetastoreConf.CACHE_PINOBJTYPES
  1112. */
  1113. @Deprecated
  1114. METASTORE_CACHE_PINOBJTYPES("hive.metastore.cache.pinobjtypes", "Table,StorageDescriptor,SerDeInfo,Partition,Database,Type,FieldSchema,Order",
  1115. "List of comma separated metastore object types that should be pinned in the cache"),
  1116. /**
  1117. * @deprecated Use MetastoreConf.CONNECTION_POOLING_TYPE
  1118. */
  1119. @Deprecated
  1120. METASTORE_CONNECTION_POOLING_TYPE("datanucleus.connectionPoolingType", "HikariCP", new StringSet("DBCP",
  1121. "HikariCP", "NONE"),
  1122. "Specify connection pool library for datanucleus"),
  1123. /**
  1124. * @deprecated Use MetastoreConf.CONNECTION_POOLING_MAX_CONNECTIONS
  1125. */
  1126. @Deprecated
  1127. METASTORE_CONNECTION_POOLING_MAX_CONNECTIONS("datanucleus.connectionPool.maxPoolSize", 10,
  1128. "Specify the maximum number of connections in the connection pool. Note: The configured size will be used by\n" +
  1129. "2 connection pools (TxnHandler and ObjectStore). When configuring the max connection pool size, it is\n" +
  1130. "recommended to take into account the number of metastore instances and the number of HiveServer2 instances\n" +
  1131. "configured with embedded metastore. To get optimal performance, set config to meet the following condition\n"+
  1132. "(2 * pool_size * metastore_instances + 2 * pool_size * HS2_instances_with_embedded_metastore) = \n" +
  1133. "(2 * physical_core_count + hard_disk_count)."),
  1134. // Workaround for DN bug on Postgres:
  1135. // http://www.datanucleus.org/servlet/forum/viewthread_thread,7985_offset
  1136. /**
  1137. * @deprecated Use MetastoreConf.DATANUCLEUS_INIT_COL_INFO
  1138. */
  1139. @Deprecated
  1140. METASTORE_DATANUCLEUS_INIT_COL_INFO("datanucleus.rdbms.initializeColumnInfo", "NONE",
  1141. "initializeColumnInfo setting for DataNucleus; set to NONE at least on Postgres."),
  1142. /**
  1143. * @deprecated Use MetastoreConf.VALIDATE_TABLES
  1144. */
  1145. @Deprecated
  1146. METASTORE_VALIDATE_TABLES("datanucleus.schema.validateTables", false,
  1147. "validates existing schema against code. turn this on if you want to verify existing schema"),
  1148. /**
  1149. * @deprecated Use MetastoreConf.VALIDATE_COLUMNS
  1150. */
  1151. @Deprecated
  1152. METASTORE_VALIDATE_COLUMNS("datanucleus.schema.validateColumns", false,
  1153. "validates existing schema against code. turn this on if you want to verify existing schema"),
  1154. /**
  1155. * @deprecated Use MetastoreConf.VALIDATE_CONSTRAINTS
  1156. */
  1157. @Deprecated
  1158. METASTORE_VALIDATE_CONSTRAINTS("datanucleus.schema.validateConstraints", false,
  1159. "validates existing schema against code. turn this on if you want to verify existing schema"),
  1160. /**
  1161. * @deprecated Use MetastoreConf.STORE_MANAGER_TYPE
  1162. */
  1163. @Deprecated
  1164. METASTORE_STORE_MANAGER_TYPE("datanucleus.storeManagerType", "rdbms", "metadata store type"),
  1165. /**
  1166. * @deprecated Use MetastoreConf.AUTO_CREATE_ALL
  1167. */
  1168. @Deprecated
  1169. METASTORE_AUTO_CREATE_ALL("datanucleus.schema.autoCreateAll", false,
  1170. "Auto creates necessary schema on a startup if one doesn't exist. Set this to false, after creating it once."
  1171. + "To enable auto create also set hive.metastore.schema.verification=false. Auto creation is not "
  1172. + "recommended for production use cases, run schematool command instead." ),
  1173. /**
  1174. * @deprecated Use MetastoreConf.SCHEMA_VERIFICATION
  1175. */
  1176. @Deprecated
  1177. METASTORE_SCHEMA_VERIFICATION("hive.metastore.schema.verification", true,
  1178. "Enforce metastore schema version consistency.\n" +
  1179. "True: Verify that version information stored in is compatible with one from Hive jars. Also disable automatic\n" +
  1180. " schema migration attempt. Users are required to manually migrate schema after Hive upgrade which ensures\n" +
  1181. " proper metastore schema migration. (Default)\n" +
  1182. "False: Warn if the version information stored in metastore doesn't match with one from in Hive jars."),
  1183. /**
  1184. * @deprecated Use MetastoreConf.SCHEMA_VERIFICATION_RECORD_VERSION
  1185. */
  1186. @Deprecated
  1187. METASTORE_SCHEMA_VERIFICATION_RECORD_VERSION("hive.metastore.schema.verification.record.version", false,
  1188. "When true the current MS version is recorded in the VERSION table. If this is disabled and verification is\n" +
  1189. " enabled the MS will be unusable."),
  1190. /**
  1191. * @deprecated Use MetastoreConf.SCHEMA_INFO_CLASS
  1192. */
  1193. @Deprecated
  1194. METASTORE_SCHEMA_INFO_CLASS("hive.metastore.schema.info.class",
  1195. "org.apache.hadoop.hive.metastore.MetaStoreSchemaInfo",
  1196. "Fully qualified class name for the metastore schema information class \n"
  1197. + "which is used by schematool to fetch the schema information.\n"
  1198. + " This class should implement the IMetaStoreSchemaInfo interface"),
  1199. /**
  1200. * @deprecated Use MetastoreConf.DATANUCLEUS_TRANSACTION_ISOLATION
  1201. */
  1202. @Deprecated
  1203. METASTORE_TRANSACTION_ISOLATION("datanucleus.transactionIsolation", "read-committed",
  1204. "Default transaction isolation level for identity generation."),
  1205. /**
  1206. * @deprecated Use MetastoreConf.DATANUCLEUS_CACHE_LEVEL2
  1207. */
  1208. @Deprecated
  1209. METASTORE_CACHE_LEVEL2("datanucleus.cache.level2", false,
  1210. "Use a level 2 cache. Turn this off if metadata is changed independently of Hive metastore server"),
  1211. METASTORE_CACHE_LEVEL2_TYPE("datanucleus.cache.level2.type", "none", ""),
  1212. /**
  1213. * @deprecated Use MetastoreConf.IDENTIFIER_FACTORY
  1214. */
  1215. @Deprecated
  1216. METASTORE_IDENTIFIER_FACTORY("datanucleus.identifierFactory", "datanucleus1",
  1217. "Name of the identifier factory to use when generating table/column names etc. \n" +
  1218. "'datanucleus1' is used for backward compatibility with DataNucleus v1"),
  1219. /**
  1220. * @deprecated Use MetastoreConf.DATANUCLEUS_USE_LEGACY_VALUE_STRATEGY
  1221. */
  1222. @Deprecated
  1223. METASTORE_USE_LEGACY_VALUE_STRATEGY("datanucleus.rdbms.useLegacyNativeValueStrategy", true, ""),
  1224. /**
  1225. * @deprecated Use MetastoreConf.DATANUCLEUS_PLUGIN_REGISTRY_BUNDLE_CHECK
  1226. */
  1227. @Deprecated
  1228. METASTORE_PLUGIN_REGISTRY_BUNDLE_CHECK("datanucleus.plugin.pluginRegistryBundleCheck", "LOG",
  1229. "Defines what happens when plugin bundles are found and are duplicated [EXCEPTION|LOG|NONE]"),
  1230. /**
  1231. * @deprecated Use MetastoreConf.BATCH_RETRIEVE_MAX
  1232. */
  1233. @Deprecated
  1234. METASTORE_BATCH_RETRIEVE_MAX("hive.metastore.batch.retrieve.max", 300,
  1235. "Maximum number of objects (tables/partitions) can be retrieved from metastore in one batch. \n" +
  1236. "The higher the number, the less the number of round trips is needed to the Hive metastore server, \n" +
  1237. "but it may also cause higher memory requirement at the client side."),
  1238. /**
  1239. * @deprecated Use MetastoreConf.BATCH_RETRIEVE_OBJECTS_MAX
  1240. */
  1241. @Deprecated
  1242. METASTORE_BATCH_RETRIEVE_OBJECTS_MAX(
  1243. "hive.metastore.batch.retrieve.table.partition.max", 1000,
  1244. "Maximum number of objects that metastore internally retrieves in one batch."),
  1245. /**
  1246. * @deprecated Use MetastoreConf.INIT_HOOKS
  1247. */
  1248. @Deprecated
  1249. METASTORE_INIT_HOOKS("hive.metastore.init.hooks", "",
  1250. "A comma separated list of hooks to be invoked at the beginning of HMSHandler initialization. \n" +
  1251. "An init hook is specified as the name of Java class which extends org.apache.hadoop.hive.metastore.MetaStoreInitListener."),
  1252. /**
  1253. * @deprecated Use MetastoreConf.PRE_EVENT_LISTENERS
  1254. */
  1255. @Deprecated
  1256. METASTORE_PRE_EVENT_LISTENERS("hive.metastore.pre.event.listeners", "",
  1257. "List of comma separated listeners for metastore events."),
  1258. /**
  1259. * @deprecated Use MetastoreConf.EVENT_LISTENERS
  1260. */
  1261. @Deprecated
  1262. METASTORE_EVENT_LISTENERS("hive.metastore.event.listeners", "",
  1263. "A comma separated list of Java classes that implement the org.apache.hadoop.hive.metastore.MetaStoreEventListener" +
  1264. " interface. The metastore event and corresponding listener method will be invoked in separate JDO transactions. " +
  1265. "Alternatively, configure hive.metastore.transactional.event.listeners to ensure both are invoked in same JDO transaction."),
  1266. HIVE_WRITE_NOTIFICATION_MAX_BATCH_SIZE("hive.write.notification.max.batch.size", 1000,
  1267. "Max number of write notification logs sent in a batch "),
  1268. /**
  1269. * @deprecated Use MetastoreConf.TRANSACTIONAL_EVENT_LISTENERS
  1270. */
  1271. @Deprecated
  1272. METASTORE_TRANSACTIONAL_EVENT_LISTENERS("hive.metastore.transactional.event.listeners", "",
  1273. "A comma separated list of Java classes that implement the org.apache.hadoop.hive.metastore.MetaStoreEventListener" +
  1274. " interface. Both the metastore event and corresponding listener method will be invoked in the same JDO transaction."),
  1275. /**
  1276. * @deprecated Use MetastoreConf.NOTIFICATION_SEQUENCE_LOCK_MAX_RETRIES
  1277. */
  1278. @Deprecated
  1279. NOTIFICATION_SEQUENCE_LOCK_MAX_RETRIES("hive.notification.sequence.lock.max.retries", 10,
  1280. "Number of retries required to acquire a lock when getting the next notification sequential ID for entries "
  1281. + "in the NOTIFICATION_LOG table."),
  1282. /**
  1283. * @deprecated Use MetastoreConf.NOTIFICATION_SEQUENCE_LOCK_RETRY_SLEEP_INTERVAL
  1284. */
  1285. @Deprecated
  1286. NOTIFICATION_SEQUENCE_LOCK_RETRY_SLEEP_INTERVAL("hive.notification.sequence.lock.retry.sleep.interval", 10L,
  1287. new TimeValidator(TimeUnit.SECONDS),
  1288. "Sleep interval between retries to acquire a notification lock as described part of property "
  1289. + NOTIFICATION_SEQUENCE_LOCK_MAX_RETRIES.name()),
  1290. /**
  1291. * @deprecated Use MetastoreConf.EVENT_DB_LISTENER_TTL
  1292. */
  1293. @Deprecated
  1294. METASTORE_EVENT_DB_LISTENER_TTL("hive.metastore.event.db.listener.timetolive", "86400s",
  1295. new TimeValidator(TimeUnit.SECONDS),
  1296. "time after which events will be removed from the database listener queue when repl.cm.enabled \n" +
  1297. "is set to false. When repl.cm.enabled is set to true, repl.event.db.listener.timetolive is used instead"),
  1298. /**
  1299. * @deprecated Use MetastoreConf.EVENT_DB_NOTIFICATION_API_AUTH
  1300. */
  1301. @Deprecated
  1302. METASTORE_EVENT_DB_NOTIFICATION_API_AUTH("hive.metastore.event.db.notification.api.auth", true,
  1303. "Should metastore do authorization against database notification related APIs such as get_next_notification.\n" +
  1304. "If set to true, then only the superusers in proxy settings have the permission"),
  1305. /**
  1306. * @deprecated Use MetastoreConf.AUTHORIZATION_STORAGE_AUTH_CHECKS
  1307. */
  1308. @Deprecated
  1309. METASTORE_AUTHORIZATION_STORAGE_AUTH_CHECKS("hive.metastore.authorization.storage.checks", false,
  1310. "Should the metastore do authorization checks against the underlying storage (usually hdfs) \n" +
  1311. "for operations like drop-partition (disallow the drop-partition if the user in\n" +
  1312. "question doesn't have permissions to delete the corresponding directory\n" +
  1313. "on the storage)."),
  1314. METASTORE_AUTHORIZATION_EXTERNALTABLE_DROP_CHECK("hive.metastore.authorization.storage.check.externaltable.drop", true,
  1315. "Should StorageBasedAuthorization check permission of the storage before dropping external table.\n" +
  1316. "StorageBasedAuthorization already does this check for managed table. For external table however,\n" +
  1317. "anyone who has read permission of the directory could drop external table, which is surprising.\n" +
  1318. "The flag is set to false by default to maintain backward compatibility."),
  1319. /**
  1320. * @deprecated Use MetastoreConf.EVENT_CLEAN_FREQ
  1321. */
  1322. @Deprecated
  1323. METASTORE_EVENT_CLEAN_FREQ("hive.metastore.event.clean.freq", "0s",
  1324. new TimeValidator(TimeUnit.SECONDS),
  1325. "Frequency at which timer task runs to purge expired events in metastore."),
  1326. /**
  1327. * @deprecated Use MetastoreConf.EVENT_EXPIRY_DURATION
  1328. */
  1329. @Deprecated
  1330. METASTORE_EVENT_EXPIRY_DURATION("hive.metastore.event.expiry.duration", "0s",
  1331. new TimeValidator(TimeUnit.SECONDS),
  1332. "Duration after which events expire from events table"),
  1333. /**
  1334. * @deprecated Use MetastoreConf.EVENT_MESSAGE_FACTORY
  1335. */
  1336. @Deprecated
  1337. METASTORE_EVENT_MESSAGE_FACTORY("hive.metastore.event.message.factory",
  1338. "org.apache.hadoop.hive.metastore.messaging.json.gzip.GzipJSONMessageEncoder",
  1339. "Factory class for making encoding and decoding messages in the events generated."),
  1340. /**
  1341. * @deprecated Use MetastoreConf.EXECUTE_SET_UGI
  1342. */
  1343. @Deprecated
  1344. METASTORE_EXECUTE_SET_UGI("hive.metastore.execute.setugi", true,
  1345. "In unsecure mode, setting this property to true will cause the metastore to execute DFS operations using \n" +
  1346. "the client's reported user and group permissions. Note that this property must be set on \n" +
  1347. "both the client and server sides. Further note that its best effort. \n" +
  1348. "If client sets its to true and server sets it to false, client setting will be ignored."),
  1349. /**
  1350. * @deprecated Use MetastoreConf.PARTITION_NAME_WHITELIST_PATTERN
  1351. */
  1352. @Deprecated
  1353. METASTORE_PARTITION_NAME_WHITELIST_PATTERN("hive.metastore.partition.name.whitelist.pattern", "",
  1354. "Partition names will be checked against this regex pattern and rejected if not matched."),
  1355. /**
  1356. * @deprecated Use MetastoreConf.INTEGER_JDO_PUSHDOWN
  1357. */
  1358. @Deprecated
  1359. METASTORE_INTEGER_JDO_PUSHDOWN("hive.metastore.integral.jdo.pushdown", false,
  1360. "Allow JDO query pushdown for integral partition columns in metastore. Off by default. This\n" +
  1361. "improves metastore perf for integral columns, especially if there's a large number of partitions.\n" +
  1362. "However, it doesn't work correctly with integral values that are not normalized (e.g. have\n" +
  1363. "leading zeroes, like 0012). If metastore direct SQL is enabled and works, this optimization\n" +
  1364. "is also irrelevant."),
  1365. /**
  1366. * @deprecated Use MetastoreConf.TRY_DIRECT_SQL
  1367. */
  1368. @Deprecated
  1369. METASTORE_TRY_DIRECT_SQL("hive.metastore.try.direct.sql", true,
  1370. "Whether the Hive metastore should try to use direct SQL queries instead of the\n" +
  1371. "DataNucleus for certain read paths. This can improve metastore performance when\n" +
  1372. "fetching many partitions or column statistics by orders of magnitude; however, it\n" +
  1373. "is not guaranteed to work on all RDBMS-es and all versions. In case of SQL failures,\n" +
  1374. "the metastore will fall back to the DataNucleus, so it's safe even if SQL doesn't\n" +
  1375. "work for all queries on your datastore. If all SQL queries fail (for example, your\n" +
  1376. "metastore is backed by MongoDB), you might want to disable this to save the\n" +
  1377. "try-and-fall-back cost."),
  1378. /**
  1379. * @deprecated Use MetastoreConf.DIRECT_SQL_PARTITION_BATCH_SIZE
  1380. */
  1381. @Deprecated
  1382. METASTORE_DIRECT_SQL_PARTITION_BATCH_SIZE("hive.metastore.direct.sql.batch.size", 0,
  1383. "Batch size for partition and other object retrieval from the underlying DB in direct\n" +
  1384. "SQL. For some DBs like Oracle and MSSQL, there are hardcoded or perf-based limitations\n" +
  1385. "that necessitate this. For DBs that can handle the queries, this isn't necessary and\n" +
  1386. "may impede performance. -1 means no batching, 0 means automatic batching."),
  1387. /**
  1388. * @deprecated Use MetastoreConf.TRY_DIRECT_SQL_DDL
  1389. */
  1390. @Deprecated
  1391. METASTORE_TRY_DIRECT_SQL_DDL("hive.metastore.try.direct.sql.ddl", true,
  1392. "Same as hive.metastore.try.direct.sql, for read statements within a transaction that\n" +
  1393. "modifies metastore data. Due to non-standard behavior in Postgres, if a direct SQL\n" +
  1394. "select query has incorrect syntax or something similar inside a transaction, the\n" +
  1395. "entire transaction will fail and fall-back to DataNucleus will not be possible. You\n" +
  1396. "should disable the usage of direct SQL inside transactions if that happens in your case."),
  1397. /**
  1398. * @deprecated Use MetastoreConf.DIRECT_SQL_MAX_QUERY_LENGTH
  1399. */
  1400. @Deprecated
  1401. METASTORE_DIRECT_SQL_MAX_QUERY_LENGTH("hive.direct.sql.max.query.length", 100, "The maximum\n" +
  1402. " size of a query string (in KB)."),
  1403. /**
  1404. * @deprecated Use MetastoreConf.DIRECT_SQL_MAX_ELEMENTS_IN_CLAUSE
  1405. */
  1406. @Deprecated
  1407. METASTORE_DIRECT_SQL_MAX_ELEMENTS_IN_CLAUSE("hive.direct.sql.max.elements.in.clause", 1000,
  1408. "The maximum number of values in a IN clause. Once exceeded, it will be broken into\n" +
  1409. " multiple OR separated IN clauses."),
  1410. /**
  1411. * @deprecated Use MetastoreConf.DIRECT_SQL_MAX_ELEMENTS_VALUES_CLAUSE
  1412. */
  1413. @Deprecated
  1414. METASTORE_DIRECT_SQL_MAX_ELEMENTS_VALUES_CLAUSE("hive.direct.sql.max.elements.values.clause",
  1415. 1000, "The maximum number of values in a VALUES clause for INSERT statement."),
  1416. /**
  1417. * @deprecated Use MetastoreConf.ORM_RETRIEVE_MAPNULLS_AS_EMPTY_STRINGS
  1418. */
  1419. @Deprecated
  1420. METASTORE_ORM_RETRIEVE_MAPNULLS_AS_EMPTY_STRINGS("hive.metastore.orm.retrieveMapNullsAsEmptyStrings",false,
  1421. "Thrift does not support nulls in maps, so any nulls present in maps retrieved from ORM must " +
  1422. "either be pruned or converted to empty strings. Some backing dbs such as Oracle persist empty strings " +
  1423. "as nulls, so we should set this parameter if we wish to reverse that behaviour. For others, " +
  1424. "pruning is the correct behaviour"),
  1425. /**
  1426. * @deprecated Use MetastoreConf.DISALLOW_INCOMPATIBLE_COL_TYPE_CHANGES
  1427. */
  1428. @Deprecated
  1429. METASTORE_DISALLOW_INCOMPATIBLE_COL_TYPE_CHANGES(
  1430. "hive.metastore.disallow.incompatible.col.type.changes", true,
  1431. "If true (default is false), ALTER TABLE operations which change the type of a\n" +
  1432. "column (say STRING) to an incompatible type (say MAP) are disallowed.\n" +
  1433. "RCFile default SerDe (ColumnarSerDe) serializes the values in such a way that the\n" +
  1434. "datatypes can be converted from string to any type. The map is also serialized as\n" +
  1435. "a string, which can be read as a string as well. However, with any binary\n" +
  1436. "serialization, this is not true. Blocking the ALTER TABLE prevents ClassCastExceptions\n" +
  1437. "when subsequently trying to access old partitions.\n" +
  1438. "\n" +
  1439. "Primitive types like INT, STRING, BIGINT, etc., are compatible with each other and are\n" +
  1440. "not blocked.\n" +
  1441. "\n" +
  1442. "See HIVE-4409 for more details."),
  1443. /**
  1444. * @deprecated Use MetastoreConf.LIMIT_PARTITION_REQUEST
  1445. */
  1446. @Deprecated
  1447. METASTORE_LIMIT_PARTITION_REQUEST("hive.metastore.limit.partition.request", -1,
  1448. "This limits the number of partitions that can be requested from the metastore for a given table.\n" +
  1449. "The default value \"-1\" means no limit."),
  1450. NEWTABLEDEFAULTPARA("hive.table.parameters.default", "",
  1451. "Default property values for newly created tables"),
  1452. DDL_CTL_PARAMETERS_WHITELIST("hive.ddl.createtablelike.properties.whitelist", "",
  1453. "Table Properties to copy over when executing a Create Table Like."),
  1454. /**
  1455. * @deprecated Use MetastoreConf.RAW_STORE_IMPL
  1456. */
  1457. @Deprecated
  1458. METASTORE_RAW_STORE_IMPL("hive.metastore.rawstore.impl", "org.apache.hadoop.hive.metastore.ObjectStore",
  1459. "Name of the class that implements org.apache.hadoop.hive.metastore.rawstore interface. \n" +
  1460. "This class is used to store and retrieval of raw metadata objects such as table, database"),
  1461. /**
  1462. * @deprecated Use MetastoreConf.TXN_STORE_IMPL
  1463. */
  1464. @Deprecated
  1465. METASTORE_TXN_STORE_IMPL("hive.metastore.txn.store.impl",
  1466. "org.apache.hadoop.hive.metastore.txn.CompactionTxnHandler",
  1467. "Name of class that implements org.apache.hadoop.hive.metastore.txn.TxnStore. This " +
  1468. "class is used to store and retrieve transactions and locks"),
  1469. /**
  1470. * @deprecated Use MetastoreConf.CONNECTION_DRIVER
  1471. */
  1472. @Deprecated
  1473. METASTORE_CONNECTION_DRIVER("javax.jdo.option.ConnectionDriverName", "org.apache.derby.jdbc.EmbeddedDriver",
  1474. "Driver class name for a JDBC metastore"),
  1475. /**
  1476. * @deprecated Use MetastoreConf.MANAGER_FACTORY_CLASS
  1477. */
  1478. @Deprecated
  1479. METASTORE_MANAGER_FACTORY_CLASS("javax.jdo.PersistenceManagerFactoryClass",
  1480. "org.datanucleus.api.jdo.JDOPersistenceManagerFactory",
  1481. "class implementing the jdo persistence"),
  1482. /**
  1483. * @deprecated Use MetastoreConf.EXPRESSION_PROXY_CLASS
  1484. */
  1485. @Deprecated
  1486. METASTORE_EXPRESSION_PROXY_CLASS("hive.metastore.expression.proxy",
  1487. "org.apache.hadoop.hive.ql.optimizer.ppr.PartitionExpressionForMetastore", ""),
  1488. /**
  1489. * @deprecated Use MetastoreConf.DETACH_ALL_ON_COMMIT
  1490. */
  1491. @Deprecated
  1492. METASTORE_DETACH_ALL_ON_COMMIT("javax.jdo.option.DetachAllOnCommit", true,
  1493. "Detaches all objects from session so that they can be used after transaction is committed"),
  1494. /**
  1495. * @deprecated Use MetastoreConf.NON_TRANSACTIONAL_READ
  1496. */
  1497. @Deprecated
  1498. METASTORE_NON_TRANSACTIONAL_READ("javax.jdo.option.NonTransactionalRead", true,
  1499. "Reads outside of transactions"),
  1500. /**
  1501. * @deprecated Use MetastoreConf.CONNECTION_USER_NAME
  1502. */
  1503. @Deprecated
  1504. METASTORE_CONNECTION_USER_NAME("javax.jdo.option.ConnectionUserName", "APP",
  1505. "Username to use against metastore database"),
  1506. /**
  1507. * @deprecated Use MetastoreConf.END_FUNCTION_LISTENERS
  1508. */
  1509. @Deprecated
  1510. METASTORE_END_FUNCTION_LISTENERS("hive.metastore.end.function.listeners", "",
  1511. "List of comma separated listeners for the end of metastore functions."),
  1512. /**
  1513. * @deprecated Use MetastoreConf.PART_INHERIT_TBL_PROPS
  1514. */
  1515. @Deprecated
  1516. METASTORE_PART_INHERIT_TBL_PROPS("hive.metastore.partition.inherit.table.properties", "",
  1517. "List of comma separated keys occurring in table properties which will get inherited to newly created partitions. \n" +
  1518. "* implies all the keys will get inherited."),
  1519. /**
  1520. * @deprecated Use MetastoreConf.FILTER_HOOK
  1521. */
  1522. @Deprecated
  1523. METASTORE_FILTER_HOOK("hive.metastore.filter.hook", "org.apache.hadoop.hive.metastore.DefaultMetaStoreFilterHookImpl",
  1524. "Metastore hook class for filtering the metadata read results. If hive.security.authorization.manager"
  1525. + "is set to instance of HiveAuthorizerFactory, then this value is ignored."),
  1526. FIRE_EVENTS_FOR_DML("hive.metastore.dml.events", false, "If true, the metastore will be asked" +
  1527. " to fire events for DML operations"),
  1528. METASTORE_CLIENT_DROP_PARTITIONS_WITH_EXPRESSIONS("hive.metastore.client.drop.partitions.using.expressions", true,
  1529. "Choose whether dropping partitions with HCatClient pushes the partition-predicate to the metastore, " +
  1530. "or drops partitions iteratively"),
  1531. /**
  1532. * @deprecated Use MetastoreConf.AGGREGATE_STATS_CACHE_ENABLED
  1533. */
  1534. @Deprecated
  1535. METASTORE_AGGREGATE_STATS_CACHE_ENABLED("hive.metastore.aggregate.stats.cache.enabled", false,
  1536. "Whether aggregate stats caching is enabled or not."),
  1537. /**
  1538. * @deprecated Use MetastoreConf.AGGREGATE_STATS_CACHE_SIZE
  1539. */
  1540. @Deprecated
  1541. METASTORE_AGGREGATE_STATS_CACHE_SIZE("hive.metastore.aggregate.stats.cache.size", 10000,
  1542. "Maximum number of aggregate stats nodes that we will place in the metastore aggregate stats cache."),
  1543. /**
  1544. * @deprecated Use MetastoreConf.AGGREGATE_STATS_CACHE_MAX_PARTITIONS
  1545. */
  1546. @Deprecated
  1547. METASTORE_AGGREGATE_STATS_CACHE_MAX_PARTITIONS("hive.metastore.aggregate.stats.cache.max.partitions", 10000,
  1548. "Maximum number of partitions that are aggregated per cache node."),
  1549. /**
  1550. * @deprecated Use MetastoreConf.AGGREGATE_STATS_CACHE_FPP
  1551. */
  1552. @Deprecated
  1553. METASTORE_AGGREGATE_STATS_CACHE_FPP("hive.metastore.aggregate.stats.cache.fpp", (float) 0.01,
  1554. "Maximum false positive probability for the Bloom Filter used in each aggregate stats cache node (default 1%)."),
  1555. /**
  1556. * @deprecated Use MetastoreConf.AGGREGATE_STATS_CACHE_MAX_VARIANCE
  1557. */
  1558. @Deprecated
  1559. METASTORE_AGGREGATE_STATS_CACHE_MAX_VARIANCE("hive.metastore.aggregate.stats.cache.max.variance", (float) 0.01,
  1560. "Maximum tolerable variance in number of partitions between a cached node and our request (default 1%)."),
  1561. /**
  1562. * @deprecated Use MetastoreConf.AGGREGATE_STATS_CACHE_TTL
  1563. */
  1564. @Deprecated
  1565. METASTORE_AGGREGATE_STATS_CACHE_TTL("hive.metastore.aggregate.stats.cache.ttl", "600s", new TimeValidator(TimeUnit.SECONDS),
  1566. "Number of seconds for a cached node to be active in the cache before they become stale."),
  1567. /**
  1568. * @deprecated Use MetastoreConf.AGGREGATE_STATS_CACHE_MAX_WRITER_WAIT
  1569. */
  1570. @Deprecated
  1571. METASTORE_AGGREGATE_STATS_CACHE_MAX_WRITER_WAIT("hive.metastore.aggregate.stats.cache.max.writer.wait", "5000ms",
  1572. new TimeValidator(TimeUnit.MILLISECONDS),
  1573. "Number of milliseconds a writer will wait to acquire the writelock before giving up."),
  1574. /**
  1575. * @deprecated Use MetastoreConf.AGGREGATE_STATS_CACHE_MAX_READER_WAIT
  1576. */
  1577. @Deprecated
  1578. METASTORE_AGGREGATE_STATS_CACHE_MAX_READER_WAIT("hive.metastore.aggregate.stats.cache.max.reader.wait", "1000ms",
  1579. new TimeValidator(TimeUnit.MILLISECONDS),
  1580. "Number of milliseconds a reader will wait to acquire the readlock before giving up."),
  1581. /**
  1582. * @deprecated Use MetastoreConf.AGGREGATE_STATS_CACHE_MAX_FULL
  1583. */
  1584. @Deprecated
  1585. METASTORE_AGGREGATE_STATS_CACHE_MAX_FULL("hive.metastore.aggregate.stats.cache.max.full", (float) 0.9,
  1586. "Maximum cache full % after which the cache cleaner thread kicks in."),
  1587. /**
  1588. * @deprecated Use MetastoreConf.AGGREGATE_STATS_CACHE_CLEAN_UNTIL
  1589. */
  1590. @Deprecated
  1591. METASTORE_AGGREGATE_STATS_CACHE_CLEAN_UNTIL("hive.metastore.aggregate.stats.cache.clean.until", (float) 0.8,
  1592. "The cleaner thread cleans until cache reaches this % full size."),
  1593. /**
  1594. * @deprecated Use MetastoreConf.METRICS_ENABLED
  1595. */
  1596. @Deprecated
  1597. METASTORE_METRICS("hive.metastore.metrics.enabled", false, "Enable metrics on the metastore."),
  1598. /**
  1599. * @deprecated Use MetastoreConf.INIT_METADATA_COUNT_ENABLED
  1600. */
  1601. @Deprecated
  1602. METASTORE_INIT_METADATA_COUNT_ENABLED("hive.metastore.initial.metadata.count.enabled", true,
  1603. "Enable a metadata count at metastore startup for metrics."),
  1604. // Metastore SSL settings
  1605. /**
  1606. * @deprecated Use MetastoreConf.USE_SSL
  1607. */
  1608. @Deprecated
  1609. HIVE_METASTORE_USE_SSL("hive.metastore.use.SSL", false,
  1610. "Set this to true for using SSL encryption in HMS server."),
  1611. /**
  1612. * @deprecated Use MetastoreConf.SSL_KEYSTORE_PATH
  1613. */
  1614. @Deprecated
  1615. HIVE_METASTORE_SSL_KEYSTORE_PATH("hive.metastore.keystore.path", "",
  1616. "Metastore SSL certificate keystore location."),
  1617. /**
  1618. * @deprecated Use MetastoreConf.SSL_KEYSTORE_PASSWORD
  1619. */
  1620. @Deprecated
  1621. HIVE_METASTORE_SSL_KEYSTORE_PASSWORD("hive.metastore.keystore.password", "",
  1622. "Metastore SSL certificate keystore password."),
  1623. /**
  1624. * @deprecated Use MetastoreConf.SSL_TRUSTSTORE_PATH
  1625. */
  1626. @Deprecated
  1627. HIVE_METASTORE_SSL_TRUSTSTORE_PATH("hive.metastore.truststore.path", "",
  1628. "Metastore SSL certificate truststore location."),
  1629. /**
  1630. * @deprecated Use MetastoreConf.SSL_TRUSTSTORE_PASSWORD
  1631. */
  1632. @Deprecated
  1633. HIVE_METASTORE_SSL_TRUSTSTORE_PASSWORD("hive.metastore.truststore.password", "",
  1634. "Metastore SSL certificate truststore password."),
  1635. // Parameters for exporting metadata on table drop (requires the use of the)
  1636. // org.apache.hadoop.hive.ql.parse.MetaDataExportListener preevent listener
  1637. /**
  1638. * @deprecated Use MetastoreConf.METADATA_EXPORT_LOCATION
  1639. */
  1640. @Deprecated
  1641. METADATA_EXPORT_LOCATION("hive.metadata.export.location", "",
  1642. "When used in conjunction with the org.apache.hadoop.hive.ql.parse.MetaDataExportListener pre event listener, \n" +
  1643. "it is the location to which the metadata will be exported. The default is an empty string, which results in the \n" +
  1644. "metadata being exported to the current user's home directory on HDFS."),
  1645. /**
  1646. * @deprecated Use MetastoreConf.MOVE_EXPORTED_METADATA_TO_TRASH
  1647. */
  1648. @Deprecated
  1649. MOVE_EXPORTED_METADATA_TO_TRASH("hive.metadata.move.exported.metadata.to.trash", true,
  1650. "When used in conjunction with the org.apache.hadoop.hive.ql.parse.MetaDataExportListener pre event listener, \n" +
  1651. "this setting determines if the metadata that is exported will subsequently be moved to the user's trash directory \n" +
  1652. "alongside the dropped table data. This ensures that the metadata will be cleaned up along with the dropped table data."),
  1653. // CLI
  1654. CLIIGNOREERRORS("hive.cli.errors.ignore", false, ""),
  1655. CLIPRINTCURRENTDB("hive.cli.print.current.db", false,
  1656. "Whether to include the current database in the Hive prompt."),
  1657. CLIPROMPT("hive.cli.prompt", "hive",
  1658. "Command line prompt configuration value. Other hiveconf can be used in this configuration value. \n" +
  1659. "Variable substitution will only be invoked at the Hive CLI startup."),
  1660. /**
  1661. * @deprecated Use MetastoreConf.FS_HANDLER_CLS
  1662. */
  1663. @Deprecated
  1664. HIVE_METASTORE_FS_HANDLER_CLS("hive.metastore.fs.handler.class", "org.apache.hadoop.hive.metastore.HiveMetaStoreFsImpl", ""),
  1665. // Things we log in the jobconf
  1666. // session identifier
  1667. HIVESESSIONID("hive.session.id", "", ""),
  1668. // whether session is running in silent mode or not
  1669. HIVESESSIONSILENT("hive.session.silent", false, ""),
  1670. HIVE_LOCAL_TIME_ZONE("hive.local.time.zone", "LOCAL",
  1671. "Sets the time-zone for displaying and interpreting time stamps. If this property value is set to\n" +
  1672. "LOCAL, it is not specified, or it is not a correct time-zone, the system default time-zone will be\n " +
  1673. "used instead. Time-zone IDs can be specified as region-based zone IDs (based on IANA time-zone data),\n" +
  1674. "abbreviated zone IDs, or offset IDs."),
  1675. HIVE_SESSION_HISTORY_ENABLED("hive.session.history.enabled", false,
  1676. "Whether to log Hive query, query plan, runtime statistics etc."),
  1677. HIVEQUERYSTRING("hive.query.string", "",
  1678. "Query being executed (might be multiple per a session)"),
  1679. HIVEQUERYID("hive.query.id", "",
  1680. "ID for query being executed (might be multiple per a session)"),
  1681. HIVEQUERYTAG("hive.query.tag", null, "Tag for the queries in the session. User can kill the queries with the tag " +
  1682. "in another session. Currently there is no tag duplication check, user need to make sure his tag is unique. " +
  1683. "Also 'kill query' needs to be issued to all HiveServer2 instances to proper kill the queries"),
  1684. HIVESPARKJOBNAMELENGTH("hive.spark.jobname.length", 100000, "max jobname length for Hive on " +
  1685. "Spark queries"),
  1686. HIVEJOBNAMELENGTH("hive.jobname.length", 50, "max jobname length"),
  1687. // hive jar
  1688. HIVEJAR("hive.jar.path", "",
  1689. "The location of hive_cli.jar that is used when submitting jobs in a separate jvm."),
  1690. HIVEAUXJARS("hive.aux.jars.path", "",
  1691. "The location of the plugin jars that contain implementations of user defined functions and serdes."),
  1692. // reloadable jars
  1693. HIVERELOADABLEJARS("hive.reloadable.aux.jars.path", "",
  1694. "The locations of the plugin jars, which can be a comma-separated folders or jars. Jars can be renewed\n"
  1695. + "by executing reload command. And these jars can be "
  1696. + "used as the auxiliary classes like creating a UDF or SerDe."),
  1697. // hive added files and jars
  1698. HIVEADDEDFILES("hive.added.files.path", "", "This an internal parameter."),
  1699. HIVEADDEDJARS("hive.added.jars.path", "", "This an internal parameter."),
  1700. HIVEADDEDARCHIVES("hive.added.archives.path", "", "This an internal parameter."),
  1701. HIVEADDFILESUSEHDFSLOCATION("hive.resource.use.hdfs.location", true, "Reference HDFS based files/jars directly instead of "
  1702. + "copy to session based HDFS scratch directory, to make distributed cache more useful."),
  1703. HIVE_CURRENT_DATABASE("hive.current.database", "", "Database name used by current session. Internal usage only.", true),
  1704. // for hive script operator
  1705. HIVES_AUTO_PROGRESS_TIMEOUT("hive.auto.progress.timeout", "0s",
  1706. new TimeValidator(TimeUnit.SECONDS),
  1707. "How long to run autoprogressor for the script/UDTF operators.\n" +
  1708. "Set to 0 for forever."),
  1709. HIVESCRIPTAUTOPROGRESS("hive.script.auto.progress", false,
  1710. "Whether Hive Transform/Map/Reduce Clause should automatically send progress information to TaskTracker \n" +
  1711. "to avoid the task getting killed because of inactivity. Hive sends progress information when the script is \n" +
  1712. "outputting to stderr. This option removes the need of periodically producing stderr messages, \n" +
  1713. "but users should be cautious because this may prevent infinite loops in the scripts to be killed by TaskTracker."),
  1714. HIVESCRIPTIDENVVAR("hive.script.operator.id.env.var", "HIVE_SCRIPT_OPERATOR_ID",
  1715. "Name of the environment variable that holds the unique script operator ID in the user's \n" +
  1716. "transform function (the custom mapper/reducer that the user has specified in the query)"),
  1717. HIVESCRIPTTRUNCATEENV("hive.script.operator.truncate.env", false,
  1718. "Truncate each environment variable for external script in scripts operator to 20KB (to fit system limits)"),
  1719. HIVESCRIPT_ENV_BLACKLIST("hive.script.operator.env.blacklist",
  1720. "hive.txn.valid.txns,hive.txn.tables.valid.writeids,hive.txn.valid.writeids,hive.script.operator.env.blacklist,hive.repl.current.table.write.id",
  1721. "Comma separated list of keys from the configuration file not to convert to environment " +
  1722. "variables when invoking the script operator"),
  1723. HIVE_STRICT_CHECKS_ORDERBY_NO_LIMIT("hive.strict.checks.orderby.no.limit", false,
  1724. "Enabling strict large query checks disallows the following:\n" +
  1725. " Orderby without limit.\n" +
  1726. "Note that this check currently does not consider data size, only the query pattern."),
  1727. HIVE_STRICT_CHECKS_NO_PARTITION_FILTER("hive.strict.checks.no.partition.filter", false,
  1728. "Enabling strict large query checks disallows the following:\n" +
  1729. " No partition being picked up for a query against partitioned table.\n" +
  1730. "Note that this check currently does not consider data size, only the query pattern."),
  1731. HIVE_STRICT_CHECKS_TYPE_SAFETY("hive.strict.checks.type.safety", true,
  1732. "Enabling strict type safety checks disallows the following:\n" +
  1733. " Comparing bigints and strings/(var)chars.\n" +
  1734. " Comparing bigints and doubles.\n" +
  1735. " Comparing decimals and strings/(var)chars."),
  1736. HIVE_STRICT_CHECKS_CARTESIAN("hive.strict.checks.cartesian.product", false,
  1737. "Enabling strict Cartesian join checks disallows the following:\n" +
  1738. " Cartesian product (cross join)."),
  1739. HIVE_STRICT_CHECKS_BUCKETING("hive.strict.checks.bucketing", true,
  1740. "Enabling strict bucketing checks disallows the following:\n" +
  1741. " Load into bucketed tables."),
  1742. HIVE_STRICT_TIMESTAMP_CONVERSION("hive.strict.timestamp.conversion", true,
  1743. "Restricts unsafe numeric to timestamp conversions"),
  1744. HIVE_LOAD_DATA_OWNER("hive.load.data.owner", "",
  1745. "Set the owner of files loaded using load data in managed tables."),
  1746. @Deprecated
  1747. HIVEMAPREDMODE("hive.mapred.mode", null,
  1748. "Deprecated; use hive.strict.checks.* settings instead."),
  1749. HIVEALIAS("hive.alias", "", ""),
  1750. HIVEMAPSIDEAGGREGATE("hive.map.aggr", true, "Whether to use map-side aggregation in Hive Group By queries"),
  1751. HIVEGROUPBYSKEW("hive.groupby.skewindata", false, "Whether there is skew in data to optimize group by queries"),
  1752. HIVEJOINEMITINTERVAL("hive.join.emit.interval", 1000,
  1753. "How many rows in the right-most join operand Hive should buffer before emitting the join result."),
  1754. HIVEJOINCACHESIZE("hive.join.cache.size", 25000,
  1755. "How many rows in the joining tables (except the streaming table) should be cached in memory."),
  1756. HIVE_PUSH_RESIDUAL_INNER("hive.join.inner.residual", false,
  1757. "Whether to push non-equi filter predicates within inner joins. This can improve efficiency in "
  1758. + "the evaluation of certain joins, since we will not be emitting rows which are thrown away by "
  1759. + "a Filter operator straight away. However, currently vectorization does not support them, thus "
  1760. + "enabling it is only recommended when vectorization is disabled."),
  1761. HIVE_PTF_RANGECACHE_SIZE("hive.ptf.rangecache.size", 10000,
  1762. "Size of the cache used on reducer side, that stores boundaries of ranges within a PTF " +
  1763. "partition. Used if a query specifies a RANGE type window including an orderby clause." +
  1764. "Set this to 0 to disable this cache."),
  1765. HIVE_PTF_VALUECACHE_SIZE("hive.ptf.valuecache.size", 10000,
  1766. "Size of the cache used on reducer side, that stores calculated values for ranges within a PTF "
  1767. + "partition. Set this to 0 to disable this cache."),
  1768. HIVE_PTF_VALUECACHE_COLLECT_STATISTICS("hive.ptf.valuecache.collect.statistics", false,
  1769. "Whether to collect cache statistics in PTFValueCache. On extremely hot codepaths, this can be expensive, "
  1770. + "so it's disabled by default. It's only for development/debugging purposes, "
  1771. + "execution engine doesn't take advantage of statistics stored in the cache."),
  1772. // CBO related
  1773. HIVE_CBO_ENABLED("hive.cbo.enable", true, "Flag to control enabling Cost Based Optimizations using Calcite framework."),
  1774. HIVE_CBO_FALLBACK_STRATEGY("hive.cbo.fallback.strategy", "CONSERVATIVE",
  1775. new StringSet(true, "NEVER", "CONSERVATIVE", "ALWAYS", "TEST"),
  1776. "The strategy defines when Hive fallbacks to legacy optimizer when CBO fails:"
  1777. + "NEVER, never use the legacy optimizer (all CBO errors are fatal);"
  1778. + "ALWAYS, always use the legacy optimizer (CBO errors are not fatal);"
  1779. + "CONSERVATIVE, use the legacy optimizer only when the CBO error is not related to subqueries and views;"
  1780. + "TEST, specific behavior only for tests, do not use in production"),
  1781. HIVE_CBO_CNF_NODES_LIMIT("hive.cbo.cnf.maxnodes", -1, "When converting to conjunctive normal form (CNF), fail if" +
  1782. "the expression exceeds this threshold; the threshold is expressed in terms of number of nodes (leaves and" +
  1783. "interior nodes). -1 to not set up a threshold."),
  1784. HIVE_CBO_RETPATH_HIVEOP("hive.cbo.returnpath.hiveop", false, "Flag to control calcite plan to hive operator conversion"),
  1785. HIVE_CBO_EXTENDED_COST_MODEL("hive.cbo.costmodel.extended", false, "Flag to control enabling the extended cost model based on"
  1786. + "CPU, IO and cardinality. Otherwise, the cost model is based on cardinality."),
  1787. HIVE_CBO_COST_MODEL_CPU("hive.cbo.costmodel.cpu", "0.000001", "Default cost of a comparison"),
  1788. HIVE_CBO_COST_MODEL_NET("hive.cbo.costmodel.network", "150.0", "Default cost of a transferring a byte over network;"
  1789. + " expressed as multiple of CPU cost"),
  1790. HIVE_CBO_COST_MODEL_LFS_WRITE("hive.cbo.costmodel.local.fs.write", "4.0", "Default cost of writing a byte to local FS;"
  1791. + " expressed as multiple of NETWORK cost"),
  1792. HIVE_CBO_COST_MODEL_LFS_READ("hive.cbo.costmodel.local.fs.read", "4.0", "Default cost of reading a byte from local FS;"
  1793. + " expressed as multiple of NETWORK cost"),
  1794. HIVE_CBO_COST_MODEL_HDFS_WRITE("hive.cbo.costmodel.hdfs.write", "10.0", "Default cost of writing a byte to HDFS;"
  1795. + " expressed as multiple of Local FS write cost"),
  1796. HIVE_CBO_COST_MODEL_HDFS_READ("hive.cbo.costmodel.hdfs.read", "1.5", "Default cost of reading a byte from HDFS;"
  1797. + " expressed as multiple of Local FS read cost"),
  1798. HIVE_CBO_SHOW_WARNINGS("hive.cbo.show.warnings", true,
  1799. "Toggle display of CBO warnings like missing column stats"),
  1800. HIVE_CBO_STATS_CORRELATED_MULTI_KEY_JOINS("hive.cbo.stats.correlated.multi.key.joins", true,
  1801. "When CBO estimates output rows for a join involving multiple columns, the default behavior assumes" +
  1802. "the columns are independent. Setting this flag to true will cause the estimator to assume" +
  1803. "the columns are correlated."),
  1804. HIVE_CARDINALITY_PRESERVING_JOIN_OPTIMIZATION_FACTOR("hive.cardinality.preserving.join.optimization.factor", 1.0f,
  1805. "Original plan cost multiplier for rewriting when query has tables joined multiple time on primary/unique key and " +
  1806. "projected the majority of columns from these table. This optimization trims fields at root of tree and " +
  1807. "then joins back affected tables at top of tree to get rest of columns. " +
  1808. "Set this to 0.0 to disable this optimization or increase it for more aggressive optimization."),
  1809. AGGR_JOIN_TRANSPOSE("hive.transpose.aggr.join", false, "push aggregates through join"),
  1810. AGGR_JOIN_TRANSPOSE_UNIQUE("hive.transpose.aggr.join.unique", true, "push aggregates through join(s) in "
  1811. + "case data is regrouped on a previously unique column"),
  1812. SEMIJOIN_CONVERSION("hive.optimize.semijoin.conversion", true, "convert group by followed by inner equi join into semijoin"),
  1813. HIVE_COLUMN_ALIGNMENT("hive.order.columnalignment", true, "Flag to control whether we want to try to align" +
  1814. "columns in operators such as Aggregate or Join so that we try to reduce the number of shuffling stages"),
  1815. // materialized views
  1816. HIVE_MATERIALIZED_VIEW_ENABLE_AUTO_REWRITING("hive.materializedview.rewriting", true,
  1817. "Whether to try to rewrite queries using the materialized views enabled for rewriting"),
  1818. HIVE_MATERIALIZED_VIEW_ENABLE_AUTO_REWRITING_SQL("hive.materializedview.rewriting.sql", true,
  1819. "Whether to try to rewrite queries using the materialized views enabled for rewriting by comparing the sql " +
  1820. "query text with the materialized views query text"),
  1821. HIVE_MATERIALIZED_VIEW_ENABLE_AUTO_REWRITING_SUBQUERY_SQL("hive.materializedview.rewriting.sql.subquery", true,
  1822. "Whether to try to rewrite sub-queries using the materialized views enabled for rewriting by comparing the sql " +
  1823. "sub-query text with the materialized views query text"),
  1824. HIVE_MATERIALIZED_VIEW_REWRITING_SELECTION_STRATEGY("hive.materializedview.rewriting.strategy", "heuristic",
  1825. new StringSet("heuristic", "costbased"),
  1826. "The strategy that should be used to cost and select the materialized view rewriting. \n" +
  1827. " heuristic: Always try to select the plan using the materialized view if rewriting produced one," +
  1828. "choosing the plan with lower cost among possible plans containing a materialized view\n" +
  1829. " costbased: Fully cost-based strategy, always use plan with lower cost, independently on whether " +
  1830. "it uses a materialized view or not"),
  1831. HIVE_MATERIALIZED_VIEW_REWRITING_TIME_WINDOW("hive.materializedview.rewriting.time.window", "0min", new TimeValidator(TimeUnit.MINUTES),
  1832. "Time window, specified in seconds, after which outdated materialized views become invalid for automatic query rewriting.\n" +
  1833. "For instance, if more time than the value assigned to the property has passed since the materialized view " +
  1834. "was created or rebuilt, and one of its source tables has changed since, the materialized view will not be " +
  1835. "considered for rewriting. Default value 0 means that the materialized view cannot be " +
  1836. "outdated to be used automatically in query rewriting. Value -1 means to skip this check."),
  1837. HIVE_MATERIALIZED_VIEW_REWRITING_INCREMENTAL("hive.materializedview.rewriting.incremental", false,
  1838. "Whether to try to execute incremental rewritings based on outdated materializations and\n" +
  1839. "current content of tables. Default value of true effectively amounts to enabling incremental\n" +
  1840. "rebuild for the materializations too."),
  1841. HIVE_MATERIALIZED_VIEW_REBUILD_INCREMENTAL("hive.materializedview.rebuild.incremental", true,
  1842. "Whether to try to execute incremental rebuild for the materialized views. Incremental rebuild\n" +
  1843. "tries to modify the original materialization contents to reflect the latest changes to the\n" +
  1844. "materialized view source tables, instead of rebuilding the contents fully. Incremental rebuild\n" +
  1845. "is based on the materialized view algebraic incremental rewriting."),
  1846. HIVE_MATERIALIZED_VIEW_REBUILD_INCREMENTAL_FACTOR("hive.materializedview.rebuild.incremental.factor", 0.1f,
  1847. "The estimated cost of the resulting plan for incremental maintenance of materialization\n" +
  1848. "with aggregations will be multiplied by this value. Reducing the value can be useful to\n" +
  1849. "favour incremental rebuild over full rebuild."),
  1850. HIVE_MATERIALIZED_VIEW_FILE_FORMAT("hive.materializedview.fileformat", "ORC",
  1851. new StringSet("none", "TextFile", "SequenceFile", "RCfile", "ORC", "parquet"),
  1852. "Default file format for CREATE MATERIALIZED VIEW statement"),
  1853. HIVE_MATERIALIZED_VIEW_SERDE("hive.materializedview.serde",
  1854. "org.apache.hadoop.hive.ql.io.orc.OrcSerde", "Default SerDe used for materialized views"),
  1855. HIVE_ENABLE_JDBC_PUSHDOWN("hive.jdbc.pushdown.enable", true,
  1856. "Flag to control enabling pushdown of operators into JDBC connection and subsequent SQL generation\n" +
  1857. "using Calcite"),
  1858. HIVE_ENABLE_JDBC_SAFE_PUSHDOWN("hive.jdbc.pushdown.safe.enable", false,
  1859. "Flag to control enabling pushdown of operators using Calcite that prevent splitting results\n" +
  1860. "retrieval in the JDBC storage handler"),
  1861. // hive.mapjoin.bucket.cache.size has been replaced by hive.smbjoin.cache.row,
  1862. // need to remove by hive .13. Also, do not change default (see SMB operator)
  1863. HIVEMAPJOINBUCKETCACHESIZE("hive.mapjoin.bucket.cache.size", 100, ""),
  1864. HIVEMAPJOINUSEOPTIMIZEDTABLE("hive.mapjoin.optimized.hashtable", true,
  1865. "Whether Hive should use memory-optimized hash table for MapJoin.\n" +
  1866. "Only works on Tez and Spark, because memory-optimized hashtable cannot be serialized."),
  1867. HIVEMAPJOINOPTIMIZEDTABLEPROBEPERCENT("hive.mapjoin.optimized.hashtable.probe.percent",
  1868. (float) 0.5, "Probing space percentage of the optimized hashtable"),
  1869. HIVEUSEHYBRIDGRACEHASHJOIN("hive.mapjoin.hybridgrace.hashtable", false, "Whether to use hybrid" +
  1870. "grace hash join as the join method for mapjoin. Tez only."),
  1871. HIVEHYBRIDGRACEHASHJOINMEMCHECKFREQ("hive.mapjoin.hybridgrace.memcheckfrequency", 1024, "For " +
  1872. "hybrid grace hash join, how often (how many rows apart) we check if memory is full. " +
  1873. "This number should be power of 2."),
  1874. HIVEHYBRIDGRACEHASHJOINMINWBSIZE("hive.mapjoin.hybridgrace.minwbsize", 524288, "For hybrid grace" +
  1875. "Hash join, the minimum write buffer size used by optimized hashtable. Default is 512 KB."),
  1876. HIVEHYBRIDGRACEHASHJOINMINNUMPARTITIONS("hive.mapjoin.hybridgrace.minnumpartitions", 16, "For" +
  1877. "Hybrid grace hash join, the minimum number of partitions to create."),
  1878. HIVEHASHTABLEWBSIZE("hive.mapjoin.optimized.hashtable.wbsize", 8 * 1024 * 1024,
  1879. "Optimized hashtable (see hive.mapjoin.optimized.hashtable) uses a chain of buffers to\n" +
  1880. "store data. This is one buffer size. HT may be slightly faster if this is larger, but for small\n" +
  1881. "joins unnecessary memory will be allocated and then trimmed."),
  1882. HIVEHYBRIDGRACEHASHJOINBLOOMFILTER("hive.mapjoin.hybridgrace.bloomfilter", true, "Whether to " +
  1883. "use BloomFilter in Hybrid grace hash join to minimize unnecessary spilling."),
  1884. HIVEMAPJOINFULLOUTER("hive.mapjoin.full.outer", true,
  1885. "Whether to use MapJoin for FULL OUTER JOINs."),
  1886. HIVE_TEST_MAPJOINFULLOUTER_OVERRIDE(
  1887. "hive.test.mapjoin.full.outer.override",
  1888. "none", new StringSet("none", "enable", "disable"),
  1889. "internal use only, used to override the hive.mapjoin.full.outer\n" +
  1890. "setting. Using enable will force it on and disable will force it off.\n" +
  1891. "The default none is do nothing, of course",
  1892. true),
  1893. HIVESMBJOINCACHEROWS("hive.smbjoin.cache.rows", 10000,
  1894. "How many rows with the same key value should be cached in memory per smb joined table."),
  1895. HIVEGROUPBYMAPINTERVAL("hive.groupby.mapaggr.checkinterval", 100000,
  1896. "Number of rows after which size of the grouping keys/aggregation classes is performed"),
  1897. HIVEMAPAGGRHASHMEMORY("hive.map.aggr.hash.percentmemory", (float) 0.5,
  1898. "Portion of total memory to be used by map-side group aggregation hash table"),
  1899. HIVEMAPJOINFOLLOWEDBYMAPAGGRHASHMEMORY("hive.mapjoin.followby.map.aggr.hash.percentmemory", (float) 0.3,
  1900. "Portion of total memory to be used by map-side group aggregation hash table, when this group by is followed by map join"),
  1901. HIVEMAPAGGRMEMORYTHRESHOLD("hive.map.aggr.hash.force.flush.memory.threshold", (float) 0.9,
  1902. "The max memory to be used by map-side group aggregation hash table.\n" +
  1903. "If the memory usage is higher than this number, force to flush data"),
  1904. HIVEMAPAGGRHASHMINREDUCTION("hive.map.aggr.hash.min.reduction", (float) 0.99,
  1905. "Hash aggregation will be turned off if the ratio between hash table size and input rows is bigger than this number. \n" +
  1906. "Set to 1 to make sure hash aggregation is never turned off."),
  1907. HIVEMAPAGGRHASHMINREDUCTIONLOWERBOUND("hive.map.aggr.hash.min.reduction.lower.bound", (float) 0.4,
  1908. "Lower bound of Hash aggregate reduction filter. See also: hive.map.aggr.hash.min.reduction"),
  1909. HIVEMAPAGGRHASHMINREDUCTIONSTATSADJUST("hive.map.aggr.hash.min.reduction.stats", true,
  1910. "Whether the value for hive.map.aggr.hash.min.reduction should be set statically using stats estimates. \n" +
  1911. "If this is enabled, the default value for hive.map.aggr.hash.min.reduction is only used as an upper-bound\n" +
  1912. "for the value set in the map-side group by operators."),
  1913. HIVEMULTIGROUPBYSINGLEREDUCER("hive.multigroupby.singlereducer", true,
  1914. "Whether to optimize multi group by query to generate single M/R job plan. If the multi group by query has \n" +
  1915. "common group by keys, it will be optimized to generate single M/R job."),
  1916. HIVE_MAP_GROUPBY_SORT("hive.map.groupby.sorted", true,
  1917. "If the bucketing/sorting properties of the table exactly match the grouping key, whether to perform \n" +
  1918. "the group by in the mapper by using BucketizedHiveInputFormat. The only downside to this\n" +
  1919. "is that it limits the number of mappers to the number of files."),
  1920. HIVE_DEFAULT_NULLS_LAST("hive.default.nulls.last", true,
  1921. "Whether to set NULLS LAST as the default null ordering for ASC order and " +
  1922. "NULLS FIRST for DESC order."),
  1923. HIVE_GROUPBY_POSITION_ALIAS("hive.groupby.position.alias", false,
  1924. "Whether to enable using Column Position Alias in Group By"),
  1925. HIVE_ORDERBY_POSITION_ALIAS("hive.orderby.position.alias", true,
  1926. "Whether to enable using Column Position Alias in Order By"),
  1927. @Deprecated
  1928. HIVE_GROUPBY_ORDERBY_POSITION_ALIAS("hive.groupby.orderby.position.alias", false,
  1929. "Whether to enable using Column Position Alias in Group By or Order By (deprecated).\n" +
  1930. "Use " + HIVE_ORDERBY_POSITION_ALIAS.varname + " or " + HIVE_GROUPBY_POSITION_ALIAS.varname + " instead"),
  1931. HIVE_NEW_JOB_GROUPING_SET_CARDINALITY("hive.new.job.grouping.set.cardinality", 30,
  1932. "Whether a new map-reduce job should be launched for grouping sets/rollups/cubes.\n" +
  1933. "For a query like: select a, b, c, count(1) from T group by a, b, c with rollup;\n" +
  1934. "4 rows are created per row: (a, b, c), (a, b, null), (a, null, null), (null, null, null).\n" +
  1935. "This can lead to explosion across map-reduce boundary if the cardinality of T is very high,\n" +
  1936. "and map-side aggregation does not do a very good job. \n" +
  1937. "\n" +
  1938. "This parameter decides if Hive should add an additional map-reduce job. If the grouping set\n" +
  1939. "cardinality (4 in the example above), is more than this value, a new MR job is added under the\n" +
  1940. "assumption that the original group by will reduce the data size."),
  1941. HIVE_GROUPBY_LIMIT_EXTRASTEP("hive.groupby.limit.extrastep", true, "This parameter decides if Hive should \n" +
  1942. "create new MR job for sorting final output"),
  1943. // Max file num and size used to do a single copy (after that, distcp is used)
  1944. HIVE_EXEC_COPYFILE_MAXNUMFILES("hive.exec.copyfile.maxnumfiles", 1L,
  1945. "Maximum number of files Hive uses to do sequential HDFS copies between directories." +
  1946. "Distributed copies (distcp) will be used instead for larger numbers of files so that copies can be done faster."),
  1947. HIVE_EXEC_COPYFILE_MAXSIZE("hive.exec.copyfile.maxsize", 32L * 1024 * 1024 /*32M*/,
  1948. "Maximum file size (in bytes) that Hive uses to do single HDFS copies between directories." +
  1949. "Distributed copies (distcp) will be used instead for bigger files so that copies can be done faster."),
  1950. // for hive udtf operator
  1951. HIVEUDTFAUTOPROGRESS("hive.udtf.auto.progress", false,
  1952. "Whether Hive should automatically send progress information to TaskTracker \n" +
  1953. "when using UDTF's to prevent the task getting killed because of inactivity. Users should be cautious \n" +
  1954. "because this may prevent TaskTracker from killing tasks with infinite loops."),
  1955. HIVEDEFAULTFILEFORMAT("hive.default.fileformat", "TextFile", new StringSet("TextFile", "SequenceFile", "RCfile", "ORC", "parquet"),
  1956. "Default file format for CREATE TABLE statement. Users can explicitly override it by CREATE TABLE ... STORED AS [FORMAT]"),
  1957. HIVEDEFAULTMANAGEDFILEFORMAT("hive.default.fileformat.managed", "none",
  1958. new StringSet("none", "TextFile", "SequenceFile", "RCfile", "ORC", "parquet"),
  1959. "Default file format for CREATE TABLE statement applied to managed tables only. External tables will be \n" +
  1960. "created with format specified by hive.default.fileformat. Leaving this null will result in using hive.default.fileformat \n" +
  1961. "for all tables."),
  1962. HIVE_DEFAULT_STORAGE_HANDLER("hive.default.storage.handler.class", "",
  1963. "Default storage handler class for CREATE TABLE statements. If this is set to a valid class, a 'CREATE TABLE ... STORED AS ... LOCATION ...' command will " +
  1964. "be equivalent to 'CREATE TABLE ... STORED BY [default.storage.handler.class] LOCATION ...'. Any STORED AS clauses will be ignored, given that STORED BY and STORED AS are " +
  1965. "incompatible within the same command. Users can explicitly override the default class by issuing 'CREATE TABLE ... STORED BY [overriding.storage.handler.class] ...'"),
  1966. HIVEQUERYRESULTFILEFORMAT("hive.query.result.fileformat", ResultFileFormat.SEQUENCEFILE.toString(),
  1967. new StringSet(ResultFileFormat.getValidSet()),
  1968. "Default file format for storing result of the query."),
  1969. HIVECHECKFILEFORMAT("hive.fileformat.check", true, "Whether to check file format or not when loading data files"),
  1970. // default serde for rcfile
  1971. HIVEDEFAULTRCFILESERDE("hive.default.rcfile.serde",
  1972. "org.apache.hadoop.hive.serde2.columnar.LazyBinaryColumnarSerDe",
  1973. "The default SerDe Hive will use for the RCFile format"),
  1974. HIVEDEFAULTSERDE("hive.default.serde",
  1975. "org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe",
  1976. "The default SerDe Hive will use for storage formats that do not specify a SerDe."),
  1977. /**
  1978. * @deprecated Use MetastoreConf.SERDES_USING_METASTORE_FOR_SCHEMA
  1979. */
  1980. @Deprecated
  1981. SERDESUSINGMETASTOREFORSCHEMA("hive.serdes.using.metastore.for.schema",
  1982. "org.apache.hadoop.hive.ql.io.orc.OrcSerde," +
  1983. "org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe," +
  1984. "org.apache.hadoop.hive.serde2.columnar.ColumnarSerDe," +
  1985. "org.apache.hadoop.hive.serde2.MetadataTypedColumnsetSerDe," +
  1986. "org.apache.hadoop.hive.serde2.columnar.LazyBinaryColumnarSerDe," +
  1987. "org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe," +
  1988. "org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe," +
  1989. "org.apache.hadoop.hive.serde2.OpenCSVSerde",
  1990. "SerDes retrieving schema from metastore. This is an internal parameter."),
  1991. @Deprecated
  1992. HIVE_LEGACY_SCHEMA_FOR_ALL_SERDES("hive.legacy.schema.for.all.serdes",
  1993. false,
  1994. "A backward compatibility setting for external metastore users that do not handle \n" +
  1995. SERDESUSINGMETASTOREFORSCHEMA.varname + " correctly. This may be removed at any time."),
  1996. HIVEHISTORYFILELOC("hive.querylog.location",
  1997. "${system:java.io.tmpdir}" + File.separator + "${system:user.name}",
  1998. "Location of Hive run time structured log file"),
  1999. HIVE_LOG_INCREMENTAL_PLAN_PROGRESS("hive.querylog.enable.plan.progress", true,
  2000. "Whether to log the plan's progress every time a job's progress is checked.\n" +
  2001. "These logs are written to the location specified by hive.querylog.location"),
  2002. HIVE_LOG_INCREMENTAL_PLAN_PROGRESS_INTERVAL("hive.querylog.plan.progress.interval", "60000ms",
  2003. new TimeValidator(TimeUnit.MILLISECONDS),
  2004. "The interval to wait between logging the plan's progress.\n" +
  2005. "If there is a whole number percentage change in the progress of the mappers or the reducers,\n" +
  2006. "the progress is logged regardless of this value.\n" +
  2007. "The actual interval will be the ceiling of (this value divided by the value of\n" +
  2008. "hive.exec.counters.pull.interval) multiplied by the value of hive.exec.counters.pull.interval\n" +
  2009. "I.e. if it is not divide evenly by the value of hive.exec.counters.pull.interval it will be\n" +
  2010. "logged less frequently than specified.\n" +
  2011. "This only has an effect if hive.querylog.enable.plan.progress is set to true."),
  2012. HIVESCRIPTSERDE("hive.script.serde", "org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe",
  2013. "The default SerDe for transmitting input data to and reading output data from the user scripts. "),
  2014. HIVESCRIPTRECORDREADER("hive.script.recordreader",
  2015. "org.apache.hadoop.hive.ql.exec.TextRecordReader",
  2016. "The default record reader for reading data from the user scripts. "),
  2017. HIVESCRIPTRECORDWRITER("hive.script.recordwriter",
  2018. "org.apache.hadoop.hive.ql.exec.TextRecordWriter",
  2019. "The default record writer for writing data to the user scripts. "),
  2020. HIVESCRIPTESCAPE("hive.transform.escape.input", false,
  2021. "This adds an option to escape special chars (newlines, carriage returns and\n" +
  2022. "tabs) when they are passed to the user script. This is useful if the Hive tables\n" +
  2023. "can contain data that contains special characters."),
  2024. HIVEBINARYRECORDMAX("hive.binary.record.max.length", 1000,
  2025. "Read from a binary stream and treat each hive.binary.record.max.length bytes as a record. \n" +
  2026. "The last record before the end of stream can have less than hive.binary.record.max.length bytes"),
  2027. HIVEHADOOPMAXMEM("hive.mapred.local.mem", 0, "mapper/reducer memory in local mode"),
  2028. //small table file size
  2029. HIVESMALLTABLESFILESIZE("hive.mapjoin.smalltable.filesize", 25000000L,
  2030. "The threshold for the input file size of the small tables; if the file size is smaller \n" +
  2031. "than this threshold, it will try to convert the common join into map join"),
  2032. HIVE_SCHEMA_EVOLUTION("hive.exec.schema.evolution", true,
  2033. "Use schema evolution to convert self-describing file format's data to the schema desired by the reader."),
  2034. HIVE_ORC_FORCE_POSITIONAL_SCHEMA_EVOLUTION("orc.force.positional.evolution", true,
  2035. "Whether to use column position based schema evolution or not (as opposed to column name based evolution)"),
  2036. /** Don't use this directly - use AcidUtils! */
  2037. HIVE_TRANSACTIONAL_TABLE_SCAN("hive.transactional.table.scan", false,
  2038. "internal usage only -- do transaction (ACID or insert-only) table scan.", true),
  2039. HIVE_TRANSACTIONAL_NUM_EVENTS_IN_MEMORY("hive.transactional.events.mem", 10000000,
  2040. "Vectorized ACID readers can often load all the delete events from all the delete deltas\n"
  2041. + "into memory to optimize for performance. To prevent out-of-memory errors, this is a rough heuristic\n"
  2042. + "that limits the total number of delete events that can be loaded into memory at once.\n"
  2043. + "Roughly it has been set to 10 million delete events per bucket (~160 MB).\n"),
  2044. FILTER_DELETE_EVENTS("hive.txn.filter.delete.events", true,
  2045. "If true, VectorizedOrcAcidRowBatchReader will compute min/max " +
  2046. "ROW__ID for the split and only load delete events in that range.\n"
  2047. ),
  2048. HIVESAMPLERANDOMNUM("hive.sample.seednumber", 0,
  2049. "A number used to percentage sampling. By changing this number, user will change the subsets of data sampled."),
  2050. // test mode in hive mode
  2051. HIVETESTMODE("hive.test.mode", false,
  2052. "Whether Hive is running in test mode. If yes, it turns on sampling and prefixes the output tablename.",
  2053. false),
  2054. HIVEEXIMTESTMODE("hive.exim.test.mode", false,
  2055. "The subset of test mode that only enables custom path handling for ExIm.", false),
  2056. HIVETESTMODEPREFIX("hive.test.mode.prefix", "test_",
  2057. "In test mode, specifies prefixes for the output table", false),
  2058. HIVETESTMODESAMPLEFREQ("hive.test.mode.samplefreq", 32,
  2059. "In test mode, specifies sampling frequency for table, which is not bucketed,\n" +
  2060. "For example, the following query:\n" +
  2061. " INSERT OVERWRITE TABLE dest SELECT col1 from src\n" +
  2062. "would be converted to\n" +
  2063. " INSERT OVERWRITE TABLE test_dest\n" +
  2064. " SELECT col1 from src TABLESAMPLE (BUCKET 1 out of 32 on rand(1))", false),
  2065. HIVETESTMODENOSAMPLE("hive.test.mode.nosamplelist", "",
  2066. "In test mode, specifies comma separated table names which would not apply sampling", false),
  2067. HIVETESTMODEDUMMYSTATAGGR("hive.test.dummystats.aggregator", "", "internal variable for test", false),
  2068. HIVETESTMODEDUMMYSTATPUB("hive.test.dummystats.publisher", "", "internal variable for test", false),
  2069. HIVETESTCURRENTTIMESTAMP("hive.test.currenttimestamp", null, "current timestamp for test", false),
  2070. HIVETESTMODEROLLBACKTXN("hive.test.rollbacktxn", false, "For testing only. Will mark every ACID transaction aborted", false),
  2071. HIVETESTMODEFAILCOMPACTION("hive.test.fail.compaction", false, "For testing only. Will cause CompactorMR to fail.", false),
  2072. HIVETESTMODEFAILLOADDYNAMICPARTITION("hive.test.fail.load.dynamic.partition", false, "For testing only. Will cause loadDynamicPartition to fail.", false),
  2073. HIVETESTMODEFAILHEARTBEATER("hive.test.fail.heartbeater", false, "For testing only. Will cause Heartbeater to fail.", false),
  2074. TESTMODE_BUCKET_CODEC_VERSION("hive.test.bucketcodec.version", 1,
  2075. "For testing only. Will make ACID subsystem write RecordIdentifier.bucketId in specified\n" +
  2076. "format", false),
  2077. HIVE_EXTEND_BUCKET_ID_RANGE("hive.extend.bucketid.range", true,
  2078. "Dynamically allocate some bits from statement id when bucket id overflows. This allows having more than 4096 buckets."),
  2079. HIVETESTMODEACIDKEYIDXSKIP("hive.test.acid.key.index.skip", false, "For testing only. OrcRecordUpdater will skip "
  2080. + "generation of the hive.acid.key.index", false),
  2081. HIVEMERGEMAPFILES("hive.merge.mapfiles", true,
  2082. "Merge small files at the end of a map-only job"),
  2083. HIVEMERGEMAPREDFILES("hive.merge.mapredfiles", false,
  2084. "Merge small files at the end of a map-reduce job"),
  2085. HIVEMERGETEZFILES("hive.merge.tezfiles", false, "Merge small files at the end of a Tez DAG"),
  2086. HIVEMERGESPARKFILES("hive.merge.sparkfiles", false, "Merge small files at the end of a Spark DAG Transformation"),
  2087. HIVEMERGEMAPFILESSIZE("hive.merge.size.per.task", (long) (256 * 1000 * 1000),
  2088. "Size of merged files at the end of the job"),
  2089. HIVEMERGEMAPFILESAVGSIZE("hive.merge.smallfiles.avgsize", (long) (16 * 1000 * 1000),
  2090. "When the average output file size of a job is less than this number, Hive will start an additional \n" +
  2091. "map-reduce job to merge the output files into bigger files. This is only done for map-only jobs \n" +
  2092. "if hive.merge.mapfiles is true, and for map-reduce jobs if hive.merge.mapredfiles is true."),
  2093. HIVEMERGERCFILEBLOCKLEVEL("hive.merge.rcfile.block.level", true, ""),
  2094. HIVEMERGEORCFILESTRIPELEVEL("hive.merge.orcfile.stripe.level", true,
  2095. "When hive.merge.mapfiles, hive.merge.mapredfiles or hive.merge.tezfiles is enabled\n" +
  2096. "while writing a table with ORC file format, enabling this config will do stripe-level\n" +
  2097. "fast merge for small ORC files. Note that enabling this config will not honor the\n" +
  2098. "padding tolerance config (hive.exec.orc.block.padding.tolerance)."),
  2099. HIVE_ORC_CODEC_POOL("hive.use.orc.codec.pool", false,
  2100. "Whether to use codec pool in ORC. Disable if there are bugs with codec reuse."),
  2101. HIVEUSEEXPLICITRCFILEHEADER("hive.exec.rcfile.use.explicit.header", true,
  2102. "If this is set the header for RCFiles will simply be RCF. If this is not\n" +
  2103. "set the header will be that borrowed from sequence files, e.g. SEQ- followed\n" +
  2104. "by the input and output RCFile formats."),
  2105. HIVEUSERCFILESYNCCACHE("hive.exec.rcfile.use.sync.cache", true, ""),
  2106. HIVE_RCFILE_RECORD_INTERVAL("hive.io.rcfile.record.interval", Integer.MAX_VALUE, ""),
  2107. HIVE_RCFILE_COLUMN_NUMBER_CONF("hive.io.rcfile.column.number.conf", 0, ""),
  2108. HIVE_RCFILE_TOLERATE_CORRUPTIONS("hive.io.rcfile.tolerate.corruptions", false, ""),
  2109. HIVE_RCFILE_RECORD_BUFFER_SIZE("hive.io.rcfile.record.buffer.size", 4194304, ""), // 4M
  2110. PARQUET_MEMORY_POOL_RATIO("parquet.memory.pool.ratio", 0.5f,
  2111. "Maximum fraction of heap that can be used by Parquet file writers in one task.\n" +
  2112. "It is for avoiding OutOfMemory error in tasks. Work with Parquet 1.6.0 and above.\n" +
  2113. "This config parameter is defined in Parquet, so that it does not start with 'hive.'."),
  2114. HIVE_PARQUET_TIMESTAMP_SKIP_CONVERSION("hive.parquet.timestamp.skip.conversion", true,
  2115. "Current Hive implementation of parquet stores timestamps to UTC, this flag allows skipping of the conversion" +
  2116. "on reading parquet files from other tools"),
  2117. HIVE_PARQUET_DATE_PROLEPTIC_GREGORIAN("hive.parquet.date.proleptic.gregorian", false,
  2118. "Should we write date using the proleptic Gregorian calendar instead of the hybrid Julian Gregorian?\n" +
  2119. "Hybrid is the default."),
  2120. HIVE_PARQUET_DATE_PROLEPTIC_GREGORIAN_DEFAULT("hive.parquet.date.proleptic.gregorian.default", false,
  2121. "This value controls whether date type in Parquet files was written using the hybrid or proleptic\n" +
  2122. "calendar. Hybrid is the default."),
  2123. HIVE_PARQUET_TIMESTAMP_LEGACY_CONVERSION_ENABLED("hive.parquet.timestamp.legacy.conversion.enabled", true,
  2124. "Whether to use former Java date/time APIs to convert between timezones when reading timestamps from " +
  2125. "Parquet files. The property has no effect when the file contains explicit metadata about the conversion " +
  2126. "used to write the data; in this case reading conversion is chosen based on the metadata."),
  2127. HIVE_PARQUET_TIMESTAMP_WRITE_LEGACY_CONVERSION_ENABLED("hive.parquet.timestamp.write.legacy.conversion.enabled", false,
  2128. "Whether to use former Java date/time APIs to convert between timezones when writing timestamps in " +
  2129. "Parquet files. Once data are written to the file the effect is permanent (also reflected in the metadata)." +
  2130. "Changing the value of this property affects only new data written to the file."),
  2131. HIVE_AVRO_TIMESTAMP_SKIP_CONVERSION("hive.avro.timestamp.skip.conversion", false,
  2132. "Some older Hive implementations (pre-3.1) wrote Avro timestamps in a UTC-normalized" +
  2133. "manner, while from version 3.1 until now Hive wrote time zone agnostic timestamps. " +
  2134. "Setting this flag to true will treat legacy timestamps as time zone agnostic. Setting " +
  2135. "it to false will treat legacy timestamps as UTC-normalized. This flag will not affect " +
  2136. "timestamps written after this change."),
  2137. HIVE_AVRO_PROLEPTIC_GREGORIAN("hive.avro.proleptic.gregorian", false,
  2138. "Should we write date and timestamp using the proleptic Gregorian calendar instead of the hybrid Julian Gregorian?\n" +
  2139. "Hybrid is the default."),
  2140. HIVE_AVRO_PROLEPTIC_GREGORIAN_DEFAULT("hive.avro.proleptic.gregorian.default", false,
  2141. "This value controls whether date and timestamp type in Avro files was written using the hybrid or proleptic\n" +
  2142. "calendar. Hybrid is the default."),
  2143. HIVE_AVRO_TIMESTAMP_LEGACY_CONVERSION_ENABLED("hive.avro.timestamp.legacy.conversion.enabled", true,
  2144. "Whether to use former Java date/time APIs to convert between timezones when reading timestamps from " +
  2145. "Avro files. The property has no effect when the file contains explicit metadata about the conversion " +
  2146. "used to write the data; in this case reading conversion is based on the metadata."),
  2147. HIVE_AVRO_TIMESTAMP_WRITE_LEGACY_CONVERSION_ENABLED("hive.avro.timestamp.write.legacy.conversion.enabled", false,
  2148. "Whether to use former Java date/time APIs to convert between timezones when writing timestamps in " +
  2149. "Avro files. Once data are written to the file the effect is permanent (also reflected in the metadata)." +
  2150. "Changing the value of this property affects only new data written to the file."),
  2151. HIVE_INT_TIMESTAMP_CONVERSION_IN_SECONDS("hive.int.timestamp.conversion.in.seconds", false,
  2152. "Boolean/tinyint/smallint/int/bigint value is interpreted as milliseconds during the timestamp conversion.\n" +
  2153. "Set this flag to true to interpret the value as seconds to be consistent with float/double." ),
  2154. HIVE_PARQUET_WRITE_INT64_TIMESTAMP("hive.parquet.write.int64.timestamp", false,
  2155. "Write parquet timestamps as int64/LogicalTypes instead of int96/OriginalTypes. Note:" +
  2156. "Timestamps will be time zone agnostic (NEVER converted to a different time zone)."),
  2157. HIVE_PARQUET_TIMESTAMP_TIME_UNIT("hive.parquet.timestamp.time.unit", "micros",
  2158. new StringSet("nanos", "micros", "millis"),
  2159. "Store parquet int64/LogicalTypes timestamps in this time unit."),
  2160. HIVE_ORC_BASE_DELTA_RATIO("hive.exec.orc.base.delta.ratio", 8, "The ratio of base writer and\n" +
  2161. "delta writer in terms of STRIPE_SIZE and BUFFER_SIZE."),
  2162. HIVE_ORC_DELTA_STREAMING_OPTIMIZATIONS_ENABLED("hive.exec.orc.delta.streaming.optimizations.enabled", false,
  2163. "Whether to enable streaming optimizations for ORC delta files. This will disable ORC's internal indexes,\n" +
  2164. "disable compression, enable fast encoding and disable dictionary encoding."),
  2165. HIVE_ORC_SPLIT_STRATEGY("hive.exec.orc.split.strategy", "HYBRID", new StringSet("HYBRID", "BI", "ETL"),
  2166. "This is not a user level config. BI strategy is used when the requirement is to spend less time in split generation" +
  2167. " as opposed to query execution (split generation does not read or cache file footers)." +
  2168. " ETL strategy is used when spending little more time in split generation is acceptable" +
  2169. " (split generation reads and caches file footers). HYBRID chooses between the above strategies" +
  2170. " based on heuristics."),
  2171. HIVE_ORC_BLOB_STORAGE_SPLIT_SIZE("hive.exec.orc.blob.storage.split.size", 128L * 1024 * 1024,
  2172. "When blob storage is used, BI split strategy does not have block locations for splitting orc files.\n" +
  2173. "In such cases, split generation will use this config to split orc file"),
  2174. HIVE_ORC_WRITER_LLAP_MEMORY_MANAGER_ENABLED("hive.exec.orc.writer.llap.memory.manager.enabled", true,
  2175. "Whether orc writers should use llap-aware memory manager. LLAP aware memory manager will use memory\n" +
  2176. "per executor instead of entire heap memory when concurrent orc writers are involved. This will let\n" +
  2177. "task fragments to use memory within its limit (memory per executor) when performing ETL in LLAP."),
  2178. // hive streaming ingest settings
  2179. HIVE_STREAMING_AUTO_FLUSH_ENABLED("hive.streaming.auto.flush.enabled", true, "Whether to enable memory \n" +
  2180. "monitoring and automatic flushing of open record updaters during streaming ingest. This is an expert level \n" +
  2181. "setting and disabling this may have severe performance impact under memory pressure."),
  2182. HIVE_HEAP_MEMORY_MONITOR_USAGE_THRESHOLD("hive.heap.memory.monitor.usage.threshold", 0.7f,
  2183. "Hive streaming does automatic memory management across all open record writers. This threshold will let the \n" +
  2184. "memory monitor take an action (flush open files) when heap memory usage exceeded this threshold."),
  2185. HIVE_STREAMING_AUTO_FLUSH_CHECK_INTERVAL_SIZE("hive.streaming.auto.flush.check.interval.size", "100Mb",
  2186. new SizeValidator(),
  2187. "Hive streaming ingest has auto flush mechanism to flush all open record updaters under memory pressure.\n" +
  2188. "When memory usage exceed hive.heap.memory.monitor.default.usage.threshold, the auto-flush mechanism will \n" +
  2189. "wait until this size (default 100Mb) of records are ingested before triggering flush."),
  2190. HIVE_CLASSLOADER_SHADE_PREFIX("hive.classloader.shade.prefix", "", "During reflective instantiation of a class\n" +
  2191. "(input, output formats, serde etc.), when classloader throws ClassNotFoundException, as a fallback this\n" +
  2192. "shade prefix will be used before class reference and retried."),
  2193. HIVE_ORC_MS_FOOTER_CACHE_ENABLED("hive.orc.splits.ms.footer.cache.enabled", false,
  2194. "Whether to enable using file metadata cache in metastore for ORC file footers."),
  2195. HIVE_ORC_MS_FOOTER_CACHE_PPD("hive.orc.splits.ms.footer.cache.ppd.enabled", true,
  2196. "Whether to enable file footer cache PPD (hive.orc.splits.ms.footer.cache.enabled\n" +
  2197. "must also be set to true for this to work)."),
  2198. HIVE_ORC_INCLUDE_FILE_FOOTER_IN_SPLITS("hive.orc.splits.include.file.footer", false,
  2199. "If turned on splits generated by orc will include metadata about the stripes in the file. This\n" +
  2200. "data is read remotely (from the client or HS2 machine) and sent to all the tasks."),
  2201. HIVE_ORC_SPLIT_DIRECTORY_BATCH_MS("hive.orc.splits.directory.batch.ms", 0,
  2202. "How long, in ms, to wait to batch input directories for processing during ORC split\n" +
  2203. "generation. 0 means process directories individually. This can increase the number of\n" +
  2204. "metastore calls if metastore metadata cache is used."),
  2205. HIVE_ORC_INCLUDE_FILE_ID_IN_SPLITS("hive.orc.splits.include.fileid", true,
  2206. "Include file ID in splits on file systems that support it."),
  2207. HIVE_ORC_ALLOW_SYNTHETIC_FILE_ID_IN_SPLITS("hive.orc.splits.allow.synthetic.fileid", true,
  2208. "Allow synthetic file ID in splits on file systems that don't have a native one."),
  2209. HIVE_ORC_CACHE_STRIPE_DETAILS_MEMORY_SIZE("hive.orc.cache.stripe.details.mem.size", "256Mb",
  2210. new SizeValidator(), "Maximum size of orc splits cached in the client."),
  2211. /**
  2212. * @deprecated Use HiveConf.HIVE_COMPUTE_SPLITS_NUM_THREADS
  2213. */
  2214. @Deprecated
  2215. HIVE_ORC_COMPUTE_SPLITS_NUM_THREADS("hive.orc.compute.splits.num.threads", 10,
  2216. "How many threads orc should use to create splits in parallel."),
  2217. HIVE_ORC_CACHE_USE_SOFT_REFERENCES("hive.orc.cache.use.soft.references", false,
  2218. "By default, the cache that ORC input format uses to store orc file footer use hard\n" +
  2219. "references for the cached object. Setting this to true can help avoid out of memory\n" +
  2220. "issues under memory pressure (in some cases) at the cost of slight unpredictability in\n" +
  2221. "overall query performance."),
  2222. HIVE_IO_SARG_CACHE_MAX_WEIGHT_MB("hive.io.sarg.cache.max.weight.mb", 10,
  2223. "The max weight allowed for the SearchArgument Cache. By default, the cache allows a max-weight of 10MB, " +
  2224. "after which entries will be evicted."),
  2225. HIVE_LAZYSIMPLE_EXTENDED_BOOLEAN_LITERAL("hive.lazysimple.extended_boolean_literal", false,
  2226. "LazySimpleSerde uses this property to determine if it treats 'T', 't', 'F', 'f',\n" +
  2227. "'1', and '0' as extended, legal boolean literal, in addition to 'TRUE' and 'FALSE'.\n" +
  2228. "The default is false, which means only 'TRUE' and 'FALSE' are treated as legal\n" +
  2229. "boolean literal."),
  2230. HIVESKEWJOIN("hive.optimize.skewjoin", false,
  2231. "Whether to enable skew join optimization. \n" +
  2232. "The algorithm is as follows: At runtime, detect the keys with a large skew. Instead of\n" +
  2233. "processing those keys, store them temporarily in an HDFS directory. In a follow-up map-reduce\n" +
  2234. "job, process those skewed keys. The same key need not be skewed for all the tables, and so,\n" +
  2235. "the follow-up map-reduce job (for the skewed keys) would be much faster, since it would be a\n" +
  2236. "map-join."),
  2237. HIVEDYNAMICPARTITIONHASHJOIN("hive.optimize.dynamic.partition.hashjoin", false,
  2238. "Whether to enable dynamically partitioned hash join optimization. \n" +
  2239. "This setting is also dependent on enabling hive.auto.convert.join"),
  2240. HIVECONVERTJOIN("hive.auto.convert.join", true,
  2241. "Whether Hive enables the optimization about converting common join into mapjoin based on the input file size"),
  2242. HIVECONVERTJOINNOCONDITIONALTASK("hive.auto.convert.join.noconditionaltask", true,
  2243. "Whether Hive enables the optimization about converting common join into mapjoin based on the input file size. \n" +
  2244. "If this parameter is on, and the sum of size for n-1 of the tables/partitions for a n-way join is smaller than the\n" +
  2245. "specified size, the join is directly converted to a mapjoin (there is no conditional task)."),
  2246. HIVE_CONVERT_ANTI_JOIN("hive.auto.convert.anti.join", true,
  2247. "Whether Hive enables the optimization about converting join with null filter to anti join"),
  2248. HIVECONVERTJOINNOCONDITIONALTASKTHRESHOLD("hive.auto.convert.join.noconditionaltask.size",
  2249. 10000000L,
  2250. "If hive.auto.convert.join.noconditionaltask is off, this parameter does not take affect. \n" +
  2251. "However, if it is on, and the sum of size for n-1 of the tables/partitions for a n-way join is smaller than this size, \n" +
  2252. "the join is directly converted to a mapjoin(there is no conditional task). The default is 10MB"),
  2253. HIVECONVERTJOINUSENONSTAGED("hive.auto.convert.join.use.nonstaged", false,
  2254. "For conditional joins, if input stream from a small alias can be directly applied to join operator without \n" +
  2255. "filtering or projection, the alias need not to be pre-staged in distributed cache via mapred local task.\n" +
  2256. "Currently, this is not working with vectorization or tez execution engine."),
  2257. HIVESKEWJOINKEY("hive.skewjoin.key", 100000,
  2258. "Determine if we get a skew key in join. If we see more than the specified number of rows with the same key in join operator,\n" +
  2259. "we think the key as a skew join key. "),
  2260. HIVESKEWJOINMAPJOINNUMMAPTASK("hive.skewjoin.mapjoin.map.tasks", 10000,
  2261. "Determine the number of map task used in the follow up map join job for a skew join.\n" +
  2262. "It should be used together with hive.skewjoin.mapjoin.min.split to perform a fine grained control."),
  2263. HIVESKEWJOINMAPJOINMINSPLIT("hive.skewjoin.mapjoin.min.split", 33554432L,
  2264. "Determine the number of map task at most used in the follow up map join job for a skew join by specifying \n" +
  2265. "the minimum split size. It should be used together with hive.skewjoin.mapjoin.map.tasks to perform a fine grained control."),
  2266. HIVESENDHEARTBEAT("hive.heartbeat.interval", 1000,
  2267. "Send a heartbeat after this interval - used by mapjoin and filter operators"),
  2268. HIVELIMITMAXROWSIZE("hive.limit.row.max.size", 100000L,
  2269. "When trying a smaller subset of data for simple LIMIT, how much size we need to guarantee each row to have at least."),
  2270. HIVELIMITOPTLIMITFILE("hive.limit.optimize.limit.file", 10,
  2271. "When trying a smaller subset of data for simple LIMIT, maximum number of files we can sample."),
  2272. HIVELIMITOPTENABLE("hive.limit.optimize.enable", false,
  2273. "Whether to enable to optimization to trying a smaller subset of data for simple LIMIT first."),
  2274. HIVELIMITOPTMAXFETCH("hive.limit.optimize.fetch.max", 50000,
  2275. "Maximum number of rows allowed for a smaller subset of data for simple LIMIT, if it is a fetch query. \n" +
  2276. "Insert queries are not restricted by this limit."),
  2277. HIVELIMITPUSHDOWNMEMORYUSAGE("hive.limit.pushdown.memory.usage", 0.1f, new RatioValidator(),
  2278. "The fraction of available memory to be used for buffering rows in Reducesink operator for limit pushdown optimization."),
  2279. HIVECONVERTJOINMAXENTRIESHASHTABLE("hive.auto.convert.join.hashtable.max.entries", 21000000L,
  2280. "If hive.auto.convert.join.noconditionaltask is off, this parameter does not take affect. \n" +
  2281. "However, if it is on, and the predicted number of entries in hashtable for a given join \n" +
  2282. "input is larger than this number, the join will not be converted to a mapjoin. \n" +
  2283. "The value \"-1\" means no limit."),
  2284. XPRODSMALLTABLEROWSTHRESHOLD("hive.xprod.mapjoin.small.table.rows", 1,"Maximum number of rows on build side"
  2285. + " of map join before it switches over to cross product edge"),
  2286. HIVECONVERTJOINMAXSHUFFLESIZE("hive.auto.convert.join.shuffle.max.size", 10000000000L,
  2287. "If hive.auto.convert.join.noconditionaltask is off, this parameter does not take affect. \n" +
  2288. "However, if it is on, and the predicted size of the larger input for a given join is greater \n" +
  2289. "than this number, the join will not be converted to a dynamically partitioned hash join. \n" +
  2290. "The value \"-1\" means no limit."),
  2291. HIVEHASHTABLEKEYCOUNTADJUSTMENT("hive.hashtable.key.count.adjustment", 0.99f,
  2292. "Adjustment to mapjoin hashtable size derived from table and column statistics; the estimate" +
  2293. " of the number of keys is divided by this value. If the value is 0, statistics are not used" +
  2294. "and hive.hashtable.initialCapacity is used instead."),
  2295. HIVEHASHTABLETHRESHOLD("hive.hashtable.initialCapacity", 100000, "Initial capacity of " +
  2296. "mapjoin hashtable if statistics are absent, or if hive.hashtable.key.count.adjustment is set to 0"),
  2297. HIVEHASHTABLELOADFACTOR("hive.hashtable.loadfactor", (float) 0.75, ""),
  2298. HIVEHASHTABLEFOLLOWBYGBYMAXMEMORYUSAGE("hive.mapjoin.followby.gby.localtask.max.memory.usage", (float) 0.55,
  2299. "This number means how much memory the local task can take to hold the key/value into an in-memory hash table \n" +
  2300. "when this map join is followed by a group by. If the local task's memory usage is more than this number, \n" +
  2301. "the local task will abort by itself. It means the data of the small table is too large " +
  2302. "to be held in memory. Does not apply to Hive-on-Spark (replaced by " +
  2303. "hive.mapjoin.max.gc.time.percentage)"),
  2304. HIVEHASHTABLEMAXMEMORYUSAGE("hive.mapjoin.localtask.max.memory.usage", (float) 0.90,
  2305. "This number means how much memory the local task can take to hold the key/value into an in-memory hash table. \n" +
  2306. "If the local task's memory usage is more than this number, the local task will abort by itself. \n" +
  2307. "It means the data of the small table is too large to be held in memory. Does not apply to " +
  2308. "Hive-on-Spark (replaced by hive.mapjoin.max.gc.time.percentage)"),
  2309. HIVEHASHTABLESCALE("hive.mapjoin.check.memory.rows", (long)100000,
  2310. "The number means after how many rows processed it needs to check the memory usage"),
  2311. HIVEHASHTABLEMAXGCTIMEPERCENTAGE("hive.mapjoin.max.gc.time.percentage", (float) 0.60,
  2312. new RangeValidator(0.0f, 1.0f), "This number means how much time (what percentage, " +
  2313. "0..1, of wallclock time) the JVM is allowed to spend in garbage collection when running " +
  2314. "the local task. If GC time percentage exceeds this number, the local task will abort by " +
  2315. "itself. Applies to Hive-on-Spark only"),
  2316. HIVEINPUTFORMAT("hive.input.format", "org.apache.hadoop.hive.ql.io.CombineHiveInputFormat",
  2317. "The default input format. Set this to HiveInputFormat if you encounter problems with CombineHiveInputFormat."),
  2318. HIVETEZINPUTFORMAT("hive.tez.input.format", "org.apache.hadoop.hive.ql.io.HiveInputFormat",
  2319. "The default input format for tez. Tez groups splits in the AM."),
  2320. HIVETEZCONTAINERSIZE("hive.tez.container.size", -1,
  2321. "By default Tez will spawn containers of the size of a mapper. This can be used to overwrite."),
  2322. HIVETEZCPUVCORES("hive.tez.cpu.vcores", -1,
  2323. "By default Tez will ask for however many cpus map-reduce is configured to use per container.\n" +
  2324. "This can be used to overwrite."),
  2325. HIVETEZJAVAOPTS("hive.tez.java.opts", null,
  2326. "By default Tez will use the Java options from map tasks. This can be used to overwrite."),
  2327. HIVETEZLOGLEVEL("hive.tez.log.level", "INFO",
  2328. "The log level to use for tasks executing as part of the DAG.\n" +
  2329. "Used only if hive.tez.java.opts is used to configure Java options."),
  2330. HIVETEZHS2USERACCESS("hive.tez.hs2.user.access", true,
  2331. "Whether to grant access to the hs2/hive user for queries"),
  2332. HIVEQUERYNAME ("hive.query.name", null,
  2333. "This named is used by Tez to set the dag name. This name in turn will appear on \n" +
  2334. "the Tez UI representing the work that was done. Used by Spark to set the query name, will show up in the\n" +
  2335. "Spark UI."),
  2336. HIVETEZJOBNAME("tez.job.name", "HIVE-%s",
  2337. "This named is used by Tez to set the job name. This name in turn will appear on \n" +
  2338. "the Yarn UI representing the Yarn Application Name. And The job name may be a \n" +
  2339. "Java String.format() string, to which the session ID will be supplied as the single parameter."),
  2340. SYSLOG_INPUT_FORMAT_FILE_PRUNING("hive.syslog.input.format.file.pruning", true,
  2341. "Whether syslog input format should prune files based on timestamp (ts) column in sys.logs table."),
  2342. SYSLOG_INPUT_FORMAT_FILE_TIME_SLICE("hive.syslog.input.format.file.time.slice", "300s",
  2343. new TimeValidator(TimeUnit.SECONDS, 0L, false, Long.MAX_VALUE, false),
  2344. "Files stored in sys.logs typically are chunked with time interval. For example: depending on the\n" +
  2345. "logging library used this represents the flush interval/time slice. \n" +
  2346. "If time slice/flust interval is set to 5 minutes, then the expectation is that the filename \n" +
  2347. "2019-01-02-10-00_0.log represent time range from 10:00 to 10:05.\n" +
  2348. "This time slice should align with the flush interval of the logging library else file pruning may\n" +
  2349. "incorrectly prune files leading to incorrect results from sys.logs table."),
  2350. HIVEOPTIMIZEBUCKETINGSORTING("hive.optimize.bucketingsorting", true,
  2351. "Don't create a reducer for enforcing \n" +
  2352. "bucketing/sorting for queries of the form: \n" +
  2353. "insert overwrite table T2 select * from T1;\n" +
  2354. "where T1 and T2 are bucketed/sorted by the same keys into the same number of buckets."),
  2355. HIVEPARTITIONER("hive.mapred.partitioner", "org.apache.hadoop.hive.ql.io.DefaultHivePartitioner", ""),
  2356. HIVEENFORCESORTMERGEBUCKETMAPJOIN("hive.enforce.sortmergebucketmapjoin", false,
  2357. "If the user asked for sort-merge bucketed map-side join, and it cannot be performed, should the query fail or not ?"),
  2358. HIVEENFORCEBUCKETMAPJOIN("hive.enforce.bucketmapjoin", false,
  2359. "If the user asked for bucketed map-side join, and it cannot be performed, \n" +
  2360. "should the query fail or not ? For example, if the buckets in the tables being joined are\n" +
  2361. "not a multiple of each other, bucketed map-side join cannot be performed, and the\n" +
  2362. "query will fail if hive.enforce.bucketmapjoin is set to true."),
  2363. HIVE_SORT_WHEN_BUCKETING("hive.optimize.clustered.sort", true,
  2364. "When this option is true, when a Hive table was created with a clustered by clause, we will also\n" +
  2365. "sort by same value (if sort columns were not specified)"),
  2366. HIVE_ENFORCE_NOT_NULL_CONSTRAINT("hive.constraint.notnull.enforce", true,
  2367. "Should \"IS NOT NULL \" constraint be enforced?"),
  2368. HIVE_AUTO_SORTMERGE_JOIN("hive.auto.convert.sortmerge.join", true,
  2369. "Will the join be automatically converted to a sort-merge join, if the joined tables pass the criteria for sort-merge join."),
  2370. HIVE_AUTO_SORTMERGE_JOIN_REDUCE("hive.auto.convert.sortmerge.join.reduce.side", true,
  2371. "Whether hive.auto.convert.sortmerge.join (if enabled) should be applied to reduce side."),
  2372. HIVE_AUTO_SORTMERGE_JOIN_BIGTABLE_SELECTOR(
  2373. "hive.auto.convert.sortmerge.join.bigtable.selection.policy",
  2374. "org.apache.hadoop.hive.ql.optimizer.AvgPartitionSizeBasedBigTableSelectorForAutoSMJ",
  2375. "The policy to choose the big table for automatic conversion to sort-merge join. \n" +
  2376. "By default, the table with the largest partitions is assigned the big table. All policies are:\n" +
  2377. ". based on position of the table - the leftmost table is selected\n" +
  2378. "org.apache.hadoop.hive.ql.optimizer.LeftmostBigTableSMJ.\n" +
  2379. ". based on total size (all the partitions selected in the query) of the table \n" +
  2380. "org.apache.hadoop.hive.ql.optimizer.TableSizeBasedBigTableSelectorForAutoSMJ.\n" +
  2381. ". based on average size (all the partitions selected in the query) of the table \n" +
  2382. "org.apache.hadoop.hive.ql.optimizer.AvgPartitionSizeBasedBigTableSelectorForAutoSMJ.\n" +
  2383. "New policies can be added in future."),
  2384. HIVE_AUTO_SORTMERGE_JOIN_TOMAPJOIN(
  2385. "hive.auto.convert.sortmerge.join.to.mapjoin", false,
  2386. "If hive.auto.convert.sortmerge.join is set to true, and a join was converted to a sort-merge join, \n" +
  2387. "this parameter decides whether each table should be tried as a big table, and effectively a map-join should be\n" +
  2388. "tried. That would create a conditional task with n+1 children for a n-way join (1 child for each table as the\n" +
  2389. "big table), and the backup task will be the sort-merge join. In some cases, a map-join would be faster than a\n" +
  2390. "sort-merge join, if there is no advantage of having the output bucketed and sorted. For example, if a very big sorted\n" +
  2391. "and bucketed table with few files (say 10 files) are being joined with a very small sorter and bucketed table\n" +
  2392. "with few files (10 files), the sort-merge join will only use 10 mappers, and a simple map-only join might be faster\n" +
  2393. "if the complete small table can fit in memory, and a map-join can be performed."),
  2394. HIVESCRIPTOPERATORTRUST("hive.exec.script.trust", false, ""),
  2395. HIVEROWOFFSET("hive.exec.rowoffset", false,
  2396. "Whether to provide the row offset virtual column"),
  2397. // Optimizer
  2398. HIVEOPTINDEXFILTER("hive.optimize.index.filter", true, "Whether to enable automatic use of indexes"),
  2399. HIVEOPTPPD("hive.optimize.ppd", true,
  2400. "Whether to enable predicate pushdown"),
  2401. HIVEOPTPPD_WINDOWING("hive.optimize.ppd.windowing", true,
  2402. "Whether to enable predicate pushdown through windowing"),
  2403. HIVEPPDRECOGNIZETRANSITIVITY("hive.ppd.recognizetransivity", true,
  2404. "Whether to transitively replicate predicate filters over equijoin conditions."),
  2405. HIVEPPD_RECOGNIZE_COLUMN_EQUALITIES("hive.ppd.recognize.column.equalities", true,
  2406. "Whether we should traverse the join branches to discover transitive propagation opportunities over" +
  2407. " equijoin conditions. \n" +
  2408. "Requires hive.ppd.recognizetransivity to be set to true."),
  2409. HIVEPPDREMOVEDUPLICATEFILTERS("hive.ppd.remove.duplicatefilters", true,
  2410. "During query optimization, filters may be pushed down in the operator tree. \n" +
  2411. "If this config is true only pushed down filters remain in the operator tree, \n" +
  2412. "and the original filter is removed. If this config is false, the original filter \n" +
  2413. "is also left in the operator tree at the original place."),
  2414. HIVEPOINTLOOKUPOPTIMIZER("hive.optimize.point.lookup", true,
  2415. "Whether to transform OR clauses in Filter operators into IN clauses"),
  2416. HIVEPOINTLOOKUPOPTIMIZERMIN("hive.optimize.point.lookup.min", 2,
  2417. "Minimum number of OR clauses needed to transform into IN clauses"),
  2418. HIVEOPT_TRANSFORM_IN_MAXNODES("hive.optimize.transform.in.maxnodes", 16,
  2419. "Maximum number of IN expressions beyond which IN will not be transformed into OR clause"),
  2420. HIVECOUNTDISTINCTOPTIMIZER("hive.optimize.countdistinct", true,
  2421. "Whether to transform count distinct into two stages"),
  2422. HIVEPARTITIONCOLUMNSEPARATOR("hive.optimize.partition.columns.separate", true,
  2423. "Extract partition columns from IN clauses"),
  2424. // Constant propagation optimizer
  2425. HIVEOPTCONSTANTPROPAGATION("hive.optimize.constant.propagation", true, "Whether to enable constant propagation optimizer"),
  2426. HIVEIDENTITYPROJECTREMOVER("hive.optimize.remove.identity.project", true, "Removes identity project from operator tree"),
  2427. HIVEMETADATAONLYQUERIES("hive.optimize.metadataonly", false,
  2428. "Whether to eliminate scans of the tables from which no columns are selected. Note\n" +
  2429. "that, when selecting from empty tables with data files, this can produce incorrect\n" +
  2430. "results, so it's disabled by default. It works correctly for normal tables."),
  2431. HIVENULLSCANOPTIMIZE("hive.optimize.null.scan", true, "Dont scan relations which are guaranteed to not generate any rows"),
  2432. HIVEOPTPPD_STORAGE("hive.optimize.ppd.storage", true,
  2433. "Whether to push predicates down to storage handlers"),
  2434. HIVEOPTGROUPBY("hive.optimize.groupby", true,
  2435. "Whether to enable the bucketed group by from bucketed partitions/tables."),
  2436. HIVEOPTBUCKETMAPJOIN("hive.optimize.bucketmapjoin", false,
  2437. "Whether to try bucket mapjoin"),
  2438. HIVEOPTSORTMERGEBUCKETMAPJOIN("hive.optimize.bucketmapjoin.sortedmerge", false,
  2439. "Whether to try sorted bucket merge map join"),
  2440. HIVEOPTREDUCEDEDUPLICATION("hive.optimize.reducededuplication", true,
  2441. "Remove extra map-reduce jobs if the data is already clustered by the same key which needs to be used again. \n" +
  2442. "This should always be set to true. Since it is a new feature, it has been made configurable."),
  2443. HIVEOPTREDUCEDEDUPLICATIONMINREDUCER("hive.optimize.reducededuplication.min.reducer", 4,
  2444. "Reduce deduplication merges two RSs by moving key/parts/reducer-num of the child RS to parent RS. \n" +
  2445. "That means if reducer-num of the child RS is fixed (order by or forced bucketing) and small, it can make very slow, single MR.\n" +
  2446. "The optimization will be automatically disabled if number of reducers would be less than specified value."),
  2447. HIVEOPTJOINREDUCEDEDUPLICATION("hive.optimize.joinreducededuplication", true,
  2448. "Remove extra shuffle/sorting operations after join algorithm selection has been executed. \n" +
  2449. "Currently it only works with Apache Tez. This should always be set to true. \n" +
  2450. "Since it is a new feature, it has been made configurable."),
  2451. HIVEOPTSORTDYNAMICPARTITIONTHRESHOLD("hive.optimize.sort.dynamic.partition.threshold", 0,
  2452. "When enabled dynamic partitioning column will be globally sorted.\n" +
  2453. "This way we can keep only one record writer open for each partition value\n" +
  2454. "in the reducer thereby reducing the memory pressure on reducers.\n" +
  2455. "This config has following possible values: \n" +
  2456. "\t-1 - This completely disables the optimization. \n" +
  2457. "\t1 - This always enable the optimization. \n" +
  2458. "\t0 - This makes the optimization a cost based decision. \n" +
  2459. "Setting it to any other positive integer will make Hive use this as threshold for number of writers."),
  2460. HIVESAMPLINGFORORDERBY("hive.optimize.sampling.orderby", false, "Uses sampling on order-by clause for parallel execution."),
  2461. HIVESAMPLINGNUMBERFORORDERBY("hive.optimize.sampling.orderby.number", 1000, "Total number of samples to be obtained."),
  2462. HIVESAMPLINGPERCENTFORORDERBY("hive.optimize.sampling.orderby.percent", 0.1f, new RatioValidator(),
  2463. "Probability with which a row will be chosen."),
  2464. HIVE_REMOVE_ORDERBY_IN_SUBQUERY("hive.remove.orderby.in.subquery", true,
  2465. "If set to true, order/sort by without limit in sub queries will be removed."),
  2466. HIVEOPTIMIZEDISTINCTREWRITE("hive.optimize.distinct.rewrite", true, "When applicable this "
  2467. + "optimization rewrites distinct aggregates from a single stage to multi-stage "
  2468. + "aggregation. This may not be optimal in all cases. Ideally, whether to trigger it or "
  2469. + "not should be cost based decision. Until Hive formalizes cost model for this, this is config driven."),
  2470. // whether to optimize union followed by select followed by filesink
  2471. // It creates sub-directories in the final output, so should not be turned on in systems
  2472. // where MAPREDUCE-1501 is not present
  2473. HIVE_OPTIMIZE_UNION_REMOVE("hive.optimize.union.remove", false,
  2474. "Whether to remove the union and push the operators between union and the filesink above union. \n" +
  2475. "This avoids an extra scan of the output by union. This is independently useful for union\n" +
  2476. "queries, and specially useful when hive.optimize.skewjoin.compiletime is set to true, since an\n" +
  2477. "extra union is inserted.\n" +
  2478. "\n" +
  2479. "The merge is triggered if either of hive.merge.mapfiles or hive.merge.mapredfiles is set to true.\n" +
  2480. "If the user has set hive.merge.mapfiles to true and hive.merge.mapredfiles to false, the idea was the\n" +
  2481. "number of reducers are few, so the number of files anyway are small. However, with this optimization,\n" +
  2482. "we are increasing the number of files possibly by a big margin. So, we merge aggressively."),
  2483. HIVEOPTCORRELATION("hive.optimize.correlation", false, "exploit intra-query correlations."),
  2484. HIVE_OPTIMIZE_LIMIT_TRANSPOSE("hive.optimize.limittranspose", false,
  2485. "Whether to push a limit through left/right outer join or union. If the value is true and the size of the outer\n" +
  2486. "input is reduced enough (as specified in hive.optimize.limittranspose.reduction), the limit is pushed\n" +
  2487. "to the outer input or union; to remain semantically correct, the limit is kept on top of the join or the union too."),
  2488. HIVE_OPTIMIZE_LIMIT_TRANSPOSE_REDUCTION_PERCENTAGE("hive.optimize.limittranspose.reductionpercentage", 1.0f,
  2489. "When hive.optimize.limittranspose is true, this variable specifies the minimal reduction of the\n" +
  2490. "size of the outer input of the join or input of the union that we should get in order to apply the rule."),
  2491. HIVE_OPTIMIZE_LIMIT_TRANSPOSE_REDUCTION_TUPLES("hive.optimize.limittranspose.reductiontuples", (long) 0,
  2492. "When hive.optimize.limittranspose is true, this variable specifies the minimal reduction in the\n" +
  2493. "number of tuples of the outer input of the join or the input of the union that you should get in order to apply the rule."),
  2494. HIVE_OPTIMIZE_CONSTRAINTS_JOIN("hive.optimize.constraints.join", true, "Whether to use referential constraints\n" +
  2495. "to optimize (remove or transform) join operators"),
  2496. HIVE_OPTIMIZE_SORT_PREDS_WITH_STATS("hive.optimize.filter.preds.sort", true, "Whether to sort conditions in filters\n" +
  2497. "based on estimated selectivity and compute cost"),
  2498. HIVE_OPTIMIZE_REDUCE_WITH_STATS("hive.optimize.filter.stats.reduction", false, "Whether to simplify comparison\n" +
  2499. "expressions in filter operators using column stats"),
  2500. HIVE_OPTIMIZE_SKEWJOIN_COMPILETIME("hive.optimize.skewjoin.compiletime", false,
  2501. "Whether to create a separate plan for skewed keys for the tables in the join.\n" +
  2502. "This is based on the skewed keys stored in the metadata. At compile time, the plan is broken\n" +
  2503. "into different joins: one for the skewed keys, and the other for the remaining keys. And then,\n" +
  2504. "a union is performed for the 2 joins generated above. So unless the same skewed key is present\n" +
  2505. "in both the joined tables, the join for the skewed key will be performed as a map-side join.\n" +
  2506. "\n" +
  2507. "The main difference between this parameter and hive.optimize.skewjoin is that this parameter\n" +
  2508. "uses the skew information stored in the metastore to optimize the plan at compile time itself.\n" +
  2509. "If there is no skew information in the metadata, this parameter will not have any affect.\n" +
  2510. "Both hive.optimize.skewjoin.compiletime and hive.optimize.skewjoin should be set to true.\n" +
  2511. "Ideally, hive.optimize.skewjoin should be renamed as hive.optimize.skewjoin.runtime, but not doing\n" +
  2512. "so for backward compatibility.\n" +
  2513. "\n" +
  2514. "If the skew information is correctly stored in the metadata, hive.optimize.skewjoin.compiletime\n" +
  2515. "would change the query plan to take care of it, and hive.optimize.skewjoin will be a no-op."),
  2516. HIVE_OPTIMIZE_LIMIT("hive.optimize.limit", true,
  2517. "Optimize limit by pushing through Left Outer Joins and Selects"),
  2518. HIVE_OPTIMIZE_TOPNKEY("hive.optimize.topnkey", true, "Whether to enable top n key optimizer."),
  2519. HIVE_MAX_TOPN_ALLOWED("hive.optimize.topnkey.max", 128, "Maximum topN value allowed by top n key optimizer.\n" +
  2520. "If the LIMIT is greater than this value then top n key optimization won't be used."),
  2521. HIVE_TOPN_EFFICIENCY_THRESHOLD("hive.optimize.topnkey.efficiency.threshold", 0.8f, "Disable topN key filter if the ratio between forwarded and total rows reaches this limit."),
  2522. HIVE_TOPN_EFFICIENCY_CHECK_BATCHES("hive.optimize.topnkey.efficiency.check.nbatches", 10000, "Check topN key filter efficiency after a specific number of batches."),
  2523. HIVE_TOPN_MAX_NUMBER_OF_PARTITIONS("hive.optimize.topnkey.partitions.max", 64, "Limit the maximum number of partitions used by the top N key operator."),
  2524. HIVE_SHARED_WORK_OPTIMIZATION("hive.optimize.shared.work", true,
  2525. "Whether to enable shared work optimizer. The optimizer finds scan operator over the same table\n" +
  2526. "and follow-up operators in the query plan and merges them if they meet some preconditions. Tez only."),
  2527. HIVE_SHARED_WORK_EXTENDED_OPTIMIZATION("hive.optimize.shared.work.extended", true,
  2528. "Whether to enable shared work extended optimizer. The optimizer tries to merge equal operators\n" +
  2529. "after a work boundary after shared work optimizer has been executed. Requires hive.optimize.shared.work\n" +
  2530. "to be set to true. Tez only."),
  2531. HIVE_SHARED_WORK_SEMIJOIN_OPTIMIZATION("hive.optimize.shared.work.semijoin", false,
  2532. "Whether to enable shared work extended optimizer for semijoins. The optimizer tries to merge\n" +
  2533. "scan operators if one of them reads the full table, even if the other one is the target for\n" +
  2534. "one or more semijoin edges. Tez only."),
  2535. HIVE_SHARED_WORK_MERGE_TS_SCHEMA("hive.optimize.shared.work.merge.ts.schema", true,
  2536. "Whether to enable merging scan operators over the same table but with different schema." +
  2537. "The optimizer tries to merge the scan operators by taking the union of needed columns from " +
  2538. "all scan operators. Requires hive.optimize.shared.work to be set to true. Tez only."),
  2539. HIVE_SHARED_WORK_REUSE_MAPJOIN_CACHE("hive.optimize.shared.work.mapjoin.cache.reuse", true,
  2540. "When shared work optimizer is enabled, whether we should reuse the cache for the broadcast side\n" +
  2541. "of mapjoin operators that share same broadcast input. Requires hive.optimize.shared.work\n" +
  2542. "to be set to true. Tez only."),
  2543. HIVE_SHARED_WORK_DPPUNION_OPTIMIZATION("hive.optimize.shared.work.dppunion", true,
  2544. "Enables dppops unioning. This optimization will enable to merge multiple tablescans with different "
  2545. + "dynamic filters into a single one (with a more complex filter)"),
  2546. HIVE_SHARED_WORK_DPPUNION_MERGE_EVENTOPS("hive.optimize.shared.work.dppunion.merge.eventops", true,
  2547. "Enables DPPUnion to merge EventOperators (right now this is used during DynamicPartitionPruning)"),
  2548. HIVE_SHARED_WORK_DOWNSTREAM_MERGE("hive.optimize.shared.work.downstream.merge", true,
  2549. "Analyzes and merges equiv downstream operators after a successful shared work optimization step."),
  2550. HIVE_SHARED_WORK_PARALLEL_EDGE_SUPPORT("hive.optimize.shared.work.parallel.edge.support", true,
  2551. "Lets the shared work optimizer to create parallel edges in case they are for semijoins or mapjoins."),
  2552. HIVE_COMBINE_EQUIVALENT_WORK_OPTIMIZATION("hive.combine.equivalent.work.optimization", true, "Whether to " +
  2553. "combine equivalent work objects during physical optimization.\n This optimization looks for equivalent " +
  2554. "work objects and combines them if they meet certain preconditions. Spark only."),
  2555. HIVE_REMOVE_SQ_COUNT_CHECK("hive.optimize.remove.sq_count_check", true,
  2556. "Whether to remove an extra join with sq_count_check for scalar subqueries "
  2557. + "with constant group by keys."),
  2558. HIVE_OPTIMIZE_TABLE_PROPERTIES_FROM_SERDE("hive.optimize.update.table.properties.from.serde", false,
  2559. "Whether to update table-properties by initializing tables' SerDe instances during logical-optimization. \n" +
  2560. "By doing so, certain SerDe classes (like AvroSerDe) can pre-calculate table-specific information, and \n" +
  2561. "store it in table-properties, to be used later in the SerDe, while running the job."),
  2562. HIVE_OPTIMIZE_TABLE_PROPERTIES_FROM_SERDE_LIST("hive.optimize.update.table.properties.from.serde.list",
  2563. "org.apache.hadoop.hive.serde2.avro.AvroSerDe",
  2564. "The comma-separated list of SerDe classes that are considered when enhancing table-properties \n" +
  2565. "during logical optimization."),
  2566. HIVE_OPTIMIZE_SCAN_PROBEDECODE("hive.optimize.scan.probedecode", true,
  2567. "Whether to find suitable table scan operators that could reduce the number of decoded rows at runtime by probing extra available information. \n"
  2568. + "The probe side for the row-level filtering is generated either statically in the case of expressions or dynamically for joins"
  2569. + "e.g., use the cached MapJoin hashtable created on the small table side to filter out row columns that are not going "
  2570. + "to be used when reading the large table data. This will result less CPU cycles spent for decoding unused data."),
  2571. HIVE_OPTIMIZE_HMS_QUERY_CACHE_ENABLED("hive.optimize.metadata.query.cache.enabled", true,
  2572. "This property enables caching metadata for repetitive requests on a per-query basis"),
  2573. HIVE_OPTIMIZE_VIEW_CACHE_ENABLED("hive.optimize.view.tables.cache.enabled", true,
  2574. "This property enables caching of views and their underlying tables. The cache in memory may be stale, but "
  2575. + " provides an optimization if it is accurate."),
  2576. // CTE
  2577. HIVE_CTE_MATERIALIZE_THRESHOLD("hive.optimize.cte.materialize.threshold", 3,
  2578. "If the number of references to a CTE clause exceeds this threshold, Hive will materialize it\n" +
  2579. "before executing the main query block. -1 will disable this feature."),
  2580. HIVE_CTE_MATERIALIZE_FULL_AGGREGATE_ONLY("hive.optimize.cte.materialize.full.aggregate.only", true,
  2581. "If enabled only CTEs with aggregate output will be pre-materialized. All CTEs otherwise." +
  2582. "Also the number of references to a CTE clause must exceeds the value of " +
  2583. "hive.optimize.cte.materialize.threshold"),
  2584. HIVE_OPTIMIZE_BI_ENABLED("hive.optimize.bi.enabled", false,
  2585. "Enables query rewrites based on approximate functions(sketches)."),
  2586. HIVE_OPTIMIZE_BI_REWRITE_COUNTDISTINCT_ENABLED("hive.optimize.bi.rewrite.countdistinct.enabled",
  2587. true,
  2588. "Enables to rewrite COUNT(DISTINCT(X)) queries to be rewritten to use sketch functions."),
  2589. HIVE_OPTIMIZE_BI_REWRITE_COUNT_DISTINCT_SKETCH("hive.optimize.bi.rewrite.countdistinct.sketch", "hll",
  2590. new StringSet("hll"),
  2591. "Defines which sketch type to use when rewriting COUNT(DISTINCT(X)) expressions. "
  2592. + "Distinct counting can be done with: hll"),
  2593. HIVE_OPTIMIZE_BI_REWRITE_PERCENTILE_DISC_ENABLED("hive.optimize.bi.rewrite.percentile_disc.enabled",
  2594. true,
  2595. "Enables to rewrite PERCENTILE_DISC(X) queries to be rewritten to use sketch functions."),
  2596. HIVE_OPTIMIZE_BI_REWRITE_PERCENTILE_DISC_SKETCH("hive.optimize.bi.rewrite.percentile_disc.sketch", "kll",
  2597. new StringSet("kll"),
  2598. "Defines which sketch type to use when rewriting PERCENTILE_DISC expressions. Options: kll"),
  2599. HIVE_OPTIMIZE_BI_REWRITE_CUME_DIST_ENABLED("hive.optimize.bi.rewrite.cume_dist.enabled",
  2600. true,
  2601. "Enables to rewrite CUME_DIST(X) queries to be rewritten to use sketch functions."),
  2602. HIVE_OPTIMIZE_BI_REWRITE_CUME_DIST_SKETCH("hive.optimize.bi.rewrite.cume_dist.sketch", "kll",
  2603. new StringSet("kll"),
  2604. "Defines which sketch type to use when rewriting CUME_DIST expressions. Options: kll"),
  2605. HIVE_OPTIMIZE_BI_REWRITE_NTILE_ENABLED("hive.optimize.bi.rewrite.ntile.enabled",
  2606. true,
  2607. "Enables to rewrite NTILE(X) queries to be rewritten as sketch functions."),
  2608. HIVE_OPTIMIZE_BI_REWRITE_NTILE_SKETCH("hive.optimize.bi.rewrite.ntile.sketch", "kll",
  2609. new StringSet("kll"),
  2610. "Defines which sketch type to use when rewriting NTILE expressions. Options: kll"),
  2611. HIVE_OPTIMIZE_BI_REWRITE_RANK_ENABLED("hive.optimize.bi.rewrite.rank.enabled",
  2612. true,
  2613. "Enables to rewrite RANK() queries to be rewritten to use sketch functions."),
  2614. HIVE_OPTIMIZE_BI_REWRITE_RANK_SKETCH("hive.optimize.bi.rewrite.rank.sketch", "kll",
  2615. new StringSet("kll"),
  2616. "Defines which sketch type to use when rewriting RANK expressions. Options: kll"),
  2617. // Statistics
  2618. HIVE_STATS_ESTIMATE_STATS("hive.stats.estimate", true,
  2619. "Estimate statistics in absence of statistics."),
  2620. HIVE_STATS_NDV_ESTIMATE_PERC("hive.stats.ndv.estimate.percent", (float)20,
  2621. "This many percentage of rows will be estimated as count distinct in absence of statistics."),
  2622. HIVE_STATS_JOIN_NDV_READJUSTMENT("hive.stats.join.ndv.readjustment", false,
  2623. "Set this to true to use approximation based logic to adjust ndv after join."),
  2624. HIVE_STATS_NUM_NULLS_ESTIMATE_PERC("hive.stats.num.nulls.estimate.percent", (float)5,
  2625. "This many percentage of rows will be estimated as number of nulls in absence of statistics."),
  2626. HIVESTATSAUTOGATHER("hive.stats.autogather", true,
  2627. "A flag to gather statistics (only basic) automatically during the INSERT OVERWRITE command."),
  2628. HIVESTATSCOLAUTOGATHER("hive.stats.column.autogather", true,
  2629. "A flag to gather column statistics automatically."),
  2630. HIVESTATSDBCLASS("hive.stats.dbclass", "fs", new PatternSet("custom", "fs"),
  2631. "The storage that stores temporary Hive statistics. In filesystem based statistics collection ('fs'), \n" +
  2632. "each task writes statistics it has collected in a file on the filesystem, which will be aggregated \n" +
  2633. "after the job has finished. Supported values are fs (filesystem) and custom as defined in StatsSetupConst.java."), // StatsSetupConst.StatDB
  2634. /**
  2635. * @deprecated Use MetastoreConf.STATS_DEFAULT_PUBLISHER
  2636. */
  2637. @Deprecated
  2638. HIVE_STATS_DEFAULT_PUBLISHER("hive.stats.default.publisher", "",
  2639. "The Java class (implementing the StatsPublisher interface) that is used by default if hive.stats.dbclass is custom type."),
  2640. /**
  2641. * @deprecated Use MetastoreConf.STATS_DEFAULT_AGGRETATOR
  2642. */
  2643. @Deprecated
  2644. HIVE_STATS_DEFAULT_AGGREGATOR("hive.stats.default.aggregator", "",
  2645. "The Java class (implementing the StatsAggregator interface) that is used by default if hive.stats.dbclass is custom type."),
  2646. CLIENT_STATS_COUNTERS("hive.client.stats.counters", "",
  2647. "Subset of counters that should be of interest for hive.client.stats.publishers (when one wants to limit their publishing). \n" +
  2648. "Non-display names should be used"),
  2649. //Subset of counters that should be of interest for hive.client.stats.publishers (when one wants to limit their publishing). Non-display names should be used".
  2650. HIVE_STATS_RELIABLE("hive.stats.reliable", false,
  2651. "Whether queries will fail because stats cannot be collected completely accurately. \n" +
  2652. "If this is set to true, reading/writing from/into a partition may fail because the stats\n" +
  2653. "could not be computed accurately."),
  2654. HIVE_STATS_COLLECT_PART_LEVEL_STATS("hive.analyze.stmt.collect.partlevel.stats", true,
  2655. "analyze table T compute statistics for columns. Queries like these should compute partition"
  2656. + "level stats for partitioned table even when no part spec is specified."),
  2657. HIVE_STATS_GATHER_NUM_THREADS("hive.stats.gather.num.threads", 10,
  2658. "Number of threads used by noscan analyze command for partitioned tables.\n" +
  2659. "This is applicable only for file formats that implement StatsProvidingRecordReader (like ORC)."),
  2660. // Collect table access keys information for operators that can benefit from bucketing
  2661. HIVE_STATS_COLLECT_TABLEKEYS("hive.stats.collect.tablekeys", false,
  2662. "Whether join and group by keys on tables are derived and maintained in the QueryPlan.\n" +
  2663. "This is useful to identify how tables are accessed and to determine if they should be bucketed."),
  2664. // Collect column access information
  2665. HIVE_STATS_COLLECT_SCANCOLS("hive.stats.collect.scancols", false,
  2666. "Whether column accesses are tracked in the QueryPlan.\n" +
  2667. "This is useful to identify how tables are accessed and to determine if there are wasted columns that can be trimmed."),
  2668. HIVE_STATS_NDV_ALGO("hive.stats.ndv.algo", "hll", new PatternSet("hll", "fm"),
  2669. "hll and fm stand for HyperLogLog and FM-sketch, respectively for computing ndv."),
  2670. /**
  2671. * @deprecated Use MetastoreConf.STATS_FETCH_BITVECTOR
  2672. */
  2673. @Deprecated
  2674. HIVE_STATS_FETCH_BITVECTOR("hive.stats.fetch.bitvector", false,
  2675. "Whether we fetch bitvector when we compute ndv. Users can turn it off if they want to use old schema"),
  2676. // standard error allowed for ndv estimates for FM-sketch. A lower value indicates higher accuracy and a
  2677. // higher compute cost.
  2678. HIVE_STATS_NDV_ERROR("hive.stats.ndv.error", (float)20.0,
  2679. "The standard error allowed for NDV estimates, expressed in percentage. This provides a tradeoff \n" +
  2680. "between accuracy and compute cost. A lower value for the error indicates higher accuracy and a \n" +
  2681. "higher compute cost. (NDV means the number of distinct values.). It only affects the FM-Sketch \n" +
  2682. "(not the HLL algorithm which is the default), where it computes the number of necessary\n" +
  2683. " bitvectors to achieve the accuracy."),
  2684. HIVE_STATS_ESTIMATORS_ENABLE("hive.stats.estimators.enable", true,
  2685. "Estimators are able to provide more accurate column statistic infos for UDF results."),
  2686. /**
  2687. * @deprecated Use MetastoreConf.STATS_NDV_TUNER
  2688. */
  2689. @Deprecated
  2690. HIVE_METASTORE_STATS_NDV_TUNER("hive.metastore.stats.ndv.tuner", (float)0.0,
  2691. "Provides a tunable parameter between the lower bound and the higher bound of ndv for aggregate ndv across all the partitions. \n" +
  2692. "The lower bound is equal to the maximum of ndv of all the partitions. The higher bound is equal to the sum of ndv of all the partitions.\n" +
  2693. "Its value should be between 0.0 (i.e., choose lower bound) and 1.0 (i.e., choose higher bound)"),
  2694. /**
  2695. * @deprecated Use MetastoreConf.STATS_NDV_DENSITY_FUNCTION
  2696. */
  2697. @Deprecated
  2698. HIVE_METASTORE_STATS_NDV_DENSITY_FUNCTION("hive.metastore.stats.ndv.densityfunction", false,
  2699. "Whether to use density function to estimate the NDV for the whole table based on the NDV of partitions"),
  2700. HIVE_STATS_KEY_PREFIX("hive.stats.key.prefix", "", "", true), // internal usage only
  2701. // if length of variable length data type cannot be determined this length will be used.
  2702. HIVE_STATS_MAX_VARIABLE_LENGTH("hive.stats.max.variable.length", 100,
  2703. "To estimate the size of data flowing through operators in Hive/Tez(for reducer estimation etc.),\n" +
  2704. "average row size is multiplied with the total number of rows coming out of each operator.\n" +
  2705. "Average row size is computed from average column size of all columns in the row. In the absence\n" +
  2706. "of column statistics, for variable length columns (like string, bytes etc.), this value will be\n" +
  2707. "used. For fixed length columns their corresponding Java equivalent sizes are used\n" +
  2708. "(float - 4 bytes, double - 8 bytes etc.)."),
  2709. // if number of elements in list cannot be determined, this value will be used
  2710. HIVE_STATS_LIST_NUM_ENTRIES("hive.stats.list.num.entries", 10,
  2711. "To estimate the size of data flowing through operators in Hive/Tez(for reducer estimation etc.),\n" +
  2712. "average row size is multiplied with the total number of rows coming out of each operator.\n" +
  2713. "Average row size is computed from average column size of all columns in the row. In the absence\n" +
  2714. "of column statistics and for variable length complex columns like list, the average number of\n" +
  2715. "entries/values can be specified using this config."),
  2716. // if number of elements in map cannot be determined, this value will be used
  2717. HIVE_STATS_MAP_NUM_ENTRIES("hive.stats.map.num.entries", 10,
  2718. "To estimate the size of data flowing through operators in Hive/Tez(for reducer estimation etc.),\n" +
  2719. "average row size is multiplied with the total number of rows coming out of each operator.\n" +
  2720. "Average row size is computed from average column size of all columns in the row. In the absence\n" +
  2721. "of column statistics and for variable length complex columns like map, the average number of\n" +
  2722. "entries/values can be specified using this config."),
  2723. // statistics annotation fetches column statistics for all required columns which can
  2724. // be very expensive sometimes
  2725. HIVE_STATS_FETCH_COLUMN_STATS("hive.stats.fetch.column.stats", true,
  2726. "Annotation of operator tree with statistics information requires column statistics.\n" +
  2727. "Column statistics are fetched from metastore. Fetching column statistics for each needed column\n" +
  2728. "can be expensive when the number of columns is high. This flag can be used to disable fetching\n" +
  2729. "of column statistics from metastore."),
  2730. // in the absence of column statistics, the estimated number of rows/data size that will
  2731. // be emitted from join operator will depend on this factor
  2732. HIVE_STATS_JOIN_FACTOR("hive.stats.join.factor", (float) 1.1,
  2733. "Hive/Tez optimizer estimates the data size flowing through each of the operators. JOIN operator\n" +
  2734. "uses column statistics to estimate the number of rows flowing out of it and hence the data size.\n" +
  2735. "In the absence of column statistics, this factor determines the amount of rows that flows out\n" +
  2736. "of JOIN operator."),
  2737. HIVE_STATS_CORRELATED_MULTI_KEY_JOINS("hive.stats.correlated.multi.key.joins", true,
  2738. "When estimating output rows for a join involving multiple columns, the default behavior assumes" +
  2739. "the columns are independent. Setting this flag to true will cause the estimator to assume" +
  2740. "the columns are correlated."),
  2741. HIVE_STATS_RANGE_SELECTIVITY_UNIFORM_DISTRIBUTION("hive.stats.filter.range.uniform", true,
  2742. "When estimating output rows from a condition, if a range predicate is applied over a column and the\n" +
  2743. "minimum and maximum values for that column are available, assume uniform distribution of values\n" +
  2744. "across that range and scales number of rows proportionally. If this is set to false, default\n" +
  2745. "selectivity value is used."),
  2746. // in the absence of uncompressed/raw data size, total file size will be used for statistics
  2747. // annotation. But the file may be compressed, encoded and serialized which may be lesser in size
  2748. // than the actual uncompressed/raw data size. This factor will be multiplied to file size to estimate
  2749. // the raw data size.
  2750. HIVE_STATS_DESERIALIZATION_FACTOR("hive.stats.deserialization.factor", (float) 10.0,
  2751. "Hive/Tez optimizer estimates the data size flowing through each of the operators. In the absence\n" +
  2752. "of basic statistics like number of rows and data size, file size is used to estimate the number\n" +
  2753. "of rows and data size. Since files in tables/partitions are serialized (and optionally\n" +
  2754. "compressed) the estimates of number of rows and data size cannot be reliably determined.\n" +
  2755. "This factor is multiplied with the file size to account for serialization and compression."),
  2756. HIVE_STATS_IN_CLAUSE_FACTOR("hive.stats.filter.in.factor", (float) 1.0,
  2757. "Currently column distribution is assumed to be uniform. This can lead to overestimation/underestimation\n" +
  2758. "in the number of rows filtered by a certain operator, which in turn might lead to overprovision or\n" +
  2759. "underprovision of resources. This factor is applied to the cardinality estimation of IN clauses in\n" +
  2760. "filter operators."),
  2761. HIVE_STATS_IN_MIN_RATIO("hive.stats.filter.in.min.ratio", 0.0f,
  2762. "Output estimation of an IN filter can't be lower than this ratio"),
  2763. HIVE_STATS_UDTF_FACTOR("hive.stats.udtf.factor", (float) 1.0,
  2764. "UDTFs change the number of rows of the output. A common UDTF is the explode() method that creates\n" +
  2765. "multiple rows for each element in the input array. This factor is applied to the number of\n" +
  2766. "output rows and output size."),
  2767. HIVE_STATS_USE_BITVECTORS("hive.stats.use.bitvectors", false,
  2768. "Enables to use bitvectors for estimating selectivity."),
  2769. HIVE_STATS_MAX_NUM_STATS("hive.stats.max.num.stats", (long) 10000,
  2770. "When the number of stats to be updated is huge, this value is used to control the number of \n" +
  2771. " stats to be sent to HMS for update."),
  2772. // Concurrency
  2773. HIVE_SUPPORT_CONCURRENCY("hive.support.concurrency", false,
  2774. "Whether Hive supports concurrency control or not. \n" +
  2775. "A ZooKeeper instance must be up and running when using zookeeper Hive lock manager "),
  2776. HIVE_LOCK_MANAGER("hive.lock.manager", "org.apache.hadoop.hive.ql.lockmgr.zookeeper.ZooKeeperHiveLockManager", ""),
  2777. HIVE_LOCK_NUMRETRIES("hive.lock.numretries", 100,
  2778. "The number of times you want to try to get all the locks"),
  2779. HIVE_UNLOCK_NUMRETRIES("hive.unlock.numretries", 10,
  2780. "The number of times you want to retry to do one unlock"),
  2781. HIVE_LOCK_SLEEP_BETWEEN_RETRIES("hive.lock.sleep.between.retries", "60s",
  2782. new TimeValidator(TimeUnit.SECONDS, 0L, false, Long.MAX_VALUE, false),
  2783. "The maximum sleep time between various retries"),
  2784. HIVE_LOCK_MAPRED_ONLY("hive.lock.mapred.only.operation", false,
  2785. "This param is to control whether or not only do lock on queries\n" +
  2786. "that need to execute at least one mapred job."),
  2787. HIVE_LOCK_QUERY_STRING_MAX_LENGTH("hive.lock.query.string.max.length", 1000000,
  2788. "The maximum length of the query string to store in the lock.\n" +
  2789. "The default value is 1000000, since the data limit of a znode is 1MB"),
  2790. HIVE_MM_ALLOW_ORIGINALS("hive.mm.allow.originals", false,
  2791. "Whether to allow original files in MM tables. Conversion to MM may be expensive if\n" +
  2792. "this is set to false, however unless MAPREDUCE-7086 fix is present (hadoop 3.1.1+),\n" +
  2793. "queries that read non-orc MM tables with original files will fail. The default in\n" +
  2794. "Hive 3.0 is false."),
  2795. HIVE_LOCK_FILE_MOVE_MODE("hive.lock.file.move.protect", "all", new StringSet("none", "dp", "all"),
  2796. "During file move operations acqueires a SEMI_SHARED lock at the table level."
  2797. + "none:never; dp: only in case of dynamic partitioning operations; all: all table operations"),
  2798. // Zookeeper related configs
  2799. HIVE_ZOOKEEPER_USE_KERBEROS("hive.zookeeper.kerberos.enabled", true,
  2800. "If ZooKeeper is configured for Kerberos authentication. This could be useful when cluster\n" +
  2801. "is kerberized, but Zookeeper is not."),
  2802. HIVE_ZOOKEEPER_QUORUM("hive.zookeeper.quorum", "",
  2803. "List of ZooKeeper servers to talk to. This is needed for: \n" +
  2804. "1. Read/write locks - when hive.lock.manager is set to \n" +
  2805. "org.apache.hadoop.hive.ql.lockmgr.zookeeper.ZooKeeperHiveLockManager, \n" +
  2806. "2. When HiveServer2 supports service discovery via Zookeeper.\n" +
  2807. "3. For delegation token storage if zookeeper store is used, if\n" +
  2808. "hive.cluster.delegation.token.store.zookeeper.connectString is not set\n" +
  2809. "4. LLAP daemon registry service\n" +
  2810. "5. Leader selection for privilege synchronizer"),
  2811. HIVE_ZOOKEEPER_CLIENT_PORT("hive.zookeeper.client.port", "2181",
  2812. "The port of ZooKeeper servers to talk to.\n" +
  2813. "If the list of Zookeeper servers specified in hive.zookeeper.quorum\n" +
  2814. "does not contain port numbers, this value is used."),
  2815. HIVE_ZOOKEEPER_SESSION_TIMEOUT("hive.zookeeper.session.timeout", "120000ms",
  2816. new TimeValidator(TimeUnit.MILLISECONDS),
  2817. "ZooKeeper client's session timeout (in milliseconds). The client is disconnected, and as a result, all locks released, \n" +
  2818. "if a heartbeat is not sent in the timeout."),
  2819. HIVE_ZOOKEEPER_CONNECTION_TIMEOUT("hive.zookeeper.connection.timeout", "15s",
  2820. new TimeValidator(TimeUnit.SECONDS),
  2821. "ZooKeeper client's connection timeout in seconds. Connection timeout * hive.zookeeper.connection.max.retries\n" +
  2822. "with exponential backoff is when curator client deems connection is lost to zookeeper."),
  2823. HIVE_ZOOKEEPER_NAMESPACE("hive.zookeeper.namespace", "hive_zookeeper_namespace",
  2824. "The parent node under which all ZooKeeper nodes are created."),
  2825. HIVE_ZOOKEEPER_CLEAN_EXTRA_NODES("hive.zookeeper.clean.extra.nodes", false,
  2826. "Clean extra nodes at the end of the session."),
  2827. HIVE_ZOOKEEPER_CONNECTION_MAX_RETRIES("hive.zookeeper.connection.max.retries", 3,
  2828. "Max number of times to retry when connecting to the ZooKeeper server."),
  2829. HIVE_ZOOKEEPER_CONNECTION_BASESLEEPTIME("hive.zookeeper.connection.basesleeptime", "1000ms",
  2830. new TimeValidator(TimeUnit.MILLISECONDS),
  2831. "Initial amount of time (in milliseconds) to wait between retries\n" +
  2832. "when connecting to the ZooKeeper server when using ExponentialBackoffRetry policy."),
  2833. HIVE_ZOOKEEPER_SSL_ENABLE("hive.zookeeper.ssl.client.enable", false,
  2834. "Set client to use TLS when connecting to ZooKeeper. An explicit value overrides any value set via the " +
  2835. "zookeeper.client.secure system property (note the different name). Defaults to false if neither is set."),
  2836. HIVE_ZOOKEEPER_SSL_KEYSTORE_LOCATION("hive.zookeeper.ssl.keystore.location", "",
  2837. "Keystore location when using a client-side certificate with TLS connectivity to ZooKeeper. " +
  2838. "Overrides any explicit value set via the zookeeper.ssl.keyStore.location " +
  2839. "system property (note the camelCase)."),
  2840. HIVE_ZOOKEEPER_SSL_KEYSTORE_PASSWORD("hive.zookeeper.ssl.keystore.password", "",
  2841. "Keystore password when using a client-side certificate with TLS connectivity to ZooKeeper." +
  2842. "Overrides any explicit value set via the zookeeper.ssl.keyStore.password " +
  2843. "system property (note the camelCase)."),
  2844. HIVE_ZOOKEEPER_SSL_TRUSTSTORE_LOCATION("hive.zookeeper.ssl.truststore.location", "",
  2845. "Truststore location when using a client-side certificate with TLS connectivity to ZooKeeper. " +
  2846. "Overrides any explicit value set via the zookeeper.ssl.trustStore.location" +
  2847. "system property (note the camelCase)."),
  2848. HIVE_ZOOKEEPER_SSL_TRUSTSTORE_PASSWORD("hive.zookeeper.ssl.truststore.password", "",
  2849. "Truststore password when using a client-side certificate with TLS connectivity to ZooKeeper." +
  2850. "Overrides any explicit value set via the zookeeper.ssl.trustStore.password " +
  2851. "system property (note the camelCase)."),
  2852. HIVE_ZOOKEEPER_KILLQUERY_ENABLE("hive.zookeeper.killquery.enable", true,
  2853. "Whether enabled kill query coordination with zookeeper, " +
  2854. "when hive.server2.support.dynamic.service.discovery is enabled."),
  2855. HIVE_ZOOKEEPER_KILLQUERY_NAMESPACE("hive.zookeeper.killquery.namespace", "killQueries",
  2856. "When kill query coordination is enabled, uses this namespace for registering queries to kill with zookeeper"),
  2857. // Transactions
  2858. HIVE_TXN_MANAGER("hive.txn.manager",
  2859. "org.apache.hadoop.hive.ql.lockmgr.DummyTxnManager",
  2860. "Set to org.apache.hadoop.hive.ql.lockmgr.DbTxnManager as part of turning on Hive\n" +
  2861. "transactions, which also requires appropriate settings for hive.compactor.initiator.on,\n" +
  2862. "hive.compactor.worker.threads, hive.support.concurrency (true),\n" +
  2863. "and hive.exec.dynamic.partition.mode (nonstrict).\n" +
  2864. "The default DummyTxnManager replicates pre-Hive-0.13 behavior and provides\n" +
  2865. "no transactions."),
  2866. HIVE_TXN_STRICT_LOCKING_MODE("hive.txn.strict.locking.mode", true, "In strict mode non-ACID\n" +
  2867. "resources use standard R/W lock semantics, e.g. INSERT will acquire exclusive lock.\n" +
  2868. "In nonstrict mode, for non-ACID resources, INSERT will only acquire shared lock, which\n" +
  2869. "allows two concurrent writes to the same partition but still lets lock manager prevent\n" +
  2870. "DROP TABLE etc. when the table is being written to"),
  2871. HIVE_TXN_NONACID_READ_LOCKS("hive.txn.nonacid.read.locks", true,
  2872. "Flag to turn off the read locks for non-ACID tables, when set to false.\n" +
  2873. "Could be exercised to improve the performance of non-ACID tables in clusters where read locking " +
  2874. "is enabled globally to support ACID. Can cause issues with concurrent DDL operations, or slow S3 writes."),
  2875. HIVE_TXN_READ_LOCKS("hive.txn.read.locks", true,
  2876. "Flag to turn off the read locks, when set to false. Although its not recommended, \n" +
  2877. "but in performance critical scenarios this option may be exercised."),
  2878. HIVE_LOCKS_PARTITION_THRESHOLD("hive.locks.max.partitions", -1,
  2879. "Locks the entire table if number of partition locks exceeds user-defined threshold. Disabled by default."),
  2880. TXN_OVERWRITE_X_LOCK("hive.txn.xlock.iow", true,
  2881. "Ensures commands with OVERWRITE (such as INSERT OVERWRITE) acquire Exclusive locks for\n" +
  2882. "transactional tables. This ensures that inserts (w/o overwrite) running concurrently\n" +
  2883. "are not hidden by the INSERT OVERWRITE."),
  2884. TXN_MERGE_INSERT_X_LOCK("hive.txn.xlock.mergeinsert", false,
  2885. "Ensures MERGE INSERT operations acquire EXCLUSIVE / EXCL_WRITE lock for transactional tables.\n" +
  2886. "If enabled, prevents duplicates when MERGE statements are executed in parallel transactions."),
  2887. TXN_WRITE_X_LOCK("hive.txn.xlock.write", true,
  2888. "Manages concurrency levels for ACID resources. Provides better level of query parallelism by enabling " +
  2889. "shared writes and write-write conflict resolution at the commit step." +
  2890. "- If true - exclusive writes are used:\n" +
  2891. " - INSERT OVERWRITE acquires EXCLUSIVE locks\n" +
  2892. " - UPDATE/DELETE acquire EXCL_WRITE locks\n" +
  2893. " - INSERT acquires SHARED_READ locks\n" +
  2894. "- If false - shared writes, transaction is aborted in case of conflicting changes:\n" +
  2895. " - INSERT OVERWRITE acquires EXCL_WRITE locks\n" +
  2896. " - INSERT/UPDATE/DELETE acquire SHARED_READ locks"),
  2897. HIVE_TXN_STATS_ENABLED("hive.txn.stats.enabled", true,
  2898. "Whether Hive supports transactional stats (accurate stats for transactional tables)"),
  2899. HIVE_TXN_ACID_DIR_CACHE_DURATION("hive.txn.acid.dir.cache.duration",
  2900. 120, "Enable dir cache for ACID tables specified in minutes."
  2901. + "0 indicates cache is used as read-only and no additional info would be "
  2902. + "populated. -1 means cache is disabled"),
  2903. HIVE_WRITE_ACID_VERSION_FILE("hive.txn.write.acid.version.file", true,
  2904. "Creates an _orc_acid_version file along with acid files, to store the version data"),
  2905. HIVE_TXN_READONLY_ENABLED("hive.txn.readonly.enabled", false,
  2906. "Enables read-only transaction classification and related optimizations"),
  2907. // Configs having to do with DeltaFilesMetricReporter, which collects lists of most recently active tables
  2908. // with the most number of active/obsolete deltas.
  2909. HIVE_TXN_ACID_METRICS_MAX_CACHE_SIZE("hive.txn.acid.metrics.max.cache.size", 100,
  2910. new RangeValidator(0, 500),
  2911. "Size of the ACID metrics cache, i.e. max number of partitions and unpartitioned tables with the "
  2912. + "most deltas that will be included in the lists of active, obsolete and small deltas. "
  2913. + "Allowed range is 0 to 500."),
  2914. HIVE_TXN_ACID_METRICS_CACHE_DURATION("hive.txn.acid.metrics.cache.duration", "7200s",
  2915. new TimeValidator(TimeUnit.SECONDS),
  2916. "Maximum lifetime in seconds for an entry in the ACID metrics cache."),
  2917. HIVE_TXN_ACID_METRICS_REPORTING_INTERVAL("hive.txn.acid.metrics.reporting.interval", "30s",
  2918. new TimeValidator(TimeUnit.SECONDS),
  2919. "Reporting period for ACID metrics in seconds."),
  2920. HIVE_TXN_ACID_METRICS_DELTA_NUM_THRESHOLD("hive.txn.acid.metrics.delta.num.threshold", 100,
  2921. "The minimum number of active delta files a table/partition must have in order to be included in the ACID metrics report."),
  2922. HIVE_TXN_ACID_METRICS_OBSOLETE_DELTA_NUM_THRESHOLD("hive.txn.acid.metrics.obsolete.delta.num.threshold", 100,
  2923. "The minimum number of obsolete delta files a table/partition must have in order to be included in the ACID metrics report."),
  2924. HIVE_TXN_ACID_METRICS_DELTA_CHECK_THRESHOLD("hive.txn.acid.metrics.delta.check.threshold", "300s",
  2925. new TimeValidator(TimeUnit.SECONDS),
  2926. "Deltas not older than this value will not be included in the ACID metrics report."),
  2927. HIVE_TXN_ACID_METRICS_DELTA_PCT_THRESHOLD("hive.txn.acid.metrics.delta.pct.threshold", 0.01f,
  2928. "Percentage (fractional) size of the delta files relative to the base directory. Deltas smaller than this threshold " +
  2929. "count as small deltas. Default 0.01 = 1%.)"),
  2930. /**
  2931. * @deprecated Use MetastoreConf.TXN_TIMEOUT
  2932. */
  2933. @Deprecated
  2934. HIVE_TXN_TIMEOUT("hive.txn.timeout", "300s", new TimeValidator(TimeUnit.SECONDS),
  2935. "time after which transactions are declared aborted if the client has not sent a heartbeat."),
  2936. /**
  2937. * @deprecated Use MetastoreConf.TXN_HEARTBEAT_THREADPOOL_SIZE
  2938. */
  2939. @Deprecated
  2940. HIVE_TXN_HEARTBEAT_THREADPOOL_SIZE("hive.txn.heartbeat.threadpool.size", 5, "The number of " +
  2941. "threads to use for heartbeating. For Hive CLI, 1 is enough. For HiveServer2, we need a few"),
  2942. TXN_MGR_DUMP_LOCK_STATE_ON_ACQUIRE_TIMEOUT("hive.txn.manager.dump.lock.state.on.acquire.timeout", false,
  2943. "Set this to true so that when attempt to acquire a lock on resource times out, the current state" +
  2944. " of the lock manager is dumped to log file. This is for debugging. See also " +
  2945. "hive.lock.numretries and hive.lock.sleep.between.retries."),
  2946. HIVE_TXN_OPERATIONAL_PROPERTIES("hive.txn.operational.properties", 1,
  2947. "1: Enable split-update feature found in the newer version of Hive ACID subsystem\n" +
  2948. "4: Make the table 'quarter-acid' as it only supports insert. But it doesn't require ORC or bucketing.\n" +
  2949. "This is intended to be used as an internal property for future versions of ACID. (See\n" +
  2950. "HIVE-14035 for details. User sets it tblproperites via transactional_properties.)", true),
  2951. /**
  2952. * @deprecated Use MetastoreConf.MAX_OPEN_TXNS
  2953. */
  2954. @Deprecated
  2955. HIVE_MAX_OPEN_TXNS("hive.max.open.txns", 100000, "Maximum number of open transactions. If \n" +
  2956. "current open transactions reach this limit, future open transaction requests will be \n" +
  2957. "rejected, until this number goes below the limit."),
  2958. /**
  2959. * @deprecated Use MetastoreConf.COUNT_OPEN_TXNS_INTERVAL
  2960. */
  2961. @Deprecated
  2962. HIVE_COUNT_OPEN_TXNS_INTERVAL("hive.count.open.txns.interval", "1s",
  2963. new TimeValidator(TimeUnit.SECONDS), "Time in seconds between checks to count open transactions."),
  2964. /**
  2965. * @deprecated Use MetastoreConf.TXN_MAX_OPEN_BATCH
  2966. */
  2967. @Deprecated
  2968. HIVE_TXN_MAX_OPEN_BATCH("hive.txn.max.open.batch", 1000,
  2969. "Maximum number of transactions that can be fetched in one call to open_txns().\n" +
  2970. "This controls how many transactions streaming agents such as Flume or Storm open\n" +
  2971. "simultaneously. The streaming agent then writes that number of entries into a single\n" +
  2972. "file (per Flume agent or Storm bolt). Thus increasing this value decreases the number\n" +
  2973. "of delta files created by streaming agents. But it also increases the number of open\n" +
  2974. "transactions that Hive has to track at any given time, which may negatively affect\n" +
  2975. "read performance."),
  2976. /**
  2977. * @deprecated Use MetastoreConf.TXN_RETRYABLE_SQLEX_REGEX
  2978. */
  2979. @Deprecated
  2980. HIVE_TXN_RETRYABLE_SQLEX_REGEX("hive.txn.retryable.sqlex.regex", "", "Comma separated list\n" +
  2981. "of regular expression patterns for SQL state, error code, and error message of\n" +
  2982. "retryable SQLExceptions, that's suitable for the metastore DB.\n" +
  2983. "For example: Can't serialize.*,40001$,^Deadlock,.*ORA-08176.*\n" +
  2984. "The string that the regex will be matched against is of the following form, where ex is a SQLException:\n" +
  2985. "ex.getMessage() + \" (SQLState=\" + ex.getSQLState() + \", ErrorCode=\" + ex.getErrorCode() + \")\""),
  2986. /**
  2987. * @deprecated Use MetastoreConf.COMPACTOR_INITIATOR_ON
  2988. */
  2989. @Deprecated
  2990. HIVE_COMPACTOR_INITIATOR_ON("hive.compactor.initiator.on", false,
  2991. "Whether to run the initiator and cleaner threads on this metastore instance or not.\n" +
  2992. "Set this to true on one instance of the Thrift metastore service as part of turning\n" +
  2993. "on Hive transactions. For a complete list of parameters required for turning on\n" +
  2994. "transactions, see hive.txn.manager."),
  2995. /**
  2996. * @deprecated Use MetastoreConf.COMPACTOR_WORKER_THREADS
  2997. */
  2998. @Deprecated
  2999. HIVE_COMPACTOR_WORKER_THREADS("hive.compactor.worker.threads", 0,
  3000. "How many compactor worker threads to run on this metastore instance. Set this to a\n" +
  3001. "positive number on one or more instances of the Thrift metastore service as part of\n" +
  3002. "turning on Hive transactions. For a complete list of parameters required for turning\n" +
  3003. "on transactions, see hive.txn.manager.\n" +
  3004. "Worker threads spawn MapReduce jobs to do compactions. They do not do the compactions\n" +
  3005. "themselves. Increasing the number of worker threads will decrease the time it takes\n" +
  3006. "tables or partitions to be compacted once they are determined to need compaction.\n" +
  3007. "It will also increase the background load on the Hadoop cluster as more MapReduce jobs\n" +
  3008. "will be running in the background."),
  3009. HIVE_COMPACTOR_WORKER_TIMEOUT("hive.compactor.worker.timeout", "86400s",
  3010. new TimeValidator(TimeUnit.SECONDS),
  3011. "Time in seconds after which a compaction job will be declared failed and the\n" +
  3012. "compaction re-queued."),
  3013. HIVE_COMPACTOR_CHECK_INTERVAL("hive.compactor.check.interval", "300s",
  3014. new TimeValidator(TimeUnit.SECONDS),
  3015. "Time in seconds between checks to see if any tables or partitions need to be\n" +
  3016. "compacted. This should be kept high because each check for compaction requires\n" +
  3017. "many calls against the NameNode.\n" +
  3018. "Decreasing this value will reduce the time it takes for compaction to be started\n" +
  3019. "for a table or partition that requires compaction. However, checking if compaction\n" +
  3020. "is needed requires several calls to the NameNode for each table or partition that\n" +
  3021. "has had a transaction done on it since the last major compaction. So decreasing this\n" +
  3022. "value will increase the load on the NameNode."),
  3023. HIVE_COMPACTOR_REQUEST_QUEUE("hive.compactor.request.queue", 1,
  3024. "Enables parallelization of the checkForCompaction operation, that includes many file metadata checks\n" +
  3025. "and may be expensive"),
  3026. HIVE_COMPACTOR_DELTA_NUM_THRESHOLD("hive.compactor.delta.num.threshold", 10,
  3027. "Number of delta directories in a table or partition that will trigger a minor\n" +
  3028. "compaction."),
  3029. HIVE_COMPACTOR_DELTA_PCT_THRESHOLD("hive.compactor.delta.pct.threshold", 0.1f,
  3030. "Percentage (fractional) size of the delta files relative to the base that will trigger\n" +
  3031. "a major compaction. (1.0 = 100%, so the default 0.1 = 10%.)"),
  3032. COMPACTOR_MAX_NUM_DELTA("hive.compactor.max.num.delta", 500, "Maximum number of delta files that " +
  3033. "the compactor will attempt to handle in a single job."),
  3034. HIVE_COMPACTOR_ABORTEDTXN_THRESHOLD("hive.compactor.abortedtxn.threshold", 1000,
  3035. "Number of aborted transactions involving a given table or partition that will trigger\n" +
  3036. "a major compaction."),
  3037. HIVE_COMPACTOR_ABORTEDTXN_TIME_THRESHOLD("hive.compactor.aborted.txn.time.threshold", "12h",
  3038. new TimeValidator(TimeUnit.HOURS),
  3039. "Age of table/partition's oldest aborted transaction when compaction will be triggered. " +
  3040. "Default time unit is: hours. Set to a negative number to disable."),
  3041. HIVE_COMPACTOR_ACTIVE_DELTA_DIR_THRESHOLD("hive.compactor.active.delta.dir.threshold", 200,
  3042. "If the number of active delta directories under a table/partition passes this threshold, a warning" +
  3043. " message will be logged."),
  3044. HIVE_COMPACTOR_OBSOLETE_DELTA_DIR_THRESHOLD("hive.compactor.obsolete.delta.dir.threshold", 200,
  3045. "If the number of obsolete delta directories under a table/partition passes this threshold, a " +
  3046. "warning message will be logged."),
  3047. HIVE_COMPACTOR_SMALL_DELTA_DIR_THRESHOLD("hive.compactor.small.delta.dir.threshold", 200,
  3048. "If the number of small delta directories under a table/partition passes this threshold, a " +
  3049. "warning message will be logged."),
  3050. HIVE_COMPACTOR_ACID_METRICS_LOGGER_FREQUENCY(
  3051. "hive.compactor.acid.metrics.logger.frequency",
  3052. "360m", new TimeValidator(TimeUnit.MINUTES),
  3053. "Logging frequency of ACID related metrics. Set this value to 0 to completely turn off logging. " +
  3054. "Default time unit: minutes"),
  3055. HIVE_COMPACTOR_WAIT_TIMEOUT("hive.compactor.wait.timeout", 300000L, "Time out in "
  3056. + "milliseconds for blocking compaction. It's value has to be higher than 2000 milliseconds. "),
  3057. HIVE_MR_COMPACTOR_GATHER_STATS("hive.mr.compactor.gather.stats", true, "If set to true MAJOR compaction " +
  3058. "will gather stats if there are stats already associated with the table/partition.\n" +
  3059. "Turn this off to save some resources and the stats are not used anyway.\n" +
  3060. "Works only for MR based compaction, CRUD based compaction uses hive.stats.autogather."),
  3061. /**
  3062. * @deprecated Use MetastoreConf.COMPACTOR_INITIATOR_FAILED_THRESHOLD
  3063. */
  3064. @Deprecated
  3065. COMPACTOR_INITIATOR_FAILED_THRESHOLD("hive.compactor.initiator.failed.compacts.threshold", 2,
  3066. new RangeValidator(1, 20), "Number of consecutive compaction failures (per table/partition) " +
  3067. "after which automatic compactions will not be scheduled any more. Note that this must be less " +
  3068. "than hive.compactor.history.retention.failed."),
  3069. HIVE_COMPACTOR_CLEANER_RUN_INTERVAL("hive.compactor.cleaner.run.interval", "5000ms",
  3070. new TimeValidator(TimeUnit.MILLISECONDS), "Time between runs of the cleaner thread"),
  3071. HIVE_COMPACTOR_DELAYED_CLEANUP_ENABLED("hive.compactor.delayed.cleanup.enabled", false,
  3072. "When enabled, cleanup of obsolete files/dirs after compaction can be delayed. This delay \n" +
  3073. " can be configured by hive configuration hive.compactor.cleaner.retention.time.seconds"),
  3074. HIVE_COMPACTOR_CLEANER_RETENTION_TIME("hive.compactor.cleaner.retention.time.seconds", "300s",
  3075. new TimeValidator(TimeUnit.SECONDS), "Time to wait before cleanup of obsolete files/dirs after compaction. \n"
  3076. + "This is the minimum amount of time the system will wait, since it will not clean before all open transactions are committed, that were opened before the compaction"),
  3077. HIVE_COMPACTOR_CLEANER_THREADS_NUM("hive.compactor.cleaner.threads.num", 1,
  3078. "Enables parallelization of the cleaning directories after compaction, that includes many file \n" +
  3079. "related checks and may be expensive"),
  3080. COMPACTOR_JOB_QUEUE("hive.compactor.job.queue", "", "Used to specify name of Hadoop queue to which\n" +
  3081. "Compaction jobs will be submitted. Set to empty string to let Hadoop choose the queue."),
  3082. TRANSACTIONAL_CONCATENATE_NOBLOCK("hive.transactional.concatenate.noblock", false,
  3083. "Will cause 'alter table T concatenate' to be non-blocking"),
  3084. CONCATENATE_EXTERNAL_TABLE("hive.concatenate.external.table", false,
  3085. "Enable concatenate for external tables. This allows 'alter table `tablename` concatenate' " +
  3086. "on external tables."),
  3087. HIVE_COMPACTOR_COMPACT_MM("hive.compactor.compact.insert.only", true,
  3088. "Whether the compactor should compact insert-only tables. A safety switch."),
  3089. COMPACTOR_CRUD_QUERY_BASED("hive.compactor.crud.query.based", false,
  3090. "Means compaction on full CRUD tables is done via queries. "
  3091. + "Compactions on insert-only tables will always run via queries regardless of the value of this configuration."),
  3092. SPLIT_GROUPING_MODE("hive.split.grouping.mode", "query", new StringSet("query", "compactor"),
  3093. "This is set to compactor from within the query based compactor. This enables the Tez SplitGrouper "
  3094. + "to group splits based on their bucket number, so that all rows from different bucket files "
  3095. + " for the same bucket number can end up in the same bucket file after the compaction."),
  3096. /**
  3097. * @deprecated Use MetastoreConf.COMPACTOR_HISTORY_RETENTION_SUCCEEDED
  3098. */
  3099. @Deprecated
  3100. COMPACTOR_HISTORY_RETENTION_SUCCEEDED("hive.compactor.history.retention.succeeded", 3,
  3101. new RangeValidator(0, 100), "Determines how many successful compaction records will be " +
  3102. "retained in compaction history for a given table/partition."),
  3103. /**
  3104. * @deprecated Use MetastoreConf.COMPACTOR_HISTORY_RETENTION_FAILED
  3105. */
  3106. @Deprecated
  3107. COMPACTOR_HISTORY_RETENTION_FAILED("hive.compactor.history.retention.failed", 3,
  3108. new RangeValidator(0, 100), "Determines how many failed compaction records will be " +
  3109. "retained in compaction history for a given table/partition."),
  3110. /**
  3111. * @deprecated Use MetastoreConf.COMPACTOR_HISTORY_RETENTION_DID_NOT_INITIATE
  3112. */
  3113. @Deprecated
  3114. COMPACTOR_HISTORY_RETENTION_ATTEMPTED("hive.compactor.history.retention.attempted", 2,
  3115. new RangeValidator(0, 100), "Determines how many attempted compaction records will be " +
  3116. "retained in compaction history for a given table/partition."),
  3117. /**
  3118. * @deprecated Use MetastoreConf.ACID_HOUSEKEEPER_SERVICE_INTERVAL
  3119. */
  3120. @Deprecated
  3121. COMPACTOR_HISTORY_REAPER_INTERVAL("hive.compactor.history.reaper.interval", "2m",
  3122. new TimeValidator(TimeUnit.MILLISECONDS), "Determines how often compaction history reaper runs"),
  3123. /**
  3124. * @deprecated Use MetastoreConf.ACID_HOUSEKEEPER_SERVICE_START
  3125. */
  3126. @Deprecated
  3127. HIVE_TIMEDOUT_TXN_REAPER_START("hive.timedout.txn.reaper.start", "100s",
  3128. new TimeValidator(TimeUnit.MILLISECONDS), "Time delay of 1st reaper run after metastore start"),
  3129. /**
  3130. * @deprecated Use MetastoreConf.ACID_HOUSEKEEPER_SERVICE_INTERVAL
  3131. */
  3132. @Deprecated
  3133. HIVE_TIMEDOUT_TXN_REAPER_INTERVAL("hive.timedout.txn.reaper.interval", "180s",
  3134. new TimeValidator(TimeUnit.MILLISECONDS), "Time interval describing how often the reaper runs"),
  3135. /**
  3136. * @deprecated Use MetastoreConf.ACID_HOUSEKEEPER_SERVICE_INTERVAL
  3137. */
  3138. @Deprecated
  3139. WRITE_SET_REAPER_INTERVAL("hive.writeset.reaper.interval", "60s",
  3140. new TimeValidator(TimeUnit.MILLISECONDS), "Frequency of WriteSet reaper runs"),
  3141. MERGE_CARDINALITY_VIOLATION_CHECK("hive.merge.cardinality.check", true,
  3142. "Set to true to ensure that each SQL Merge statement ensures that for each row in the target\n" +
  3143. "table there is at most 1 matching row in the source table per SQL Specification."),
  3144. MERGE_SPLIT_UPDATE("hive.merge.split.update", false,
  3145. "If true, SQL Merge statement will handle WHEN MATCHED UPDATE by splitting it into 2\n" +
  3146. "branches of a multi-insert, representing delete of existing row and an insert of\n" +
  3147. "the new version of the row. Updating bucketing and partitioning columns should\n" +
  3148. "only be permitted if this is true."),
  3149. OPTIMIZE_ACID_META_COLUMNS("hive.optimize.acid.meta.columns", true,
  3150. "If true, don't decode Acid metadata columns from storage unless" +
  3151. " they are needed."),
  3152. // For Arrow SerDe
  3153. HIVE_ARROW_ROOT_ALLOCATOR_LIMIT("hive.arrow.root.allocator.limit", Long.MAX_VALUE,
  3154. "Arrow root allocator memory size limitation in bytes."),
  3155. HIVE_ARROW_BATCH_ALLOCATOR_LIMIT("hive.arrow.batch.allocator.limit", 10_000_000_000L,
  3156. "Max bytes per arrow batch. This is a threshold, the memory is not pre-allocated."),
  3157. HIVE_ARROW_BATCH_SIZE("hive.arrow.batch.size", 1000, "The number of rows sent in one Arrow batch."),
  3158. // For Druid storage handler
  3159. HIVE_DRUID_INDEXING_GRANULARITY("hive.druid.indexer.segments.granularity", "DAY",
  3160. new PatternSet("YEAR", "MONTH", "WEEK", "DAY", "HOUR", "MINUTE", "SECOND"),
  3161. "Granularity for the segments created by the Druid storage handler"
  3162. ),
  3163. HIVE_DRUID_MAX_PARTITION_SIZE("hive.druid.indexer.partition.size.max", 5000000,
  3164. "Maximum number of records per segment partition"
  3165. ),
  3166. HIVE_DRUID_MAX_ROW_IN_MEMORY("hive.druid.indexer.memory.rownum.max", 75000,
  3167. "Maximum number of records in memory while storing data in Druid"
  3168. ),
  3169. HIVE_DRUID_BROKER_DEFAULT_ADDRESS("hive.druid.broker.address.default", "localhost:8082",
  3170. "Address of the Druid broker. If we are querying Druid from Hive, this address needs to be\n"
  3171. +
  3172. "declared"
  3173. ),
  3174. HIVE_DRUID_COORDINATOR_DEFAULT_ADDRESS("hive.druid.coordinator.address.default", "localhost:8081",
  3175. "Address of the Druid coordinator. It is used to check the load status of newly created segments"
  3176. ),
  3177. HIVE_DRUID_OVERLORD_DEFAULT_ADDRESS("hive.druid.overlord.address.default", "localhost:8090",
  3178. "Address of the Druid overlord. It is used to submit indexing tasks to druid."
  3179. ),
  3180. HIVE_DRUID_SELECT_THRESHOLD("hive.druid.select.threshold", 10000,
  3181. "Takes only effect when hive.druid.select.distribute is set to false. \n" +
  3182. "When we can split a Select query, this is the maximum number of rows that we try to retrieve\n" +
  3183. "per query. In order to do that, we obtain the estimated size for the complete result. If the\n" +
  3184. "number of records of the query results is larger than this threshold, we split the query in\n" +
  3185. "total number of rows/threshold parts across the time dimension. Note that we assume the\n" +
  3186. "records to be split uniformly across the time dimension."),
  3187. HIVE_DRUID_NUM_HTTP_CONNECTION("hive.druid.http.numConnection", 20, "Number of connections used by\n" +
  3188. "the HTTP client."),
  3189. HIVE_DRUID_HTTP_READ_TIMEOUT("hive.druid.http.read.timeout", "PT1M", "Read timeout period for the HTTP\n" +
  3190. "client in ISO8601 format (for example P2W, P3M, PT1H30M, PT0.750S), default is period of 1 minute."),
  3191. HIVE_DRUID_SLEEP_TIME("hive.druid.sleep.time", "PT10S",
  3192. "Sleep time between retries in ISO8601 format (for example P2W, P3M, PT1H30M, PT0.750S), default is period of 10 seconds."
  3193. ),
  3194. HIVE_DRUID_BASE_PERSIST_DIRECTORY("hive.druid.basePersistDirectory", "",
  3195. "Local temporary directory used to persist intermediate indexing state, will default to JVM system property java.io.tmpdir."
  3196. ),
  3197. HIVE_DRUID_ROLLUP("hive.druid.rollup", true, "Whether to rollup druid rows or not."),
  3198. DRUID_SEGMENT_DIRECTORY("hive.druid.storage.storageDirectory", "/druid/segments"
  3199. , "druid deep storage location."),
  3200. DRUID_METADATA_BASE("hive.druid.metadata.base", "druid", "Default prefix for metadata tables"),
  3201. DRUID_METADATA_DB_TYPE("hive.druid.metadata.db.type", "mysql",
  3202. new PatternSet("mysql", "postgresql", "derby"), "Type of the metadata database."
  3203. ),
  3204. DRUID_METADATA_DB_USERNAME("hive.druid.metadata.username", "",
  3205. "Username to connect to Type of the metadata DB."
  3206. ),
  3207. DRUID_METADATA_DB_PASSWORD("hive.druid.metadata.password", "",
  3208. "Password to connect to Type of the metadata DB."
  3209. ),
  3210. DRUID_METADATA_DB_URI("hive.druid.metadata.uri", "",
  3211. "URI to connect to the database (for example jdbc:mysql://hostname:port/DBName)."
  3212. ),
  3213. DRUID_WORKING_DIR("hive.druid.working.directory", "/tmp/workingDirectory",
  3214. "Default hdfs working directory used to store some intermediate metadata"
  3215. ),
  3216. HIVE_DRUID_MAX_TRIES("hive.druid.maxTries", 5, "Maximum number of retries before giving up"),
  3217. HIVE_DRUID_PASSIVE_WAIT_TIME("hive.druid.passiveWaitTimeMs", 30000L,
  3218. "Wait time in ms default to 30 seconds."
  3219. ),
  3220. HIVE_DRUID_BITMAP_FACTORY_TYPE("hive.druid.bitmap.type", "roaring", new PatternSet("roaring", "concise"), "Coding algorithm use to encode the bitmaps"),
  3221. HIVE_DRUID_KERBEROS_ENABLE("hive.druid.kerberos.enable", true,
  3222. "Enable/Disable Kerberos authentication explicitly while connecting to a druid cluster."),
  3223. // For HBase storage handler
  3224. HIVE_HBASE_WAL_ENABLED("hive.hbase.wal.enabled", true,
  3225. "Whether writes to HBase should be forced to the write-ahead log. \n" +
  3226. "Disabling this improves HBase write performance at the risk of lost writes in case of a crash."),
  3227. HIVE_HBASE_GENERATE_HFILES("hive.hbase.generatehfiles", false,
  3228. "True when HBaseStorageHandler should generate hfiles instead of operate against the online table."),
  3229. HIVE_HBASE_SNAPSHOT_NAME("hive.hbase.snapshot.name", null, "The HBase table snapshot name to use."),
  3230. HIVE_HBASE_SNAPSHOT_RESTORE_DIR("hive.hbase.snapshot.restoredir", "/tmp", "The directory in which to " +
  3231. "restore the HBase table snapshot."),
  3232. // For Kudu storage handler
  3233. HIVE_KUDU_MASTER_ADDRESSES_DEFAULT("hive.kudu.master.addresses.default", "localhost:7050",
  3234. "Comma-separated list of all of the Kudu master addresses.\n" +
  3235. "This value is only used for a given table if the kudu.master_addresses table property is not set."),
  3236. // For har files
  3237. HIVEARCHIVEENABLED("hive.archive.enabled", false, "Whether archiving operations are permitted"),
  3238. HIVEFETCHTASKCONVERSION("hive.fetch.task.conversion", "more", new StringSet("none", "minimal", "more"),
  3239. "Some select queries can be converted to single FETCH task minimizing latency.\n" +
  3240. "Currently the query should be single sourced not having any subquery and should not have\n" +
  3241. "any aggregations or distincts (which incurs RS), lateral views and joins.\n" +
  3242. "0. none : disable hive.fetch.task.conversion\n" +
  3243. "1. minimal : SELECT STAR, FILTER on partition columns, LIMIT only\n" +
  3244. "2. more : SELECT, FILTER, LIMIT only (support TABLESAMPLE and virtual columns)"
  3245. ),
  3246. HIVEFETCHTASKCONVERSIONTHRESHOLD("hive.fetch.task.conversion.threshold", 1073741824L,
  3247. "Input threshold for applying hive.fetch.task.conversion. If target table is native, input length\n" +
  3248. "is calculated by summation of file lengths. If it's not native, storage handler for the table\n" +
  3249. "can optionally implement org.apache.hadoop.hive.ql.metadata.InputEstimator interface."),
  3250. HIVEFETCHTASKAGGR("hive.fetch.task.aggr", false,
  3251. "Aggregation queries with no group-by clause (for example, select count(*) from src) execute\n" +
  3252. "final aggregations in single reduce task. If this is set true, Hive delegates final aggregation\n" +
  3253. "stage to fetch task, possibly decreasing the query time."),
  3254. HIVEOPTIMIZEMETADATAQUERIES("hive.compute.query.using.stats", true,
  3255. "When set to true Hive will answer a few queries like count(1) purely using stats\n" +
  3256. "stored in metastore. For basic stats collection turn on the config hive.stats.autogather to true.\n" +
  3257. "For more advanced stats collection need to run analyze table queries."),
  3258. // Serde for FetchTask
  3259. HIVEFETCHOUTPUTSERDE("hive.fetch.output.serde", "org.apache.hadoop.hive.serde2.DelimitedJSONSerDe",
  3260. "The SerDe used by FetchTask to serialize the fetch output."),
  3261. HIVEEXPREVALUATIONCACHE("hive.cache.expr.evaluation", true,
  3262. "If true, the evaluation result of a deterministic expression referenced twice or more\n" +
  3263. "will be cached.\n" +
  3264. "For example, in a filter condition like '.. where key + 10 = 100 or key + 10 = 0'\n" +
  3265. "the expression 'key + 10' will be evaluated/cached once and reused for the following\n" +
  3266. "expression ('key + 10 = 0'). Currently, this is applied only to expressions in select\n" +
  3267. "or filter operators."),
  3268. // Hive Variables
  3269. HIVEVARIABLESUBSTITUTE("hive.variable.substitute", true,
  3270. "This enables substitution using syntax like ${var} ${system:var} and ${env:var}."),
  3271. HIVEVARIABLESUBSTITUTEDEPTH("hive.variable.substitute.depth", 40,
  3272. "The maximum replacements the substitution engine will do."),
  3273. HIVECONFVALIDATION("hive.conf.validation", true,
  3274. "Enables type checking for registered Hive configurations"),
  3275. SEMANTIC_ANALYZER_HOOK("hive.semantic.analyzer.hook", "", ""),
  3276. HIVE_TEST_AUTHORIZATION_SQLSTD_HS2_MODE(
  3277. "hive.test.authz.sstd.hs2.mode", false, "test hs2 mode from .q tests", true),
  3278. HIVE_AUTHORIZATION_ENABLED("hive.security.authorization.enabled", false,
  3279. "enable or disable the Hive client authorization"),
  3280. HIVE_AUTHORIZATION_KERBEROS_USE_SHORTNAME("hive.security.authorization.kerberos.use.shortname", true,
  3281. "use short name in Kerberos cluster"),
  3282. HIVE_AUTHORIZATION_MANAGER("hive.security.authorization.manager",
  3283. "org.apache.hadoop.hive.ql.security.authorization.plugin.sqlstd.SQLStdHiveAuthorizerFactory",
  3284. "The Hive client authorization manager class name. The user defined authorization class should implement \n" +
  3285. "interface org.apache.hadoop.hive.ql.security.authorization.HiveAuthorizationProvider."),
  3286. HIVE_AUTHENTICATOR_MANAGER("hive.security.authenticator.manager",
  3287. "org.apache.hadoop.hive.ql.security.HadoopDefaultAuthenticator",
  3288. "hive client authenticator manager class name. The user defined authenticator should implement \n" +
  3289. "interface org.apache.hadoop.hive.ql.security.HiveAuthenticationProvider."),
  3290. HIVE_METASTORE_AUTHORIZATION_MANAGER("hive.security.metastore.authorization.manager",
  3291. "org.apache.hadoop.hive.ql.security.authorization.DefaultHiveMetastoreAuthorizationProvider",
  3292. "Names of authorization manager classes (comma separated) to be used in the metastore\n" +
  3293. "for authorization. The user defined authorization class should implement interface\n" +
  3294. "org.apache.hadoop.hive.ql.security.authorization.HiveMetastoreAuthorizationProvider.\n" +
  3295. "All authorization manager classes have to successfully authorize the metastore API\n" +
  3296. "call for the command execution to be allowed."),
  3297. HIVE_METASTORE_AUTHORIZATION_AUTH_READS("hive.security.metastore.authorization.auth.reads", true,
  3298. "If this is true, metastore authorizer authorizes read actions on database, table"),
  3299. HIVE_METASTORE_AUTHENTICATOR_MANAGER("hive.security.metastore.authenticator.manager",
  3300. "org.apache.hadoop.hive.ql.security.HadoopDefaultMetastoreAuthenticator",
  3301. "authenticator manager class name to be used in the metastore for authentication. \n" +
  3302. "The user defined authenticator should implement interface org.apache.hadoop.hive.ql.security.HiveAuthenticationProvider."),
  3303. HIVE_AUTHORIZATION_TABLE_USER_GRANTS("hive.security.authorization.createtable.user.grants", "",
  3304. "the privileges automatically granted to some users whenever a table gets created.\n" +
  3305. "An example like \"userX,userY:select;userZ:create\" will grant select privilege to userX and userY,\n" +
  3306. "and grant create privilege to userZ whenever a new table created."),
  3307. HIVE_AUTHORIZATION_TABLE_GROUP_GRANTS("hive.security.authorization.createtable.group.grants",
  3308. "",
  3309. "the privileges automatically granted to some groups whenever a table gets created.\n" +
  3310. "An example like \"groupX,groupY:select;groupZ:create\" will grant select privilege to groupX and groupY,\n" +
  3311. "and grant create privilege to groupZ whenever a new table created."),
  3312. HIVE_AUTHORIZATION_TABLE_ROLE_GRANTS("hive.security.authorization.createtable.role.grants", "",
  3313. "the privileges automatically granted to some roles whenever a table gets created.\n" +
  3314. "An example like \"roleX,roleY:select;roleZ:create\" will grant select privilege to roleX and roleY,\n" +
  3315. "and grant create privilege to roleZ whenever a new table created."),
  3316. HIVE_AUTHORIZATION_TABLE_OWNER_GRANTS("hive.security.authorization.createtable.owner.grants",
  3317. "",
  3318. "The privileges automatically granted to the owner whenever a table gets created.\n" +
  3319. "An example like \"select,drop\" will grant select and drop privilege to the owner\n" +
  3320. "of the table. Note that the default gives the creator of a table no access to the\n" +
  3321. "table (but see HIVE-8067)."),
  3322. HIVE_AUTHORIZATION_TASK_FACTORY("hive.security.authorization.task.factory",
  3323. "org.apache.hadoop.hive.ql.parse.authorization.HiveAuthorizationTaskFactoryImpl",
  3324. "Authorization DDL task factory implementation"),
  3325. // if this is not set default value is set during config initialization
  3326. // Default value can't be set in this constructor as it would refer names in other ConfVars
  3327. // whose constructor would not have been called
  3328. HIVE_AUTHORIZATION_SQL_STD_AUTH_CONFIG_WHITELIST(
  3329. "hive.security.authorization.sqlstd.confwhitelist", "",
  3330. "A Java regex. Configurations parameters that match this\n" +
  3331. "regex can be modified by user when SQL standard authorization is enabled.\n" +
  3332. "To get the default value, use the 'set <param>' command.\n" +
  3333. "Note that the hive.conf.restricted.list checks are still enforced after the white list\n" +
  3334. "check"),
  3335. HIVE_AUTHORIZATION_SQL_STD_AUTH_CONFIG_WHITELIST_APPEND(
  3336. "hive.security.authorization.sqlstd.confwhitelist.append", "",
  3337. "2nd Java regex that it would match in addition to\n" +
  3338. "hive.security.authorization.sqlstd.confwhitelist.\n" +
  3339. "Do not include a starting \"|\" in the value. Using this regex instead\n" +
  3340. "of updating the original regex means that you can append to the default\n" +
  3341. "set by SQL standard authorization instead of replacing it entirely."),
  3342. HIVE_CLI_PRINT_HEADER("hive.cli.print.header", false, "Whether to print the names of the columns in query output."),
  3343. HIVE_CLI_PRINT_ESCAPE_CRLF("hive.cli.print.escape.crlf", false,
  3344. "Whether to print carriage returns and line feeds in row output as escaped \\r and \\n"),
  3345. HIVE_CLI_TEZ_SESSION_ASYNC("hive.cli.tez.session.async", true, "Whether to start Tez\n" +
  3346. "session in background when running CLI with Tez, allowing CLI to be available earlier."),
  3347. HIVE_DISABLE_UNSAFE_EXTERNALTABLE_OPERATIONS("hive.disable.unsafe.external.table.operations", true,
  3348. "Whether to disable certain optimizations and operations on external tables," +
  3349. " on the assumption that data changes by external applications may have negative effects" +
  3350. " on these operations."),
  3351. HIVE_STRICT_MANAGED_TABLES("hive.strict.managed.tables", false,
  3352. "Whether strict managed tables mode is enabled. With this mode enabled, " +
  3353. "only transactional tables (both full and insert-only) are allowed to be created as managed tables"),
  3354. HIVE_EXTERNALTABLE_PURGE_DEFAULT("hive.external.table.purge.default", false,
  3355. "Set to true to set external.table.purge=true on newly created external tables," +
  3356. " which will specify that the table data should be deleted when the table is dropped." +
  3357. " Set to false maintain existing behavior that external tables do not delete data" +
  3358. " when the table is dropped."),
  3359. HIVE_ERROR_ON_EMPTY_PARTITION("hive.error.on.empty.partition", false,
  3360. "Whether to throw an exception if dynamic partition insert generates empty results."),
  3361. HIVE_EXIM_URI_SCHEME_WL("hive.exim.uri.scheme.whitelist", "hdfs,pfile,file,s3,s3a,gs",
  3362. "A comma separated list of acceptable URI schemes for import and export."),
  3363. // temporary variable for testing. This is added just to turn off this feature in case of a bug in
  3364. // deployment. It has not been documented in hive-default.xml intentionally, this should be removed
  3365. // once the feature is stable
  3366. HIVE_EXIM_RESTRICT_IMPORTS_INTO_REPLICATED_TABLES("hive.exim.strict.repl.tables",true,
  3367. "Parameter that determines if 'regular' (non-replication) export dumps can be\n" +
  3368. "imported on to tables that are the target of replication. If this parameter is\n" +
  3369. "set, regular imports will check if the destination table(if it exists) has a " +
  3370. "'repl.last.id' set on it. If so, it will fail."),
  3371. HIVE_REPL_TASK_FACTORY("hive.repl.task.factory",
  3372. "org.apache.hive.hcatalog.api.repl.exim.EximReplicationTaskFactory",
  3373. "Parameter that can be used to override which ReplicationTaskFactory will be\n" +
  3374. "used to instantiate ReplicationTask events. Override for third party repl plugins"),
  3375. HIVE_MAPPER_CANNOT_SPAN_MULTIPLE_PARTITIONS("hive.mapper.cannot.span.multiple.partitions", false, ""),
  3376. HIVE_REWORK_MAPREDWORK("hive.rework.mapredwork", false,
  3377. "should rework the mapred work or not.\n" +
  3378. "This is first introduced by SymlinkTextInputFormat to replace symlink files with real paths at compile time."),
  3379. HIVE_IO_EXCEPTION_HANDLERS("hive.io.exception.handlers", "",
  3380. "A list of io exception handler class names. This is used\n" +
  3381. "to construct a list exception handlers to handle exceptions thrown\n" +
  3382. "by record readers"),
  3383. // logging configuration
  3384. HIVE_LOG4J_FILE("hive.log4j.file", "",
  3385. "Hive log4j configuration file.\n" +
  3386. "If the property is not set, then logging will be initialized using hive-log4j2.properties found on the classpath.\n" +
  3387. "If the property is set, the value must be a valid URI (java.net.URI, e.g. \"file:///tmp/my-logging.xml\"), \n" +
  3388. "which you can then extract a URL from and pass to PropertyConfigurator.configure(URL)."),
  3389. HIVE_EXEC_LOG4J_FILE("hive.exec.log4j.file", "",
  3390. "Hive log4j configuration file for execution mode(sub command).\n" +
  3391. "If the property is not set, then logging will be initialized using hive-exec-log4j2.properties found on the classpath.\n" +
  3392. "If the property is set, the value must be a valid URI (java.net.URI, e.g. \"file:///tmp/my-logging.xml\"), \n" +
  3393. "which you can then extract a URL from and pass to PropertyConfigurator.configure(URL)."),
  3394. HIVE_ASYNC_LOG_ENABLED("hive.async.log.enabled", true,
  3395. "Whether to enable Log4j2's asynchronous logging. Asynchronous logging can give\n" +
  3396. " significant performance improvement as logging will be handled in separate thread\n" +
  3397. " that uses LMAX disruptor queue for buffering log messages.\n" +
  3398. " Refer https://logging.apache.org/log4j/2.x/manual/async.html for benefits and\n" +
  3399. " drawbacks."),
  3400. HIVE_LOG_EXPLAIN_OUTPUT("hive.log.explain.output", false,
  3401. "Whether to log explain output for every query.\n"
  3402. + "When enabled, will log EXPLAIN EXTENDED output for the query at INFO log4j log level."),
  3403. HIVE_LOG_EXPLAIN_OUTPUT_TO_CONSOLE("hive.log.explain.output.to.console", false,
  3404. "Weather to make output from hive.log.explain.output log " +
  3405. "to console instead of normal logger"),
  3406. HIVE_LOG_EXPLAIN_OUTPUT_INCLUDE_EXTENDED("hive.log.explain.output.include.extended", true,
  3407. "Weather to include details in explain printed from hive.log.explain.output"),
  3408. HIVE_EXPLAIN_USER("hive.explain.user", true,
  3409. "Whether to show explain result at user level.\n" +
  3410. "When enabled, will log EXPLAIN output for the query at user level. Tez only."),
  3411. HIVE_SPARK_EXPLAIN_USER("hive.spark.explain.user", false,
  3412. "Whether to show explain result at user level.\n" +
  3413. "When enabled, will log EXPLAIN output for the query at user level. Spark only."),
  3414. HIVE_SPARK_LOG_EXPLAIN_WEBUI("hive.spark.log.explain.webui", true, "Whether to show the " +
  3415. "explain plan in the Spark Web UI. Only shows the regular EXPLAIN plan, and ignores " +
  3416. "any extra EXPLAIN configuration (e.g. hive.spark.explain.user, etc.). The explain " +
  3417. "plan for each stage is truncated at 100,000 characters."),
  3418. // prefix used to auto generated column aliases (this should be s,tarted with '_')
  3419. HIVE_AUTOGEN_COLUMNALIAS_PREFIX_LABEL("hive.autogen.columnalias.prefix.label", "_c",
  3420. "String used as a prefix when auto generating column alias.\n" +
  3421. "By default the prefix label will be appended with a column position number to form the column alias. \n" +
  3422. "Auto generation would happen if an aggregate function is used in a select clause without an explicit alias."),
  3423. HIVE_AUTOGEN_COLUMNALIAS_PREFIX_INCLUDEFUNCNAME(
  3424. "hive.autogen.columnalias.prefix.includefuncname", false,
  3425. "Whether to include function name in the column alias auto generated by Hive."),
  3426. HIVE_METRICS_CLASS("hive.service.metrics.class",
  3427. "org.apache.hadoop.hive.common.metrics.metrics2.CodahaleMetrics",
  3428. new StringSet(
  3429. "org.apache.hadoop.hive.common.metrics.metrics2.CodahaleMetrics",
  3430. "org.apache.hadoop.hive.common.metrics.LegacyMetrics"),
  3431. "Hive metrics subsystem implementation class."),
  3432. HIVE_CODAHALE_METRICS_REPORTER_CLASSES("hive.service.metrics.codahale.reporter.classes",
  3433. "org.apache.hadoop.hive.common.metrics.metrics2.JsonFileMetricsReporter, " +
  3434. "org.apache.hadoop.hive.common.metrics.metrics2.JmxMetricsReporter",
  3435. "Comma separated list of reporter implementation classes for metric class "
  3436. + "org.apache.hadoop.hive.common.metrics.metrics2.CodahaleMetrics. Overrides "
  3437. + "HIVE_METRICS_REPORTER conf if present"),
  3438. @Deprecated
  3439. HIVE_METRICS_REPORTER("hive.service.metrics.reporter", "",
  3440. "Reporter implementations for metric class "
  3441. + "org.apache.hadoop.hive.common.metrics.metrics2.CodahaleMetrics;" +
  3442. "Deprecated, use HIVE_CODAHALE_METRICS_REPORTER_CLASSES instead. This configuraiton will be"
  3443. + " overridden by HIVE_CODAHALE_METRICS_REPORTER_CLASSES if present. " +
  3444. "Comma separated list of JMX, CONSOLE, JSON_FILE, HADOOP2"),
  3445. HIVE_METRICS_JSON_FILE_LOCATION("hive.service.metrics.file.location", "/tmp/report.json",
  3446. "For metric class org.apache.hadoop.hive.common.metrics.metrics2.CodahaleMetrics JSON_FILE reporter, the location of local JSON metrics file. " +
  3447. "This file will get overwritten at every interval."),
  3448. HIVE_METRICS_JSON_FILE_INTERVAL("hive.service.metrics.file.frequency", "5000ms",
  3449. new TimeValidator(TimeUnit.MILLISECONDS),
  3450. "For metric class org.apache.hadoop.hive.common.metrics.metrics2.JsonFileMetricsReporter, " +
  3451. "the frequency of updating JSON metrics file."),
  3452. HIVE_METRICS_HADOOP2_INTERVAL("hive.service.metrics.hadoop2.frequency", "30s",
  3453. new TimeValidator(TimeUnit.SECONDS),
  3454. "For metric class org.apache.hadoop.hive.common.metrics.metrics2.Metrics2Reporter, " +
  3455. "the frequency of updating the HADOOP2 metrics system."),
  3456. HIVE_METRICS_HADOOP2_COMPONENT_NAME("hive.service.metrics.hadoop2.component",
  3457. "hive",
  3458. "Component name to provide to Hadoop2 Metrics system. Ideally 'hivemetastore' for the MetaStore " +
  3459. " and and 'hiveserver2' for HiveServer2."
  3460. ),
  3461. HIVE_PERF_LOGGER("hive.exec.perf.logger", "org.apache.hadoop.hive.ql.log.PerfLogger",
  3462. "The class responsible for logging client side performance metrics. \n" +
  3463. "Must be a subclass of org.apache.hadoop.hive.ql.log.PerfLogger"),
  3464. HIVE_START_CLEANUP_SCRATCHDIR("hive.start.cleanup.scratchdir", false,
  3465. "To cleanup the Hive scratchdir when starting the Hive Server"),
  3466. HIVE_SCRATCH_DIR_LOCK("hive.scratchdir.lock", false,
  3467. "To hold a lock file in scratchdir to prevent to be removed by cleardanglingscratchdir"),
  3468. HIVE_INSERT_INTO_MULTILEVEL_DIRS("hive.insert.into.multilevel.dirs", false,
  3469. "Where to insert into multilevel directories like\n" +
  3470. "\"insert directory '/HIVEFT25686/chinna/' from table\""),
  3471. HIVE_CTAS_EXTERNAL_TABLES("hive.ctas.external.tables", true,
  3472. "whether CTAS for external tables is allowed"),
  3473. HIVE_INSERT_INTO_EXTERNAL_TABLES("hive.insert.into.external.tables", true,
  3474. "whether insert into external tables is allowed"),
  3475. HIVE_TEMPORARY_TABLE_STORAGE(
  3476. "hive.exec.temporary.table.storage", "default", new StringSet("memory",
  3477. "ssd", "default"), "Define the storage policy for temporary tables." +
  3478. "Choices between memory, ssd and default"),
  3479. HIVE_QUERY_LIFETIME_HOOKS("hive.query.lifetime.hooks", "",
  3480. "A comma separated list of hooks which implement QueryLifeTimeHook. These will be triggered" +
  3481. " before/after query compilation and before/after query execution, in the order specified." +
  3482. "Implementations of QueryLifeTimeHookWithParseHooks can also be specified in this list. If they are" +
  3483. "specified then they will be invoked in the same places as QueryLifeTimeHooks and will be invoked during pre " +
  3484. "and post query parsing"),
  3485. HIVE_DRIVER_RUN_HOOKS("hive.exec.driver.run.hooks", "",
  3486. "A comma separated list of hooks which implement HiveDriverRunHook. Will be run at the beginning " +
  3487. "and end of Driver.run, these will be run in the order specified."),
  3488. HIVE_DDL_OUTPUT_FORMAT("hive.ddl.output.format", null,
  3489. "The data format to use for DDL output. One of \"text\" (for human\n" +
  3490. "readable text) or \"json\" (for a json object)."),
  3491. HIVE_ENTITY_SEPARATOR("hive.entity.separator", "@",
  3492. "Separator used to construct names of tables and partitions. For example, dbname@tablename@partitionname"),
  3493. HIVE_CAPTURE_TRANSFORM_ENTITY("hive.entity.capture.transform", false,
  3494. "Compiler to capture transform URI referred in the query"),
  3495. HIVE_DISPLAY_PARTITION_COLUMNS_SEPARATELY("hive.display.partition.cols.separately", true,
  3496. "In older Hive version (0.10 and earlier) no distinction was made between\n" +
  3497. "partition columns or non-partition columns while displaying columns in describe\n" +
  3498. "table. From 0.12 onwards, they are displayed separately. This flag will let you\n" +
  3499. "get old behavior, if desired. See, test-case in patch for HIVE-6689."),
  3500. HIVE_LINEAGE_INFO("hive.lineage.hook.info.enabled", false,
  3501. "Whether Hive provides lineage information to hooks."),
  3502. HIVE_SSL_PROTOCOL_BLACKLIST("hive.ssl.protocol.blacklist", "SSLv2,SSLv3",
  3503. "SSL Versions to disable for all Hive Servers"),
  3504. HIVE_PRIVILEGE_SYNCHRONIZER("hive.privilege.synchronizer", false,
  3505. "Whether to synchronize privileges from external authorizer periodically in HS2"),
  3506. HIVE_PRIVILEGE_SYNCHRONIZER_INTERVAL("hive.privilege.synchronizer.interval",
  3507. "1800s", new TimeValidator(TimeUnit.SECONDS),
  3508. "Interval to synchronize privileges from external authorizer periodically in HS2"),
  3509. // HiveServer2 specific configs
  3510. HIVE_SERVER2_CLEAR_DANGLING_SCRATCH_DIR("hive.server2.clear.dangling.scratchdir", false,
  3511. "Clear dangling scratch dir periodically in HS2"),
  3512. HIVE_SERVER2_CLEAR_DANGLING_SCRATCH_DIR_INTERVAL("hive.server2.clear.dangling.scratchdir.interval",
  3513. "1800s", new TimeValidator(TimeUnit.SECONDS),
  3514. "Interval to clear dangling scratch dir periodically in HS2"),
  3515. HIVE_SERVER2_SLEEP_INTERVAL_BETWEEN_START_ATTEMPTS("hive.server2.sleep.interval.between.start.attempts",
  3516. "60s", new TimeValidator(TimeUnit.MILLISECONDS, 0l, true, Long.MAX_VALUE, true),
  3517. "Amount of time to sleep between HiveServer2 start attempts. Primarily meant for tests"),
  3518. HIVE_SERVER2_MAX_START_ATTEMPTS("hive.server2.max.start.attempts", 30L, new RangeValidator(0L, null),
  3519. "Number of times HiveServer2 will attempt to start before exiting. The sleep interval between retries" +
  3520. " is determined by " + ConfVars.HIVE_SERVER2_SLEEP_INTERVAL_BETWEEN_START_ATTEMPTS.varname +
  3521. "\n The default of 30 will keep trying for 30 minutes."),
  3522. HIVE_SERVER2_SUPPORT_DYNAMIC_SERVICE_DISCOVERY("hive.server2.support.dynamic.service.discovery", false,
  3523. "Whether HiveServer2 supports dynamic service discovery for its clients. " +
  3524. "To support this, each instance of HiveServer2 currently uses ZooKeeper to register itself, " +
  3525. "when it is brought up. JDBC/ODBC clients should use the ZooKeeper ensemble: " +
  3526. "hive.zookeeper.quorum in their connection string."),
  3527. HIVE_SERVER2_ZOOKEEPER_NAMESPACE("hive.server2.zookeeper.namespace", "hiveserver2",
  3528. "The parent node in ZooKeeper used by HiveServer2 when supporting dynamic service discovery."),
  3529. HIVE_SERVER2_ZOOKEEPER_PUBLISH_CONFIGS("hive.server2.zookeeper.publish.configs", true,
  3530. "Whether we should publish HiveServer2's configs to ZooKeeper."),
  3531. // HiveServer2 global init file location
  3532. HIVE_SERVER2_GLOBAL_INIT_FILE_LOCATION("hive.server2.global.init.file.location", "${env:HIVE_CONF_DIR}",
  3533. "Either the location of a HS2 global init file or a directory containing a .hiverc file. If the \n" +
  3534. "property is set, the value must be a valid path to an init file or directory where the init file is located."),
  3535. HIVE_SERVER2_TRANSPORT_MODE("hive.server2.transport.mode",
  3536. HiveServer2TransportMode.binary.toString(),
  3537. new StringSet(HiveServer2TransportMode.binary.toString(),
  3538. HiveServer2TransportMode.http.toString(), HiveServer2TransportMode.all.toString()),
  3539. "Transport mode of HiveServer2."),
  3540. HIVE_SERVER2_THRIFT_BIND_HOST("hive.server2.thrift.bind.host", "",
  3541. "Bind host on which to run the HiveServer2 Thrift service."),
  3542. HIVE_SERVER2_PARALLEL_COMPILATION("hive.driver.parallel.compilation", false, "Whether to\n" +
  3543. "enable parallel compilation of the queries between sessions and within the same session on HiveServer2. The default is false."),
  3544. HIVE_SERVER2_PARALLEL_COMPILATION_LIMIT("hive.driver.parallel.compilation.global.limit", -1, "Determines the " +
  3545. "degree of parallelism for queries compilation between sessions on HiveServer2. The default is -1."),
  3546. HIVE_SERVER2_COMPILE_LOCK_TIMEOUT("hive.server2.compile.lock.timeout", "0s",
  3547. new TimeValidator(TimeUnit.SECONDS),
  3548. "Number of seconds a request will wait to acquire the compile lock before giving up. " +
  3549. "Setting it to 0s disables the timeout."),
  3550. HIVE_SERVER2_PARALLEL_OPS_IN_SESSION("hive.server2.parallel.ops.in.session", true,
  3551. "Whether to allow several parallel operations (such as SQL statements) in one session."),
  3552. HIVE_SERVER2_MATERIALIZED_VIEWS_REGISTRY_IMPL("hive.server2.materializedviews.registry.impl", "DEFAULT",
  3553. new StringSet("DEFAULT", "DUMMY"),
  3554. "The implementation that we should use for the materialized views registry. \n" +
  3555. " DEFAULT: Default cache for materialized views\n" +
  3556. " DUMMY: Do not cache materialized views and hence forward requests to metastore"),
  3557. HIVE_SERVER2_MATERIALIZED_VIEWS_REGISTRY_REFRESH("hive.server2.materializedviews.registry.refresh.period", "1500s",
  3558. new TimeValidator(TimeUnit.SECONDS),
  3559. "Period, specified in seconds, between successive refreshes of the registry to pull new materializations " +
  3560. "from the metastore that may have been created by other HS2 instances."),
  3561. // HiveServer2 WebUI
  3562. HIVE_SERVER2_WEBUI_BIND_HOST("hive.server2.webui.host", "0.0.0.0", "The host address the HiveServer2 WebUI will listen on"),
  3563. HIVE_SERVER2_WEBUI_PORT("hive.server2.webui.port", 10002, "The port the HiveServer2 WebUI will listen on. This can be"
  3564. + "set to 0 or a negative integer to disable the web UI"),
  3565. HIVE_SERVER2_WEBUI_MAX_THREADS("hive.server2.webui.max.threads", 50, "The max HiveServer2 WebUI threads"),
  3566. HIVE_SERVER2_WEBUI_USE_SSL("hive.server2.webui.use.ssl", false,
  3567. "Set this to true for using SSL encryption for HiveServer2 WebUI."),
  3568. HIVE_SERVER2_WEBUI_SSL_KEYSTORE_PATH("hive.server2.webui.keystore.path", "",
  3569. "SSL certificate keystore location for HiveServer2 WebUI."),
  3570. HIVE_SERVER2_WEBUI_SSL_KEYSTORE_PASSWORD("hive.server2.webui.keystore.password", "",
  3571. "SSL certificate keystore password for HiveServer2 WebUI."),
  3572. HIVE_SERVER2_WEBUI_SSL_KEYSTORE_TYPE("hive.server2.webui.keystore.type", "",
  3573. "SSL certificate keystore type for HiveServer2 WebUI."),
  3574. HIVE_SERVER2_WEBUI_SSL_EXCLUDE_CIPHERSUITES("hive.server2.webui.exclude.ciphersuites", "",
  3575. "SSL a list of exclude cipher suite names or regular expressions separated by comma"
  3576. + " for HiveServer2 WebUI."),
  3577. HIVE_SERVER2_WEBUI_SSL_KEYMANAGERFACTORY_ALGORITHM("hive.server2.webui.keymanagerfactory.algorithm",
  3578. "","SSL certificate key manager factory algorithm for HiveServer2 WebUI."),
  3579. HIVE_SERVER2_WEBUI_USE_SPNEGO("hive.server2.webui.use.spnego", false,
  3580. "If true, the HiveServer2 WebUI will be secured with SPNEGO. Clients must authenticate with Kerberos."),
  3581. HIVE_SERVER2_WEBUI_SPNEGO_KEYTAB("hive.server2.webui.spnego.keytab", "",
  3582. "The path to the Kerberos Keytab file containing the HiveServer2 WebUI SPNEGO service principal."),
  3583. HIVE_SERVER2_WEBUI_SPNEGO_PRINCIPAL("hive.server2.webui.spnego.principal",
  3584. "HTTP/_HOST@EXAMPLE.COM", "The HiveServer2 WebUI SPNEGO service principal.\n" +
  3585. "The special string _HOST will be replaced automatically with \n" +
  3586. "the value of hive.server2.webui.host or the correct host name."),
  3587. HIVE_SERVER2_WEBUI_MAX_HISTORIC_QUERIES("hive.server2.webui.max.historic.queries", 25,
  3588. "The maximum number of past queries to show in HiverSever2 WebUI."),
  3589. HIVE_SERVER2_WEBUI_USE_PAM("hive.server2.webui.use.pam", false,
  3590. "If true, the HiveServer2 WebUI will be secured with PAM."),
  3591. HIVE_SERVER2_WEBUI_EXPLAIN_OUTPUT("hive.server2.webui.explain.output", false,
  3592. "When set to true, the EXPLAIN output for every query is displayed"
  3593. + " in the HS2 WebUI / Drilldown / Query Plan tab.\n"),
  3594. HIVE_SERVER2_WEBUI_SHOW_GRAPH("hive.server2.webui.show.graph", false,
  3595. "Set this to true to to display query plan as a graph instead of text in the WebUI. " +
  3596. "Only works with hive.server2.webui.explain.output set to true."),
  3597. HIVE_SERVER2_WEBUI_MAX_GRAPH_SIZE("hive.server2.webui.max.graph.size", 25,
  3598. "Max number of stages graph can display. If number of stages exceeds this, no query" +
  3599. "plan will be shown. Only works when hive.server2.webui.show.graph and " +
  3600. "hive.server2.webui.explain.output set to true."),
  3601. HIVE_SERVER2_WEBUI_SHOW_STATS("hive.server2.webui.show.stats", false,
  3602. "Set this to true to to display statistics for MapReduce tasks in the WebUI. " +
  3603. "Only works when hive.server2.webui.show.graph and hive.server2.webui.explain.output " +
  3604. "set to true."),
  3605. HIVE_SERVER2_WEBUI_ENABLE_CORS("hive.server2.webui.enable.cors", false,
  3606. "Whether to enable cross origin requests (CORS)\n"),
  3607. HIVE_SERVER2_WEBUI_CORS_ALLOWED_ORIGINS("hive.server2.webui.cors.allowed.origins", "*",
  3608. "Comma separated list of origins that are allowed when CORS is enabled.\n"),
  3609. HIVE_SERVER2_WEBUI_CORS_ALLOWED_METHODS("hive.server2.webui.cors.allowed.methods", "GET,POST,DELETE,HEAD",
  3610. "Comma separated list of http methods that are allowed when CORS is enabled.\n"),
  3611. HIVE_SERVER2_WEBUI_CORS_ALLOWED_HEADERS("hive.server2.webui.cors.allowed.headers",
  3612. "X-Requested-With,Content-Type,Accept,Origin",
  3613. "Comma separated list of http headers that are allowed when CORS is enabled.\n"),
  3614. HIVE_SERVER2_WEBUI_XFRAME_ENABLED("hive.server2.webui.xframe.enabled", true,
  3615. "Whether to enable xframe\n"),
  3616. HIVE_SERVER2_WEBUI_XFRAME_VALUE("hive.server2.webui.xframe.value", "SAMEORIGIN",
  3617. "Configuration to allow the user to set the x_frame-options value\n"),
  3618. HIVE_SERVER2_SHOW_OPERATION_DRILLDOWN_LINK("hive.server2.show.operation.drilldown.link", false,
  3619. "Whether to show the operation's drilldown link to thrift client.\n"),
  3620. // Tez session settings
  3621. HIVE_SERVER2_ACTIVE_PASSIVE_HA_ENABLE("hive.server2.active.passive.ha.enable", false,
  3622. "Whether HiveServer2 Active/Passive High Availability be enabled when Hive Interactive sessions are enabled." +
  3623. "This will also require hive.server2.support.dynamic.service.discovery to be enabled."),
  3624. HIVE_SERVER2_ACTIVE_PASSIVE_HA_REGISTRY_NAMESPACE("hive.server2.active.passive.ha.registry.namespace",
  3625. "hs2ActivePassiveHA",
  3626. "When HiveServer2 Active/Passive High Availability is enabled, uses this namespace for registering HS2\n" +
  3627. "instances with zookeeper"),
  3628. HIVE_SERVER2_TEZ_INTERACTIVE_QUEUE("hive.server2.tez.interactive.queue", "",
  3629. "A single YARN queues to use for Hive Interactive sessions. When this is specified,\n" +
  3630. "workload management is enabled and used for these sessions."),
  3631. HIVE_SERVER2_WM_NAMESPACE("hive.server2.wm.namespace", "default",
  3632. "The WM namespace to use when one metastore is used by multiple compute clusters each \n" +
  3633. "with their own workload management. The special value 'default' (the default) will \n" +
  3634. "also include any resource plans created before the namespaces were introduced."),
  3635. HIVE_SERVER2_WM_WORKER_THREADS("hive.server2.wm.worker.threads", 4,
  3636. "Number of worker threads to use to perform the synchronous operations with Tez\n" +
  3637. "sessions for workload management (e.g. opening, closing, etc.)"),
  3638. HIVE_SERVER2_WM_ALLOW_ANY_POOL_VIA_JDBC("hive.server2.wm.allow.any.pool.via.jdbc", false,
  3639. "Applies when a user specifies a target WM pool in the JDBC connection string. If\n" +
  3640. "false, the user can only specify a pool he is mapped to (e.g. make a choice among\n" +
  3641. "multiple group mappings); if true, the user can specify any existing pool."),
  3642. HIVE_SERVER2_WM_POOL_METRICS("hive.server2.wm.pool.metrics", true,
  3643. "Whether per-pool WM metrics should be enabled."),
  3644. HIVE_SERVER2_TEZ_WM_AM_REGISTRY_TIMEOUT("hive.server2.tez.wm.am.registry.timeout", "30s",
  3645. new TimeValidator(TimeUnit.SECONDS),
  3646. "The timeout for AM registry registration, after which (on attempting to use the\n" +
  3647. "session), we kill it and try to get another one."),
  3648. HIVE_SERVER2_WM_DELAYED_MOVE("hive.server2.wm.delayed.move", false,
  3649. "Determines behavior of the wm move trigger when destination pool is full.\n" +
  3650. "If true, the query will run in source pool as long as possible if destination pool is full;\n" +
  3651. "if false, the query will be killed if destination pool is full."),
  3652. HIVE_SERVER2_WM_DELAYED_MOVE_TIMEOUT("hive.server2.wm.delayed.move.timeout", "3600",
  3653. new TimeValidator(TimeUnit.SECONDS),
  3654. "The amount of time a delayed move is allowed to run in the source pool,\n" +
  3655. "when a delayed move session times out, the session is moved to the destination pool.\n" +
  3656. "A value of 0 indicates no timeout"),
  3657. HIVE_SERVER2_WM_DELAYED_MOVE_VALIDATOR_INTERVAL("hive.server2.wm.delayed.move.validator.interval", "60",
  3658. new TimeValidator(TimeUnit.SECONDS),
  3659. "Interval for checking for expired delayed moves."),
  3660. HIVE_SERVER2_TEZ_DEFAULT_QUEUES("hive.server2.tez.default.queues", "",
  3661. "A list of comma separated values corresponding to YARN queues of the same name.\n" +
  3662. "When HiveServer2 is launched in Tez mode, this configuration needs to be set\n" +
  3663. "for multiple Tez sessions to run in parallel on the cluster."),
  3664. HIVE_SERVER2_TEZ_SESSIONS_PER_DEFAULT_QUEUE("hive.server2.tez.sessions.per.default.queue", 1,
  3665. "A positive integer that determines the number of Tez sessions that should be\n" +
  3666. "launched on each of the queues specified by \"hive.server2.tez.default.queues\".\n" +
  3667. "Determines the parallelism on each queue."),
  3668. HIVE_SERVER2_TEZ_INITIALIZE_DEFAULT_SESSIONS("hive.server2.tez.initialize.default.sessions",
  3669. true,
  3670. "This flag is used in HiveServer2 to enable a user to use HiveServer2 without\n" +
  3671. "turning on Tez for HiveServer2. The user could potentially want to run queries\n" +
  3672. "over Tez without the pool of sessions."),
  3673. HIVE_SERVER2_TEZ_QUEUE_ACCESS_CHECK("hive.server2.tez.queue.access.check", false,
  3674. "Whether to check user access to explicitly specified YARN queues. " +
  3675. "yarn.resourcemanager.webapp.address must be configured to use this."),
  3676. HIVE_SERVER2_TEZ_SESSION_LIFETIME("hive.server2.tez.session.lifetime", "162h",
  3677. new TimeValidator(TimeUnit.HOURS),
  3678. "The lifetime of the Tez sessions launched by HS2 when default sessions are enabled.\n" +
  3679. "Set to 0 to disable session expiration."),
  3680. HIVE_SERVER2_TEZ_SESSION_LIFETIME_JITTER("hive.server2.tez.session.lifetime.jitter", "3h",
  3681. new TimeValidator(TimeUnit.HOURS),
  3682. "The jitter for Tez session lifetime; prevents all the sessions from restarting at once."),
  3683. HIVE_SERVER2_TEZ_SESSION_MAX_INIT_THREADS("hive.server2.tez.sessions.init.threads", 16,
  3684. "If hive.server2.tez.initialize.default.sessions is enabled, the maximum number of\n" +
  3685. "threads to use to initialize the default sessions."),
  3686. HIVE_SERVER2_TEZ_SESSION_RESTRICTED_CONFIGS("hive.server2.tez.sessions.restricted.configs", "",
  3687. "The configuration settings that cannot be set when submitting jobs to HiveServer2. If\n" +
  3688. "any of these are set to values different from those in the server configuration, an\n" +
  3689. "exception will be thrown."),
  3690. HIVE_SERVER2_TEZ_SESSION_CUSTOM_QUEUE_ALLOWED("hive.server2.tez.sessions.custom.queue.allowed",
  3691. "true", new StringSet("true", "false", "ignore"),
  3692. "Whether Tez session pool should allow submitting queries to custom queues. The options\n" +
  3693. "are true, false (error out), ignore (accept the query but ignore the queue setting)."),
  3694. // Operation log configuration
  3695. HIVE_SERVER2_LOGGING_OPERATION_ENABLED("hive.server2.logging.operation.enabled", true,
  3696. "When true, HS2 will save operation logs and make them available for clients"),
  3697. HIVE_SERVER2_LOGGING_OPERATION_LOG_LOCATION("hive.server2.logging.operation.log.location",
  3698. "${system:java.io.tmpdir}" + File.separator + "${system:user.name}" + File.separator +
  3699. "operation_logs",
  3700. "Top level directory where operation logs are stored if logging functionality is enabled"),
  3701. HIVE_SERVER2_LOGGING_OPERATION_LEVEL("hive.server2.logging.operation.level", "EXECUTION",
  3702. new StringSet("NONE", "EXECUTION", "PERFORMANCE", "VERBOSE"),
  3703. "HS2 operation logging mode available to clients to be set at session level.\n" +
  3704. "For this to work, hive.server2.logging.operation.enabled should be set to true.\n" +
  3705. " NONE: Ignore any logging\n" +
  3706. " EXECUTION: Log completion of tasks\n" +
  3707. " PERFORMANCE: Execution + Performance logs \n" +
  3708. " VERBOSE: All logs" ),
  3709. HIVE_SERVER2_OPERATION_LOG_CLEANUP_DELAY("hive.server2.operation.log.cleanup.delay", "300s",
  3710. new TimeValidator(TimeUnit.SECONDS), "When a query is cancelled (via kill query, query timeout or triggers),\n" +
  3711. " operation logs gets cleaned up after this delay"),
  3712. HIVE_SERVER2_OPERATION_LOG_PURGEPOLICY_TIMETOLIVE("hive.server2.operation.log.purgePolicy.timeToLive",
  3713. "60s", new TimeValidator(TimeUnit.SECONDS),
  3714. "Number of seconds the appender, which has been dynamically created by Log4J framework for the " +
  3715. "operation log, should survive without having any events sent to it. For more details, check " +
  3716. "Log4J's IdlePurgePolicy."),
  3717. HIVE_SERVER2_HISTORIC_OPERATION_LOG_ENABLED("hive.server2.historic.operation.log.enabled", false,
  3718. "Keep the operation log for some time until the operation's query info is evicted from QueryInfoCache."),
  3719. HIVE_SERVER2_HISTORIC_OPERATION_LOG_CHECK_INTERVAL("hive.server2.historic.operation.log.check.interval", "15m",
  3720. new TimeValidator(TimeUnit.MILLISECONDS, 3000l, true, null, false),
  3721. "The check interval for cleaning up the historic operation log and session dirs, " +
  3722. "which should be used only if hive.server2.historic.operation.log.enabled is enabled."),
  3723. HIVE_SERVER2_HISTORIC_OPERATION_LOG_FETCH_MAXBYTES("hive.server2.operation.log.fetch.maxBytes", "4Mb",
  3724. new SizeValidator(1L, true, (long)Integer.MAX_VALUE, false),
  3725. "The buffer size for fetching the operation log, " +
  3726. "which should be used only if hive.server2.historic.operation.log.enabled is enabled."),
  3727. // HS2 connections guard rails
  3728. HIVE_SERVER2_LIMIT_CONNECTIONS_PER_USER("hive.server2.limit.connections.per.user", 0,
  3729. "Maximum hive server2 connections per user. Any user exceeding this limit will not be allowed to connect. " +
  3730. "Default=0 does not enforce limits."),
  3731. HIVE_SERVER2_LIMIT_CONNECTIONS_PER_IPADDRESS("hive.server2.limit.connections.per.ipaddress", 0,
  3732. "Maximum hive server2 connections per ipaddress. Any ipaddress exceeding this limit will not be allowed " +
  3733. "to connect. Default=0 does not enforce limits."),
  3734. HIVE_SERVER2_LIMIT_CONNECTIONS_PER_USER_IPADDRESS("hive.server2.limit.connections.per.user.ipaddress", 0,
  3735. "Maximum hive server2 connections per user:ipaddress combination. Any user-ipaddress exceeding this limit will " +
  3736. "not be allowed to connect. Default=0 does not enforce limits."),
  3737. // Enable metric collection for HiveServer2
  3738. HIVE_SERVER2_METRICS_ENABLED("hive.server2.metrics.enabled", false, "Enable metrics on the HiveServer2."),
  3739. // http (over thrift) transport settings
  3740. HIVE_SERVER2_THRIFT_HTTP_PORT("hive.server2.thrift.http.port", 10001,
  3741. "Port number of HiveServer2 Thrift interface when hive.server2.transport.mode is 'http'."),
  3742. HIVE_SERVER2_THRIFT_HTTP_PATH("hive.server2.thrift.http.path", "cliservice",
  3743. "Path component of URL endpoint when in HTTP mode."),
  3744. HIVE_SERVER2_THRIFT_MAX_MESSAGE_SIZE("hive.server2.thrift.max.message.size", 100*1024*1024,
  3745. "Maximum message size in bytes a HS2 server will accept."),
  3746. HIVE_SERVER2_THRIFT_HTTP_MAX_IDLE_TIME("hive.server2.thrift.http.max.idle.time", "1800s",
  3747. new TimeValidator(TimeUnit.MILLISECONDS),
  3748. "Maximum idle time for a connection on the server when in HTTP mode."),
  3749. HIVE_SERVER2_THRIFT_HTTP_WORKER_KEEPALIVE_TIME("hive.server2.thrift.http.worker.keepalive.time", "60s",
  3750. new TimeValidator(TimeUnit.SECONDS),
  3751. "Keepalive time for an idle http worker thread. When the number of workers exceeds min workers, " +
  3752. "excessive threads are killed after this time interval."),
  3753. HIVE_SERVER2_THRIFT_HTTP_REQUEST_HEADER_SIZE("hive.server2.thrift.http.request.header.size", 6*1024,
  3754. "Request header size in bytes, when using HTTP transport mode. Jetty defaults used."),
  3755. HIVE_SERVER2_THRIFT_HTTP_RESPONSE_HEADER_SIZE("hive.server2.thrift.http.response.header.size", 6*1024,
  3756. "Response header size in bytes, when using HTTP transport mode. Jetty defaults used."),
  3757. HIVE_SERVER2_THRIFT_HTTP_COMPRESSION_ENABLED("hive.server2.thrift.http.compression.enabled", true,
  3758. "Enable thrift http compression via Jetty compression support"),
  3759. // Cookie based authentication when using HTTP Transport
  3760. HIVE_SERVER2_THRIFT_HTTP_COOKIE_AUTH_ENABLED("hive.server2.thrift.http.cookie.auth.enabled", true,
  3761. "When true, HiveServer2 in HTTP transport mode, will use cookie based authentication mechanism."),
  3762. HIVE_SERVER2_THRIFT_HTTP_COOKIE_MAX_AGE("hive.server2.thrift.http.cookie.max.age", "86400s",
  3763. new TimeValidator(TimeUnit.SECONDS),
  3764. "Maximum age in seconds for server side cookie used by HS2 in HTTP mode."),
  3765. HIVE_SERVER2_THRIFT_HTTP_COOKIE_DOMAIN("hive.server2.thrift.http.cookie.domain", null,
  3766. "Domain for the HS2 generated cookies"),
  3767. HIVE_SERVER2_THRIFT_HTTP_COOKIE_PATH("hive.server2.thrift.http.cookie.path", null,
  3768. "Path for the HS2 generated cookies"),
  3769. @Deprecated
  3770. HIVE_SERVER2_THRIFT_HTTP_COOKIE_IS_SECURE("hive.server2.thrift.http.cookie.is.secure", true,
  3771. "Deprecated: Secure attribute of the HS2 generated cookie (this is automatically enabled for SSL enabled HiveServer2)."),
  3772. HIVE_SERVER2_THRIFT_HTTP_COOKIE_IS_HTTPONLY("hive.server2.thrift.http.cookie.is.httponly", true,
  3773. "HttpOnly attribute of the HS2 generated cookie."),
  3774. // binary transport settings
  3775. HIVE_SERVER2_THRIFT_PORT("hive.server2.thrift.port", 10000,
  3776. "Port number of HiveServer2 Thrift interface when hive.server2.transport.mode is 'binary'."),
  3777. HIVE_SERVER2_THRIFT_SASL_QOP("hive.server2.thrift.sasl.qop", "auth",
  3778. new StringSet("auth", "auth-int", "auth-conf"),
  3779. "Sasl QOP value; set it to one of following values to enable higher levels of\n" +
  3780. "protection for HiveServer2 communication with clients.\n" +
  3781. "Setting hadoop.rpc.protection to a higher level than HiveServer2 does not\n" +
  3782. "make sense in most situations. HiveServer2 ignores hadoop.rpc.protection in favor\n" +
  3783. "of hive.server2.thrift.sasl.qop.\n" +
  3784. " \"auth\" - authentication only (default)\n" +
  3785. " \"auth-int\" - authentication plus integrity protection\n" +
  3786. " \"auth-conf\" - authentication plus integrity and confidentiality protection\n" +
  3787. "This is applicable only if HiveServer2 is configured to use Kerberos authentication."),
  3788. HIVE_SERVER2_THRIFT_MIN_WORKER_THREADS("hive.server2.thrift.min.worker.threads", 5,
  3789. "Minimum number of Thrift worker threads"),
  3790. HIVE_SERVER2_THRIFT_MAX_WORKER_THREADS("hive.server2.thrift.max.worker.threads", 500,
  3791. "Maximum number of Thrift worker threads"),
  3792. HIVE_SERVER2_THRIFT_LOGIN_BEBACKOFF_SLOT_LENGTH(
  3793. "hive.server2.thrift.exponential.backoff.slot.length", "100ms",
  3794. new TimeValidator(TimeUnit.MILLISECONDS),
  3795. "Binary exponential backoff slot time for Thrift clients during login to HiveServer2,\n" +
  3796. "for retries until hitting Thrift client timeout"),
  3797. HIVE_SERVER2_THRIFT_LOGIN_TIMEOUT("hive.server2.thrift.login.timeout", "20s",
  3798. new TimeValidator(TimeUnit.SECONDS), "Timeout for Thrift clients during login to HiveServer2"),
  3799. HIVE_SERVER2_THRIFT_WORKER_KEEPALIVE_TIME("hive.server2.thrift.worker.keepalive.time", "60s",
  3800. new TimeValidator(TimeUnit.SECONDS),
  3801. "Keepalive time (in seconds) for an idle worker thread. When the number of workers exceeds min workers, " +
  3802. "excessive threads are killed after this time interval."),
  3803. // Configuration for async thread pool in SessionManager
  3804. HIVE_SERVER2_ASYNC_EXEC_THREADS("hive.server2.async.exec.threads", 100,
  3805. "Number of threads in the async thread pool for HiveServer2"),
  3806. HIVE_SERVER2_ASYNC_EXEC_SHUTDOWN_TIMEOUT("hive.server2.async.exec.shutdown.timeout", "10s",
  3807. new TimeValidator(TimeUnit.SECONDS),
  3808. "How long HiveServer2 shutdown will wait for async threads to terminate."),
  3809. HIVE_SERVER2_ASYNC_EXEC_WAIT_QUEUE_SIZE("hive.server2.async.exec.wait.queue.size", 100,
  3810. "Size of the wait queue for async thread pool in HiveServer2.\n" +
  3811. "After hitting this limit, the async thread pool will reject new requests."),
  3812. HIVE_SERVER2_ASYNC_EXEC_KEEPALIVE_TIME("hive.server2.async.exec.keepalive.time", "10s",
  3813. new TimeValidator(TimeUnit.SECONDS),
  3814. "Time that an idle HiveServer2 async thread (from the thread pool) will wait for a new task\n" +
  3815. "to arrive before terminating"),
  3816. HIVE_SERVER2_ASYNC_EXEC_ASYNC_COMPILE("hive.server2.async.exec.async.compile", false,
  3817. "Whether to enable compiling async query asynchronously. If enabled, it is unknown if the query will have any resultset before compilation completed."),
  3818. HIVE_SERVER2_LONG_POLLING_TIMEOUT("hive.server2.long.polling.timeout", "5000ms",
  3819. new TimeValidator(TimeUnit.MILLISECONDS),
  3820. "Time that HiveServer2 will wait before responding to asynchronous calls that use long polling"),
  3821. HIVE_SESSION_IMPL_CLASSNAME("hive.session.impl.classname", null, "Classname for custom implementation of hive session"),
  3822. HIVE_SESSION_IMPL_WITH_UGI_CLASSNAME("hive.session.impl.withugi.classname", null, "Classname for custom implementation of hive session with UGI"),
  3823. // HiveServer2 auth configuration
  3824. HIVE_SERVER2_AUTHENTICATION("hive.server2.authentication", "NONE",
  3825. new StringSet("NOSASL", "NONE", "LDAP", "KERBEROS", "PAM", "CUSTOM", "SAML"),
  3826. "Client authentication types.\n" +
  3827. " NONE: no authentication check\n" +
  3828. " LDAP: LDAP/AD based authentication\n" +
  3829. " KERBEROS: Kerberos/GSSAPI authentication\n" +
  3830. " CUSTOM: Custom authentication provider\n" +
  3831. " (Use with property hive.server2.custom.authentication.class)\n" +
  3832. " PAM: Pluggable authentication module\n" +
  3833. " NOSASL: Raw transport\n" +
  3834. " SAML2: SAML 2.0 compliant authentication. This is only supported in http transport mode."),
  3835. HIVE_SERVER2_TRUSTED_DOMAIN("hive.server2.trusted.domain", "",
  3836. "Specifies the host or a domain to trust connections from. Authentication is skipped " +
  3837. "for any connection coming from a host whose hostname ends with the value of this" +
  3838. " property. If authentication is expected to be skipped for connections from " +
  3839. "only a given host, fully qualified hostname of that host should be specified. By default" +
  3840. " it is empty, which means that all the connections to HiveServer2 are authenticated. " +
  3841. "When it is non-empty, the client has to provide a Hive user name. Any password, if " +
  3842. "provided, will not be used when authentication is skipped."),
  3843. HIVE_SERVER2_TRUSTED_DOMAIN_USE_XFF_HEADER("hive.server2.trusted.domain.use.xff.header", false,
  3844. "When trusted domain authentication is enabled, the clients connecting to the HS2 could pass" +
  3845. "through many layers of proxy. Some proxies append its own ip address to 'X-Forwarded-For' header" +
  3846. "before passing on the request to another proxy or HS2. Some proxies also connect on behalf of client" +
  3847. "and may create a separate connection to HS2 without binding using client IP. For such environments, instead" +
  3848. "of looking at client IP from the request, if this config is set and if 'X-Forwarded-For' is present," +
  3849. "trusted domain authentication will use left most ip address from X-Forwarded-For header."),
  3850. HIVE_SERVER2_ALLOW_USER_SUBSTITUTION("hive.server2.allow.user.substitution", true,
  3851. "Allow alternate user to be specified as part of HiveServer2 open connection request."),
  3852. HIVE_SERVER2_KERBEROS_KEYTAB("hive.server2.authentication.kerberos.keytab", "",
  3853. "Kerberos keytab file for server principal"),
  3854. HIVE_SERVER2_KERBEROS_PRINCIPAL("hive.server2.authentication.kerberos.principal", "",
  3855. "Kerberos server principal"),
  3856. HIVE_SERVER2_CLIENT_KERBEROS_PRINCIPAL("hive.server2.authentication.client.kerberos.principal", "",
  3857. "Kerberos principal used by the HA hive_server2s."),
  3858. HIVE_SERVER2_SPNEGO_KEYTAB("hive.server2.authentication.spnego.keytab", "",
  3859. "keytab file for SPNego principal, optional,\n" +
  3860. "typical value would look like /etc/security/keytabs/spnego.service.keytab,\n" +
  3861. "This keytab would be used by HiveServer2 when Kerberos security is enabled and \n" +
  3862. "HTTP transport mode is used.\n" +
  3863. "This needs to be set only if SPNEGO is to be used in authentication.\n" +
  3864. "SPNego authentication would be honored only if valid\n" +
  3865. " hive.server2.authentication.spnego.principal\n" +
  3866. "and\n" +
  3867. " hive.server2.authentication.spnego.keytab\n" +
  3868. "are specified."),
  3869. HIVE_SERVER2_SPNEGO_PRINCIPAL("hive.server2.authentication.spnego.principal", "",
  3870. "SPNego service principal, optional,\n" +
  3871. "typical value would look like HTTP/_HOST@EXAMPLE.COM\n" +
  3872. "SPNego service principal would be used by HiveServer2 when Kerberos security is enabled\n" +
  3873. "and HTTP transport mode is used.\n" +
  3874. "This needs to be set only if SPNEGO is to be used in authentication."),
  3875. HIVE_SERVER2_PLAIN_LDAP_URL("hive.server2.authentication.ldap.url", null,
  3876. "LDAP connection URL(s),\n" +
  3877. "this value could contain URLs to multiple LDAP servers instances for HA,\n" +
  3878. "each LDAP URL is separated by a SPACE character. URLs are used in the \n" +
  3879. " order specified until a connection is successful."),
  3880. HIVE_SERVER2_PLAIN_LDAP_BASEDN("hive.server2.authentication.ldap.baseDN", null, "LDAP base DN"),
  3881. HIVE_SERVER2_PLAIN_LDAP_DOMAIN("hive.server2.authentication.ldap.Domain", null, ""),
  3882. HIVE_SERVER2_PLAIN_LDAP_GROUPDNPATTERN("hive.server2.authentication.ldap.groupDNPattern", null,
  3883. "COLON-separated list of patterns to use to find DNs for group entities in this directory.\n" +
  3884. "Use %s where the actual group name is to be substituted for.\n" +
  3885. "For example: CN=%s,CN=Groups,DC=subdomain,DC=domain,DC=com."),
  3886. HIVE_SERVER2_PLAIN_LDAP_GROUPFILTER("hive.server2.authentication.ldap.groupFilter", null,
  3887. "COMMA-separated list of LDAP Group names (short name not full DNs).\n" +
  3888. "For example: HiveAdmins,HadoopAdmins,Administrators"),
  3889. HIVE_SERVER2_PLAIN_LDAP_USERDNPATTERN("hive.server2.authentication.ldap.userDNPattern", null,
  3890. "COLON-separated list of patterns to use to find DNs for users in this directory.\n" +
  3891. "Use %s where the actual group name is to be substituted for.\n" +
  3892. "For example: CN=%s,CN=Users,DC=subdomain,DC=domain,DC=com."),
  3893. HIVE_SERVER2_PLAIN_LDAP_USERFILTER("hive.server2.authentication.ldap.userFilter", null,
  3894. "COMMA-separated list of LDAP usernames (just short names, not full DNs).\n" +
  3895. "For example: hiveuser,impalauser,hiveadmin,hadoopadmin"),
  3896. HIVE_SERVER2_PLAIN_LDAP_GUIDKEY("hive.server2.authentication.ldap.guidKey", "uid",
  3897. "LDAP attribute name whose values are unique in this LDAP server.\n" +
  3898. "For example: uid or CN."),
  3899. HIVE_SERVER2_PLAIN_LDAP_GROUPMEMBERSHIP_KEY("hive.server2.authentication.ldap.groupMembershipKey", "member",
  3900. "LDAP attribute name on the group object that contains the list of distinguished names\n" +
  3901. "for the user, group, and contact objects that are members of the group.\n" +
  3902. "For example: member, uniqueMember or memberUid"),
  3903. HIVE_SERVER2_PLAIN_LDAP_USERMEMBERSHIP_KEY(HIVE_SERVER2_AUTHENTICATION_LDAP_USERMEMBERSHIPKEY_NAME, null,
  3904. "LDAP attribute name on the user object that contains groups of which the user is\n" +
  3905. "a direct member, except for the primary group, which is represented by the\n" +
  3906. "primaryGroupId.\n" +
  3907. "For example: memberOf"),
  3908. HIVE_SERVER2_PLAIN_LDAP_GROUPCLASS_KEY("hive.server2.authentication.ldap.groupClassKey", "groupOfNames",
  3909. "LDAP attribute name on the group entry that is to be used in LDAP group searches.\n" +
  3910. "For example: group, groupOfNames or groupOfUniqueNames."),
  3911. HIVE_SERVER2_PLAIN_LDAP_CUSTOMLDAPQUERY("hive.server2.authentication.ldap.customLDAPQuery", null,
  3912. "A full LDAP query that LDAP Atn provider uses to execute against LDAP Server.\n" +
  3913. "If this query returns a null resultset, the LDAP Provider fails the Authentication\n" +
  3914. "request, succeeds if the user is part of the resultset." +
  3915. "For example: (&(objectClass=group)(objectClass=top)(instanceType=4)(cn=Domain*)) \n" +
  3916. "(&(objectClass=person)(|(sAMAccountName=admin)(|(memberOf=CN=Domain Admins,CN=Users,DC=domain,DC=com)" +
  3917. "(memberOf=CN=Administrators,CN=Builtin,DC=domain,DC=com))))"),
  3918. HIVE_SERVER2_PLAIN_LDAP_BIND_USER("hive.server2.authentication.ldap.binddn", null,
  3919. "The user with which to bind to the LDAP server, and search for the full domain name " +
  3920. "of the user being authenticated.\n" +
  3921. "This should be the full domain name of the user, and should have search access across all " +
  3922. "users in the LDAP tree.\n" +
  3923. "If not specified, then the user being authenticated will be used as the bind user.\n" +
  3924. "For example: CN=bindUser,CN=Users,DC=subdomain,DC=domain,DC=com"),
  3925. HIVE_SERVER2_PLAIN_LDAP_BIND_PASSWORD("hive.server2.authentication.ldap.bindpw", null,
  3926. "The password for the bind user, to be used to search for the full name of the user being authenticated.\n" +
  3927. "If the username is specified, this parameter must also be specified."),
  3928. HIVE_SERVER2_CUSTOM_AUTHENTICATION_CLASS("hive.server2.custom.authentication.class", null,
  3929. "Custom authentication class. Used when property\n" +
  3930. "'hive.server2.authentication' is set to 'CUSTOM'. Provided class\n" +
  3931. "must be a proper implementation of the interface\n" +
  3932. "org.apache.hive.service.auth.PasswdAuthenticationProvider. HiveServer2\n" +
  3933. "will call its Authenticate(user, passed) method to authenticate requests.\n" +
  3934. "The implementation may optionally implement Hadoop's\n" +
  3935. "org.apache.hadoop.conf.Configurable class to grab Hive's Configuration object."),
  3936. HIVE_SERVER2_PAM_SERVICES("hive.server2.authentication.pam.services", null,
  3937. "List of the underlying pam services that should be used when auth type is PAM\n" +
  3938. "A file with the same name must exist in /etc/pam.d"),
  3939. // HS2 SAML2.0 configuration
  3940. HIVE_SERVER2_SAML_KEYSTORE_PATH("hive.server2.saml2.keystore.path", "",
  3941. "Keystore path to the saml2 client. This keystore is used to store the\n"
  3942. + " key pair used to sign the authentication requests when hive.server2.saml2.sign.requests\n"
  3943. + " is set to true. If the path doesn't exist, HiveServer2 will attempt to\n"
  3944. + " create a keystore using the default configurations otherwise it will use\n"
  3945. + " the one provided."),
  3946. HIVE_SERVER2_SAML_KEYSTORE_PASSWORD("hive.server2.saml2.keystore.password", "",
  3947. "Password to the keystore used to sign the authentication requests. By default,\n"
  3948. + " this must be set to a non-blank value if the authentication mode is SAML."),
  3949. HIVE_SERVER2_SAML_PRIVATE_KEY_PASSWORD("hive.server2.saml2.private.key.password", "",
  3950. "Password for the private key which is stored in the keystore pointed \n"
  3951. + " by hive.server2.saml2.keystore.path. This key is used to sign the authentication request\n"
  3952. + " if hive.server2.saml2.sign.requests is set to true."),
  3953. HIVE_SERVER2_SAML_IDP_METADATA("hive.server2.saml2.idp.metadata", "",
  3954. "IDP metadata file for the SAML configuration. This metadata file must be\n"
  3955. + " exported from the external identity provider. This is used to validate the SAML assertions\n"
  3956. + " received by HiveServer2."),
  3957. HIVE_SERVER2_SAML_SP_ID("hive.server2.saml2.sp.entity.id", "",
  3958. "Service provider entity id for this HiveServer2. This must match with the\n"
  3959. + " SP id on the external identity provider. If this is not set, HiveServer2 will use the\n"
  3960. + " callback url as the SP id."),
  3961. HIVE_SERVER2_SAML_FORCE_AUTH("hive.server2.saml2.sp.force.auth", "false",
  3962. "This is a boolean configuration which toggles the force authentication\n"
  3963. + " flag in the SAML authentication request. When set to true, the request generated\n"
  3964. + " to the IDP will ask the IDP to force the authentication again."),
  3965. HIVE_SERVER2_SAML_AUTHENTICATION_LIFETIME(
  3966. "hive.server2.saml2.max.authentication.lifetime", "1h",
  3967. "This configuration can be used to set the lifetime of the\n"
  3968. + " authentication response from IDP. Generally the IDP will not ask\n"
  3969. + " you enter credentials if you have a authenticated session with it already.\n"
  3970. + " The IDP will automatically generate an assertion in such a case. This configuration\n"
  3971. + " can be used to set the time limit for such assertions. Assertions which are\n"
  3972. + " older than this value will not be accepted by HiveServer2. The default\n"
  3973. + " is one hour."),
  3974. HIVE_SERVER2_SAML_BLACKLISTED_SIGNATURE_ALGORITHMS(
  3975. "hive.server2.saml2.blacklisted.signature.algorithms", "",
  3976. "Comma separated list of signature algorithm names which are not\n"
  3977. + " allowed by HiveServer2 during validation of the assertions received from IDP"),
  3978. HIVE_SERVER2_SAML_ACS_INDEX("hive.server2.saml2.acs.index", "",
  3979. "This configuration specifies the assertion consumer service (ACS)\n"
  3980. + " index to be sent to the IDP in case it support multiple ACS URLs. This\n"
  3981. + " will also be used to pick the ACS URL from the IDP metadata for validation."),
  3982. HIVE_SERVER2_SAML_CALLBACK_URL("hive.server2.saml2.sp.callback.url", "",
  3983. "Callback URL where SAML responses should be posted. Currently this\n" +
  3984. " must be configured at the same port number as defined by hive.server2.thrift.http.port."),
  3985. HIVE_SERVER2_SAML_WANT_ASSERTIONS_SIGNED("hive.server2.saml2.want.assertions.signed", true,
  3986. "When this configuration is set to true, hive server2 will validate the signature\n"
  3987. + " of the assertions received at the callback url. For security reasons, it is recommended"
  3988. + "that this value should be true."),
  3989. HIVE_SERVER2_SAML_SIGN_REQUESTS("hive.server2.saml2.sign.requests", false,
  3990. "When this configuration is set to true, HiveServer2 will sign the SAML requests\n" +
  3991. " which can be validated by the IDP provider."),
  3992. HIVE_SERVER2_SAML_CALLBACK_TOKEN_TTL("hive.server2.saml2.callback.token.ttl", "30s",
  3993. new TimeValidator(TimeUnit.MILLISECONDS), "Time for which the token issued by\n"
  3994. + "service provider is valid."),
  3995. HIVE_SERVER2_SAML_GROUP_ATTRIBUTE_NAME("hive.server2.saml2.group.attribute.name",
  3996. "", "The attribute name in the SAML assertion which would\n"
  3997. + " be used to compare for the group name matching. By default it is empty\n"
  3998. + " which would allow any authenticated user. If this value is set then\n"
  3999. + " then hive.server2.saml2.group.filter must be set to a non-empty value."),
  4000. HIVE_SERVER2_SAML_GROUP_FILTER("hive.server2.saml2.group.filter", "",
  4001. "Comma separated list of group names which will be allowed when SAML\n"
  4002. + " authentication is enabled."),
  4003. HIVE_SERVER2_ENABLE_DOAS("hive.server2.enable.doAs", true,
  4004. "Setting this property to true will have HiveServer2 execute\n" +
  4005. "Hive operations as the user making the calls to it."),
  4006. HIVE_SERVER2_SERVICE_USERS("hive.server2.service.users", null,
  4007. "Comma separated list of users to have HiveServer2 skip authorization when compiling queries."),
  4008. HIVE_DISTCP_DOAS_USER("hive.distcp.privileged.doAs","hive",
  4009. "This property allows privileged distcp executions done by hive\n" +
  4010. "to run as this user."),
  4011. HIVE_SERVER2_TABLE_TYPE_MAPPING("hive.server2.table.type.mapping", "CLASSIC", new StringSet("CLASSIC", "HIVE"),
  4012. "This setting reflects how HiveServer2 will report the table types for JDBC and other\n" +
  4013. "client implementations that retrieve the available tables and supported table types\n" +
  4014. " HIVE : Exposes Hive's native table types like MANAGED_TABLE, EXTERNAL_TABLE, VIRTUAL_VIEW\n" +
  4015. " CLASSIC : More generic types like TABLE and VIEW"),
  4016. HIVE_SERVER2_SESSION_HOOK("hive.server2.session.hook", "", ""),
  4017. // SSL settings
  4018. HIVE_SERVER2_USE_SSL("hive.server2.use.SSL", false,
  4019. "Set this to true for using SSL encryption in HiveServer2."),
  4020. HIVE_SERVER2_SSL_KEYSTORE_PATH("hive.server2.keystore.path", "",
  4021. "SSL certificate keystore location."),
  4022. HIVE_SERVER2_SSL_KEYSTORE_PASSWORD("hive.server2.keystore.password", "",
  4023. "SSL certificate keystore password."),
  4024. HIVE_SERVER2_SSL_KEYSTORE_TYPE("hive.server2.keystore.type", "",
  4025. "SSL certificate keystore type."),
  4026. HIVE_SERVER2_SSL_KEYMANAGERFACTORY_ALGORITHM("hive.server2.keymanagerfactory.algorithm", "",
  4027. "SSL certificate keystore algorithm."),
  4028. HIVE_SERVER2_SSL_HTTP_EXCLUDE_CIPHERSUITES("hive.server2.http.exclude.ciphersuites", "",
  4029. "SSL a list of exclude cipher suite names or regular expressions separated by comma "
  4030. + "for HiveServer2 http server."),
  4031. HIVE_SERVER2_SSL_BINARY_INCLUDE_CIPHERSUITES("hive.server2.binary.include.ciphersuites", "",
  4032. "SSL a list of include cipher suite names separated by colon for HiveServer2 binary Cli Server"),
  4033. HIVE_SERVER2_BUILTIN_UDF_WHITELIST("hive.server2.builtin.udf.whitelist", "",
  4034. "Comma separated list of builtin udf names allowed in queries.\n" +
  4035. "An empty whitelist allows all builtin udfs to be executed. " +
  4036. " The udf black list takes precedence over udf white list"),
  4037. HIVE_SERVER2_BUILTIN_UDF_BLACKLIST("hive.server2.builtin.udf.blacklist", "",
  4038. "Comma separated list of udfs names. These udfs will not be allowed in queries." +
  4039. " The udf black list takes precedence over udf white list"),
  4040. HIVE_ALLOW_UDF_LOAD_ON_DEMAND("hive.allow.udf.load.on.demand", false,
  4041. "Whether enable loading UDFs from metastore on demand; this is mostly relevant for\n" +
  4042. "HS2 and was the default behavior before Hive 1.2. Off by default."),
  4043. HIVE_SERVER2_SESSION_CHECK_INTERVAL("hive.server2.session.check.interval", "15m",
  4044. new TimeValidator(TimeUnit.MILLISECONDS, 3000l, true, null, false),
  4045. "The check interval for session/operation timeout, which can be disabled by setting to zero or negative value."),
  4046. HIVE_SERVER2_CLOSE_SESSION_ON_DISCONNECT("hive.server2.close.session.on.disconnect", true,
  4047. "Session will be closed when connection is closed. Set this to false to have session outlive its parent connection."),
  4048. HIVE_SERVER2_IDLE_SESSION_TIMEOUT("hive.server2.idle.session.timeout", "4h",
  4049. new TimeValidator(TimeUnit.MILLISECONDS),
  4050. "Session will be closed when it's not accessed for this duration, which can be disabled by setting to zero or negative value."),
  4051. HIVE_SERVER2_IDLE_OPERATION_TIMEOUT("hive.server2.idle.operation.timeout", "2h",
  4052. new TimeValidator(TimeUnit.MILLISECONDS),
  4053. "Operation will be closed when it's not accessed for this duration of time, which can be disabled by setting to zero value.\n" +
  4054. " With positive value, it's checked for operations in terminal state only (FINISHED, CANCELED, CLOSED, ERROR).\n" +
  4055. " With negative value, it's checked for all of the operations regardless of state."),
  4056. HIVE_SERVER2_IDLE_SESSION_CHECK_OPERATION("hive.server2.idle.session.check.operation", true,
  4057. "Session will be considered to be idle only if there is no activity, and there is no pending operation.\n" +
  4058. " This setting takes effect only if session idle timeout (hive.server2.idle.session.timeout) and checking\n" +
  4059. "(hive.server2.session.check.interval) are enabled."),
  4060. HIVE_SERVER2_THRIFT_CLIENT_RETRY_LIMIT("hive.server2.thrift.client.retry.limit", 1,"Number of retries upon " +
  4061. "failure of Thrift HiveServer2 calls"),
  4062. HIVE_SERVER2_THRIFT_CLIENT_CONNECTION_RETRY_LIMIT("hive.server2.thrift.client.connect.retry.limit", 1,"Number of " +
  4063. "retries while opening a connection to HiveServe2"),
  4064. HIVE_SERVER2_THRIFT_CLIENT_RETRY_DELAY_SECONDS("hive.server2.thrift.client.retry.delay.seconds", "1s",
  4065. new TimeValidator(TimeUnit.SECONDS), "Number of seconds for the HiveServer2 thrift client to wait between " +
  4066. "consecutive connection attempts. Also specifies the time to wait between retrying thrift calls upon failures"),
  4067. HIVE_SERVER2_THRIFT_CLIENT_USER("hive.server2.thrift.client.user", "anonymous","Username to use against thrift" +
  4068. " client"),
  4069. HIVE_SERVER2_THRIFT_CLIENT_PASSWORD("hive.server2.thrift.client.password", "anonymous","Password to use against " +
  4070. "thrift client"),
  4071. // ResultSet serialization settings
  4072. HIVE_SERVER2_THRIFT_RESULTSET_SERIALIZE_IN_TASKS("hive.server2.thrift.resultset.serialize.in.tasks", false,
  4073. "Whether we should serialize the Thrift structures used in JDBC ResultSet RPC in task nodes.\n " +
  4074. "We use SequenceFile and ThriftJDBCBinarySerDe to read and write the final results if this is true."),
  4075. // TODO: Make use of this config to configure fetch size
  4076. HIVE_SERVER2_THRIFT_RESULTSET_MAX_FETCH_SIZE("hive.server2.thrift.resultset.max.fetch.size",
  4077. 10000, "Max number of rows sent in one Fetch RPC call by the server to the client."),
  4078. HIVE_SERVER2_THRIFT_RESULTSET_DEFAULT_FETCH_SIZE("hive.server2.thrift.resultset.default.fetch.size", 1000,
  4079. "The number of rows sent in one Fetch RPC call by the server to the client, if not\n" +
  4080. "specified by the client."),
  4081. HIVE_SERVER2_XSRF_FILTER_ENABLED("hive.server2.xsrf.filter.enabled",false,
  4082. "If enabled, HiveServer2 will block any requests made to it over http " +
  4083. "if an X-XSRF-HEADER header is not present"),
  4084. HIVE_SECURITY_COMMAND_WHITELIST("hive.security.command.whitelist",
  4085. "set,reset,dfs,add,list,delete,reload,compile,llap",
  4086. "Comma separated list of non-SQL Hive commands users are authorized to execute"),
  4087. HIVE_SERVER2_JOB_CREDENTIAL_PROVIDER_PATH("hive.server2.job.credential.provider.path", "",
  4088. "If set, this configuration property should provide a comma-separated list of URLs that indicates the type and " +
  4089. "location of providers to be used by hadoop credential provider API. It provides HiveServer2 the ability to provide job-specific " +
  4090. "credential providers for jobs run using MR and Spark execution engines. This functionality has not been tested against Tez."),
  4091. HIVE_MOVE_FILES_THREAD_COUNT("hive.mv.files.thread", 15, new SizeValidator(0L, true, 1024L, true), "Number of threads"
  4092. + " used to move files in move task. Set it to 0 to disable multi-threaded file moves. This parameter is also used by"
  4093. + " MSCK to check tables."),
  4094. HIVE_LOAD_DYNAMIC_PARTITIONS_THREAD_COUNT("hive.load.dynamic.partitions.thread", 15,
  4095. new SizeValidator(1L, true, 1024L, true),
  4096. "Number of threads used to load dynamic partitions."),
  4097. HIVE_LOAD_DYNAMIC_PARTITIONS_SCAN_SPECIFIC_PARTITIONS("hive.load.dynamic.partitions.scan.specific.partitions", false,
  4098. "For the dynamic partitioned tables, scan only the specific partitions using the name from the list"),
  4099. // If this is set all move tasks at the end of a multi-insert query will only begin once all
  4100. // outputs are ready
  4101. HIVE_MULTI_INSERT_MOVE_TASKS_SHARE_DEPENDENCIES(
  4102. "hive.multi.insert.move.tasks.share.dependencies", false,
  4103. "If this is set all move tasks for tables/partitions (not directories) at the end of a\n" +
  4104. "multi-insert query will only begin once the dependencies for all these move tasks have been\n" +
  4105. "met.\n" +
  4106. "Advantages: If concurrency is enabled, the locks will only be released once the query has\n" +
  4107. " finished, so with this config enabled, the time when the table/partition is\n" +
  4108. " generated will be much closer to when the lock on it is released.\n" +
  4109. "Disadvantages: If concurrency is not enabled, with this disabled, the tables/partitions which\n" +
  4110. " are produced by this query and finish earlier will be available for querying\n" +
  4111. " much earlier. Since the locks are only released once the query finishes, this\n" +
  4112. " does not apply if concurrency is enabled."),
  4113. HIVE_HDFS_ENCRYPTION_SHIM_CACHE_ON("hive.hdfs.encryption.shim.cache.on", true,
  4114. "Hive keeps a cache of hdfs encryption shims in SessionState. Each encryption shim in the cache stores a "
  4115. + "FileSystem object. If one of these FileSystems is closed anywhere in the system and HDFS config"
  4116. + "fs.hdfs.impl.disable.cache is false, its encryption shim in the cache will be unusable. "
  4117. + "If this is config set to false, then the encryption shim cache will be disabled."),
  4118. HIVE_INFER_BUCKET_SORT("hive.exec.infer.bucket.sort", false,
  4119. "If this is set, when writing partitions, the metadata will include the bucketing/sorting\n" +
  4120. "properties with which the data was written if any (this will not overwrite the metadata\n" +
  4121. "inherited from the table if the table is bucketed/sorted)"),
  4122. HIVE_INFER_BUCKET_SORT_NUM_BUCKETS_POWER_TWO(
  4123. "hive.exec.infer.bucket.sort.num.buckets.power.two", false,
  4124. "If this is set, when setting the number of reducers for the map reduce task which writes the\n" +
  4125. "final output files, it will choose a number which is a power of two, unless the user specifies\n" +
  4126. "the number of reducers to use using mapred.reduce.tasks. The number of reducers\n" +
  4127. "may be set to a power of two, only to be followed by a merge task meaning preventing\n" +
  4128. "anything from being inferred.\n" +
  4129. "With hive.exec.infer.bucket.sort set to true:\n" +
  4130. "Advantages: If this is not set, the number of buckets for partitions will seem arbitrary,\n" +
  4131. " which means that the number of mappers used for optimized joins, for example, will\n" +
  4132. " be very low. With this set, since the number of buckets used for any partition is\n" +
  4133. " a power of two, the number of mappers used for optimized joins will be the least\n" +
  4134. " number of buckets used by any partition being joined.\n" +
  4135. "Disadvantages: This may mean a much larger or much smaller number of reducers being used in the\n" +
  4136. " final map reduce job, e.g. if a job was originally going to take 257 reducers,\n" +
  4137. " it will now take 512 reducers, similarly if the max number of reducers is 511,\n" +
  4138. " and a job was going to use this many, it will now use 256 reducers."),
  4139. HIVEOPTLISTBUCKETING("hive.optimize.listbucketing", false,
  4140. "Enable list bucketing optimizer. Default value is false so that we disable it by default."),
  4141. // Allow TCP Keep alive socket option for for HiveServer or a maximum timeout for the socket.
  4142. SERVER_READ_SOCKET_TIMEOUT("hive.server.read.socket.timeout", "10s",
  4143. new TimeValidator(TimeUnit.SECONDS),
  4144. "Timeout for the HiveServer to close the connection if no response from the client. By default, 10 seconds."),
  4145. SERVER_TCP_KEEP_ALIVE("hive.server.tcp.keepalive", true,
  4146. "Whether to enable TCP keepalive for the Hive Server. Keepalive will prevent accumulation of half-open connections."),
  4147. HIVE_DECODE_PARTITION_NAME("hive.decode.partition.name", false,
  4148. "Whether to show the unquoted partition names in query results."),
  4149. HIVE_EXECUTION_ENGINE("hive.execution.engine", "mr", new StringSet(true, "mr", "tez", "spark"),
  4150. "Chooses execution engine. Options are: mr (Map reduce, default), tez, spark. While MR\n" +
  4151. "remains the default engine for historical reasons, it is itself a historical engine\n" +
  4152. "and is deprecated in Hive 2 line. It may be removed without further warning."),
  4153. HIVE_EXECUTION_MODE("hive.execution.mode", "container", new StringSet("container", "llap"),
  4154. "Chooses whether query fragments will run in container or in llap"),
  4155. HIVE_JAR_DIRECTORY("hive.jar.directory", null,
  4156. "This is the location hive in tez mode will look for to find a site wide \n" +
  4157. "installed hive instance."),
  4158. HIVE_USER_INSTALL_DIR("hive.user.install.directory", "/user/",
  4159. "If hive (in tez mode only) cannot find a usable hive jar in \"hive.jar.directory\", \n" +
  4160. "it will upload the hive jar to \"hive.user.install.directory/user.name\"\n" +
  4161. "and use it to run queries."),
  4162. HIVE_MASKING_ALGO("hive.masking.algo","sha256", "This property is used to indicate whether " +
  4163. "FIPS mode is enabled or not. Value should be sha512 to indicate that FIPS mode is enabled." +
  4164. "Else the value should be sha256. Using this value column masking is being done"),
  4165. // Vectorization enabled
  4166. HIVE_VECTORIZATION_ENABLED("hive.vectorized.execution.enabled", true,
  4167. "This flag should be set to true to enable vectorized mode of query execution.\n" +
  4168. "The default value is true to reflect that our most expected Hive deployment will be using vectorization."),
  4169. HIVE_VECTORIZATION_REDUCE_ENABLED("hive.vectorized.execution.reduce.enabled", true,
  4170. "This flag should be set to true to enable vectorized mode of the reduce-side of query execution.\n" +
  4171. "The default value is true."),
  4172. HIVE_VECTORIZATION_REDUCE_GROUPBY_ENABLED("hive.vectorized.execution.reduce.groupby.enabled", true,
  4173. "This flag should be set to true to enable vectorized mode of the reduce-side GROUP BY query execution.\n" +
  4174. "The default value is true."),
  4175. HIVE_VECTORIZATION_MAPJOIN_NATIVE_ENABLED("hive.vectorized.execution.mapjoin.native.enabled", true,
  4176. "This flag should be set to true to enable native (i.e. non-pass through) vectorization\n" +
  4177. "of queries using MapJoin.\n" +
  4178. "The default value is true."),
  4179. HIVE_VECTORIZATION_MAPJOIN_NATIVE_MULTIKEY_ONLY_ENABLED("hive.vectorized.execution.mapjoin.native.multikey.only.enabled", false,
  4180. "This flag should be set to true to restrict use of native vector map join hash tables to\n" +
  4181. "the MultiKey in queries using MapJoin.\n" +
  4182. "The default value is false."),
  4183. HIVE_VECTORIZATION_MAPJOIN_NATIVE_MINMAX_ENABLED("hive.vectorized.execution.mapjoin.minmax.enabled", false,
  4184. "This flag should be set to true to enable vector map join hash tables to\n" +
  4185. "use max / max filtering for integer join queries using MapJoin.\n" +
  4186. "The default value is false."),
  4187. HIVE_VECTORIZATION_MAPJOIN_NATIVE_OVERFLOW_REPEATED_THRESHOLD("hive.vectorized.execution.mapjoin.overflow.repeated.threshold", -1,
  4188. "The number of small table rows for a match in vector map join hash tables\n" +
  4189. "where we use the repeated field optimization in overflow vectorized row batch for join queries using MapJoin.\n" +
  4190. "A value of -1 means do use the join result optimization. Otherwise, threshold value can be 0 to maximum integer."),
  4191. HIVE_VECTORIZATION_MAPJOIN_NATIVE_FAST_HASHTABLE_ENABLED("hive.vectorized.execution.mapjoin.native.fast.hashtable.enabled", false,
  4192. "This flag should be set to true to enable use of native fast vector map join hash tables in\n" +
  4193. "queries using MapJoin.\n" +
  4194. "The default value is false."),
  4195. HIVE_VECTORIZATION_GROUPBY_CHECKINTERVAL("hive.vectorized.groupby.checkinterval", 100000,
  4196. "Number of entries added to the group by aggregation hash before a recomputation of average entry size is performed."),
  4197. HIVE_VECTORIZATION_GROUPBY_MAXENTRIES("hive.vectorized.groupby.maxentries", 1000000,
  4198. "Max number of entries in the vector group by aggregation hashtables. \n" +
  4199. "Exceeding this will trigger a flush irrelevant of memory pressure condition."),
  4200. HIVE_VECTORIZATION_GROUPBY_FLUSH_PERCENT("hive.vectorized.groupby.flush.percent", (float) 0.1,
  4201. "Percent of entries in the group by aggregation hash flushed when the memory threshold is exceeded."),
  4202. HIVE_VECTORIZATION_REDUCESINK_NEW_ENABLED("hive.vectorized.execution.reducesink.new.enabled", true,
  4203. "This flag should be set to true to enable the new vectorization\n" +
  4204. "of queries using ReduceSink.\ni" +
  4205. "The default value is true."),
  4206. HIVE_VECTORIZATION_USE_VECTORIZED_INPUT_FILE_FORMAT("hive.vectorized.use.vectorized.input.format", true,
  4207. "This flag should be set to true to enable vectorizing with vectorized input file format capable SerDe.\n" +
  4208. "The default value is true."),
  4209. HIVE_VECTORIZATION_VECTORIZED_INPUT_FILE_FORMAT_EXCLUDES("hive.vectorized.input.format.excludes","",
  4210. "This configuration should be set to fully described input format class names for which \n"
  4211. + " vectorized input format should not be used for vectorized execution."),
  4212. HIVE_VECTORIZATION_USE_VECTOR_DESERIALIZE("hive.vectorized.use.vector.serde.deserialize", true,
  4213. "This flag should be set to true to enable vectorizing rows using vector deserialize.\n" +
  4214. "The default value is true."),
  4215. HIVE_VECTORIZATION_USE_ROW_DESERIALIZE("hive.vectorized.use.row.serde.deserialize", true,
  4216. "This flag should be set to true to enable vectorizing using row deserialize.\n" +
  4217. "The default value is false."),
  4218. HIVE_VECTORIZATION_ROW_DESERIALIZE_INPUTFORMAT_EXCLUDES(
  4219. "hive.vectorized.row.serde.inputformat.excludes",
  4220. "org.apache.parquet.hadoop.ParquetInputFormat,org.apache.hadoop.hive.ql.io.parquet.MapredParquetInputFormat",
  4221. "The input formats not supported by row deserialize vectorization."),
  4222. HIVE_VECTOR_ADAPTOR_USAGE_MODE("hive.vectorized.adaptor.usage.mode", "all", new StringSet("none", "chosen", "all"),
  4223. "Specifies the extent to which the VectorUDFAdaptor will be used for UDFs that do not have a corresponding vectorized class.\n" +
  4224. "0. none : disable any usage of VectorUDFAdaptor\n" +
  4225. "1. chosen : use VectorUDFAdaptor for a small set of UDFs that were chosen for good performance\n" +
  4226. "2. all : use VectorUDFAdaptor for all UDFs"
  4227. ),
  4228. HIVE_TEST_VECTOR_ADAPTOR_OVERRIDE("hive.test.vectorized.adaptor.override", false,
  4229. "internal use only, used to force always using the VectorUDFAdaptor.\n" +
  4230. "The default is false, of course",
  4231. true),
  4232. HIVE_VECTORIZATION_PTF_ENABLED("hive.vectorized.execution.ptf.enabled", true,
  4233. "This flag should be set to true to enable vectorized mode of the PTF of query execution.\n" +
  4234. "The default value is true."),
  4235. HIVE_VECTORIZATION_PTF_MAX_MEMORY_BUFFERING_BATCH_COUNT("hive.vectorized.ptf.max.memory.buffering.batch.count", 25,
  4236. "Maximum number of vectorized row batches to buffer in memory for PTF\n" +
  4237. "The default value is 25"),
  4238. HIVE_VECTORIZATION_TESTING_REDUCER_BATCH_SIZE("hive.vectorized.testing.reducer.batch.size", -1,
  4239. "internal use only, used for creating small group key vectorized row batches to exercise more logic\n" +
  4240. "The default value is -1 which means don't restrict for testing",
  4241. true),
  4242. HIVE_VECTORIZATION_TESTING_REUSE_SCRATCH_COLUMNS("hive.vectorized.reuse.scratch.columns", true,
  4243. "internal use only. Disable this to debug scratch column state issues",
  4244. true),
  4245. HIVE_VECTORIZATION_COMPLEX_TYPES_ENABLED("hive.vectorized.complex.types.enabled", true,
  4246. "This flag should be set to true to enable vectorization\n" +
  4247. "of expressions with complex types.\n" +
  4248. "The default value is true."),
  4249. HIVE_VECTORIZATION_GROUPBY_COMPLEX_TYPES_ENABLED("hive.vectorized.groupby.complex.types.enabled", true,
  4250. "This flag should be set to true to enable group by vectorization\n" +
  4251. "of aggregations that use complex types.\n" +
  4252. "For example, AVG uses a complex type (STRUCT) for partial aggregation results" +
  4253. "The default value is true."),
  4254. HIVE_VECTORIZATION_ROW_IDENTIFIER_ENABLED("hive.vectorized.row.identifier.enabled", true,
  4255. "This flag should be set to true to enable vectorization of ROW__ID."),
  4256. HIVE_VECTORIZATION_USE_CHECKED_EXPRESSIONS("hive.vectorized.use.checked.expressions", false,
  4257. "This flag should be set to true to use overflow checked vector expressions when available.\n" +
  4258. "For example, arithmetic expressions which can overflow the output data type can be evaluated using\n" +
  4259. " checked vector expressions so that they produce same result as non-vectorized evaluation."),
  4260. HIVE_VECTORIZED_ADAPTOR_SUPPRESS_EVALUATE_EXCEPTIONS(
  4261. "hive.vectorized.adaptor.suppress.evaluate.exceptions", false,
  4262. "This flag should be set to true to suppress HiveException from the generic UDF function\n" +
  4263. "evaluate call and turn them into NULLs. Assume, by default, this is not needed"),
  4264. HIVE_VECTORIZED_INPUT_FORMAT_SUPPORTS_ENABLED(
  4265. "hive.vectorized.input.format.supports.enabled",
  4266. "decimal_64",
  4267. "Which vectorized input format support features are enabled for vectorization.\n" +
  4268. "That is, if a VectorizedInputFormat input format does support \"decimal_64\" for example\n" +
  4269. "this variable must enable that to be used in vectorization"),
  4270. HIVE_VECTORIZED_IF_EXPR_MODE("hive.vectorized.if.expr.mode", "better", new StringSet("adaptor", "good", "better"),
  4271. "Specifies the extent to which SQL IF statements will be vectorized.\n" +
  4272. "0. adaptor: only use the VectorUDFAdaptor to vectorize IF statements\n" +
  4273. "1. good : use regular vectorized IF expression classes that get good performance\n" +
  4274. "2. better : use vectorized IF expression classes that conditionally execute THEN/ELSE\n" +
  4275. " expressions for better performance.\n"),
  4276. HIVE_TEST_VECTORIZATION_ENABLED_OVERRIDE("hive.test.vectorized.execution.enabled.override",
  4277. "none", new StringSet("none", "enable", "disable"),
  4278. "internal use only, used to override the hive.vectorized.execution.enabled setting and\n" +
  4279. "turn off vectorization. The default is false, of course",
  4280. true),
  4281. HIVE_TEST_VECTORIZATION_SUPPRESS_EXPLAIN_EXECUTION_MODE(
  4282. "hive.test.vectorization.suppress.explain.execution.mode", false,
  4283. "internal use only, used to suppress \"Execution mode: vectorized\" EXPLAIN display.\n" +
  4284. "The default is false, of course",
  4285. true),
  4286. HIVE_TEST_VECTORIZER_SUPPRESS_FATAL_EXCEPTIONS(
  4287. "hive.test.vectorizer.suppress.fatal.exceptions", true,
  4288. "internal use only. When false, don't suppress fatal exceptions like\n" +
  4289. "NullPointerException, etc so the query will fail and assure it will be noticed",
  4290. true),
  4291. HIVE_VECTORIZATION_FILESINK_ARROW_NATIVE_ENABLED(
  4292. "hive.vectorized.execution.filesink.arrow.native.enabled", false,
  4293. "This flag should be set to true to enable the native vectorization\n" +
  4294. "of queries using the Arrow SerDe and FileSink.\n" +
  4295. "The default value is false."),
  4296. HIVE_TYPE_CHECK_ON_INSERT("hive.typecheck.on.insert", true, "This property has been extended to control "
  4297. + "whether to check, convert, and normalize partition value to conform to its column type in "
  4298. + "partition operations including but not limited to insert, such as alter, describe etc."),
  4299. HIVE_HADOOP_CLASSPATH("hive.hadoop.classpath", null,
  4300. "For Windows OS, we need to pass HIVE_HADOOP_CLASSPATH Java parameter while starting HiveServer2 \n" +
  4301. "using \"-hiveconf hive.hadoop.classpath=%HIVE_LIB%\"."),
  4302. HIVE_RPC_QUERY_PLAN("hive.rpc.query.plan", false,
  4303. "Whether to send the query plan via local resource or RPC"),
  4304. HIVE_PLAN_MAPWORK_SERIALIZATION_SKIP_PROPERTIES("hive.plan.mapwork.serialization.skip.properties", "",
  4305. "Comma separated list of properties which is not needed in execution time, so can be removed "
  4306. + "from PartitionDesc properties before serialization, config can contain exact strings and regex "
  4307. + "expressions, the regex mode is activated if at least 1 asterisk (*) is present in the current word: "
  4308. + "rawDataSize exact string match, removes only rawDataSize property"
  4309. + ".*Size regex match, removes every property ending with 'Size'"
  4310. + "numRows,impala_.*chunk.* comma separated and mixed (handles strings and regexes at the same time)"),
  4311. HIVE_AM_SPLIT_GENERATION("hive.compute.splits.in.am", true,
  4312. "Whether to generate the splits locally or in the AM (tez only)"),
  4313. HIVE_TEZ_GENERATE_CONSISTENT_SPLITS("hive.tez.input.generate.consistent.splits", true,
  4314. "Whether to generate consistent split locations when generating splits in the AM"),
  4315. HIVE_PREWARM_ENABLED("hive.prewarm.enabled", false, "Enables container prewarm for Tez/Spark (Hadoop 2 only)"),
  4316. HIVE_PREWARM_NUM_CONTAINERS("hive.prewarm.numcontainers", 10, "Controls the number of containers to prewarm for Tez/Spark (Hadoop 2 only)"),
  4317. HIVE_PREWARM_SPARK_TIMEOUT("hive.prewarm.spark.timeout", "5000ms",
  4318. new TimeValidator(TimeUnit.MILLISECONDS),
  4319. "Time to wait to finish prewarming spark executors"),
  4320. HIVESTAGEIDREARRANGE("hive.stageid.rearrange", "none", new StringSet("none", "idonly", "traverse", "execution"), ""),
  4321. HIVEEXPLAINDEPENDENCYAPPENDTASKTYPES("hive.explain.dependency.append.tasktype", false, ""),
  4322. HIVEUSEGOOGLEREGEXENGINE("hive.use.googleregex.engine",false,"whether to use google regex engine or not, default regex engine is java.util.regex"),
  4323. HIVECOUNTERGROUP("hive.counters.group.name", "HIVE",
  4324. "The name of counter group for internal Hive variables (CREATED_FILE, FATAL_ERROR, etc.)"),
  4325. HIVE_QUOTEDID_SUPPORT("hive.support.quoted.identifiers", "column",
  4326. new StringSet("none", "column", "standard"),
  4327. "Whether to use quoted identifier. 'none', 'column', and 'standard' can be used. \n" +
  4328. " none: Quotation of identifiers and special characters in identifiers are not allowed but regular " +
  4329. "expressions in backticks are supported for column names.\n" +
  4330. " column: Use the backtick character to quote identifiers having special characters. `col1` " +
  4331. "Use single quotes to quote string literals. 'value' " +
  4332. "Double quotes are also accepted but not recommended." +
  4333. " standard: SQL standard way to quote identifiers. " +
  4334. "Use double quotes to quote identifiers having special characters \"col1\" " +
  4335. "and single quotes for string literals. 'value'"
  4336. ),
  4337. /**
  4338. * @deprecated Use MetastoreConf.SUPPORT_SPECIAL_CHARACTERS_IN_TABLE_NAMES
  4339. */
  4340. @Deprecated
  4341. HIVE_SUPPORT_SPECICAL_CHARACTERS_IN_TABLE_NAMES("hive.support.special.characters.tablename", true,
  4342. "This flag should be set to true to enable support for special characters in table names.\n"
  4343. + "When it is set to false, only [a-zA-Z_0-9]+ are supported.\n"
  4344. + "The supported special characters are %&'()*+,-./:;<=>?[]_|{}$^!~#@ and space. This flag applies only to"
  4345. + " quoted table names.\nThe default value is true."),
  4346. // This config is temporary and will be deprecated later
  4347. CREATE_TABLE_AS_EXTERNAL("hive.create.as.external.legacy", false,
  4348. "When this flag set to true. it will ignore hive.create.as.acid and hive.create.as.insert.only,"
  4349. + "create external purge table by default."),
  4350. /**
  4351. * Expose MetastoreConf.CREATE_TABLES_AS_ACID in HiveConf
  4352. * so user can set hive.create.as.acid in session level
  4353. */
  4354. CREATE_TABLES_AS_ACID("hive.create.as.acid", false,
  4355. "Whether the eligible tables should be created as full ACID by default. Does \n" +
  4356. "not apply to external tables, the ones using storage handlers, etc."),
  4357. HIVE_CREATE_TABLES_AS_INSERT_ONLY("hive.create.as.insert.only", false,
  4358. "Whether the eligible tables should be created as ACID insert-only by default. Does \n" +
  4359. "not apply to external tables, the ones using storage handlers, etc."),
  4360. HIVE_ACID_DIRECT_INSERT_ENABLED("hive.acid.direct.insert.enabled", true,
  4361. "Enable writing the data files directly to the table's final destination instead of the staging directory."
  4362. + "This optimization only applies on INSERT operations on ACID tables."),
  4363. // role names are case-insensitive
  4364. USERS_IN_ADMIN_ROLE("hive.users.in.admin.role", "", false,
  4365. "Comma separated list of users who are in admin role for bootstrapping.\n" +
  4366. "More users can be added in ADMIN role later."),
  4367. HIVE_COMPAT("hive.compat", HiveCompat.DEFAULT_COMPAT_LEVEL,
  4368. "Enable (configurable) deprecated behaviors by setting desired level of backward compatibility.\n" +
  4369. "Setting to 0.12:\n" +
  4370. " Maintains division behavior: int / int = double"),
  4371. HIVE_CONVERT_JOIN_BUCKET_MAPJOIN_TEZ("hive.convert.join.bucket.mapjoin.tez", true,
  4372. "Whether joins can be automatically converted to bucket map joins in hive \n" +
  4373. "when tez is used as the execution engine."),
  4374. HIVE_TEZ_BMJ_USE_SUBCACHE("hive.tez.bmj.use.subcache", true,
  4375. "Use subcache to reuse hashtable across multiple tasks"),
  4376. HIVE_CHECK_CROSS_PRODUCT("hive.exec.check.crossproducts", true,
  4377. "Check if a plan contains a Cross Product. If there is one, output a warning to the Session's console."),
  4378. HIVE_LOCALIZE_RESOURCE_WAIT_INTERVAL("hive.localize.resource.wait.interval", "5000ms",
  4379. new TimeValidator(TimeUnit.MILLISECONDS),
  4380. "Time to wait for another thread to localize the same resource for hive-tez."),
  4381. HIVE_LOCALIZE_RESOURCE_NUM_WAIT_ATTEMPTS("hive.localize.resource.num.wait.attempts", 5,
  4382. "The number of attempts waiting for localizing a resource in hive-tez."),
  4383. TEZ_AUTO_REDUCER_PARALLELISM("hive.tez.auto.reducer.parallelism", false,
  4384. "Turn on Tez' auto reducer parallelism feature. When enabled, Hive will still estimate data sizes\n" +
  4385. "and set parallelism estimates. Tez will sample source vertices' output sizes and adjust the estimates at runtime as\n" +
  4386. "necessary."),
  4387. TEZ_LLAP_MIN_REDUCER_PER_EXECUTOR("hive.tez.llap.min.reducer.per.executor", 0.33f,
  4388. "If above 0, the min number of reducers for auto-parallelism for LLAP scheduling will\n" +
  4389. "be set to this fraction of the number of executors."),
  4390. TEZ_MAPREDUCE_OUTPUT_COMMITTER("hive.tez.mapreduce.output.committer.class",
  4391. "org.apache.tez.mapreduce.committer.MROutputCommitter",
  4392. "Output committer class which should be invoked at the setup/commit lifecycle points of vertex executions."),
  4393. TEZ_MAX_PARTITION_FACTOR("hive.tez.max.partition.factor", 2f,
  4394. "When auto reducer parallelism is enabled this factor will be used to over-partition data in shuffle edges."),
  4395. TEZ_MIN_PARTITION_FACTOR("hive.tez.min.partition.factor", 0.25f,
  4396. "When auto reducer parallelism is enabled this factor will be used to put a lower limit to the number\n" +
  4397. "of reducers that tez specifies."),
  4398. TEZ_OPTIMIZE_BUCKET_PRUNING(
  4399. "hive.tez.bucket.pruning", true,
  4400. "When pruning is enabled, filters on bucket columns will be processed by \n" +
  4401. "filtering the splits against a bitset of included buckets. This needs predicates \n"+
  4402. "produced by hive.optimize.ppd and hive.optimize.index.filters."),
  4403. TEZ_OPTIMIZE_BUCKET_PRUNING_COMPAT(
  4404. "hive.tez.bucket.pruning.compat", true,
  4405. "When pruning is enabled, handle possibly broken inserts due to negative hashcodes.\n" +
  4406. "This occasionally doubles the data scan cost, but is default enabled for safety"),
  4407. TEZ_DYNAMIC_PARTITION_PRUNING(
  4408. "hive.tez.dynamic.partition.pruning", true,
  4409. "When dynamic pruning is enabled, joins on partition keys will be processed by sending\n" +
  4410. "events from the processing vertices to the Tez application master. These events will be\n" +
  4411. "used to prune unnecessary partitions."),
  4412. TEZ_DYNAMIC_PARTITION_PRUNING_EXTENDED("hive.tez.dynamic.partition.pruning.extended", true,
  4413. "Whether we should try to create additional opportunities for dynamic pruning, e.g., considering\n" +
  4414. "siblings that may not be created by normal dynamic pruning logic.\n" +
  4415. "Only works when dynamic pruning is enabled."),
  4416. TEZ_DYNAMIC_PARTITION_PRUNING_MAX_EVENT_SIZE("hive.tez.dynamic.partition.pruning.max.event.size", 1*1024*1024L,
  4417. "Maximum size of events sent by processors in dynamic pruning. If this size is crossed no pruning will take place."),
  4418. TEZ_DYNAMIC_PARTITION_PRUNING_MAX_DATA_SIZE("hive.tez.dynamic.partition.pruning.max.data.size", 100*1024*1024L,
  4419. "Maximum total data size of events in dynamic pruning."),
  4420. TEZ_DYNAMIC_SEMIJOIN_REDUCTION("hive.tez.dynamic.semijoin.reduction", true,
  4421. "When dynamic semijoin is enabled, shuffle joins will perform a leaky semijoin before shuffle. This " +
  4422. "requires hive.tez.dynamic.partition.pruning to be enabled."),
  4423. TEZ_MIN_BLOOM_FILTER_ENTRIES("hive.tez.min.bloom.filter.entries", 1000000L,
  4424. "Bloom filter should be of at min certain size to be effective"),
  4425. TEZ_MAX_BLOOM_FILTER_ENTRIES("hive.tez.max.bloom.filter.entries", 100000000L,
  4426. "Bloom filter should be of at max certain size to be effective"),
  4427. TEZ_BLOOM_FILTER_FACTOR("hive.tez.bloom.filter.factor", (float) 1.0,
  4428. "Bloom filter should be a multiple of this factor with nDV"),
  4429. TEZ_BLOOM_FILTER_MERGE_THREADS("hive.tez.bloom.filter.merge.threads", 1,
  4430. "How many threads are used for merging bloom filters in addition to task's main thread?\n"
  4431. + "-1: sanity check, it will fail if execution hits bloom filter merge codepath\n"
  4432. + " 0: feature is disabled, use only task's main thread for bloom filter merging\n"
  4433. + " 1: recommended value: there is only 1 merger thread (additionally to the task's main thread),"
  4434. + "according perf tests, this can lead to serious improvement \n"),
  4435. TEZ_BIGTABLE_MIN_SIZE_SEMIJOIN_REDUCTION("hive.tez.bigtable.minsize.semijoin.reduction", 100000000L,
  4436. "Big table for runtime filteting should be of atleast this size"),
  4437. TEZ_DYNAMIC_SEMIJOIN_REDUCTION_THRESHOLD("hive.tez.dynamic.semijoin.reduction.threshold", (float) 0.50,
  4438. "Only perform semijoin optimization if the estimated benefit at or above this fraction of the target table"),
  4439. TEZ_DYNAMIC_SEMIJOIN_REDUCTION_MULTICOLUMN(
  4440. "hive.tez.dynamic.semijoin.reduction.multicolumn",
  4441. true,
  4442. "Whether to consider multicolumn semijoin reducers or not.\n"
  4443. + "This should always be set to true. Since it is a new feature, it has been made configurable."),
  4444. TEZ_DYNAMIC_SEMIJOIN_REDUCTION_FOR_MAPJOIN("hive.tez.dynamic.semijoin.reduction.for.mapjoin", false,
  4445. "Use a semi-join branch for map-joins. This may not make it faster, but is helpful in certain join patterns."),
  4446. TEZ_DYNAMIC_SEMIJOIN_REDUCTION_FOR_DPP_FACTOR("hive.tez.dynamic.semijoin.reduction.for.dpp.factor",
  4447. (float) 1.0,
  4448. "The factor to decide if semijoin branch feeds into a TableScan\n" +
  4449. "which has an outgoing Dynamic Partition Pruning (DPP) branch based on number of distinct values."),
  4450. TEZ_SMB_NUMBER_WAVES(
  4451. "hive.tez.smb.number.waves",
  4452. (float) 0.5,
  4453. "The number of waves in which to run the SMB join. Account for cluster being occupied. Ideally should be 1 wave."),
  4454. TEZ_EXEC_SUMMARY(
  4455. "hive.tez.exec.print.summary",
  4456. false,
  4457. "Display breakdown of execution steps, for every query executed by the shell."),
  4458. TEZ_SESSION_EVENTS_SUMMARY(
  4459. "hive.tez.session.events.print.summary",
  4460. "none", new StringSet("none", "text", "json"),
  4461. "Display summary of all tez sessions related events in text or json format"),
  4462. TEZ_EXEC_INPLACE_PROGRESS(
  4463. "hive.tez.exec.inplace.progress",
  4464. true,
  4465. "Updates tez job execution progress in-place in the terminal when hive-cli is used."),
  4466. HIVE_SERVER2_INPLACE_PROGRESS(
  4467. "hive.server2.in.place.progress",
  4468. true,
  4469. "Allows hive server 2 to send progress bar update information. This is currently available"
  4470. + " only if the execution engine is tez or Spark."),
  4471. TEZ_DAG_STATUS_CHECK_INTERVAL("hive.tez.dag.status.check.interval", "500ms",
  4472. new TimeValidator(TimeUnit.MILLISECONDS), "Interval between subsequent DAG status invocation."),
  4473. SPARK_EXEC_INPLACE_PROGRESS("hive.spark.exec.inplace.progress", true,
  4474. "Updates spark job execution progress in-place in the terminal."),
  4475. TEZ_CONTAINER_MAX_JAVA_HEAP_FRACTION("hive.tez.container.max.java.heap.fraction", 0.8f,
  4476. "This is to override the tez setting with the same name"),
  4477. TEZ_TASK_SCALE_MEMORY_RESERVE_FRACTION_MIN("hive.tez.task.scale.memory.reserve-fraction.min",
  4478. 0.3f, "This is to override the tez setting tez.task.scale.memory.reserve-fraction"),
  4479. TEZ_TASK_SCALE_MEMORY_RESERVE_FRACTION_MAX("hive.tez.task.scale.memory.reserve.fraction.max",
  4480. 0.5f, "The maximum fraction of JVM memory which Tez will reserve for the processor"),
  4481. TEZ_TASK_SCALE_MEMORY_RESERVE_FRACTION("hive.tez.task.scale.memory.reserve.fraction",
  4482. -1f, "The customized fraction of JVM memory which Tez will reserve for the processor"),
  4483. TEZ_CARTESIAN_PRODUCT_EDGE_ENABLED("hive.tez.cartesian-product.enabled",
  4484. false, "Use Tez cartesian product edge to speed up cross product"),
  4485. TEZ_SIMPLE_CUSTOM_EDGE_TINY_BUFFER_SIZE_MB("hive.tez.unordered.output.buffer.size.mb", -1,
  4486. "When we have an operation that does not need a large buffer, we use this buffer size for simple custom edge.\n" +
  4487. "Value is an integer. Default value is -1, which means that we will estimate this value from operators in the plan."),
  4488. // The default is different on the client and server, so it's null here.
  4489. LLAP_IO_ENABLED("hive.llap.io.enabled", null, "Whether the LLAP IO layer is enabled."),
  4490. LLAP_IO_CACHE_ONLY("hive.llap.io.cache.only", false, "Whether the query should read from cache only. If set to " +
  4491. "true and a cache miss happens during the read an exception will occur. Primarily used for testing."),
  4492. LLAP_IO_ROW_WRAPPER_ENABLED("hive.llap.io.row.wrapper.enabled", true, "Whether the LLAP IO row wrapper is enabled for non-vectorized queries."),
  4493. LLAP_IO_ACID_ENABLED("hive.llap.io.acid", true, "Whether the LLAP IO layer is enabled for ACID."),
  4494. LLAP_IO_TRACE_SIZE("hive.llap.io.trace.size", "2Mb",
  4495. new SizeValidator(0L, true, (long)Integer.MAX_VALUE, false),
  4496. "The buffer size for a per-fragment LLAP debug trace. 0 to disable."),
  4497. LLAP_IO_TRACE_ALWAYS_DUMP("hive.llap.io.trace.always.dump", false,
  4498. "Whether to always dump the LLAP IO trace (if enabled); the default is on error."),
  4499. LLAP_IO_NONVECTOR_WRAPPER_ENABLED("hive.llap.io.nonvector.wrapper.enabled", true,
  4500. "Whether the LLAP IO layer is enabled for non-vectorized queries that read inputs\n" +
  4501. "that can be vectorized"),
  4502. LLAP_IO_MEMORY_MODE("hive.llap.io.memory.mode", "cache",
  4503. new StringSet("cache", "none"),
  4504. "LLAP IO memory usage; 'cache' (the default) uses data and metadata cache with a\n" +
  4505. "custom off-heap allocator, 'none' doesn't use either (this mode may result in\n" +
  4506. "significant performance degradation)"),
  4507. LLAP_ALLOCATOR_MIN_ALLOC("hive.llap.io.allocator.alloc.min", "4Kb", new SizeValidator(),
  4508. "Minimum allocation possible from LLAP buddy allocator. Allocations below that are\n" +
  4509. "padded to minimum allocation. For ORC, should generally be the same as the expected\n" +
  4510. "compression buffer size, or next lowest power of 2. Must be a power of 2."),
  4511. LLAP_ALLOCATOR_MAX_ALLOC("hive.llap.io.allocator.alloc.max", "16Mb", new SizeValidator(),
  4512. "Maximum allocation possible from LLAP buddy allocator. For ORC, should be as large as\n" +
  4513. "the largest expected ORC compression buffer size. Must be a power of 2."),
  4514. LLAP_ALLOCATOR_ARENA_COUNT("hive.llap.io.allocator.arena.count", 8,
  4515. "Arena count for LLAP low-level cache; cache will be allocated in the steps of\n" +
  4516. "(size/arena_count) bytes. This size must be <= 1Gb and >= max allocation; if it is\n" +
  4517. "not the case, an adjusted size will be used. Using powers of 2 is recommended."),
  4518. LLAP_IO_MEMORY_MAX_SIZE("hive.llap.io.memory.size", "1Gb", new SizeValidator(),
  4519. "Maximum size for IO allocator or ORC low-level cache.", "hive.llap.io.cache.orc.size"),
  4520. LLAP_ALLOCATOR_DIRECT("hive.llap.io.allocator.direct", true,
  4521. "Whether ORC low-level cache should use direct allocation."),
  4522. LLAP_ALLOCATOR_PREALLOCATE("hive.llap.io.allocator.preallocate", true,
  4523. "Whether to preallocate the entire IO memory at init time."),
  4524. LLAP_ALLOCATOR_MAPPED("hive.llap.io.allocator.mmap", false,
  4525. "Whether ORC low-level cache should use memory mapped allocation (direct I/O). \n" +
  4526. "This is recommended to be used along-side NVDIMM (DAX) or NVMe flash storage."),
  4527. LLAP_ALLOCATOR_MAPPED_PATH("hive.llap.io.allocator.mmap.path", "/tmp",
  4528. new WritableDirectoryValidator(),
  4529. "The directory location for mapping NVDIMM/NVMe flash storage into the ORC low-level cache."),
  4530. LLAP_ALLOCATOR_DISCARD_METHOD("hive.llap.io.allocator.discard.method", "both",
  4531. new StringSet("freelist", "brute", "both"),
  4532. "Which method to use to force-evict blocks to deal with fragmentation:\n" +
  4533. "freelist - use half-size free list (discards less, but also less reliable); brute -\n" +
  4534. "brute force, discard whatever we can; both - first try free list, then brute force."),
  4535. LLAP_ALLOCATOR_DEFRAG_HEADROOM("hive.llap.io.allocator.defrag.headroom", "1Mb",
  4536. "How much of a headroom to leave to allow allocator more flexibility to defragment.\n" +
  4537. "The allocator would further cap it to a fraction of total memory."),
  4538. LLAP_ALLOCATOR_MAX_FORCE_EVICTED("hive.llap.io.allocator.max.force.eviction", "16Mb",
  4539. "Fragmentation can lead to some cases where more eviction has to happen to accommodate allocations\n" +
  4540. " This configuration puts a limit on how many bytes to force evict before using Allocator Discard method."
  4541. + " Higher values will allow allocator more flexibility and will lead to better caching."),
  4542. LLAP_TRACK_CACHE_USAGE("hive.llap.io.track.cache.usage", true,
  4543. "Whether to tag LLAP cache contents, mapping them to Hive entities (paths for\n" +
  4544. "partitions and tables) for reporting."),
  4545. LLAP_USE_LRFU("hive.llap.io.use.lrfu", true,
  4546. "Whether ORC low-level cache should use LRFU cache policy instead of default (FIFO)."),
  4547. LLAP_LRFU_LAMBDA("hive.llap.io.lrfu.lambda", 0.1f,
  4548. "Lambda for ORC low-level cache LRFU cache policy. Must be in [0, 1]. 0 makes LRFU\n" +
  4549. "behave like LFU, 1 makes it behave like LRU, values in between balance accordingly.\n" +
  4550. "The meaning of this parameter is the inverse of the number of time ticks (cache\n" +
  4551. " operations, currently) that cause the combined recency-frequency of a block in cache\n" +
  4552. " to be halved."),
  4553. LLAP_LRFU_HOTBUFFERS_PERCENTAGE("hive.llap.io.lrfu.hotbuffers.percentage", 0.10f,
  4554. new RangeValidator(0.0f, 1.0f), "The number specifies the percentage of the cached buffers "
  4555. + "which are considered the most important ones based on the policy."),
  4556. LLAP_LRFU_BP_WRAPPER_SIZE("hive.llap.io.lrfu.bp.wrapper.size", 64, "thread local queue "
  4557. + "used to amortize the lock contention, the idea hear is to try locking as soon we reach max size / 2 "
  4558. + "and block when max queue size reached"),
  4559. LLAP_CACHE_ALLOW_SYNTHETIC_FILEID("hive.llap.cache.allow.synthetic.fileid", true,
  4560. "Whether LLAP cache should use synthetic file ID if real one is not available. Systems\n" +
  4561. "like HDFS, Isilon, etc. provide a unique file/inode ID. On other FSes (e.g. local\n" +
  4562. "FS), the cache would not work by default because LLAP is unable to uniquely track the\n" +
  4563. "files; enabling this setting allows LLAP to generate file ID from the path, size and\n" +
  4564. "modification time, which is almost certain to identify file uniquely. However, if you\n" +
  4565. "use a FS without file IDs and rewrite files a lot (or are paranoid), you might want\n" +
  4566. "to avoid this setting."),
  4567. LLAP_CACHE_DEFAULT_FS_FILE_ID("hive.llap.cache.defaultfs.only.native.fileid", true,
  4568. "Whether LLAP cache should use native file IDs from the default FS only. This is to\n" +
  4569. "avoid file ID collisions when several different DFS instances are in use at the same\n" +
  4570. "time. Disable this check to allow native file IDs from non-default DFS."),
  4571. LLAP_CACHE_ENABLE_ORC_GAP_CACHE("hive.llap.orc.gap.cache", true,
  4572. "Whether LLAP cache for ORC should remember gaps in ORC compression buffer read\n" +
  4573. "estimates, to avoid re-reading the data that was read once and discarded because it\n" +
  4574. "is unneeded. This is only necessary for ORC files written before HIVE-9660."),
  4575. LLAP_CACHE_HYDRATION_STRATEGY_CLASS("hive.llap.cache.hydration.strategy.class", "", "Strategy class for managing the "
  4576. + "llap cache hydration. It's executed when the daemon starts and stops, and gives a chance to save and/or "
  4577. + "load the contens of the llap cache. If left empty the feature is disabled.\n" +
  4578. "The class should implement org.apache.hadoop.hive.llap.LlapCacheHydration interface."),
  4579. LLAP_CACHE_HYDRATION_SAVE_DIR("hive.llap.cache.hydration.save.dir", "/tmp/hive", "Directory to save the llap cache content\n"
  4580. + "info on shutdown, if BasicLlapCacheHydration is used as the hive.llap.cache.hydration.strategy.class."),
  4581. LLAP_IO_USE_FILEID_PATH("hive.llap.io.use.fileid.path", true,
  4582. "Whether LLAP should use fileId (inode)-based path to ensure better consistency for the\n" +
  4583. "cases of file overwrites. This is supported on HDFS. Disabling this also turns off any\n" +
  4584. "cache consistency checks based on fileid comparisons."),
  4585. // Restricted to text for now as this is a new feature; only text files can be sliced.
  4586. LLAP_IO_ENCODE_ENABLED("hive.llap.io.encode.enabled", true,
  4587. "Whether LLAP should try to re-encode and cache data for non-ORC formats. This is used\n" +
  4588. "on LLAP Server side to determine if the infrastructure for that is initialized."),
  4589. LLAP_IO_ENCODE_FORMATS("hive.llap.io.encode.formats",
  4590. "org.apache.hadoop.mapred.TextInputFormat,",
  4591. "The table input formats for which LLAP IO should re-encode and cache data.\n" +
  4592. "Comma-separated list."),
  4593. LLAP_IO_ENCODE_ALLOC_SIZE("hive.llap.io.encode.alloc.size", "256Kb", new SizeValidator(),
  4594. "Allocation size for the buffers used to cache encoded data from non-ORC files. Must\n" +
  4595. "be a power of two between " + LLAP_ALLOCATOR_MIN_ALLOC + " and\n" +
  4596. LLAP_ALLOCATOR_MAX_ALLOC + "."),
  4597. LLAP_IO_ENCODE_VECTOR_SERDE_ENABLED("hive.llap.io.encode.vector.serde.enabled", true,
  4598. "Whether LLAP should use vectorized SerDe reader to read text data when re-encoding."),
  4599. LLAP_IO_ENCODE_VECTOR_SERDE_ASYNC_ENABLED("hive.llap.io.encode.vector.serde.async.enabled",
  4600. true,
  4601. "Whether LLAP should use async mode in vectorized SerDe reader to read text data."),
  4602. LLAP_IO_ENCODE_SLICE_ROW_COUNT("hive.llap.io.encode.slice.row.count", 100000,
  4603. "Row count to use to separate cache slices when reading encoded data from row-based\n" +
  4604. "inputs into LLAP cache, if this feature is enabled."),
  4605. LLAP_IO_ENCODE_SLICE_LRR("hive.llap.io.encode.slice.lrr", true,
  4606. "Whether to separate cache slices when reading encoded data from text inputs via MR\n" +
  4607. "MR LineRecordRedader into LLAP cache, if this feature is enabled. Safety flag."),
  4608. LLAP_ORC_ENABLE_TIME_COUNTERS("hive.llap.io.orc.time.counters", true,
  4609. "Whether to enable time counters for LLAP IO layer (time spent in HDFS, etc.)"),
  4610. LLAP_IO_VRB_QUEUE_LIMIT_MAX("hive.llap.io.vrb.queue.limit.max", 50000,
  4611. "The maximum queue size for VRBs produced by a LLAP IO thread when the processing is\n" +
  4612. "slower than the IO. The actual queue size is set per fragment, and is adjusted down\n" +
  4613. "from the base, depending on the schema see LLAP_IO_CVB_BUFFERED_SIZE."),
  4614. LLAP_IO_VRB_QUEUE_LIMIT_MIN("hive.llap.io.vrb.queue.limit.min", 1,
  4615. "The minimum queue size for VRBs produced by a LLAP IO thread when the processing is\n" +
  4616. "slower than the IO (used when determining the size from base size)."),
  4617. LLAP_IO_CVB_BUFFERED_SIZE("hive.llap.io.cvb.memory.consumption.", 1L << 30,
  4618. "The amount of bytes used to buffer CVB between IO and Processor Threads default to 1GB, "
  4619. + "this will be used to compute a best effort queue size for VRBs produced by a LLAP IO thread."),
  4620. LLAP_IO_PROACTIVE_EVICTION_ENABLED("hive.llap.io.proactive.eviction.enabled", true,
  4621. "If true proactive cache eviction is enabled, thus LLAP will proactively evict buffers" +
  4622. " that belong to dropped Hive entities (DBs, tables, partitions, or temp tables."),
  4623. LLAP_IO_PROACTIVE_EVICTION_SWEEP_INTERVAL("hive.llap.io.proactive.eviction.sweep.interval", "5s",
  4624. new TimeValidator(TimeUnit.SECONDS),
  4625. "How frequently (in seconds) LLAP should check for buffers marked for proactive eviction and" +
  4626. "proceed with their eviction."),
  4627. LLAP_IO_PROACTIVE_EVICTION_INSTANT_DEALLOC("hive.llap.io.proactive.eviction.instant.dealloc", false,
  4628. "Experimental feature: when set to true, buffer deallocation will happen as soon as proactive eviction " +
  4629. "notifications are received by the daemon. Sweep phase of proactive eviction will only do the cache policy " +
  4630. "cleanup in this case. This can increase cache hit ratio but might scale bad in a workload that generates " +
  4631. "many proactive eviction events."),
  4632. LLAP_IO_CACHE_DELETEDELTAS("hive.llap.io.cache.deletedeltas", "all", new StringSet("none", "metadata", "all"),
  4633. "When set to 'all' queries that use LLAP IO for execution will also access delete delta files via " +
  4634. "LLAP IO layer and thus they will be fully cached. When set to 'metadata', only the tail of delete deltas " +
  4635. "will be cached. If set to 'none', only the base files and insert deltas will be channeled through LLAP, " +
  4636. "while delete deltas will be accessed directly from their configured FS without caching them. " +
  4637. "This feature only works with ColumnizedDeleteEventRegistry, SortMergedDeleteEventRegistry is not supported."),
  4638. LLAP_IO_PATH_CACHE_SIZE("hive.llap.io.path.cache.size", "10Mb", new SizeValidator(),
  4639. "The amount of the maximum memory allowed to store the file paths."),
  4640. LLAP_IO_SHARE_OBJECT_POOLS("hive.llap.io.share.object.pools", false,
  4641. "Whether to used shared object pools in LLAP IO. A safety flag."),
  4642. LLAP_AUTO_ALLOW_UBER("hive.llap.auto.allow.uber", false,
  4643. "Whether or not to allow the planner to run vertices in the AM."),
  4644. LLAP_AUTO_ENFORCE_TREE("hive.llap.auto.enforce.tree", true,
  4645. "Enforce that all parents are in llap, before considering vertex"),
  4646. LLAP_AUTO_ENFORCE_VECTORIZED("hive.llap.auto.enforce.vectorized", true,
  4647. "Enforce that inputs are vectorized, before considering vertex"),
  4648. LLAP_AUTO_ENFORCE_STATS("hive.llap.auto.enforce.stats", true,
  4649. "Enforce that col stats are available, before considering vertex"),
  4650. LLAP_AUTO_MAX_INPUT("hive.llap.auto.max.input.size", 10*1024*1024*1024L,
  4651. "Check input size, before considering vertex (-1 disables check)"),
  4652. LLAP_AUTO_MAX_OUTPUT("hive.llap.auto.max.output.size", 1*1024*1024*1024L,
  4653. "Check output size, before considering vertex (-1 disables check)"),
  4654. LLAP_SKIP_COMPILE_UDF_CHECK("hive.llap.skip.compile.udf.check", false,
  4655. "Whether to skip the compile-time check for non-built-in UDFs when deciding whether to\n" +
  4656. "execute tasks in LLAP. Skipping the check allows executing UDFs from pre-localized\n" +
  4657. "jars in LLAP; if the jars are not pre-localized, the UDFs will simply fail to load."),
  4658. LLAP_ALLOW_PERMANENT_FNS("hive.llap.allow.permanent.fns", true,
  4659. "Whether LLAP decider should allow permanent UDFs."),
  4660. LLAP_EXECUTION_MODE("hive.llap.execution.mode", "none",
  4661. new StringSet("auto", "none", "all", "map", "only"),
  4662. "Chooses whether query fragments will run in container or in llap"),
  4663. LLAP_IO_ETL_SKIP_FORMAT("hive.llap.io.etl.skip.format", "encode", new StringSet("none", "encode", "all"),
  4664. "For ETL queries, determines whether to skip llap io cache. By default, hive.llap.io.encode.enabled " +
  4665. "will be set to false which disables LLAP IO for text formats. Setting it to 'all' will disable LLAP IO for all" +
  4666. " formats. 'none' will not disable LLAP IO for any formats."),
  4667. LLAP_OBJECT_CACHE_ENABLED("hive.llap.object.cache.enabled", true,
  4668. "Cache objects (plans, hashtables, etc) in llap"),
  4669. LLAP_IO_DECODING_METRICS_PERCENTILE_INTERVALS("hive.llap.io.decoding.metrics.percentiles.intervals", "30",
  4670. "Comma-delimited set of integers denoting the desired rollover intervals (in seconds)\n" +
  4671. "for percentile latency metrics on the LLAP daemon IO decoding time.\n" +
  4672. "hive.llap.queue.metrics.percentiles.intervals"),
  4673. LLAP_IO_THREADPOOL_SIZE("hive.llap.io.threadpool.size", 10,
  4674. "Specify the number of threads to use for low-level IO thread pool."),
  4675. LLAP_IO_ENCODE_THREADPOOL_MULTIPLIER("hive.llap.io.encode.threadpool.multiplier", 2,
  4676. "Used to determine the size of IO encode threadpool by multiplying hive.llap.io.threadpool.size" +
  4677. "with this value. During text table reads a thread from the 'regular' IO thread pool may place a number of" +
  4678. "encode tasks to the threads in the encode pool."),
  4679. LLAP_USE_KERBEROS("hive.llap.kerberos.enabled", true,
  4680. "If LLAP is configured for Kerberos authentication. This could be useful when cluster\n" +
  4681. "is kerberized, but LLAP is not."),
  4682. LLAP_KERBEROS_PRINCIPAL(HIVE_LLAP_DAEMON_SERVICE_PRINCIPAL_NAME, "",
  4683. "The name of the LLAP daemon's service principal."),
  4684. LLAP_KERBEROS_KEYTAB_FILE("hive.llap.daemon.keytab.file", "",
  4685. "The path to the Kerberos Keytab file containing the LLAP daemon's service principal."),
  4686. LLAP_WEBUI_SPNEGO_KEYTAB_FILE("hive.llap.webui.spnego.keytab", "",
  4687. "The path to the Kerberos Keytab file containing the LLAP WebUI SPNEGO principal.\n" +
  4688. "Typical value would look like /etc/security/keytabs/spnego.service.keytab."),
  4689. LLAP_WEBUI_SPNEGO_PRINCIPAL("hive.llap.webui.spnego.principal", "",
  4690. "The LLAP WebUI SPNEGO service principal. Configured similarly to\n" +
  4691. "hive.server2.webui.spnego.principal"),
  4692. LLAP_FS_KERBEROS_PRINCIPAL("hive.llap.task.principal", "",
  4693. "The name of the principal to use to run tasks. By default, the clients are required\n" +
  4694. "to provide tokens to access HDFS/etc."),
  4695. LLAP_FS_KERBEROS_KEYTAB_FILE("hive.llap.task.keytab.file", "",
  4696. "The path to the Kerberos Keytab file containing the principal to use to run tasks.\n" +
  4697. "By default, the clients are required to provide tokens to access HDFS/etc."),
  4698. LLAP_ZKSM_ZK_CONNECTION_STRING("hive.llap.zk.sm.connectionString", "",
  4699. "ZooKeeper connection string for ZooKeeper SecretManager."),
  4700. LLAP_ZKSM_ZK_SESSION_TIMEOUT("hive.llap.zk.sm.session.timeout", "40s", new TimeValidator(
  4701. TimeUnit.MILLISECONDS), "ZooKeeper session timeout for ZK SecretManager."),
  4702. LLAP_ZK_REGISTRY_USER("hive.llap.zk.registry.user", "",
  4703. "In the LLAP ZooKeeper-based registry, specifies the username in the Zookeeper path.\n" +
  4704. "This should be the hive user or whichever user is running the LLAP daemon."),
  4705. LLAP_ZK_REGISTRY_NAMESPACE("hive.llap.zk.registry.namespace", null,
  4706. "In the LLAP ZooKeeper-based registry, overrides the ZK path namespace. Note that\n" +
  4707. "using this makes the path management (e.g. setting correct ACLs) your responsibility."),
  4708. // Note: do not rename to ..service.acl; Hadoop generates .hosts setting name from this,
  4709. // resulting in a collision with existing hive.llap.daemon.service.hosts and bizarre errors.
  4710. // These are read by Hadoop IPC, so you should check the usage and naming conventions (e.g.
  4711. // ".blocked" is a string hardcoded by Hadoop, and defaults are enforced elsewhere in Hive)
  4712. // before making changes or copy-pasting these.
  4713. LLAP_SECURITY_ACL("hive.llap.daemon.acl", "*", "The ACL for LLAP daemon."),
  4714. LLAP_SECURITY_ACL_DENY("hive.llap.daemon.acl.blocked", "", "The deny ACL for LLAP daemon."),
  4715. LLAP_MANAGEMENT_ACL("hive.llap.management.acl", "*", "The ACL for LLAP daemon management."),
  4716. LLAP_MANAGEMENT_ACL_DENY("hive.llap.management.acl.blocked", "",
  4717. "The deny ACL for LLAP daemon management."),
  4718. LLAP_PLUGIN_ACL("hive.llap.plugin.acl", "*", "The ACL for LLAP plugin AM endpoint."),
  4719. LLAP_PLUGIN_ACL_DENY("hive.llap.plugin.acl.blocked", "",
  4720. "The deny ACL for LLAP plugin AM endpoint."),
  4721. LLAP_REMOTE_TOKEN_REQUIRES_SIGNING("hive.llap.remote.token.requires.signing", "true",
  4722. new StringSet("false", "except_llap_owner", "true"),
  4723. "Whether the token returned from LLAP management API should require fragment signing.\n" +
  4724. "True by default; can be disabled to allow CLI to get tokens from LLAP in a secure\n" +
  4725. "cluster by setting it to true or 'except_llap_owner' (the latter returns such tokens\n" +
  4726. "to everyone except the user LLAP cluster is authenticating under)."),
  4727. // Hadoop DelegationTokenManager default is 1 week.
  4728. LLAP_DELEGATION_TOKEN_LIFETIME("hive.llap.daemon.delegation.token.lifetime", "14d",
  4729. new TimeValidator(TimeUnit.SECONDS),
  4730. "LLAP delegation token lifetime, in seconds if specified without a unit."),
  4731. LLAP_MANAGEMENT_RPC_PORT("hive.llap.management.rpc.port", 15004,
  4732. "RPC port for LLAP daemon management service."),
  4733. LLAP_WEB_AUTO_AUTH("hive.llap.auto.auth", false,
  4734. "Whether or not to set Hadoop configs to enable auth in LLAP web app."),
  4735. LLAP_DAEMON_RPC_NUM_HANDLERS("hive.llap.daemon.rpc.num.handlers", 5,
  4736. "Number of RPC handlers for LLAP daemon.", "llap.daemon.rpc.num.handlers"),
  4737. LLAP_PLUGIN_RPC_PORT("hive.llap.plugin.rpc.port", 0,
  4738. "Port to use for LLAP plugin rpc server"),
  4739. LLAP_PLUGIN_RPC_NUM_HANDLERS("hive.llap.plugin.rpc.num.handlers", 1,
  4740. "Number of RPC handlers for AM LLAP plugin endpoint."),
  4741. LLAP_HDFS_PACKAGE_DIR("hive.llap.hdfs.package.dir", ".yarn",
  4742. "Package directory on HDFS used for holding collected configuration and libraries" +
  4743. " required for YARN launch. Note: this should be set to the same as yarn.service.base.path"),
  4744. LLAP_DAEMON_WORK_DIRS("hive.llap.daemon.work.dirs", "",
  4745. "Working directories for the daemon. This should not be set if running as a YARN\n" +
  4746. "Service. It must be set when not running on YARN. If the value is set when\n" +
  4747. "running as a YARN Service, the specified value will be used.",
  4748. "llap.daemon.work.dirs"),
  4749. LLAP_DAEMON_YARN_SHUFFLE_PORT("hive.llap.daemon.yarn.shuffle.port", 15551,
  4750. "YARN shuffle port for LLAP-daemon-hosted shuffle.", "llap.daemon.yarn.shuffle.port"),
  4751. LLAP_DAEMON_YARN_CONTAINER_MB("hive.llap.daemon.yarn.container.mb", -1,
  4752. "llap server yarn container size in MB. Used in LlapServiceDriver and package.py", "llap.daemon.yarn.container.mb"),
  4753. LLAP_DAEMON_QUEUE_NAME("hive.llap.daemon.queue.name", null,
  4754. "Queue name within which the llap application will run." +
  4755. " Used in LlapServiceDriver and package.py"),
  4756. // TODO Move the following 2 properties out of Configuration to a constant.
  4757. LLAP_DAEMON_CONTAINER_ID("hive.llap.daemon.container.id", null,
  4758. "ContainerId of a running LlapDaemon. Used to publish to the registry"),
  4759. LLAP_DAEMON_NM_ADDRESS("hive.llap.daemon.nm.address", null,
  4760. "NM Address host:rpcPort for the NodeManager on which the instance of the daemon is running.\n" +
  4761. "Published to the llap registry. Should never be set by users"),
  4762. LLAP_DAEMON_SHUFFLE_DIR_WATCHER_ENABLED("hive.llap.daemon.shuffle.dir.watcher.enabled", false,
  4763. "TODO doc", "llap.daemon.shuffle.dir-watcher.enabled"),
  4764. LLAP_DAEMON_AM_LIVENESS_HEARTBEAT_INTERVAL_MS(
  4765. "hive.llap.daemon.am.liveness.heartbeat.interval.ms", "10000ms",
  4766. new TimeValidator(TimeUnit.MILLISECONDS),
  4767. "Tez AM-LLAP heartbeat interval (milliseconds). This needs to be below the task timeout\n" +
  4768. "interval, but otherwise as high as possible to avoid unnecessary traffic.",
  4769. "llap.daemon.am.liveness.heartbeat.interval-ms"),
  4770. LLAP_DAEMON_AM_LIVENESS_CONNECTION_TIMEOUT_MS(
  4771. "hive.llap.am.liveness.connection.timeout.ms", "10000ms",
  4772. new TimeValidator(TimeUnit.MILLISECONDS),
  4773. "Amount of time to wait on connection failures to the AM from an LLAP daemon before\n" +
  4774. "considering the AM to be dead.", "llap.am.liveness.connection.timeout-millis"),
  4775. LLAP_DAEMON_AM_USE_FQDN("hive.llap.am.use.fqdn", true,
  4776. "Whether to use FQDN of the AM machine when submitting work to LLAP."),
  4777. LLAP_DAEMON_EXEC_USE_FQDN("hive.llap.exec.use.fqdn", true,
  4778. "On non-kerberized clusters, where the hostnames are stable but ip address changes, setting this config\n" +
  4779. " to false will use ip address of llap daemon in execution context instead of FQDN"),
  4780. // Not used yet - since the Writable RPC engine does not support this policy.
  4781. LLAP_DAEMON_AM_LIVENESS_CONNECTION_SLEEP_BETWEEN_RETRIES_MS(
  4782. "hive.llap.am.liveness.connection.sleep.between.retries.ms", "2000ms",
  4783. new TimeValidator(TimeUnit.MILLISECONDS),
  4784. "Sleep duration while waiting to retry connection failures to the AM from the daemon for\n" +
  4785. "the general keep-alive thread (milliseconds).",
  4786. "llap.am.liveness.connection.sleep-between-retries-millis"),
  4787. LLAP_DAEMON_TASK_SCHEDULER_TIMEOUT_SECONDS(
  4788. "hive.llap.task.scheduler.timeout.seconds", "60s",
  4789. new TimeValidator(TimeUnit.SECONDS),
  4790. "Amount of time to wait before failing the query when there are no llap daemons running\n" +
  4791. "(alive) in the cluster.", "llap.daemon.scheduler.timeout.seconds"),
  4792. LLAP_DAEMON_NUM_EXECUTORS("hive.llap.daemon.num.executors", 4,
  4793. "Number of executors to use in LLAP daemon; essentially, the number of tasks that can be\n" +
  4794. "executed in parallel.", "llap.daemon.num.executors"),
  4795. LLAP_MAPJOIN_MEMORY_OVERSUBSCRIBE_FACTOR("hive.llap.mapjoin.memory.oversubscribe.factor", 0.2f,
  4796. "Fraction of memory from hive.auto.convert.join.noconditionaltask.size that can be over subscribed\n" +
  4797. "by queries running in LLAP mode. This factor has to be from 0.0 to 1.0. Default is 20% over subscription.\n"),
  4798. LLAP_MEMORY_OVERSUBSCRIPTION_MAX_EXECUTORS_PER_QUERY("hive.llap.memory.oversubscription.max.executors.per.query",
  4799. -1,
  4800. "Used along with hive.llap.mapjoin.memory.oversubscribe.factor to limit the number of executors from\n" +
  4801. "which memory for mapjoin can be borrowed. Default 3 (from 3 other executors\n" +
  4802. "hive.llap.mapjoin.memory.oversubscribe.factor amount of memory can be borrowed based on which mapjoin\n" +
  4803. "conversion decision will be made). This is only an upper bound. Lower bound is determined by number of\n" +
  4804. "executors and configured max concurrency."),
  4805. LLAP_MAPJOIN_MEMORY_MONITOR_CHECK_INTERVAL("hive.llap.mapjoin.memory.monitor.check.interval", 100000L,
  4806. "Check memory usage of mapjoin hash tables after every interval of this many rows. If map join hash table\n" +
  4807. "memory usage exceeds (hive.auto.convert.join.noconditionaltask.size * hive.hash.table.inflation.factor)\n" +
  4808. "when running in LLAP, tasks will get killed and not retried. Set the value to 0 to disable this feature."),
  4809. LLAP_DAEMON_AM_REPORTER_MAX_THREADS("hive.llap.daemon.am-reporter.max.threads", 4,
  4810. "Maximum number of threads to be used for AM reporter. If this is lower than number of\n" +
  4811. "executors in llap daemon, it would be set to number of executors at runtime.",
  4812. "llap.daemon.am-reporter.max.threads"),
  4813. LLAP_DAEMON_RPC_PORT("hive.llap.daemon.rpc.port", 0, "The LLAP daemon RPC port.",
  4814. "llap.daemon.rpc.port. A value of 0 indicates a dynamic port"),
  4815. LLAP_DAEMON_MEMORY_PER_INSTANCE_MB("hive.llap.daemon.memory.per.instance.mb", 4096,
  4816. "The total amount of memory to use for the executors inside LLAP (in megabytes).",
  4817. "llap.daemon.memory.per.instance.mb"),
  4818. LLAP_DAEMON_XMX_HEADROOM("hive.llap.daemon.xmx.headroom", "5%",
  4819. "The total amount of heap memory set aside by LLAP and not used by the executors. Can\n" +
  4820. "be specified as size (e.g. '512Mb'), or percentage (e.g. '5%'). Note that the latter is\n" +
  4821. "derived from the total daemon XMX, which can be different from the total executor\n" +
  4822. "memory if the cache is on-heap; although that's not the default configuration."),
  4823. LLAP_DAEMON_VCPUS_PER_INSTANCE("hive.llap.daemon.vcpus.per.instance", 4,
  4824. "The total number of vcpus to use for the executors inside LLAP.",
  4825. "llap.daemon.vcpus.per.instance"),
  4826. LLAP_DAEMON_NUM_FILE_CLEANER_THREADS("hive.llap.daemon.num.file.cleaner.threads", 1,
  4827. "Number of file cleaner threads in LLAP.", "llap.daemon.num.file.cleaner.threads"),
  4828. LLAP_FILE_CLEANUP_DELAY_SECONDS("hive.llap.file.cleanup.delay.seconds", "0s",
  4829. new TimeValidator(TimeUnit.SECONDS),
  4830. "How long to delay before cleaning up query files in LLAP (in seconds, for debugging).",
  4831. "llap.file.cleanup.delay-seconds"),
  4832. LLAP_DAEMON_SERVICE_HOSTS("hive.llap.daemon.service.hosts", null,
  4833. "Explicitly specified hosts to use for LLAP scheduling. Useful for testing. By default,\n" +
  4834. "YARN registry is used.", "llap.daemon.service.hosts"),
  4835. LLAP_DAEMON_SERVICE_REFRESH_INTERVAL("hive.llap.daemon.service.refresh.interval.sec", "60s",
  4836. new TimeValidator(TimeUnit.SECONDS),
  4837. "LLAP YARN registry service list refresh delay, in seconds.",
  4838. "llap.daemon.service.refresh.interval"),
  4839. LLAP_DAEMON_COMMUNICATOR_NUM_THREADS("hive.llap.daemon.communicator.num.threads", 10,
  4840. "Number of threads to use in LLAP task communicator in Tez AM.",
  4841. "llap.daemon.communicator.num.threads"),
  4842. LLAP_PLUGIN_CLIENT_NUM_THREADS("hive.llap.plugin.client.num.threads", 10,
  4843. "Number of threads to use in LLAP task plugin client."),
  4844. LLAP_DAEMON_DOWNLOAD_PERMANENT_FNS("hive.llap.daemon.download.permanent.fns", false,
  4845. "Whether LLAP daemon should localize the resources for permanent UDFs."),
  4846. LLAP_TASK_SCHEDULER_AM_COLLECT_DAEMON_METRICS_MS("hive.llap.task.scheduler.am.collect.daemon.metrics.ms", "0ms",
  4847. new TimeValidator(TimeUnit.MILLISECONDS), "Collect llap daemon metrics in the AM every given milliseconds,\n" +
  4848. "so that the AM can use this information, to make better scheduling decisions.\n" +
  4849. "If it's set to 0, then the feature is disabled."),
  4850. LLAP_TASK_SCHEDULER_AM_COLLECT_DAEMON_METRICS_LISTENER(
  4851. "hive.llap.task.scheduler.am.collect.daemon.metrics.listener", "",
  4852. "The listener which is called when new Llap Daemon statistics is received on AM side.\n" +
  4853. "The listener should implement the " +
  4854. "org.apache.hadoop.hive.llap.tezplugins.metrics.LlapMetricsListener interface."),
  4855. LLAP_NODEHEALTHCHECKS_MINTASKS(
  4856. "hive.llap.nodehealthchecks.mintasks", 2000,
  4857. "Specifies the minimum amount of tasks, executed by a particular LLAP daemon, before the health\n" +
  4858. "status of the node is examined."),
  4859. LLAP_NODEHEALTHCHECKS_MININTERVALDURATION(
  4860. "hive.llap.nodehealthckecks.minintervalduration", "300s",
  4861. new TimeValidator(TimeUnit.SECONDS),
  4862. "The minimum time that needs to elapse between two actions that are the correcting results of identifying\n" +
  4863. "an unhealthy node. Even if additional nodes are considered to be unhealthy, no action is performed until\n" +
  4864. "this time interval has passed since the last corrective action."),
  4865. LLAP_NODEHEALTHCHECKS_TASKTIMERATIO(
  4866. "hive.llap.nodehealthckecks.tasktimeratio", 1.5f,
  4867. "LLAP daemons are considered unhealthy, if their average (Map-) task execution time is significantly larger\n" +
  4868. "than the average task execution time of other nodes. This value specifies the ratio of a node to other\n" +
  4869. "nodes, which is considered as threshold for unhealthy. A value of 1.5 for example considers a node to be\n" +
  4870. "unhealthy if its average task execution time is 50% larger than the average of other nodes."),
  4871. LLAP_NODEHEALTHCHECKS_EXECUTORRATIO(
  4872. "hive.llap.nodehealthckecks.executorratio", 2.0f,
  4873. "If an unhealthy node is identified, it is blacklisted only where there is enough free executors to execute\n" +
  4874. "the tasks. This value specifies the ratio of the free executors compared to the blacklisted ones.\n" +
  4875. "A value of 2.0 for example defines that we blacklist an unhealthy node only if we have 2 times more\n" +
  4876. "free executors on the remaining nodes than the unhealthy node."),
  4877. LLAP_NODEHEALTHCHECKS_MAXNODES(
  4878. "hive.llap.nodehealthckecks.maxnodes", 1,
  4879. "The maximum number of blacklisted nodes. If there are at least this number of blacklisted nodes\n" +
  4880. "the listener will not blacklist further nodes even if all the conditions are met."),
  4881. LLAP_TASK_SCHEDULER_AM_REGISTRY_NAME("hive.llap.task.scheduler.am.registry", "llap",
  4882. "AM registry name for LLAP task scheduler plugin to register with."),
  4883. LLAP_TASK_SCHEDULER_AM_REGISTRY_PRINCIPAL("hive.llap.task.scheduler.am.registry.principal", "",
  4884. "The name of the principal used to access ZK AM registry securely."),
  4885. LLAP_TASK_SCHEDULER_AM_REGISTRY_KEYTAB_FILE("hive.llap.task.scheduler.am.registry.keytab.file", "",
  4886. "The path to the Kerberos keytab file used to access ZK AM registry securely."),
  4887. LLAP_TASK_SCHEDULER_NODE_REENABLE_MIN_TIMEOUT_MS(
  4888. "hive.llap.task.scheduler.node.reenable.min.timeout.ms", "200ms",
  4889. new TimeValidator(TimeUnit.MILLISECONDS),
  4890. "Minimum time after which a previously disabled node will be re-enabled for scheduling,\n" +
  4891. "in milliseconds. This may be modified by an exponential back-off if failures persist.",
  4892. "llap.task.scheduler.node.re-enable.min.timeout.ms"),
  4893. LLAP_TASK_SCHEDULER_NODE_REENABLE_MAX_TIMEOUT_MS(
  4894. "hive.llap.task.scheduler.node.reenable.max.timeout.ms", "10000ms",
  4895. new TimeValidator(TimeUnit.MILLISECONDS),
  4896. "Maximum time after which a previously disabled node will be re-enabled for scheduling,\n" +
  4897. "in milliseconds. This may be modified by an exponential back-off if failures persist.",
  4898. "llap.task.scheduler.node.re-enable.max.timeout.ms"),
  4899. LLAP_TASK_SCHEDULER_NODE_DISABLE_BACK_OFF_FACTOR(
  4900. "hive.llap.task.scheduler.node.disable.backoff.factor", 1.5f,
  4901. "Backoff factor on successive blacklists of a node due to some failures. Blacklist times\n" +
  4902. "start at the min timeout and go up to the max timeout based on this backoff factor.",
  4903. "llap.task.scheduler.node.disable.backoff.factor"),
  4904. LLAP_TASK_SCHEDULER_PREEMPT_INDEPENDENT("hive.llap.task.scheduler.preempt.independent", false,
  4905. "Whether the AM LLAP scheduler should preempt a lower priority task for a higher pri one\n" +
  4906. "even if the former doesn't depend on the latter (e.g. for two parallel sides of a union)."),
  4907. LLAP_TASK_SCHEDULER_NUM_SCHEDULABLE_TASKS_PER_NODE(
  4908. "hive.llap.task.scheduler.num.schedulable.tasks.per.node", 0,
  4909. "The number of tasks the AM TaskScheduler will try allocating per node. 0 indicates that\n" +
  4910. "this should be picked up from the Registry. -1 indicates unlimited capacity; positive\n" +
  4911. "values indicate a specific bound.", "llap.task.scheduler.num.schedulable.tasks.per.node"),
  4912. LLAP_TASK_SCHEDULER_LOCALITY_DELAY(
  4913. "hive.llap.task.scheduler.locality.delay", "0ms",
  4914. new TimeValidator(TimeUnit.MILLISECONDS, -1l, true, Long.MAX_VALUE, true),
  4915. "Amount of time to wait before allocating a request which contains location information," +
  4916. " to a location other than the ones requested. Set to -1 for an infinite delay, 0" +
  4917. "for no delay."
  4918. ),
  4919. LLAP_DAEMON_TASK_PREEMPTION_METRICS_INTERVALS(
  4920. "hive.llap.daemon.task.preemption.metrics.intervals", "30,60,300",
  4921. "Comma-delimited set of integers denoting the desired rollover intervals (in seconds)\n" +
  4922. " for percentile latency metrics. Used by LLAP daemon task scheduler metrics for\n" +
  4923. " time taken to kill task (due to pre-emption) and useful time wasted by the task that\n" +
  4924. " is about to be preempted."
  4925. ),
  4926. LLAP_DAEMON_TASK_SCHEDULER_WAIT_QUEUE_SIZE("hive.llap.daemon.task.scheduler.wait.queue.size",
  4927. 10, "LLAP scheduler maximum queue size.", "llap.daemon.task.scheduler.wait.queue.size"),
  4928. LLAP_DAEMON_WAIT_QUEUE_COMPARATOR_CLASS_NAME(
  4929. "hive.llap.daemon.wait.queue.comparator.class.name",
  4930. "org.apache.hadoop.hive.llap.daemon.impl.comparator.ShortestJobFirstComparator",
  4931. "The priority comparator to use for LLAP scheduler priority queue. The built-in options\n" +
  4932. "are org.apache.hadoop.hive.llap.daemon.impl.comparator.ShortestJobFirstComparator and\n" +
  4933. ".....FirstInFirstOutComparator", "llap.daemon.wait.queue.comparator.class.name"),
  4934. LLAP_DAEMON_TASK_SCHEDULER_ENABLE_PREEMPTION(
  4935. "hive.llap.daemon.task.scheduler.enable.preemption", true,
  4936. "Whether non-finishable running tasks (e.g. a reducer waiting for inputs) should be\n" +
  4937. "preempted by finishable tasks inside LLAP scheduler.",
  4938. "llap.daemon.task.scheduler.enable.preemption"),
  4939. LLAP_DAEMON_METRICS_TIMED_WINDOW_AVERAGE_DATA_POINTS(
  4940. "hive.llap.daemon.metrics.timed.window.average.data.points", 0,
  4941. "The number of data points stored for calculating executor metrics timed averages.\n" +
  4942. "Currently used for ExecutorNumExecutorsAvailableAverage and ExecutorNumQueuedRequestsAverage\n" +
  4943. "0 means that average calculation is turned off"),
  4944. LLAP_DAEMON_METRICS_TIMED_WINDOW_AVERAGE_WINDOW_LENGTH(
  4945. "hive.llap.daemon.metrics.timed.window.average.window.length", "1m",
  4946. new TimeValidator(TimeUnit.NANOSECONDS),
  4947. "The length of the time window used for calculating executor metrics timed averages.\n" +
  4948. "Currently used for ExecutorNumExecutorsAvailableAverage and ExecutorNumQueuedRequestsAverage\n"),
  4949. LLAP_DAEMON_METRICS_SIMPLE_AVERAGE_DATA_POINTS(
  4950. "hive.llap.daemon.metrics.simple.average.data.points", 0,
  4951. "The number of data points stored for calculating executor metrics simple averages.\n" +
  4952. "Currently used for AverageQueueTime and AverageResponseTime\n" +
  4953. "0 means that average calculation is turned off"),
  4954. LLAP_TASK_COMMUNICATOR_CONNECTION_TIMEOUT_MS(
  4955. "hive.llap.task.communicator.connection.timeout.ms", "16000ms",
  4956. new TimeValidator(TimeUnit.MILLISECONDS),
  4957. "Connection timeout (in milliseconds) before a failure to an LLAP daemon from Tez AM.",
  4958. "llap.task.communicator.connection.timeout-millis"),
  4959. LLAP_TASK_COMMUNICATOR_LISTENER_THREAD_COUNT(
  4960. "hive.llap.task.communicator.listener.thread-count", 30,
  4961. "The number of task communicator listener threads."),
  4962. LLAP_MAX_CONCURRENT_REQUESTS_PER_NODE("hive.llap.max.concurrent.requests.per.daemon", 12,
  4963. "Maximum number of concurrent requests to one daemon from Tez AM"),
  4964. LLAP_TASK_COMMUNICATOR_CONNECTION_SLEEP_BETWEEN_RETRIES_MS(
  4965. "hive.llap.task.communicator.connection.sleep.between.retries.ms", "2000ms",
  4966. new TimeValidator(TimeUnit.MILLISECONDS),
  4967. "Sleep duration (in milliseconds) to wait before retrying on error when obtaining a\n" +
  4968. "connection to LLAP daemon from Tez AM.",
  4969. "llap.task.communicator.connection.sleep-between-retries-millis"),
  4970. LLAP_TASK_UMBILICAL_SERVER_PORT("hive.llap.daemon.umbilical.port", "0",
  4971. "LLAP task umbilical server RPC port or range of ports to try in case "
  4972. + "the first port is occupied"),
  4973. LLAP_DAEMON_WEB_PORT("hive.llap.daemon.web.port", 15002, "LLAP daemon web UI port.",
  4974. "llap.daemon.service.port"),
  4975. LLAP_DAEMON_WEB_SSL("hive.llap.daemon.web.ssl", false,
  4976. "Whether LLAP daemon web UI should use SSL.", "llap.daemon.service.ssl"),
  4977. LLAP_DAEMON_WEB_XFRAME_ENABLED("hive.llap.daemon.web.xframe.enabled", true,
  4978. "Whether to enable xframe on LLAP daemon webUI\n"),
  4979. LLAP_DAEMON_WEB_XFRAME_VALUE("hive.llap.daemon.web.xframe.value", "SAMEORIGIN",
  4980. "Configuration to allow the user to set the x_frame-options value\n"),
  4981. LLAP_CLIENT_CONSISTENT_SPLITS("hive.llap.client.consistent.splits", true,
  4982. "Whether to setup split locations to match nodes on which llap daemons are running, " +
  4983. "instead of using the locations provided by the split itself. If there is no llap daemon " +
  4984. "running, fall back to locations provided by the split. This is effective only if " +
  4985. "hive.execution.mode is llap"),
  4986. LLAP_SPLIT_LOCATION_PROVIDER_CLASS("hive.llap.split.location.provider.class",
  4987. "org.apache.hadoop.hive.ql.exec.tez.HostAffinitySplitLocationProvider",
  4988. "Split location provider class to use during split generation for LLAP. This class should implement\n" +
  4989. "org.apache.hadoop.mapred.split.SplitLocationProvider interface"),
  4990. LLAP_VALIDATE_ACLS("hive.llap.validate.acls", true,
  4991. "Whether LLAP should reject permissive ACLs in some cases (e.g. its own management\n" +
  4992. "protocol or ZK paths), similar to how ssh refuses a key with bad access permissions."),
  4993. LLAP_DAEMON_OUTPUT_SERVICE_PORT("hive.llap.daemon.output.service.port", 15003,
  4994. "LLAP daemon output service port"),
  4995. LLAP_DAEMON_OUTPUT_STREAM_TIMEOUT("hive.llap.daemon.output.stream.timeout", "120s",
  4996. new TimeValidator(TimeUnit.SECONDS),
  4997. "The timeout for the client to connect to LLAP output service and start the fragment\n" +
  4998. "output after sending the fragment. The fragment will fail if its output is not claimed."),
  4999. LLAP_DAEMON_OUTPUT_SERVICE_SEND_BUFFER_SIZE("hive.llap.daemon.output.service.send.buffer.size",
  5000. 128 * 1024, "Send buffer size to be used by LLAP daemon output service"),
  5001. LLAP_DAEMON_OUTPUT_SERVICE_MAX_PENDING_WRITES("hive.llap.daemon.output.service.max.pending.writes",
  5002. 8, "Maximum number of queued writes allowed per connection when sending data\n" +
  5003. " via the LLAP output service to external clients."),
  5004. LLAP_EXTERNAL_SPLITS_TEMP_TABLE_STORAGE_FORMAT("hive.llap.external.splits.temp.table.storage.format",
  5005. "orc", new StringSet("default", "text", "orc"),
  5006. "Storage format for temp tables created using LLAP external client"),
  5007. LLAP_EXTERNAL_CLIENT_USE_HYBRID_CALENDAR("hive.llap.external.client.use.hybrid.calendar",
  5008. false,
  5009. "Whether to use hybrid calendar for parsing of data/timestamps."),
  5010. // ====== confs for llap-external-client cloud deployment ======
  5011. LLAP_EXTERNAL_CLIENT_CLOUD_DEPLOYMENT_SETUP_ENABLED(
  5012. "hive.llap.external.client.cloud.deployment.setup.enabled", false,
  5013. "Tells whether to enable additional RPC port, auth mechanism for llap external clients. This is meant"
  5014. + "for cloud based deployments. When true, it has following effects - \n"
  5015. + "1. Enables an extra RPC port on LLAP daemon to accept fragments from external clients. See"
  5016. + "hive.llap.external.client.cloud.rpc.port\n"
  5017. + "2. Uses external hostnames of LLAP in splits, so that clients can submit from outside of cloud. "
  5018. + "Env variable PUBLIC_HOSTNAME should be available on LLAP machines.\n"
  5019. + "3. Uses JWT based authentication for splits to be validated at LLAP. See "
  5020. + "hive.llap.external.client.cloud.jwt.shared.secret.provider"),
  5021. LLAP_EXTERNAL_CLIENT_CLOUD_RPC_PORT("hive.llap.external.client.cloud.rpc.port", 30004,
  5022. "The LLAP daemon RPC port for external clients when llap is running in cloud environment."),
  5023. LLAP_EXTERNAL_CLIENT_CLOUD_OUTPUT_SERVICE_PORT("hive.llap.external.client.cloud.output.service.port", 30005,
  5024. "LLAP output service port when llap is running in cloud environment"),
  5025. LLAP_EXTERNAL_CLIENT_CLOUD_JWT_SHARED_SECRET_PROVIDER(
  5026. "hive.llap.external.client.cloud.jwt.shared.secret.provider",
  5027. "org.apache.hadoop.hive.llap.security.DefaultJwtSharedSecretProvider",
  5028. "Shared secret provider to be used to sign JWT"),
  5029. LLAP_EXTERNAL_CLIENT_CLOUD_JWT_SHARED_SECRET("hive.llap.external.client.cloud.jwt.shared.secret",
  5030. "",
  5031. "The LLAP daemon RPC port for external clients when llap is running in cloud environment. "
  5032. + "Length of the secret should be >= 32 bytes"),
  5033. // ====== confs for llap-external-client cloud deployment ======
  5034. LLAP_ENABLE_GRACE_JOIN_IN_LLAP("hive.llap.enable.grace.join.in.llap", false,
  5035. "Override if grace join should be allowed to run in llap."),
  5036. LLAP_HS2_ENABLE_COORDINATOR("hive.llap.hs2.coordinator.enabled", true,
  5037. "Whether to create the LLAP coordinator; since execution engine and container vs llap\n" +
  5038. "settings are both coming from job configs, we don't know at start whether this should\n" +
  5039. "be created. Default true."),
  5040. LLAP_DAEMON_LOGGER("hive.llap.daemon.logger", Constants.LLAP_LOGGER_NAME_QUERY_ROUTING,
  5041. new StringSet(Constants.LLAP_LOGGER_NAME_QUERY_ROUTING,
  5042. Constants.LLAP_LOGGER_NAME_RFA,
  5043. Constants.LLAP_LOGGER_NAME_CONSOLE),
  5044. "logger used for llap-daemons."),
  5045. LLAP_OUTPUT_FORMAT_ARROW("hive.llap.output.format.arrow", true,
  5046. "Whether LLapOutputFormatService should output arrow batches"),
  5047. LLAP_COLLECT_LOCK_METRICS("hive.llap.lockmetrics.collect", false,
  5048. "Whether lock metrics (wait times, counts) are collected for LLAP "
  5049. + "related locks"),
  5050. LLAP_TASK_TIME_SUMMARY(
  5051. "hive.llap.task.time.print.summary", false,
  5052. "Display queue and runtime of tasks by host for every query executed by the shell."),
  5053. HIVE_TRIGGER_VALIDATION_INTERVAL("hive.trigger.validation.interval", "500ms",
  5054. new TimeValidator(TimeUnit.MILLISECONDS),
  5055. "Interval for validating triggers during execution of a query. Triggers defined in resource plan will get\n" +
  5056. "validated for all SQL operations after every defined interval (default: 500ms) and corresponding action\n" +
  5057. "defined in the trigger will be taken"),
  5058. SPARK_USE_OP_STATS("hive.spark.use.op.stats", true,
  5059. "Whether to use operator stats to determine reducer parallelism for Hive on Spark.\n" +
  5060. "If this is false, Hive will use source table stats to determine reducer\n" +
  5061. "parallelism for all first level reduce tasks, and the maximum reducer parallelism\n" +
  5062. "from all parents for all the rest (second level and onward) reducer tasks."),
  5063. SPARK_USE_TS_STATS_FOR_MAPJOIN("hive.spark.use.ts.stats.for.mapjoin", false,
  5064. "If this is set to true, mapjoin optimization in Hive/Spark will use statistics from\n" +
  5065. "TableScan operators at the root of operator tree, instead of parent ReduceSink\n" +
  5066. "operators of the Join operator."),
  5067. SPARK_OPTIMIZE_SHUFFLE_SERDE("hive.spark.optimize.shuffle.serde", true,
  5068. "If this is set to true, Hive on Spark will register custom serializers for data types\n" +
  5069. "in shuffle. This should result in less shuffled data."),
  5070. SPARK_CLIENT_FUTURE_TIMEOUT("hive.spark.client.future.timeout",
  5071. "60s", new TimeValidator(TimeUnit.SECONDS),
  5072. "Timeout for requests between Hive client and remote Spark driver."),
  5073. SPARK_JOB_MONITOR_TIMEOUT("hive.spark.job.monitor.timeout",
  5074. "60s", new TimeValidator(TimeUnit.SECONDS),
  5075. "Timeout for job monitor to get Spark job state."),
  5076. SPARK_RPC_CLIENT_CONNECT_TIMEOUT("hive.spark.client.connect.timeout",
  5077. "1000ms", new TimeValidator(TimeUnit.MILLISECONDS),
  5078. "Timeout for remote Spark driver in connecting back to Hive client."),
  5079. SPARK_RPC_CLIENT_HANDSHAKE_TIMEOUT("hive.spark.client.server.connect.timeout",
  5080. "90000ms", new TimeValidator(TimeUnit.MILLISECONDS),
  5081. "Timeout for handshake between Hive client and remote Spark driver. Checked by both processes."),
  5082. SPARK_RPC_SECRET_RANDOM_BITS("hive.spark.client.secret.bits", "256",
  5083. "Number of bits of randomness in the generated secret for communication between Hive client and remote Spark driver. " +
  5084. "Rounded down to the nearest multiple of 8."),
  5085. SPARK_RPC_MAX_THREADS("hive.spark.client.rpc.threads", 8,
  5086. "Maximum number of threads for remote Spark driver's RPC event loop."),
  5087. SPARK_RPC_MAX_MESSAGE_SIZE("hive.spark.client.rpc.max.size", 50 * 1024 * 1024,
  5088. "Maximum message size in bytes for communication between Hive client and remote Spark driver. Default is 50MB."),
  5089. SPARK_RPC_CHANNEL_LOG_LEVEL("hive.spark.client.channel.log.level", null,
  5090. "Channel logging level for remote Spark driver. One of {DEBUG, ERROR, INFO, TRACE, WARN}."),
  5091. SPARK_RPC_SASL_MECHANISM("hive.spark.client.rpc.sasl.mechanisms", "DIGEST-MD5",
  5092. "Name of the SASL mechanism to use for authentication."),
  5093. SPARK_RPC_SERVER_ADDRESS("hive.spark.client.rpc.server.address", "",
  5094. "The server address of HiverServer2 host to be used for communication between Hive client and remote Spark driver. " +
  5095. "Default is empty, which means the address will be determined in the same way as for hive.server2.thrift.bind.host." +
  5096. "This is only necessary if the host has multiple network addresses and if a different network address other than " +
  5097. "hive.server2.thrift.bind.host is to be used."),
  5098. SPARK_RPC_SERVER_PORT("hive.spark.client.rpc.server.port", "", "A list of port ranges which can be used by RPC server " +
  5099. "with the format of 49152-49222,49228 and a random one is selected from the list. Default is empty, which randomly " +
  5100. "selects one port from all available ones."),
  5101. SPARK_DYNAMIC_PARTITION_PRUNING(
  5102. "hive.spark.dynamic.partition.pruning", false,
  5103. "When dynamic pruning is enabled, joins on partition keys will be processed by writing\n" +
  5104. "to a temporary HDFS file, and read later for removing unnecessary partitions."),
  5105. SPARK_DYNAMIC_PARTITION_PRUNING_MAX_DATA_SIZE(
  5106. "hive.spark.dynamic.partition.pruning.max.data.size", 100*1024*1024L,
  5107. "Maximum total data size in dynamic pruning."),
  5108. SPARK_DYNAMIC_PARTITION_PRUNING_MAP_JOIN_ONLY(
  5109. "hive.spark.dynamic.partition.pruning.map.join.only", false,
  5110. "Turn on dynamic partition pruning only for map joins.\n" +
  5111. "If hive.spark.dynamic.partition.pruning is set to true, this parameter value is ignored."),
  5112. SPARK_USE_GROUPBY_SHUFFLE(
  5113. "hive.spark.use.groupby.shuffle", true,
  5114. "Spark groupByKey transformation has better performance but uses unbounded memory." +
  5115. "Turn this off when there is a memory issue."),
  5116. SPARK_JOB_MAX_TASKS("hive.spark.job.max.tasks", -1, "The maximum number of tasks a Spark job may have.\n" +
  5117. "If a Spark job contains more tasks than the maximum, it will be cancelled. A value of -1 means no limit."),
  5118. SPARK_STAGE_MAX_TASKS("hive.spark.stage.max.tasks", -1, "The maximum number of tasks a stage in a Spark job may have.\n" +
  5119. "If a Spark job stage contains more tasks than the maximum, the job will be cancelled. A value of -1 means no limit."),
  5120. SPARK_CLIENT_TYPE("hive.spark.client.type", HIVE_SPARK_SUBMIT_CLIENT,
  5121. "Controls how the Spark application is launched. If " + HIVE_SPARK_SUBMIT_CLIENT + " is " +
  5122. "specified (default) then the spark-submit shell script is used to launch the Spark " +
  5123. "app. If " + HIVE_SPARK_LAUNCHER_CLIENT + " is specified then Spark's " +
  5124. "InProcessLauncher is used to programmatically launch the app."),
  5125. SPARK_SESSION_TIMEOUT("hive.spark.session.timeout", "30m", new TimeValidator(TimeUnit.MINUTES,
  5126. 30L, true, null, true), "Amount of time the Spark Remote Driver should wait for " +
  5127. " a Spark job to be submitted before shutting down. Minimum value is 30 minutes"),
  5128. SPARK_SESSION_TIMEOUT_PERIOD("hive.spark.session.timeout.period", "60s",
  5129. new TimeValidator(TimeUnit.SECONDS, 60L, true, null, true),
  5130. "How frequently to check for idle Spark sessions. Minimum value is 60 seconds."),
  5131. NWAYJOINREORDER("hive.reorder.nway.joins", true,
  5132. "Runs reordering of tables within single n-way join (i.e.: picks streamtable)"),
  5133. HIVE_MERGE_NWAY_JOINS("hive.merge.nway.joins", false,
  5134. "Merge adjacent joins into a single n-way join"),
  5135. HIVE_LOG_N_RECORDS("hive.log.every.n.records", 0L, new RangeValidator(0L, null),
  5136. "If value is greater than 0 logs in fixed intervals of size n rather than exponentially."),
  5137. /**
  5138. * @deprecated Use MetastoreConf.MSCK_PATH_VALIDATION
  5139. */
  5140. @Deprecated
  5141. HIVE_MSCK_PATH_VALIDATION("hive.msck.path.validation", "throw",
  5142. new StringSet("throw", "skip", "ignore"), "The approach msck should take with HDFS " +
  5143. "directories that are partition-like but contain unsupported characters. 'throw' (an " +
  5144. "exception) is the default; 'skip' will skip the invalid directories and still repair the" +
  5145. " others; 'ignore' will skip the validation (legacy behavior, causes bugs in many cases)"),
  5146. /**
  5147. * @deprecated Use MetastoreConf.MSCK_REPAIR_BATCH_SIZE
  5148. */
  5149. @Deprecated
  5150. HIVE_MSCK_REPAIR_BATCH_SIZE(
  5151. "hive.msck.repair.batch.size", 3000,
  5152. "Batch size for the msck repair command. If the value is greater than zero,\n "
  5153. + "it will execute batch wise with the configured batch size. In case of errors while\n"
  5154. + "adding unknown partitions the batch size is automatically reduced by half in the subsequent\n"
  5155. + "retry attempt. The default value is 3000 which means it will execute in the batches of 3000."),
  5156. /**
  5157. * @deprecated Use MetastoreConf.MSCK_REPAIR_BATCH_MAX_RETRIES
  5158. */
  5159. @Deprecated
  5160. HIVE_MSCK_REPAIR_BATCH_MAX_RETRIES("hive.msck.repair.batch.max.retries", 4,
  5161. "Maximum number of retries for the msck repair command when adding unknown partitions.\n "
  5162. + "If the value is greater than zero it will retry adding unknown partitions until the maximum\n"
  5163. + "number of attempts is reached or batch size is reduced to 0, whichever is earlier.\n"
  5164. + "In each retry attempt it will reduce the batch size by a factor of 2 until it reaches zero.\n"
  5165. + "If the value is set to zero it will retry until the batch size becomes zero as described above."),
  5166. HIVE_SERVER2_LLAP_CONCURRENT_QUERIES("hive.server2.llap.concurrent.queries", -1,
  5167. "The number of queries allowed in parallel via llap. Negative number implies 'infinite'."),
  5168. HIVE_TEZ_ENABLE_MEMORY_MANAGER("hive.tez.enable.memory.manager", true,
  5169. "Enable memory manager for tez"),
  5170. HIVE_HASH_TABLE_INFLATION_FACTOR("hive.hash.table.inflation.factor", (float) 2.0,
  5171. "Expected inflation factor between disk/in memory representation of hash tables"),
  5172. HIVE_LOG_TRACE_ID("hive.log.trace.id", "",
  5173. "Log tracing id that can be used by upstream clients for tracking respective logs. " +
  5174. "Truncated to " + LOG_PREFIX_LENGTH + " characters. Defaults to use auto-generated session id."),
  5175. HIVE_MM_AVOID_GLOBSTATUS_ON_S3("hive.mm.avoid.s3.globstatus", true,
  5176. "Whether to use listFiles (optimized on S3) instead of globStatus when on S3."),
  5177. // If a parameter is added to the restricted list, add a test in TestRestrictedList.Java
  5178. HIVE_CONF_RESTRICTED_LIST("hive.conf.restricted.list",
  5179. "hive.security.authenticator.manager,hive.security.authorization.manager," +
  5180. "hive.security.metastore.authorization.manager,hive.security.metastore.authenticator.manager," +
  5181. "hive.users.in.admin.role,hive.server2.xsrf.filter.enabled,hive.security.authorization.enabled," +
  5182. "hive.distcp.privileged.doAs," +
  5183. "hive.server2.authentication.ldap.baseDN," +
  5184. "hive.server2.authentication.ldap.url," +
  5185. "hive.server2.authentication.ldap.Domain," +
  5186. "hive.server2.authentication.ldap.groupDNPattern," +
  5187. "hive.server2.authentication.ldap.groupFilter," +
  5188. "hive.server2.authentication.ldap.userDNPattern," +
  5189. "hive.server2.authentication.ldap.userFilter," +
  5190. "hive.server2.authentication.ldap.groupMembershipKey," +
  5191. "hive.server2.authentication.ldap.userMembershipKey," +
  5192. "hive.server2.authentication.ldap.groupClassKey," +
  5193. "hive.server2.authentication.ldap.customLDAPQuery," +
  5194. "hive.server2.service.users," +
  5195. "hive.privilege.synchronizer," +
  5196. "hive.privilege.synchronizer.interval," +
  5197. "hive.spark.client.connect.timeout," +
  5198. "hive.spark.client.server.connect.timeout," +
  5199. "hive.spark.client.channel.log.level," +
  5200. "hive.spark.client.rpc.max.size," +
  5201. "hive.spark.client.rpc.threads," +
  5202. "hive.spark.client.secret.bits," +
  5203. "hive.query.max.length," +
  5204. "hive.spark.client.rpc.server.address," +
  5205. "hive.spark.client.rpc.server.port," +
  5206. "hive.spark.client.rpc.sasl.mechanisms," +
  5207. "hive.druid.broker.address.default," +
  5208. "hive.druid.coordinator.address.default," +
  5209. "hikaricp.," +
  5210. "hadoop.bin.path," +
  5211. "yarn.bin.path," +
  5212. "spark.home," +
  5213. "hive.driver.parallel.compilation.global.limit," +
  5214. "hive.zookeeper.ssl.keystore.location," +
  5215. "hive.zookeeper.ssl.keystore.password," +
  5216. "hive.zookeeper.ssl.truststore.location," +
  5217. "hive.zookeeper.ssl.truststore.password",
  5218. "Comma separated list of configuration options which are immutable at runtime"),
  5219. HIVE_CONF_HIDDEN_LIST("hive.conf.hidden.list",
  5220. METASTOREPWD.varname + "," + HIVE_SERVER2_SSL_KEYSTORE_PASSWORD.varname
  5221. + "," + DRUID_METADATA_DB_PASSWORD.varname
  5222. // Adding the S3 credentials from Hadoop config to be hidden
  5223. + ",fs.s3.awsAccessKeyId"
  5224. + ",fs.s3.awsSecretAccessKey"
  5225. + ",fs.s3n.awsAccessKeyId"
  5226. + ",fs.s3n.awsSecretAccessKey"
  5227. + ",fs.s3a.access.key"
  5228. + ",fs.s3a.secret.key"
  5229. + ",fs.s3a.proxy.password"
  5230. + ",dfs.adls.oauth2.credential"
  5231. + ",fs.adl.oauth2.credential"
  5232. + ",fs.azure.account.oauth2.client.secret"
  5233. + ",hive.zookeeper.ssl.keystore.location"
  5234. + ",hive.zookeeper.ssl.keystore.password"
  5235. + ",hive.zookeeper.ssl.truststore.location"
  5236. + ",hive.zookeeper.ssl.truststore.password",
  5237. "Comma separated list of configuration options which should not be read by normal user like passwords"),
  5238. HIVE_CONF_INTERNAL_VARIABLE_LIST("hive.conf.internal.variable.list",
  5239. "hive.added.files.path,hive.added.jars.path,hive.added.archives.path",
  5240. "Comma separated list of variables which are used internally and should not be configurable."),
  5241. HIVE_SPARK_RSC_CONF_LIST("hive.spark.rsc.conf.list",
  5242. SPARK_OPTIMIZE_SHUFFLE_SERDE.varname + "," +
  5243. SPARK_CLIENT_FUTURE_TIMEOUT.varname + "," +
  5244. SPARK_CLIENT_TYPE.varname,
  5245. "Comma separated list of variables which are related to remote spark context.\n" +
  5246. "Changing these variables will result in re-creating the spark session."),
  5247. HIVE_QUERY_MAX_LENGTH("hive.query.max.length", "10Mb", new SizeValidator(), "The maximum" +
  5248. " size of a query string. Enforced after variable substitutions."),
  5249. HIVE_QUERY_TIMEOUT_SECONDS("hive.query.timeout.seconds", "0s",
  5250. new TimeValidator(TimeUnit.SECONDS),
  5251. "Timeout for Running Query in seconds. A nonpositive value means infinite. " +
  5252. "If the query timeout is also set by thrift API call, the smaller one will be taken."),
  5253. HIVE_COMPUTE_SPLITS_NUM_THREADS("hive.compute.splits.num.threads", 10,
  5254. "How many threads Input Format should use to create splits in parallel.",
  5255. HIVE_ORC_COMPUTE_SPLITS_NUM_THREADS.varname),
  5256. HIVE_EXEC_INPUT_LISTING_MAX_THREADS("hive.exec.input.listing.max.threads", 0, new SizeValidator(0L, true, 1024L, true),
  5257. "Maximum number of threads that Hive uses to list file information from file systems (recommended > 1 for blobstore)."),
  5258. HIVE_QUERY_REEXECUTION_ENABLED("hive.query.reexecution.enabled", true,
  5259. "Enable query reexecutions"),
  5260. HIVE_QUERY_REEXECUTION_STRATEGIES("hive.query.reexecution.strategies", "overlay,reoptimize,reexecute_lost_am,dagsubmit",
  5261. "comma separated list of plugin can be used:\n"
  5262. + " overlay: hiveconf subtree 'reexec.overlay' is used as an overlay in case of an execution errors out\n"
  5263. + " reoptimize: collects operator statistics during execution and recompile the query after a failure\n"
  5264. + " reexecute_lost_am: reexecutes query if it failed due to tez am node gets decommissioned"),
  5265. HIVE_QUERY_REEXECUTION_STATS_PERSISTENCE("hive.query.reexecution.stats.persist.scope", "metastore",
  5266. new StringSet("query", "hiveserver", "metastore"),
  5267. "Sets the persistence scope of runtime statistics\n"
  5268. + " query: runtime statistics are only used during re-execution\n"
  5269. + " hiveserver: runtime statistics are persisted in the hiveserver - all sessions share it\n"
  5270. + " metastore: runtime statistics are persisted in the metastore as well"),
  5271. HIVE_TXN_MAX_RETRYSNAPSHOT_COUNT("hive.txn.retrysnapshot.max.count", 5, new RangeValidator(1, 20),
  5272. "Maximum number of snapshot invalidate attempts per request."),
  5273. HIVE_QUERY_MAX_REEXECUTION_COUNT("hive.query.reexecution.max.count", 1,
  5274. "Maximum number of re-executions for a single query."),
  5275. HIVE_QUERY_REEXECUTION_ALWAYS_COLLECT_OPERATOR_STATS("hive.query.reexecution.always.collect.operator.stats", false,
  5276. "If sessionstats are enabled; this option can be used to collect statistics all the time"),
  5277. HIVE_QUERY_REEXECUTION_STATS_CACHE_BATCH_SIZE("hive.query.reexecution.stats.cache.batch.size", -1,
  5278. "If runtime stats are stored in metastore; the maximal batch size per round during load."),
  5279. HIVE_QUERY_REEXECUTION_STATS_CACHE_SIZE("hive.query.reexecution.stats.cache.size", 100_000,
  5280. "Size of the runtime statistics cache. Unit is: OperatorStat entry; a query plan consist ~100."),
  5281. HIVE_QUERY_PLANMAPPER_LINK_RELNODES("hive.query.planmapper.link.relnodes", true,
  5282. "Whether to link Calcite nodes to runtime statistics."),
  5283. HIVE_SCHEDULED_QUERIES_EXECUTOR_ENABLED("hive.scheduled.queries.executor.enabled", true,
  5284. "Controls whether HS2 will run scheduled query executor."),
  5285. HIVE_SCHEDULED_QUERIES_NAMESPACE("hive.scheduled.queries.namespace", "hive",
  5286. "Sets the scheduled query namespace to be used. New scheduled queries are created in this namespace;"
  5287. + "and execution is also bound to the namespace"),
  5288. HIVE_SCHEDULED_QUERIES_EXECUTOR_IDLE_SLEEP_TIME("hive.scheduled.queries.executor.idle.sleep.time", "60s",
  5289. new TimeValidator(TimeUnit.SECONDS),
  5290. "Time to sleep between quering for the presence of a scheduled query."),
  5291. HIVE_SCHEDULED_QUERIES_EXECUTOR_PROGRESS_REPORT_INTERVAL("hive.scheduled.queries.executor.progress.report.interval",
  5292. "60s",
  5293. new TimeValidator(TimeUnit.SECONDS),
  5294. "While scheduled queries are in flight; "
  5295. + "a background update happens periodically to report the actual state of the query"),
  5296. HIVE_SCHEDULED_QUERIES_CREATE_AS_ENABLED("hive.scheduled.queries.create.as.enabled", true,
  5297. "This option sets the default behaviour of newly created scheduled queries."),
  5298. HIVE_SECURITY_AUTHORIZATION_SCHEDULED_QUERIES_SUPPORTED("hive.security.authorization.scheduled.queries.supported",
  5299. false,
  5300. "Enable this if the configured authorizer is able to handle scheduled query related calls."),
  5301. HIVE_SCHEDULED_QUERIES_MAX_EXECUTORS("hive.scheduled.queries.max.executors", 4, new RangeValidator(1, null),
  5302. "Maximal number of scheduled query executors to allow."),
  5303. HIVE_ASYNC_CLEANUP_SERVICE_THREAD_COUNT("hive.async.cleanup.service.thread.count", 10, new RangeValidator(0, null),
  5304. "Number of threads that run some eventual cleanup operations after queries/sessions close. 0 means cleanup is sync."),
  5305. HIVE_ASYNC_CLEANUP_SERVICE_QUEUE_SIZE("hive.async.cleanup.service.queue.size", 10000, new RangeValidator(10, Integer.MAX_VALUE),
  5306. "Size of the async cleanup queue. If cleanup queue is full, cleanup operations become synchronous. " +
  5307. "Applicable only when number of async cleanup is turned on."),
  5308. HIVE_QUERY_RESULTS_CACHE_ENABLED("hive.query.results.cache.enabled", true,
  5309. "If the query results cache is enabled. This will keep results of previously executed queries " +
  5310. "to be reused if the same query is executed again."),
  5311. HIVE_QUERY_RESULTS_CACHE_NONTRANSACTIONAL_TABLES_ENABLED("hive.query.results.cache.nontransactional.tables.enabled", false,
  5312. "If the query results cache is enabled for queries involving non-transactional tables." +
  5313. "Users who enable this setting should be willing to tolerate some amount of stale results in the cache."),
  5314. HIVE_QUERY_RESULTS_CACHE_WAIT_FOR_PENDING_RESULTS("hive.query.results.cache.wait.for.pending.results", true,
  5315. "Should a query wait for the pending results of an already running query, " +
  5316. "in order to use the cached result when it becomes ready"),
  5317. HIVE_QUERY_RESULTS_CACHE_DIRECTORY("hive.query.results.cache.directory",
  5318. "/tmp/hive/_resultscache_",
  5319. "Location of the query results cache directory. Temporary results from queries " +
  5320. "will be moved to this location."),
  5321. HIVE_QUERY_RESULTS_CACHE_MAX_ENTRY_LIFETIME("hive.query.results.cache.max.entry.lifetime", "3600s",
  5322. new TimeValidator(TimeUnit.SECONDS),
  5323. "Maximum lifetime in seconds for an entry in the query results cache. A nonpositive value means infinite."),
  5324. HIVE_QUERY_RESULTS_CACHE_MAX_SIZE("hive.query.results.cache.max.size",
  5325. (long) 2 * 1024 * 1024 * 1024,
  5326. "Maximum total size in bytes that the query results cache directory is allowed to use on the filesystem."),
  5327. HIVE_QUERY_RESULTS_CACHE_MAX_ENTRY_SIZE("hive.query.results.cache.max.entry.size",
  5328. (long) 10 * 1024 * 1024,
  5329. "Maximum size in bytes that a single query result is allowed to use in the results cache directory"),
  5330. HIVE_NOTFICATION_EVENT_POLL_INTERVAL("hive.notification.event.poll.interval", "60s",
  5331. new TimeValidator(TimeUnit.SECONDS),
  5332. "How often the notification log is polled for new NotificationEvents from the metastore." +
  5333. "A nonpositive value means the notification log is never polled."),
  5334. HIVE_NOTFICATION_EVENT_CONSUMERS("hive.notification.event.consumers",
  5335. "org.apache.hadoop.hive.ql.cache.results.QueryResultsCache$InvalidationEventConsumer",
  5336. "Comma-separated list of class names extending EventConsumer," +
  5337. "to handle the NotificationEvents retreived by the notification event poll."),
  5338. HIVE_DESCRIBE_PARTITIONED_TABLE_IGNORE_STATS("hive.describe.partitionedtable.ignore.stats", false,
  5339. "Disable partitioned table stats collection for 'DESCRIBE FORMATTED' or 'DESCRIBE EXTENDED' commands."),
  5340. HIVE_SERVER2_ICEBERG_METADATA_GENERATOR_THREADS("hive.server2.iceberg.metadata.generator.threads", 10,
  5341. "Number of threads used to scan partition directories for data files and update/generate iceberg metadata"),
  5342. HIVE_ICEBERG_METADATA_REFRESH_MAX_RETRIES("hive.iceberg.metadata.refresh.max.retries", 2,
  5343. "Max retry count for trying to access the metadata location in order to refresh metadata during " +
  5344. " Iceberg table load."),
  5345. /* BLOBSTORE section */
  5346. HIVE_BLOBSTORE_SUPPORTED_SCHEMES("hive.blobstore.supported.schemes", "s3,s3a,s3n",
  5347. "Comma-separated list of supported blobstore schemes."),
  5348. HIVE_BLOBSTORE_USE_BLOBSTORE_AS_SCRATCHDIR("hive.blobstore.use.blobstore.as.scratchdir", false,
  5349. "Enable the use of scratch directories directly on blob storage systems (it may cause performance penalties)."),
  5350. HIVE_BLOBSTORE_OPTIMIZATIONS_ENABLED("hive.blobstore.optimizations.enabled", true,
  5351. "This parameter enables a number of optimizations when running on blobstores:\n" +
  5352. "(1) If hive.blobstore.use.blobstore.as.scratchdir is false, force the last Hive job to write to the blobstore.\n" +
  5353. "This is a performance optimization that forces the final FileSinkOperator to write to the blobstore.\n" +
  5354. "See HIVE-15121 for details."),
  5355. HIVE_ADDITIONAL_CONFIG_FILES("hive.additional.config.files", "",
  5356. "The names of additional config files, such as ldap-site.xml," +
  5357. "spark-site.xml, etc in comma separated list.");
  5358. public final String varname;
  5359. public final String altName;
  5360. private final String defaultExpr;
  5361. public final String defaultStrVal;
  5362. public final int defaultIntVal;
  5363. public final long defaultLongVal;
  5364. public final float defaultFloatVal;
  5365. public final boolean defaultBoolVal;
  5366. private final Class<?> valClass;
  5367. private final VarType valType;
  5368. private final Validator validator;
  5369. private final String description;
  5370. private final boolean excluded;
  5371. private final boolean caseSensitive;
  5372. ConfVars(String varname, Object defaultVal, String description) {
  5373. this(varname, defaultVal, null, description, true, false, null);
  5374. }
  5375. ConfVars(String varname, Object defaultVal, String description, String altName) {
  5376. this(varname, defaultVal, null, description, true, false, altName);
  5377. }
  5378. ConfVars(String varname, Object defaultVal, Validator validator, String description,
  5379. String altName) {
  5380. this(varname, defaultVal, validator, description, true, false, altName);
  5381. }
  5382. ConfVars(String varname, Object defaultVal, String description, boolean excluded) {
  5383. this(varname, defaultVal, null, description, true, excluded, null);
  5384. }
  5385. ConfVars(String varname, String defaultVal, boolean caseSensitive, String description) {
  5386. this(varname, defaultVal, null, description, caseSensitive, false, null);
  5387. }
  5388. ConfVars(String varname, Object defaultVal, Validator validator, String description) {
  5389. this(varname, defaultVal, validator, description, true, false, null);
  5390. }
  5391. ConfVars(String varname, Object defaultVal, Validator validator, String description, boolean excluded) {
  5392. this(varname, defaultVal, validator, description, true, excluded, null);
  5393. }
  5394. ConfVars(String varname, Object defaultVal, Validator validator, String description,
  5395. boolean caseSensitive, boolean excluded, String altName) {
  5396. this.varname = varname;
  5397. this.validator = validator;
  5398. this.description = description;
  5399. this.defaultExpr = defaultVal == null ? null : String.valueOf(defaultVal);
  5400. this.excluded = excluded;
  5401. this.caseSensitive = caseSensitive;
  5402. this.altName = altName;
  5403. if (defaultVal == null || defaultVal instanceof String) {
  5404. this.valClass = String.class;
  5405. this.valType = VarType.STRING;
  5406. this.defaultStrVal = SystemVariables.substitute((String)defaultVal);
  5407. this.defaultIntVal = -1;
  5408. this.defaultLongVal = -1;
  5409. this.defaultFloatVal = -1;
  5410. this.defaultBoolVal = false;
  5411. } else if (defaultVal instanceof Integer) {
  5412. this.valClass = Integer.class;
  5413. this.valType = VarType.INT;
  5414. this.defaultStrVal = null;
  5415. this.defaultIntVal = (Integer)defaultVal;
  5416. this.defaultLongVal = -1;
  5417. this.defaultFloatVal = -1;
  5418. this.defaultBoolVal = false;
  5419. } else if (defaultVal instanceof Long) {
  5420. this.valClass = Long.class;
  5421. this.valType = VarType.LONG;
  5422. this.defaultStrVal = null;
  5423. this.defaultIntVal = -1;
  5424. this.defaultLongVal = (Long)defaultVal;
  5425. this.defaultFloatVal = -1;
  5426. this.defaultBoolVal = false;
  5427. } else if (defaultVal instanceof Float) {
  5428. this.valClass = Float.class;
  5429. this.valType = VarType.FLOAT;
  5430. this.defaultStrVal = null;
  5431. this.defaultIntVal = -1;
  5432. this.defaultLongVal = -1;
  5433. this.defaultFloatVal = (Float)defaultVal;
  5434. this.defaultBoolVal = false;
  5435. } else if (defaultVal instanceof Boolean) {
  5436. this.valClass = Boolean.class;
  5437. this.valType = VarType.BOOLEAN;
  5438. this.defaultStrVal = null;
  5439. this.defaultIntVal = -1;
  5440. this.defaultLongVal = -1;
  5441. this.defaultFloatVal = -1;
  5442. this.defaultBoolVal = (Boolean)defaultVal;
  5443. } else {
  5444. throw new IllegalArgumentException("Not supported type value " + defaultVal.getClass() +
  5445. " for name " + varname);
  5446. }
  5447. }
  5448. public boolean isType(String value) {
  5449. return valType.isType(value);
  5450. }
  5451. public Validator getValidator() {
  5452. return validator;
  5453. }
  5454. public String validate(String value) {
  5455. return validator == null ? null : validator.validate(value);
  5456. }
  5457. public String validatorDescription() {
  5458. return validator == null ? null : validator.toDescription();
  5459. }
  5460. public String typeString() {
  5461. String type = valType.typeString();
  5462. if (valType == VarType.STRING && validator != null) {
  5463. if (validator instanceof TimeValidator) {
  5464. type += "(TIME)";
  5465. }
  5466. }
  5467. return type;
  5468. }
  5469. public String getRawDescription() {
  5470. return description;
  5471. }
  5472. public String getDescription() {
  5473. String validator = validatorDescription();
  5474. if (validator != null) {
  5475. return validator + ".\n" + description;
  5476. }
  5477. return description;
  5478. }
  5479. public boolean isExcluded() {
  5480. return excluded;
  5481. }
  5482. public boolean isCaseSensitive() {
  5483. return caseSensitive;
  5484. }
  5485. @Override
  5486. public String toString() {
  5487. return varname;
  5488. }
  5489. private static String findHadoopBinary() {
  5490. String val = findHadoopHome();
  5491. // if can't find hadoop home we can at least try /usr/bin/hadoop
  5492. val = (val == null ? File.separator + "usr" : val)
  5493. + File.separator + "bin" + File.separator + "hadoop";
  5494. // Launch hadoop command file on windows.
  5495. return val;
  5496. }
  5497. private static String findYarnBinary() {
  5498. String val = findHadoopHome();
  5499. val = (val == null ? "yarn" : val + File.separator + "bin" + File.separator + "yarn");
  5500. return val;
  5501. }
  5502. private static String findMapRedBinary() {
  5503. String val = findHadoopHome();
  5504. val = (val == null ? "mapred" : val + File.separator + "bin" + File.separator + "mapred");
  5505. return val;
  5506. }
  5507. private static String findHadoopHome() {
  5508. String val = System.getenv("HADOOP_HOME");
  5509. // In Hadoop 1.X and Hadoop 2.X HADOOP_HOME is gone and replaced with HADOOP_PREFIX
  5510. if (val == null) {
  5511. val = System.getenv("HADOOP_PREFIX");
  5512. }
  5513. return val;
  5514. }
  5515. public String getDefaultValue() {
  5516. return valType.defaultValueString(this);
  5517. }
  5518. public String getDefaultExpr() {
  5519. return defaultExpr;
  5520. }
  5521. private Set<String> getValidStringValues() {
  5522. if (validator == null || !(validator instanceof StringSet)) {
  5523. throw new RuntimeException(varname + " does not specify a list of valid values");
  5524. }
  5525. return ((StringSet)validator).getExpected();
  5526. }
  5527. enum VarType {
  5528. STRING {
  5529. @Override
  5530. void checkType(String value) throws Exception { }
  5531. @Override
  5532. String defaultValueString(ConfVars confVar) { return confVar.defaultStrVal; }
  5533. },
  5534. INT {
  5535. @Override
  5536. void checkType(String value) throws Exception { Integer.valueOf(value); }
  5537. },
  5538. LONG {
  5539. @Override
  5540. void checkType(String value) throws Exception { Long.valueOf(value); }
  5541. },
  5542. FLOAT {
  5543. @Override
  5544. void checkType(String value) throws Exception { Float.valueOf(value); }
  5545. },
  5546. BOOLEAN {
  5547. @Override
  5548. void checkType(String value) throws Exception { Boolean.valueOf(value); }
  5549. };
  5550. boolean isType(String value) {
  5551. try { checkType(value); } catch (Exception e) { return false; }
  5552. return true;
  5553. }
  5554. String typeString() { return name().toUpperCase();}
  5555. String defaultValueString(ConfVars confVar) { return confVar.defaultExpr; }
  5556. abstract void checkType(String value) throws Exception;
  5557. }
  5558. }
  5559. /**
  5560. * Writes the default ConfVars out to a byte array and returns an input
  5561. * stream wrapping that byte array.
  5562. *
  5563. * We need this in order to initialize the ConfVar properties
  5564. * in the underling Configuration object using the addResource(InputStream)
  5565. * method.
  5566. *
  5567. * It is important to use a LoopingByteArrayInputStream because it turns out
  5568. * addResource(InputStream) is broken since Configuration tries to read the
  5569. * entire contents of the same InputStream repeatedly without resetting it.
  5570. * LoopingByteArrayInputStream has special logic to handle this.
  5571. */
  5572. private static synchronized InputStream getConfVarInputStream() {
  5573. if (confVarByteArray == null) {
  5574. try {
  5575. // Create a Hadoop configuration without inheriting default settings.
  5576. Configuration conf = new Configuration(false);
  5577. applyDefaultNonNullConfVars(conf);
  5578. ByteArrayOutputStream confVarBaos = new ByteArrayOutputStream();
  5579. conf.writeXml(confVarBaos);
  5580. confVarByteArray = confVarBaos.toByteArray();
  5581. } catch (Exception e) {
  5582. // We're pretty screwed if we can't load the default conf vars
  5583. throw new RuntimeException("Failed to initialize default Hive configuration variables!", e);
  5584. }
  5585. }
  5586. return new LoopingByteArrayInputStream(confVarByteArray);
  5587. }
  5588. @SuppressFBWarnings(value = "NP_NULL_PARAM_DEREF", justification = "Exception before reaching NP")
  5589. public void verifyAndSet(String name, String value) throws IllegalArgumentException {
  5590. if (modWhiteListPattern != null) {
  5591. Matcher wlMatcher = modWhiteListPattern.matcher(name);
  5592. if (!wlMatcher.matches()) {
  5593. throw new IllegalArgumentException("Cannot modify " + name + " at runtime. "
  5594. + "It is not in list of params that are allowed to be modified at runtime");
  5595. }
  5596. }
  5597. if (Iterables.any(restrictList,
  5598. restrictedVar -> name != null && name.startsWith(restrictedVar))) {
  5599. throw new IllegalArgumentException("Cannot modify " + name + " at runtime. It is in the list"
  5600. + " of parameters that can't be modified at runtime or is prefixed by a restricted variable");
  5601. }
  5602. String oldValue = name != null ? get(name) : null;
  5603. if (name == null || value == null || !value.equals(oldValue)) {
  5604. // When either name or value is null, the set method below will fail,
  5605. // and throw IllegalArgumentException
  5606. set(name, value);
  5607. if (isSparkRelatedConfig(name)) {
  5608. isSparkConfigUpdated = true;
  5609. }
  5610. }
  5611. }
  5612. public boolean isHiddenConfig(String name) {
  5613. return Iterables.any(hiddenSet, hiddenVar -> name.startsWith(hiddenVar));
  5614. }
  5615. public static boolean isEncodedPar(String name) {
  5616. for (ConfVars confVar : HiveConf.ENCODED_CONF) {
  5617. ConfVars confVar1 = confVar;
  5618. if (confVar1.varname.equals(name)) {
  5619. return true;
  5620. }
  5621. }
  5622. return false;
  5623. }
  5624. /**
  5625. * check whether spark related property is updated, which includes spark configurations,
  5626. * RSC configurations and yarn configuration in Spark on YARN mode.
  5627. * @param name
  5628. * @return
  5629. */
  5630. private boolean isSparkRelatedConfig(String name) {
  5631. boolean result = false;
  5632. if (name.startsWith("spark")) { // Spark property.
  5633. // for now we don't support changing spark app name on the fly
  5634. result = !name.equals("spark.app.name");
  5635. } else if (name.startsWith("yarn")) { // YARN property in Spark on YARN mode.
  5636. String sparkMaster = get("spark.master");
  5637. if (sparkMaster != null && sparkMaster.startsWith("yarn")) {
  5638. result = true;
  5639. }
  5640. } else if (rscList.stream().anyMatch(rscVar -> rscVar.equals(name))) { // Remote Spark Context property.
  5641. result = true;
  5642. } else if (name.equals("mapreduce.job.queuename")) {
  5643. // a special property starting with mapreduce that we would also like to effect if it changes
  5644. result = true;
  5645. }
  5646. return result;
  5647. }
  5648. public static int getIntVar(Configuration conf, ConfVars var) {
  5649. assert (var.valClass == Integer.class) : var.varname;
  5650. if (var.altName != null) {
  5651. return conf.getInt(var.varname, conf.getInt(var.altName, var.defaultIntVal));
  5652. }
  5653. return conf.getInt(var.varname, var.defaultIntVal);
  5654. }
  5655. public static void setIntVar(Configuration conf, ConfVars var, int val) {
  5656. assert (var.valClass == Integer.class) : var.varname;
  5657. conf.setInt(var.varname, val);
  5658. }
  5659. public int getIntVar(ConfVars var) {
  5660. return getIntVar(this, var);
  5661. }
  5662. public void setIntVar(ConfVars var, int val) {
  5663. setIntVar(this, var, val);
  5664. }
  5665. public static long getTimeVar(Configuration conf, ConfVars var, TimeUnit outUnit) {
  5666. return toTime(getVar(conf, var), getDefaultTimeUnit(var), outUnit);
  5667. }
  5668. public static void setTimeVar(Configuration conf, ConfVars var, long time, TimeUnit timeunit) {
  5669. assert (var.valClass == String.class) : var.varname;
  5670. conf.set(var.varname, time + stringFor(timeunit));
  5671. }
  5672. public long getTimeVar(ConfVars var, TimeUnit outUnit) {
  5673. return getTimeVar(this, var, outUnit);
  5674. }
  5675. public void setTimeVar(ConfVars var, long time, TimeUnit outUnit) {
  5676. setTimeVar(this, var, time, outUnit);
  5677. }
  5678. public static long getSizeVar(Configuration conf, ConfVars var) {
  5679. return toSizeBytes(getVar(conf, var));
  5680. }
  5681. public long getSizeVar(ConfVars var) {
  5682. return getSizeVar(this, var);
  5683. }
  5684. public static TimeUnit getDefaultTimeUnit(ConfVars var) {
  5685. TimeUnit inputUnit = null;
  5686. if (var.validator instanceof TimeValidator) {
  5687. inputUnit = ((TimeValidator)var.validator).getTimeUnit();
  5688. }
  5689. return inputUnit;
  5690. }
  5691. public static long toTime(String value, TimeUnit inputUnit, TimeUnit outUnit) {
  5692. String[] parsed = parseNumberFollowedByUnit(value.trim());
  5693. return outUnit.convert(Long.parseLong(parsed[0].trim()), unitFor(parsed[1].trim(), inputUnit));
  5694. }
  5695. public static long toSizeBytes(String value) {
  5696. String[] parsed = parseNumberFollowedByUnit(value.trim());
  5697. return Long.parseLong(parsed[0].trim()) * multiplierFor(parsed[1].trim());
  5698. }
  5699. private static String[] parseNumberFollowedByUnit(String value) {
  5700. char[] chars = value.toCharArray();
  5701. int i = 0;
  5702. for (; i < chars.length && (chars[i] == '-' || Character.isDigit(chars[i])); i++) {
  5703. }
  5704. return new String[] {value.substring(0, i), value.substring(i)};
  5705. }
  5706. private static Set<String> daysSet = ImmutableSet.of("d", "D", "day", "DAY", "days", "DAYS");
  5707. private static Set<String> hoursSet = ImmutableSet.of("h", "H", "hour", "HOUR", "hours", "HOURS");
  5708. private static Set<String> minutesSet = ImmutableSet.of("m", "M", "min", "MIN", "mins", "MINS",
  5709. "minute", "MINUTE", "minutes", "MINUTES");
  5710. private static Set<String> secondsSet = ImmutableSet.of("s", "S", "sec", "SEC", "secs", "SECS",
  5711. "second", "SECOND", "seconds", "SECONDS");
  5712. private static Set<String> millisSet = ImmutableSet.of("ms", "MS", "msec", "MSEC", "msecs", "MSECS",
  5713. "millisecond", "MILLISECOND", "milliseconds", "MILLISECONDS");
  5714. private static Set<String> microsSet = ImmutableSet.of("us", "US", "usec", "USEC", "usecs", "USECS",
  5715. "microsecond", "MICROSECOND", "microseconds", "MICROSECONDS");
  5716. private static Set<String> nanosSet = ImmutableSet.of("ns", "NS", "nsec", "NSEC", "nsecs", "NSECS",
  5717. "nanosecond", "NANOSECOND", "nanoseconds", "NANOSECONDS");
  5718. public static TimeUnit unitFor(String unit, TimeUnit defaultUnit) {
  5719. unit = unit.trim().toLowerCase();
  5720. if (unit.isEmpty() || unit.equals("l")) {
  5721. if (defaultUnit == null) {
  5722. throw new IllegalArgumentException("Time unit is not specified");
  5723. }
  5724. return defaultUnit;
  5725. } else if (daysSet.contains(unit)) {
  5726. return TimeUnit.DAYS;
  5727. } else if (hoursSet.contains(unit)) {
  5728. return TimeUnit.HOURS;
  5729. } else if (minutesSet.contains(unit)) {
  5730. return TimeUnit.MINUTES;
  5731. } else if (secondsSet.contains(unit)) {
  5732. return TimeUnit.SECONDS;
  5733. } else if (millisSet.contains(unit)) {
  5734. return TimeUnit.MILLISECONDS;
  5735. } else if (microsSet.contains(unit)) {
  5736. return TimeUnit.MICROSECONDS;
  5737. } else if (nanosSet.contains(unit)) {
  5738. return TimeUnit.NANOSECONDS;
  5739. }
  5740. throw new IllegalArgumentException("Invalid time unit " + unit);
  5741. }
  5742. public static long multiplierFor(String unit) {
  5743. unit = unit.trim().toLowerCase();
  5744. if (unit.isEmpty() || unit.equals("b") || unit.equals("bytes")) {
  5745. return 1;
  5746. } else if (unit.equals("kb")) {
  5747. return 1024;
  5748. } else if (unit.equals("mb")) {
  5749. return 1024*1024;
  5750. } else if (unit.equals("gb")) {
  5751. return 1024*1024*1024;
  5752. } else if (unit.equals("tb")) {
  5753. return 1024L*1024*1024*1024;
  5754. } else if (unit.equals("pb")) {
  5755. return 1024L*1024*1024*1024*1024;
  5756. }
  5757. throw new IllegalArgumentException("Invalid size unit " + unit);
  5758. }
  5759. public static String stringFor(TimeUnit timeunit) {
  5760. switch (timeunit) {
  5761. case DAYS: return "day";
  5762. case HOURS: return "hour";
  5763. case MINUTES: return "min";
  5764. case SECONDS: return "sec";
  5765. case MILLISECONDS: return "msec";
  5766. case MICROSECONDS: return "usec";
  5767. case NANOSECONDS: return "nsec";
  5768. }
  5769. throw new IllegalArgumentException("Invalid timeunit " + timeunit);
  5770. }
  5771. public static long getLongVar(Configuration conf, ConfVars var) {
  5772. assert (var.valClass == Long.class) : var.varname;
  5773. if (var.altName != null) {
  5774. return conf.getLong(var.varname, conf.getLong(var.altName, var.defaultLongVal));
  5775. }
  5776. return conf.getLong(var.varname, var.defaultLongVal);
  5777. }
  5778. public static long getLongVar(Configuration conf, ConfVars var, long defaultVal) {
  5779. if (var.altName != null) {
  5780. return conf.getLong(var.varname, conf.getLong(var.altName, defaultVal));
  5781. }
  5782. return conf.getLong(var.varname, defaultVal);
  5783. }
  5784. public static void setLongVar(Configuration conf, ConfVars var, long val) {
  5785. assert (var.valClass == Long.class) : var.varname;
  5786. conf.setLong(var.varname, val);
  5787. }
  5788. public long getLongVar(ConfVars var) {
  5789. return getLongVar(this, var);
  5790. }
  5791. public void setLongVar(ConfVars var, long val) {
  5792. setLongVar(this, var, val);
  5793. }
  5794. public static float getFloatVar(Configuration conf, ConfVars var) {
  5795. assert (var.valClass == Float.class) : var.varname;
  5796. if (var.altName != null) {
  5797. return conf.getFloat(var.varname, conf.getFloat(var.altName, var.defaultFloatVal));
  5798. }
  5799. return conf.getFloat(var.varname, var.defaultFloatVal);
  5800. }
  5801. public static float getFloatVar(Configuration conf, ConfVars var, float defaultVal) {
  5802. if (var.altName != null) {
  5803. return conf.getFloat(var.varname, conf.getFloat(var.altName, defaultVal));
  5804. }
  5805. return conf.getFloat(var.varname, defaultVal);
  5806. }
  5807. public static void setFloatVar(Configuration conf, ConfVars var, float val) {
  5808. assert (var.valClass == Float.class) : var.varname;
  5809. conf.setFloat(var.varname, val);
  5810. }
  5811. public float getFloatVar(ConfVars var) {
  5812. return getFloatVar(this, var);
  5813. }
  5814. public void setFloatVar(ConfVars var, float val) {
  5815. setFloatVar(this, var, val);
  5816. }
  5817. public static boolean getBoolVar(Configuration conf, ConfVars var) {
  5818. assert (var.valClass == Boolean.class) : var.varname;
  5819. if (var.altName != null) {
  5820. return conf.getBoolean(var.varname, conf.getBoolean(var.altName, var.defaultBoolVal));
  5821. }
  5822. return conf.getBoolean(var.varname, var.defaultBoolVal);
  5823. }
  5824. public static boolean getBoolVar(Configuration conf, ConfVars var, boolean defaultVal) {
  5825. if (var.altName != null) {
  5826. return conf.getBoolean(var.varname, conf.getBoolean(var.altName, defaultVal));
  5827. }
  5828. return conf.getBoolean(var.varname, defaultVal);
  5829. }
  5830. public static void setBoolVar(Configuration conf, ConfVars var, boolean val) {
  5831. assert (var.valClass == Boolean.class) : var.varname;
  5832. conf.setBoolean(var.varname, val);
  5833. }
  5834. /* Dynamic partition pruning is enabled in some or all cases if either
  5835. * hive.spark.dynamic.partition.pruning is true or
  5836. * hive.spark.dynamic.partition.pruning.map.join.only is true
  5837. */
  5838. public static boolean isSparkDPPAny(Configuration conf) {
  5839. return (conf.getBoolean(ConfVars.SPARK_DYNAMIC_PARTITION_PRUNING.varname,
  5840. ConfVars.SPARK_DYNAMIC_PARTITION_PRUNING.defaultBoolVal) ||
  5841. conf.getBoolean(ConfVars.SPARK_DYNAMIC_PARTITION_PRUNING_MAP_JOIN_ONLY.varname,
  5842. ConfVars.SPARK_DYNAMIC_PARTITION_PRUNING_MAP_JOIN_ONLY.defaultBoolVal));
  5843. }
  5844. public boolean getBoolVar(ConfVars var) {
  5845. return getBoolVar(this, var);
  5846. }
  5847. public void setBoolVar(ConfVars var, boolean val) {
  5848. setBoolVar(this, var, val);
  5849. }
  5850. public static String getVar(Configuration conf, ConfVars var) {
  5851. assert (var.valClass == String.class) : var.varname;
  5852. return var.altName != null ? conf.get(var.varname, conf.get(var.altName, var.defaultStrVal))
  5853. : conf.get(var.varname, var.defaultStrVal);
  5854. }
  5855. public static String getVarWithoutType(Configuration conf, ConfVars var) {
  5856. return var.altName != null ? conf.get(var.varname, conf.get(var.altName, var.defaultExpr))
  5857. : conf.get(var.varname, var.defaultExpr);
  5858. }
  5859. public static String getTrimmedVar(Configuration conf, ConfVars var) {
  5860. assert (var.valClass == String.class) : var.varname;
  5861. if (var.altName != null) {
  5862. return conf.getTrimmed(var.varname, conf.getTrimmed(var.altName, var.defaultStrVal));
  5863. }
  5864. return conf.getTrimmed(var.varname, var.defaultStrVal);
  5865. }
  5866. public static String[] getTrimmedStringsVar(Configuration conf, ConfVars var) {
  5867. assert (var.valClass == String.class) : var.varname;
  5868. String[] result = conf.getTrimmedStrings(var.varname, (String[])null);
  5869. if (result != null) {
  5870. return result;
  5871. }
  5872. if (var.altName != null) {
  5873. result = conf.getTrimmedStrings(var.altName, (String[])null);
  5874. if (result != null) {
  5875. return result;
  5876. }
  5877. }
  5878. return org.apache.hadoop.util.StringUtils.getTrimmedStrings(var.defaultStrVal);
  5879. }
  5880. public static String getVar(Configuration conf, ConfVars var, String defaultVal) {
  5881. String ret = var.altName != null ? conf.get(var.varname, conf.get(var.altName, defaultVal))
  5882. : conf.get(var.varname, defaultVal);
  5883. return ret;
  5884. }
  5885. public static String getVar(Configuration conf, ConfVars var, EncoderDecoder<String, String> encoderDecoder) {
  5886. return encoderDecoder.decode(getVar(conf, var));
  5887. }
  5888. public String getLogIdVar(String defaultValue) {
  5889. String retval = getVar(ConfVars.HIVE_LOG_TRACE_ID);
  5890. if (StringUtils.EMPTY.equals(retval)) {
  5891. LOG.debug("Using the default value passed in for log id: {}", defaultValue);
  5892. retval = defaultValue;
  5893. }
  5894. if (retval.length() > LOG_PREFIX_LENGTH) {
  5895. LOG.warn("The original log id prefix is {} has been truncated to {}", retval,
  5896. retval.substring(0, LOG_PREFIX_LENGTH - 1));
  5897. retval = retval.substring(0, LOG_PREFIX_LENGTH - 1);
  5898. }
  5899. return retval;
  5900. }
  5901. public static void setVar(Configuration conf, ConfVars var, String val) {
  5902. assert (var.valClass == String.class) : var.varname;
  5903. conf.set(var.varname, val, "setVar");
  5904. }
  5905. public static void setVar(Configuration conf, ConfVars var, String val,
  5906. EncoderDecoder<String, String> encoderDecoder) {
  5907. setVar(conf, var, encoderDecoder.encode(val));
  5908. }
  5909. public static ConfVars getConfVars(String name) {
  5910. return vars.get(name);
  5911. }
  5912. public static ConfVars getMetaConf(String name) {
  5913. return metaConfs.get(name);
  5914. }
  5915. public String getVar(ConfVars var) {
  5916. return getVar(this, var);
  5917. }
  5918. public void setVar(ConfVars var, String val) {
  5919. setVar(this, var, val);
  5920. }
  5921. public String getQueryString() {
  5922. return getQueryString(this);
  5923. }
  5924. public static String getQueryString(Configuration conf) {
  5925. return getVar(conf, ConfVars.HIVEQUERYSTRING, EncoderDecoderFactory.URL_ENCODER_DECODER);
  5926. }
  5927. public void setQueryString(String query) {
  5928. setQueryString(this, query);
  5929. }
  5930. public static void setQueryString(Configuration conf, String query) {
  5931. setVar(conf, ConfVars.HIVEQUERYSTRING, query, EncoderDecoderFactory.URL_ENCODER_DECODER);
  5932. }
  5933. public void logVars(PrintStream ps) {
  5934. for (ConfVars one : ConfVars.values()) {
  5935. ps.println(one.varname + "=" + ((get(one.varname) != null) ? get(one.varname) : ""));
  5936. }
  5937. }
  5938. /**
  5939. * @return a ZooKeeperHiveHelper instance containing the ZooKeeper specifications from the
  5940. * given HiveConf.
  5941. */
  5942. public ZooKeeperHiveHelper getZKConfig() {
  5943. String keyStorePassword = "";
  5944. String trustStorePassword = "";
  5945. if (getBoolVar(ConfVars.HIVE_ZOOKEEPER_SSL_ENABLE)) {
  5946. try {
  5947. keyStorePassword =
  5948. ShimLoader.getHadoopShims().getPassword(this, ConfVars.HIVE_ZOOKEEPER_SSL_KEYSTORE_PASSWORD.varname);
  5949. trustStorePassword =
  5950. ShimLoader.getHadoopShims().getPassword(this, ConfVars.HIVE_ZOOKEEPER_SSL_TRUSTSTORE_PASSWORD.varname);
  5951. } catch (IOException ex) {
  5952. throw new RuntimeException("Failed to read zookeeper configuration passwords", ex);
  5953. }
  5954. }
  5955. return ZooKeeperHiveHelper.builder()
  5956. .quorum(getVar(HiveConf.ConfVars.HIVE_ZOOKEEPER_QUORUM))
  5957. .clientPort(getVar(HiveConf.ConfVars.HIVE_ZOOKEEPER_CLIENT_PORT))
  5958. .serverRegistryNameSpace(getVar(HiveConf.ConfVars.HIVE_SERVER2_ZOOKEEPER_NAMESPACE))
  5959. .connectionTimeout((int) getTimeVar(HiveConf.ConfVars.HIVE_ZOOKEEPER_CONNECTION_TIMEOUT,
  5960. TimeUnit.MILLISECONDS))
  5961. .sessionTimeout((int) getTimeVar(HiveConf.ConfVars.HIVE_ZOOKEEPER_SESSION_TIMEOUT,
  5962. TimeUnit.MILLISECONDS))
  5963. .baseSleepTime((int) getTimeVar(HiveConf.ConfVars.HIVE_ZOOKEEPER_CONNECTION_BASESLEEPTIME,
  5964. TimeUnit.MILLISECONDS))
  5965. .maxRetries(getIntVar(HiveConf.ConfVars.HIVE_ZOOKEEPER_CONNECTION_MAX_RETRIES))
  5966. .sslEnabled(getBoolVar(ConfVars.HIVE_ZOOKEEPER_SSL_ENABLE))
  5967. .keyStoreLocation(getVar(ConfVars.HIVE_ZOOKEEPER_SSL_KEYSTORE_LOCATION))
  5968. .keyStorePassword(keyStorePassword)
  5969. .trustStoreLocation(getVar(ConfVars.HIVE_ZOOKEEPER_SSL_TRUSTSTORE_LOCATION))
  5970. .trustStorePassword(trustStorePassword).build();
  5971. }
  5972. public HiveConf() {
  5973. super();
  5974. initialize(this.getClass());
  5975. }
  5976. public HiveConf(Class<?> cls) {
  5977. super();
  5978. initialize(cls);
  5979. }
  5980. public HiveConf(Configuration other, Class<?> cls) {
  5981. super(other);
  5982. initialize(cls);
  5983. }
  5984. /**
  5985. * Copy constructor
  5986. */
  5987. public HiveConf(HiveConf other) {
  5988. super(other);
  5989. hiveJar = other.hiveJar;
  5990. auxJars = other.auxJars;
  5991. isSparkConfigUpdated = other.isSparkConfigUpdated;
  5992. origProp = (Properties)other.origProp.clone();
  5993. restrictList.addAll(other.restrictList);
  5994. hiddenSet.addAll(other.hiddenSet);
  5995. modWhiteListPattern = other.modWhiteListPattern;
  5996. }
  5997. public Properties getAllProperties() {
  5998. return getProperties(this);
  5999. }
  6000. public static Properties getProperties(Configuration conf) {
  6001. Iterator<Map.Entry<String, String>> iter = conf.iterator();
  6002. Properties p = new Properties();
  6003. while (iter.hasNext()) {
  6004. Map.Entry<String, String> e = iter.next();
  6005. p.setProperty(e.getKey(), e.getValue());
  6006. }
  6007. return p;
  6008. }
  6009. private void initialize(Class<?> cls) {
  6010. hiveJar = (new JobConf(cls)).getJar();
  6011. // preserve the original configuration
  6012. origProp = getAllProperties();
  6013. // Overlay the ConfVars. Note that this ignores ConfVars with null values
  6014. addResource(getConfVarInputStream(), "HiveConf.java");
  6015. // Overlay hive-site.xml if it exists
  6016. if (hiveSiteURL != null) {
  6017. addResource(hiveSiteURL);
  6018. }
  6019. // if embedded metastore is to be used as per config so far
  6020. // then this is considered like the metastore server case
  6021. String msUri = this.getVar(HiveConf.ConfVars.METASTOREURIS);
  6022. // This is hackery, but having hive-common depend on standalone-metastore is really bad
  6023. // because it will pull all of the metastore code into every module. We need to check that
  6024. // we aren't using the standalone metastore. If we are, we should treat it the same as a
  6025. // remote metastore situation.
  6026. if (msUri == null || msUri.isEmpty()) {
  6027. msUri = this.get("metastore.thrift.uris");
  6028. }
  6029. LOG.debug("Found metastore URI of " + msUri);
  6030. if(HiveConfUtil.isEmbeddedMetaStore(msUri)){
  6031. setLoadMetastoreConfig(true);
  6032. }
  6033. // load hivemetastore-site.xml if this is metastore and file exists
  6034. if (isLoadMetastoreConfig() && hivemetastoreSiteUrl != null) {
  6035. addResource(hivemetastoreSiteUrl);
  6036. }
  6037. // load hiveserver2-site.xml if this is hiveserver2 and file exists
  6038. // metastore can be embedded within hiveserver2, in such cases
  6039. // the conf params in hiveserver2-site.xml will override whats defined
  6040. // in hivemetastore-site.xml
  6041. if (isLoadHiveServer2Config()) {
  6042. // set the hardcoded value first, so anything in hiveserver2-site.xml can override it
  6043. set(ConfVars.METASTORE_CLIENT_CAPABILITIES.varname, "EXTWRITE,EXTREAD,HIVEBUCKET2,HIVEFULLACIDREAD,"
  6044. + "HIVEFULLACIDWRITE,HIVECACHEINVALIDATE,HIVEMANAGESTATS,HIVEMANAGEDINSERTWRITE,HIVEMANAGEDINSERTREAD,"
  6045. + "HIVESQL,HIVEMQT,HIVEONLYMQTWRITE,ACCEPTS_UNMODIFIED_METADATA");
  6046. if (hiveServer2SiteUrl != null) {
  6047. addResource(hiveServer2SiteUrl);
  6048. }
  6049. }
  6050. String val = this.getVar(HiveConf.ConfVars.HIVE_ADDITIONAL_CONFIG_FILES);
  6051. ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
  6052. if (val != null && !val.isEmpty()) {
  6053. String[] configFiles = val.split(",");
  6054. for (String config : configFiles) {
  6055. URL configURL = findConfigFile(classLoader, config, true);
  6056. if (configURL != null) {
  6057. addResource(configURL);
  6058. }
  6059. }
  6060. }
  6061. // Overlay the values of any system properties and manual overrides
  6062. applySystemProperties();
  6063. if ((this.get("hive.metastore.ds.retry.attempts") != null) ||
  6064. this.get("hive.metastore.ds.retry.interval") != null) {
  6065. LOG.warn("DEPRECATED: hive.metastore.ds.retry.* no longer has any effect. " +
  6066. "Use hive.hmshandler.retry.* instead");
  6067. }
  6068. // if the running class was loaded directly (through eclipse) rather than through a
  6069. // jar then this would be needed
  6070. if (hiveJar == null) {
  6071. hiveJar = this.get(ConfVars.HIVEJAR.varname);
  6072. }
  6073. if (auxJars == null) {
  6074. auxJars = StringUtils.join(FileUtils.getJarFilesByPath(this.get(ConfVars.HIVEAUXJARS.varname), this), ',');
  6075. }
  6076. if (getBoolVar(ConfVars.METASTORE_SCHEMA_VERIFICATION)) {
  6077. setBoolVar(ConfVars.METASTORE_AUTO_CREATE_ALL, false);
  6078. }
  6079. if (getBoolVar(HiveConf.ConfVars.HIVECONFVALIDATION)) {
  6080. List<String> trimmed = new ArrayList<String>();
  6081. for (Map.Entry<String,String> entry : this) {
  6082. String key = entry.getKey();
  6083. if (key == null || !key.startsWith("hive.")) {
  6084. continue;
  6085. }
  6086. ConfVars var = HiveConf.getConfVars(key);
  6087. if (var == null) {
  6088. var = HiveConf.getConfVars(key.trim());
  6089. if (var != null) {
  6090. trimmed.add(key);
  6091. }
  6092. }
  6093. if (var == null) {
  6094. LOG.warn("HiveConf of name {} does not exist", key);
  6095. } else if (!var.isType(entry.getValue())) {
  6096. LOG.warn("HiveConf {} expects {} type value", var.varname, var.typeString());
  6097. }
  6098. }
  6099. for (String key : trimmed) {
  6100. set(key.trim(), getRaw(key));
  6101. unset(key);
  6102. }
  6103. }
  6104. setupSQLStdAuthWhiteList();
  6105. // setup list of conf vars that are not allowed to change runtime
  6106. setupRestrictList();
  6107. hiddenSet.clear();
  6108. hiddenSet.addAll(HiveConfUtil.getHiddenSet(this));
  6109. setupRSCList();
  6110. }
  6111. /**
  6112. * If the config whitelist param for sql standard authorization is not set, set it up here.
  6113. */
  6114. private void setupSQLStdAuthWhiteList() {
  6115. String whiteListParamsStr = getVar(ConfVars.HIVE_AUTHORIZATION_SQL_STD_AUTH_CONFIG_WHITELIST);
  6116. if (whiteListParamsStr == null || whiteListParamsStr.trim().isEmpty()) {
  6117. // set the default configs in whitelist
  6118. whiteListParamsStr = getSQLStdAuthDefaultWhiteListPattern();
  6119. setVar(ConfVars.HIVE_AUTHORIZATION_SQL_STD_AUTH_CONFIG_WHITELIST, whiteListParamsStr);
  6120. }
  6121. }
  6122. private static String getSQLStdAuthDefaultWhiteListPattern() {
  6123. // create the default white list from list of safe config params
  6124. // and regex list
  6125. String confVarPatternStr = Joiner.on("|").join(convertVarsToRegex(SQL_STD_AUTH_SAFE_VAR_NAMES));
  6126. String regexPatternStr = Joiner.on("|").join(sqlStdAuthSafeVarNameRegexes);
  6127. return regexPatternStr + "|" + confVarPatternStr;
  6128. }
  6129. /**
  6130. * Obtains the local time-zone ID.
  6131. */
  6132. public ZoneId getLocalTimeZone() {
  6133. String timeZoneStr = getVar(ConfVars.HIVE_LOCAL_TIME_ZONE);
  6134. return TimestampTZUtil.parseTimeZone(timeZoneStr);
  6135. }
  6136. /**
  6137. * @param paramList list of parameter strings
  6138. * @return list of parameter strings with "." replaced by "\."
  6139. */
  6140. private static String[] convertVarsToRegex(String[] paramList) {
  6141. String[] regexes = new String[paramList.length];
  6142. for(int i=0; i<paramList.length; i++) {
  6143. regexes[i] = paramList[i].replace(".", "\\." );
  6144. }
  6145. return regexes;
  6146. }
  6147. /**
  6148. * Default list of modifiable config parameters for sql standard authorization
  6149. * For internal use only.
  6150. */
  6151. private static final String[] SQL_STD_AUTH_SAFE_VAR_NAMES = new String[] {
  6152. ConfVars.AGGR_JOIN_TRANSPOSE.varname,
  6153. ConfVars.BYTESPERREDUCER.varname,
  6154. ConfVars.CLIENT_STATS_COUNTERS.varname,
  6155. ConfVars.CREATE_TABLES_AS_ACID.varname,
  6156. ConfVars.CREATE_TABLE_AS_EXTERNAL.varname,
  6157. ConfVars.DEFAULTPARTITIONNAME.varname,
  6158. ConfVars.DROP_IGNORES_NON_EXISTENT.varname,
  6159. ConfVars.HIVECOUNTERGROUP.varname,
  6160. ConfVars.HIVEDEFAULTMANAGEDFILEFORMAT.varname,
  6161. ConfVars.HIVEENFORCEBUCKETMAPJOIN.varname,
  6162. ConfVars.HIVEENFORCESORTMERGEBUCKETMAPJOIN.varname,
  6163. ConfVars.HIVEEXPREVALUATIONCACHE.varname,
  6164. ConfVars.HIVEQUERYRESULTFILEFORMAT.varname,
  6165. ConfVars.HIVEHASHTABLELOADFACTOR.varname,
  6166. ConfVars.HIVEHASHTABLETHRESHOLD.varname,
  6167. ConfVars.HIVEIGNOREMAPJOINHINT.varname,
  6168. ConfVars.HIVELIMITMAXROWSIZE.varname,
  6169. ConfVars.HIVEMAPREDMODE.varname,
  6170. ConfVars.HIVEMAPSIDEAGGREGATE.varname,
  6171. ConfVars.HIVEOPTIMIZEMETADATAQUERIES.varname,
  6172. ConfVars.HIVEROWOFFSET.varname,
  6173. ConfVars.HIVEVARIABLESUBSTITUTE.varname,
  6174. ConfVars.HIVEVARIABLESUBSTITUTEDEPTH.varname,
  6175. ConfVars.HIVE_AUTOGEN_COLUMNALIAS_PREFIX_INCLUDEFUNCNAME.varname,
  6176. ConfVars.HIVE_AUTOGEN_COLUMNALIAS_PREFIX_LABEL.varname,
  6177. ConfVars.HIVE_CHECK_CROSS_PRODUCT.varname,
  6178. ConfVars.HIVE_CLI_TEZ_SESSION_ASYNC.varname,
  6179. ConfVars.HIVE_COMPAT.varname,
  6180. ConfVars.HIVE_CREATE_TABLES_AS_INSERT_ONLY.varname,
  6181. ConfVars.HIVE_DISPLAY_PARTITION_COLUMNS_SEPARATELY.varname,
  6182. ConfVars.HIVE_ERROR_ON_EMPTY_PARTITION.varname,
  6183. ConfVars.HIVE_EXECUTION_ENGINE.varname,
  6184. ConfVars.HIVE_EXEC_COPYFILE_MAXSIZE.varname,
  6185. ConfVars.HIVE_EXIM_URI_SCHEME_WL.varname,
  6186. ConfVars.HIVE_FILE_MAX_FOOTER.varname,
  6187. ConfVars.HIVE_INSERT_INTO_MULTILEVEL_DIRS.varname,
  6188. ConfVars.HIVE_LOCALIZE_RESOURCE_NUM_WAIT_ATTEMPTS.varname,
  6189. ConfVars.HIVE_MULTI_INSERT_MOVE_TASKS_SHARE_DEPENDENCIES.varname,
  6190. ConfVars.HIVE_QUERY_RESULTS_CACHE_ENABLED.varname,
  6191. ConfVars.HIVE_QUERY_RESULTS_CACHE_WAIT_FOR_PENDING_RESULTS.varname,
  6192. ConfVars.HIVE_QUOTEDID_SUPPORT.varname,
  6193. ConfVars.HIVE_RESULTSET_USE_UNIQUE_COLUMN_NAMES.varname,
  6194. ConfVars.HIVE_STATS_COLLECT_PART_LEVEL_STATS.varname,
  6195. ConfVars.HIVE_SCHEMA_EVOLUTION.varname,
  6196. ConfVars.HIVE_SERVER2_LOGGING_OPERATION_LEVEL.varname,
  6197. ConfVars.HIVE_SERVER2_THRIFT_RESULTSET_SERIALIZE_IN_TASKS.varname,
  6198. ConfVars.HIVE_SUPPORT_SPECICAL_CHARACTERS_IN_TABLE_NAMES.varname,
  6199. ConfVars.JOB_DEBUG_CAPTURE_STACKTRACES.varname,
  6200. ConfVars.JOB_DEBUG_TIMEOUT.varname,
  6201. ConfVars.LLAP_IO_ENABLED.varname,
  6202. ConfVars.LLAP_IO_USE_FILEID_PATH.varname,
  6203. ConfVars.LLAP_DAEMON_SERVICE_HOSTS.varname,
  6204. ConfVars.LLAP_EXECUTION_MODE.varname,
  6205. ConfVars.LLAP_AUTO_ALLOW_UBER.varname,
  6206. ConfVars.LLAP_AUTO_ENFORCE_TREE.varname,
  6207. ConfVars.LLAP_AUTO_ENFORCE_VECTORIZED.varname,
  6208. ConfVars.LLAP_AUTO_ENFORCE_STATS.varname,
  6209. ConfVars.LLAP_AUTO_MAX_INPUT.varname,
  6210. ConfVars.LLAP_AUTO_MAX_OUTPUT.varname,
  6211. ConfVars.LLAP_SKIP_COMPILE_UDF_CHECK.varname,
  6212. ConfVars.LLAP_CLIENT_CONSISTENT_SPLITS.varname,
  6213. ConfVars.LLAP_ENABLE_GRACE_JOIN_IN_LLAP.varname,
  6214. ConfVars.LLAP_ALLOW_PERMANENT_FNS.varname,
  6215. ConfVars.MAXCREATEDFILES.varname,
  6216. ConfVars.MAXREDUCERS.varname,
  6217. ConfVars.NWAYJOINREORDER.varname,
  6218. ConfVars.OUTPUT_FILE_EXTENSION.varname,
  6219. ConfVars.SHOW_JOB_FAIL_DEBUG_INFO.varname,
  6220. ConfVars.TASKLOG_DEBUG_TIMEOUT.varname,
  6221. ConfVars.HIVEQUERYID.varname,
  6222. ConfVars.HIVEQUERYTAG.varname,
  6223. };
  6224. /**
  6225. * Default list of regexes for config parameters that are modifiable with
  6226. * sql standard authorization enabled
  6227. */
  6228. static final String [] sqlStdAuthSafeVarNameRegexes = new String [] {
  6229. "hive\\.auto\\..*",
  6230. "hive\\.cbo\\..*",
  6231. "hive\\.convert\\..*",
  6232. "hive\\.druid\\..*",
  6233. "hive\\.exec\\.dynamic\\.partition.*",
  6234. "hive\\.exec\\.max\\.dynamic\\.partitions.*",
  6235. "hive\\.exec\\.compress\\..*",
  6236. "hive\\.exec\\.infer\\..*",
  6237. "hive\\.exec\\.mode.local\\..*",
  6238. "hive\\.exec\\.orc\\..*",
  6239. "hive\\.exec\\.parallel.*",
  6240. "hive\\.explain\\..*",
  6241. "hive\\.fetch.task\\..*",
  6242. "hive\\.groupby\\..*",
  6243. "hive\\.hbase\\..*",
  6244. "hive\\.index\\..*",
  6245. "hive\\.index\\..*",
  6246. "hive\\.intermediate\\..*",
  6247. "hive\\.jdbc\\..*",
  6248. "hive\\.join\\..*",
  6249. "hive\\.limit\\..*",
  6250. "hive\\.log\\..*",
  6251. "hive\\.mapjoin\\..*",
  6252. "hive\\.merge\\..*",
  6253. "hive\\.optimize\\..*",
  6254. "hive\\.materializedview\\..*",
  6255. "hive\\.orc\\..*",
  6256. "hive\\.outerjoin\\..*",
  6257. "hive\\.parquet\\..*",
  6258. "hive\\.ppd\\..*",
  6259. "hive\\.prewarm\\..*",
  6260. "hive\\.query\\.name",
  6261. "hive\\.server2\\.thrift\\.resultset\\.default\\.fetch\\.size",
  6262. "hive\\.server2\\.proxy\\.user",
  6263. "hive\\.skewjoin\\..*",
  6264. "hive\\.smbjoin\\..*",
  6265. "hive\\.stats\\..*",
  6266. "hive\\.strict\\..*",
  6267. "hive\\.tez\\..*",
  6268. "hive\\.vectorized\\..*",
  6269. "hive\\.query\\.reexecution\\..*",
  6270. "hive\\.query\\.exclusive\\.lock",
  6271. "reexec\\.overlay\\..*",
  6272. "fs\\.defaultFS",
  6273. "ssl\\.client\\.truststore\\.location",
  6274. "distcp\\.atomic",
  6275. "distcp\\.ignore\\.failures",
  6276. "distcp\\.preserve\\.status",
  6277. "distcp\\.preserve\\.rawxattrs",
  6278. "distcp\\.sync\\.folders",
  6279. "distcp\\.delete\\.missing\\.source",
  6280. "distcp\\.keystore\\.resource",
  6281. "distcp\\.liststatus\\.threads",
  6282. "distcp\\.max\\.maps",
  6283. "distcp\\.copy\\.strategy",
  6284. "distcp\\.skip\\.crc",
  6285. "distcp\\.copy\\.overwrite",
  6286. "distcp\\.copy\\.append",
  6287. "distcp\\.map\\.bandwidth\\.mb",
  6288. "distcp\\.dynamic\\..*",
  6289. "distcp\\.meta\\.folder",
  6290. "distcp\\.copy\\.listing\\.class",
  6291. "distcp\\.filters\\.class",
  6292. "distcp\\.options\\.skipcrccheck",
  6293. "distcp\\.options\\.m",
  6294. "distcp\\.options\\.numListstatusThreads",
  6295. "distcp\\.options\\.mapredSslConf",
  6296. "distcp\\.options\\.bandwidth",
  6297. "distcp\\.options\\.overwrite",
  6298. "distcp\\.options\\.strategy",
  6299. "distcp\\.options\\.i",
  6300. "distcp\\.options\\.p.*",
  6301. "distcp\\.options\\.update",
  6302. "distcp\\.options\\.delete",
  6303. "mapred\\.map\\..*",
  6304. "mapred\\.reduce\\..*",
  6305. "mapred\\.output\\.compression\\.codec",
  6306. "mapred\\.job\\.queue\\.name",
  6307. "mapred\\.output\\.compression\\.type",
  6308. "mapred\\.min\\.split\\.size",
  6309. "mapreduce\\.job\\.reduce\\.slowstart\\.completedmaps",
  6310. "mapreduce\\.job\\.queuename",
  6311. "mapreduce\\.job\\.tags",
  6312. "mapreduce\\.input\\.fileinputformat\\.split\\.minsize",
  6313. "mapreduce\\.map\\..*",
  6314. "mapreduce\\.reduce\\..*",
  6315. "mapreduce\\.output\\.fileoutputformat\\.compress\\.codec",
  6316. "mapreduce\\.output\\.fileoutputformat\\.compress\\.type",
  6317. "oozie\\..*",
  6318. "tez\\.am\\..*",
  6319. "tez\\.task\\..*",
  6320. "tez\\.runtime\\..*",
  6321. "tez\\.queue\\.name",
  6322. };
  6323. //Take care of conf overrides.
  6324. //Includes values in ConfVars as well as underlying configuration properties (ie, hadoop)
  6325. @SuppressFBWarnings(value = "MS_MUTABLE_COLLECTION_PKGPROTECT", justification = "Intended exposure")
  6326. public static final Map<String, String> overrides = new HashMap<String, String>();
  6327. /**
  6328. * Apply system properties to this object if the property name is defined in ConfVars
  6329. * and the value is non-null and not an empty string.
  6330. */
  6331. private void applySystemProperties() {
  6332. Map<String, String> systemProperties = getConfSystemProperties();
  6333. for (Entry<String, String> systemProperty : systemProperties.entrySet()) {
  6334. this.set(systemProperty.getKey(), systemProperty.getValue());
  6335. }
  6336. }
  6337. /**
  6338. * This method returns a mapping from config variable name to its value for all config variables
  6339. * which have been set using System properties
  6340. */
  6341. public static Map<String, String> getConfSystemProperties() {
  6342. Map<String, String> systemProperties = new HashMap<String, String>();
  6343. for (ConfVars oneVar : ConfVars.values()) {
  6344. if (System.getProperty(oneVar.varname) != null) {
  6345. if (System.getProperty(oneVar.varname).length() > 0) {
  6346. systemProperties.put(oneVar.varname, System.getProperty(oneVar.varname));
  6347. }
  6348. }
  6349. }
  6350. for (Map.Entry<String, String> oneVar : overrides.entrySet()) {
  6351. if (overrides.get(oneVar.getKey()) != null) {
  6352. if (overrides.get(oneVar.getKey()).length() > 0) {
  6353. systemProperties.put(oneVar.getKey(), oneVar.getValue());
  6354. }
  6355. }
  6356. }
  6357. return systemProperties;
  6358. }
  6359. /**
  6360. * Overlays ConfVar properties with non-null values
  6361. */
  6362. private static void applyDefaultNonNullConfVars(Configuration conf) {
  6363. for (ConfVars var : ConfVars.values()) {
  6364. String defaultValue = var.getDefaultValue();
  6365. if (defaultValue == null) {
  6366. // Don't override ConfVars with null values
  6367. continue;
  6368. }
  6369. conf.set(var.varname, defaultValue);
  6370. }
  6371. }
  6372. public Properties getChangedProperties() {
  6373. Properties ret = new Properties();
  6374. Properties newProp = getAllProperties();
  6375. for (Object one : newProp.keySet()) {
  6376. String oneProp = (String) one;
  6377. String oldValue = origProp.getProperty(oneProp);
  6378. if (!StringUtils.equals(oldValue, newProp.getProperty(oneProp))) {
  6379. ret.setProperty(oneProp, newProp.getProperty(oneProp));
  6380. }
  6381. }
  6382. return (ret);
  6383. }
  6384. public String getJar() {
  6385. return hiveJar;
  6386. }
  6387. /**
  6388. * @return the auxJars
  6389. */
  6390. public String getAuxJars() {
  6391. return auxJars;
  6392. }
  6393. /**
  6394. * Set the auxiliary jars. Used for unit tests only.
  6395. * @param auxJars the auxJars to set.
  6396. */
  6397. public void setAuxJars(String auxJars) {
  6398. this.auxJars = auxJars;
  6399. setVar(this, ConfVars.HIVEAUXJARS, auxJars);
  6400. }
  6401. public URL getHiveDefaultLocation() {
  6402. return hiveDefaultURL;
  6403. }
  6404. public static void setHiveSiteLocation(URL location) {
  6405. hiveSiteURL = location;
  6406. }
  6407. public static void setHivemetastoreSiteUrl(URL location) {
  6408. hivemetastoreSiteUrl = location;
  6409. }
  6410. public static URL getHiveSiteLocation() {
  6411. return hiveSiteURL;
  6412. }
  6413. public static URL getMetastoreSiteLocation() {
  6414. return hivemetastoreSiteUrl;
  6415. }
  6416. public static URL getHiveServer2SiteLocation() {
  6417. return hiveServer2SiteUrl;
  6418. }
  6419. /**
  6420. * @return the user name set in hadoop.job.ugi param or the current user from System
  6421. * @throws IOException
  6422. */
  6423. public String getUser() throws IOException {
  6424. try {
  6425. UserGroupInformation ugi = Utils.getUGI();
  6426. return ugi.getUserName();
  6427. } catch (LoginException le) {
  6428. throw new IOException(le);
  6429. }
  6430. }
  6431. public static String getColumnInternalName(int pos) {
  6432. return "_col" + pos;
  6433. }
  6434. public static int getPositionFromInternalName(String internalName) {
  6435. Pattern internalPattern = Pattern.compile("_col([0-9]+)");
  6436. Matcher m = internalPattern.matcher(internalName);
  6437. if (!m.matches()){
  6438. return -1;
  6439. } else {
  6440. return Integer.parseInt(m.group(1));
  6441. }
  6442. }
  6443. /**
  6444. * Append comma separated list of config vars to the restrict List
  6445. * @param restrictListStr
  6446. */
  6447. public void addToRestrictList(String restrictListStr) {
  6448. if (restrictListStr == null) {
  6449. return;
  6450. }
  6451. String oldList = this.getVar(ConfVars.HIVE_CONF_RESTRICTED_LIST);
  6452. if (oldList == null || oldList.isEmpty()) {
  6453. this.setVar(ConfVars.HIVE_CONF_RESTRICTED_LIST, restrictListStr);
  6454. } else {
  6455. this.setVar(ConfVars.HIVE_CONF_RESTRICTED_LIST, oldList + "," + restrictListStr);
  6456. }
  6457. setupRestrictList();
  6458. }
  6459. /**
  6460. * Set white list of parameters that are allowed to be modified
  6461. *
  6462. * @param paramNameRegex
  6463. */
  6464. @LimitedPrivate(value = { "Currently only for use by HiveAuthorizer" })
  6465. public void setModifiableWhiteListRegex(String paramNameRegex) {
  6466. if (paramNameRegex == null) {
  6467. return;
  6468. }
  6469. modWhiteListPattern = Pattern.compile(paramNameRegex);
  6470. }
  6471. /**
  6472. * Add the HIVE_CONF_RESTRICTED_LIST values to restrictList,
  6473. * including HIVE_CONF_RESTRICTED_LIST itself
  6474. */
  6475. private void setupRestrictList() {
  6476. String restrictListStr = this.getVar(ConfVars.HIVE_CONF_RESTRICTED_LIST);
  6477. restrictList.clear();
  6478. if (restrictListStr != null) {
  6479. for (String entry : restrictListStr.split(",")) {
  6480. restrictList.add(entry.trim());
  6481. }
  6482. }
  6483. String internalVariableListStr = this.getVar(ConfVars.HIVE_CONF_INTERNAL_VARIABLE_LIST);
  6484. if (internalVariableListStr != null) {
  6485. for (String entry : internalVariableListStr.split(",")) {
  6486. restrictList.add(entry.trim());
  6487. }
  6488. }
  6489. restrictList.add(ConfVars.HIVE_IN_TEST.varname);
  6490. restrictList.add(ConfVars.HIVE_CONF_RESTRICTED_LIST.varname);
  6491. restrictList.add(ConfVars.HIVE_CONF_HIDDEN_LIST.varname);
  6492. restrictList.add(ConfVars.HIVE_CONF_INTERNAL_VARIABLE_LIST.varname);
  6493. restrictList.add(ConfVars.HIVE_SPARK_RSC_CONF_LIST.varname);
  6494. }
  6495. private void setupRSCList() {
  6496. rscList.clear();
  6497. String vars = this.getVar(ConfVars.HIVE_SPARK_RSC_CONF_LIST);
  6498. if (vars != null) {
  6499. for (String var : vars.split(",")) {
  6500. rscList.add(var.trim());
  6501. }
  6502. }
  6503. }
  6504. /**
  6505. * Strips hidden config entries from configuration
  6506. */
  6507. public void stripHiddenConfigurations(Configuration conf) {
  6508. HiveConfUtil.stripConfigurations(conf, hiddenSet);
  6509. }
  6510. /**
  6511. * @return true if HS2 webui is enabled
  6512. */
  6513. public boolean isWebUiEnabled() {
  6514. return this.getIntVar(ConfVars.HIVE_SERVER2_WEBUI_PORT) != 0;
  6515. }
  6516. /**
  6517. * @return true if HS2 webui query-info cache is enabled
  6518. */
  6519. public boolean isWebUiQueryInfoCacheEnabled() {
  6520. return isWebUiEnabled() && this.getIntVar(ConfVars.HIVE_SERVER2_WEBUI_MAX_HISTORIC_QUERIES) > 0;
  6521. }
  6522. /* Dynamic partition pruning is enabled in some or all cases
  6523. */
  6524. public boolean isSparkDPPAny() {
  6525. return isSparkDPPAny(this);
  6526. }
  6527. /* Dynamic partition pruning is enabled only for map join
  6528. * hive.spark.dynamic.partition.pruning is false and
  6529. * hive.spark.dynamic.partition.pruning.map.join.only is true
  6530. */
  6531. public boolean isSparkDPPOnlyMapjoin() {
  6532. return (!this.getBoolVar(ConfVars.SPARK_DYNAMIC_PARTITION_PRUNING) &&
  6533. this.getBoolVar(ConfVars.SPARK_DYNAMIC_PARTITION_PRUNING_MAP_JOIN_ONLY));
  6534. }
  6535. public static boolean isLoadMetastoreConfig() {
  6536. return loadMetastoreConfig;
  6537. }
  6538. public static void setLoadMetastoreConfig(boolean loadMetastoreConfig) {
  6539. HiveConf.loadMetastoreConfig = loadMetastoreConfig;
  6540. }
  6541. public static boolean isLoadHiveServer2Config() {
  6542. return loadHiveServer2Config;
  6543. }
  6544. public static void setLoadHiveServer2Config(boolean loadHiveServer2Config) {
  6545. HiveConf.loadHiveServer2Config = loadHiveServer2Config;
  6546. }
  6547. public static class StrictChecks {
  6548. private static final String NO_LIMIT_MSG = makeMessage(
  6549. "Order by-s without limit", ConfVars.HIVE_STRICT_CHECKS_ORDERBY_NO_LIMIT);
  6550. public static final String NO_PARTITIONLESS_MSG = makeMessage(
  6551. "Queries against partitioned tables without a partition filter",
  6552. ConfVars.HIVE_STRICT_CHECKS_NO_PARTITION_FILTER);
  6553. private static final String NO_COMPARES_MSG = makeMessage(
  6554. "Unsafe compares between different types", ConfVars.HIVE_STRICT_CHECKS_TYPE_SAFETY);
  6555. private static final String NO_CARTESIAN_MSG = makeMessage(
  6556. "Cartesian products", ConfVars.HIVE_STRICT_CHECKS_CARTESIAN);
  6557. private static final String NO_BUCKETING_MSG = makeMessage(
  6558. "Load into bucketed tables", ConfVars.HIVE_STRICT_CHECKS_BUCKETING);
  6559. private static String makeMessage(String what, ConfVars setting) {
  6560. return what + " are disabled for safety reasons. If you know what you are doing, please set "
  6561. + setting.varname + " to false and make sure that " + ConfVars.HIVEMAPREDMODE.varname +
  6562. " is not set to 'strict' to proceed. Note that you may get errors or incorrect " +
  6563. "results if you make a mistake while using some of the unsafe features.";
  6564. }
  6565. public static String checkNoLimit(Configuration conf) {
  6566. return isAllowed(conf, ConfVars.HIVE_STRICT_CHECKS_ORDERBY_NO_LIMIT) ? null : NO_LIMIT_MSG;
  6567. }
  6568. public static String checkNoPartitionFilter(Configuration conf) {
  6569. return isAllowed(conf, ConfVars.HIVE_STRICT_CHECKS_NO_PARTITION_FILTER)
  6570. ? null : NO_PARTITIONLESS_MSG;
  6571. }
  6572. public static String checkTypeSafety(Configuration conf) {
  6573. return isAllowed(conf, ConfVars.HIVE_STRICT_CHECKS_TYPE_SAFETY) ? null : NO_COMPARES_MSG;
  6574. }
  6575. public static String checkCartesian(Configuration conf) {
  6576. return isAllowed(conf, ConfVars.HIVE_STRICT_CHECKS_CARTESIAN) ? null : NO_CARTESIAN_MSG;
  6577. }
  6578. public static String checkBucketing(Configuration conf) {
  6579. return isAllowed(conf, ConfVars.HIVE_STRICT_CHECKS_BUCKETING) ? null : NO_BUCKETING_MSG;
  6580. }
  6581. private static boolean isAllowed(Configuration conf, ConfVars setting) {
  6582. String mode = HiveConf.getVar(conf, ConfVars.HIVEMAPREDMODE, (String)null);
  6583. return (mode != null) ? !"strict".equals(mode) : !HiveConf.getBoolVar(conf, setting);
  6584. }
  6585. }
  6586. public static String getNonMrEngines() {
  6587. Set<String> engines = new HashSet<>(ConfVars.HIVE_EXECUTION_ENGINE.getValidStringValues());
  6588. engines.remove("mr");
  6589. String validNonMrEngines = String.join(", ", engines);
  6590. LOG.debug("Valid non-MapReduce execution engines: {}", validNonMrEngines);
  6591. return validNonMrEngines;
  6592. }
  6593. public static String generateMrDeprecationWarning() {
  6594. return "Hive-on-MR is deprecated in Hive 2 and may not be available in the future versions. "
  6595. + "Consider using a different execution engine (i.e. " + HiveConf.getNonMrEngines()
  6596. + ") or using Hive 1.X releases.";
  6597. }
  6598. public static String generateDeprecationWarning() {
  6599. return "This config will be deprecated and may not be available in the future "
  6600. + "versions. Please adjust DDL towards the new semantics.";
  6601. }
  6602. private static final Object reverseMapLock = new Object();
  6603. private static HashMap<String, ConfVars> reverseMap = null;
  6604. public static HashMap<String, ConfVars> getOrCreateReverseMap() {
  6605. // This should be called rarely enough; for now it's ok to just lock every time.
  6606. synchronized (reverseMapLock) {
  6607. if (reverseMap != null) {
  6608. return reverseMap;
  6609. }
  6610. }
  6611. HashMap<String, ConfVars> vars = new HashMap<>();
  6612. for (ConfVars val : ConfVars.values()) {
  6613. vars.put(val.varname.toLowerCase(), val);
  6614. if (val.altName != null && !val.altName.isEmpty()) {
  6615. vars.put(val.altName.toLowerCase(), val);
  6616. }
  6617. }
  6618. synchronized (reverseMapLock) {
  6619. if (reverseMap != null) {
  6620. return reverseMap;
  6621. }
  6622. reverseMap = vars;
  6623. return reverseMap;
  6624. }
  6625. }
  6626. public void verifyAndSetAll(Map<String, String> overlay) {
  6627. for (Entry<String, String> entry : overlay.entrySet()) {
  6628. verifyAndSet(entry.getKey(), entry.getValue());
  6629. }
  6630. }
  6631. public Map<String, String> subtree(String string) {
  6632. Map<String, String> ret = new HashMap<>();
  6633. for (Entry<Object, Object> entry : getProps().entrySet()) {
  6634. String key = (String) entry.getKey();
  6635. String value = (String) entry.getValue();
  6636. if (key.startsWith(string)) {
  6637. ret.put(key.substring(string.length() + 1), value);
  6638. }
  6639. }
  6640. return ret;
  6641. }
  6642. // sync all configs from given conf
  6643. public void syncFromConf(HiveConf conf) {
  6644. Iterator<Map.Entry<String, String>> iter = conf.iterator();
  6645. while (iter.hasNext()) {
  6646. Map.Entry<String, String> e = iter.next();
  6647. set(e.getKey(), e.getValue());
  6648. }
  6649. }
  6650. }