diff --git beeline/src/java/org/apache/hive/beeline/HiveSchemaTool.java beeline/src/java/org/apache/hive/beeline/HiveSchemaTool.java index 1b8e315..acc8ca1 100644 --- beeline/src/java/org/apache/hive/beeline/HiveSchemaTool.java +++ beeline/src/java/org/apache/hive/beeline/HiveSchemaTool.java @@ -71,8 +71,8 @@ public HiveSchemaTool(String hiveHome, HiveConf hiveConf, String dbType) this.hiveConf = hiveConf; this.dbType = dbType; this.metaStoreSchemaInfo = new MetaStoreSchemaInfo(hiveHome, hiveConf, dbType); - userName = hiveConf.get(ConfVars.METASTORE_CONNECTION_USER_NAME.varname); - passWord = hiveConf.get(HiveConf.ConfVars.METASTOREPWD.varname); + userName = hiveConf.get(ConfVars.METASTORE_CONNECTION_USER_NAME.varname()); + passWord = hiveConf.get(HiveConf.ConfVars.METASTOREPWD.varname()); } public HiveConf getHiveConf() { @@ -379,9 +379,9 @@ public void runBeeLine(String sqlScriptFile) throws IOException { } private String getValidConfVar(ConfVars confVar) throws IOException { - String confVarStr = hiveConf.get(confVar.varname); + String confVarStr = hiveConf.get(confVar.varname()); if (confVarStr == null || confVarStr.isEmpty()) { - throw new IOException("Empty " + confVar.varname); + throw new IOException("Empty " + confVar.varname()); } return confVarStr; } @@ -465,7 +465,7 @@ public static void main(String[] args) { printAndExit(cmdLineOptions); } - System.setProperty(HiveConf.ConfVars.METASTORE_SCHEMA_VERIFICATION.varname, "true"); + System.setProperty(HiveConf.ConfVars.METASTORE_SCHEMA_VERIFICATION.varname(), "true"); try { HiveSchemaTool schemaTool = new HiveSchemaTool(dbType); diff --git cli/src/java/org/apache/hadoop/hive/cli/CliDriver.java cli/src/java/org/apache/hadoop/hive/cli/CliDriver.java index 27b8504..938abb2 100644 --- cli/src/java/org/apache/hadoop/hive/cli/CliDriver.java +++ cli/src/java/org/apache/hadoop/hive/cli/CliDriver.java @@ -597,7 +597,7 @@ public int complete (String buffer, int offset, List completions) { HiveConf.ConfVars[] confs = HiveConf.ConfVars.values(); String[] vars = new String[confs.length]; for (int i = 0; i < vars.length; i++) { - vars[i] = confs[i].varname; + vars[i] = confs[i].varname(); } SimpleCompletor conf = new SimpleCompletor(vars); conf.setDelimiter("."); diff --git cli/src/test/org/apache/hadoop/hive/cli/TestCliDriverMethods.java cli/src/test/org/apache/hadoop/hive/cli/TestCliDriverMethods.java index 63668bc..4acf514 100644 --- cli/src/test/org/apache/hadoop/hive/cli/TestCliDriverMethods.java +++ cli/src/test/org/apache/hadoop/hive/cli/TestCliDriverMethods.java @@ -119,7 +119,7 @@ private PrintStream headerPrintingTestDriver(Schema mockSchema) throws CommandNe // We want the driver to try to print the header... Configuration conf = mock(Configuration.class); - when(conf.getBoolean(eq(ConfVars.HIVE_CLI_PRINT_HEADER.varname), anyBoolean())) + when(conf.getBoolean(eq(ConfVars.HIVE_CLI_PRINT_HEADER.varname()), anyBoolean())) .thenReturn(true); cliDriver.setConf(conf); diff --git common/pom.xml common/pom.xml index b3d230d..187b451 100644 --- common/pom.xml +++ common/pom.xml @@ -65,6 +65,11 @@ commons-compress ${commons-compress.version} + + org.apache.ant + ant + ${ant.version} + junit @@ -106,6 +111,12 @@ + + + ../conf/ + hive-default.xml.template + + ${basedir}/src/java ${basedir}/src/test ${basedir}/src/scripts @@ -120,6 +131,21 @@ maven-antrun-plugin + generate-template + package + + + + + + + + + run + + + generate-version-annotation generate-sources diff --git common/src/java/org/apache/hadoop/hive/ant/GenHiveTemplate.java common/src/java/org/apache/hadoop/hive/ant/GenHiveTemplate.java new file mode 100644 index 0000000..21b3826 --- /dev/null +++ common/src/java/org/apache/hadoop/hive/ant/GenHiveTemplate.java @@ -0,0 +1,164 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.hadoop.hive.ant; + +import org.apache.hadoop.hive.conf.HiveConf; +import org.apache.tools.ant.BuildException; +import org.apache.tools.ant.Task; +import org.w3c.dom.Document; +import org.w3c.dom.Element; +import org.w3c.dom.Text; + +import javax.xml.parsers.DocumentBuilder; +import javax.xml.parsers.DocumentBuilderFactory; +import javax.xml.transform.OutputKeys; +import javax.xml.transform.Transformer; +import javax.xml.transform.TransformerFactory; +import javax.xml.transform.dom.DOMSource; +import javax.xml.transform.stream.StreamResult; +import java.io.File; +import java.net.URL; + +/** + * Generates hive-default.xml.template from HiveConf.ConfVars + */ +public class GenHiveTemplate extends Task { + + private String templateFile; + + public String getTemplateFile() { + return templateFile; + } + + public void setTemplateFile(String templateFile) { + this.templateFile = templateFile; + } + + private void generate() throws Exception { + File current = new File(templateFile); + if (current.exists()) { + ClassLoader loader = GenHiveTemplate.class.getClassLoader(); + URL url = loader.getResource("org/apache/hadoop/hive/conf/HiveConf.class"); + if (url != null) { + File file = new File(url.getFile()); + if (file.exists() && file.lastModified() < current.lastModified()) { + return; + } + } + } + writeToFile(current, generateTemplate()); + } + + private Document generateTemplate() throws Exception { + DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); + DocumentBuilder docBuilder = dbf.newDocumentBuilder(); + Document doc = docBuilder.newDocument(); + doc.appendChild(doc.createProcessingInstruction( + "xml-stylesheet", "type=\"text/xsl\" href=\"configuration.xsl\"")); + + doc.appendChild(doc.createComment("\n" + + " Licensed to the Apache Software Foundation (ASF) under one or more\n" + + " contributor license agreements. See the NOTICE file distributed with\n" + + " this work for additional information regarding copyright ownership.\n" + + " The ASF licenses this file to You under the Apache License, Version 2.0\n" + + " (the \"License\"); you may not use this file except in compliance with\n" + + " the License. You may obtain a copy of the License at\n" + + "\n" + + " http://www.apache.org/licenses/LICENSE-2.0\n" + + "\n" + + " Unless required by applicable law or agreed to in writing, software\n" + + " distributed under the License is distributed on an \"AS IS\" BASIS,\n" + + " WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n" + + " See the License for the specific language governing permissions and\n" + + " limitations under the License.\n")); + + Element root = doc.createElement("configuration"); + doc.appendChild(root); + + root.appendChild(doc.createComment( + " WARNING!!! This file is auto generated for documentation purposes ONLY! ")); + root.appendChild(doc.createComment( + " WARNING!!! Any changes you make to this file will be ignored by Hive. ")); + root.appendChild(doc.createComment( + " WARNING!!! You must make your changes in hive-site.xml instead. ")); + + root.appendChild(doc.createComment(" Hive Execution Parameters ")); + + for (HiveConf.ConfVars confVars : HiveConf.ConfVars.values()) { + if (confVars.isShimed()) { + // thought of creating template for each shims, but I couldn't generate proper mvn script + continue; + } + Element property = appendElement(root, "property", null); + appendElement(property, "key", confVars.varname()); + appendElement(property, "value", confVars.getDefaultValue()); + appendElement(property, "description", normalize(confVars.getDescription())); + // really wish to add new line here. + } + return doc; + } + + private String normalize(String description) { + int index = description.indexOf('\n'); + if (index < 0) { + return description; + } + int prev = 0; + StringBuilder builder = new StringBuilder(description.length() << 1); + for (;index > 0; index = description.indexOf('\n', prev = index + 1)) { + builder.append("\n ").append(description.substring(prev, index)); + } + builder.append("\n "); + return builder.toString(); + } + + private void writeToFile(File template, Document document) throws Exception { + Transformer transformer = TransformerFactory.newInstance().newTransformer(); + transformer.setOutputProperty(OutputKeys.INDENT, "yes"); + transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "2"); + DOMSource source = new DOMSource(document); + StreamResult result = new StreamResult(template); + transformer.transform(source, result); + } + + private Element appendElement(Element parent, String name, String text) { + Document document = parent.getOwnerDocument(); + Element child = document.createElement(name); + parent.appendChild(child); + if (text != null) { + Text textNode = document.createTextNode(text); + child.appendChild(textNode); + } + return child; + } + + @Override + public void execute() throws BuildException { + try { + generate(); + } catch (Exception e) { + throw new BuildException(e); + } + } + + public static void main(String[] args) throws Exception { + GenHiveTemplate gen = new GenHiveTemplate(); + gen.generate(); + } +} diff --git common/src/java/org/apache/hadoop/hive/common/ServerUtils.java common/src/java/org/apache/hadoop/hive/common/ServerUtils.java index f73dffb..1d6a910 100644 --- common/src/java/org/apache/hadoop/hive/common/ServerUtils.java +++ common/src/java/org/apache/hadoop/hive/common/ServerUtils.java @@ -35,7 +35,7 @@ public static void cleanUpScratchDir(HiveConf hiveConf) { if (hiveConf.getBoolVar(HiveConf.ConfVars.HIVE_START_CLEANUP_SCRATCHDIR)) { - String hiveScratchDir = hiveConf.get(HiveConf.ConfVars.SCRATCHDIR.varname); + String hiveScratchDir = hiveConf.get(HiveConf.ConfVars.SCRATCHDIR.varname()); try { Path jobScratchDir = new Path(hiveScratchDir); LOG.info("Cleaning scratchDir : " + hiveScratchDir); diff --git common/src/java/org/apache/hadoop/hive/conf/HiveConf.java common/src/java/org/apache/hadoop/hive/conf/HiveConf.java index 3f50361..7dbaa95 100644 --- common/src/java/org/apache/hadoop/hive/conf/HiveConf.java +++ common/src/java/org/apache/hadoop/hive/conf/HiveConf.java @@ -27,17 +27,16 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.Iterator; -import java.util.LinkedHashSet; import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Properties; -import java.util.Set; import java.util.regex.Matcher; import java.util.regex.Pattern; import javax.security.auth.login.LoginException; +import static org.apache.hadoop.hive.conf.Validator.*; import org.apache.commons.lang.StringUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; @@ -167,744 +166,1297 @@ */ public static enum ConfVars { // QL execution stuff - SCRIPTWRAPPER("hive.exec.script.wrapper", null), - PLAN("hive.exec.plan", ""), - PLAN_SERIALIZATION("hive.plan.serialization.format","kryo"), - SCRATCHDIR("hive.exec.scratchdir", "/tmp/hive-" + System.getProperty("user.name")), - LOCALSCRATCHDIR("hive.exec.local.scratchdir", System.getProperty("java.io.tmpdir") + File.separator + System.getProperty("user.name")), - SCRATCHDIRPERMISSION("hive.scratch.dir.permission", "700"), - SUBMITVIACHILD("hive.exec.submitviachild", false), - SCRIPTERRORLIMIT("hive.exec.script.maxerrsize", 100000), - ALLOWPARTIALCONSUMP("hive.exec.script.allow.partial.consumption", false), - STREAMREPORTERPERFIX("stream.stderr.reporter.prefix", "reporter:"), - STREAMREPORTERENABLED("stream.stderr.reporter.enabled", true), - COMPRESSRESULT("hive.exec.compress.output", false), - COMPRESSINTERMEDIATE("hive.exec.compress.intermediate", false), - COMPRESSINTERMEDIATECODEC("hive.intermediate.compression.codec", ""), - COMPRESSINTERMEDIATETYPE("hive.intermediate.compression.type", ""), - BYTESPERREDUCER("hive.exec.reducers.bytes.per.reducer", (long) (1000 * 1000 * 1000)), - MAXREDUCERS("hive.exec.reducers.max", 999), - PREEXECHOOKS("hive.exec.pre.hooks", ""), - POSTEXECHOOKS("hive.exec.post.hooks", ""), - ONFAILUREHOOKS("hive.exec.failure.hooks", ""), - CLIENTSTATSPUBLISHERS("hive.client.stats.publishers", ""), - EXECPARALLEL("hive.exec.parallel", false), // parallel query launching - EXECPARALLETHREADNUMBER("hive.exec.parallel.thread.number", 8), - HIVESPECULATIVEEXECREDUCERS("hive.mapred.reduce.tasks.speculative.execution", true), - HIVECOUNTERSPULLINTERVAL("hive.exec.counters.pull.interval", 1000L), - DYNAMICPARTITIONING("hive.exec.dynamic.partition", true), - DYNAMICPARTITIONINGMODE("hive.exec.dynamic.partition.mode", "strict"), - DYNAMICPARTITIONMAXPARTS("hive.exec.max.dynamic.partitions", 1000), - DYNAMICPARTITIONMAXPARTSPERNODE("hive.exec.max.dynamic.partitions.pernode", 100), - MAXCREATEDFILES("hive.exec.max.created.files", 100000L), + SCRIPTWRAPPER("hive.exec.script.wrapper", "", ""), + PLAN("hive.exec.plan", "", ""), + PLAN_SERIALIZATION("hive.plan.serialization.format", "kryo", + "Query plan format serialization between client and task nodes. \n" + + "Two supported values are : kryo and javaXML. Kryo is default."), + SCRATCHDIR("hive.exec.scratchdir", + "/tmp/hive-" + System.getProperty("user.name"), + "Scratch space for Hive jobs"), + LOCALSCRATCHDIR("hive.exec.local.scratchdir", + System.getProperty("java.io.tmpdir") + File.separator + System.getProperty("user.name"), + "Local scratch space for Hive jobs"), + SCRATCHDIRPERMISSION("hive.scratch.dir.permission", "700", ""), + SUBMITVIACHILD("hive.exec.submitviachild", false, ""), + SCRIPTERRORLIMIT("hive.exec.script.maxerrsize", 100000, + "Maximum number of bytes a script is allowed to emit to standard error (per map-reduce task). \n" + + "This prevents runaway scripts from filling logs partitions to capacity"), + ALLOWPARTIALCONSUMP("hive.exec.script.allow.partial.consumption", false, + "When enabled, this option allows a user script to exit successfully without consuming all the data from the standard input."), + STREAMREPORTERPERFIX("stream.stderr.reporter.prefix", "reporter:", + "Streaming jobs that log to standard error with this prefix can log counter or status information."), + STREAMREPORTERENABLED("stream.stderr.reporter.enabled", true, + "Enable consumption of status and counter messages for streaming jobs."), + COMPRESSRESULT("hive.exec.compress.output", false, + "This controls whether the final outputs of a query (to a local/HDFS file or a Hive table) is compressed. \n" + + "The compression codec and other options are determined from Hadoop config variables mapred.output.compress*"), + COMPRESSINTERMEDIATE("hive.exec.compress.intermediate", false, + "This controls whether intermediate files produced by Hive between multiple map-reduce jobs are compressed. \n" + + "The compression codec and other options are determined from Hadoop config variables mapred.output.compress*"), + COMPRESSINTERMEDIATECODEC("hive.intermediate.compression.codec", "", ""), + COMPRESSINTERMEDIATETYPE("hive.intermediate.compression.valType", "", ""), + BYTESPERREDUCER("hive.exec.reducers.bytes.per.reducer", (long) (1000 * 1000 * 1000), + "size per reducer.The default is 1G, i.e if the input size is 10G, it will use 10 reducers."), + MAXREDUCERS("hive.exec.reducers.max", 999, + "max number of reducers will be used. If the one specified in the configuration parameter mapred.reduce.tasks is\n" + + "negative, Hive will use this one as the max number of reducers when automatically determine number of reducers."), + PREEXECHOOKS("hive.exec.pre.hooks", "", + "Comma-separated list of pre-execution hooks to be invoked for each statement. \n" + + "A pre-execution hook is specified as the name of a Java class which implements the \n" + + "org.apache.hadoop.hive.ql.hooks.ExecuteWithHookContext interface."), + POSTEXECHOOKS("hive.exec.post.hooks", "", + "Comma-separated list of post-execution hooks to be invoked for each statement. \n" + + "A post-execution hook is specified as the name of a Java class which implements the \n" + + "org.apache.hadoop.hive.ql.hooks.ExecuteWithHookContext interface."), + ONFAILUREHOOKS("hive.exec.failure.hooks", "", + "Comma-separated list of on-failure hooks to be invoked for each statement. \n" + + "An on-failure hook is specified as the name of Java class which implements the \n" + + "org.apache.hadoop.hive.ql.hooks.ExecuteWithHookContext interface."), + CLIENTSTATSPUBLISHERS("hive.client.stats.publishers", "", + "Comma-separated list of statistics publishers to be invoked on counters on each job. \n" + + "A client stats publisher is specified as the name of a Java class which implements the \n" + + "org.apache.hadoop.hive.ql.stats.ClientStatsPublisher interface."), + EXECPARALLEL("hive.exec.parallel", false, + "Whether to execute jobs in parallel"), + EXECPARALLETHREADNUMBER("hive.exec.parallel.thread.number", 8, + "How many jobs at most can be executed in parallel"), + HIVESPECULATIVEEXECREDUCERS("hive.mapred.reduce.tasks.speculative.execution", true, + "Whether speculative execution for reducers should be turned on. "), + HIVECOUNTERSPULLINTERVAL("hive.exec.counters.pull.interval", 1000L, + "The interval with which to poll the JobTracker for the counters the running job. \n" + + "The smaller it is the more load there will be on the jobtracker, the higher it is the less granular the caught will be."), + DYNAMICPARTITIONING("hive.exec.dynamic.partition", true, + "Whether or not to allow dynamic partitions in DML/DDL."), + DYNAMICPARTITIONINGMODE("hive.exec.dynamic.partition.mode", "strict", + "In strict mode, the user must specify at least one static partition in case the user accidentally overwrites all partitions."), + DYNAMICPARTITIONMAXPARTS("hive.exec.max.dynamic.partitions", 1000, + "Maximum number of dynamic partitions allowed to be created in total."), + DYNAMICPARTITIONMAXPARTSPERNODE("hive.exec.max.dynamic.partitions.pernode", 100, + "Maximum number of dynamic partitions allowed to be created in each mapper/reducer node."), + MAXCREATEDFILES("hive.exec.max.created.files", 100000L, + "Maximum number of HDFS files created by all mappers/reducers in a MapReduce job."), DOWNLOADED_RESOURCES_DIR("hive.downloaded.resources.dir", - System.getProperty("java.io.tmpdir") + File.separator + "${hive.session.id}_resources"), - DEFAULTPARTITIONNAME("hive.exec.default.partition.name", "__HIVE_DEFAULT_PARTITION__"), - DEFAULT_ZOOKEEPER_PARTITION_NAME("hive.lockmgr.zookeeper.default.partition.name", "__HIVE_DEFAULT_ZOOKEEPER_PARTITION__"), + System.getProperty("java.io.tmpdir") + File.separator + "${hive.session.id}_resources", + "The default partition name in case the dynamic partition column value is null/empty string or any other values that cannot be escaped. \n" + + "This value must not contain any special character used in HDFS URI (e.g., ':', '%', '/' etc). \n" + + "The user has to be aware that the dynamic partition value should not contain this value to avoid confusions."), + DEFAULTPARTITIONNAME("hive.exec.default.partition.name", "__HIVE_DEFAULT_PARTITION__", ""), + DEFAULT_ZOOKEEPER_PARTITION_NAME("hive.lockmgr.zookeeper.default.partition.name", "__HIVE_DEFAULT_ZOOKEEPER_PARTITION__", ""), // Whether to show a link to the most failed task + debugging tips - SHOW_JOB_FAIL_DEBUG_INFO("hive.exec.show.job.failure.debug.info", true), - JOB_DEBUG_CAPTURE_STACKTRACES("hive.exec.job.debug.capture.stacktraces", true), - JOB_DEBUG_TIMEOUT("hive.exec.job.debug.timeout", 30000), - TASKLOG_DEBUG_TIMEOUT("hive.exec.tasklog.debug.timeout", 20000), - OUTPUT_FILE_EXTENSION("hive.output.file.extension", null), - - HIVE_IN_TEST("hive.in.test", false), // internal usage only, true in test mode - - // should hive determine whether to run in local mode automatically ? - LOCALMODEAUTO("hive.exec.mode.local.auto", false), - // if yes: - // run in local mode only if input bytes is less than this. 128MB by default - LOCALMODEMAXBYTES("hive.exec.mode.local.auto.inputbytes.max", 134217728L), - // run in local mode only if number of tasks (for map and reduce each) is - // less than this - LOCALMODEMAXINPUTFILES("hive.exec.mode.local.auto.input.files.max", 4), - // if true, DROP TABLE/VIEW does not fail if table/view doesn't exist and IF EXISTS is - // not specified - DROPIGNORESNONEXISTENT("hive.exec.drop.ignorenonexistent", true), - - // ignore the mapjoin hint - HIVEIGNOREMAPJOINHINT("hive.ignore.mapjoin.hint", true), - - // Max number of lines of footer user can set for a table file. - HIVE_FILE_MAX_FOOTER("hive.file.max.footer", 100), + + SHOW_JOB_FAIL_DEBUG_INFO("hive.exec.show.job.failure.debug.info", true, + "If a job fails, whether to provide a link in the CLI to the task with the\n" + + "most failures, along with debugging hints if applicable."), + JOB_DEBUG_CAPTURE_STACKTRACES("hive.exec.job.debug.capture.stacktraces", true, + "Whether or not stack traces parsed from the task logs of a sampled failed task \n" + + "for each failed job should be stored in the SessionState"), + JOB_DEBUG_TIMEOUT("hive.exec.job.debug.timeout", 30000, ""), + TASKLOG_DEBUG_TIMEOUT("hive.exec.tasklog.debug.timeout", 20000, ""), + OUTPUT_FILE_EXTENSION("hive.output.file.extension", "", + "String used as a file extension for output files. If not set, defaults to the codec extension for text files (e.g. \".gz\"), or no extension otherwise."), + + HIVE_IN_TEST("hive.in.test", false, "internal usage only, true in test mode"), + + LOCALMODEAUTO("hive.exec.mode.local.auto", false, + "Let Hive determine whether to run in local mode automatically"), + LOCALMODEMAXBYTES("hive.exec.mode.local.auto.inputbytes.max", 134217728L, + "When hive.exec.mode.local.auto is true, input bytes should less than this for local mode."), + LOCALMODEMAXINPUTFILES("hive.exec.mode.local.auto.input.files.max", 4, + "When hive.exec.mode.local.auto is true, the number of tasks should less than this for local mode."), + + DROPIGNORESNONEXISTENT("hive.exec.drop.ignorenonexistent", true, + "Do not report an error if DROP TABLE/VIEW specifies a non-existent table/view"), + + HIVEIGNOREMAPJOINHINT("hive.ignore.mapjoin.hint", true, "Ignore the mapjoin hint"), + + HIVE_FILE_MAX_FOOTER("hive.file.max.footer", 100, + "maximum number of lines for footer user can define for a table file"), // Hadoop Configuration Properties - // Properties with null values are ignored and exist only for the purpose of giving us - // a symbolic name to reference in the Hive source code. Properties with non-null + // Properties with "" values are ignored and exist only for the purpose of giving us + // a symbolic name to reference in the Hive source code. Properties with non-"" // values will override any values set in the underlying Hadoop configuration. - HADOOPBIN("hadoop.bin.path", findHadoopBinary()), - HIVE_FS_HAR_IMPL("fs.har.impl", "org.apache.hadoop.hive.shims.HiveHarFileSystem"), - HADOOPFS(ShimLoader.getHadoopShims().getHadoopConfNames().get("HADOOPFS"), null), - HADOOPMAPFILENAME(ShimLoader.getHadoopShims().getHadoopConfNames().get("HADOOPMAPFILENAME"), null), - HADOOPMAPREDINPUTDIR(ShimLoader.getHadoopShims().getHadoopConfNames().get("HADOOPMAPREDINPUTDIR"), null), - HADOOPMAPREDINPUTDIRRECURSIVE(ShimLoader.getHadoopShims().getHadoopConfNames().get("HADOOPMAPREDINPUTDIRRECURSIVE"), false), - MAPREDMAXSPLITSIZE(ShimLoader.getHadoopShims().getHadoopConfNames().get("MAPREDMAXSPLITSIZE"), 256000000L), - MAPREDMINSPLITSIZE(ShimLoader.getHadoopShims().getHadoopConfNames().get("MAPREDMINSPLITSIZE"), 1L), - MAPREDMINSPLITSIZEPERNODE(ShimLoader.getHadoopShims().getHadoopConfNames().get("MAPREDMINSPLITSIZEPERNODE"), 1L), - MAPREDMINSPLITSIZEPERRACK(ShimLoader.getHadoopShims().getHadoopConfNames().get("MAPREDMINSPLITSIZEPERRACK"), 1L), + HADOOPBIN("hadoop.bin.path", findHadoopBinary(), ""), + HIVE_FS_HAR_IMPL("fs.har.impl", "org.apache.hadoop.hive.shims.HiveHarFileSystem", + "The implementation for accessing Hadoop Archives. Note that this won't be applicable to Hadoop versions less than 0.20"), + HADOOPFS("HADOOPFS", "", "", true), + HADOOPMAPFILENAME("HADOOPMAPFILENAME", "", "", true), + HADOOPMAPREDINPUTDIR("HADOOPMAPREDINPUTDIR", "", "", true), + HADOOPMAPREDINPUTDIRRECURSIVE("HADOOPMAPREDINPUTDIRRECURSIVE", false, "", true), + MAPREDMAXSPLITSIZE("MAPREDMAXSPLITSIZE", 256000000L, "", true), + MAPREDMINSPLITSIZE("MAPREDMINSPLITSIZE", 1L, "", true), + MAPREDMINSPLITSIZEPERNODE("MAPREDMINSPLITSIZEPERNODE", 1L, "", true), + MAPREDMINSPLITSIZEPERRACK("MAPREDMINSPLITSIZEPERRACK", 1L, "", true), // The number of reduce tasks per job. Hadoop sets this value to 1 by default // By setting this property to -1, Hive will automatically determine the correct // number of reducers. - HADOOPNUMREDUCERS(ShimLoader.getHadoopShims().getHadoopConfNames().get("HADOOPNUMREDUCERS"), -1), - HADOOPJOBNAME(ShimLoader.getHadoopShims().getHadoopConfNames().get("HADOOPJOBNAME"), null), - HADOOPSPECULATIVEEXECREDUCERS(ShimLoader.getHadoopShims().getHadoopConfNames().get("HADOOPSPECULATIVEEXECREDUCERS"), true), - MAPREDSETUPCLEANUPNEEDED(ShimLoader.getHadoopShims().getHadoopConfNames().get("MAPREDSETUPCLEANUPNEEDED"), false), - MAPREDTASKCLEANUPNEEDED(ShimLoader.getHadoopShims().getHadoopConfNames().get("MAPREDTASKCLEANUPNEEDED"), false), + HADOOPNUMREDUCERS("HADOOPNUMREDUCERS", -1, ""), + HADOOPJOBNAME("HADOOPJOBNAME", "", ""), + HADOOPSPECULATIVEEXECREDUCERS("HADOOPSPECULATIVEEXECREDUCERS", true, ""), + MAPREDSETUPCLEANUPNEEDED("MAPREDSETUPCLEANUPNEEDED", false, ""), + MAPREDTASKCLEANUPNEEDED("MAPREDTASKCLEANUPNEEDED", false, ""), // Metastore stuff. Be sure to update HiveConf.metaVars when you add // something here! - METASTOREDIRECTORY("hive.metastore.metadb.dir", ""), - METASTOREWAREHOUSE("hive.metastore.warehouse.dir", "/user/hive/warehouse"), - METASTOREURIS("hive.metastore.uris", ""), - // Number of times to retry a connection to a Thrift metastore server - METASTORETHRIFTCONNECTIONRETRIES("hive.metastore.connect.retries", 3), - // Number of times to retry a Thrift metastore call upon failure - METASTORETHRIFTFAILURERETRIES("hive.metastore.failure.retries", 1), - - // Number of seconds the client should wait between connection attempts - METASTORE_CLIENT_CONNECT_RETRY_DELAY("hive.metastore.client.connect.retry.delay", 1), - // Socket timeout for the client connection (in seconds) - METASTORE_CLIENT_SOCKET_TIMEOUT("hive.metastore.client.socket.timeout", 20), - METASTOREPWD("javax.jdo.option.ConnectionPassword", "mine"), - // Class name of JDO connection url hook - METASTORECONNECTURLHOOK("hive.metastore.ds.connection.url.hook", ""), - METASTOREMULTITHREADED("javax.jdo.option.Multithreaded", true), - // Name of the connection url in the configuration + METASTOREDIRECTORY("hive.metastore.metadb.dir", "", ""), + METASTOREWAREHOUSE("hive.metastore.warehouse.dir", "/user/hive/warehouse", + "location of default database for the warehouse"), + METASTOREURIS("hive.metastore.uris", "", + "Thrift URI for the remote metastore. Used by metastore client to connect to remote metastore."), + + METASTORETHRIFTCONNECTIONRETRIES("hive.metastore.connect.retries", 3, + "Number of retries while opening a connection to metastore"), + METASTORETHRIFTFAILURERETRIES("hive.metastore.failure.retries", 1, + "Number of retries upon failure of Thrift metastore calls"), + + METASTORE_CLIENT_CONNECT_RETRY_DELAY("hive.metastore.client.connect.retry.delay", 1, + "Number of seconds for the client to wait between consecutive connection attempts"), + METASTORE_CLIENT_SOCKET_TIMEOUT("hive.metastore.client.socket.timeout", 20, + "MetaStore Client socket timeout in seconds"), + METASTOREPWD("javax.jdo.option.ConnectionPassword", "mine", + "password to use against metastore database"), + METASTORECONNECTURLHOOK("hive.metastore.ds.connection.url.hook", "", + "Name of the hook to use for retrieving the JDO connection URL. If empty, the value in javax.jdo.option.ConnectionURL is used"), + METASTOREMULTITHREADED("javax.jdo.option.Multithreaded", true, + "Set this to true if multiple threads access metastore through JDO concurrently."), METASTORECONNECTURLKEY("javax.jdo.option.ConnectionURL", - "jdbc:derby:;databaseName=metastore_db;create=true"), - // Number of attempts to retry connecting after there is a JDO datastore err - METASTOREATTEMPTS("hive.metastore.ds.retry.attempts", 1), - // Number of miliseconds to wait between attepting - METASTOREINTERVAL("hive.metastore.ds.retry.interval", 1000), - // Whether to force reloading of the metastore configuration (including - // the connection URL, before the next metastore query that accesses the - // datastore. Once reloaded, this value is reset to false. Used for - // testing only. - METASTOREFORCERELOADCONF("hive.metastore.force.reload.conf", false), - // Number of attempts to retry connecting after there is a JDO datastore err - HMSHANDLERATTEMPTS("hive.hmshandler.retry.attempts", 1), - // Number of miliseconds to wait between attepting - HMSHANDLERINTERVAL("hive.hmshandler.retry.interval", 1000), - // Whether to force reloading of the HMSHandler configuration (including - // the connection URL, before the next metastore query that accesses the - // datastore. Once reloaded, this value is reset to false. Used for - // testing only. - HMSHANDLERFORCERELOADCONF("hive.hmshandler.force.reload.conf", false), - METASTORESERVERMINTHREADS("hive.metastore.server.min.threads", 200), - METASTORESERVERMAXTHREADS("hive.metastore.server.max.threads", 100000), - METASTORE_TCP_KEEP_ALIVE("hive.metastore.server.tcp.keepalive", true), - // Intermediate dir suffixes used for archiving. Not important what they - // are, as long as collisions are avoided + "jdbc:derby:;databaseName=metastore_db;create=true", + "JDBC connect string for a JDBC metastore"), + METASTOREATTEMPTS("hive.metastore.ds.retry.attempts", 1, + "The number of times to retry a metastore call if there were a connection error"), + METASTOREINTERVAL("hive.metastore.ds.retry.interval", 1000, + "The number of milliseconds between metastore retry attempts"), + + METASTOREFORCERELOADCONF("hive.metastore.force.reload.conf", false, + "Whether to force reloading of the metastore configuration (including\n" + + "the connection URL, before the next metastore query that accesses the\n" + + "datastore. Once reloaded, this value is reset to false. Used for\n" + + "testing only.\n"), + HMSHANDLERATTEMPTS("hive.hmshandler.retry.attempts", 1, + "The number of times to retry a HMSHandler call if there were a connection error"), + HMSHANDLERINTERVAL("hive.hmshandler.retry.interval", 1000, + "The number of milliseconds between HMSHandler retry attempts"), + HMSHANDLERFORCERELOADCONF("hive.hmshandler.force.reload.conf", false, + "Whether to force reloading of the HMSHandler configuration (including\n" + + "the connection URL, before the next metastore query that accesses the\n" + + "datastore. Once reloaded, this value is reset to false. Used for\n" + + "testing only.\n"), + METASTORESERVERMINTHREADS("hive.metastore.server.min.threads", 200, + "Minimum number of worker threads in the Thrift server's pool."), + METASTORESERVERMAXTHREADS("hive.metastore.server.max.threads", 100000, + "Maximum number of worker threads in the Thrift server's pool."), + METASTORE_TCP_KEEP_ALIVE("hive.metastore.server.tcp.keepalive", true, + "Whether to enable TCP keepalive for the metastore server. Keepalive will prevent accumulation of half-open connections."), + METASTORE_INT_ORIGINAL("hive.metastore.archive.intermediate.original", - "_INTERMEDIATE_ORIGINAL"), + "_INTERMEDIATE_ORIGINAL", + "Intermediate dir suffixes used for archiving. Not important what they\n" + + "are, as long as collisions are avoided\n"), METASTORE_INT_ARCHIVED("hive.metastore.archive.intermediate.archived", - "_INTERMEDIATE_ARCHIVED"), + "_INTERMEDIATE_ARCHIVED", ""), METASTORE_INT_EXTRACTED("hive.metastore.archive.intermediate.extracted", - "_INTERMEDIATE_EXTRACTED"), - METASTORE_KERBEROS_KEYTAB_FILE("hive.metastore.kerberos.keytab.file", ""), + "_INTERMEDIATE_EXTRACTED", ""), + METASTORE_KERBEROS_KEYTAB_FILE("hive.metastore.kerberos.keytab.file", "", + "The path to the Kerberos Keytab file containing the metastore Thrift server's service principal."), METASTORE_KERBEROS_PRINCIPAL("hive.metastore.kerberos.principal", - "hive-metastore/_HOST@EXAMPLE.COM"), - METASTORE_USE_THRIFT_SASL("hive.metastore.sasl.enabled", false), - METASTORE_USE_THRIFT_FRAMED_TRANSPORT("hive.metastore.thrift.framed.transport.enabled", false), - METASTORE_CLUSTER_DELEGATION_TOKEN_STORE_CLS( - "hive.cluster.delegation.token.store.class", - "org.apache.hadoop.hive.thrift.MemoryTokenStore"), + "hive-metastore/_HOST@EXAMPLE.COM", + "The service principal for the metastore Thrift server. The special string _HOST will be replaced automatically with the correct host name."), + METASTORE_USE_THRIFT_SASL("hive.metastore.sasl.enabled", false, + "If true, the metastore Thrift interface will be secured with SASL. Clients must authenticate with Kerberos."), + METASTORE_USE_THRIFT_FRAMED_TRANSPORT("hive.metastore.thrift.framed.transport.enabled", false, + "If true, the metastore Thrift interface will use TFramedTransport. When false (default) a standard TTransport is used."), + METASTORE_CLUSTER_DELEGATION_TOKEN_STORE_CLS("hive.cluster.delegation.token.store.class", + "org.apache.hadoop.hive.thrift.MemoryTokenStore", + "The delegation token store implementation. Set to org.apache.hadoop.hive.thrift.ZooKeeperTokenStore for load-balanced cluster."), METASTORE_CLUSTER_DELEGATION_TOKEN_STORE_ZK_CONNECTSTR( - "hive.cluster.delegation.token.store.zookeeper.connectString", ""), + "hive.cluster.delegation.token.store.zookeeper.connectString", "", + "The ZooKeeper token store connect string."), METASTORE_CLUSTER_DELEGATION_TOKEN_STORE_ZK_ZNODE( - "hive.cluster.delegation.token.store.zookeeper.znode", "/hive/cluster/delegation"), + "hive.cluster.delegation.token.store.zookeeper.znode", "/hive/cluster/delegation", + "The root path for token store data."), METASTORE_CLUSTER_DELEGATION_TOKEN_STORE_ZK_ACL( - "hive.cluster.delegation.token.store.zookeeper.acl", ""), - METASTORE_CACHE_PINOBJTYPES("hive.metastore.cache.pinobjtypes", "Table,StorageDescriptor,SerDeInfo,Partition,Database,Type,FieldSchema,Order"), - METASTORE_CONNECTION_POOLING_TYPE("datanucleus.connectionPoolingType", "BONECP"), - METASTORE_VALIDATE_TABLES("datanucleus.validateTables", false), - METASTORE_VALIDATE_COLUMNS("datanucleus.validateColumns", false), - METASTORE_VALIDATE_CONSTRAINTS("datanucleus.validateConstraints", false), - METASTORE_STORE_MANAGER_TYPE("datanucleus.storeManagerType", "rdbms"), - METASTORE_AUTO_CREATE_SCHEMA("datanucleus.autoCreateSchema", true), - METASTORE_FIXED_DATASTORE("datanucleus.fixedDatastore", false), - METASTORE_SCHEMA_VERIFICATION("hive.metastore.schema.verification", false), - METASTORE_AUTO_START_MECHANISM_MODE("datanucleus.autoStartMechanismMode", "checked"), - METASTORE_TRANSACTION_ISOLATION("datanucleus.transactionIsolation", "read-committed"), - METASTORE_CACHE_LEVEL2("datanucleus.cache.level2", false), - METASTORE_CACHE_LEVEL2_TYPE("datanucleus.cache.level2.type", "none"), - METASTORE_IDENTIFIER_FACTORY("datanucleus.identifierFactory", "datanucleus1"), - METASTORE_USE_LEGACY_VALUE_STRATEGY("datanucleus.rdbms.useLegacyNativeValueStrategy", true), - METASTORE_PLUGIN_REGISTRY_BUNDLE_CHECK("datanucleus.plugin.pluginRegistryBundleCheck", "LOG"), - METASTORE_BATCH_RETRIEVE_MAX("hive.metastore.batch.retrieve.max", 300), + "hive.cluster.delegation.token.store.zookeeper.acl", "", + "ACL for token store entries. List comma separated all server principals for the cluster."), + METASTORE_CACHE_PINOBJTYPES("hive.metastore.cache.pinobjtypes", "Table,StorageDescriptor,SerDeInfo,Partition,Database,Type,FieldSchema,Order", + "List of comma separated metastore object types that should be pinned in the cache"), + METASTORE_CONNECTION_POOLING_TYPE("datanucleus.connectionPoolingType", "BONECP", + "Specify connection pool library for datanucleus"), + METASTORE_VALIDATE_TABLES("datanucleus.validateTables", false, + "validates existing schema against code. turn this on if you want to verify existing schema"), + METASTORE_VALIDATE_COLUMNS("datanucleus.validateColumns", false, + "validates existing schema against code. turn this on if you want to verify existing schema"), + METASTORE_VALIDATE_CONSTRAINTS("datanucleus.validateConstraints", false, + "validates existing schema against code. turn this on if you want to verify existing schema"), + METASTORE_STORE_MANAGER_TYPE("datanucleus.storeManagerType", "rdbms", "metadata store type"), + METASTORE_AUTO_CREATE_SCHEMA("datanucleus.autoCreateSchema", true, + "creates necessary schema on a startup if one doesn't exist. set this to false, after creating it once"), + METASTORE_FIXED_DATASTORE("datanucleus.fixedDatastore", false, ""), + METASTORE_SCHEMA_VERIFICATION("hive.metastore.schema.verification", false, + "Enforce metastore schema version consistency.\n" + + "True: Verify that version information stored in metastore matches with one from Hive jars. Also disable automatic\n" + + " schema migration attempt. Users are required to manually migrate schema after Hive upgrade which ensures\n" + + " proper metastore schema migration. (Default)\n" + + "False: Warn if the version information stored in metastore doesn't match with one from in Hive jars."), + METASTORE_AUTO_START_MECHANISM_MODE("datanucleus.autoStartMechanismMode", "checked", + "throw exception if metadata tables are incorrect"), + METASTORE_TRANSACTION_ISOLATION("datanucleus.transactionIsolation", "read-committed", + "Default transaction isolation level for identity generation."), + METASTORE_CACHE_LEVEL2("datanucleus.cache.level2", false, + "Use a level 2 cache. Turn this off if metadata is changed independently of Hive metastore server"), + METASTORE_CACHE_LEVEL2_TYPE("datanucleus.cache.level2.valType", "none", ""), + METASTORE_IDENTIFIER_FACTORY("datanucleus.identifierFactory", "datanucleus1", + "Name of the identifier factory to use when generating table/column names etc. \n" + + "'datanucleus1' is used for backward compatibility with DataNucleus v1"), + METASTORE_USE_LEGACY_VALUE_STRATEGY("datanucleus.rdbms.useLegacyNativeValueStrategy", true, ""), + METASTORE_PLUGIN_REGISTRY_BUNDLE_CHECK("datanucleus.plugin.pluginRegistryBundleCheck", "LOG", + "Defines what happens when plugin bundles are found and are duplicated [EXCEPTION|LOG|NONE]"), + METASTORE_BATCH_RETRIEVE_MAX("hive.metastore.batch.retrieve.max", 300, + "Maximum number of objects (tables/partitions) can be retrieved from metastore in one batch. \n" + + "The higher the number, the less the number of round trips is needed to the Hive metastore server, \n" + + "but it may also cause higher memory requirement at the client side."), METASTORE_BATCH_RETRIEVE_TABLE_PARTITION_MAX( - "hive.metastore.batch.retrieve.table.partition.max", 1000), - // A comma separated list of hooks which implement MetaStoreInitListener and will be run at - // the beginning of HMSHandler initialization - METASTORE_INIT_HOOKS("hive.metastore.init.hooks", ""), - METASTORE_PRE_EVENT_LISTENERS("hive.metastore.pre.event.listeners", ""), - METASTORE_EVENT_LISTENERS("hive.metastore.event.listeners", ""), - // should we do checks against the storage (usually hdfs) for operations like drop_partition - METASTORE_AUTHORIZATION_STORAGE_AUTH_CHECKS("hive.metastore.authorization.storage.checks", false), - METASTORE_EVENT_CLEAN_FREQ("hive.metastore.event.clean.freq",0L), - METASTORE_EVENT_EXPIRY_DURATION("hive.metastore.event.expiry.duration",0L), - METASTORE_EXECUTE_SET_UGI("hive.metastore.execute.setugi", false), - METASTORE_PARTITION_NAME_WHITELIST_PATTERN( - "hive.metastore.partition.name.whitelist.pattern", ""), - // Whether to enable integral JDO pushdown. For partition columns storing integers - // in non-canonical form, (e.g. '012'), it may not work, so it's off by default. - METASTORE_INTEGER_JDO_PUSHDOWN("hive.metastore.integral.jdo.pushdown", false), - METASTORE_TRY_DIRECT_SQL("hive.metastore.try.direct.sql", true), - METASTORE_TRY_DIRECT_SQL_DDL("hive.metastore.try.direct.sql.ddl", true), + "hive.metastore.batch.retrieve.table.partition.max", 1000, + "Maximum number of table partitions that metastore internally retrieves in one batch."), + + METASTORE_INIT_HOOKS("hive.metastore.init.hooks", "", + "A comma separated list of hooks to be invoked at the beginning of HMSHandler initialization. \n" + + "An init hook is specified as the name of Java class which extends org.apache.hadoop.hive.metastore.MetaStoreInitListener."), + METASTORE_PRE_EVENT_LISTENERS("hive.metastore.pre.event.listeners", "", + "List of comma separated listeners for metastore events."), + METASTORE_EVENT_LISTENERS("hive.metastore.event.listeners", "", ""), + METASTORE_AUTHORIZATION_STORAGE_AUTH_CHECKS("hive.metastore.authorization.storage.checks", false, + "Should the metastore do authorization checks against the underlying storage (usually hdfs) \n" + + "for operations like drop-partition (disallow the drop-partition if the user in\n" + + "question doesn't have permissions to delete the corresponding directory\n" + + "on the storage).\n"), + METASTORE_EVENT_CLEAN_FREQ("hive.metastore.event.clean.freq", 0L, + "Frequency at which timer task runs to purge expired events in metastore(in seconds)."), + METASTORE_EVENT_EXPIRY_DURATION("hive.metastore.event.expiry.duration", 0L, + "Duration after which events expire from events table (in seconds)"), + METASTORE_EXECUTE_SET_UGI("hive.metastore.execute.setugi", false, + "In unsecure mode, setting this property to true will cause the metastore to execute DFS operations using \n" + + "the client's reported user and group permissions. Note that this property must be set on " + + "both the client and server sides. Further note that its best effort. \n" + + "If client sets its to true and server sets it to false, client setting will be ignored."), + METASTORE_PARTITION_NAME_WHITELIST_PATTERN("hive.metastore.partition.name.whitelist.pattern", "", + "Partition names will be checked against this regex pattern and rejected if not matched."), + + METASTORE_INTEGER_JDO_PUSHDOWN("hive.metastore.integral.jdo.pushdown", false, + "Allow JDO query pushdown for integral partition columns in metastore. Off by default. This\n" + + "improves metastore perf for integral columns, especially if there's a large number of partitions.\n" + + "However, it doesn't work correctly with integral values that are not normalized (e.g. have\n" + + "leading zeroes, like 0012). If metastore direct SQL is enabled and works, this optimization\n" + + "is also irrelevant."), + METASTORE_TRY_DIRECT_SQL("hive.metastore.try.direct.sql", true, ""), + METASTORE_TRY_DIRECT_SQL_DDL("hive.metastore.try.direct.sql.ddl", true, ""), METASTORE_DISALLOW_INCOMPATIBLE_COL_TYPE_CHANGES( - "hive.metastore.disallow.incompatible.col.type.changes", false), - - // Default parameters for creating tables - NEWTABLEDEFAULTPARA("hive.table.parameters.default", ""), - // Parameters to copy over when creating a table with Create Table Like. - DDL_CTL_PARAMETERS_WHITELIST("hive.ddl.createtablelike.properties.whitelist", ""), - METASTORE_RAW_STORE_IMPL("hive.metastore.rawstore.impl", - "org.apache.hadoop.hive.metastore.ObjectStore"), - METASTORE_CONNECTION_DRIVER("javax.jdo.option.ConnectionDriverName", - "org.apache.derby.jdbc.EmbeddedDriver"), + "hive.metastore.disallow.incompatible.col.type.changes", false, + "If true (default is false), ALTER TABLE operations which change the type of \n" + + "a column (say STRING) to an incompatible type (say MAP<STRING, STRING>) are disallowed. \n" + + "RCFile default SerDe (ColumnarSerDe) serializes the values in such a way that the\n" + + "datatypes can be converted from string to any type. The map is also serialized as\n" + + "a string, which can be read as a string as well. However, with any binary \n" + + "serialization, this is not true. Blocking the ALTER TABLE prevents ClassCastExceptions\n" + + "when subsequently trying to access old partitions. \n" + + "\n" + + "Primitive types like INT, STRING, BIGINT, etc are compatible with each other and are \n" + + "not blocked. \n" + + "\n" + + "See HIVE-4409 for more details."), + + NEWTABLEDEFAULTPARA("hive.table.parameters.default", "", + "Default property values for newly created tables"), + DDL_CTL_PARAMETERS_WHITELIST("hive.ddl.createtablelike.properties.whitelist", "", + "Table Properties to copy over when executing a Create Table Like."), + METASTORE_RAW_STORE_IMPL("hive.metastore.rawstore.impl", "org.apache.hadoop.hive.metastore.ObjectStore", + "Name of the class that implements org.apache.hadoop.hive.metastore.rawstore interface. \n" + + "This class is used to store and retrieval of raw metadata objects such as table, database"), + METASTORE_CONNECTION_DRIVER("javax.jdo.option.ConnectionDriverName", "org.apache.derby.jdbc.EmbeddedDriver", + "Driver class name for a JDBC metastore"), METASTORE_MANAGER_FACTORY_CLASS("javax.jdo.PersistenceManagerFactoryClass", - "org.datanucleus.api.jdo.JDOPersistenceManagerFactory"), + "org.datanucleus.api.jdo.JDOPersistenceManagerFactory", + "class implementing the jdo persistence"), METASTORE_EXPRESSION_PROXY_CLASS("hive.metastore.expression.proxy", - "org.apache.hadoop.hive.ql.optimizer.ppr.PartitionExpressionForMetastore"), - METASTORE_DETACH_ALL_ON_COMMIT("javax.jdo.option.DetachAllOnCommit", true), - METASTORE_NON_TRANSACTIONAL_READ("javax.jdo.option.NonTransactionalRead", true), - METASTORE_CONNECTION_USER_NAME("javax.jdo.option.ConnectionUserName", "APP"), - METASTORE_END_FUNCTION_LISTENERS("hive.metastore.end.function.listeners", ""), - METASTORE_PART_INHERIT_TBL_PROPS("hive.metastore.partition.inherit.table.properties",""), + "org.apache.hadoop.hive.ql.optimizer.ppr.PartitionExpressionForMetastore", ""), + METASTORE_DETACH_ALL_ON_COMMIT("javax.jdo.option.DetachAllOnCommit", true, + "Detaches all objects from session so that they can be used after transaction is committed"), + METASTORE_NON_TRANSACTIONAL_READ("javax.jdo.option.NonTransactionalRead", true, + "Reads outside of transactions"), + METASTORE_CONNECTION_USER_NAME("javax.jdo.option.ConnectionUserName", "APP", + "Username to use against metastore database"), + METASTORE_END_FUNCTION_LISTENERS("hive.metastore.end.function.listeners", "", + "List of comma separated listeners for the end of metastore functions."), + METASTORE_PART_INHERIT_TBL_PROPS("hive.metastore.partition.inherit.table.properties", "", + "List of comma separated keys occurring in table properties which will get inherited to newly created partitions. \n" + + "* implies all the keys will get inherited."), // Parameters for exporting metadata on table drop (requires the use of the) // org.apache.hadoop.hive.ql.parse.MetaDataExportListener preevent listener - METADATA_EXPORT_LOCATION("hive.metadata.export.location", ""), - MOVE_EXPORTED_METADATA_TO_TRASH("hive.metadata.move.exported.metadata.to.trash", true), + METADATA_EXPORT_LOCATION("hive.metadata.export.location", "", + "When used in conjunction with the org.apache.hadoop.hive.ql.parse.MetaDataExportListener pre event listener, \n" + + "it is the location to which the metadata will be exported. The default is an empty string, which results in the \n" + + "metadata being exported to the current user's home directory on HDFS."), + MOVE_EXPORTED_METADATA_TO_TRASH("hive.metadata.move.exported.metadata.to.trash", true, + "When used in conjunction with the org.apache.hadoop.hive.ql.parse.MetaDataExportListener pre event listener, \n" + + "this setting determines if the metadata that is exported will subsequently be moved to the user's trash directory \n" + + "alongside the dropped table data. This ensures that the metadata will be cleaned up along with the dropped table data."), // CLI - CLIIGNOREERRORS("hive.cli.errors.ignore", false), - CLIPRINTCURRENTDB("hive.cli.print.current.db", false), - CLIPROMPT("hive.cli.prompt", "hive"), - CLIPRETTYOUTPUTNUMCOLS("hive.cli.pretty.output.num.cols", -1), - - HIVE_METASTORE_FS_HANDLER_CLS("hive.metastore.fs.handler.class", "org.apache.hadoop.hive.metastore.HiveMetaStoreFsImpl"), + CLIIGNOREERRORS("hive.cli.errors.ignore", false, ""), + CLIPRINTCURRENTDB("hive.cli.print.current.db", false, + "Whether to include the current database in the Hive prompt."), + CLIPROMPT("hive.cli.prompt", "hive", + "Command line prompt configuration value. Other hiveconf can be used in this configuration value. \n" + + "Variable substitution will only be invoked at the Hive CLI startup."), + CLIPRETTYOUTPUTNUMCOLS("hive.cli.pretty.output.num.cols", -1, + "The number of columns to use when formatting output generated by the DESCRIBE PRETTY table_name command.\n" + + "If the value of this property is -1, then Hive will use the auto-detected terminal width."), + + HIVE_METASTORE_FS_HANDLER_CLS("hive.metastore.fs.handler.class", "org.apache.hadoop.hive.metastore.HiveMetaStoreFsImpl", ""), // Things we log in the jobconf // session identifier - HIVESESSIONID("hive.session.id", ""), + HIVESESSIONID("hive.session.id", "", ""), // whether session is running in silent mode or not - HIVESESSIONSILENT("hive.session.silent", false), + HIVESESSIONSILENT("hive.session.silent", false, ""), - // Whether to enable history for this session - HIVE_SESSION_HISTORY_ENABLED("hive.session.history.enabled", false), + HIVE_SESSION_HISTORY_ENABLED("hive.session.history.enabled", false, + "Whether to log Hive query, query plan, runtime statistics etc."), - // query being executed (multiple per session) - HIVEQUERYSTRING("hive.query.string", ""), + HIVEQUERYSTRING("hive.query.string", "", + "Query being executed (might be multiple per a session)"), - // id of query being executed (multiple per session) - HIVEQUERYID("hive.query.id", ""), + HIVEQUERYID("hive.query.id", "", + "ID for query being executed (might be multiple per a session)"), - // id of the mapred plan being executed (multiple per query) - HIVEPLANID("hive.query.planid", ""), - // max jobname length - HIVEJOBNAMELENGTH("hive.jobname.length", 50), + HIVEJOBNAMELENGTH("hive.jobname.length", 50, "max jobname length"), // hive jar - HIVEJAR("hive.jar.path", ""), - HIVEAUXJARS("hive.aux.jars.path", ""), + HIVEJAR("hive.jar.path", "", ""), + HIVEAUXJARS("hive.aux.jars.path", "", ""), // hive added files and jars - HIVEADDEDFILES("hive.added.files.path", ""), - HIVEADDEDJARS("hive.added.jars.path", ""), - HIVEADDEDARCHIVES("hive.added.archives.path", ""), + HIVEADDEDFILES("hive.added.files.path", "", ""), + HIVEADDEDJARS("hive.added.jars.path", "", ""), + HIVEADDEDARCHIVES("hive.added.archives.path", "", ""), - HIVE_CURRENT_DATABASE("hive.current.database", ""), // internal usage only + HIVE_CURRENT_DATABASE("hive.current.database", "", "current database for current query. internal usage only"), // for hive script operator - HIVES_AUTO_PROGRESS_TIMEOUT("hive.auto.progress.timeout", 0), - HIVETABLENAME("hive.table.name", ""), - HIVEPARTITIONNAME("hive.partition.name", ""), - HIVESCRIPTAUTOPROGRESS("hive.script.auto.progress", false), - HIVESCRIPTIDENVVAR("hive.script.operator.id.env.var", "HIVE_SCRIPT_OPERATOR_ID"), - HIVESCRIPTTRUNCATEENV("hive.script.operator.truncate.env", false), - HIVEMAPREDMODE("hive.mapred.mode", "nonstrict"), - HIVEALIAS("hive.alias", ""), - HIVEMAPSIDEAGGREGATE("hive.map.aggr", true), - HIVEGROUPBYSKEW("hive.groupby.skewindata", false), - HIVE_OPTIMIZE_MULTI_GROUPBY_COMMON_DISTINCTS("hive.optimize.multigroupby.common.distincts", - true), - HIVEJOINEMITINTERVAL("hive.join.emit.interval", 1000), - HIVEJOINCACHESIZE("hive.join.cache.size", 25000), + HIVES_AUTO_PROGRESS_TIMEOUT("hive.auto.progress.timeout", 0, + "How long to run autoprogressor for the script/UDTF operators (in seconds).\n" + + "Set to 0 for forever."), + HIVETABLENAME("hive.table.name", "", ""), + HIVEPARTITIONNAME("hive.partition.name", "", ""), + HIVESCRIPTAUTOPROGRESS("hive.script.auto.progress", false, + "Whether Hive Transform/Map/Reduce Clause should automatically send progress information to TaskTracker \n" + + "to avoid the task getting killed because of inactivity. Hive sends progress information when the script is \n" + + "outputting to stderr. This option removes the need of periodically producing stderr messages, \n" + + "but users should be cautious because this may prevent infinite loops in the scripts to be killed by TaskTracker."), + HIVESCRIPTIDENVVAR("hive.script.operator.id.env.var", "HIVE_SCRIPT_OPERATOR_ID", + "Name of the environment variable that holds the unique script operator ID in the user's \n" + + "transform function (the custom mapper/reducer that the user has specified in the query)"), + HIVESCRIPTTRUNCATEENV("hive.script.operator.truncate.env", false, + "Truncate each environment variable for external script in scripts operator to 20KB (to fit system limits)"), + HIVEMAPREDMODE("hive.mapred.mode", "nonstrict", + "The mode in which the Hive operations are being performed. \n" + + "In strict mode, some risky queries are not allowed to run. They include:\n" + + " Cartesian Product.\n" + + " No partition being picked up for a query.\n" + + " Comparing bigints and strings.\n" + + " Comparing bigints and doubles.\n" + + " Orderby without limit."), + HIVEALIAS("hive.alias", "", ""), + HIVEMAPSIDEAGGREGATE("hive.map.aggr", true, "Whether to use map-side aggregation in Hive Group By queries"), + HIVEGROUPBYSKEW("hive.groupby.skewindata", false, "Whether there is skew in data to optimize group by queries"), + HIVE_OPTIMIZE_MULTI_GROUPBY_COMMON_DISTINCTS("hive.optimize.multigroupby.common.distincts", true, + "Whether to optimize a multi-groupby query with the same distinct.\n" + + "Consider a query like:\n" + + "\n" + + " from src\n" + + " insert overwrite table dest1 select col1, count(distinct colx) group by col1\n" + + " insert overwrite table dest2 select col2, count(distinct colx) group by col2;\n" + + "\n" + + "With this parameter set to true, first we spray by the distinct value (colx), and then\n" + + "perform the 2 groups bys. This makes sense if map-side aggregation is turned off. However,\n" + + "with maps-side aggregation, it might be useful in some cases to treat the 2 inserts independently, \n" + + "thereby performing the query above in 2MR jobs instead of 3 (due to spraying by distinct key first).\n" + + "If this parameter is turned off, we don't consider the fact that the distinct key is the same across\n" + + "different MR jobs."), + HIVEJOINEMITINTERVAL("hive.join.emit.interval", 1000, + "How many rows in the right-most join operand Hive should buffer before emitting the join result."), + HIVEJOINCACHESIZE("hive.join.cache.size", 25000, + "How many rows in the joining tables (except the streaming table) should be cached in memory."), // hive.mapjoin.bucket.cache.size has been replaced by hive.smbjoin.cache.row, // need to remove by hive .13. Also, do not change default (see SMB operator) - HIVEMAPJOINBUCKETCACHESIZE("hive.mapjoin.bucket.cache.size", 100), - - HIVESMBJOINCACHEROWS("hive.smbjoin.cache.rows", 10000), - HIVEGROUPBYMAPINTERVAL("hive.groupby.mapaggr.checkinterval", 100000), - HIVEMAPAGGRHASHMEMORY("hive.map.aggr.hash.percentmemory", (float) 0.5), - HIVEMAPJOINFOLLOWEDBYMAPAGGRHASHMEMORY("hive.mapjoin.followby.map.aggr.hash.percentmemory", (float) 0.3), - HIVEMAPAGGRMEMORYTHRESHOLD("hive.map.aggr.hash.force.flush.memory.threshold", (float) 0.9), - HIVEMAPAGGRHASHMINREDUCTION("hive.map.aggr.hash.min.reduction", (float) 0.5), - HIVEMULTIGROUPBYSINGLEREDUCER("hive.multigroupby.singlereducer", true), - HIVE_MAP_GROUPBY_SORT("hive.map.groupby.sorted", false), - HIVE_MAP_GROUPBY_SORT_TESTMODE("hive.map.groupby.sorted.testmode", false), - HIVE_GROUPBY_ORDERBY_POSITION_ALIAS("hive.groupby.orderby.position.alias", false), - HIVE_NEW_JOB_GROUPING_SET_CARDINALITY("hive.new.job.grouping.set.cardinality", 30), + HIVEMAPJOINBUCKETCACHESIZE("hive.mapjoin.bucket.cache.size", 100, ""), + + HIVESMBJOINCACHEROWS("hive.smbjoin.cache.rows", 10000, + "How many rows with the same key value should be cached in memory per smb joined table."), + HIVEGROUPBYMAPINTERVAL("hive.groupby.mapaggr.checkinterval", 100000, + "Number of rows after which size of the grouping keys/aggregation classes is performed"), + HIVEMAPAGGRHASHMEMORY("hive.map.aggr.hash.percentmemory", (float) 0.5, + "Portion of total memory to be used by map-side group aggregation hash table"), + HIVEMAPJOINFOLLOWEDBYMAPAGGRHASHMEMORY("hive.mapjoin.followby.map.aggr.hash.percentmemory", (float) 0.3, + "Portion of total memory to be used by map-side group aggregation hash table, when this group by is followed by map join"), + HIVEMAPAGGRMEMORYTHRESHOLD("hive.map.aggr.hash.force.flush.memory.threshold", (float) 0.9, + "The max memory to be used by map-side group aggregation hash table, if the memory usage is higher than this number, force to flush data"), + HIVEMAPAGGRHASHMINREDUCTION("hive.map.aggr.hash.min.reduction", (float) 0.5, + "Hash aggregation will be turned off if the ratio between hash table size and input rows is bigger than this number. \n" + + "Set to 1 to make sure hash aggregation is never turned off."), + HIVEMULTIGROUPBYSINGLEREDUCER("hive.multigroupby.singlereducer", true, + "Whether to optimize multi group by query to generate single M/R job plan. If the multi group by query has \n" + + "common group by keys, it will be optimized to generate single M/R job."), + HIVE_MAP_GROUPBY_SORT("hive.map.groupby.sorted", false, + "If the bucketing/sorting properties of the table exactly match the grouping key, whether to perform \n" + + "the group by in the mapper by using BucketizedHiveInputFormat. The only downside to this\n" + + "is that it limits the number of mappers to the number of files."), + HIVE_MAP_GROUPBY_SORT_TESTMODE("hive.map.groupby.sorted.testmode", false, + "If the bucketing/sorting properties of the table exactly match the grouping key, whether to perform \n" + + "the group by in the mapper by using BucketizedHiveInputFormat. If the test mode is set, the plan\n" + + "is not converted, but a query property is set to denote the same."), + HIVE_GROUPBY_ORDERBY_POSITION_ALIAS("hive.groupby.orderby.position.alias", false, + "Whether to enable using Column Position Alias in Group By or Order By"), + HIVE_NEW_JOB_GROUPING_SET_CARDINALITY("hive.new.job.grouping.set.cardinality", 30, + "Whether a new map-reduce job should be launched for grouping sets/rollups/cubes.\n" + + "For a query like: select a, b, c, count(1) from T group by a, b, c with rollup;\n" + + "4 rows are created per row: (a, b, c), (a, b, null), (a, null, null), (null, null, null).\n" + + "This can lead to explosion across map-reduce boundary if the cardinality of T is very high,\n" + + "and map-side aggregation does not do a very good job. \n" + + "\n" + + "This parameter decides if Hive should add an additional map-reduce job. If the grouping set\n" + + "cardinality (4 in the example above), is more than this value, a new MR job is added under the\n" + + "assumption that the original group by will reduce the data size."), // for hive udtf operator - HIVEUDTFAUTOPROGRESS("hive.udtf.auto.progress", false), + HIVEUDTFAUTOPROGRESS("hive.udtf.auto.progress", false, + "Whether Hive should automatically send progress information to TaskTracker \n" + + "when using UDTF's to prevent the task getting killed because of inactivity. Users should be cautious \n" + + "because this may prevent TaskTracker from killing tasks with infinite loops."), - // Default file format for CREATE TABLE statement - // Options: TextFile, SequenceFile - HIVEDEFAULTFILEFORMAT("hive.default.fileformat", "TextFile", - new StringsValidator("TextFile", "SequenceFile", "RCfile", "ORC")), - HIVEQUERYRESULTFILEFORMAT("hive.query.result.fileformat", "TextFile", - new StringsValidator("TextFile", "SequenceFile", "RCfile")), - HIVECHECKFILEFORMAT("hive.fileformat.check", true), + HIVEDEFAULTFILEFORMAT("hive.default.fileformat", "TextFile", new StringSet("TextFile", "SequenceFile", "RCfile", "ORC"), + "Default file format for CREATE TABLE statement. \n" + + "Options are TextFile and SequenceFile. Users can explicitly say CREATE TABLE ... STORED AS to override"), + HIVEQUERYRESULTFILEFORMAT("hive.query.result.fileformat", "TextFile", new StringSet("TextFile", "SequenceFile", "RCfile"), ""), + HIVECHECKFILEFORMAT("hive.fileformat.check", true, "Whether to check file format or not when loading data files"), // default serde for rcfile HIVEDEFAULTRCFILESERDE("hive.default.rcfile.serde", - "org.apache.hadoop.hive.serde2.columnar.LazyBinaryColumnarSerDe"), - - //Location of Hive run time structured log file - HIVEHISTORYFILELOC("hive.querylog.location", System.getProperty("java.io.tmpdir") + File.separator + System.getProperty("user.name")), - - // Whether to log the plan's progress every time a job's progress is checked - HIVE_LOG_INCREMENTAL_PLAN_PROGRESS("hive.querylog.enable.plan.progress", true), - - // The interval between logging the plan's progress in milliseconds - HIVE_LOG_INCREMENTAL_PLAN_PROGRESS_INTERVAL("hive.querylog.plan.progress.interval", 60000L), - - // Default serde and record reader for user scripts - HIVESCRIPTSERDE("hive.script.serde", "org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe"), + "org.apache.hadoop.hive.serde2.columnar.LazyBinaryColumnarSerDe", + "The default SerDe Hive will use for the RCFile format"), + + HIVEHISTORYFILELOC("hive.querylog.location", + System.getProperty("java.io.tmpdir") + File.separator + System.getProperty("user.name"), + "Location of Hive run time structured log file"), + + HIVE_LOG_INCREMENTAL_PLAN_PROGRESS("hive.querylog.enable.plan.progress", true, + "Whether to log the plan's progress every time a job's progress is checked.\n" + + "These logs are written to the location specified by hive.querylog.location"), + + HIVE_LOG_INCREMENTAL_PLAN_PROGRESS_INTERVAL("hive.querylog.plan.progress.interval", 60000L, + "The interval to wait between logging the plan's progress in milliseconds.\n" + + "If there is a whole number percentage change in the progress of the mappers or the reducers,\n" + + "the progress is logged regardless of this value.\n" + + "The actual interval will be the ceiling of (this value divided by the value of\n" + + "hive.exec.counters.pull.interval) multiplied by the value of hive.exec.counters.pull.interval\n" + + "I.e. if it is not divide evenly by the value of hive.exec.counters.pull.interval it will be\n" + + "logged less frequently than specified.\n" + + "This only has an effect if hive.querylog.enable.plan.progress is set to true."), + + HIVESCRIPTSERDE("hive.script.serde", "org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe", + "The default SerDe for transmitting input data to and reading output data from the user scripts. "), HIVESCRIPTRECORDREADER("hive.script.recordreader", - "org.apache.hadoop.hive.ql.exec.TextRecordReader"), + "org.apache.hadoop.hive.ql.exec.TextRecordReader", + "The default record reader for reading data from the user scripts. "), HIVESCRIPTRECORDWRITER("hive.script.recordwriter", - "org.apache.hadoop.hive.ql.exec.TextRecordWriter"), - HIVESCRIPTESCAPE("hive.transform.escape.input", false), - HIVEBINARYRECORDMAX("hive.binary.record.max.length", 1000 ), + "org.apache.hadoop.hive.ql.exec.TextRecordWriter", + "The default record writer for writing data to the user scripts. "), + HIVESCRIPTESCAPE("hive.transform.escape.input", false, + "This adds an option to escape special chars (newlines, carriage returns and\n" + + "tabs) when they are passed to the user script. This is useful if the Hive tables\n" + + "can contain data that contains special characters."), + HIVEBINARYRECORDMAX("hive.binary.record.max.length", 1000, + "Read from a binary stream and treat each hive.binary.record.max.length bytes as a record. \n" + + "The last record before the end of stream can have less than hive.binary.record.max.length bytes"), // HWI - HIVEHWILISTENHOST("hive.hwi.listen.host", "0.0.0.0"), - HIVEHWILISTENPORT("hive.hwi.listen.port", "9999"), - HIVEHWIWARFILE("hive.hwi.war.file", System.getenv("HWI_WAR_FILE")), + HIVEHWILISTENHOST("hive.hwi.listen.host", "0.0.0.0", "This is the host address the Hive Web Interface will listen on"), + HIVEHWILISTENPORT("hive.hwi.listen.port", "9999", "This is the port the Hive Web Interface will listen on"), + HIVEHWIWARFILE("hive.hwi.war.file", System.getenv("HWI_WAR_FILE"), + "This sets the path to the HWI war file, relative to ${HIVE_HOME}. "), - // mapper/reducer memory in local mode - HIVEHADOOPMAXMEM("hive.mapred.local.mem", 0), + HIVEHADOOPMAXMEM("hive.mapred.local.mem", 0, "mapper/reducer memory in local mode"), //small table file size - HIVESMALLTABLESFILESIZE("hive.mapjoin.smalltable.filesize",25000000L), //25M + HIVESMALLTABLESFILESIZE("hive.mapjoin.smalltable.filesize", 25000000L, + "The threshold for the input file size of the small tables; if the file size is smaller \n" + + "than this threshold, it will try to convert the common join into map join"), - // random number for split sampling - HIVESAMPLERANDOMNUM("hive.sample.seednumber", 0), + HIVESAMPLERANDOMNUM("hive.sample.seednumber", 0, + "A number used to percentage sampling. By changing this number, user will change the subsets of data sampled."), // test mode in hive mode - HIVETESTMODE("hive.test.mode", false), - HIVETESTMODEPREFIX("hive.test.mode.prefix", "test_"), - HIVETESTMODESAMPLEFREQ("hive.test.mode.samplefreq", 32), - HIVETESTMODENOSAMPLE("hive.test.mode.nosamplelist", ""), - - HIVEMERGEMAPFILES("hive.merge.mapfiles", true), - HIVEMERGEMAPREDFILES("hive.merge.mapredfiles", false), - HIVEMERGEMAPFILESSIZE("hive.merge.size.per.task", (long) (256 * 1000 * 1000)), - HIVEMERGEMAPFILESAVGSIZE("hive.merge.smallfiles.avgsize", (long) (16 * 1000 * 1000)), - HIVEMERGERCFILEBLOCKLEVEL("hive.merge.rcfile.block.level", true), + HIVETESTMODE("hive.test.mode", false, + "Whether Hive is running in test mode. If yes, it turns on sampling and prefixes the output tablename."), + HIVETESTMODEPREFIX("hive.test.mode.prefix", "test_", + "In test mode, specfies prefixes for the output table"), + HIVETESTMODESAMPLEFREQ("hive.test.mode.samplefreq", 32, + "In test mode, specfies sampling frequency for table, which is not bucketed,\n" + + "For example, the following query:" + + " INSERT OVERWRITE TABLE dest" + + " SELECT col1 from src" + + "would be converted to" + + " INSERT OVERWRITE TABLE test_dest" + + " SELECT col1 from src TABLESAMPLE (BUCKET 1 out of 32 on rand(1))"), + HIVETESTMODENOSAMPLE("hive.test.mode.nosamplelist", "", + "In test mode, specifies comma separated table names which would not apply sampling"), + + HIVEMERGEMAPFILES("hive.merge.mapfiles", true, + "Merge small files at the end of a map-only job"), + HIVEMERGEMAPREDFILES("hive.merge.mapredfiles", false, + "Merge small files at the end of a map-reduce job"), + HIVEMERGEMAPFILESSIZE("hive.merge.size.per.task", (long) (256 * 1000 * 1000), + "Size of merged files at the end of the job"), + HIVEMERGEMAPFILESAVGSIZE("hive.merge.smallfiles.avgsize", (long) (16 * 1000 * 1000), + "When the average output file size of a job is less than this number, Hive will start an additional \n" + + "map-reduce job to merge the output files into bigger files. This is only done for map-only jobs \n" + + "if hive.merge.mapfiles is true, and for map-reduce jobs if hive.merge.mapredfiles is true."), + HIVEMERGERCFILEBLOCKLEVEL("hive.merge.rcfile.block.level", true, ""), HIVEMERGEINPUTFORMATBLOCKLEVEL("hive.merge.input.format.block.level", - "org.apache.hadoop.hive.ql.io.rcfile.merge.RCFileBlockMergeInputFormat"), + "org.apache.hadoop.hive.ql.io.rcfile.merge.RCFileBlockMergeInputFormat", ""), HIVEMERGECURRENTJOBHASDYNAMICPARTITIONS( - "hive.merge.current.job.has.dynamic.partitions", false), - - HIVEUSEEXPLICITRCFILEHEADER("hive.exec.rcfile.use.explicit.header", true), - HIVEUSERCFILESYNCCACHE("hive.exec.rcfile.use.sync.cache", true), - - // Maximum fraction of heap that can be used by ORC file writers - HIVE_ORC_FILE_MEMORY_POOL("hive.exec.orc.memory.pool", 0.5f), // 50% - // Define the version of the file to write - HIVE_ORC_WRITE_FORMAT("hive.exec.orc.write.format", null), - // Define the default ORC stripe size + "hive.merge.current.job.has.dynamic.partitions", false, ""), + + HIVEUSEEXPLICITRCFILEHEADER("hive.exec.rcfile.use.explicit.header", true, + "If this is set the header for RCFiles will simply be RCF. If this is not\n" + + "set the header will be that borrowed from sequence files, e.g. SEQ- followed\n" + + "by the input and output RCFile formats."), + HIVEUSERCFILESYNCCACHE("hive.exec.rcfile.use.sync.cache", true, ""), + + HIVE_ORC_FILE_MEMORY_POOL("hive.exec.orc.memory.pool", 0.5f, + "Maximum fraction of heap that can be used by ORC file writers"), + HIVE_ORC_WRITE_FORMAT("hive.exec.orc.write.format", "", + "Define the version of the file to write"), HIVE_ORC_DEFAULT_STRIPE_SIZE("hive.exec.orc.default.stripe.size", - 256L * 1024 * 1024), - - HIVE_ORC_DICTIONARY_KEY_SIZE_THRESHOLD("hive.exec.orc.dictionary.key.size.threshold", 0.8f), - - HIVE_ORC_INCLUDE_FILE_FOOTER_IN_SPLITS("hive.orc.splits.include.file.footer", false), - HIVE_ORC_CACHE_STRIPE_DETAILS_SIZE("hive.orc.cache.stripe.details.size", 10000), - HIVE_ORC_COMPUTE_SPLITS_NUM_THREADS("hive.orc.compute.splits.num.threads", 10), - - HIVESKEWJOIN("hive.optimize.skewjoin", false), - HIVECONVERTJOIN("hive.auto.convert.join", true), - HIVECONVERTJOINNOCONDITIONALTASK("hive.auto.convert.join.noconditionaltask", true), + 256L * 1024 * 1024, + "Define the default ORC stripe size"), + + HIVE_ORC_DICTIONARY_KEY_SIZE_THRESHOLD("hive.exec.orc.dictionary.key.size.threshold", 0.8f, + "If the number of keys in a dictionary is greater than this fraction of the total number of\n" + + "non-null rows, turn off dictionary encoding. Use 1 to always use dictionary encoding."), + + HIVE_ORC_INCLUDE_FILE_FOOTER_IN_SPLITS("hive.orc.splits.include.file.footer", false, + "If turned on splits generated by orc will include metadata about the stripes in the file. This\n" + + "data is read remotely (from the client or HS2 machine) and sent to all the tasks."), + HIVE_ORC_CACHE_STRIPE_DETAILS_SIZE("hive.orc.cache.stripe.details.size", 10000, + "Cache size for keeping meta info about orc splits cached in the client."), + HIVE_ORC_COMPUTE_SPLITS_NUM_THREADS("hive.orc.compute.splits.num.threads", 10, + "How many threads orc should use to create splits in parallel."), + + HIVESKEWJOIN("hive.optimize.skewjoin", false, + "Whether to enable skew join optimization. \n" + + "The algorithm is as follows: At runtime, detect the keys with a large skew. Instead of\n" + + "processing those keys, store them temporarily in an HDFS directory. In a follow-up map-reduce\n" + + "job, process those skewed keys. The same key need not be skewed for all the tables, and so,\n" + + "the follow-up map-reduce job (for the skewed keys) would be much faster, since it would be a\n" + + "map-join."), + HIVECONVERTJOIN("hive.auto.convert.join", true, + "Whether Hive enables the optimization about converting common join into mapjoin based on the input file size"), + HIVECONVERTJOINNOCONDITIONALTASK("hive.auto.convert.join.noconditionaltask", true, + "Whether Hive enables the optimization about converting common join into mapjoin based on the input file size. \n" + + "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" + + "specified size, the join is directly converted to a mapjoin (there is no conditional task)."), HIVECONVERTJOINNOCONDITIONALTASKTHRESHOLD("hive.auto.convert.join.noconditionaltask.size", - 10000000L), - HIVECONVERTJOINUSENONSTAGED("hive.auto.convert.join.use.nonstaged", true), - HIVESKEWJOINKEY("hive.skewjoin.key", 100000), - HIVESKEWJOINMAPJOINNUMMAPTASK("hive.skewjoin.mapjoin.map.tasks", 10000), - HIVESKEWJOINMAPJOINMINSPLIT("hive.skewjoin.mapjoin.min.split", 33554432L), //32M - - HIVESENDHEARTBEAT("hive.heartbeat.interval", 1000), - HIVELIMITMAXROWSIZE("hive.limit.row.max.size", 100000L), - HIVELIMITOPTLIMITFILE("hive.limit.optimize.limit.file", 10), - HIVELIMITOPTENABLE("hive.limit.optimize.enable", false), - HIVELIMITOPTMAXFETCH("hive.limit.optimize.fetch.max", 50000), - HIVELIMITPUSHDOWNMEMORYUSAGE("hive.limit.pushdown.memory.usage", -1f), - - HIVEHASHTABLETHRESHOLD("hive.hashtable.initialCapacity", 100000), - HIVEHASHTABLELOADFACTOR("hive.hashtable.loadfactor", (float) 0.75), - HIVEHASHTABLEFOLLOWBYGBYMAXMEMORYUSAGE("hive.mapjoin.followby.gby.localtask.max.memory.usage", (float) 0.55), - HIVEHASHTABLEMAXMEMORYUSAGE("hive.mapjoin.localtask.max.memory.usage", (float) 0.90), - HIVEHASHTABLESCALE("hive.mapjoin.check.memory.rows", (long)100000), - - HIVEDEBUGLOCALTASK("hive.debug.localtask",false), - - HIVEINPUTFORMAT("hive.input.format", "org.apache.hadoop.hive.ql.io.CombineHiveInputFormat"), - - HIVEENFORCEBUCKETING("hive.enforce.bucketing", false), - HIVEENFORCESORTING("hive.enforce.sorting", false), - HIVEOPTIMIZEBUCKETINGSORTING("hive.optimize.bucketingsorting", true), - HIVEPARTITIONER("hive.mapred.partitioner", "org.apache.hadoop.hive.ql.io.DefaultHivePartitioner"), - HIVEENFORCESORTMERGEBUCKETMAPJOIN("hive.enforce.sortmergebucketmapjoin", false), - HIVEENFORCEBUCKETMAPJOIN("hive.enforce.bucketmapjoin", false), - - HIVE_AUTO_SORTMERGE_JOIN("hive.auto.convert.sortmerge.join", false), + 10000000L, + "If hive.auto.convert.join.noconditionaltask is off, this parameter does not take affect. \n" + + "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" + + "the join is directly converted to a mapjoin(there is no conditional task). The default is 10MB"), + HIVECONVERTJOINUSENONSTAGED("hive.auto.convert.join.use.nonstaged", true, + "For conditional joins, if input stream from a small alias can be directly applied to join operator without \n" + + "filtering or projection, the alias need not to be pre-staged in distributed cache via mapred local task.\n" + + "Currently, this is not working with vectorization or tez execution engine."), + HIVESKEWJOINKEY("hive.skewjoin.key", 100000, + "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" + + "we think the key as a skew join key. "), + HIVESKEWJOINMAPJOINNUMMAPTASK("hive.skewjoin.mapjoin.map.tasks", 10000, + "Determine the number of map task used in the follow up map join job for a skew join.\n" + + "It should be used together with hive.skewjoin.mapjoin.min.split to perform a fine grained control."), + HIVESKEWJOINMAPJOINMINSPLIT("hive.skewjoin.mapjoin.min.split", 33554432L, + "Determine the number of map task at most used in the follow up map join job for a skew join by specifying \n" + + "the minimum split size. It should be used together with hive.skewjoin.mapjoin.map.tasks to perform a fine grained control."), + + HIVESENDHEARTBEAT("hive.heartbeat.interval", 1000, + "Send a heartbeat after this interval - used by mapjoin and filter operators"), + HIVELIMITMAXROWSIZE("hive.limit.row.max.size", 100000L, + "When trying a smaller subset of data for simple LIMIT, how much size we need to guarantee each row to have at least."), + HIVELIMITOPTLIMITFILE("hive.limit.optimize.limit.file", 10, + "When trying a smaller subset of data for simple LIMIT, maximum number of files we can sample."), + HIVELIMITOPTENABLE("hive.limit.optimize.enable", false, + "Whether to enable to optimization to trying a smaller subset of data for simple LIMIT first."), + HIVELIMITOPTMAXFETCH("hive.limit.optimize.fetch.max", 50000, + "Maximum number of rows allowed for a smaller subset of data for simple LIMIT, if it is a fetch query. \n" + + "Insert queries are not restricted by this limit."), + HIVELIMITPUSHDOWNMEMORYUSAGE("hive.limit.pushdown.memory.usage", -1f, + "The max memory to be used for hash in RS operator for top K selection."), + + HIVEHASHTABLETHRESHOLD("hive.hashtable.initialCapacity", 100000, ""), + HIVEHASHTABLELOADFACTOR("hive.hashtable.loadfactor", (float) 0.75, ""), + HIVEHASHTABLEFOLLOWBYGBYMAXMEMORYUSAGE("hive.mapjoin.followby.gby.localtask.max.memory.usage", (float) 0.55, + "This number means how much memory the local task can take to hold the key/value into an in-memory hash table \n" + + "when this map join is followed by a group by. If the local task's memory usage is more than this number, \n" + + "the local task will abort by itself. It means the data of the small table is too large to be held in memory."), + HIVEHASHTABLEMAXMEMORYUSAGE("hive.mapjoin.localtask.max.memory.usage", (float) 0.90, + "This number means how much memory the local task can take to hold the key/value into an in-memory hash table. \n" + + "If the local task's memory usage is more than this number, the local task will abort by itself. \n" + + "It means the data of the small table is too large to be held in memory."), + HIVEHASHTABLESCALE("hive.mapjoin.check.memory.rows", (long)100000, + "The number means after how many rows processed it needs to check the memory usage"), + + HIVEDEBUGLOCALTASK("hive.debug.localtask",false, ""), + + HIVEINPUTFORMAT("hive.input.format", "org.apache.hadoop.hive.ql.io.CombineHiveInputFormat", + "The default input format. Set this to HiveInputFormat if you encounter problems with CombineHiveInputFormat."), + + HIVEENFORCEBUCKETING("hive.enforce.bucketing", false, + "Whether bucketing is enforced. If true, while inserting into the table, bucketing is enforced."), + HIVEENFORCESORTING("hive.enforce.sorting", false, + "Whether sorting is enforced. If true, while inserting into the table, sorting is enforced."), + HIVEOPTIMIZEBUCKETINGSORTING("hive.optimize.bucketingsorting", true, + "If hive.enforce.bucketing or hive.enforce.sorting is true, don't create a reducer for enforcing \n" + + "bucketing/sorting for queries of the form: \n" + + "insert overwrite table T2 select * from T1;\n" + + "where T1 and T2 are bucketed/sorted by the same keys into the same number of buckets."), + HIVEPARTITIONER("hive.mapred.partitioner", "org.apache.hadoop.hive.ql.io.DefaultHivePartitioner", ""), + HIVEENFORCESORTMERGEBUCKETMAPJOIN("hive.enforce.sortmergebucketmapjoin", false, + "If the user asked for sort-merge bucketed map-side join, and it cannot be performed, should the query fail or not ?"), + HIVEENFORCEBUCKETMAPJOIN("hive.enforce.bucketmapjoin", false, + "If the user asked for bucketed map-side join, and it cannot be performed, \n" + + "should the query fail or not ? For example, if the buckets in the tables being joined are\n" + + "not a multiple of each other, bucketed map-side join cannot be performed, and the\n" + + "query will fail if hive.enforce.bucketmapjoin is set to true."), + + HIVE_AUTO_SORTMERGE_JOIN("hive.auto.convert.sortmerge.join", false, + "Will the join be automatically converted to a sort-merge join, if the joined tables pass the criteria for sort-merge join."), HIVE_AUTO_SORTMERGE_JOIN_BIGTABLE_SELECTOR( "hive.auto.convert.sortmerge.join.bigtable.selection.policy", - "org.apache.hadoop.hive.ql.optimizer.AvgPartitionSizeBasedBigTableSelectorForAutoSMJ"), + "org.apache.hadoop.hive.ql.optimizer.AvgPartitionSizeBasedBigTableSelectorForAutoSMJ", + "The policy to choose the big table for automatic conversion to sort-merge join. \n" + + "By default, the table with the largest partitions is assigned the big table. All policies are:\n" + + ". based on position of the table - the leftmost table is selected\n" + + "org.apache.hadoop.hive.ql.optimizer.LeftmostBigTableSMJ.\n" + + ". based on total size (all the partitions selected in the query) of the table \n" + + "org.apache.hadoop.hive.ql.optimizer.TableSizeBasedBigTableSelectorForAutoSMJ.\n" + + ". based on average size (all the partitions selected in the query) of the table \n" + + "org.apache.hadoop.hive.ql.optimizer.AvgPartitionSizeBasedBigTableSelectorForAutoSMJ.\n" + + "New policies can be added in future."), HIVE_AUTO_SORTMERGE_JOIN_TOMAPJOIN( - "hive.auto.convert.sortmerge.join.to.mapjoin", false), - - HIVESCRIPTOPERATORTRUST("hive.exec.script.trust", false), - HIVEROWOFFSET("hive.exec.rowoffset", false), - - HIVE_COMBINE_INPUT_FORMAT_SUPPORTS_SPLITTABLE("hive.hadoop.supports.splittable.combineinputformat", false), + "hive.auto.convert.sortmerge.join.to.mapjoin", false, + "If hive.auto.convert.sortmerge.join is set to true, and a join was converted to a sort-merge join, \n" + + "this parameter decides whether each table should be tried as a big table, and effectively a map-join should be\n" + + "tried. That would create a conditional task with n+1 children for a n-way join (1 child for each table as the\n" + + "big table), and the backup task will be the sort-merge join. In some cases, a map-join would be faster than a\n" + + "sort-merge join, if there is no advantage of having the output bucketed and sorted. For example, if a very big sorted\n" + + "and bucketed table with few files (say 10 files) are being joined with a very small sorter and bucketed table\n" + + "with few files (10 files), the sort-merge join will only use 10 mappers, and a simple map-only join might be faster\n" + + "if the complete small table can fit in memory, and a map-join can be performed."), + + HIVESCRIPTOPERATORTRUST("hive.exec.script.trust", false, ""), + HIVEROWOFFSET("hive.exec.rowoffset", false, + "Whether to provide the row offset virtual column"), + + HIVE_COMBINE_INPUT_FORMAT_SUPPORTS_SPLITTABLE("hive.hadoop.supports.splittable.combineinputformat", false, ""), // Optimizer - HIVEOPTINDEXFILTER("hive.optimize.index.filter", false), // automatically use indexes - HIVEINDEXAUTOUPDATE("hive.optimize.index.autoupdate", false), //automatically update stale indexes - HIVEOPTPPD("hive.optimize.ppd", true), // predicate pushdown - HIVEPPDRECOGNIZETRANSITIVITY("hive.ppd.recognizetransivity", true), // predicate pushdown - HIVEPPDREMOVEDUPLICATEFILTERS("hive.ppd.remove.duplicatefilters", true), - HIVEMETADATAONLYQUERIES("hive.optimize.metadataonly", true), - // push predicates down to storage handlers - HIVEOPTPPD_STORAGE("hive.optimize.ppd.storage", true), - HIVEOPTGROUPBY("hive.optimize.groupby", true), // optimize group by - HIVEOPTBUCKETMAPJOIN("hive.optimize.bucketmapjoin", false), // optimize bucket map join - HIVEOPTSORTMERGEBUCKETMAPJOIN("hive.optimize.bucketmapjoin.sortedmerge", false), // try to use sorted merge bucket map join - HIVEOPTREDUCEDEDUPLICATION("hive.optimize.reducededuplication", true), - HIVEOPTREDUCEDEDUPLICATIONMINREDUCER("hive.optimize.reducededuplication.min.reducer", 4), - - HIVESAMPLINGFORORDERBY("hive.optimize.sampling.orderby", false), - HIVESAMPLINGNUMBERFORORDERBY("hive.optimize.sampling.orderby.number", 1000), - HIVESAMPLINGPERCENTFORORDERBY("hive.optimize.sampling.orderby.percent", 0.1f), + HIVEOPTINDEXFILTER("hive.optimize.index.filter", false, + "Whether to enable automatic use of indexes"), + HIVEINDEXAUTOUPDATE("hive.optimize.index.autoupdate", false, + "Whether to update stale indexes automatically"), + HIVEOPTPPD("hive.optimize.ppd", true, + "Whether to enable predicate pushdown"), + HIVEPPDRECOGNIZETRANSITIVITY("hive.ppd.recognizetransivity", true, + "Whether to transitively replicate predicate filters over equijoin conditions."), + HIVEPPDREMOVEDUPLICATEFILTERS("hive.ppd.remove.duplicatefilters", true, + "Whether to push predicates down into storage handlers. Ignored when hive.optimize.ppd is false."), + HIVEMETADATAONLYQUERIES("hive.optimize.metadataonly", true, ""), + HIVEOPTPPD_STORAGE("hive.optimize.ppd.storage", true, + "Whether to push predicates down to storage handlers"), + HIVEOPTGROUPBY("hive.optimize.groupby", true, + "Whether to enable the bucketed group by from bucketed partitions/tables."), + HIVEOPTBUCKETMAPJOIN("hive.optimize.bucketmapjoin", false, + "Whether to try bucket mapjoin"), + HIVEOPTSORTMERGEBUCKETMAPJOIN("hive.optimize.bucketmapjoin.sortedmerge", false, + "Whether to try sorted bucket merge map join"), + HIVEOPTREDUCEDEDUPLICATION("hive.optimize.reducededuplication", true, + "Remove extra map-reduce jobs if the data is already clustered by the same key which needs to be used again. \n" + + "This should always be set to true. Since it is a new feature, it has been made configurable."), + HIVEOPTREDUCEDEDUPLICATIONMINREDUCER("hive.optimize.reducededuplication.min.reducer", 4, + "Reduce deduplication merges two RSs by moving key/parts/reducer-num of the child RS to parent RS. \n" + + "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" + + "The optimization will be automatically disabled if number of reducers would be less than specified value."), + + HIVESAMPLINGFORORDERBY("hive.optimize.sampling.orderby", false, ""), + HIVESAMPLINGNUMBERFORORDERBY("hive.optimize.sampling.orderby.number", 1000, ""), + HIVESAMPLINGPERCENTFORORDERBY("hive.optimize.sampling.orderby.percent", 0.1f, ""), // whether to optimize union followed by select followed by filesink // It creates sub-directories in the final output, so should not be turned on in systems // where MAPREDUCE-1501 is not present - HIVE_OPTIMIZE_UNION_REMOVE("hive.optimize.union.remove", false), - HIVEOPTCORRELATION("hive.optimize.correlation", false), // exploit intra-query correlations - - // whether hadoop map-reduce supports sub-directories. It was added by MAPREDUCE-1501. - // Some optimizations can only be performed if the version of hadoop being used supports - // sub-directories - HIVE_HADOOP_SUPPORTS_SUBDIRECTORIES("hive.mapred.supports.subdirectories", false), - - // optimize skewed join by changing the query plan at compile time - HIVE_OPTIMIZE_SKEWJOIN_COMPILETIME("hive.optimize.skewjoin.compiletime", false), + HIVE_OPTIMIZE_UNION_REMOVE("hive.optimize.union.remove", false, + "Whether to remove the union and push the operators between union and the filesink above union. \n" + + "This avoids an extra scan of the output by union. This is independently useful for union\n" + + "queries, and specially useful when hive.optimize.skewjoin.compiletime is set to true, since an\n" + + "extra union is inserted.\n" + + "\n" + + "The merge is triggered if either of hive.merge.mapfiles or hive.merge.mapredfiles is set to true.\n" + + "If the user has set hive.merge.mapfiles to true and hive.merge.mapredfiles to false, the idea was the\n" + + "number of reducers are few, so the number of files anyway are small. However, with this optimization,\n" + + "we are increasing the number of files possibly by a big margin. So, we merge aggressively."), + HIVEOPTCORRELATION("hive.optimize.correlation", false, "exploit intra-query correlations."), + + HIVE_HADOOP_SUPPORTS_SUBDIRECTORIES("hive.mapred.supports.subdirectories", false, + "Whether the version of Hadoop which is running supports sub-directories for tables/partitions. \n" + + "Many Hive optimizations can be applied if the Hadoop version supports sub-directories for\n" + + "tables/partitions. It was added by MAPREDUCE-1501"), + + HIVE_OPTIMIZE_SKEWJOIN_COMPILETIME("hive.optimize.skewjoin.compiletime", false, + "Whether to create a separate plan for skewed keys for the tables in the join.\n" + + "This is based on the skewed keys stored in the metadata. At compile time, the plan is broken\n" + + "into different joins: one for the skewed keys, and the other for the remaining keys. And then,\n" + + "a union is performed for the 2 joins generated above. So unless the same skewed key is present\n" + + "in both the joined tables, the join for the skewed key will be performed as a map-side join.\n" + + "\n" + + "The main difference between this parameter and hive.optimize.skewjoin is that this parameter\n" + + "uses the skew information stored in the metastore to optimize the plan at compile time itself.\n" + + "If there is no skew information in the metadata, this parameter will not have any affect.\n" + + "Both hive.optimize.skewjoin.compiletime and hive.optimize.skewjoin should be set to true.\n" + + "Ideally, hive.optimize.skewjoin should be renamed as hive.optimize.skewjoin.runtime, but not doing\n" + + "so for backward compatibility.\n" + + "\n" + + "If the skew information is correctly stored in the metadata, hive.optimize.skewjoin.compiletime\n" + + "would change the query plan to take care of it, and hive.optimize.skewjoin will be a no-op."), // Indexes - HIVEOPTINDEXFILTER_COMPACT_MINSIZE("hive.optimize.index.filter.compact.minsize", (long) 5 * 1024 * 1024 * 1024), // 5G - HIVEOPTINDEXFILTER_COMPACT_MAXSIZE("hive.optimize.index.filter.compact.maxsize", (long) -1), // infinity - HIVE_INDEX_COMPACT_QUERY_MAX_ENTRIES("hive.index.compact.query.max.entries", (long) 10000000), // 10M - HIVE_INDEX_COMPACT_QUERY_MAX_SIZE("hive.index.compact.query.max.size", (long) 10 * 1024 * 1024 * 1024), // 10G - HIVE_INDEX_COMPACT_BINARY_SEARCH("hive.index.compact.binary.search", true), + HIVEOPTINDEXFILTER_COMPACT_MINSIZE("hive.optimize.index.filter.compact.minsize", (long) 5 * 1024 * 1024 * 1024, + "Minimum size (in bytes) of the inputs on which a compact index is automatically used."), // 5G + HIVEOPTINDEXFILTER_COMPACT_MAXSIZE("hive.optimize.index.filter.compact.maxsize", (long) -1, + "Maximum size (in bytes) of the inputs on which a compact index is automatically used. A negative number is equivalent to infinity."), // infinity + HIVE_INDEX_COMPACT_QUERY_MAX_ENTRIES("hive.index.compact.query.max.entries", (long) 10000000, + "The maximum number of index entries to read during a query that uses the compact index. Negative value is equivalent to infinity."), // 10M + HIVE_INDEX_COMPACT_QUERY_MAX_SIZE("hive.index.compact.query.max.size", (long) 10 * 1024 * 1024 * 1024, + "The maximum number of bytes that a query using the compact index can read. Negative value is equivalent to infinity."), // 10G + HIVE_INDEX_COMPACT_BINARY_SEARCH("hive.index.compact.binary.search", true, + "Whether or not to use a binary search to find the entries in an index table that match the filter, where possible"), // Statistics - HIVESTATSAUTOGATHER("hive.stats.autogather", true), - HIVESTATSDBCLASS("hive.stats.dbclass", "counter", - new PatternValidator("jdbc(:.*)", "hbase", "counter", "custom")), // StatsSetupConst.StatDB + HIVESTATSAUTOGATHER("hive.stats.autogather", true, + "A flag to gather statistics automatically during the INSERT OVERWRITE command."), + HIVESTATSDBCLASS("hive.stats.dbclass", "counter", new PatternSet("jdbc(:.*)", "hbase", "counter", "custom"), + "The storage that stores temporary Hive statistics. Currently, jdbc, hbase, counter and custom type are supported." + ), // StatsSetupConst.StatDB HIVESTATSJDBCDRIVER("hive.stats.jdbcdriver", - "org.apache.derby.jdbc.EmbeddedDriver"), // JDBC driver specific to the dbclass + "org.apache.derby.jdbc.EmbeddedDriver", + "The JDBC driver for the database that stores temporary Hive statistics."), HIVESTATSDBCONNECTIONSTRING("hive.stats.dbconnectionstring", - "jdbc:derby:;databaseName=TempStatsStore;create=true"), // automatically create database - HIVE_STATS_DEFAULT_PUBLISHER("hive.stats.default.publisher", - ""), // default stats publisher if none of JDBC/HBase is specified - HIVE_STATS_DEFAULT_AGGREGATOR("hive.stats.default.aggregator", - ""), // default stats aggregator if none of JDBC/HBase is specified - HIVE_STATS_JDBC_TIMEOUT("hive.stats.jdbc.timeout", - 30), // default timeout in sec for JDBC connection & SQL statements - HIVE_STATS_ATOMIC("hive.stats.atomic", - false), // whether to update metastore stats only if all stats are available - HIVE_STATS_RETRIES_MAX("hive.stats.retries.max", - 0), // maximum # of retries to insert/select/delete the stats DB - HIVE_STATS_RETRIES_WAIT("hive.stats.retries.wait", - 3000), // # milliseconds to wait before the next retry - HIVE_STATS_COLLECT_RAWDATASIZE("hive.stats.collect.rawdatasize", true), + "jdbc:derby:;databaseName=TempStatsStore;create=true", + "The default connection string for the database that stores temporary Hive statistics."), // automatically create database + HIVE_STATS_DEFAULT_PUBLISHER("hive.stats.default.publisher", "", + "The Java class (implementing the StatsPublisher interface) that is used by default if hive.stats.dbclass is custom type."), + HIVE_STATS_DEFAULT_AGGREGATOR("hive.stats.default.aggregator", "", + "The Java class (implementing the StatsAggregator interface) that is used by default if hive.stats.dbclass is custom type."), + HIVE_STATS_JDBC_TIMEOUT("hive.stats.jdbc.timeout", 30, + "Timeout value (number of seconds) used by JDBC connection and statements."), + HIVE_STATS_ATOMIC("hive.stats.atomic", false, + "whether to update metastore stats only if all stats are available"), + HIVE_STATS_RETRIES_MAX("hive.stats.retries.max", 0, + "Maximum number of retries when stats publisher/aggregator got an exception updating intermediate database. \n" + + "Default is no tries on failures."), + HIVE_STATS_RETRIES_WAIT("hive.stats.retries.wait", 3000, + "The base waiting window (in milliseconds) before the next retry. The actual wait time is calculated by " + + "baseWindow * failures baseWindow * (failure 1) * (random number between [0.0,1.0])."), + HIVE_STATS_COLLECT_RAWDATASIZE("hive.stats.collect.rawdatasize", true, ""), // should the raw data size be collected when analyzing tables - CLIENT_STATS_COUNTERS("hive.client.stats.counters", ""), + CLIENT_STATS_COUNTERS("hive.client.stats.counters", "", + "Subset of counters that should be of interest for hive.client.stats.publishers (when one wants to limit their publishing). \n" + + "Non-display names should be used"), //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". - HIVE_STATS_RELIABLE("hive.stats.reliable", false), + HIVE_STATS_RELIABLE("hive.stats.reliable", false, + "Whether queries will fail because stats cannot be collected completely accurately. \n" + + "If this is set to true, reading/writing from/into a partition may fail because the stats\n" + + "could not be computed accurately."), // Collect table access keys information for operators that can benefit from bucketing - HIVE_STATS_COLLECT_TABLEKEYS("hive.stats.collect.tablekeys", false), + HIVE_STATS_COLLECT_TABLEKEYS("hive.stats.collect.tablekeys", false, + "Whether join and group by keys on tables are derived and maintained in the QueryPlan.\n" + + "This is useful to identify how tables are accessed and to determine if they should be bucketed."), // Collect column access information - HIVE_STATS_COLLECT_SCANCOLS("hive.stats.collect.scancols", false), + HIVE_STATS_COLLECT_SCANCOLS("hive.stats.collect.scancols", false, + "Whether column accesses are tracked in the QueryPlan.\n" + + "This is useful to identify how tables are accessed and to determine if there are wasted columns that can be trimmed."), // standard error allowed for ndv estimates. A lower value indicates higher accuracy and a // higher compute cost. - HIVE_STATS_NDV_ERROR("hive.stats.ndv.error", (float)20.0), - HIVE_STATS_KEY_PREFIX_MAX_LENGTH("hive.stats.key.prefix.max.length", 150), - HIVE_STATS_KEY_PREFIX_RESERVE_LENGTH("hive.stats.key.prefix.reserve.length", 24), - HIVE_STATS_KEY_PREFIX("hive.stats.key.prefix", ""), // internal usage only - // if length of variable length data type cannot be determined this length will be used. - HIVE_STATS_MAX_VARIABLE_LENGTH("hive.stats.max.variable.length", 100), + HIVE_STATS_NDV_ERROR("hive.stats.ndv.error", (float)20.0, + "Standard error expressed in percentage. Provides a tradeoff between accuracy and compute cost. \n" + + "A lower value for error indicates higher accuracy and a higher compute cost."), + HIVE_STATS_KEY_PREFIX_MAX_LENGTH("hive.stats.key.prefix.max.length", 150, + "Determines if when the prefix of the key used for intermediate stats collection\n" + + "exceeds a certain length, a hash of the key is used instead. If the value < 0 then hashing"), + HIVE_STATS_KEY_PREFIX_RESERVE_LENGTH("hive.stats.key.prefix.reserve.length", 24, + "Reserved length for postfix of stats key. Currently only meaningful for counter type which should\n" + + "keep length of full stats key smaller than max length configured by hive.stats.key.prefix.max.length.\n" + + "For counter type, it should be bigger than the length of LB spec if exists."), + HIVE_STATS_KEY_PREFIX("hive.stats.key.prefix", "", ""), // internal usage only + // if length of variable length data valType cannot be determined this length will be used. + HIVE_STATS_MAX_VARIABLE_LENGTH("hive.stats.max.variable.length", 100, + "To estimate the size of data flowing through operators in Hive/Tez(for reducer estimation etc.),\n" + + "average row size is multiplied with the total number of rows coming out of each operator.\n" + + "Average row size is computed from average column size of all columns in the row. In the absence\n" + + "of column statistics, for variable length columns (like string, bytes etc.), this value will be\n" + + "used. For fixed length columns their corresponding Java equivalent sizes are used\n" + + "(float - 4 bytes, double - 8 bytes etc.).\n"), // if number of elements in list cannot be determined, this value will be used - HIVE_STATS_LIST_NUM_ENTRIES("hive.stats.list.num.entries", 10), + HIVE_STATS_LIST_NUM_ENTRIES("hive.stats.list.num.entries", 10, + "To estimate the size of data flowing through operators in Hive/Tez(for reducer estimation etc.),\n" + + "average row size is multiplied with the total number of rows coming out of each operator.\n" + + "Average row size is computed from average column size of all columns in the row. In the absence\n" + + "of column statistics and for variable length complex columns like list, the average number of\n" + + "entries/values can be specified using this config."), // if number of elements in map cannot be determined, this value will be used - HIVE_STATS_MAP_NUM_ENTRIES("hive.stats.map.num.entries", 10), + HIVE_STATS_MAP_NUM_ENTRIES("hive.stats.map.num.entries", 10, + "To estimate the size of data flowing through operators in Hive/Tez(for reducer estimation etc.),\n" + + "average row size is multiplied with the total number of rows coming out of each operator.\n" + + "Average row size is computed from average column size of all columns in the row. In the absence\n" + + "of column statistics and for variable length complex columns like map, the average number of\n" + + "entries/values can be specified using this config."), // to accurately compute statistics for GROUPBY map side parallelism needs to be known - HIVE_STATS_MAP_SIDE_PARALLELISM("hive.stats.map.parallelism", 1), + HIVE_STATS_MAP_SIDE_PARALLELISM("hive.stats.map.parallelism", 1, + "Hive/Tez optimizer estimates the data size flowing through each of the operators.\n" + + "For GROUPBY operator, to accurately compute the data size map-side parallelism needs to\n" + + "be known. By default, this value is set to 1 since optimizer is not aware of the number of\n" + + "mappers during compile-time. This Hive config can be used to specify the number of mappers\n" + + "to be used for data size computation of GROUPBY operator.\n"), // statistics annotation fetches stats for each partition, which can be expensive. turning // this off will result in basic sizes being fetched from namenode instead - HIVE_STATS_FETCH_PARTITION_STATS("hive.stats.fetch.partition.stats", true), + HIVE_STATS_FETCH_PARTITION_STATS("hive.stats.fetch.partition.stats", true, + "Annotation of operator tree with statistics information requires partition level basic\n" + + "statisitcs like number of rows, data size and file size. Partition statistics are fetched from\n" + + "metastore. Fetching partition statistics for each needed partition can be expensive when the\n" + + "number of partitions is high. This flag can be used to disable fetching of partition statistics\n" + + "from metastore. When this flag is disabled, Hive will make calls to filesystem to get file sizes\n" + + "and will estimate the number of rows from row schema.\n"), // statistics annotation fetches column statistics for all required columns which can // be very expensive sometimes - HIVE_STATS_FETCH_COLUMN_STATS("hive.stats.fetch.column.stats", false), + HIVE_STATS_FETCH_COLUMN_STATS("hive.stats.fetch.column.stats", false, + "Annotation of operator tree with statistics information requires column statisitcs.\n" + + "Column statistics are fetched from metastore. Fetching column statistics for each needed column\n" + + "can be expensive when the number of columns is high. This flag can be used to disable fetching\n" + + "of column statistics from metastore.\n"), // in the absence of column statistics, the estimated number of rows/data size that will // be emitted from join operator will depend on this factor - HIVE_STATS_JOIN_FACTOR("hive.stats.join.factor", (float) 1.1), + HIVE_STATS_JOIN_FACTOR("hive.stats.join.factor", (float) 1.1, + "Hive/Tez optimizer estimates the data size flowing through each of the operators. JOIN operator\n" + + "uses column statistics to estimate the number of rows flowing out of it and hence the data size.\n" + + "In the absence of column statistics, this factor determines the amount of rows that flows out\n" + + "of JOIN operator.\n"), // in the absence of uncompressed/raw data size, total file size will be used for statistics // annotation. But the file may be compressed, encoded and serialized which may be lesser in size // than the actual uncompressed/raw data size. This factor will be multiplied to file size to estimate // the raw data size. - HIVE_STATS_DESERIALIZATION_FACTOR("hive.stats.deserialization.factor", (float) 1.0), + HIVE_STATS_DESERIALIZATION_FACTOR("hive.stats.deserialization.factor", (float) 1.0, + "Hive/Tez optimizer estimates the data size flowing through each of the operators. In the absence\n" + + "of basic statistics like number of rows and data size, file size is used to estimate the number\n" + + "of rows and data size. Since files in tables/partitions are serialized (and optionally\n" + + "compressed) the estimates of number of rows and data size cannot be reliably determined.\n" + + "This factor is multiplied with the file size to account for serialization and compression.\n"), // Concurrency - HIVE_SUPPORT_CONCURRENCY("hive.support.concurrency", false), - HIVE_LOCK_MANAGER("hive.lock.manager", "org.apache.hadoop.hive.ql.lockmgr.zookeeper.ZooKeeperHiveLockManager"), - HIVE_LOCK_NUMRETRIES("hive.lock.numretries", 100), - HIVE_UNLOCK_NUMRETRIES("hive.unlock.numretries", 10), - HIVE_LOCK_SLEEP_BETWEEN_RETRIES("hive.lock.sleep.between.retries", 60), - HIVE_LOCK_MAPRED_ONLY("hive.lock.mapred.only.operation", false), - - HIVE_ZOOKEEPER_QUORUM("hive.zookeeper.quorum", ""), - HIVE_ZOOKEEPER_CLIENT_PORT("hive.zookeeper.client.port", "2181"), - HIVE_ZOOKEEPER_SESSION_TIMEOUT("hive.zookeeper.session.timeout", 600*1000), - HIVE_ZOOKEEPER_NAMESPACE("hive.zookeeper.namespace", "hive_zookeeper_namespace"), - HIVE_ZOOKEEPER_CLEAN_EXTRA_NODES("hive.zookeeper.clean.extra.nodes", false), + HIVE_SUPPORT_CONCURRENCY("hive.support.concurrency", false, + "Whether Hive supports concurrency control or not. \n" + + "A ZooKeeper instance must be up and running when using zookeeper Hive lock manager "), + HIVE_LOCK_MANAGER("hive.lock.manager", "org.apache.hadoop.hive.ql.lockmgr.zookeeper.ZooKeeperHiveLockManager", ""), + HIVE_LOCK_NUMRETRIES("hive.lock.numretries", 100, + "The number of times you want to try to get all the locks"), + HIVE_UNLOCK_NUMRETRIES("hive.unlock.numretries", 10, + "The number of times you want to retry to do one unlock"), + HIVE_LOCK_SLEEP_BETWEEN_RETRIES("hive.lock.sleep.between.retries", 60, + "The sleep time (in seconds) between various retries"), + HIVE_LOCK_MAPRED_ONLY("hive.lock.mapred.only.operation", false, + "This param is to control whether or not only do lock on queries\n" + + "that need to execute at least one mapred job."), + + HIVE_ZOOKEEPER_QUORUM("hive.zookeeper.quorum", "", + "The list of ZooKeeper servers to talk to. This is only needed for read/write locks."), + HIVE_ZOOKEEPER_CLIENT_PORT("hive.zookeeper.client.port", "2181", + "The port of ZooKeeper servers to talk to. This is only needed for read/write locks."), + HIVE_ZOOKEEPER_SESSION_TIMEOUT("hive.zookeeper.session.timeout", 600*1000, + "ZooKeeper client's session timeout. The client is disconnected, and as a result, all locks released, \n" + + "if a heartbeat is not sent in the timeout."), + HIVE_ZOOKEEPER_NAMESPACE("hive.zookeeper.namespace", "hive_zookeeper_namespace", + "The parent node under which all ZooKeeper nodes are created."), + HIVE_ZOOKEEPER_CLEAN_EXTRA_NODES("hive.zookeeper.clean.extra.nodes", false, + "Clean extra nodes at the end of the session."), // For HBase storage handler - HIVE_HBASE_WAL_ENABLED("hive.hbase.wal.enabled", true), + HIVE_HBASE_WAL_ENABLED("hive.hbase.wal.enabled", true, + "Whether writes to HBase should be forced to the write-ahead log. \n" + + "Disabling this improves HBase write performance at the risk of lost writes in case of a crash."), // For har files - HIVEARCHIVEENABLED("hive.archive.enabled", false), - - //Enable/Disable gbToIdx rewrite rule - HIVEOPTGBYUSINGINDEX("hive.optimize.index.groupby", false), - - HIVEOUTERJOINSUPPORTSFILTERS("hive.outerjoin.supports.filters", true), - - // 'minimal', 'more' (and 'all' later) - HIVEFETCHTASKCONVERSION("hive.fetch.task.conversion", "minimal", - new StringsValidator("minimal", "more")), - HIVEFETCHTASKCONVERSIONTHRESHOLD("hive.fetch.task.conversion.threshold", -1l), - - HIVEFETCHTASKAGGR("hive.fetch.task.aggr", false), - - HIVEOPTIMIZEMETADATAQUERIES("hive.compute.query.using.stats", false), + HIVEARCHIVEENABLED("hive.archive.enabled", false, "Whether archiving operations are permitted"), + + HIVEOPTGBYUSINGINDEX("hive.optimize.index.groupby", false, + "Whether to enable optimization of group-by queries using Aggregate indexes."), + + HIVEOUTERJOINSUPPORTSFILTERS("hive.outerjoin.supports.filters", true, ""), + + HIVEFETCHTASKCONVERSION("hive.fetch.task.conversion", "minimal", new StringSet("minimal", "more"), + "Some select queries can be converted to single FETCH task minimizing latency.\n" + + "Currently the query should be single sourced not having any subquery and should not have\n" + + "any aggregations or distincts (which incurs RS), lateral views and joins.\n" + + "1. minimal : SELECT STAR, FILTER on partition columns, LIMIT only\n" + + "2. more : SELECT, FILTER, LIMIT only (support TABLESAMPLE and virtual columns)\n" + ), + HIVEFETCHTASKCONVERSIONTHRESHOLD("hive.fetch.task.conversion.threshold", -1l, + "Input threshold for applying hive.fetch.task.conversion. If target table is native, input length\n" + + "is calculated by summation of file lengths. If it's not native, storage handler for the table\n" + + "can optionally implement org.apache.hadoop.hive.ql.metadata.InputEstimator interface.\n"), + + HIVEFETCHTASKAGGR("hive.fetch.task.aggr", false, + "Aggregation queries with no group-by clause (for example, select count(*) from src) execute\n" + + "final aggregations in single reduce task. If this is set true, Hive delegates final aggregation\n" + + "stage to fetch task, possibly decreasing the query time.\n"), + + HIVEOPTIMIZEMETADATAQUERIES("hive.compute.query.using.stats", false, + "When set to true Hive will answer a few queries like count(1) purely using stats\n" + + "stored in metastore. For basic stats collection turn on the config hive.stats.autogather to true.\n" + + "For more advanced stats collection need to run analyze table queries.\n"), // Serde for FetchTask - HIVEFETCHOUTPUTSERDE("hive.fetch.output.serde", "org.apache.hadoop.hive.serde2.DelimitedJSONSerDe"), + HIVEFETCHOUTPUTSERDE("hive.fetch.output.serde", "org.apache.hadoop.hive.serde2.DelimitedJSONSerDe", + "The SerDe used by FetchTask to serialize the fetch output."), - HIVEEXPREVALUATIONCACHE("hive.cache.expr.evaluation", true), + HIVEEXPREVALUATIONCACHE("hive.cache.expr.evaluation", true, + "If true, evaluation result of deterministic expression referenced twice or more will be cached."), // Hive Variables - HIVEVARIABLESUBSTITUTE("hive.variable.substitute", true), - HIVEVARIABLESUBSTITUTEDEPTH("hive.variable.substitute.depth", 40), + HIVEVARIABLESUBSTITUTE("hive.variable.substitute", true, + "This enables substitution using syntax like ${var} ${system:var} and ${env:var}."), + HIVEVARIABLESUBSTITUTEDEPTH("hive.variable.substitute.depth", 40, + "The maximum replacements the substitution engine will do."), - HIVECONFVALIDATION("hive.conf.validation", true), + HIVECONFVALIDATION("hive.conf.validation", true, + "Enables type checking for registered Hive configurations"), - SEMANTIC_ANALYZER_HOOK("hive.semantic.analyzer.hook", ""), - HIVE_AUTHORIZATION_ENABLED("hive.security.authorization.enabled", false), + SEMANTIC_ANALYZER_HOOK("hive.semantic.analyzer.hook", "", ""), + HIVE_AUTHORIZATION_ENABLED("hive.security.authorization.enabled", false, + "enable or disable the Hive client authorization"), HIVE_AUTHORIZATION_MANAGER("hive.security.authorization.manager", - "org.apache.hadoop.hive.ql.security.authorization.DefaultHiveAuthorizationProvider"), + "org.apache.hadoop.hive.ql.security.authorization.DefaultHiveAuthorizationProvider", + "The Hive client authorization manager class name. The user defined authorization class should implement \n" + + "interface org.apache.hadoop.hive.ql.security.authorization.HiveAuthorizationProvider."), HIVE_AUTHENTICATOR_MANAGER("hive.security.authenticator.manager", - "org.apache.hadoop.hive.ql.security.HadoopDefaultAuthenticator"), + "org.apache.hadoop.hive.ql.security.HadoopDefaultAuthenticator", + "hive client authenticator manager class name. The user defined authenticator should implement \n" + + "interface org.apache.hadoop.hive.ql.security.HiveAuthenticationProvider."), HIVE_METASTORE_AUTHORIZATION_MANAGER("hive.security.metastore.authorization.manager", - "org.apache.hadoop.hive.ql.security.authorization." - + "DefaultHiveMetastoreAuthorizationProvider"), + "org.apache.hadoop.hive.ql.security.authorization.DefaultHiveMetastoreAuthorizationProvider", + "authorization manager class name to be used in the metastore for authorization.\n" + + "The user defined authorization class should implement interface \n" + + "org.apache.hadoop.hive.ql.security.authorization.HiveMetastoreAuthorizationProvider. "), HIVE_METASTORE_AUTHENTICATOR_MANAGER("hive.security.metastore.authenticator.manager", - "org.apache.hadoop.hive.ql.security.HadoopDefaultMetastoreAuthenticator"), - HIVE_AUTHORIZATION_TABLE_USER_GRANTS("hive.security.authorization.createtable.user.grants", ""), + "org.apache.hadoop.hive.ql.security.HadoopDefaultMetastoreAuthenticator", + "authenticator manager class name to be used in the metastore for authentication. \n" + + "The user defined authenticator should implement interface org.apache.hadoop.hive.ql.security.HiveAuthenticationProvider."), + HIVE_AUTHORIZATION_TABLE_USER_GRANTS("hive.security.authorization.createtable.user.grants", "", + "the privileges automatically granted to some users whenever a table gets created.\n" + + "An example like \"userX,userY:select;userZ:create\" will grant select privilege to userX and userY,\n" + + "and grant create privilege to userZ whenever a new table created."), HIVE_AUTHORIZATION_TABLE_GROUP_GRANTS("hive.security.authorization.createtable.group.grants", - ""), - HIVE_AUTHORIZATION_TABLE_ROLE_GRANTS("hive.security.authorization.createtable.role.grants", ""), - HIVE_AUTHORIZATION_TABLE_OWNER_GRANTS("hive.security.authorization.createtable.owner.grants", - ""), - - // Print column names in output - HIVE_CLI_PRINT_HEADER("hive.cli.print.header", false), - - HIVE_ERROR_ON_EMPTY_PARTITION("hive.error.on.empty.partition", false), - - HIVE_INDEX_IGNORE_HDFS_LOC("hive.index.compact.file.ignore.hdfs", false), - - HIVE_EXIM_URI_SCHEME_WL("hive.exim.uri.scheme.whitelist", "hdfs,pfile"), + "", + "the privileges automatically granted to some groups whenever a table gets created.\n" + + "An example like \"groupX,groupY:select;groupZ:create\" will grant select privilege to groupX and groupY,\n" + + "and grant create privilege to groupZ whenever a new table created."), + HIVE_AUTHORIZATION_TABLE_ROLE_GRANTS("hive.security.authorization.createtable.role.grants", "", + "the privileges automatically granted to some roles whenever a table gets created.\n" + + "An example like \"roleX,roleY:select;roleZ:create\" will grant select privilege to roleX and roleY,\n" + + "and grant create privilege to roleZ whenever a new table created."), + HIVE_AUTHORIZATION_TABLE_OWNER_GRANTS("hive.security.authorization.createtable.owner.grants", "", + "the privileges automatically granted to the owner whenever a table gets created.\n" + + "An example like \"select,drop\" will grant select and drop privilege to the owner of the table"), + + HIVE_CLI_PRINT_HEADER("hive.cli.print.header", false, "Whether to print the names of the columns in query output."), + + HIVE_ERROR_ON_EMPTY_PARTITION("hive.error.on.empty.partition", false, + "Whether to throw an exception if dynamic partition insert generates empty results."), + + HIVE_INDEX_IGNORE_HDFS_LOC("hive.index.compact.file.ignore.hdfs", false, + "When true the HDFS location stored in the index file will be ignored at runtime.\n" + + "If the data got moved or the name of the cluster got changed, the index data should still be usable."), + + HIVE_EXIM_URI_SCHEME_WL("hive.exim.uri.scheme.whitelist", "hdfs,pfile", + "A comma separated list of acceptable URI schemes for import and export."), // temporary variable for testing. This is added just to turn off this feature in case of a bug in // deployment. It has not been documented in hive-default.xml intentionally, this should be removed // once the feature is stable - HIVE_MAPPER_CANNOT_SPAN_MULTIPLE_PARTITIONS("hive.mapper.cannot.span.multiple.partitions", false), - HIVE_REWORK_MAPREDWORK("hive.rework.mapredwork", false), - HIVE_CONCATENATE_CHECK_INDEX ("hive.exec.concatenate.check.index", true), - HIVE_IO_EXCEPTION_HANDLERS("hive.io.exception.handlers", ""), + HIVE_MAPPER_CANNOT_SPAN_MULTIPLE_PARTITIONS("hive.mapper.cannot.span.multiple.partitions", false, ""), + HIVE_REWORK_MAPREDWORK("hive.rework.mapredwork", false, + "should rework the mapred work or not.\n" + + "This is first introduced by SymlinkTextInputFormat to replace symlink files with real paths at compile time."), + HIVE_CONCATENATE_CHECK_INDEX ("hive.exec.concatenate.check.index", true, + "If this is set to true, Hive will throw error when doing\n" + + "'alter table tbl_name [partSpec] concatenate' on a table/partition\n" + + "that has indexes on it. The reason the user want to set this to true\n" + + "is because it can help user to avoid handling all index drop, recreation,\n" + + "rebuild work. This is very helpful for tables with thousands of partitions."), + HIVE_IO_EXCEPTION_HANDLERS("hive.io.exception.handlers", "", + "A list of io exception handler class names. This is used\n" + + "to construct a list exception handlers to handle exceptions thrown\n" + + "by record readers"), // logging configuration - HIVE_LOG4J_FILE("hive.log4j.file", ""), - HIVE_EXEC_LOG4J_FILE("hive.exec.log4j.file", ""), + HIVE_LOG4J_FILE("hive.log4j.file", "", + "Hive log4j configuration file.\n" + + "If the property is not set, then logging will be initialized using hive-log4j.properties found on the classpath.\n" + + "If the property is set, the value must be a valid URI (java.net.URI, e.g. \"file:///tmp/my-logging.properties\"), \n" + + "which you can then extract a URL from and pass to PropertyConfigurator.configure(URL)."), + HIVE_EXEC_LOG4J_FILE("hive.exec.log4j.file", "", + "Hive log4j configuration file for execution mode(sub command).\n" + + "If the property is not set, then logging will be initialized using hive-exec-log4j.properties found on the classpath.\n" + + "If the property is set, the value must be a valid URI (java.net.URI, e.g. \"file:///tmp/my-logging.properties\"), \n" + + "which you can then extract a URL from and pass to PropertyConfigurator.configure(URL)."), // prefix used to auto generated column aliases (this should be started with '_') - HIVE_AUTOGEN_COLUMNALIAS_PREFIX_LABEL("hive.autogen.columnalias.prefix.label", "_c"), + HIVE_AUTOGEN_COLUMNALIAS_PREFIX_LABEL("hive.autogen.columnalias.prefix.label", "_c", + "String used as a prefix when auto generating column alias.\n" + + "By default the prefix label will be appended with a column position number to form the column alias. \n" + + "Auto generation would happen if an aggregate function is used in a select clause without an explicit alias."), HIVE_AUTOGEN_COLUMNALIAS_PREFIX_INCLUDEFUNCNAME( - "hive.autogen.columnalias.prefix.includefuncname", false), - - // The class responsible for logging client side performance metrics - // Must be a subclass of org.apache.hadoop.hive.ql.log.PerfLogger - HIVE_PERF_LOGGER("hive.exec.perf.logger", "org.apache.hadoop.hive.ql.log.PerfLogger"), - // Whether to delete the scratchdir while startup - HIVE_START_CLEANUP_SCRATCHDIR("hive.start.cleanup.scratchdir", false), - HIVE_INSERT_INTO_MULTILEVEL_DIRS("hive.insert.into.multilevel.dirs", false), - HIVE_WAREHOUSE_SUBDIR_INHERIT_PERMS("hive.warehouse.subdir.inherit.perms", false), - // whether insert into external tables is allowed - HIVE_INSERT_INTO_EXTERNAL_TABLES("hive.insert.into.external.tables", true), - - // A comma separated list of hooks which implement HiveDriverRunHook and will be run at the - // beginning and end of Driver.run, these will be run in the order specified - HIVE_DRIVER_RUN_HOOKS("hive.exec.driver.run.hooks", ""), - HIVE_DDL_OUTPUT_FORMAT("hive.ddl.output.format", null), - HIVE_ENTITY_SEPARATOR("hive.entity.separator", "@"), - - HIVE_SERVER2_MAX_START_ATTEMPTS("hive.server2.max.start.attempts", 30L, - new LongRangeValidator(0L, Long.MAX_VALUE)), - - // binary or http - HIVE_SERVER2_TRANSPORT_MODE("hive.server2.transport.mode", "binary", - new StringsValidator("binary", "http")), + "hive.autogen.columnalias.prefix.includefuncname", false, + "Whether to include function name in the column alias auto generated by Hive."), + + HIVE_PERF_LOGGER("hive.exec.perf.logger", "org.apache.hadoop.hive.ql.log.PerfLogger", + "The class responsible for logging client side performance metrics. \n" + + "Must be a subclass of org.apache.hadoop.hive.ql.log.PerfLogger"), + HIVE_START_CLEANUP_SCRATCHDIR("hive.start.cleanup.scratchdir", false, + "To cleanup the Hive scratchdir when starting the Hive Server"), + HIVE_INSERT_INTO_MULTILEVEL_DIRS("hive.insert.into.multilevel.dirs", false, + "Where to insert into multilevel directories like\n" + + "\"insert directory '/HIVEFT25686/chinna/' from table\""), + HIVE_WAREHOUSE_SUBDIR_INHERIT_PERMS("hive.warehouse.subdir.inherit.perms", false, + "Set this to true if the the table directories should inherit the\n" + + "permission of the warehouse or database directory instead of being created\n" + + "with the permissions derived from dfs umask"), + HIVE_INSERT_INTO_EXTERNAL_TABLES("hive.insert.into.external.tables", true, + "whether insert into external tables is allowed"), + + HIVE_DRIVER_RUN_HOOKS("hive.exec.driver.run.hooks", "", + "A comma separated list of hooks which implement HiveDriverRunHook. Will be run at the beginning " + + "and end of Driver.run, these will be run in the order specified."), + HIVE_DDL_OUTPUT_FORMAT("hive.ddl.output.format", "", + "The data format to use for DDL output. One of \"text\" (for human\n" + + "readable text) or \"json\" (for a json object).\n"), + HIVE_ENTITY_SEPARATOR("hive.entity.separator", "@", + "Separator used to construct names of tables and partitions. For example, dbname@tablename@partitionname"), + + HIVE_SERVER2_MAX_START_ATTEMPTS("hive.server2.max.start.attempts", 30L, new RangeValidator(0L, Long.MAX_VALUE), + "This number of times HiveServer2 will attempt to start before exiting, sleeping 60 seconds between retries. \n" + + "The default of 30 will keep trying for 30 minutes."), + + HIVE_SERVER2_TRANSPORT_MODE("hive.server2.transport.mode", "binary", new StringSet("binary", "http"), + "Server transport mode. \"binary\" or \"http\""), // http (over thrift) transport settings - HIVE_SERVER2_THRIFT_HTTP_PORT("hive.server2.thrift.http.port", 10001), - HIVE_SERVER2_THRIFT_HTTP_PATH("hive.server2.thrift.http.path", "cliservice"), - HIVE_SERVER2_THRIFT_HTTP_MIN_WORKER_THREADS("hive.server2.thrift.http.min.worker.threads", 5), - HIVE_SERVER2_THRIFT_HTTP_MAX_WORKER_THREADS("hive.server2.thrift.http.max.worker.threads", 500), + HIVE_SERVER2_THRIFT_HTTP_PORT("hive.server2.thrift.http.port", 10001, + "Port number when in HTTP mode."), + HIVE_SERVER2_THRIFT_HTTP_PATH("hive.server2.thrift.http.path", "cliservice", + "Path component of URL endpoint when in HTTP mode."), + HIVE_SERVER2_THRIFT_HTTP_MIN_WORKER_THREADS("hive.server2.thrift.http.min.worker.threads", 5, + "Minimum number of worker threads when in HTTP mode."), + HIVE_SERVER2_THRIFT_HTTP_MAX_WORKER_THREADS("hive.server2.thrift.http.max.worker.threads", 500, + "Maximum number of worker threads when in HTTP mode."), // binary transport settings - HIVE_SERVER2_THRIFT_PORT("hive.server2.thrift.port", 10000), - HIVE_SERVER2_THRIFT_BIND_HOST("hive.server2.thrift.bind.host", ""), - HIVE_SERVER2_THRIFT_SASL_QOP("hive.server2.thrift.sasl.qop", "auth", - new StringsValidator("auth", "auth-int", "auth-conf")), - HIVE_SERVER2_THRIFT_MIN_WORKER_THREADS("hive.server2.thrift.min.worker.threads", 5), - HIVE_SERVER2_THRIFT_MAX_WORKER_THREADS("hive.server2.thrift.max.worker.threads", 500), + HIVE_SERVER2_THRIFT_PORT("hive.server2.thrift.port", 10000, + "Port number of HiveServer2 Thrift interface.\n" + + "Can be overridden by setting $HIVE_SERVER2_THRIFT_PORT"), + HIVE_SERVER2_THRIFT_BIND_HOST("hive.server2.thrift.bind.host", "", + "Bind host on which to run the HiveServer2 Thrift interface.\n" + + "Can be overridden by setting $HIVE_SERVER2_THRIFT_BIND_HOST"), + HIVE_SERVER2_THRIFT_SASL_QOP("hive.server2.thrift.sasl.qop", "auth", new StringSet("auth", "auth-int", "auth-conf"), + "Sasl QOP value; Set it to one of following values to enable higher levels of\n" + + " protection for HiveServer2 communication with clients.\n" + + " \"auth\" - authentication only (default)\n" + + " \"auth-int\" - authentication plus integrity protection\n" + + " \"auth-conf\" - authentication plus integrity and confidentiality protection\n" + + "This is applicable only if HiveServer2 is configured to use Kerberos authentication."), + HIVE_SERVER2_THRIFT_MIN_WORKER_THREADS("hive.server2.thrift.min.worker.threads", 5, + "Minimum number of Thrift worker threads"), + HIVE_SERVER2_THRIFT_MAX_WORKER_THREADS("hive.server2.thrift.max.worker.threads", 500, + "Maximum number of Thrift worker threads"), // Configuration for async thread pool in SessionManager - // Number of async threads - HIVE_SERVER2_ASYNC_EXEC_THREADS("hive.server2.async.exec.threads", 100), - // Number of seconds HiveServer2 shutdown will wait for async threads to terminate - HIVE_SERVER2_ASYNC_EXEC_SHUTDOWN_TIMEOUT("hive.server2.async.exec.shutdown.timeout", 10), - // Size of the wait queue for async thread pool in HiveServer2. - // After hitting this limit, the async thread pool will reject new requests. - HIVE_SERVER2_ASYNC_EXEC_WAIT_QUEUE_SIZE("hive.server2.async.exec.wait.queue.size", 100), - // Number of seconds that an idle HiveServer2 async thread (from the thread pool) - // will wait for a new task to arrive before terminating - HIVE_SERVER2_ASYNC_EXEC_KEEPALIVE_TIME("hive.server2.async.exec.keepalive.time", 10), - + HIVE_SERVER2_ASYNC_EXEC_THREADS("hive.server2.async.exec.threads", 100, + "Number of threads in the async thread pool for HiveServer2"), + HIVE_SERVER2_ASYNC_EXEC_SHUTDOWN_TIMEOUT("hive.server2.async.exec.shutdown.timeout", 10, + "Time (in seconds) for which HiveServer2 shutdown will wait for async"), + HIVE_SERVER2_ASYNC_EXEC_WAIT_QUEUE_SIZE("hive.server2.async.exec.wait.queue.size", 100, + "Size of the wait queue for async thread pool in HiveServer2.\n" + + "After hitting this limit, the async thread pool will reject new requests."), + HIVE_SERVER2_ASYNC_EXEC_KEEPALIVE_TIME("hive.server2.async.exec.keepalive.time", 10, + "Time (in seconds) that an idle HiveServer2 async thread (from the thread pool) will wait\n" + + "for a new task to arrive before terminating"), // HiveServer2 auth configuration - HIVE_SERVER2_AUTHENTICATION("hive.server2.authentication", "NONE", - new StringsValidator("NOSASL", "NONE", "LDAP", "KERBEROS", "CUSTOM")), - HIVE_SERVER2_KERBEROS_KEYTAB("hive.server2.authentication.kerberos.keytab", ""), - HIVE_SERVER2_KERBEROS_PRINCIPAL("hive.server2.authentication.kerberos.principal", ""), - HIVE_SERVER2_PLAIN_LDAP_URL("hive.server2.authentication.ldap.url", null), - HIVE_SERVER2_PLAIN_LDAP_BASEDN("hive.server2.authentication.ldap.baseDN", null), - HIVE_SERVER2_PLAIN_LDAP_DOMAIN("hive.server2.authentication.ldap.Domain", null), - HIVE_SERVER2_CUSTOM_AUTHENTICATION_CLASS("hive.server2.custom.authentication.class", null), - HIVE_SERVER2_ENABLE_DOAS("hive.server2.enable.doAs", true), - HIVE_SERVER2_TABLE_TYPE_MAPPING("hive.server2.table.type.mapping", "CLASSIC", - new StringsValidator("CLASSIC", "HIVE")), - HIVE_SERVER2_SESSION_HOOK("hive.server2.session.hook", ""), - HIVE_SERVER2_USE_SSL("hive.server2.use.SSL", false), - HIVE_SERVER2_SSL_KEYSTORE_PATH("hive.server2.keystore.path", ""), - HIVE_SERVER2_SSL_KEYSTORE_PASSWORD("hive.server2.keystore.password", ""), - - HIVE_SECURITY_COMMAND_WHITELIST("hive.security.command.whitelist", "set,reset,dfs,add,delete,compile"), - - HIVE_CONF_RESTRICTED_LIST("hive.conf.restricted.list", ""), + HIVE_SERVER2_AUTHENTICATION("hive.server2.authentication", "NONE", new StringSet("NOSASL", "NONE", "LDAP", "KERBEROS", "CUSTOM"), + "Client authentication types.\n" + + " NONE: no authentication check\n" + + " LDAP: LDAP/AD based authentication\n" + + " KERBEROS: Kerberos/GSSAPI authentication\n" + + " CUSTOM: Custom authentication provider\n" + + " (Use with property hive.server2.custom.authentication.class)"), + HIVE_SERVER2_KERBEROS_KEYTAB("hive.server2.authentication.kerberos.keytab", "", + "Kerberos keytab file for server principal"), + HIVE_SERVER2_KERBEROS_PRINCIPAL("hive.server2.authentication.kerberos.principal", "", + "Kerberos server principal"), + HIVE_SERVER2_PLAIN_LDAP_URL("hive.server2.authentication.ldap.url", "", "LDAP connection URL"), + HIVE_SERVER2_PLAIN_LDAP_BASEDN("hive.server2.authentication.ldap.baseDN", "", "LDAP base DN"), + HIVE_SERVER2_PLAIN_LDAP_DOMAIN("hive.server2.authentication.ldap.Domain", "", ""), + HIVE_SERVER2_CUSTOM_AUTHENTICATION_CLASS("hive.server2.custom.authentication.class", "", + "Custom authentication class. Used when property\n" + + "'hive.server2.authentication' is set to 'CUSTOM'. Provided class\n" + + "must be a proper implementation of the interface\n" + + "org.apache.hive.service.auth.PasswdAuthenticationProvider. HiveServer2\n" + + "will call its Authenticate(user, passed) method to authenticate requests.\n" + + "The implementation may optionally extend Hadoop's\n" + + "org.apache.hadoop.conf.Configured class to grab Hive's Configuration object.\n"), + HIVE_SERVER2_ENABLE_DOAS("hive.server2.enable.doAs", true, + "Setting this property to true will have HiveServer2 execute\n" + + "Hive operations as the user making the calls to it.\n"), + HIVE_SERVER2_TABLE_TYPE_MAPPING("hive.server2.table.type.mapping", "CLASSIC", new StringSet("CLASSIC", "HIVE"), + "This setting reflects how HiveServer2 will report the table types for JDBC and other\n" + + "client implementations that retrieve the available tables and supported table types\n" + + " HIVE : Exposes Hive's native table types like MANAGED_TABLE, EXTERNAL_TABLE, VIRTUAL_VIEW\n" + + " CLASSIC : More generic types like TABLE and VIEW"), + HIVE_SERVER2_SESSION_HOOK("hive.server2.session.hook", "", ""), + HIVE_SERVER2_USE_SSL("hive.server2.use.SSL", false, ""), + HIVE_SERVER2_SSL_KEYSTORE_PATH("hive.server2.keystore.path", "", ""), + HIVE_SERVER2_SSL_KEYSTORE_PASSWORD("hive.server2.keystore.password", "", ""), + + HIVE_SECURITY_COMMAND_WHITELIST("hive.security.command.whitelist", "set,reset,dfs,add,delete,compile", + "Comma separated list of non-SQL Hive commands users are authorized to execute"), + + HIVE_CONF_RESTRICTED_LIST("hive.conf.restricted.list", "", + "Comma separated list of configuration options which are immutable at runtime"), // If this is set all move tasks at the end of a multi-insert query will only begin once all // outputs are ready HIVE_MULTI_INSERT_MOVE_TASKS_SHARE_DEPENDENCIES( - "hive.multi.insert.move.tasks.share.dependencies", false), - - // If this is set, when writing partitions, the metadata will include the bucketing/sorting - // properties with which the data was written if any (this will not overwrite the metadata - // inherited from the table if the table is bucketed/sorted) - HIVE_INFER_BUCKET_SORT("hive.exec.infer.bucket.sort", false), - // If this is set, when setting the number of reducers for the map reduce task which writes the - // final output files, it will choose a number which is a power of two. The number of reducers - // may be set to a power of two, only to be followed by a merge task meaning preventing - // anything from being inferred. + "hive.multi.insert.move.tasks.share.dependencies", false, + "If this is set all move tasks for tables/partitions (not directories) at the end of a\n" + + "multi-insert query will only begin once the dependencies for all these move tasks have been\n" + + "met.\n" + + "Advantages: If concurrency is enabled, the locks will only be released once the query has\n" + + " finished, so with this config enabled, the time when the table/partition is\n" + + " generated will be much closer to when the lock on it is released.\n" + + "Disadvantages: If concurrency is not enabled, with this disabled, the tables/partitions which\n" + + " are produced by this query and finish earlier will be available for querying\n" + + " much earlier. Since the locks are only released once the query finishes, this\n" + + " does not apply if concurrency is enabled.\n"), + + HIVE_INFER_BUCKET_SORT("hive.exec.infer.bucket.sort", false, + "If this is set, when writing partitions, the metadata will include the bucketing/sorting\n" + + "properties with which the data was written if any (this will not overwrite the metadata\n" + + "inherited from the table if the table is bucketed/sorted)\n"), + HIVE_INFER_BUCKET_SORT_NUM_BUCKETS_POWER_TWO( - "hive.exec.infer.bucket.sort.num.buckets.power.two", false), + "hive.exec.infer.bucket.sort.num.buckets.power.two", false, + "If this is set, when setting the number of reducers for the map reduce task which writes the\n" + + "final output files, it will choose a number which is a power of two, unless the user specifies\n" + + "the number of reducers to use using mapred.reduce.tasks. The number of reducers\n" + + "may be set to a power of two, only to be followed by a merge task meaning preventing\n" + + "anything from being inferred.\n" + + "With hive.exec.infer.bucket.sort set to true:\n" + + "Advantages: If this is not set, the number of buckets for partitions will seem arbitrary,\n" + + " which means that the number of mappers used for optimized joins, for example, will\n" + + " be very low. With this set, since the number of buckets used for any partition is\n" + + " a power of two, the number of mappers used for optimized joins will be the least\n" + + " number of buckets used by any partition being joined.\n" + + "Disadvantages: This may mean a much larger or much smaller number of reducers being used in the\n" + + " final map reduce job, e.g. if a job was originally going to take 257 reducers,\n" + + " it will now take 512 reducers, similarly if the max number of reducers is 511,\n" + + " and a job was going to use this many, it will now use 256 reducers.\n"), /* The following section contains all configurations used for list bucketing feature.*/ /* This is not for clients. but only for block merge task. */ /* This is used by BlockMergeTask to send out flag to RCFileMergeMapper */ /* about alter table...concatenate and list bucketing case. */ HIVEMERGECURRENTJOBCONCATENATELISTBUCKETING( - "hive.merge.current.job.concatenate.list.bucketing", true), + "hive.merge.current.job.concatenate.list.bucketing", true, ""), /* This is not for clients. but only for block merge task. */ /* This is used by BlockMergeTask to send out flag to RCFileMergeMapper */ /* about depth of list bucketing. */ HIVEMERGECURRENTJOBCONCATENATELISTBUCKETINGDEPTH( - "hive.merge.current.job.concatenate.list.bucketing.depth", 0), - // Enable list bucketing optimizer. Default value is false so that we disable it by default. - HIVEOPTLISTBUCKETING("hive.optimize.listbucketing", false), + "hive.merge.current.job.concatenate.list.bucketing.depth", 0, ""), + HIVEOPTLISTBUCKETING("hive.optimize.listbucketing", false, + "Enable list bucketing optimizer. Default value is false so that we disable it by default."), // Allow TCP Keep alive socket option for for HiveServer or a maximum timeout for the socket. - - SERVER_READ_SOCKET_TIMEOUT("hive.server.read.socket.timeout", 10), - SERVER_TCP_KEEP_ALIVE("hive.server.tcp.keepalive", true), - - // Whether to show the unquoted partition names in query results. - HIVE_DECODE_PARTITION_NAME("hive.decode.partition.name", false), - - HIVE_EXECUTION_ENGINE("hive.execution.engine", "mr", - new StringsValidator("mr", "tez")), - HIVE_JAR_DIRECTORY("hive.jar.directory", "hdfs:///user/hive/"), - HIVE_USER_INSTALL_DIR("hive.user.install.directory", "hdfs:///user/"), + SERVER_READ_SOCKET_TIMEOUT("hive.server.read.socket.timeout", 10, + "Timeout for the HiveServer to close the connection if no response from the client in N seconds, defaults to 10 seconds."), + SERVER_TCP_KEEP_ALIVE("hive.server.tcp.keepalive", true, + "Whether to enable TCP keepalive for the Hive Server. Keepalive will prevent accumulation of half-open connections."), + + HIVE_DECODE_PARTITION_NAME("hive.decode.partition.name", false, + "Whether to show the unquoted partition names in query results."), + + HIVE_EXECUTION_ENGINE("hive.execution.engine", "mr", new StringSet("mr", "tez"), + "Chooses execution engine. Options are: mr (Map reduce, default) or tez (hadoop 2 only)"), + HIVE_JAR_DIRECTORY("hive.jar.directory", "hdfs:///user/hive/", + "This is the location hive in tez mode will look for to find a site wide \n" + + "installed hive instance."), + HIVE_USER_INSTALL_DIR("hive.user.install.directory", "hdfs:///user/", + "If hive (in tez mode only) cannot find a usable hive jar in \"hive.jar.directory\", \n" + + "it will upload the hive jar to <hive.user.install.directory>/<user name>\n" + + "and use it to run queries."), // Vectorization enabled - HIVE_VECTORIZATION_ENABLED("hive.vectorized.execution.enabled", false), - HIVE_VECTORIZATION_GROUPBY_CHECKINTERVAL("hive.vectorized.groupby.checkinterval", 100000), - HIVE_VECTORIZATION_GROUPBY_MAXENTRIES("hive.vectorized.groupby.maxentries", 1000000), - HIVE_VECTORIZATION_GROUPBY_FLUSH_PERCENT("hive.vectorized.groupby.flush.percent", (float) 0.1), + HIVE_VECTORIZATION_ENABLED("hive.vectorized.execution.enabled", false, + "This flag should be set to true to enable vectorized mode of query execution.\n" + + "The default value is false."), + HIVE_VECTORIZATION_GROUPBY_CHECKINTERVAL("hive.vectorized.groupby.checkinterval", 100000, + "Number of entries added to the group by aggregation hash before a reocmputation of average entry size is performed."), + HIVE_VECTORIZATION_GROUPBY_MAXENTRIES("hive.vectorized.groupby.maxentries", 1000000, + "Max number of entries in the vector group by aggregation hashtables. \n" + + "Exceeding this will trigger a flush irrelevant of memory pressure condition."), + HIVE_VECTORIZATION_GROUPBY_FLUSH_PERCENT("hive.vectorized.groupby.flush.percent", (float) 0.1, + "Percent of entries in the group by aggregation hash flushed when the memory treshold is exceeded."), - HIVE_TYPE_CHECK_ON_INSERT("hive.typecheck.on.insert", true), + HIVE_TYPE_CHECK_ON_INSERT("hive.typecheck.on.insert", true, ""), - // Whether to send the query plan via local resource or RPC - HIVE_RPC_QUERY_PLAN("hive.rpc.query.plan", false), + HIVE_RPC_QUERY_PLAN("hive.rpc.query.plan", false, + "Whether to send the query plan via local resource or RPC"), + HIVE_AM_SPLIT_GENERATION("hive.compute.splits.in.am", true, + "Whether to generate the splits locally or in the AM (tez only)"), - // Whether to generate the splits locally or in the AM (tez only) - HIVE_AM_SPLIT_GENERATION("hive.compute.splits.in.am", true), + HIVESTAGEIDREARRANGE("hive.stageid.rearrange", "none", new StringSet("none", "idonly", "traverse", "execution"), ""), + HIVEEXPLAINDEPENDENCYAPPENDTASKTYPES("hive.explain.dependency.append.tasktype", false, ""), - // none, idonly, traverse, execution - HIVESTAGEIDREARRANGE("hive.stageid.rearrange", "none"), - HIVEEXPLAINDEPENDENCYAPPENDTASKTYPES("hive.explain.dependency.append.tasktype", false), - - HIVECOUNTERGROUP("hive.counters.group.name", "HIVE"), + HIVECOUNTERGROUP("hive.counters.group.name", "HIVE", + "The name of counter group for internal Hive variables (CREATED_FILE, FATAL_ERROR, etc.)"), - // none, column - // none is the default(past) behavior. Implies only alphaNumeric and underscore are valid characters in identifiers. - // column: implies column names can contain any character. - HIVE_QUOTEDID_SUPPORT("hive.support.quoted.identifiers", "column", - new PatternValidator("none", "column")), - USERS_IN_ADMIN_ROLE("hive.users.in.admin.role","") + HIVE_QUOTEDID_SUPPORT("hive.support.quoted.identifiers", "column", new PatternSet("none", "column"), + "Whether to use quoted identifier. 'none' ot 'column' can be used. \n" + + " none: default(past) behavior. Implies only alphaNumeric and underscore are valid characters in identifiers.\n" + + " column: implies column names can contain any character." + ), + USERS_IN_ADMIN_ROLE("hive.users.in.admin.role", "", + "Comma separated list of users who are in admin role for bootstrapping.\n" + + "More users can be added in ADMIN role later.") ; - public final String varname; + private final String varname; public final String defaultVal; public final int defaultIntVal; public final long defaultLongVal; @@ -912,88 +1464,84 @@ public final Class valClass; public final boolean defaultBoolVal; - private final VarType type; + private final VarType valType; private final Validator validator; - ConfVars(String varname, String defaultVal) { - this(varname, defaultVal, null); - } + private final String description; - ConfVars(String varname, String defaultVal, Validator validator) { - this.varname = varname; - this.valClass = String.class; - this.defaultVal = defaultVal; - this.defaultIntVal = -1; - this.defaultLongVal = -1; - this.defaultFloatVal = -1; - this.defaultBoolVal = false; - this.type = VarType.STRING; - this.validator = validator; - } - - ConfVars(String varname, int defaultVal) { - this(varname, defaultVal, null); - } - - ConfVars(String varname, int defaultIntVal, Validator validator) { - this.varname = varname; - this.valClass = Integer.class; - this.defaultVal = Integer.toString(defaultIntVal); - this.defaultIntVal = defaultIntVal; - this.defaultLongVal = -1; - this.defaultFloatVal = -1; - this.defaultBoolVal = false; - this.type = VarType.INT; - this.validator = validator; - } + private final boolean shimed; + private String defaultValue; - ConfVars(String varname, long defaultVal) { - this(varname, defaultVal, null); + ConfVars(String varname, Object defaultVal, String description) { + this(varname, defaultVal, null, description, false); } - ConfVars(String varname, long defaultLongVal, Validator validator) { - this.varname = varname; - this.valClass = Long.class; - this.defaultVal = Long.toString(defaultLongVal); - this.defaultIntVal = -1; - this.defaultLongVal = defaultLongVal; - this.defaultFloatVal = -1; - this.defaultBoolVal = false; - this.type = VarType.LONG; - this.validator = validator; + ConfVars(String varname, Object defaultVal, String description, boolean shimed) { + this(varname, defaultVal, null, description, shimed); } - ConfVars(String varname, float defaultVal) { - this(varname, defaultVal, null); + ConfVars(String varname, Object defaultVal, Validator validator, String description) { + this(varname, defaultVal, validator, description, false); } - ConfVars(String varname, float defaultFloatVal, Validator validator) { + ConfVars(String varname, Object defaultVal, Validator validator, String description, boolean shimed) { this.varname = varname; - this.valClass = Float.class; - this.defaultVal = Float.toString(defaultFloatVal); - this.defaultIntVal = -1; - this.defaultLongVal = -1; - this.defaultFloatVal = defaultFloatVal; - this.defaultBoolVal = false; - this.type = VarType.FLOAT; this.validator = validator; + this.description = description; + this.shimed = shimed; + if (defaultVal instanceof String || defaultVal == null) { + this.valClass = String.class; + this.valType = VarType.STRING; + this.defaultVal = (String)defaultVal; + this.defaultIntVal = -1; + this.defaultLongVal = -1; + this.defaultFloatVal = -1; + this.defaultBoolVal = false; + } else if (defaultVal instanceof Integer) { + this.valClass = Integer.class; + this.valType = VarType.INT; + this.defaultVal = null; + this.defaultIntVal = (Integer)defaultVal; + this.defaultLongVal = -1; + this.defaultFloatVal = -1; + this.defaultBoolVal = false; + } else if (defaultVal instanceof Long) { + this.valClass = Long.class; + this.valType = VarType.LONG; + this.defaultVal = null; + this.defaultIntVal = -1; + this.defaultLongVal = (Long)defaultVal; + this.defaultFloatVal = -1; + this.defaultBoolVal = false; + } else if (defaultVal instanceof Float) { + this.valClass = Float.class; + this.valType = VarType.FLOAT; + this.defaultVal = null; + this.defaultIntVal = -1; + this.defaultLongVal = -1; + this.defaultFloatVal = (Float)defaultVal; + this.defaultBoolVal = false; + } else if (defaultVal instanceof Boolean) { + this.valClass = Boolean.class; + this.valType = VarType.BOOLEAN; + this.defaultVal = null; + this.defaultIntVal = -1; + this.defaultLongVal = -1; + this.defaultFloatVal = -1; + this.defaultBoolVal = (Boolean)defaultVal; + } else { + throw new IllegalArgumentException("Not supported type value " + defaultVal.getClass() + + " for name " + varname); + } } - ConfVars(String varname, boolean defaultBoolVal) { - this.varname = varname; - this.valClass = Boolean.class; - this.defaultVal = Boolean.toString(defaultBoolVal); - this.defaultIntVal = -1; - this.defaultLongVal = -1; - this.defaultFloatVal = -1; - this.defaultBoolVal = defaultBoolVal; - this.type = VarType.BOOLEAN; - this.validator = null; + public String varname() { + return shimed ? ShimLoader.getHadoopShims().getHadoopConfNames().get(varname) : varname; } public boolean isType(String value) { - return type.isType(value); + return valType.isType(value); } public String validate(String value) { @@ -1001,7 +1549,15 @@ public String validate(String value) { } public String typeString() { - return type.typeString(); + return valType.typeString(); + } + + public String getDescription() { + return description; + } + + public boolean isShimed() { + return shimed; } @Override @@ -1022,23 +1578,38 @@ private static String findHadoopBinary() { return val + (Shell.WINDOWS ? ".cmd" : ""); } + public String getDefaultValue() { + return valType.defaultValueString(this); + } + enum VarType { - STRING { @Override - void checkType(String value) throws Exception { } }, - INT { @Override - void checkType(String value) throws Exception { Integer.valueOf(value); } }, - LONG { @Override - void checkType(String value) throws Exception { Long.valueOf(value); } }, - FLOAT { @Override - void checkType(String value) throws Exception { Float.valueOf(value); } }, - BOOLEAN { @Override - void checkType(String value) throws Exception { Boolean.valueOf(value); } }; + STRING { + void checkType(String value) throws Exception { } + String defaultValueString(ConfVars confVar) { return confVar.defaultVal; } + }, + INT { + void checkType(String value) throws Exception { Integer.valueOf(value); } + String defaultValueString(ConfVars confVar) { return String.valueOf(confVar.defaultIntVal); } + }, + LONG { + void checkType(String value) throws Exception { Long.valueOf(value); } + String defaultValueString(ConfVars confVar) { return String.valueOf(confVar.defaultLongVal); } + }, + FLOAT { + void checkType(String value) throws Exception { Float.valueOf(value); } + String defaultValueString(ConfVars confVar) { return String.valueOf(confVar.defaultFloatVal); } + }, + BOOLEAN { + void checkType(String value) throws Exception { Boolean.valueOf(value); } + String defaultValueString(ConfVars confVar) { return String.valueOf(confVar.defaultBoolVal); } + }; boolean isType(String value) { try { checkType(value); } catch (Exception e) { return false; } return true; } String typeString() { return name().toUpperCase();} + abstract String defaultValueString(ConfVars confVar); abstract void checkType(String value) throws Exception; } } @@ -1397,91 +1968,6 @@ public static int getPositionFromInternalName(String internalName) { } /** - * validate value for a ConfVar, return non-null string for fail message - */ - public static interface Validator { - String validate(String value); - } - - public static class StringsValidator implements Validator { - private final Set expected = new LinkedHashSet(); - private StringsValidator(String... values) { - for (String value : values) { - expected.add(value.toLowerCase()); - } - } - @Override - public String validate(String value) { - if (value == null || !expected.contains(value.toLowerCase())) { - return "Invalid value.. expects one of " + expected; - } - return null; - } - } - - public static class LongRangeValidator implements Validator { - private final long lower, upper; - - public LongRangeValidator(long lower, long upper) { - this.lower = lower; - this.upper = upper; - } - - @Override - public String validate(String value) { - try { - if(value == null) { - return "Value cannot be null"; - } - value = value.trim(); - long lvalue = Long.parseLong(value); - if (lvalue < lower || lvalue > upper) { - return "Invalid value " + value + ", which should be in between " + lower + " and " + upper; - } - } catch (NumberFormatException e) { - return e.toString(); - } - return null; - } - } - - public static class PatternValidator implements Validator { - private final List expected = new ArrayList(); - private PatternValidator(String... values) { - for (String value : values) { - expected.add(Pattern.compile(value)); - } - } - @Override - public String validate(String value) { - if (value == null) { - return "Invalid value.. expects one of patterns " + expected; - } - for (Pattern pattern : expected) { - if (pattern.matcher(value).matches()) { - return null; - } - } - return "Invalid value.. expects one of patterns " + expected; - } - } - - public static class RatioValidator implements Validator { - @Override - public String validate(String value) { - try { - float fvalue = Float.valueOf(value); - if (fvalue <= 0 || fvalue >= 1) { - return "Invalid ratio " + value + ", which should be in between 0 to 1"; - } - } catch (NumberFormatException e) { - return e.toString(); - } - return null; - } - } - - /** * Append comma separated list of config vars to the restrict List * @param restrictListStr */ diff --git common/src/java/org/apache/hadoop/hive/conf/Validator.java common/src/java/org/apache/hadoop/hive/conf/Validator.java new file mode 100644 index 0000000..cea9c41 --- /dev/null +++ common/src/java/org/apache/hadoop/hive/conf/Validator.java @@ -0,0 +1,159 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.hadoop.hive.conf; + +import java.util.ArrayList; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Set; +import java.util.regex.Pattern; + +/** + * validate value for a ConfVar, return non-null string for fail message + */ +public interface Validator { + + String validate(String value); + + static class StringSet implements Validator { + + private final Set expected = new LinkedHashSet(); + + public StringSet(String... values) { + for (String value : values) { + expected.add(value.toLowerCase()); + } + } + + @Override + public String validate(String value) { + if (value == null || !expected.contains(value.toLowerCase())) { + return "Invalid value.. expects one of " + expected; + } + return null; + } + } + + static enum RANGE_TYPE { + INT { + @Override + protected boolean inRange(String value, Object lower, Object upper) { + int ivalue = Integer.parseInt(value); + return (Integer)lower <= ivalue && ivalue <= (Integer)upper; + } + }, + LONG { + @Override + protected boolean inRange(String value, Object lower, Object upper) { + long lvalue = Long.parseLong(value); + return (Long)lower <= lvalue && lvalue <= (Long)upper; + } + }, + FLOAT { + @Override + protected boolean inRange(String value, Object lower, Object upper) { + float fvalue = Float.parseFloat(value); + return (Float)lower <= fvalue && fvalue <= (Float)upper; + } + }; + + public static RANGE_TYPE valueOf(Object lower, Object upper) { + if (lower instanceof Integer && upper instanceof Integer) { + assert (Integer)lower < (Integer)upper; + return INT; + } else if (lower instanceof Long && upper instanceof Long) { + assert (Long)lower < (Long)upper; + return LONG; + } else if (lower instanceof Float && upper instanceof Float) { + assert (Float)lower < (Float)upper; + return FLOAT; + } + throw new IllegalArgumentException("invalid range from " + lower + " to " + upper); + } + + protected abstract boolean inRange(String value, Object lower, Object upper); + } + + static class RangeValidator implements Validator { + + private final RANGE_TYPE type; + private final Object lower, upper; + + public RangeValidator(Object lower, Object upper) { + this.lower = lower; + this.upper = upper; + this.type = RANGE_TYPE.valueOf(lower, upper); + } + + @Override + public String validate(String value) { + try { + if (value == null) { + return "Value cannot be null"; + } + if (!type.inRange(value.trim(), lower, upper)) { + return "Invalid value " + value + ", which should be in between " + lower + " and " + upper; + } + } catch (Exception e) { + return e.toString(); + } + return null; + } + } + + static class PatternSet implements Validator { + + private final List expected = new ArrayList(); + + public PatternSet(String... values) { + for (String value : values) { + expected.add(Pattern.compile(value)); + } + } + + @Override + public String validate(String value) { + if (value == null) { + return "Invalid value.. expects one of patterns " + expected; + } + for (Pattern pattern : expected) { + if (pattern.matcher(value).matches()) { + return null; + } + } + return "Invalid value.. expects one of patterns " + expected; + } + } + + static class RatioValidator implements Validator { + + @Override + public String validate(String value) { + try { + float fvalue = Float.valueOf(value); + if (fvalue <= 0 || fvalue >= 1) { + return "Invalid ratio " + value + ", which should be in between 0 to 1"; + } + } catch (NumberFormatException e) { + return e.toString(); + } + return null; + } + } +} diff --git common/src/java/org/apache/hive/common/util/SystemVariables.java common/src/java/org/apache/hive/common/util/SystemVariables.java new file mode 100644 index 0000000..e3d9b54 --- /dev/null +++ common/src/java/org/apache/hive/common/util/SystemVariables.java @@ -0,0 +1,83 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.hive.common.util; + +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.apache.hadoop.hive.conf.HiveConf; +import org.apache.hadoop.hive.conf.HiveConf.ConfVars; + +public class SystemVariables { + + private static final Log l4j = LogFactory.getLog(SystemVariables.class); + protected static Pattern varPat = Pattern.compile("\\$\\{[^\\}\\$\u0020]+\\}"); + + public static final String ENV_PREFIX = "env:"; + public static final String SYSTEM_PREFIX = "system:"; + public static final String HIVECONF_PREFIX = "hiveconf:"; + public static final String HIVEVAR_PREFIX = "hivevar:"; + public static final String SET_COLUMN_NAME = "set"; + + protected String getSubstitute(HiveConf conf, String var) { + String val = null; + try { + if (var.startsWith(SYSTEM_PREFIX)) { + val = System.getProperty(var.substring(SYSTEM_PREFIX.length())); + } + } catch(SecurityException se) { + l4j.warn("Unexpected SecurityException in Configuration", se); + } + if (val == null) { + if (var.startsWith(ENV_PREFIX)) { + val = System.getenv(var.substring(ENV_PREFIX.length())); + } + } + return val; + } + + public String substitute(HiveConf conf, String expr) { + int depth = conf.getIntVar(ConfVars.HIVEVARIABLESUBSTITUTEDEPTH); + return substitute(conf, expr, depth); + } + + public String substitute(HiveConf conf, String expr, int depth) { + Matcher match = varPat.matcher(""); + String eval = expr; + for(int s = 0; s < depth; s++) { + match.reset(eval); + if (!match.find()) { + return eval; + } + String var = match.group(); + var = var.substring(2, var.length()-1); // remove ${ .. } + String val = getSubstitute(conf, var); + + if (val == null) { + l4j.debug("Interpolation result: " + eval); + return eval; // return literal, no substitution found + } + // substitute + eval = eval.substring(0, match.start()) + val + eval.substring(match.end()); + } + throw new IllegalStateException("Variable substitution depth too large: " + + conf.getIntVar(ConfVars.HIVEVARIABLESUBSTITUTEDEPTH) + " " + expr); + } +} diff --git common/src/test/org/apache/hadoop/hive/conf/TestHiveConf.java common/src/test/org/apache/hadoop/hive/conf/TestHiveConf.java index a31238b..78bf98f 100644 --- common/src/test/org/apache/hadoop/hive/conf/TestHiveConf.java +++ common/src/test/org/apache/hadoop/hive/conf/TestHiveConf.java @@ -18,7 +18,6 @@ package org.apache.hadoop.hive.conf; import org.apache.hadoop.conf.Configuration; -import org.apache.hadoop.fs.Path; import org.apache.hadoop.hive.conf.HiveConf.ConfVars; import org.apache.hive.common.util.HiveTestUtils; import org.junit.Assert; @@ -61,19 +60,19 @@ public void testConfProperties() throws Exception { // checkHiveConf(ConfVars.HADOOPFS.varname, "core-site.xml"); // Make sure non-null-valued ConfVar properties *do* override the Hadoop Configuration - checkHadoopConf(ConfVars.HADOOPNUMREDUCERS.varname, "1"); + checkHadoopConf(ConfVars.HADOOPNUMREDUCERS.varname(), "1"); checkConfVar(ConfVars.HADOOPNUMREDUCERS, "-1"); - checkHiveConf(ConfVars.HADOOPNUMREDUCERS.varname, "-1"); + checkHiveConf(ConfVars.HADOOPNUMREDUCERS.varname(), "-1"); // Non-null ConfVar only defined in ConfVars - checkHadoopConf(ConfVars.HIVESKEWJOINKEY.varname, null); + checkHadoopConf(ConfVars.HIVESKEWJOINKEY.varname(), null); checkConfVar(ConfVars.HIVESKEWJOINKEY, "100000"); - checkHiveConf(ConfVars.HIVESKEWJOINKEY.varname, "100000"); + checkHiveConf(ConfVars.HIVESKEWJOINKEY.varname(), "100000"); // ConfVar overridden in in hive-site.xml - checkHadoopConf(ConfVars.METASTORE_CONNECTION_DRIVER.varname, null); + checkHadoopConf(ConfVars.METASTORE_CONNECTION_DRIVER.varname(), null); checkConfVar(ConfVars.METASTORE_CONNECTION_DRIVER, "org.apache.derby.jdbc.EmbeddedDriver"); - checkHiveConf(ConfVars.METASTORE_CONNECTION_DRIVER.varname, "hive-site.xml"); + checkHiveConf(ConfVars.METASTORE_CONNECTION_DRIVER.varname(), "hive-site.xml"); // Property defined in hive-site.xml only checkHadoopConf("test.property1", null); diff --git common/src/test/org/apache/hadoop/hive/conf/TestHiveConfRestrictList.java common/src/test/org/apache/hadoop/hive/conf/TestHiveConfRestrictList.java index a7270a2..eeef868 100644 --- common/src/test/org/apache/hadoop/hive/conf/TestHiveConfRestrictList.java +++ common/src/test/org/apache/hadoop/hive/conf/TestHiveConfRestrictList.java @@ -19,7 +19,6 @@ import junit.framework.TestCase; -import org.apache.hadoop.hive.conf.HiveConf; import org.apache.hadoop.hive.conf.HiveConf.ConfVars; import org.junit.Test; @@ -30,8 +29,8 @@ @Override protected void setUp() throws Exception { super.setUp(); - System.setProperty(ConfVars.HIVE_CONF_RESTRICTED_LIST.varname, - ConfVars.HIVETESTMODEPREFIX.varname); + System.setProperty(ConfVars.HIVE_CONF_RESTRICTED_LIST.varname(), + ConfVars.HIVETESTMODEPREFIX.varname()); conf = new HiveConf(); } @@ -41,8 +40,8 @@ protected void setUp() throws Exception { */ @Test public void testRestriction() throws Exception { - verifyRestriction(ConfVars.HIVETESTMODEPREFIX.varname, "foo"); - conf.verifyAndSet(ConfVars.HIVETESTMODE.varname, "false"); + verifyRestriction(ConfVars.HIVETESTMODEPREFIX.varname(), "foo"); + conf.verifyAndSet(ConfVars.HIVETESTMODE.varname(), "false"); } /** @@ -51,7 +50,7 @@ public void testRestriction() throws Exception { */ @Test public void testRestrictList() throws Exception { - verifyRestriction(ConfVars.HIVE_CONF_RESTRICTED_LIST.varname, "foo"); + verifyRestriction(ConfVars.HIVE_CONF_RESTRICTED_LIST.varname(), "foo"); } /** @@ -60,25 +59,25 @@ public void testRestrictList() throws Exception { */ @Test public void testAppendRestriction() throws Exception { - String appendListStr = ConfVars.SCRATCHDIR.varname + "," + - ConfVars.LOCALSCRATCHDIR.varname + "," + - ConfVars.METASTOREURIS.varname; + String appendListStr = ConfVars.SCRATCHDIR.varname() + "," + + ConfVars.LOCALSCRATCHDIR.varname() + "," + + ConfVars.METASTOREURIS.varname(); conf.addToRestrictList(appendListStr); // check if the new configs are added to HIVE_CONF_RESTRICTED_LIST String newRestrictList = conf.getVar(ConfVars.HIVE_CONF_RESTRICTED_LIST); - assertTrue(newRestrictList.contains(ConfVars.SCRATCHDIR.varname)); - assertTrue(newRestrictList.contains(ConfVars.LOCALSCRATCHDIR.varname)); - assertTrue(newRestrictList.contains(ConfVars.METASTOREURIS.varname)); + assertTrue(newRestrictList.contains(ConfVars.SCRATCHDIR.varname())); + assertTrue(newRestrictList.contains(ConfVars.LOCALSCRATCHDIR.varname())); + assertTrue(newRestrictList.contains(ConfVars.METASTOREURIS.varname())); // check if the old values are still there in HIVE_CONF_RESTRICTED_LIST - assertTrue(newRestrictList.contains(ConfVars.HIVETESTMODEPREFIX.varname)); + assertTrue(newRestrictList.contains(ConfVars.HIVETESTMODEPREFIX.varname())); // verify that the new configs are in effect - verifyRestriction(ConfVars.HIVETESTMODEPREFIX.varname, "foo"); - verifyRestriction(ConfVars.HIVE_CONF_RESTRICTED_LIST.varname, "foo"); - verifyRestriction(ConfVars.LOCALSCRATCHDIR.varname, "foo"); - verifyRestriction(ConfVars.METASTOREURIS.varname, "foo"); + verifyRestriction(ConfVars.HIVETESTMODEPREFIX.varname(), "foo"); + verifyRestriction(ConfVars.HIVE_CONF_RESTRICTED_LIST.varname(), "foo"); + verifyRestriction(ConfVars.LOCALSCRATCHDIR.varname(), "foo"); + verifyRestriction(ConfVars.METASTOREURIS.varname(), "foo"); } private void verifyRestriction(String varName, String newVal) { diff --git common/src/test/org/apache/hadoop/hive/conf/TestHiveLogging.java common/src/test/org/apache/hadoop/hive/conf/TestHiveLogging.java index d8cdd57..1bca87c 100644 --- common/src/test/org/apache/hadoop/hive/conf/TestHiveLogging.java +++ common/src/test/org/apache/hadoop/hive/conf/TestHiveLogging.java @@ -18,7 +18,6 @@ package org.apache.hadoop.hive.conf; import java.io.BufferedReader; -import java.io.IOException; import java.io.InputStreamReader; import junit.framework.TestCase; @@ -26,7 +25,6 @@ import org.apache.hadoop.hive.common.LogUtils; import org.apache.hadoop.hive.conf.HiveConf.ConfVars; import org.apache.hive.common.util.HiveTestUtils; -import org.apache.hadoop.hive.conf.HiveConf.ConfVars; /** * TestHiveLogging @@ -48,8 +46,8 @@ private void configLog(String hiveLog4jTest, String hiveExecLog4jTest) throws Exception { String expectedLog4jTestPath = HiveTestUtils.getFileFromClasspath(hiveLog4jTest); String expectedLog4jExecPath = HiveTestUtils.getFileFromClasspath(hiveExecLog4jTest); - System.setProperty(ConfVars.HIVE_LOG4J_FILE.varname, expectedLog4jTestPath); - System.setProperty(ConfVars.HIVE_EXEC_LOG4J_FILE.varname, expectedLog4jExecPath); + System.setProperty(ConfVars.HIVE_LOG4J_FILE.varname(), expectedLog4jTestPath); + System.setProperty(ConfVars.HIVE_EXEC_LOG4J_FILE.varname(), expectedLog4jExecPath); LogUtils.initHiveLog4j(); diff --git conf/hive-default.xml.template conf/hive-default.xml.template index 420d959..ab0fd41 100644 --- conf/hive-default.xml.template +++ conf/hive-default.xml.template @@ -1,5 +1,6 @@ - + + - - - - - - - - - - mapred.reduce.tasks - -1 - The default number of reduce tasks per job. Typically set - to a prime close to the number of available hosts. Ignored when - mapred.job.tracker is "local". Hadoop set this to 1 by default, whereas Hive uses -1 as its default value. - By setting this property to -1, Hive will automatically figure out what should be the number of reducers. - - - - - hive.exec.reducers.bytes.per.reducer - 1000000000 - size per reducer.The default is 1G, i.e if the input size is 10G, it will use 10 reducers. - - - - hive.exec.reducers.max - 999 - max number of reducers will be used. If the one - specified in the configuration parameter mapred.reduce.tasks is - negative, Hive will use this one as the max number of reducers when - automatically determine number of reducers. - - - - hive.cli.print.header - false - Whether to print the names of the columns in query output. - - - - hive.cli.print.current.db - false - Whether to include the current database in the Hive prompt. - - - - hive.cli.prompt - hive - Command line prompt configuration value. Other hiveconf can be used in - this configuration value. Variable substitution will only be invoked at the Hive - CLI startup. - - - - hive.cli.pretty.output.num.cols - -1 - The number of columns to use when formatting output generated - by the DESCRIBE PRETTY table_name command. If the value of this property - is -1, then Hive will use the auto-detected terminal width. - - - - hive.exec.scratchdir - /tmp/hive-${user.name} - Scratch space for Hive jobs - - - - hive.exec.local.scratchdir - /tmp/${user.name} - Local scratch space for Hive jobs - - - - hive.test.mode - false - Whether Hive is running in test mode. If yes, it turns on sampling and prefixes the output tablename. - - - - hive.test.mode.prefix - test_ - if Hive is running in test mode, prefixes the output table by this string - - - - - - - - - - - hive.test.mode.samplefreq - 32 - if Hive is running in test mode and table is not bucketed, sampling frequency - - - - hive.test.mode.nosamplelist - - if Hive is running in test mode, don't sample the above comma separated list of tables - - - - hive.metastore.uris - - Thrift URI for the remote metastore. Used by metastore client to connect to remote metastore. - - - - javax.jdo.option.ConnectionURL - jdbc:derby:;databaseName=metastore_db;create=true - JDBC connect string for a JDBC metastore - - - - javax.jdo.option.ConnectionDriverName - org.apache.derby.jdbc.EmbeddedDriver - Driver class name for a JDBC metastore - - - - javax.jdo.PersistenceManagerFactoryClass - org.datanucleus.api.jdo.JDOPersistenceManagerFactory - class implementing the jdo persistence - - - - javax.jdo.option.DetachAllOnCommit - true - detaches all objects from session so that they can be used after transaction is committed - - - - javax.jdo.option.NonTransactionalRead - true - reads outside of transactions - - - - javax.jdo.option.ConnectionUserName - APP - username to use against metastore database - - - - javax.jdo.option.ConnectionPassword - mine - password to use against metastore database - - - - javax.jdo.option.Multithreaded - true - Set this to true if multiple threads access metastore through JDO concurrently. - - - - datanucleus.connectionPoolingType - BoneCP - Uses a BoneCP connection pool for JDBC metastore - - - - datanucleus.validateTables - false - validates existing schema against code. turn this on if you want to verify existing schema - - - - datanucleus.validateColumns - false - validates existing schema against code. turn this on if you want to verify existing schema - - - - datanucleus.validateConstraints - false - validates existing schema against code. turn this on if you want to verify existing schema - - - - datanucleus.storeManagerType - rdbms - metadata store type - - - - datanucleus.autoCreateSchema - true - creates necessary schema on a startup if one doesn't exist. set this to false, after creating it once - - - - datanucleus.autoStartMechanismMode - checked - throw exception if metadata tables are incorrect - - - - datanucleus.transactionIsolation - read-committed - Default transaction isolation level for identity generation. - - - - datanucleus.cache.level2 - false - Use a level 2 cache. Turn this off if metadata is changed independently of Hive metastore server - - - - datanucleus.cache.level2.type - SOFT - SOFT=soft reference based cache, WEAK=weak reference based cache. - - - - datanucleus.identifierFactory - datanucleus1 - Name of the identifier factory to use when generating table/column names etc. 'datanucleus1' is used for backward compatibility with DataNucleus v1 - - - - datanucleus.plugin.pluginRegistryBundleCheck - LOG - Defines what happens when plugin bundles are found and are duplicated [EXCEPTION|LOG|NONE] - - - - hive.metastore.warehouse.dir - /user/hive/warehouse - location of default database for the warehouse - - - - hive.metastore.execute.setugi - false - In unsecure mode, setting this property to true will cause the metastore to execute DFS operations using the client's reported user and group permissions. Note that this property must be set on both the client and server sides. Further note that its best effort. If client sets its to true and server sets it to false, client setting will be ignored. - - - - hive.metastore.event.listeners - - list of comma separated listeners for metastore events. - - - - hive.metastore.partition.inherit.table.properties - - list of comma separated keys occurring in table properties which will get inherited to newly created partitions. * implies all the keys will get inherited. - - - - hive.metadata.export.location - - When used in conjunction with the org.apache.hadoop.hive.ql.parse.MetaDataExportListener pre event listener, it is the location to which the metadata will be exported. The default is an empty string, which results in the metadata being exported to the current user's home directory on HDFS. - - - - hive.metadata.move.exported.metadata.to.trash - - When used in conjunction with the org.apache.hadoop.hive.ql.parse.MetaDataExportListener pre event listener, this setting determines if the metadata that is exported will subsequently be moved to the user's trash directory alongside the dropped table data. This ensures that the metadata will be cleaned up along with the dropped table data. - - - - hive.metastore.partition.name.whitelist.pattern - - Partition names will be checked against this regex pattern and rejected if not matched. - - - - hive.metastore.disallow.incompatible.col.type.change - - If true (default is false), ALTER TABLE operations which change the type of - a column (say STRING) to an incompatible type (say MAP<STRING, STRING>) are disallowed. - RCFile default SerDe (ColumnarSerDe) serializes the values in such a way that the - datatypes can be converted from string to any type. The map is also serialized as - a string, which can be read as a string as well. However, with any binary - serialization, this is not true. Blocking the ALTER TABLE prevents ClassCastExceptions - when subsequently trying to access old partitions. + + + + + + hive.exec.script.wrapper + + + + + hive.exec.plan + + + + + hive.plan.serialization.format + kryo + + Query plan format serialization between client and task nodes. + + + + hive.exec.scratchdir + /tmp/hive-navis + Scratch space for Hive jobs + + + hive.exec.local.scratchdir + /tmp/navis + Local scratch space for Hive jobs + + + hive.scratch.dir.permission + 700 + + + + hive.exec.submitviachild + false + + + + hive.exec.script.maxerrsize + 100000 + + Maximum number of bytes a script is allowed to emit to standard error (per map-reduce task). + + + + hive.exec.script.allow.partial.consumption + false + When enabled, this option allows a user script to exit successfully without consuming all the data from the standard input. + + + stream.stderr.reporter.prefix + reporter: + Streaming jobs that log to standard error with this prefix can log counter or status information. + + + stream.stderr.reporter.enabled + true + Enable consumption of status and counter messages for streaming jobs. + + + hive.exec.compress.output + false + + This controls whether the final outputs of a query (to a local/HDFS file or a Hive table) is compressed. + + + + hive.exec.compress.intermediate + false + + This controls whether intermediate files produced by Hive between multiple map-reduce jobs are compressed. + + + + hive.intermediate.compression.codec + + + + + hive.intermediate.compression.valType + + + + + hive.exec.reducers.bytes.per.reducer + 1000000000 + size per reducer.The default is 1G, i.e if the input size is 10G, it will use 10 reducers. + + + hive.exec.reducers.max + 999 + + max number of reducers will be used. If the one specified in the configuration parameter mapred.reduce.tasks is + + + + hive.exec.pre.hooks + + + Comma-separated list of pre-execution hooks to be invoked for each statement. + A pre-execution hook is specified as the name of a Java class which implements the + + + + hive.exec.post.hooks + + + Comma-separated list of post-execution hooks to be invoked for each statement. + A post-execution hook is specified as the name of a Java class which implements the + + + + hive.exec.failure.hooks + + + Comma-separated list of on-failure hooks to be invoked for each statement. + An on-failure hook is specified as the name of Java class which implements the + + + + hive.client.stats.publishers + + + Comma-separated list of statistics publishers to be invoked on counters on each job. + A client stats publisher is specified as the name of a Java class which implements the + + + + hive.exec.parallel + false + Whether to execute jobs in parallel + + + hive.exec.parallel.thread.number + 8 + How many jobs at most can be executed in parallel + + + hive.mapred.reduce.tasks.speculative.execution + true + Whether speculative execution for reducers should be turned on. + + + hive.exec.counters.pull.interval + 1000 + + The interval with which to poll the JobTracker for the counters the running job. + + + + hive.exec.dynamic.partition + true + Whether or not to allow dynamic partitions in DML/DDL. + + + hive.exec.dynamic.partition.mode + strict + In strict mode, the user must specify at least one static partition in case the user accidentally overwrites all partitions. + + + hive.exec.max.dynamic.partitions + 1000 + Maximum number of dynamic partitions allowed to be created in total. + + + hive.exec.max.dynamic.partitions.pernode + 100 + Maximum number of dynamic partitions allowed to be created in each mapper/reducer node. + + + hive.exec.max.created.files + 100000 + Maximum number of HDFS files created by all mappers/reducers in a MapReduce job. + + + hive.downloaded.resources.dir + /tmp/${hive.session.id}_resources + + The default partition name in case the dynamic partition column value is null/empty string or any other values that cannot be escaped. + This value must not contain any special character used in HDFS URI (e.g., ':', '%', '/' etc). + + + + hive.exec.default.partition.name + __HIVE_DEFAULT_PARTITION__ + + + + hive.lockmgr.zookeeper.default.partition.name + __HIVE_DEFAULT_ZOOKEEPER_PARTITION__ + + + + hive.exec.show.job.failure.debug.info + true + + If a job fails, whether to provide a link in the CLI to the task with the + + + + hive.exec.job.debug.capture.stacktraces + true + + Whether or not stack traces parsed from the task logs of a sampled failed task + + + + hive.exec.job.debug.timeout + 30000 + + + + hive.exec.tasklog.debug.timeout + 20000 + + + + hive.output.file.extension + + String used as a file extension for output files. If not set, defaults to the codec extension for text files (e.g. ".gz"), or no extension otherwise. + + + hive.in.test + false + internal usage only, true in test mode + + + hive.exec.mode.local.auto + false + Let Hive determine whether to run in local mode automatically + + + hive.exec.mode.local.auto.inputbytes.max + 134217728 + When hive.exec.mode.local.auto is true, input bytes should less than this for local mode. + + + hive.exec.mode.local.auto.input.files.max + 4 + When hive.exec.mode.local.auto is true, the number of tasks should less than this for local mode. + + + hive.exec.drop.ignorenonexistent + true + Do not report an error if DROP TABLE/VIEW specifies a non-existent table/view + + + hive.ignore.mapjoin.hint + true + Ignore the mapjoin hint + + + hive.file.max.footer + 100 + maximum number of lines for footer user can define for a table file + + + hadoop.bin.path + /usr/bin/hadoop + + + + fs.har.impl + org.apache.hadoop.hive.shims.HiveHarFileSystem + The implementation for accessing Hadoop Archives. Note that this won't be applicable to Hadoop versions less than 0.20 + + + HADOOPNUMREDUCERS + -1 + + + + HADOOPJOBNAME + + + + + HADOOPSPECULATIVEEXECREDUCERS + true + + + + MAPREDSETUPCLEANUPNEEDED + false + + + + MAPREDTASKCLEANUPNEEDED + false + + + + hive.metastore.metadb.dir + + + + + hive.metastore.warehouse.dir + /user/hive/warehouse + location of default database for the warehouse + + + hive.metastore.uris + + Thrift URI for the remote metastore. Used by metastore client to connect to remote metastore. + + + hive.metastore.connect.retries + 3 + Number of retries while opening a connection to metastore + + + hive.metastore.failure.retries + 1 + Number of retries upon failure of Thrift metastore calls + + + hive.metastore.client.connect.retry.delay + 1 + Number of seconds for the client to wait between consecutive connection attempts + + + hive.metastore.client.socket.timeout + 20 + MetaStore Client socket timeout in seconds + + + javax.jdo.option.ConnectionPassword + mine + password to use against metastore database + + + hive.metastore.ds.connection.url.hook + + Name of the hook to use for retrieving the JDO connection URL. If empty, the value in javax.jdo.option.ConnectionURL is used + + + javax.jdo.option.Multithreaded + true + Set this to true if multiple threads access metastore through JDO concurrently. + + + javax.jdo.option.ConnectionURL + jdbc:derby:;databaseName=metastore_db;create=true + JDBC connect string for a JDBC metastore + + + hive.metastore.ds.retry.attempts + 1 + The number of times to retry a metastore call if there were a connection error + + + hive.metastore.ds.retry.interval + 1000 + The number of milliseconds between metastore retry attempts + + + hive.metastore.force.reload.conf + false + + Whether to force reloading of the metastore configuration (including + the connection URL, before the next metastore query that accesses the + datastore. Once reloaded, this value is reset to false. Used for + testing only. + + + + hive.hmshandler.retry.attempts + 1 + The number of times to retry a HMSHandler call if there were a connection error + + + hive.hmshandler.retry.interval + 1000 + The number of milliseconds between HMSHandler retry attempts + + + hive.hmshandler.force.reload.conf + false + + Whether to force reloading of the HMSHandler configuration (including + the connection URL, before the next metastore query that accesses the + datastore. Once reloaded, this value is reset to false. Used for + testing only. + + + + hive.metastore.server.min.threads + 200 + Minimum number of worker threads in the Thrift server's pool. + + + hive.metastore.server.max.threads + 100000 + Maximum number of worker threads in the Thrift server's pool. + + + hive.metastore.server.tcp.keepalive + true + Whether to enable TCP keepalive for the metastore server. Keepalive will prevent accumulation of half-open connections. + + + hive.metastore.archive.intermediate.original + _INTERMEDIATE_ORIGINAL + + Intermediate dir suffixes used for archiving. Not important what they + are, as long as collisions are avoided + + + + hive.metastore.archive.intermediate.archived + _INTERMEDIATE_ARCHIVED + + + + hive.metastore.archive.intermediate.extracted + _INTERMEDIATE_EXTRACTED + + + + hive.metastore.kerberos.keytab.file + + The path to the Kerberos Keytab file containing the metastore Thrift server's service principal. + + + hive.metastore.kerberos.principal + hive-metastore/_HOST@EXAMPLE.COM + The service principal for the metastore Thrift server. The special string _HOST will be replaced automatically with the correct host name. + + + hive.metastore.sasl.enabled + false + If true, the metastore Thrift interface will be secured with SASL. Clients must authenticate with Kerberos. + + + hive.metastore.thrift.framed.transport.enabled + false + If true, the metastore Thrift interface will use TFramedTransport. When false (default) a standard TTransport is used. + + + hive.cluster.delegation.token.store.class + org.apache.hadoop.hive.thrift.MemoryTokenStore + The delegation token store implementation. Set to org.apache.hadoop.hive.thrift.ZooKeeperTokenStore for load-balanced cluster. + + + hive.cluster.delegation.token.store.zookeeper.connectString + + The ZooKeeper token store connect string. + + + hive.cluster.delegation.token.store.zookeeper.znode + /hive/cluster/delegation + The root path for token store data. + + + hive.cluster.delegation.token.store.zookeeper.acl + + ACL for token store entries. List comma separated all server principals for the cluster. + + + hive.metastore.cache.pinobjtypes + Table,StorageDescriptor,SerDeInfo,Partition,Database,Type,FieldSchema,Order + List of comma separated metastore object types that should be pinned in the cache + + + datanucleus.connectionPoolingType + BONECP + Specify connection pool library for datanucleus + + + datanucleus.validateTables + false + validates existing schema against code. turn this on if you want to verify existing schema + + + datanucleus.validateColumns + false + validates existing schema against code. turn this on if you want to verify existing schema + + + datanucleus.validateConstraints + false + validates existing schema against code. turn this on if you want to verify existing schema + + + datanucleus.storeManagerType + rdbms + metadata store type + + + datanucleus.autoCreateSchema + true + creates necessary schema on a startup if one doesn't exist. set this to false, after creating it once + + + datanucleus.fixedDatastore + false + + + + hive.metastore.schema.verification + false + + Enforce metastore schema version consistency. + True: Verify that version information stored in metastore matches with one from Hive jars. Also disable automatic + schema migration attempt. Users are required to manually migrate schema after Hive upgrade which ensures + proper metastore schema migration. (Default) + + + + datanucleus.autoStartMechanismMode + checked + throw exception if metadata tables are incorrect + + + datanucleus.transactionIsolation + read-committed + Default transaction isolation level for identity generation. + + + datanucleus.cache.level2 + false + Use a level 2 cache. Turn this off if metadata is changed independently of Hive metastore server + + + datanucleus.cache.level2.valType + none + + + + datanucleus.identifierFactory + datanucleus1 + + Name of the identifier factory to use when generating table/column names etc. + + + + datanucleus.rdbms.useLegacyNativeValueStrategy + true + + + + datanucleus.plugin.pluginRegistryBundleCheck + LOG + Defines what happens when plugin bundles are found and are duplicated [EXCEPTION|LOG|NONE] + + + hive.metastore.batch.retrieve.max + 300 + + Maximum number of objects (tables/partitions) can be retrieved from metastore in one batch. + The higher the number, the less the number of round trips is needed to the Hive metastore server, + + + + hive.metastore.batch.retrieve.table.partition.max + 1000 + Maximum number of table partitions that metastore internally retrieves in one batch. + + + hive.metastore.init.hooks + + + A comma separated list of hooks to be invoked at the beginning of HMSHandler initialization. + + + + hive.metastore.pre.event.listeners + + List of comma separated listeners for metastore events. + + + hive.metastore.event.listeners + + + + + hive.metastore.authorization.storage.checks + false + + Should the metastore do authorization checks against the underlying storage (usually hdfs) + for operations like drop-partition (disallow the drop-partition if the user in + question doesn't have permissions to delete the corresponding directory + on the storage). + + + + hive.metastore.event.clean.freq + 0 + Frequency at which timer task runs to purge expired events in metastore(in seconds). + + + hive.metastore.event.expiry.duration + 0 + Duration after which events expire from events table (in seconds) + + + hive.metastore.execute.setugi + false + + In unsecure mode, setting this property to true will cause the metastore to execute DFS operations using + the client's reported user and group permissions. Note that this property must be set on both the client and server sides. Further note that its best effort. + + + + hive.metastore.partition.name.whitelist.pattern + + Partition names will be checked against this regex pattern and rejected if not matched. + + + hive.metastore.integral.jdo.pushdown + false + + Allow JDO query pushdown for integral partition columns in metastore. Off by default. This + improves metastore perf for integral columns, especially if there's a large number of partitions. + However, it doesn't work correctly with integral values that are not normalized (e.g. have + leading zeroes, like 0012). If metastore direct SQL is enabled and works, this optimization + + + + hive.metastore.try.direct.sql + true + + + + hive.metastore.try.direct.sql.ddl + true + + + + hive.metastore.disallow.incompatible.col.type.changes + false + + If true (default is false), ALTER TABLE operations which change the type of + a column (say STRING) to an incompatible type (say MAP&lt;STRING, STRING&gt;) are disallowed. + RCFile default SerDe (ColumnarSerDe) serializes the values in such a way that the + datatypes can be converted from string to any type. The map is also serialized as + a string, which can be read as a string as well. However, with any binary + serialization, this is not true. Blocking the ALTER TABLE prevents ClassCastExceptions + when subsequently trying to access old partitions. - Primitive types like INT, STRING, BIGINT, etc are compatible with each other and are - not blocked. - - See HIVE-4409 for more details. - - - - - hive.metastore.end.function.listeners - - list of comma separated listeners for the end of metastore functions. - - - - hive.metastore.event.expiry.duration - 0 - Duration after which events expire from events table (in seconds) - - - - hive.metastore.event.clean.freq - 0 - Frequency at which timer task runs to purge expired events in metastore(in seconds). - - - - hive.metastore.connect.retries - 5 - Number of retries while opening a connection to metastore - - - - hive.metastore.failure.retries - 3 - Number of retries upon failure of Thrift metastore calls - - - - hive.metastore.client.connect.retry.delay - 1 - Number of seconds for the client to wait between consecutive connection attempts - - - - hive.metastore.client.socket.timeout - 20 - MetaStore Client socket timeout in seconds - - - - hive.metastore.rawstore.impl - org.apache.hadoop.hive.metastore.ObjectStore - Name of the class that implements org.apache.hadoop.hive.metastore.rawstore interface. This class is used to store and retrieval of raw metadata objects such as table, database - - - - hive.metastore.batch.retrieve.max - 300 - Maximum number of objects (tables/partitions) can be retrieved from metastore in one batch. The higher the number, the less the number of round trips is needed to the Hive metastore server, but it may also cause higher memory requirement at the client side. - - - - hive.metastore.batch.retrieve.table.partition.max - 1000 - Maximum number of table partitions that metastore internally retrieves in one batch. - - - - hive.default.fileformat - TextFile - Default file format for CREATE TABLE statement. Options are TextFile and SequenceFile. Users can explicitly say CREATE TABLE ... STORED AS <TEXTFILE|SEQUENCEFILE> to override - - - - hive.default.rcfile.serde - org.apache.hadoop.hive.serde2.columnar.LazyBinaryColumnarSerDe - The default SerDe Hive will use for the RCFile format - - - - hive.fileformat.check - true - Whether to check file format or not when loading data files - - - - hive.file.max.footer - 100 - maximum number of lines for footer user can define for a table file - - - - hive.map.aggr - true - Whether to use map-side aggregation in Hive Group By queries - - - - hive.groupby.skewindata - false - Whether there is skew in data to optimize group by queries - - - - hive.optimize.multigroupby.common.distincts - true - Whether to optimize a multi-groupby query with the same distinct. - Consider a query like: - - from src - insert overwrite table dest1 select col1, count(distinct colx) group by col1 - insert overwrite table dest2 select col2, count(distinct colx) group by col2; - - With this parameter set to true, first we spray by the distinct value (colx), and then - perform the 2 groups bys. This makes sense if map-side aggregation is turned off. However, - with maps-side aggregation, it might be useful in some cases to treat the 2 inserts independently, - thereby performing the query above in 2MR jobs instead of 3 (due to spraying by distinct key first). - If this parameter is turned off, we don't consider the fact that the distinct key is the same across - different MR jobs. - - - - - hive.groupby.mapaggr.checkinterval - 100000 - Number of rows after which size of the grouping keys/aggregation classes is performed - - - - hive.mapred.local.mem - 0 - For local mode, memory of the mappers/reducers - - - - hive.mapjoin.followby.map.aggr.hash.percentmemory - 0.3 - Portion of total memory to be used by map-side group aggregation hash table, when this group by is followed by map join - - - - hive.map.aggr.hash.force.flush.memory.threshold - 0.9 - The max memory to be used by map-side group aggregation hash table, if the memory usage is higher than this number, force to flush data - - - - hive.map.aggr.hash.percentmemory - 0.5 - Portion of total memory to be used by map-side group aggregation hash table - - - - hive.session.history.enabled - false - Whether to log Hive query, query plan, runtime statistics etc. - - - - hive.map.aggr.hash.min.reduction - 0.5 - Hash aggregation will be turned off if the ratio between hash - table size and input rows is bigger than this number. Set to 1 to make sure - hash aggregation is never turned off. - - - - hive.optimize.index.filter - false - Whether to enable automatic use of indexes - - - - hive.optimize.index.groupby - false - Whether to enable optimization of group-by queries using Aggregate indexes. - - - - hive.optimize.ppd - true - Whether to enable predicate pushdown - - - - hive.optimize.ppd.storage - true - Whether to push predicates down into storage handlers. Ignored when hive.optimize.ppd is false. - - - - hive.ppd.recognizetransivity - true - Whether to transitively replicate predicate filters over equijoin conditions. - - - - hive.optimize.groupby - true - Whether to enable the bucketed group by from bucketed partitions/tables. - - - - hive.optimize.skewjoin.compiletime - false - Whether to create a separate plan for skewed keys for the tables in the join. - This is based on the skewed keys stored in the metadata. At compile time, the plan is broken - into different joins: one for the skewed keys, and the other for the remaining keys. And then, - a union is performed for the 2 joins generated above. So unless the same skewed key is present - in both the joined tables, the join for the skewed key will be performed as a map-side join. - - The main difference between this parameter and hive.optimize.skewjoin is that this parameter - uses the skew information stored in the metastore to optimize the plan at compile time itself. - If there is no skew information in the metadata, this parameter will not have any affect. - Both hive.optimize.skewjoin.compiletime and hive.optimize.skewjoin should be set to true. - Ideally, hive.optimize.skewjoin should be renamed as hive.optimize.skewjoin.runtime, but not doing - so for backward compatibility. - - If the skew information is correctly stored in the metadata, hive.optimize.skewjoin.compiletime - would change the query plan to take care of it, and hive.optimize.skewjoin will be a no-op. - - - - - hive.optimize.union.remove - false - - Whether to remove the union and push the operators between union and the filesink above - union. This avoids an extra scan of the output by union. This is independently useful for union - queries, and specially useful when hive.optimize.skewjoin.compiletime is set to true, since an - extra union is inserted. - - The merge is triggered if either of hive.merge.mapfiles or hive.merge.mapredfiles is set to true. - If the user has set hive.merge.mapfiles to true and hive.merge.mapredfiles to false, the idea was the - number of reducers are few, so the number of files anyway are small. However, with this optimization, - we are increasing the number of files possibly by a big margin. So, we merge aggressively. - - - - hive.mapred.supports.subdirectories - false - Whether the version of Hadoop which is running supports sub-directories for tables/partitions. - Many Hive optimizations can be applied if the Hadoop version supports sub-directories for - tables/partitions. It was added by MAPREDUCE-1501 - - - - hive.multigroupby.singlereducer - false - Whether to optimize multi group by query to generate single M/R - job plan. If the multi group by query has common group by keys, it will be - optimized to generate single M/R job. - - - - hive.map.groupby.sorted - false - If the bucketing/sorting properties of the table exactly match the grouping key, whether to - perform the group by in the mapper by using BucketizedHiveInputFormat. The only downside to this - is that it limits the number of mappers to the number of files. - - - - - hive.map.groupby.sorted.testmode - false - If the bucketing/sorting properties of the table exactly match the grouping key, whether to - perform the group by in the mapper by using BucketizedHiveInputFormat. If the test mode is set, the plan - is not converted, but a query property is set to denote the same. - - - - - hive.new.job.grouping.set.cardinality - 30 - - Whether a new map-reduce job should be launched for grouping sets/rollups/cubes. - For a query like: select a, b, c, count(1) from T group by a, b, c with rollup; - 4 rows are created per row: (a, b, c), (a, b, null), (a, null, null), (null, null, null). - This can lead to explosion across map-reduce boundary if the cardinality of T is very high, - and map-side aggregation does not do a very good job. - - This parameter decides if Hive should add an additional map-reduce job. If the grouping set - cardinality (4 in the example above), is more than this value, a new MR job is added under the - assumption that the original group by will reduce the data size. - - - - - hive.join.emit.interval - 1000 - How many rows in the right-most join operand Hive should buffer before emitting the join result. - - - - hive.join.cache.size - 25000 - How many rows in the joining tables (except the streaming table) should be cached in memory. - - - - hive.smbjoin.cache.rows - 10000 - How many rows with the same key value should be cached in memory per smb joined table. - - - - hive.optimize.skewjoin - false - Whether to enable skew join optimization. - The algorithm is as follows: At runtime, detect the keys with a large skew. Instead of - processing those keys, store them temporarily in an HDFS directory. In a follow-up map-reduce - job, process those skewed keys. The same key need not be skewed for all the tables, and so, - the follow-up map-reduce job (for the skewed keys) would be much faster, since it would be a - map-join. - - - - - hive.skewjoin.key - 100000 - 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, - we think the key as a skew join key. - - - - hive.skewjoin.mapjoin.map.tasks - 10000 - Determine the number of map task used in the follow up map join job - for a skew join. It should be used together with hive.skewjoin.mapjoin.min.split - to perform a fine grained control. - - - - hive.skewjoin.mapjoin.min.split - 33554432 - Determine the number of map task at most used in the follow up map join job - for a skew join by specifying the minimum split size. It should be used together with - hive.skewjoin.mapjoin.map.tasks to perform a fine grained control. - - - - hive.mapred.mode - nonstrict - The mode in which the Hive operations are being performed. - In strict mode, some risky queries are not allowed to run. They include: - Cartesian Product. - No partition being picked up for a query. - Comparing bigints and strings. - Comparing bigints and doubles. - Orderby without limit. - - - - - hive.enforce.bucketmapjoin - false - If the user asked for bucketed map-side join, and it cannot be performed, - should the query fail or not ? For example, if the buckets in the tables being joined are - not a multiple of each other, bucketed map-side join cannot be performed, and the - query will fail if hive.enforce.bucketmapjoin is set to true. - - - - - hive.exec.script.maxerrsize - 100000 - Maximum number of bytes a script is allowed to emit to standard error (per map-reduce task). This prevents runaway scripts from filling logs partitions to capacity - - - - hive.exec.script.allow.partial.consumption - false - When enabled, this option allows a user script to exit successfully without consuming all the data from the standard input. - - - - - hive.script.operator.id.env.var - HIVE_SCRIPT_OPERATOR_ID - Name of the environment variable that holds the unique script operator ID in the user's transform function (the custom mapper/reducer that the user has specified in the query) - - - - - hive.script.operator.truncate.env - false - Truncate each environment variable for external script in scripts operator to 20KB (to fit system limits) - - - - hive.exec.compress.output - false - This controls whether the final outputs of a query (to a local/HDFS file or a Hive table) is compressed. The compression codec and other options are determined from Hadoop config variables mapred.output.compress* - - - - hive.exec.compress.intermediate - false - This controls whether intermediate files produced by Hive between multiple map-reduce jobs are compressed. The compression codec and other options are determined from Hadoop config variables mapred.output.compress* - - - - hive.exec.parallel - false - Whether to execute jobs in parallel - - - - hive.exec.parallel.thread.number - 8 - How many jobs at most can be executed in parallel - - - - hive.exec.rowoffset - false - Whether to provide the row offset virtual column - - - - hive.counters.group.name - HIVE - The name of counter group for internal Hive variables (CREATED_FILE, FATAL_ERROR, etc.) - - - - hive.hwi.war.file - lib/hive-hwi-@VERSION@.war - This sets the path to the HWI war file, relative to ${HIVE_HOME}. - - - - hive.hwi.listen.host - 0.0.0.0 - This is the host address the Hive Web Interface will listen on - - - - hive.hwi.listen.port - 9999 - This is the port the Hive Web Interface will listen on - - - - hive.exec.pre.hooks - - Comma-separated list of pre-execution hooks to be invoked for each statement. A pre-execution hook is specified as the name of a Java class which implements the org.apache.hadoop.hive.ql.hooks.ExecuteWithHookContext interface. - - - - hive.exec.post.hooks - - Comma-separated list of post-execution hooks to be invoked for each statement. A post-execution hook is specified as the name of a Java class which implements the org.apache.hadoop.hive.ql.hooks.ExecuteWithHookContext interface. - - - - hive.exec.failure.hooks - - Comma-separated list of on-failure hooks to be invoked for each statement. An on-failure hook is specified as the name of Java class which implements the org.apache.hadoop.hive.ql.hooks.ExecuteWithHookContext interface. - - - - hive.metastore.init.hooks - - A comma separated list of hooks to be invoked at the beginning of HMSHandler initialization. An init hook is specified as the name of Java class which extends org.apache.hadoop.hive.metastore.MetaStoreInitListener. - - - - hive.client.stats.publishers - - Comma-separated list of statistics publishers to be invoked on counters on each job. A client stats publisher is specified as the name of a Java class which implements the org.apache.hadoop.hive.ql.stats.ClientStatsPublisher interface. - - - - hive.client.stats.counters - - 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 - - - - hive.merge.mapfiles - true - Merge small files at the end of a map-only job - - - - hive.merge.mapredfiles - false - Merge small files at the end of a map-reduce job - - - - hive.heartbeat.interval - 1000 - Send a heartbeat after this interval - used by mapjoin and filter operators - - - - hive.merge.size.per.task - 256000000 - Size of merged files at the end of the job - - - - hive.merge.smallfiles.avgsize - 16000000 - When the average output file size of a job is less than this number, Hive will start an additional map-reduce job to merge the output files into bigger files. This is only done for map-only jobs if hive.merge.mapfiles is true, and for map-reduce jobs if hive.merge.mapredfiles is true. - - - - hive.mapjoin.smalltable.filesize - 25000000 - The threshold for the input file size of the small tables; if the file size is smaller than this threshold, it will try to convert the common join into map join - - - - hive.ignore.mapjoin.hint - true - Ignore the mapjoin hint - - - - hive.mapjoin.localtask.max.memory.usage - 0.90 - This number means how much memory the local task can take to hold the key/value into an in-memory hash table. If the local task's memory usage is more than this number, the local task will abort by itself. It means the data of the small table is too large to be held in memory. - - - - hive.mapjoin.followby.gby.localtask.max.memory.usage - 0.55 - This number means how much memory the local task can take to hold the key/value into an in-memory hash table when this map join is followed by a group by. If the local task's memory usage is more than this number, the local task will abort by itself. It means the data of the small table is too large to be held in memory. - - - - hive.mapjoin.check.memory.rows - 100000 - The number means after how many rows processed it needs to check the memory usage - - - - hive.auto.convert.join - false - Whether Hive enables the optimization about converting common join into mapjoin based on the input file size - - - - hive.auto.convert.join.noconditionaltask - true - Whether Hive enables the optimization about converting common join into mapjoin based on the input file - size. 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 - specified size, the join is directly converted to a mapjoin (there is no conditional task). - - - - - hive.auto.convert.join.noconditionaltask.size - 10000000 - If hive.auto.convert.join.noconditionaltask is off, this parameter does not take affect. 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, the join is directly - converted to a mapjoin(there is no conditional task). The default is 10MB - - - - - hive.auto.convert.join.use.nonstaged - true - For conditional joins, if input stream from a small alias can be directly applied to join operator without - filtering or projection, the alias need not to be pre-staged in distributed cache via mapred local task. - Currently, this is not working with vectorization or tez execution engine. - - - - - hive.script.auto.progress - false - Whether Hive Transform/Map/Reduce Clause should automatically send progress information to TaskTracker to avoid the task getting killed because of inactivity. Hive sends progress information when the script is outputting to stderr. This option removes the need of periodically producing stderr messages, but users should be cautious because this may prevent infinite loops in the scripts to be killed by TaskTracker. - - - - hive.script.serde - org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe - The default SerDe for transmitting input data to and reading output data from the user scripts. - - - - hive.binary.record.max.length - 1000 - Read from a binary stream and treat each hive.binary.record.max.length bytes as a record. - The last record before the end of stream can have less than hive.binary.record.max.length bytes - - - - hive.server2.max.start.attempts - 30 - This number of times HiveServer2 will attempt to start before exiting, sleeping 60 seconds between retries. The default of 30 will keep trying for 30 minutes. - - - - hive.server2.transport.mode - binary - Server transport mode. "binary" or "http". - - - - hive.server2.thrift.http.port - 10001 - Port number when in HTTP mode. - - - - hive.server2.thrift.http.path - cliservice - Path component of URL endpoint when in HTTP mode. - - - - hive.server2.thrift.http.min.worker.threads - 5 - Minimum number of worker threads when in HTTP mode. - - - - hive.server2.thrift.http.max.worker.threads - 500 - Maximum number of worker threads when in HTTP mode. - - - - hive.script.recordreader - org.apache.hadoop.hive.ql.exec.TextRecordReader - The default record reader for reading data from the user scripts. - - - - stream.stderr.reporter.prefix - reporter: - Streaming jobs that log to standard error with this prefix can log counter or status information. - - - - stream.stderr.reporter.enabled - true - Enable consumption of status and counter messages for streaming jobs. - - - - hive.script.recordwriter - org.apache.hadoop.hive.ql.exec.TextRecordWriter - The default record writer for writing data to the user scripts. - - - - hive.input.format - org.apache.hadoop.hive.ql.io.CombineHiveInputFormat - The default input format. Set this to HiveInputFormat if you encounter problems with CombineHiveInputFormat. - - - - hive.udtf.auto.progress - false - Whether Hive should automatically send progress information to TaskTracker when using UDTF's to prevent the task getting killed because of inactivity. Users should be cautious because this may prevent TaskTracker from killing tasks with infinite loops. - - - - hive.mapred.reduce.tasks.speculative.execution - true - Whether speculative execution for reducers should be turned on. - - - - hive.exec.counters.pull.interval - 1000 - The interval with which to poll the JobTracker for the counters the running job. The smaller it is the more load there will be on the jobtracker, the higher it is the less granular the caught will be. - - - - hive.querylog.location - /tmp/${user.name} - - Location of Hive run time structured log file - - - - - hive.querylog.enable.plan.progress - true - - Whether to log the plan's progress every time a job's progress is checked. - These logs are written to the location specified by hive.querylog.location - - - - - hive.querylog.plan.progress.interval - 60000 - - The interval to wait between logging the plan's progress in milliseconds. - If there is a whole number percentage change in the progress of the mappers or the reducers, - the progress is logged regardless of this value. - The actual interval will be the ceiling of (this value divided by the value of - hive.exec.counters.pull.interval) multiplied by the value of hive.exec.counters.pull.interval - I.e. if it is not divide evenly by the value of hive.exec.counters.pull.interval it will be - logged less frequently than specified. - This only has an effect if hive.querylog.enable.plan.progress is set to true. - - - - - hive.enforce.bucketing - false - Whether bucketing is enforced. If true, while inserting into the table, bucketing is enforced. - - - - hive.enforce.sorting - false - Whether sorting is enforced. If true, while inserting into the table, sorting is enforced. - - - - hive.optimize.bucketingsorting - true - If hive.enforce.bucketing or hive.enforce.sorting is true, don't create a reducer for enforcing - bucketing/sorting for queries of the form: - insert overwrite table T2 select * from T1; - where T1 and T2 are bucketed/sorted by the same keys into the same number of buckets. - - - - - hive.enforce.sortmergebucketmapjoin - false - If the user asked for sort-merge bucketed map-side join, and it cannot be performed, - should the query fail or not ? - - - - - hive.auto.convert.sortmerge.join - false - Will the join be automatically converted to a sort-merge join, if the joined tables pass - the criteria for sort-merge join. - - - - - hive.auto.convert.sortmerge.join.bigtable.selection.policy - org.apache.hadoop.hive.ql.optimizer.AvgPartitionSizeBasedBigTableSelectorForAutoSMJ - The policy to choose the big table for automatic conversion to sort-merge join. - By default, the table with the largest partitions is assigned the big table. All policies are: - . based on position of the table - the leftmost table is selected - org.apache.hadoop.hive.ql.optimizer.LeftmostBigTableSMJ. - . based on total size (all the partitions selected in the query) of the table - org.apache.hadoop.hive.ql.optimizer.TableSizeBasedBigTableSelectorForAutoSMJ. - . based on average size (all the partitions selected in the query) of the table - org.apache.hadoop.hive.ql.optimizer.AvgPartitionSizeBasedBigTableSelectorForAutoSMJ. - New policies can be added in future. - - - - - hive.auto.convert.sortmerge.join.to.mapjoin - false - If hive.auto.convert.sortmerge.join is set to true, and a join was converted to a sort-merge join, - this parameter decides whether each table should be tried as a big table, and effectively a map-join should be - tried. That would create a conditional task with n+1 children for a n-way join (1 child for each table as the - big table), and the backup task will be the sort-merge join. In some cases, a map-join would be faster than a - sort-merge join, if there is no advantage of having the output bucketed and sorted. For example, if a very big sorted - and bucketed table with few files (say 10 files) are being joined with a very small sorter and bucketed table - with few files (10 files), the sort-merge join will only use 10 mappers, and a simple map-only join might be faster - if the complete small table can fit in memory, and a map-join can be performed. - - - - - hive.metastore.ds.connection.url.hook - - Name of the hook to use for retrieving the JDO connection URL. If empty, the value in javax.jdo.option.ConnectionURL is used - - - - hive.metastore.ds.retry.attempts - 1 - The number of times to retry a metastore call if there were a connection error - - - - hive.metastore.ds.retry.interval - 1000 - The number of milliseconds between metastore retry attempts - - - - hive.metastore.server.min.threads - 200 - Minimum number of worker threads in the Thrift server's pool. - - - - hive.metastore.server.max.threads - 100000 - Maximum number of worker threads in the Thrift server's pool. - - - - hive.metastore.server.tcp.keepalive - true - Whether to enable TCP keepalive for the metastore server. Keepalive will prevent accumulation of half-open connections. - - - - hive.metastore.sasl.enabled - false - If true, the metastore Thrift interface will be secured with SASL. Clients must authenticate with Kerberos. - - - - hive.metastore.thrift.framed.transport.enabled - false - If true, the metastore Thrift interface will use TFramedTransport. When false (default) a standard TTransport is used. - - - - hive.metastore.kerberos.keytab.file - - The path to the Kerberos Keytab file containing the metastore Thrift server's service principal. - - - - hive.metastore.kerberos.principal - hive-metastore/_HOST@EXAMPLE.COM - The service principal for the metastore Thrift server. The special string _HOST will be replaced automatically with the correct host name. - - - - hive.cluster.delegation.token.store.class - org.apache.hadoop.hive.thrift.MemoryTokenStore - The delegation token store implementation. Set to org.apache.hadoop.hive.thrift.ZooKeeperTokenStore for load-balanced cluster. - - - - hive.cluster.delegation.token.store.zookeeper.connectString - localhost:2181 - The ZooKeeper token store connect string. - - - - hive.cluster.delegation.token.store.zookeeper.znode - /hive/cluster/delegation - The root path for token store data. - - - - hive.cluster.delegation.token.store.zookeeper.acl - sasl:hive/host1@EXAMPLE.COM:cdrwa,sasl:hive/host2@EXAMPLE.COM:cdrwa - ACL for token store entries. List comma separated all server principals for the cluster. - - - - hive.metastore.cache.pinobjtypes - Table,StorageDescriptor,SerDeInfo,Partition,Database,Type,FieldSchema,Order - List of comma separated metastore object types that should be pinned in the cache - - - - hive.optimize.reducededuplication - true - Remove extra map-reduce jobs if the data is already clustered by the same key which needs to be used again. This should always be set to true. Since it is a new feature, it has been made configurable. - - - - hive.optimize.correlation - false - exploit intra-query correlations. - - - - hive.optimize.reducededuplication.min.reducer - 4 - Reduce deduplication merges two RSs by moving key/parts/reducer-num of the child RS to parent RS. - 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. - The optimization will be disabled if number of reducers is less than specified value. - - - - hive.exec.dynamic.partition - true - Whether or not to allow dynamic partitions in DML/DDL. - - - - hive.exec.dynamic.partition.mode - strict - In strict mode, the user must specify at least one static partition in case the user accidentally overwrites all partitions. - - - - hive.exec.max.dynamic.partitions - 1000 - Maximum number of dynamic partitions allowed to be created in total. - - - - hive.exec.max.dynamic.partitions.pernode - 100 - Maximum number of dynamic partitions allowed to be created in each mapper/reducer node. - - - - hive.exec.max.created.files - 100000 - Maximum number of HDFS files created by all mappers/reducers in a MapReduce job. - - - - hive.exec.default.partition.name - __HIVE_DEFAULT_PARTITION__ - The default partition name in case the dynamic partition column value is null/empty string or any other values that cannot be escaped. This value must not contain any special character used in HDFS URI (e.g., ':', '%', '/' etc). The user has to be aware that the dynamic partition value should not contain this value to avoid confusions. - - - - hive.stats.dbclass - counter - The storage that stores temporary Hive statistics. Currently, jdbc, hbase, counter and custom type are supported. - - - - hive.stats.autogather - true - A flag to gather statistics automatically during the INSERT OVERWRITE command. - - - - hive.stats.jdbcdriver - org.apache.derby.jdbc.EmbeddedDriver - The JDBC driver for the database that stores temporary Hive statistics. - - - - hive.stats.dbconnectionstring - jdbc:derby:;databaseName=TempStatsStore;create=true - The default connection string for the database that stores temporary Hive statistics. - - - - hive.stats.default.publisher - - The Java class (implementing the StatsPublisher interface) that is used by default if hive.stats.dbclass is custom type. - - - - hive.stats.default.aggregator - - The Java class (implementing the StatsAggregator interface) that is used by default if hive.stats.dbclass is custom type. - - - - hive.stats.jdbc.timeout - 30 - Timeout value (number of seconds) used by JDBC connection and statements. - - - - hive.stats.retries.max - 0 - Maximum number of retries when stats publisher/aggregator got an exception updating intermediate database. Default is no tries on failures. - - - - hive.stats.retries.wait - 3000 - The base waiting window (in milliseconds) before the next retry. The actual wait time is calculated by baseWindow * failures baseWindow * (failure 1) * (random number between [0.0,1.0]). - - - - hive.stats.reliable - false - Whether queries will fail because stats cannot be collected completely accurately. - If this is set to true, reading/writing from/into a partition may fail because the stats - could not be computed accurately. - - - - - hive.stats.collect.tablekeys - false - Whether join and group by keys on tables are derived and maintained in the QueryPlan. - This is useful to identify how tables are accessed and to determine if they should be bucketed. - - - - - hive.stats.collect.scancols - false - Whether column accesses are tracked in the QueryPlan. - This is useful to identify how tables are accessed and to determine if there are wasted columns that can be trimmed. - - - - - hive.stats.ndv.error - 20.0 - Standard error expressed in percentage. Provides a tradeoff between accuracy and compute cost.A lower value for error indicates higher accuracy and a higher compute cost. - - - - - hive.stats.key.prefix.max.length - 200 - - Determines if when the prefix of the key used for intermediate stats collection - exceeds a certain length, a hash of the key is used instead. If the value < 0 then hashing - is never used, if the value >= 0 then hashing is used only when the key prefixes length - exceeds that value. The key prefix is defined as everything preceding the task ID in the key. - For counter type stats, it's maxed by mapreduce.job.counters.group.name.max, which is by default 128. - - - - - hive.stats.key.prefix.reserve.length - 24 - - Reserved length for postfix of stats key. Currently only meaningful for counter type which should - keep length of full stats key smaller than max length configured by hive.stats.key.prefix.max.length. - For counter type, it should be bigger than the length of LB spec if exists. - - - - - hive.stats.max.variable.length - 100 - - To estimate the size of data flowing through operators in Hive/Tez(for reducer estimation etc.), - average row size is multiplied with the total number of rows coming out of each operator. - Average row size is computed from average column size of all columns in the row. In the absence - of column statistics, for variable length columns (like string, bytes etc.), this value will be - used. For fixed length columns their corresponding Java equivalent sizes are used - (float - 4 bytes, double - 8 bytes etc.). - - - - - hive.stats.list.num.entries - 10 - - To estimate the size of data flowing through operators in Hive/Tez(for reducer estimation etc.), - average row size is multiplied with the total number of rows coming out of each operator. - Average row size is computed from average column size of all columns in the row. In the absence - of column statistics and for variable length complex columns like list, the average number of - entries/values can be specified using this config. - - - - - hive.stats.map.num.entries - 10 - - To estimate the size of data flowing through operators in Hive/Tez(for reducer estimation etc.), - average row size is multiplied with the total number of rows coming out of each operator. - Average row size is computed from average column size of all columns in the row. In the absence - of column statistics and for variable length complex columns like map, the average number of - entries/values can be specified using this config. - - - - - hive.stats.map.parallelism - 1 - - Hive/Tez optimizer estimates the data size flowing through each of the operators. - For GROUPBY operator, to accurately compute the data size map-side parallelism needs to - be known. By default, this value is set to 1 since optimizer is not aware of the number of - mappers during compile-time. This Hive config can be used to specify the number of mappers - to be used for data size computation of GROUPBY operator. - - - - - hive.stats.fetch.column.stats - false - - Annotation of operator tree with statistics information requires column statisitcs. - Column statistics are fetched from metastore. Fetching column statistics for each needed column - can be expensive when the number of columns is high. This flag can be used to disable fetching - of column statistics from metastore. - - - - - hive.stats.fetch.partition.stats - true - - Annotation of operator tree with statistics information requires partition level basic - statisitcs like number of rows, data size and file size. Partition statistics are fetched from - metastore. Fetching partition statistics for each needed partition can be expensive when the - number of partitions is high. This flag can be used to disable fetching of partition statistics - from metastore. When this flag is disabled, Hive will make calls to filesystem to get file sizes - and will estimate the number of rows from row schema. - - - - - hive.stats.join.factor - 1.1 - - Hive/Tez optimizer estimates the data size flowing through each of the operators. JOIN operator - uses column statistics to estimate the number of rows flowing out of it and hence the data size. - In the absence of column statistics, this factor determines the amount of rows that flows out - of JOIN operator. - - - - - hive.stats.deserialization.factor - 1.0 - - Hive/Tez optimizer estimates the data size flowing through each of the operators. In the absence - of basic statistics like number of rows and data size, file size is used to estimate the number - of rows and data size. Since files in tables/partitions are serialized (and optionally - compressed) the estimates of number of rows and data size cannot be reliably determined. - This factor is multiplied with the file size to account for serialization and compression. - - - - - hive.support.concurrency - false - Whether Hive supports concurrency or not. A ZooKeeper instance must be up and running for the default Hive lock manager to support read-write locks. - - - - hive.lock.numretries - 100 - The number of times you want to try to get all the locks - - - - hive.unlock.numretries - 10 - The number of times you want to retry to do one unlock - - - - hive.lock.sleep.between.retries - 60 - The sleep time (in seconds) between various retries - - - - hive.zookeeper.quorum - - The list of ZooKeeper servers to talk to. This is only needed for read/write locks. - - - - hive.zookeeper.client.port - 2181 - The port of ZooKeeper servers to talk to. This is only needed for read/write locks. - - - - hive.zookeeper.session.timeout - 600000 - ZooKeeper client's session timeout. The client is disconnected, and as a result, all locks released, if a heartbeat is not sent in the timeout. - - - - hive.zookeeper.namespace - hive_zookeeper_namespace - The parent node under which all ZooKeeper nodes are created. - - - - hive.zookeeper.clean.extra.nodes - false - Clean extra nodes at the end of the session. - - - - fs.har.impl - org.apache.hadoop.hive.shims.HiveHarFileSystem - The implementation for accessing Hadoop Archives. Note that this won't be applicable to Hadoop versions less than 0.20 - - - - hive.archive.enabled - false - Whether archiving operations are permitted - - - - hive.fetch.output.serde - org.apache.hadoop.hive.serde2.DelimitedJSONSerDe - The SerDe used by FetchTask to serialize the fetch output. - - - - hive.exec.mode.local.auto - false - Let Hive determine whether to run in local mode automatically - - - - hive.exec.drop.ignorenonexistent - true - - Do not report an error if DROP TABLE/VIEW specifies a non-existent table/view - - - - - hive.exec.show.job.failure.debug.info - true - - If a job fails, whether to provide a link in the CLI to the task with the - most failures, along with debugging hints if applicable. - - - - - hive.auto.progress.timeout - 0 - - How long to run autoprogressor for the script/UDTF operators (in seconds). - Set to 0 for forever. - - - - - - - hive.hbase.wal.enabled - true - Whether writes to HBase should be forced to the write-ahead log. Disabling this improves HBase write performance at the risk of lost writes in case of a crash. - - - - hive.table.parameters.default - - Default property values for newly created tables - - - - hive.entity.separator - @ - Separator used to construct names of tables and partitions. For example, dbname@tablename@partitionname - - - - hive.ddl.createtablelike.properties.whitelist - - Table Properties to copy over when executing a Create Table Like. - - - - hive.variable.substitute - true - This enables substitution using syntax like ${var} ${system:var} and ${env:var}. - - - - hive.variable.substitute.depth - 40 - The maximum replacements the substitution engine will do. - - - - hive.conf.validation - true - Enables type checking for registered Hive configurations - - - - hive.security.authorization.enabled - false - enable or disable the Hive client authorization - - - - hive.security.authorization.manager - org.apache.hadoop.hive.ql.security.authorization.DefaultHiveAuthorizationProvider - The Hive client authorization manager class name. - The user defined authorization class should implement interface org.apache.hadoop.hive.ql.security.authorization.HiveAuthorizationProvider. - - - - - hive.security.metastore.authorization.manager - org.apache.hadoop.hive.ql.security.authorization.DefaultHiveMetastoreAuthorizationProvider - authorization manager class name to be used in the metastore for authorization. - The user defined authorization class should implement interface org.apache.hadoop.hive.ql.security.authorization.HiveMetastoreAuthorizationProvider. - - - - - hive.security.authenticator.manager - org.apache.hadoop.hive.ql.security.HadoopDefaultAuthenticator - hive client authenticator manager class name. - The user defined authenticator should implement interface org.apache.hadoop.hive.ql.security.HiveAuthenticationProvider. - - - - hive.security.metastore.authenticator.manager - org.apache.hadoop.hive.ql.security.HadoopDefaultMetastoreAuthenticator - authenticator manager class name to be used in the metastore for authentication. - The user defined authenticator should implement interface org.apache.hadoop.hive.ql.security.HiveAuthenticationProvider. - - - - hive.security.authorization.createtable.user.grants - - the privileges automatically granted to some users whenever a table gets created. - An example like "userX,userY:select;userZ:create" will grant select privilege to userX and userY, - and grant create privilege to userZ whenever a new table created. - - - - hive.security.authorization.createtable.group.grants - - the privileges automatically granted to some groups whenever a table gets created. - An example like "groupX,groupY:select;groupZ:create" will grant select privilege to groupX and groupY, - and grant create privilege to groupZ whenever a new table created. - - - - hive.security.authorization.createtable.role.grants - - the privileges automatically granted to some roles whenever a table gets created. - An example like "roleX,roleY:select;roleZ:create" will grant select privilege to roleX and roleY, - and grant create privilege to roleZ whenever a new table created. - - - - hive.security.authorization.createtable.owner.grants - - the privileges automatically granted to the owner whenever a table gets created. - An example like "select,drop" will grant select and drop privilege to the owner of the table - - - - hive.users.in.admin.role - - Comma separated list of users who are in admin role for bootstrapping. - More users can be added in ADMIN role later. - - - - hive.security.command.whitelist - set,reset,dfs,add,delete - Comma separated list of non-SQL Hive commands users are authorized to execute - - - - hive.conf.restricted.list - - Comma separated list of configuration options which are immutable at runtime - - - - hive.metastore.authorization.storage.checks - false - Should the metastore do authorization checks against the underlying storage - for operations like drop-partition (disallow the drop-partition if the user in - question doesn't have permissions to delete the corresponding directory - on the storage). - - - - hive.error.on.empty.partition - false - Whether to throw an exception if dynamic partition insert generates empty results. - - - - hive.index.compact.file.ignore.hdfs - false - When true the HDFS location stored in the index file will be ignored at runtime. - If the data got moved or the name of the cluster got changed, the index data should still be usable. - - - - hive.optimize.index.filter.compact.minsize - 5368709120 - Minimum size (in bytes) of the inputs on which a compact index is automatically used. - - - - hive.optimize.index.filter.compact.maxsize - -1 - Maximum size (in bytes) of the inputs on which a compact index is automatically used. - A negative number is equivalent to infinity. - - - - hive.index.compact.query.max.size - 10737418240 - The maximum number of bytes that a query using the compact index can read. Negative value is equivalent to infinity. - - - - hive.index.compact.query.max.entries - 10000000 - The maximum number of index entries to read during a query that uses the compact index. Negative value is equivalent to infinity. - - - - hive.index.compact.binary.search - true - Whether or not to use a binary search to find the entries in an index table that match the filter, where possible - - - - hive.exim.uri.scheme.whitelist - hdfs,pfile - A comma separated list of acceptable URI schemes for import and export. - - - - hive.lock.mapred.only.operation - false - This param is to control whether or not only do lock on queries - that need to execute at least one mapred job. - - - - hive.limit.row.max.size - 100000 - When trying a smaller subset of data for simple LIMIT, how much size we need to guarantee - each row to have at least. - - - - hive.limit.optimize.limit.file - 10 - When trying a smaller subset of data for simple LIMIT, maximum number of files we can - sample. - - - - hive.limit.optimize.enable - false - Whether to enable to optimization to trying a smaller subset of data for simple LIMIT first. - - - - hive.limit.optimize.fetch.max - 50000 - Maximum number of rows allowed for a smaller subset of data for simple LIMIT, if it is a fetch query. - Insert queries are not restricted by this limit. - - - - hive.limit.pushdown.memory.usage - 0.3f - The max memory to be used for hash in RS operator for top K selection. - - - - hive.rework.mapredwork - false - should rework the mapred work or not. - This is first introduced by SymlinkTextInputFormat to replace symlink files with real paths at compile time. - - - - hive.exec.concatenate.check.index - true - If this is set to true, Hive will throw error when doing - 'alter table tbl_name [partSpec] concatenate' on a table/partition - that has indexes on it. The reason the user want to set this to true - is because it can help user to avoid handling all index drop, recreation, - rebuild work. This is very helpful for tables with thousands of partitions. - - - - hive.sample.seednumber - 0 - A number used to percentage sampling. By changing this number, user will change the subsets - of data sampled. - - - - hive.io.exception.handlers - - A list of io exception handler class names. This is used - to construct a list exception handlers to handle exceptions thrown - by record readers - - - - hive.autogen.columnalias.prefix.label - _c - String used as a prefix when auto generating column alias. - By default the prefix label will be appended with a column position number to form the column alias. Auto generation would happen if an aggregate function is used in a select clause without an explicit alias. - - - - hive.autogen.columnalias.prefix.includefuncname - false - Whether to include function name in the column alias auto generated by Hive. - - - - hive.exec.perf.logger - org.apache.hadoop.hive.ql.log.PerfLogger - The class responsible logging client side performance metrics. Must be a subclass of org.apache.hadoop.hive.ql.log.PerfLogger - - - - hive.start.cleanup.scratchdir - false - To cleanup the Hive scratchdir while starting the Hive Server - - - - hive.output.file.extension - - String used as a file extension for output files. If not set, defaults to the codec extension for text files (e.g. ".gz"), or no extension otherwise. - - - - hive.insert.into.multilevel.dirs - false - Where to insert into multilevel directories like - "insert directory '/HIVEFT25686/chinna/' from table" - - - - hive.warehouse.subdir.inherit.perms - false - Set this to true if the the table directories should inherit the - permission of the warehouse or database directory instead of being created - with the permissions derived from dfs umask - - - - hive.exec.job.debug.capture.stacktraces - true - Whether or not stack traces parsed from the task logs of a sampled failed task for - each failed job should be stored in the SessionState - - - - - hive.exec.driver.run.hooks - - A comma separated list of hooks which implement HiveDriverRunHook - and will be run at the beginning and end of Driver.run, these will be run in - the order specified. - - - - - hive.ddl.output.format - text - - The data format to use for DDL output. One of "text" (for human - readable text) or "json" (for a json object). - - - - - hive.transform.escape.input - false - - This adds an option to escape special chars (newlines, carriage returns and - tabs) when they are passed to the user script. This is useful if the Hive tables - can contain data that contains special characters. - - - - - hive.exec.rcfile.use.explicit.header - true - - If this is set the header for RCFiles will simply be RCF. If this is not - set the header will be that borrowed from sequence files, e.g. SEQ- followed - by the input and output RCFile formats. - - - - - hive.exec.orc.dictionary.key.size.threshold - 0.8 - - If the number of keys in a dictionary is greater than this fraction of the total number of - non-null rows, turn off dictionary encoding. Use 1 to always use dictionary encoding. - - - - - hive.multi.insert.move.tasks.share.dependencies - false - - If this is set all move tasks for tables/partitions (not directories) at the end of a - multi-insert query will only begin once the dependencies for all these move tasks have been - met. - Advantages: If concurrency is enabled, the locks will only be released once the query has - finished, so with this config enabled, the time when the table/partition is - generated will be much closer to when the lock on it is released. - Disadvantages: If concurrency is not enabled, with this disabled, the tables/partitions which - are produced by this query and finish earlier will be available for querying - much earlier. Since the locks are only released once the query finishes, this - does not apply if concurrency is enabled. - - - - - hive.fetch.task.conversion - minimal - - Some select queries can be converted to single FETCH task minimizing latency. - Currently the query should be single sourced not having any subquery and should not have - any aggregations or distincts (which incurs RS), lateral views and joins. - 1. minimal : SELECT STAR, FILTER on partition columns, LIMIT only - 2. more : SELECT, FILTER, LIMIT only (TABLESAMPLE, virtual columns) - - - - - hive.fetch.task.conversion.threshold - -1 - - Input threshold for applying hive.fetch.task.conversion. If target table is native, input length - is calculated by summation of file lengths. If it's not native, storage handler for the table - can optionally implement org.apache.hadoop.hive.ql.metadata.InputEstimator interface. - - - - - hive.fetch.task.aggr - false - - Aggregation queries with no group-by clause (for example, select count(*) from src) execute - final aggregations in single reduce task. If this is set true, Hive delegates final aggregation - stage to fetch task, possibly decreasing the query time. - - - - - hive.cache.expr.evaluation - true - - If true, evaluation result of deterministic expression referenced twice or more will be cached. - For example, in filter condition like ".. where key + 10 > 10 or key + 10 = 0" - "key + 10" will be evaluated/cached once and reused for following expression ("key + 10 = 0"). - Currently, this is applied only to expressions in select or filter operator. - - - - - - hive.hmshandler.retry.attempts - 1 - The number of times to retry a HMSHandler call if there were a connection error - - - - hive.hmshandler.retry.interval - 1000 - The number of milliseconds between HMSHandler retry attempts - - - - hive.server.read.socket.timeout - 10 - Timeout for the HiveServer to close the connection if no response from the client in N seconds, defaults to 10 seconds. - - - - hive.server.tcp.keepalive - true - Whether to enable TCP keepalive for the Hive Server. Keepalive will prevent accumulation of half-open connections. - - - - hive.decode.partition.name - false - Whether to show the unquoted partition names in query results. - - - - hive.log4j.file - - Hive log4j configuration file. - If the property is not set, then logging will be initialized using hive-log4j.properties found on the classpath. - If the property is set, the value must be a valid URI (java.net.URI, e.g. "file:///tmp/my-logging.properties"), which you can then extract a URL from and pass to PropertyConfigurator.configure(URL). - - - - hive.exec.log4j.file - - Hive log4j configuration file for execution mode(sub command). - If the property is not set, then logging will be initialized using hive-exec-log4j.properties found on the classpath. - If the property is set, the value must be a valid URI (java.net.URI, e.g. "file:///tmp/my-logging.properties"), which you can then extract a URL from and pass to PropertyConfigurator.configure(URL). - - - - hive.exec.infer.bucket.sort - false - - If this is set, when writing partitions, the metadata will include the bucketing/sorting - properties with which the data was written if any (this will not overwrite the metadata - inherited from the table if the table is bucketed/sorted) - - - - - hive.exec.infer.bucket.sort.num.buckets.power.two - false - - If this is set, when setting the number of reducers for the map reduce task which writes the - final output files, it will choose a number which is a power of two, unless the user specifies - the number of reducers to use using mapred.reduce.tasks. The number of reducers - may be set to a power of two, only to be followed by a merge task meaning preventing - anything from being inferred. - With hive.exec.infer.bucket.sort set to true: - Advantages: If this is not set, the number of buckets for partitions will seem arbitrary, - which means that the number of mappers used for optimized joins, for example, will - be very low. With this set, since the number of buckets used for any partition is - a power of two, the number of mappers used for optimized joins will be the least - number of buckets used by any partition being joined. - Disadvantages: This may mean a much larger or much smaller number of reducers being used in the - final map reduce job, e.g. if a job was originally going to take 257 reducers, - it will now take 512 reducers, similarly if the max number of reducers is 511, - and a job was going to use this many, it will now use 256 reducers. - - - - - - hive.groupby.orderby.position.alias - false - Whether to enable using Column Position Alias in Group By or Order By - - - - hive.server2.thrift.min.worker.threads - 5 - Minimum number of Thrift worker threads - - - - hive.server2.thrift.max.worker.threads - 500 - Maximum number of Thrift worker threads - - - - hive.server2.async.exec.threads - 100 - Number of threads in the async thread pool for HiveServer2 - - - - hive.server2.async.exec.shutdown.timeout - 10 - Time (in seconds) for which HiveServer2 shutdown will wait for async - threads to terminate - - - - hive.server2.async.exec.keepalive.time - 10 - Time (in seconds) that an idle HiveServer2 async thread (from the thread pool) will wait - for a new task to arrive before terminating - - - - hive.server2.async.exec.wait.queue.size - 100 - Size of the wait queue for async thread pool in HiveServer2. - After hitting this limit, the async thread pool will reject new requests. - - - - hive.server2.thrift.port - 10000 - Port number of HiveServer2 Thrift interface. - Can be overridden by setting $HIVE_SERVER2_THRIFT_PORT - - - - hive.server2.thrift.bind.host - localhost - Bind host on which to run the HiveServer2 Thrift interface. - Can be overridden by setting $HIVE_SERVER2_THRIFT_BIND_HOST - - - - hive.server2.authentication - NONE - - Client authentication types. - NONE: no authentication check - LDAP: LDAP/AD based authentication - KERBEROS: Kerberos/GSSAPI authentication - CUSTOM: Custom authentication provider - (Use with property hive.server2.custom.authentication.class) - - - - - hive.server2.custom.authentication.class - - - Custom authentication class. Used when property - 'hive.server2.authentication' is set to 'CUSTOM'. Provided class - must be a proper implementation of the interface - org.apache.hive.service.auth.PasswdAuthenticationProvider. HiveServer2 - will call its Authenticate(user, passed) method to authenticate requests. - The implementation may optionally extend Hadoop's - org.apache.hadoop.conf.Configured class to grab Hive's Configuration object. - - - - - hive.server2.authentication.kerberos.principal - - - Kerberos server principal - - - - - hive.server2.authentication.kerberos.keytab - - - Kerberos keytab file for server principal - - - - - hive.server2.authentication.ldap.url - - - LDAP connection URL - - - - - hive.server2.authentication.ldap.baseDN - - - LDAP base DN - - - - - hive.server2.enable.doAs - true - - Setting this property to true will have HiveServer2 execute - Hive operations as the user making the calls to it. - - - - - hive.execution.engine - mr - - Chooses execution engine. Options are: mr (Map reduce, default) or tez (hadoop 2 only) - - - - - hive.server2.table.type.mapping - CLASSIC - - This setting reflects how HiveServer2 will report the table types for JDBC and other - client implementations that retrieve the available tables and supported table types - HIVE : Exposes Hive's native table types like MANAGED_TABLE, EXTERNAL_TABLE, VIRTUAL_VIEW - CLASSIC : More generic types like TABLE and VIEW - - - - - hive.server2.thrift.sasl.qop - auth - Sasl QOP value; Set it to one of following values to enable higher levels of - protection for HiveServer2 communication with clients. - "auth" - authentication only (default) - "auth-int" - authentication plus integrity protection - "auth-conf" - authentication plus integrity and confidentiality protection - This is applicable only if HiveServer2 is configured to use Kerberos authentication. - - - - - hive.plan.serialization.format - kryo - - Query plan format serialization between client and task nodes. - Two supported values are : kryo and javaXML. Kryo is default. - - - - - hive.vectorized.execution.enabled - false - - This flag should be set to true to enable vectorized mode of query execution. - The default value is false. - - - - - hive.vectorized.groupby.maxentries - 1000000 - Max number of entries in the vector group by aggregation hashtables. Exceeding this will trigger a flush irrelevant of memory pressure condition. - - - - hive.vectorized.groupby.checkinterval - 100000 - Number of entries added to the group by aggregation hash before a reocmputation of average entry size is performed. - - - - hive.vectorized.groupby.flush.percent - 0.1 - Percent of entries in the group by aggregation hash flushed when the memory treshold is exceeded. - - - - hive.compute.query.using.stats - false - - When set to true Hive will answer a few queries like count(1) purely using stats - stored in metastore. For basic stats collection turn on the config hive.stats.autogather to true. - For more advanced stats collection need to run analyze table queries. - - - - - hive.metastore.schema.verification - false - - Enforce metastore schema version consistency. - True: Verify that version information stored in metastore matches with one from Hive jars. Also disable automatic - schema migration attempt. Users are required to manually migrate schema after Hive upgrade which ensures - proper metastore schema migration. (Default) - False: Warn if the version information stored in metastore doesn't match with one from in Hive jars. - - - - - hive.metastore.integral.jdo.pushdown - false - - Allow JDO query pushdown for integral partition columns in metastore. Off by default. This - improves metastore perf for integral columns, especially if there's a large number of partitions. - However, it doesn't work correctly with integral values that are not normalized (e.g. have - leading zeroes, like 0012). If metastore direct SQL is enabled and works, this optimization - is also irrelevant. - - - - - hive.orc.splits.include.file.footer - false - - If turned on splits generated by orc will include metadata about the stripes in the file. This - data is read remotely (from the client or HS2 machine) and sent to all the tasks. - - - - - hive.orc.cache.stripe.details.size - 10000 - - Cache size for keeping meta info about orc splits cached in the client. - - - - - hive.orc.compute.splits.num.threads - 10 - - How many threads orc should use to create splits in parallel. - - - - - hive.jar.directory - hdfs:///user/hive/ - - This is the location hive in tez mode will look for to find a site wide - installed hive instance. - - - - - hive.user.install.directory - hdfs:///user/ - - If hive (in tez mode only) cannot find a usable hive jar in "hive.jar.directory", - it will upload the hive jar to <hive.user.install.directory>/<user name> - and use it to run queries. - - - + Primitive types like INT, STRING, BIGINT, etc are compatible with each other and are + not blocked. + + + + + hive.table.parameters.default + + Default property values for newly created tables + + + hive.ddl.createtablelike.properties.whitelist + + Table Properties to copy over when executing a Create Table Like. + + + hive.metastore.rawstore.impl + org.apache.hadoop.hive.metastore.ObjectStore + + Name of the class that implements org.apache.hadoop.hive.metastore.rawstore interface. + + + + javax.jdo.option.ConnectionDriverName + org.apache.derby.jdbc.EmbeddedDriver + Driver class name for a JDBC metastore + + + javax.jdo.PersistenceManagerFactoryClass + org.datanucleus.api.jdo.JDOPersistenceManagerFactory + class implementing the jdo persistence + + + hive.metastore.expression.proxy + org.apache.hadoop.hive.ql.optimizer.ppr.PartitionExpressionForMetastore + + + + javax.jdo.option.DetachAllOnCommit + true + Detaches all objects from session so that they can be used after transaction is committed + + + javax.jdo.option.NonTransactionalRead + true + Reads outside of transactions + + + javax.jdo.option.ConnectionUserName + APP + Username to use against metastore database + + + hive.metastore.end.function.listeners + + List of comma separated listeners for the end of metastore functions. + + + hive.metastore.partition.inherit.table.properties + + + List of comma separated keys occurring in table properties which will get inherited to newly created partitions. + + + + hive.metadata.export.location + + + When used in conjunction with the org.apache.hadoop.hive.ql.parse.MetaDataExportListener pre event listener, + it is the location to which the metadata will be exported. The default is an empty string, which results in the + + + + hive.metadata.move.exported.metadata.to.trash + true + + When used in conjunction with the org.apache.hadoop.hive.ql.parse.MetaDataExportListener pre event listener, + this setting determines if the metadata that is exported will subsequently be moved to the user's trash directory + + + + hive.cli.errors.ignore + false + + + + hive.cli.print.current.db + false + Whether to include the current database in the Hive prompt. + + + hive.cli.prompt + hive + + Command line prompt configuration value. Other hiveconf can be used in this configuration value. + + + + hive.cli.pretty.output.num.cols + -1 + + The number of columns to use when formatting output generated by the DESCRIBE PRETTY table_name command. + + + + hive.metastore.fs.handler.class + org.apache.hadoop.hive.metastore.HiveMetaStoreFsImpl + + + + hive.session.id + + + + + hive.session.silent + false + + + + hive.session.history.enabled + false + Whether to log Hive query, query plan, runtime statistics etc. + + + hive.query.string + + Query being executed (might be multiple per a session) + + + hive.query.id + + ID for query being executed (might be multiple per a session) + + + hive.jobname.length + 50 + max jobname length + + + hive.jar.path + + + + + hive.aux.jars.path + + + + + hive.added.files.path + + + + + hive.added.jars.path + + + + + hive.added.archives.path + + + + + hive.current.database + + current database for current query. internal usage only + + + hive.auto.progress.timeout + 0 + + How long to run autoprogressor for the script/UDTF operators (in seconds). + + + + hive.table.name + + + + + hive.partition.name + + + + + hive.script.auto.progress + false + + Whether Hive Transform/Map/Reduce Clause should automatically send progress information to TaskTracker + to avoid the task getting killed because of inactivity. Hive sends progress information when the script is + outputting to stderr. This option removes the need of periodically producing stderr messages, + + + + hive.script.operator.id.env.var + HIVE_SCRIPT_OPERATOR_ID + + Name of the environment variable that holds the unique script operator ID in the user's + + + + hive.script.operator.truncate.env + false + Truncate each environment variable for external script in scripts operator to 20KB (to fit system limits) + + + hive.mapred.mode + nonstrict + + The mode in which the Hive operations are being performed. + In strict mode, some risky queries are not allowed to run. They include: + Cartesian Product. + No partition being picked up for a query. + Comparing bigints and strings. + Comparing bigints and doubles. + + + + hive.alias + + + + + hive.map.aggr + true + Whether to use map-side aggregation in Hive Group By queries + + + hive.groupby.skewindata + false + Whether there is skew in data to optimize group by queries + + + hive.optimize.multigroupby.common.distincts + true + + Whether to optimize a multi-groupby query with the same distinct. + Consider a query like: + + from src + insert overwrite table dest1 select col1, count(distinct colx) group by col1 + insert overwrite table dest2 select col2, count(distinct colx) group by col2; + + With this parameter set to true, first we spray by the distinct value (colx), and then + perform the 2 groups bys. This makes sense if map-side aggregation is turned off. However, + with maps-side aggregation, it might be useful in some cases to treat the 2 inserts independently, + thereby performing the query above in 2MR jobs instead of 3 (due to spraying by distinct key first). + If this parameter is turned off, we don't consider the fact that the distinct key is the same across + + + + hive.join.emit.interval + 1000 + How many rows in the right-most join operand Hive should buffer before emitting the join result. + + + hive.join.cache.size + 25000 + How many rows in the joining tables (except the streaming table) should be cached in memory. + + + hive.mapjoin.bucket.cache.size + 100 + + + + hive.smbjoin.cache.rows + 10000 + How many rows with the same key value should be cached in memory per smb joined table. + + + hive.groupby.mapaggr.checkinterval + 100000 + Number of rows after which size of the grouping keys/aggregation classes is performed + + + hive.map.aggr.hash.percentmemory + 0.5 + Portion of total memory to be used by map-side group aggregation hash table + + + hive.mapjoin.followby.map.aggr.hash.percentmemory + 0.3 + Portion of total memory to be used by map-side group aggregation hash table, when this group by is followed by map join + + + hive.map.aggr.hash.force.flush.memory.threshold + 0.9 + The max memory to be used by map-side group aggregation hash table, if the memory usage is higher than this number, force to flush data + + + hive.map.aggr.hash.min.reduction + 0.5 + + Hash aggregation will be turned off if the ratio between hash table size and input rows is bigger than this number. + + + + hive.multigroupby.singlereducer + true + + Whether to optimize multi group by query to generate single M/R job plan. If the multi group by query has + + + + hive.map.groupby.sorted + false + + If the bucketing/sorting properties of the table exactly match the grouping key, whether to perform + the group by in the mapper by using BucketizedHiveInputFormat. The only downside to this + + + + hive.map.groupby.sorted.testmode + false + + If the bucketing/sorting properties of the table exactly match the grouping key, whether to perform + the group by in the mapper by using BucketizedHiveInputFormat. If the test mode is set, the plan + + + + hive.groupby.orderby.position.alias + false + Whether to enable using Column Position Alias in Group By or Order By + + + hive.new.job.grouping.set.cardinality + 30 + + Whether a new map-reduce job should be launched for grouping sets/rollups/cubes. + For a query like: select a, b, c, count(1) from T group by a, b, c with rollup; + 4 rows are created per row: (a, b, c), (a, b, null), (a, null, null), (null, null, null). + This can lead to explosion across map-reduce boundary if the cardinality of T is very high, + and map-side aggregation does not do a very good job. + + This parameter decides if Hive should add an additional map-reduce job. If the grouping set + cardinality (4 in the example above), is more than this value, a new MR job is added under the + + + + hive.udtf.auto.progress + false + + Whether Hive should automatically send progress information to TaskTracker + when using UDTF's to prevent the task getting killed because of inactivity. Users should be cautious + + + + hive.default.fileformat + TextFile + + Default file format for CREATE TABLE statement. + + + + hive.query.result.fileformat + TextFile + + + + hive.fileformat.check + true + Whether to check file format or not when loading data files + + + hive.default.rcfile.serde + org.apache.hadoop.hive.serde2.columnar.LazyBinaryColumnarSerDe + The default SerDe Hive will use for the RCFile format + + + hive.querylog.location + /tmp/navis + Location of Hive run time structured log file + + + hive.querylog.enable.plan.progress + true + + Whether to log the plan's progress every time a job's progress is checked. + + + + hive.querylog.plan.progress.interval + 60000 + + The interval to wait between logging the plan's progress in milliseconds. + If there is a whole number percentage change in the progress of the mappers or the reducers, + the progress is logged regardless of this value. + The actual interval will be the ceiling of (this value divided by the value of + hive.exec.counters.pull.interval) multiplied by the value of hive.exec.counters.pull.interval + I.e. if it is not divide evenly by the value of hive.exec.counters.pull.interval it will be + logged less frequently than specified. + + + + hive.script.serde + org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe + The default SerDe for transmitting input data to and reading output data from the user scripts. + + + hive.script.recordreader + org.apache.hadoop.hive.ql.exec.TextRecordReader + The default record reader for reading data from the user scripts. + + + hive.script.recordwriter + org.apache.hadoop.hive.ql.exec.TextRecordWriter + The default record writer for writing data to the user scripts. + + + hive.transform.escape.input + false + + This adds an option to escape special chars (newlines, carriage returns and + tabs) when they are passed to the user script. This is useful if the Hive tables + + + + hive.binary.record.max.length + 1000 + + Read from a binary stream and treat each hive.binary.record.max.length bytes as a record. + + + + hive.hwi.listen.host + 0.0.0.0 + This is the host address the Hive Web Interface will listen on + + + hive.hwi.listen.port + 9999 + This is the port the Hive Web Interface will listen on + + + hive.hwi.war.file + + This sets the path to the HWI war file, relative to ${HIVE_HOME}. + + + hive.mapred.local.mem + 0 + mapper/reducer memory in local mode + + + hive.mapjoin.smalltable.filesize + 25000000 + + The threshold for the input file size of the small tables; if the file size is smaller + + + + hive.sample.seednumber + 0 + A number used to percentage sampling. By changing this number, user will change the subsets of data sampled. + + + hive.test.mode + false + Whether Hive is running in test mode. If yes, it turns on sampling and prefixes the output tablename. + + + hive.test.mode.prefix + test_ + In test mode, specfies prefixes for the output table + + + hive.test.mode.samplefreq + 32 + + In test mode, specfies sampling frequency for table, which is not bucketed, + + + + hive.test.mode.nosamplelist + + In test mode, specifies comma separated table names which would not apply sampling + + + hive.merge.mapfiles + true + Merge small files at the end of a map-only job + + + hive.merge.mapredfiles + false + Merge small files at the end of a map-reduce job + + + hive.merge.size.per.task + 256000000 + Size of merged files at the end of the job + + + hive.merge.smallfiles.avgsize + 16000000 + + When the average output file size of a job is less than this number, Hive will start an additional + map-reduce job to merge the output files into bigger files. This is only done for map-only jobs + + + + hive.merge.rcfile.block.level + true + + + + hive.merge.input.format.block.level + org.apache.hadoop.hive.ql.io.rcfile.merge.RCFileBlockMergeInputFormat + + + + hive.merge.current.job.has.dynamic.partitions + false + + + + hive.exec.rcfile.use.explicit.header + true + + If this is set the header for RCFiles will simply be RCF. If this is not + set the header will be that borrowed from sequence files, e.g. SEQ- followed + + + + hive.exec.rcfile.use.sync.cache + true + + + + hive.exec.orc.memory.pool + 0.5 + Maximum fraction of heap that can be used by ORC file writers + + + hive.exec.orc.write.format + + Define the version of the file to write + + + hive.exec.orc.default.stripe.size + 268435456 + Define the default ORC stripe size + + + hive.exec.orc.dictionary.key.size.threshold + 0.8 + + If the number of keys in a dictionary is greater than this fraction of the total number of + + + + hive.orc.splits.include.file.footer + false + + If turned on splits generated by orc will include metadata about the stripes in the file. This + + + + hive.orc.cache.stripe.details.size + 10000 + Cache size for keeping meta info about orc splits cached in the client. + + + hive.orc.compute.splits.num.threads + 10 + How many threads orc should use to create splits in parallel. + + + hive.optimize.skewjoin + false + + Whether to enable skew join optimization. + The algorithm is as follows: At runtime, detect the keys with a large skew. Instead of + processing those keys, store them temporarily in an HDFS directory. In a follow-up map-reduce + job, process those skewed keys. The same key need not be skewed for all the tables, and so, + the follow-up map-reduce job (for the skewed keys) would be much faster, since it would be a + + + + hive.auto.convert.join + true + Whether Hive enables the optimization about converting common join into mapjoin based on the input file size + + + hive.auto.convert.join.noconditionaltask + true + + Whether Hive enables the optimization about converting common join into mapjoin based on the input file size. + 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 + + + + hive.auto.convert.join.noconditionaltask.size + 10000000 + + If hive.auto.convert.join.noconditionaltask is off, this parameter does not take affect. + 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, + + + + hive.auto.convert.join.use.nonstaged + true + + For conditional joins, if input stream from a small alias can be directly applied to join operator without + filtering or projection, the alias need not to be pre-staged in distributed cache via mapred local task. + + + + hive.skewjoin.key + 100000 + + 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, + + + + hive.skewjoin.mapjoin.map.tasks + 10000 + + Determine the number of map task used in the follow up map join job for a skew join. + + + + hive.skewjoin.mapjoin.min.split + 33554432 + + Determine the number of map task at most used in the follow up map join job for a skew join by specifying + + + + hive.heartbeat.interval + 1000 + Send a heartbeat after this interval - used by mapjoin and filter operators + + + hive.limit.row.max.size + 100000 + When trying a smaller subset of data for simple LIMIT, how much size we need to guarantee each row to have at least. + + + hive.limit.optimize.limit.file + 10 + When trying a smaller subset of data for simple LIMIT, maximum number of files we can sample. + + + hive.limit.optimize.enable + false + Whether to enable to optimization to trying a smaller subset of data for simple LIMIT first. + + + hive.limit.optimize.fetch.max + 50000 + + Maximum number of rows allowed for a smaller subset of data for simple LIMIT, if it is a fetch query. + + + + hive.limit.pushdown.memory.usage + -1.0 + The max memory to be used for hash in RS operator for top K selection. + + + hive.hashtable.initialCapacity + 100000 + + + + hive.hashtable.loadfactor + 0.75 + + + + hive.mapjoin.followby.gby.localtask.max.memory.usage + 0.55 + + This number means how much memory the local task can take to hold the key/value into an in-memory hash table + when this map join is followed by a group by. If the local task's memory usage is more than this number, + + + + hive.mapjoin.localtask.max.memory.usage + 0.9 + + This number means how much memory the local task can take to hold the key/value into an in-memory hash table. + If the local task's memory usage is more than this number, the local task will abort by itself. + + + + hive.mapjoin.check.memory.rows + 100000 + The number means after how many rows processed it needs to check the memory usage + + + hive.debug.localtask + false + + + + hive.input.format + org.apache.hadoop.hive.ql.io.CombineHiveInputFormat + The default input format. Set this to HiveInputFormat if you encounter problems with CombineHiveInputFormat. + + + hive.enforce.bucketing + false + Whether bucketing is enforced. If true, while inserting into the table, bucketing is enforced. + + + hive.enforce.sorting + false + Whether sorting is enforced. If true, while inserting into the table, sorting is enforced. + + + hive.optimize.bucketingsorting + true + + If hive.enforce.bucketing or hive.enforce.sorting is true, don't create a reducer for enforcing + bucketing/sorting for queries of the form: + insert overwrite table T2 select * from T1; + + + + hive.mapred.partitioner + org.apache.hadoop.hive.ql.io.DefaultHivePartitioner + + + + hive.enforce.sortmergebucketmapjoin + false + If the user asked for sort-merge bucketed map-side join, and it cannot be performed, should the query fail or not ? + + + hive.enforce.bucketmapjoin + false + + If the user asked for bucketed map-side join, and it cannot be performed, + should the query fail or not ? For example, if the buckets in the tables being joined are + not a multiple of each other, bucketed map-side join cannot be performed, and the + + + + hive.auto.convert.sortmerge.join + false + Will the join be automatically converted to a sort-merge join, if the joined tables pass the criteria for sort-merge join. + + + hive.auto.convert.sortmerge.join.bigtable.selection.policy + org.apache.hadoop.hive.ql.optimizer.AvgPartitionSizeBasedBigTableSelectorForAutoSMJ + + The policy to choose the big table for automatic conversion to sort-merge join. + By default, the table with the largest partitions is assigned the big table. All policies are: + . based on position of the table - the leftmost table is selected + org.apache.hadoop.hive.ql.optimizer.LeftmostBigTableSMJ. + . based on total size (all the partitions selected in the query) of the table + org.apache.hadoop.hive.ql.optimizer.TableSizeBasedBigTableSelectorForAutoSMJ. + . based on average size (all the partitions selected in the query) of the table + org.apache.hadoop.hive.ql.optimizer.AvgPartitionSizeBasedBigTableSelectorForAutoSMJ. + + + + hive.auto.convert.sortmerge.join.to.mapjoin + false + + If hive.auto.convert.sortmerge.join is set to true, and a join was converted to a sort-merge join, + this parameter decides whether each table should be tried as a big table, and effectively a map-join should be + tried. That would create a conditional task with n+1 children for a n-way join (1 child for each table as the + big table), and the backup task will be the sort-merge join. In some cases, a map-join would be faster than a + sort-merge join, if there is no advantage of having the output bucketed and sorted. For example, if a very big sorted + and bucketed table with few files (say 10 files) are being joined with a very small sorter and bucketed table + with few files (10 files), the sort-merge join will only use 10 mappers, and a simple map-only join might be faster + + + + hive.exec.script.trust + false + + + + hive.exec.rowoffset + false + Whether to provide the row offset virtual column + + + hive.hadoop.supports.splittable.combineinputformat + false + + + + hive.optimize.index.filter + false + Whether to enable automatic use of indexes + + + hive.optimize.index.autoupdate + false + Whether to update stale indexes automatically + + + hive.optimize.ppd + true + Whether to enable predicate pushdown + + + hive.ppd.recognizetransivity + true + Whether to transitively replicate predicate filters over equijoin conditions. + + + hive.ppd.remove.duplicatefilters + true + Whether to push predicates down into storage handlers. Ignored when hive.optimize.ppd is false. + + + hive.optimize.metadataonly + true + + + + hive.optimize.ppd.storage + true + Whether to push predicates down to storage handlers + + + hive.optimize.groupby + true + Whether to enable the bucketed group by from bucketed partitions/tables. + + + hive.optimize.bucketmapjoin + false + Whether to try bucket mapjoin + + + hive.optimize.bucketmapjoin.sortedmerge + false + Whether to try sorted bucket merge map join + + + hive.optimize.reducededuplication + true + + Remove extra map-reduce jobs if the data is already clustered by the same key which needs to be used again. + + + + hive.optimize.reducededuplication.min.reducer + 4 + + Reduce deduplication merges two RSs by moving key/parts/reducer-num of the child RS to parent RS. + 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. + + + + hive.optimize.sampling.orderby + false + + + + hive.optimize.sampling.orderby.number + 1000 + + + + hive.optimize.sampling.orderby.percent + 0.1 + + + + hive.optimize.union.remove + false + + Whether to remove the union and push the operators between union and the filesink above union. + This avoids an extra scan of the output by union. This is independently useful for union + queries, and specially useful when hive.optimize.skewjoin.compiletime is set to true, since an + extra union is inserted. + + The merge is triggered if either of hive.merge.mapfiles or hive.merge.mapredfiles is set to true. + If the user has set hive.merge.mapfiles to true and hive.merge.mapredfiles to false, the idea was the + number of reducers are few, so the number of files anyway are small. However, with this optimization, + + + + hive.optimize.correlation + false + exploit intra-query correlations. + + + hive.mapred.supports.subdirectories + false + + Whether the version of Hadoop which is running supports sub-directories for tables/partitions. + Many Hive optimizations can be applied if the Hadoop version supports sub-directories for + + + + hive.optimize.skewjoin.compiletime + false + + Whether to create a separate plan for skewed keys for the tables in the join. + This is based on the skewed keys stored in the metadata. At compile time, the plan is broken + into different joins: one for the skewed keys, and the other for the remaining keys. And then, + a union is performed for the 2 joins generated above. So unless the same skewed key is present + in both the joined tables, the join for the skewed key will be performed as a map-side join. + + The main difference between this parameter and hive.optimize.skewjoin is that this parameter + uses the skew information stored in the metastore to optimize the plan at compile time itself. + If there is no skew information in the metadata, this parameter will not have any affect. + Both hive.optimize.skewjoin.compiletime and hive.optimize.skewjoin should be set to true. + Ideally, hive.optimize.skewjoin should be renamed as hive.optimize.skewjoin.runtime, but not doing + so for backward compatibility. + + If the skew information is correctly stored in the metadata, hive.optimize.skewjoin.compiletime + + + + hive.optimize.index.filter.compact.minsize + 5368709120 + Minimum size (in bytes) of the inputs on which a compact index is automatically used. + + + hive.optimize.index.filter.compact.maxsize + -1 + Maximum size (in bytes) of the inputs on which a compact index is automatically used. A negative number is equivalent to infinity. + + + hive.index.compact.query.max.entries + 10000000 + The maximum number of index entries to read during a query that uses the compact index. Negative value is equivalent to infinity. + + + hive.index.compact.query.max.size + 10737418240 + The maximum number of bytes that a query using the compact index can read. Negative value is equivalent to infinity. + + + hive.index.compact.binary.search + true + Whether or not to use a binary search to find the entries in an index table that match the filter, where possible + + + hive.stats.autogather + true + A flag to gather statistics automatically during the INSERT OVERWRITE command. + + + hive.stats.dbclass + counter + The storage that stores temporary Hive statistics. Currently, jdbc, hbase, counter and custom type are supported. + + + hive.stats.jdbcdriver + org.apache.derby.jdbc.EmbeddedDriver + The JDBC driver for the database that stores temporary Hive statistics. + + + hive.stats.dbconnectionstring + jdbc:derby:;databaseName=TempStatsStore;create=true + The default connection string for the database that stores temporary Hive statistics. + + + hive.stats.default.publisher + + The Java class (implementing the StatsPublisher interface) that is used by default if hive.stats.dbclass is custom type. + + + hive.stats.default.aggregator + + The Java class (implementing the StatsAggregator interface) that is used by default if hive.stats.dbclass is custom type. + + + hive.stats.jdbc.timeout + 30 + Timeout value (number of seconds) used by JDBC connection and statements. + + + hive.stats.atomic + false + whether to update metastore stats only if all stats are available + + + hive.stats.retries.max + 0 + + Maximum number of retries when stats publisher/aggregator got an exception updating intermediate database. + + + + hive.stats.retries.wait + 3000 + The base waiting window (in milliseconds) before the next retry. The actual wait time is calculated by baseWindow * failures baseWindow * (failure 1) * (random number between [0.0,1.0]). + + + hive.stats.collect.rawdatasize + true + + + + hive.client.stats.counters + + + Subset of counters that should be of interest for hive.client.stats.publishers (when one wants to limit their publishing). + + + + hive.stats.reliable + false + + Whether queries will fail because stats cannot be collected completely accurately. + If this is set to true, reading/writing from/into a partition may fail because the stats + + + + hive.stats.collect.tablekeys + false + + Whether join and group by keys on tables are derived and maintained in the QueryPlan. + + + + hive.stats.collect.scancols + false + + Whether column accesses are tracked in the QueryPlan. + + + + hive.stats.ndv.error + 20.0 + + Standard error expressed in percentage. Provides a tradeoff between accuracy and compute cost. + + + + hive.stats.key.prefix.max.length + 150 + + Determines if when the prefix of the key used for intermediate stats collection + + + + hive.stats.key.prefix.reserve.length + 24 + + Reserved length for postfix of stats key. Currently only meaningful for counter type which should + keep length of full stats key smaller than max length configured by hive.stats.key.prefix.max.length. + + + + hive.stats.key.prefix + + + + + hive.stats.max.variable.length + 100 + + To estimate the size of data flowing through operators in Hive/Tez(for reducer estimation etc.), + average row size is multiplied with the total number of rows coming out of each operator. + Average row size is computed from average column size of all columns in the row. In the absence + of column statistics, for variable length columns (like string, bytes etc.), this value will be + used. For fixed length columns their corresponding Java equivalent sizes are used + (float - 4 bytes, double - 8 bytes etc.). + + + + hive.stats.list.num.entries + 10 + + To estimate the size of data flowing through operators in Hive/Tez(for reducer estimation etc.), + average row size is multiplied with the total number of rows coming out of each operator. + Average row size is computed from average column size of all columns in the row. In the absence + of column statistics and for variable length complex columns like list, the average number of + + + + hive.stats.map.num.entries + 10 + + To estimate the size of data flowing through operators in Hive/Tez(for reducer estimation etc.), + average row size is multiplied with the total number of rows coming out of each operator. + Average row size is computed from average column size of all columns in the row. In the absence + of column statistics and for variable length complex columns like map, the average number of + + + + hive.stats.map.parallelism + 1 + + Hive/Tez optimizer estimates the data size flowing through each of the operators. + For GROUPBY operator, to accurately compute the data size map-side parallelism needs to + be known. By default, this value is set to 1 since optimizer is not aware of the number of + mappers during compile-time. This Hive config can be used to specify the number of mappers + to be used for data size computation of GROUPBY operator. + + + + hive.stats.fetch.partition.stats + true + + Annotation of operator tree with statistics information requires partition level basic + statisitcs like number of rows, data size and file size. Partition statistics are fetched from + metastore. Fetching partition statistics for each needed partition can be expensive when the + number of partitions is high. This flag can be used to disable fetching of partition statistics + from metastore. When this flag is disabled, Hive will make calls to filesystem to get file sizes + and will estimate the number of rows from row schema. + + + + hive.stats.fetch.column.stats + false + + Annotation of operator tree with statistics information requires column statisitcs. + Column statistics are fetched from metastore. Fetching column statistics for each needed column + can be expensive when the number of columns is high. This flag can be used to disable fetching + of column statistics from metastore. + + + + hive.stats.join.factor + 1.1 + + Hive/Tez optimizer estimates the data size flowing through each of the operators. JOIN operator + uses column statistics to estimate the number of rows flowing out of it and hence the data size. + In the absence of column statistics, this factor determines the amount of rows that flows out + of JOIN operator. + + + + hive.stats.deserialization.factor + 1.0 + + Hive/Tez optimizer estimates the data size flowing through each of the operators. In the absence + of basic statistics like number of rows and data size, file size is used to estimate the number + of rows and data size. Since files in tables/partitions are serialized (and optionally + compressed) the estimates of number of rows and data size cannot be reliably determined. + This factor is multiplied with the file size to account for serialization and compression. + + + + hive.support.concurrency + false + + Whether Hive supports concurrency control or not. + + + + hive.lock.manager + org.apache.hadoop.hive.ql.lockmgr.zookeeper.ZooKeeperHiveLockManager + + + + hive.lock.numretries + 100 + The number of times you want to try to get all the locks + + + hive.unlock.numretries + 10 + The number of times you want to retry to do one unlock + + + hive.lock.sleep.between.retries + 60 + The sleep time (in seconds) between various retries + + + hive.lock.mapred.only.operation + false + + This param is to control whether or not only do lock on queries + + + + hive.zookeeper.quorum + + The list of ZooKeeper servers to talk to. This is only needed for read/write locks. + + + hive.zookeeper.client.port + 2181 + The port of ZooKeeper servers to talk to. This is only needed for read/write locks. + + + hive.zookeeper.session.timeout + 600000 + + ZooKeeper client's session timeout. The client is disconnected, and as a result, all locks released, + + + + hive.zookeeper.namespace + hive_zookeeper_namespace + The parent node under which all ZooKeeper nodes are created. + + + hive.zookeeper.clean.extra.nodes + false + Clean extra nodes at the end of the session. + + + hive.hbase.wal.enabled + true + + Whether writes to HBase should be forced to the write-ahead log. + + + + hive.archive.enabled + false + Whether archiving operations are permitted + + + hive.optimize.index.groupby + false + Whether to enable optimization of group-by queries using Aggregate indexes. + + + hive.outerjoin.supports.filters + true + + + + hive.fetch.task.conversion + minimal + + Some select queries can be converted to single FETCH task minimizing latency. + Currently the query should be single sourced not having any subquery and should not have + any aggregations or distincts (which incurs RS), lateral views and joins. + 1. minimal : SELECT STAR, FILTER on partition columns, LIMIT only + 2. more : SELECT, FILTER, LIMIT only (support TABLESAMPLE and virtual columns) + + + + hive.fetch.task.conversion.threshold + -1 + + Input threshold for applying hive.fetch.task.conversion. If target table is native, input length + is calculated by summation of file lengths. If it's not native, storage handler for the table + can optionally implement org.apache.hadoop.hive.ql.metadata.InputEstimator interface. + + + + hive.fetch.task.aggr + false + + Aggregation queries with no group-by clause (for example, select count(*) from src) execute + final aggregations in single reduce task. If this is set true, Hive delegates final aggregation + stage to fetch task, possibly decreasing the query time. + + + + hive.compute.query.using.stats + false + + When set to true Hive will answer a few queries like count(1) purely using stats + stored in metastore. For basic stats collection turn on the config hive.stats.autogather to true. + For more advanced stats collection need to run analyze table queries. + + + + hive.fetch.output.serde + org.apache.hadoop.hive.serde2.DelimitedJSONSerDe + The SerDe used by FetchTask to serialize the fetch output. + + + hive.cache.expr.evaluation + true + If true, evaluation result of deterministic expression referenced twice or more will be cached. + + + hive.variable.substitute + true + This enables substitution using syntax like ${var} ${system:var} and ${env:var}. + + + hive.variable.substitute.depth + 40 + The maximum replacements the substitution engine will do. + + + hive.conf.validation + true + Enables type checking for registered Hive configurations + + + hive.semantic.analyzer.hook + + + + + hive.security.authorization.enabled + false + enable or disable the Hive client authorization + + + hive.security.authorization.manager + org.apache.hadoop.hive.ql.security.authorization.DefaultHiveAuthorizationProvider + + The Hive client authorization manager class name. The user defined authorization class should implement + + + + hive.security.authenticator.manager + org.apache.hadoop.hive.ql.security.HadoopDefaultAuthenticator + + hive client authenticator manager class name. The user defined authenticator should implement + + + + hive.security.metastore.authorization.manager + org.apache.hadoop.hive.ql.security.authorization.DefaultHiveMetastoreAuthorizationProvider + + authorization manager class name to be used in the metastore for authorization. + The user defined authorization class should implement interface + + + + hive.security.metastore.authenticator.manager + org.apache.hadoop.hive.ql.security.HadoopDefaultMetastoreAuthenticator + + authenticator manager class name to be used in the metastore for authentication. + + + + hive.security.authorization.createtable.user.grants + + + the privileges automatically granted to some users whenever a table gets created. + An example like "userX,userY:select;userZ:create" will grant select privilege to userX and userY, + + + + hive.security.authorization.createtable.group.grants + + + the privileges automatically granted to some groups whenever a table gets created. + An example like "groupX,groupY:select;groupZ:create" will grant select privilege to groupX and groupY, + + + + hive.security.authorization.createtable.role.grants + + + the privileges automatically granted to some roles whenever a table gets created. + An example like "roleX,roleY:select;roleZ:create" will grant select privilege to roleX and roleY, + + + + hive.security.authorization.createtable.owner.grants + + + the privileges automatically granted to the owner whenever a table gets created. + + + + hive.cli.print.header + false + Whether to print the names of the columns in query output. + + + hive.error.on.empty.partition + false + Whether to throw an exception if dynamic partition insert generates empty results. + + + hive.index.compact.file.ignore.hdfs + false + + When true the HDFS location stored in the index file will be ignored at runtime. + + + + hive.exim.uri.scheme.whitelist + hdfs,pfile + A comma separated list of acceptable URI schemes for import and export. + + + hive.mapper.cannot.span.multiple.partitions + false + + + + hive.rework.mapredwork + false + + should rework the mapred work or not. + + + + hive.exec.concatenate.check.index + true + + If this is set to true, Hive will throw error when doing + 'alter table tbl_name [partSpec] concatenate' on a table/partition + that has indexes on it. The reason the user want to set this to true + is because it can help user to avoid handling all index drop, recreation, + + + + hive.io.exception.handlers + + + A list of io exception handler class names. This is used + to construct a list exception handlers to handle exceptions thrown + + + + hive.log4j.file + + + Hive log4j configuration file. + If the property is not set, then logging will be initialized using hive-log4j.properties found on the classpath. + If the property is set, the value must be a valid URI (java.net.URI, e.g. "file:///tmp/my-logging.properties"), + + + + hive.exec.log4j.file + + + Hive log4j configuration file for execution mode(sub command). + If the property is not set, then logging will be initialized using hive-exec-log4j.properties found on the classpath. + If the property is set, the value must be a valid URI (java.net.URI, e.g. "file:///tmp/my-logging.properties"), + + + + hive.autogen.columnalias.prefix.label + _c + + String used as a prefix when auto generating column alias. + By default the prefix label will be appended with a column position number to form the column alias. + + + + hive.autogen.columnalias.prefix.includefuncname + false + Whether to include function name in the column alias auto generated by Hive. + + + hive.exec.perf.logger + org.apache.hadoop.hive.ql.log.PerfLogger + + The class responsible for logging client side performance metrics. + + + + hive.start.cleanup.scratchdir + false + To cleanup the Hive scratchdir when starting the Hive Server + + + hive.insert.into.multilevel.dirs + false + + Where to insert into multilevel directories like + + + + hive.warehouse.subdir.inherit.perms + false + + Set this to true if the the table directories should inherit the + permission of the warehouse or database directory instead of being created + + + + hive.insert.into.external.tables + true + whether insert into external tables is allowed + + + hive.exec.driver.run.hooks + + A comma separated list of hooks which implement HiveDriverRunHook. Will be run at the beginning and end of Driver.run, these will be run in the order specified. + + + hive.ddl.output.format + + + The data format to use for DDL output. One of "text" (for human + readable text) or "json" (for a json object). + + + + hive.entity.separator + @ + Separator used to construct names of tables and partitions. For example, dbname@tablename@partitionname + + + hive.server2.max.start.attempts + 30 + + This number of times HiveServer2 will attempt to start before exiting, sleeping 60 seconds between retries. + + + + hive.server2.transport.mode + binary + Server transport mode. "binary" or "http" + + + hive.server2.thrift.http.port + 10001 + Port number when in HTTP mode. + + + hive.server2.thrift.http.path + cliservice + Path component of URL endpoint when in HTTP mode. + + + hive.server2.thrift.http.min.worker.threads + 5 + Minimum number of worker threads when in HTTP mode. + + + hive.server2.thrift.http.max.worker.threads + 500 + Maximum number of worker threads when in HTTP mode. + + + hive.server2.thrift.port + 10000 + + Port number of HiveServer2 Thrift interface. + + + + hive.server2.thrift.bind.host + + + Bind host on which to run the HiveServer2 Thrift interface. + + + + hive.server2.thrift.sasl.qop + auth + + Sasl QOP value; Set it to one of following values to enable higher levels of + protection for HiveServer2 communication with clients. + "auth" - authentication only (default) + "auth-int" - authentication plus integrity protection + "auth-conf" - authentication plus integrity and confidentiality protection + + + + hive.server2.thrift.min.worker.threads + 5 + Minimum number of Thrift worker threads + + + hive.server2.thrift.max.worker.threads + 500 + Maximum number of Thrift worker threads + + + hive.server2.async.exec.threads + 100 + Number of threads in the async thread pool for HiveServer2 + + + hive.server2.async.exec.shutdown.timeout + 10 + Time (in seconds) for which HiveServer2 shutdown will wait for async + + + hive.server2.async.exec.wait.queue.size + 100 + + Size of the wait queue for async thread pool in HiveServer2. + + + + hive.server2.async.exec.keepalive.time + 10 + + Time (in seconds) that an idle HiveServer2 async thread (from the thread pool) will wait + + + + hive.server2.authentication + NONE + + Client authentication types. + NONE: no authentication check + LDAP: LDAP/AD based authentication + KERBEROS: Kerberos/GSSAPI authentication + CUSTOM: Custom authentication provider + + + + hive.server2.authentication.kerberos.keytab + + Kerberos keytab file for server principal + + + hive.server2.authentication.kerberos.principal + + Kerberos server principal + + + hive.server2.authentication.ldap.url + + LDAP connection URL + + + hive.server2.authentication.ldap.baseDN + + LDAP base DN + + + hive.server2.authentication.ldap.Domain + + + + + hive.server2.custom.authentication.class + + + Custom authentication class. Used when property + 'hive.server2.authentication' is set to 'CUSTOM'. Provided class + must be a proper implementation of the interface + org.apache.hive.service.auth.PasswdAuthenticationProvider. HiveServer2 + will call its Authenticate(user, passed) method to authenticate requests. + The implementation may optionally extend Hadoop's + org.apache.hadoop.conf.Configured class to grab Hive's Configuration object. + + + + hive.server2.enable.doAs + true + + Setting this property to true will have HiveServer2 execute + Hive operations as the user making the calls to it. + + + + hive.server2.table.type.mapping + CLASSIC + + This setting reflects how HiveServer2 will report the table types for JDBC and other + client implementations that retrieve the available tables and supported table types + HIVE : Exposes Hive's native table types like MANAGED_TABLE, EXTERNAL_TABLE, VIRTUAL_VIEW + + + + hive.server2.session.hook + + + + + hive.server2.use.SSL + false + + + + hive.server2.keystore.path + + + + + hive.server2.keystore.password + + + + + hive.security.command.whitelist + set,reset,dfs,add,delete,compile + Comma separated list of non-SQL Hive commands users are authorized to execute + + + hive.conf.restricted.list + + Comma separated list of configuration options which are immutable at runtime + + + hive.multi.insert.move.tasks.share.dependencies + false + + If this is set all move tasks for tables/partitions (not directories) at the end of a + multi-insert query will only begin once the dependencies for all these move tasks have been + met. + Advantages: If concurrency is enabled, the locks will only be released once the query has + finished, so with this config enabled, the time when the table/partition is + generated will be much closer to when the lock on it is released. + Disadvantages: If concurrency is not enabled, with this disabled, the tables/partitions which + are produced by this query and finish earlier will be available for querying + much earlier. Since the locks are only released once the query finishes, this + does not apply if concurrency is enabled. + + + + hive.exec.infer.bucket.sort + false + + If this is set, when writing partitions, the metadata will include the bucketing/sorting + properties with which the data was written if any (this will not overwrite the metadata + inherited from the table if the table is bucketed/sorted) + + + + hive.exec.infer.bucket.sort.num.buckets.power.two + false + + If this is set, when setting the number of reducers for the map reduce task which writes the + final output files, it will choose a number which is a power of two, unless the user specifies + the number of reducers to use using mapred.reduce.tasks. The number of reducers + may be set to a power of two, only to be followed by a merge task meaning preventing + anything from being inferred. + With hive.exec.infer.bucket.sort set to true: + Advantages: If this is not set, the number of buckets for partitions will seem arbitrary, + which means that the number of mappers used for optimized joins, for example, will + be very low. With this set, since the number of buckets used for any partition is + a power of two, the number of mappers used for optimized joins will be the least + number of buckets used by any partition being joined. + Disadvantages: This may mean a much larger or much smaller number of reducers being used in the + final map reduce job, e.g. if a job was originally going to take 257 reducers, + it will now take 512 reducers, similarly if the max number of reducers is 511, + and a job was going to use this many, it will now use 256 reducers. + + + + hive.merge.current.job.concatenate.list.bucketing + true + + + + hive.merge.current.job.concatenate.list.bucketing.depth + 0 + + + + hive.optimize.listbucketing + false + Enable list bucketing optimizer. Default value is false so that we disable it by default. + + + hive.server.read.socket.timeout + 10 + Timeout for the HiveServer to close the connection if no response from the client in N seconds, defaults to 10 seconds. + + + hive.server.tcp.keepalive + true + Whether to enable TCP keepalive for the Hive Server. Keepalive will prevent accumulation of half-open connections. + + + hive.decode.partition.name + false + Whether to show the unquoted partition names in query results. + + + hive.execution.engine + mr + Chooses execution engine. Options are: mr (Map reduce, default) or tez (hadoop 2 only) + + + hive.jar.directory + hdfs:///user/hive/ + + This is the location hive in tez mode will look for to find a site wide + + + + hive.user.install.directory + hdfs:///user/ + + If hive (in tez mode only) cannot find a usable hive jar in "hive.jar.directory", + it will upload the hive jar to &lthive.user.install.directory&gt/&ltuser name&gt + + + + hive.vectorized.execution.enabled + false + + This flag should be set to true to enable vectorized mode of query execution. + + + + hive.vectorized.groupby.checkinterval + 100000 + Number of entries added to the group by aggregation hash before a reocmputation of average entry size is performed. + + + hive.vectorized.groupby.maxentries + 1000000 + + Max number of entries in the vector group by aggregation hashtables. + + + + hive.vectorized.groupby.flush.percent + 0.1 + Percent of entries in the group by aggregation hash flushed when the memory treshold is exceeded. + + + hive.typecheck.on.insert + true + + + + hive.rpc.query.plan + false + Whether to send the query plan via local resource or RPC + + + hive.compute.splits.in.am + true + Whether to generate the splits locally or in the AM (tez only) + + + hive.stageid.rearrange + none + + + + hive.explain.dependency.append.tasktype + false + + + + hive.counters.group.name + HIVE + The name of counter group for internal Hive variables (CREATED_FILE, FATAL_ERROR, etc.) + + + hive.support.quoted.identifiers + column + + Whether to use quoted identifier. 'none' ot 'column' can be used. + none: default(past) behavior. Implies only alphaNumeric and underscore are valid characters in identifiers. + + + + hive.users.in.admin.role + + + Comma separated list of users who are in admin role for bootstrapping. + + diff --git contrib/src/java/org/apache/hadoop/hive/contrib/metastore/hooks/TestURLHook.java contrib/src/java/org/apache/hadoop/hive/contrib/metastore/hooks/TestURLHook.java index 39562ea..4c72716 100644 --- contrib/src/java/org/apache/hadoop/hive/contrib/metastore/hooks/TestURLHook.java +++ contrib/src/java/org/apache/hadoop/hive/contrib/metastore/hooks/TestURLHook.java @@ -32,7 +32,7 @@ @Override public String getJdoConnectionUrl(Configuration conf) throws Exception { if (originalUrl == null) { - originalUrl = conf.get(HiveConf.ConfVars.METASTORECONNECTURLKEY.varname, ""); + originalUrl = conf.get(HiveConf.ConfVars.METASTORECONNECTURLKEY.varname(), ""); return "jdbc:derby:;databaseName=target/tmp/junit_metastore_db_blank;create=true"; } else { return originalUrl; diff --git hcatalog/core/src/main/java/org/apache/hcatalog/common/HCatConstants.java hcatalog/core/src/main/java/org/apache/hcatalog/common/HCatConstants.java index a7e5b91..85a9800 100644 --- hcatalog/core/src/main/java/org/apache/hcatalog/common/HCatConstants.java +++ hcatalog/core/src/main/java/org/apache/hcatalog/common/HCatConstants.java @@ -70,7 +70,7 @@ private HCatConstants() { // restrict instantiation public static final String HCAT_TABLE_SCHEMA = "hcat.table.schema"; - public static final String HCAT_METASTORE_URI = HiveConf.ConfVars.METASTOREURIS.varname; + public static final String HCAT_METASTORE_URI = HiveConf.ConfVars.METASTOREURIS.varname(); public static final String HCAT_PERMS = "hcat.perms"; @@ -81,7 +81,7 @@ private HCatConstants() { // restrict instantiation public static final String HCAT_CREATE_DB_NAME = "hcat.create.db.name"; public static final String HCAT_METASTORE_PRINCIPAL - = HiveConf.ConfVars.METASTORE_KERBEROS_PRINCIPAL.varname; + = HiveConf.ConfVars.METASTORE_KERBEROS_PRINCIPAL.varname(); /** * The desired number of input splits produced for each partition. When the diff --git hcatalog/core/src/main/java/org/apache/hcatalog/mapreduce/FileOutputCommitterContainer.java hcatalog/core/src/main/java/org/apache/hcatalog/mapreduce/FileOutputCommitterContainer.java index 512647c..03d499a 100644 --- hcatalog/core/src/main/java/org/apache/hcatalog/mapreduce/FileOutputCommitterContainer.java +++ hcatalog/core/src/main/java/org/apache/hcatalog/mapreduce/FileOutputCommitterContainer.java @@ -566,7 +566,7 @@ private void discoverPartitions(JobContext context) throws IOException { + "exceeds configured max allowable partitions[" + maxDynamicPartitions + "], increase parameter [" - + HiveConf.ConfVars.DYNAMICPARTITIONMAXPARTS.varname + + HiveConf.ConfVars.DYNAMICPARTITIONMAXPARTS.varname() + "] if needed."); } diff --git hcatalog/core/src/main/java/org/apache/hcatalog/mapreduce/FileRecordWriterContainer.java hcatalog/core/src/main/java/org/apache/hcatalog/mapreduce/FileRecordWriterContainer.java index efdb595..20e28f0 100644 --- hcatalog/core/src/main/java/org/apache/hcatalog/mapreduce/FileRecordWriterContainer.java +++ hcatalog/core/src/main/java/org/apache/hcatalog/mapreduce/FileRecordWriterContainer.java @@ -176,7 +176,7 @@ public void write(WritableComparable key, HCatRecord value) throws IOExceptio + "exceeds configured max allowable partitions[" + maxDynamicPartitions + "], increase parameter [" - + HiveConf.ConfVars.DYNAMICPARTITIONMAXPARTS.varname + + HiveConf.ConfVars.DYNAMICPARTITIONMAXPARTS.varname() + "] if needed."); } diff --git hcatalog/core/src/main/java/org/apache/hive/hcatalog/common/HCatConstants.java hcatalog/core/src/main/java/org/apache/hive/hcatalog/common/HCatConstants.java index 2ee50b3..2686244 100644 --- hcatalog/core/src/main/java/org/apache/hive/hcatalog/common/HCatConstants.java +++ hcatalog/core/src/main/java/org/apache/hive/hcatalog/common/HCatConstants.java @@ -71,7 +71,7 @@ private HCatConstants() { // restrict instantiation public static final String HCAT_TABLE_SCHEMA = "hcat.table.schema"; - public static final String HCAT_METASTORE_URI = HiveConf.ConfVars.METASTOREURIS.varname; + public static final String HCAT_METASTORE_URI = HiveConf.ConfVars.METASTOREURIS.varname(); public static final String HCAT_PERMS = "hcat.perms"; @@ -82,7 +82,7 @@ private HCatConstants() { // restrict instantiation public static final String HCAT_CREATE_DB_NAME = "hcat.create.db.name"; public static final String HCAT_METASTORE_PRINCIPAL - = HiveConf.ConfVars.METASTORE_KERBEROS_PRINCIPAL.varname; + = HiveConf.ConfVars.METASTORE_KERBEROS_PRINCIPAL.varname(); /** * The desired number of input splits produced for each partition. When the diff --git hcatalog/core/src/main/java/org/apache/hive/hcatalog/mapreduce/FileOutputCommitterContainer.java hcatalog/core/src/main/java/org/apache/hive/hcatalog/mapreduce/FileOutputCommitterContainer.java index a5ae1be..ebae389 100644 --- hcatalog/core/src/main/java/org/apache/hive/hcatalog/mapreduce/FileOutputCommitterContainer.java +++ hcatalog/core/src/main/java/org/apache/hive/hcatalog/mapreduce/FileOutputCommitterContainer.java @@ -570,7 +570,7 @@ private void discoverPartitions(JobContext context) throws IOException { + "exceeds configured max allowable partitions[" + maxDynamicPartitions + "], increase parameter [" - + HiveConf.ConfVars.DYNAMICPARTITIONMAXPARTS.varname + + HiveConf.ConfVars.DYNAMICPARTITIONMAXPARTS.varname() + "] if needed."); } diff --git hcatalog/core/src/main/java/org/apache/hive/hcatalog/mapreduce/FileRecordWriterContainer.java hcatalog/core/src/main/java/org/apache/hive/hcatalog/mapreduce/FileRecordWriterContainer.java index 50db91d..fb34bdc 100644 --- hcatalog/core/src/main/java/org/apache/hive/hcatalog/mapreduce/FileRecordWriterContainer.java +++ hcatalog/core/src/main/java/org/apache/hive/hcatalog/mapreduce/FileRecordWriterContainer.java @@ -175,7 +175,7 @@ public void write(WritableComparable key, HCatRecord value) throws IOExceptio + "exceeds configured max allowable partitions[" + maxDynamicPartitions + "], increase parameter [" - + HiveConf.ConfVars.DYNAMICPARTITIONMAXPARTS.varname + + HiveConf.ConfVars.DYNAMICPARTITIONMAXPARTS.varname() + "] if needed."); } diff --git hcatalog/core/src/test/java/org/apache/hcatalog/cli/TestPermsGrp.java hcatalog/core/src/test/java/org/apache/hcatalog/cli/TestPermsGrp.java index 2b0af67..60495f1 100644 --- hcatalog/core/src/test/java/org/apache/hcatalog/cli/TestPermsGrp.java +++ hcatalog/core/src/test/java/org/apache/hcatalog/cli/TestPermsGrp.java @@ -90,14 +90,14 @@ protected void setUp() throws Exception { hcatConf.setIntVar(HiveConf.ConfVars.METASTORETHRIFTFAILURERETRIES, 3); hcatConf.setIntVar(HiveConf.ConfVars.METASTORE_CLIENT_SOCKET_TIMEOUT, 120); - hcatConf.set(HiveConf.ConfVars.SEMANTIC_ANALYZER_HOOK.varname, HCatSemanticAnalyzer.class.getName()); - hcatConf.set(HiveConf.ConfVars.PREEXECHOOKS.varname, ""); - hcatConf.set(HiveConf.ConfVars.POSTEXECHOOKS.varname, ""); - hcatConf.set(HiveConf.ConfVars.HIVE_SUPPORT_CONCURRENCY.varname, "false"); + hcatConf.set(HiveConf.ConfVars.SEMANTIC_ANALYZER_HOOK.varname(), HCatSemanticAnalyzer.class.getName()); + hcatConf.set(HiveConf.ConfVars.PREEXECHOOKS.varname(), ""); + hcatConf.set(HiveConf.ConfVars.POSTEXECHOOKS.varname(), ""); + hcatConf.set(HiveConf.ConfVars.HIVE_SUPPORT_CONCURRENCY.varname(), "false"); clientWH = new Warehouse(hcatConf); msc = new HiveMetaStoreClient(hcatConf, null); - System.setProperty(HiveConf.ConfVars.PREEXECHOOKS.varname, " "); - System.setProperty(HiveConf.ConfVars.POSTEXECHOOKS.varname, " "); + System.setProperty(HiveConf.ConfVars.PREEXECHOOKS.varname(), " "); + System.setProperty(HiveConf.ConfVars.POSTEXECHOOKS.varname(), " "); } diff --git hcatalog/core/src/test/java/org/apache/hcatalog/cli/TestSemanticAnalysis.java hcatalog/core/src/test/java/org/apache/hcatalog/cli/TestSemanticAnalysis.java index 80f2ec5..4c53e85 100644 --- hcatalog/core/src/test/java/org/apache/hcatalog/cli/TestSemanticAnalysis.java +++ hcatalog/core/src/test/java/org/apache/hcatalog/cli/TestSemanticAnalysis.java @@ -65,7 +65,7 @@ public void setUpHCatDriver() throws IOException { if (hcatDriver == null) { HiveConf hcatConf = new HiveConf(hiveConf); - hcatConf.set(HiveConf.ConfVars.SEMANTIC_ANALYZER_HOOK.varname, + hcatConf.set(HiveConf.ConfVars.SEMANTIC_ANALYZER_HOOK.varname(), HCatSemanticAnalyzer.class.getName()); hcatDriver = new Driver(hcatConf); SessionState.start(new CliSessionState(hcatConf)); diff --git hcatalog/core/src/test/java/org/apache/hcatalog/cli/TestUseDatabase.java hcatalog/core/src/test/java/org/apache/hcatalog/cli/TestUseDatabase.java index 122a682..7440100 100644 --- hcatalog/core/src/test/java/org/apache/hcatalog/cli/TestUseDatabase.java +++ hcatalog/core/src/test/java/org/apache/hcatalog/cli/TestUseDatabase.java @@ -43,11 +43,11 @@ protected void setUp() throws Exception { HiveConf hcatConf = new HiveConf(this.getClass()); - hcatConf.set(ConfVars.PREEXECHOOKS.varname, ""); - hcatConf.set(ConfVars.POSTEXECHOOKS.varname, ""); - hcatConf.set(ConfVars.HIVE_SUPPORT_CONCURRENCY.varname, "false"); + hcatConf.set(ConfVars.PREEXECHOOKS.varname(), ""); + hcatConf.set(ConfVars.POSTEXECHOOKS.varname(), ""); + hcatConf.set(ConfVars.HIVE_SUPPORT_CONCURRENCY.varname(), "false"); - hcatConf.set(ConfVars.SEMANTIC_ANALYZER_HOOK.varname, HCatSemanticAnalyzer.class.getName()); + hcatConf.set(ConfVars.SEMANTIC_ANALYZER_HOOK.varname(), HCatSemanticAnalyzer.class.getName()); hcatDriver = new Driver(hcatConf); SessionState.start(new CliSessionState(hcatConf)); } diff --git hcatalog/core/src/test/java/org/apache/hcatalog/common/TestHiveClientCache.java hcatalog/core/src/test/java/org/apache/hcatalog/common/TestHiveClientCache.java index d69dc8e..4a202dd 100644 --- hcatalog/core/src/test/java/org/apache/hcatalog/common/TestHiveClientCache.java +++ hcatalog/core/src/test/java/org/apache/hcatalog/common/TestHiveClientCache.java @@ -233,14 +233,14 @@ public LocalMetaServer() { + MS_PORT); hiveConf.setIntVar(HiveConf.ConfVars.METASTORETHRIFTCONNECTIONRETRIES, 3); hiveConf.setIntVar(HiveConf.ConfVars.METASTORETHRIFTFAILURERETRIES, 3); - hiveConf.set(HiveConf.ConfVars.SEMANTIC_ANALYZER_HOOK.varname, + hiveConf.set(HiveConf.ConfVars.SEMANTIC_ANALYZER_HOOK.varname(), HCatSemanticAnalyzer.class.getName()); - hiveConf.set(HiveConf.ConfVars.PREEXECHOOKS.varname, ""); - hiveConf.set(HiveConf.ConfVars.POSTEXECHOOKS.varname, ""); - hiveConf.set(HiveConf.ConfVars.HIVE_SUPPORT_CONCURRENCY.varname, + hiveConf.set(HiveConf.ConfVars.PREEXECHOOKS.varname(), ""); + hiveConf.set(HiveConf.ConfVars.POSTEXECHOOKS.varname(), ""); + hiveConf.set(HiveConf.ConfVars.HIVE_SUPPORT_CONCURRENCY.varname(), "false"); - System.setProperty(HiveConf.ConfVars.PREEXECHOOKS.varname, " "); - System.setProperty(HiveConf.ConfVars.POSTEXECHOOKS.varname, " "); + System.setProperty(HiveConf.ConfVars.PREEXECHOOKS.varname(), " "); + System.setProperty(HiveConf.ConfVars.POSTEXECHOOKS.varname(), " "); } public void start() throws InterruptedException { diff --git hcatalog/core/src/test/java/org/apache/hcatalog/data/HCatDataCheckUtil.java hcatalog/core/src/test/java/org/apache/hcatalog/data/HCatDataCheckUtil.java index b691185..2b24825 100644 --- hcatalog/core/src/test/java/org/apache/hcatalog/data/HCatDataCheckUtil.java +++ hcatalog/core/src/test/java/org/apache/hcatalog/data/HCatDataCheckUtil.java @@ -45,9 +45,9 @@ public static Driver instantiateDriver(MiniCluster cluster) { for (Entry e : cluster.getProperties().entrySet()) { hiveConf.set(e.getKey().toString(), e.getValue().toString()); } - hiveConf.set(HiveConf.ConfVars.PREEXECHOOKS.varname, ""); - hiveConf.set(HiveConf.ConfVars.POSTEXECHOOKS.varname, ""); - hiveConf.set(HiveConf.ConfVars.HIVE_SUPPORT_CONCURRENCY.varname, "false"); + hiveConf.set(HiveConf.ConfVars.PREEXECHOOKS.varname(), ""); + hiveConf.set(HiveConf.ConfVars.POSTEXECHOOKS.varname(), ""); + hiveConf.set(HiveConf.ConfVars.HIVE_SUPPORT_CONCURRENCY.varname(), "false"); LOG.debug("Hive conf : {}", hiveConf.getAllProperties()); Driver driver = new Driver(hiveConf); diff --git hcatalog/core/src/test/java/org/apache/hcatalog/mapreduce/TestHCatMultiOutputFormat.java hcatalog/core/src/test/java/org/apache/hcatalog/mapreduce/TestHCatMultiOutputFormat.java index f3e4037..348f023 100644 --- hcatalog/core/src/test/java/org/apache/hcatalog/mapreduce/TestHCatMultiOutputFormat.java +++ hcatalog/core/src/test/java/org/apache/hcatalog/mapreduce/TestHCatMultiOutputFormat.java @@ -104,7 +104,7 @@ @Override public void run() { try { - String warehouseConf = HiveConf.ConfVars.METASTOREWAREHOUSE.varname + "=" + String warehouseConf = HiveConf.ConfVars.METASTOREWAREHOUSE.varname() + "=" + warehousedir.toString(); HiveMetaStore.main(new String[]{"-v", "-p", msPort, "--hiveconf", warehouseConf}); } catch (Throwable t) { @@ -202,15 +202,15 @@ private static void initializeSetup() throws Exception { hiveConf.setVar(HiveConf.ConfVars.METASTOREURIS, "thrift://localhost:" + msPort); hiveConf.setIntVar(HiveConf.ConfVars.METASTORETHRIFTCONNECTIONRETRIES, 3); hiveConf.setIntVar(HiveConf.ConfVars.METASTORETHRIFTFAILURERETRIES, 3); - hiveConf.set(HiveConf.ConfVars.SEMANTIC_ANALYZER_HOOK.varname, + hiveConf.set(HiveConf.ConfVars.SEMANTIC_ANALYZER_HOOK.varname(), HCatSemanticAnalyzer.class.getName()); - hiveConf.set(HiveConf.ConfVars.PREEXECHOOKS.varname, ""); - hiveConf.set(HiveConf.ConfVars.POSTEXECHOOKS.varname, ""); - hiveConf.set(HiveConf.ConfVars.HIVE_SUPPORT_CONCURRENCY.varname, "false"); - System.setProperty(HiveConf.ConfVars.PREEXECHOOKS.varname, " "); - System.setProperty(HiveConf.ConfVars.POSTEXECHOOKS.varname, " "); + hiveConf.set(HiveConf.ConfVars.PREEXECHOOKS.varname(), ""); + hiveConf.set(HiveConf.ConfVars.POSTEXECHOOKS.varname(), ""); + hiveConf.set(HiveConf.ConfVars.HIVE_SUPPORT_CONCURRENCY.varname(), "false"); + System.setProperty(HiveConf.ConfVars.PREEXECHOOKS.varname(), " "); + System.setProperty(HiveConf.ConfVars.POSTEXECHOOKS.varname(), " "); - hiveConf.set(HiveConf.ConfVars.METASTOREWAREHOUSE.varname, warehousedir.toString()); + hiveConf.set(HiveConf.ConfVars.METASTOREWAREHOUSE.varname(), warehousedir.toString()); try { hmsc = new HiveMetaStoreClient(hiveConf, null); initalizeTables(); diff --git hcatalog/core/src/test/java/org/apache/hcatalog/mapreduce/TestHCatPartitionPublish.java hcatalog/core/src/test/java/org/apache/hcatalog/mapreduce/TestHCatPartitionPublish.java index 0a76725..e5981b1 100644 --- hcatalog/core/src/test/java/org/apache/hcatalog/mapreduce/TestHCatPartitionPublish.java +++ hcatalog/core/src/test/java/org/apache/hcatalog/mapreduce/TestHCatPartitionPublish.java @@ -111,15 +111,15 @@ public static void setup() throws Exception { hcatConf.setIntVar(HiveConf.ConfVars.METASTORETHRIFTCONNECTIONRETRIES, 3); hcatConf.setIntVar(HiveConf.ConfVars.METASTORETHRIFTFAILURERETRIES, 3); hcatConf.setIntVar(HiveConf.ConfVars.METASTORE_CLIENT_SOCKET_TIMEOUT, 120); - hcatConf.set(HiveConf.ConfVars.SEMANTIC_ANALYZER_HOOK.varname, + hcatConf.set(HiveConf.ConfVars.SEMANTIC_ANALYZER_HOOK.varname(), HCatSemanticAnalyzer.class.getName()); - hcatConf.set(HiveConf.ConfVars.PREEXECHOOKS.varname, ""); - hcatConf.set(HiveConf.ConfVars.POSTEXECHOOKS.varname, ""); - hcatConf.set(HiveConf.ConfVars.HIVE_SUPPORT_CONCURRENCY.varname, + hcatConf.set(HiveConf.ConfVars.PREEXECHOOKS.varname(), ""); + hcatConf.set(HiveConf.ConfVars.POSTEXECHOOKS.varname(), ""); + hcatConf.set(HiveConf.ConfVars.HIVE_SUPPORT_CONCURRENCY.varname(), "false"); msc = new HiveMetaStoreClient(hcatConf, null); - System.setProperty(HiveConf.ConfVars.PREEXECHOOKS.varname, " "); - System.setProperty(HiveConf.ConfVars.POSTEXECHOOKS.varname, " "); + System.setProperty(HiveConf.ConfVars.PREEXECHOOKS.varname(), " "); + System.setProperty(HiveConf.ConfVars.POSTEXECHOOKS.varname(), " "); } @AfterClass diff --git hcatalog/core/src/test/java/org/apache/hcatalog/mapreduce/TestPassProperties.java hcatalog/core/src/test/java/org/apache/hcatalog/mapreduce/TestPassProperties.java index 6517826..85ea517 100644 --- hcatalog/core/src/test/java/org/apache/hcatalog/mapreduce/TestPassProperties.java +++ hcatalog/core/src/test/java/org/apache/hcatalog/mapreduce/TestPassProperties.java @@ -62,10 +62,10 @@ public void Initialize() throws Exception { hiveConf = new HiveConf(this.getClass()); - hiveConf.set(HiveConf.ConfVars.PREEXECHOOKS.varname, ""); - hiveConf.set(HiveConf.ConfVars.POSTEXECHOOKS.varname, ""); - hiveConf.set(HiveConf.ConfVars.HIVE_SUPPORT_CONCURRENCY.varname, "false"); - hiveConf.set(HiveConf.ConfVars.METASTOREWAREHOUSE.varname, TEST_WAREHOUSE_DIR); + hiveConf.set(HiveConf.ConfVars.PREEXECHOOKS.varname(), ""); + hiveConf.set(HiveConf.ConfVars.POSTEXECHOOKS.varname(), ""); + hiveConf.set(HiveConf.ConfVars.HIVE_SUPPORT_CONCURRENCY.varname(), "false"); + hiveConf.set(HiveConf.ConfVars.METASTOREWAREHOUSE.varname(), TEST_WAREHOUSE_DIR); driver = new Driver(hiveConf); SessionState.start(new CliSessionState(hiveConf)); diff --git hcatalog/core/src/test/java/org/apache/hcatalog/security/TestHdfsAuthorizationProvider.java hcatalog/core/src/test/java/org/apache/hcatalog/security/TestHdfsAuthorizationProvider.java index e1b37ad..997415c 100644 --- hcatalog/core/src/test/java/org/apache/hcatalog/security/TestHdfsAuthorizationProvider.java +++ hcatalog/core/src/test/java/org/apache/hcatalog/security/TestHdfsAuthorizationProvider.java @@ -70,12 +70,12 @@ public void setUp() throws Exception { conf = new HiveConf(this.getClass()); - conf.set(ConfVars.PREEXECHOOKS.varname, ""); - conf.set(ConfVars.POSTEXECHOOKS.varname, ""); - conf.set(ConfVars.HIVE_SUPPORT_CONCURRENCY.varname, "false"); + conf.set(ConfVars.PREEXECHOOKS.varname(), ""); + conf.set(ConfVars.POSTEXECHOOKS.varname(), ""); + conf.set(ConfVars.HIVE_SUPPORT_CONCURRENCY.varname(), "false"); conf.set("hive.metastore.local", "true"); - conf.set(ConfVars.SEMANTIC_ANALYZER_HOOK.varname, HCatSemanticAnalyzer.class.getName()); + conf.set(ConfVars.SEMANTIC_ANALYZER_HOOK.varname(), HCatSemanticAnalyzer.class.getName()); conf.setBoolVar(HiveConf.ConfVars.HIVE_AUTHORIZATION_ENABLED, true); conf.setVar(HiveConf.ConfVars.HIVE_AUTHORIZATION_MANAGER, StorageDelegationAuthorizationProvider.class.getName()); diff --git hcatalog/core/src/test/java/org/apache/hive/hcatalog/cli/TestPermsGrp.java hcatalog/core/src/test/java/org/apache/hive/hcatalog/cli/TestPermsGrp.java index d61709b..cadc7e6 100644 --- hcatalog/core/src/test/java/org/apache/hive/hcatalog/cli/TestPermsGrp.java +++ hcatalog/core/src/test/java/org/apache/hive/hcatalog/cli/TestPermsGrp.java @@ -89,15 +89,15 @@ protected void setUp() throws Exception { hcatConf.setIntVar(HiveConf.ConfVars.METASTORETHRIFTFAILURERETRIES, 3); hcatConf.setIntVar(HiveConf.ConfVars.METASTORE_CLIENT_SOCKET_TIMEOUT, 120); - hcatConf.set(HiveConf.ConfVars.SEMANTIC_ANALYZER_HOOK.varname, HCatSemanticAnalyzer.class.getName()); - hcatConf.set(HiveConf.ConfVars.PREEXECHOOKS.varname, ""); - hcatConf.set(HiveConf.ConfVars.POSTEXECHOOKS.varname, ""); - hcatConf.set(HiveConf.ConfVars.HIVE_SUPPORT_CONCURRENCY.varname, "false"); - hcatConf.set(HiveConf.ConfVars.METASTORE_CLIENT_SOCKET_TIMEOUT.varname, "60"); + hcatConf.set(HiveConf.ConfVars.SEMANTIC_ANALYZER_HOOK.varname(), HCatSemanticAnalyzer.class.getName()); + hcatConf.set(HiveConf.ConfVars.PREEXECHOOKS.varname(), ""); + hcatConf.set(HiveConf.ConfVars.POSTEXECHOOKS.varname(), ""); + hcatConf.set(HiveConf.ConfVars.HIVE_SUPPORT_CONCURRENCY.varname(), "false"); + hcatConf.set(HiveConf.ConfVars.METASTORE_CLIENT_SOCKET_TIMEOUT.varname(), "60"); clientWH = new Warehouse(hcatConf); msc = new HiveMetaStoreClient(hcatConf, null); - System.setProperty(HiveConf.ConfVars.PREEXECHOOKS.varname, " "); - System.setProperty(HiveConf.ConfVars.POSTEXECHOOKS.varname, " "); + System.setProperty(HiveConf.ConfVars.PREEXECHOOKS.varname(), " "); + System.setProperty(HiveConf.ConfVars.POSTEXECHOOKS.varname(), " "); } public void testCustomPerms() throws Exception { diff --git hcatalog/core/src/test/java/org/apache/hive/hcatalog/cli/TestSemanticAnalysis.java hcatalog/core/src/test/java/org/apache/hive/hcatalog/cli/TestSemanticAnalysis.java index 3cc548e..11440dc 100644 --- hcatalog/core/src/test/java/org/apache/hive/hcatalog/cli/TestSemanticAnalysis.java +++ hcatalog/core/src/test/java/org/apache/hive/hcatalog/cli/TestSemanticAnalysis.java @@ -63,9 +63,9 @@ public void setUpHCatDriver() throws IOException { if (hcatDriver == null) { HiveConf hcatConf = new HiveConf(hiveConf); - hcatConf.set(HiveConf.ConfVars.HIVEDEFAULTRCFILESERDE.varname, + hcatConf.set(HiveConf.ConfVars.HIVEDEFAULTRCFILESERDE.varname(), "org.apache.hadoop.hive.serde2.columnar.ColumnarSerDe"); - hcatConf.set(HiveConf.ConfVars.SEMANTIC_ANALYZER_HOOK.varname, + hcatConf.set(HiveConf.ConfVars.SEMANTIC_ANALYZER_HOOK.varname(), HCatSemanticAnalyzer.class.getName()); hcatDriver = new Driver(hcatConf); SessionState.start(new CliSessionState(hcatConf)); diff --git hcatalog/core/src/test/java/org/apache/hive/hcatalog/cli/TestUseDatabase.java hcatalog/core/src/test/java/org/apache/hive/hcatalog/cli/TestUseDatabase.java index 4e74ae2..59820e6 100644 --- hcatalog/core/src/test/java/org/apache/hive/hcatalog/cli/TestUseDatabase.java +++ hcatalog/core/src/test/java/org/apache/hive/hcatalog/cli/TestUseDatabase.java @@ -41,11 +41,11 @@ protected void setUp() throws Exception { HiveConf hcatConf = new HiveConf(this.getClass()); - hcatConf.set(ConfVars.PREEXECHOOKS.varname, ""); - hcatConf.set(ConfVars.POSTEXECHOOKS.varname, ""); - hcatConf.set(ConfVars.HIVE_SUPPORT_CONCURRENCY.varname, "false"); + hcatConf.set(ConfVars.PREEXECHOOKS.varname(), ""); + hcatConf.set(ConfVars.POSTEXECHOOKS.varname(), ""); + hcatConf.set(ConfVars.HIVE_SUPPORT_CONCURRENCY.varname(), "false"); - hcatConf.set(ConfVars.SEMANTIC_ANALYZER_HOOK.varname, HCatSemanticAnalyzer.class.getName()); + hcatConf.set(ConfVars.SEMANTIC_ANALYZER_HOOK.varname(), HCatSemanticAnalyzer.class.getName()); hcatDriver = new Driver(hcatConf); SessionState.start(new CliSessionState(hcatConf)); } diff --git hcatalog/core/src/test/java/org/apache/hive/hcatalog/common/TestHiveClientCache.java hcatalog/core/src/test/java/org/apache/hive/hcatalog/common/TestHiveClientCache.java index 1705419..ec66f66 100644 --- hcatalog/core/src/test/java/org/apache/hive/hcatalog/common/TestHiveClientCache.java +++ hcatalog/core/src/test/java/org/apache/hive/hcatalog/common/TestHiveClientCache.java @@ -231,14 +231,14 @@ public LocalMetaServer() { + MS_PORT); hiveConf.setIntVar(HiveConf.ConfVars.METASTORETHRIFTCONNECTIONRETRIES, 3); hiveConf.setIntVar(HiveConf.ConfVars.METASTORETHRIFTFAILURERETRIES, 3); - hiveConf.set(HiveConf.ConfVars.SEMANTIC_ANALYZER_HOOK.varname, + hiveConf.set(HiveConf.ConfVars.SEMANTIC_ANALYZER_HOOK.varname(), HCatSemanticAnalyzer.class.getName()); - hiveConf.set(HiveConf.ConfVars.PREEXECHOOKS.varname, ""); - hiveConf.set(HiveConf.ConfVars.POSTEXECHOOKS.varname, ""); - hiveConf.set(HiveConf.ConfVars.HIVE_SUPPORT_CONCURRENCY.varname, + hiveConf.set(HiveConf.ConfVars.PREEXECHOOKS.varname(), ""); + hiveConf.set(HiveConf.ConfVars.POSTEXECHOOKS.varname(), ""); + hiveConf.set(HiveConf.ConfVars.HIVE_SUPPORT_CONCURRENCY.varname(), "false"); - System.setProperty(HiveConf.ConfVars.PREEXECHOOKS.varname, " "); - System.setProperty(HiveConf.ConfVars.POSTEXECHOOKS.varname, " "); + System.setProperty(HiveConf.ConfVars.PREEXECHOOKS.varname(), " "); + System.setProperty(HiveConf.ConfVars.POSTEXECHOOKS.varname(), " "); } public void start() throws InterruptedException { diff --git hcatalog/core/src/test/java/org/apache/hive/hcatalog/data/HCatDataCheckUtil.java hcatalog/core/src/test/java/org/apache/hive/hcatalog/data/HCatDataCheckUtil.java index ff56234..726ddf2 100644 --- hcatalog/core/src/test/java/org/apache/hive/hcatalog/data/HCatDataCheckUtil.java +++ hcatalog/core/src/test/java/org/apache/hive/hcatalog/data/HCatDataCheckUtil.java @@ -45,9 +45,9 @@ public static Driver instantiateDriver(MiniCluster cluster) { for (Entry e : cluster.getProperties().entrySet()) { hiveConf.set(e.getKey().toString(), e.getValue().toString()); } - hiveConf.set(HiveConf.ConfVars.PREEXECHOOKS.varname, ""); - hiveConf.set(HiveConf.ConfVars.POSTEXECHOOKS.varname, ""); - hiveConf.set(HiveConf.ConfVars.HIVE_SUPPORT_CONCURRENCY.varname, "false"); + hiveConf.set(HiveConf.ConfVars.PREEXECHOOKS.varname(), ""); + hiveConf.set(HiveConf.ConfVars.POSTEXECHOOKS.varname(), ""); + hiveConf.set(HiveConf.ConfVars.HIVE_SUPPORT_CONCURRENCY.varname(), "false"); LOG.debug("Hive conf : {}", hiveConf.getAllProperties()); Driver driver = new Driver(hiveConf); diff --git hcatalog/core/src/test/java/org/apache/hive/hcatalog/mapreduce/TestHCatMultiOutputFormat.java hcatalog/core/src/test/java/org/apache/hive/hcatalog/mapreduce/TestHCatMultiOutputFormat.java index 7e53a16..084bbf8 100644 --- hcatalog/core/src/test/java/org/apache/hive/hcatalog/mapreduce/TestHCatMultiOutputFormat.java +++ hcatalog/core/src/test/java/org/apache/hive/hcatalog/mapreduce/TestHCatMultiOutputFormat.java @@ -100,7 +100,7 @@ @Override public void run() { try { - String warehouseConf = HiveConf.ConfVars.METASTOREWAREHOUSE.varname + "=" + String warehouseConf = HiveConf.ConfVars.METASTOREWAREHOUSE.varname() + "=" + warehousedir.toString(); HiveMetaStore.main(new String[]{"-v", "-p", msPort, "--hiveconf", warehouseConf}); } catch (Throwable t) { @@ -198,15 +198,15 @@ private static void initializeSetup() throws Exception { hiveConf.setVar(HiveConf.ConfVars.METASTOREURIS, "thrift://localhost:" + msPort); hiveConf.setIntVar(HiveConf.ConfVars.METASTORETHRIFTCONNECTIONRETRIES, 3); hiveConf.setIntVar(HiveConf.ConfVars.METASTORETHRIFTFAILURERETRIES, 3); - hiveConf.set(HiveConf.ConfVars.SEMANTIC_ANALYZER_HOOK.varname, + hiveConf.set(HiveConf.ConfVars.SEMANTIC_ANALYZER_HOOK.varname(), HCatSemanticAnalyzer.class.getName()); - hiveConf.set(HiveConf.ConfVars.PREEXECHOOKS.varname, ""); - hiveConf.set(HiveConf.ConfVars.POSTEXECHOOKS.varname, ""); - hiveConf.set(HiveConf.ConfVars.HIVE_SUPPORT_CONCURRENCY.varname, "false"); - System.setProperty(HiveConf.ConfVars.PREEXECHOOKS.varname, " "); - System.setProperty(HiveConf.ConfVars.POSTEXECHOOKS.varname, " "); + hiveConf.set(HiveConf.ConfVars.PREEXECHOOKS.varname(), ""); + hiveConf.set(HiveConf.ConfVars.POSTEXECHOOKS.varname(), ""); + hiveConf.set(HiveConf.ConfVars.HIVE_SUPPORT_CONCURRENCY.varname(), "false"); + System.setProperty(HiveConf.ConfVars.PREEXECHOOKS.varname(), " "); + System.setProperty(HiveConf.ConfVars.POSTEXECHOOKS.varname(), " "); - hiveConf.set(HiveConf.ConfVars.METASTOREWAREHOUSE.varname, warehousedir.toString()); + hiveConf.set(HiveConf.ConfVars.METASTOREWAREHOUSE.varname(), warehousedir.toString()); try { hmsc = new HiveMetaStoreClient(hiveConf, null); initalizeTables(); diff --git hcatalog/core/src/test/java/org/apache/hive/hcatalog/mapreduce/TestHCatPartitionPublish.java hcatalog/core/src/test/java/org/apache/hive/hcatalog/mapreduce/TestHCatPartitionPublish.java index 03e3b6c..5c93a03 100644 --- hcatalog/core/src/test/java/org/apache/hive/hcatalog/mapreduce/TestHCatPartitionPublish.java +++ hcatalog/core/src/test/java/org/apache/hive/hcatalog/mapreduce/TestHCatPartitionPublish.java @@ -118,15 +118,15 @@ public static void setup() throws Exception { hcatConf.setIntVar(HiveConf.ConfVars.METASTORETHRIFTCONNECTIONRETRIES, 3); hcatConf.setIntVar(HiveConf.ConfVars.METASTORETHRIFTFAILURERETRIES, 3); hcatConf.setIntVar(HiveConf.ConfVars.METASTORE_CLIENT_SOCKET_TIMEOUT, 120); - hcatConf.set(HiveConf.ConfVars.SEMANTIC_ANALYZER_HOOK.varname, + hcatConf.set(HiveConf.ConfVars.SEMANTIC_ANALYZER_HOOK.varname(), HCatSemanticAnalyzer.class.getName()); - hcatConf.set(HiveConf.ConfVars.PREEXECHOOKS.varname, ""); - hcatConf.set(HiveConf.ConfVars.POSTEXECHOOKS.varname, ""); - hcatConf.set(HiveConf.ConfVars.HIVE_SUPPORT_CONCURRENCY.varname, + hcatConf.set(HiveConf.ConfVars.PREEXECHOOKS.varname(), ""); + hcatConf.set(HiveConf.ConfVars.POSTEXECHOOKS.varname(), ""); + hcatConf.set(HiveConf.ConfVars.HIVE_SUPPORT_CONCURRENCY.varname(), "false"); msc = new HiveMetaStoreClient(hcatConf, null); - System.setProperty(HiveConf.ConfVars.PREEXECHOOKS.varname, " "); - System.setProperty(HiveConf.ConfVars.POSTEXECHOOKS.varname, " "); + System.setProperty(HiveConf.ConfVars.PREEXECHOOKS.varname(), " "); + System.setProperty(HiveConf.ConfVars.POSTEXECHOOKS.varname(), " "); } @AfterClass diff --git hcatalog/core/src/test/java/org/apache/hive/hcatalog/mapreduce/TestPassProperties.java hcatalog/core/src/test/java/org/apache/hive/hcatalog/mapreduce/TestPassProperties.java index 81df987..a4edd86 100644 --- hcatalog/core/src/test/java/org/apache/hive/hcatalog/mapreduce/TestPassProperties.java +++ hcatalog/core/src/test/java/org/apache/hive/hcatalog/mapreduce/TestPassProperties.java @@ -59,10 +59,10 @@ public void Initialize() throws Exception { hiveConf = new HiveConf(this.getClass()); - hiveConf.set(HiveConf.ConfVars.PREEXECHOOKS.varname, ""); - hiveConf.set(HiveConf.ConfVars.POSTEXECHOOKS.varname, ""); - hiveConf.set(HiveConf.ConfVars.HIVE_SUPPORT_CONCURRENCY.varname, "false"); - hiveConf.set(HiveConf.ConfVars.METASTOREWAREHOUSE.varname, TEST_WAREHOUSE_DIR); + hiveConf.set(HiveConf.ConfVars.PREEXECHOOKS.varname(), ""); + hiveConf.set(HiveConf.ConfVars.POSTEXECHOOKS.varname(), ""); + hiveConf.set(HiveConf.ConfVars.HIVE_SUPPORT_CONCURRENCY.varname(), "false"); + hiveConf.set(HiveConf.ConfVars.METASTOREWAREHOUSE.varname(), TEST_WAREHOUSE_DIR); driver = new Driver(hiveConf); SessionState.start(new CliSessionState(hiveConf)); diff --git hcatalog/hcatalog-pig-adapter/src/main/java/org/apache/hcatalog/pig/PigHCatUtil.java hcatalog/hcatalog-pig-adapter/src/main/java/org/apache/hcatalog/pig/PigHCatUtil.java index a01d9e3..b63d7a8 100644 --- hcatalog/hcatalog-pig-adapter/src/main/java/org/apache/hcatalog/pig/PigHCatUtil.java +++ hcatalog/hcatalog-pig-adapter/src/main/java/org/apache/hcatalog/pig/PigHCatUtil.java @@ -124,7 +124,7 @@ static public String getHCatServerUri(Job job) { - return job.getConfiguration().get(HiveConf.ConfVars.METASTOREURIS.varname); + return job.getConfiguration().get(HiveConf.ConfVars.METASTOREURIS.varname()); } static public String getHCatServerPrincipal(Job job) { diff --git hcatalog/hcatalog-pig-adapter/src/main/java/org/apache/hive/hcatalog/pig/PigHCatUtil.java hcatalog/hcatalog-pig-adapter/src/main/java/org/apache/hive/hcatalog/pig/PigHCatUtil.java index c061146..1256e00 100644 --- hcatalog/hcatalog-pig-adapter/src/main/java/org/apache/hive/hcatalog/pig/PigHCatUtil.java +++ hcatalog/hcatalog-pig-adapter/src/main/java/org/apache/hive/hcatalog/pig/PigHCatUtil.java @@ -133,7 +133,7 @@ static public boolean pigHasBooleanSupport(){ static public String getHCatServerUri(Job job) { - return job.getConfiguration().get(HiveConf.ConfVars.METASTOREURIS.varname); + return job.getConfiguration().get(HiveConf.ConfVars.METASTOREURIS.varname()); } static public String getHCatServerPrincipal(Job job) { diff --git hcatalog/hcatalog-pig-adapter/src/test/java/org/apache/hcatalog/pig/TestHCatLoader.java hcatalog/hcatalog-pig-adapter/src/test/java/org/apache/hcatalog/pig/TestHCatLoader.java index 7d1a533..595f4ea 100644 --- hcatalog/hcatalog-pig-adapter/src/test/java/org/apache/hcatalog/pig/TestHCatLoader.java +++ hcatalog/hcatalog-pig-adapter/src/test/java/org/apache/hcatalog/pig/TestHCatLoader.java @@ -114,10 +114,10 @@ public void setup() throws Exception { } HiveConf hiveConf = new HiveConf(this.getClass()); - hiveConf.set(HiveConf.ConfVars.PREEXECHOOKS.varname, ""); - hiveConf.set(HiveConf.ConfVars.POSTEXECHOOKS.varname, ""); - hiveConf.set(HiveConf.ConfVars.HIVE_SUPPORT_CONCURRENCY.varname, "false"); - hiveConf.set(HiveConf.ConfVars.METASTOREWAREHOUSE.varname, TEST_WAREHOUSE_DIR); + hiveConf.set(HiveConf.ConfVars.PREEXECHOOKS.varname(), ""); + hiveConf.set(HiveConf.ConfVars.POSTEXECHOOKS.varname(), ""); + hiveConf.set(HiveConf.ConfVars.HIVE_SUPPORT_CONCURRENCY.varname(), "false"); + hiveConf.set(HiveConf.ConfVars.METASTOREWAREHOUSE.varname(), TEST_WAREHOUSE_DIR); driver = new Driver(hiveConf); SessionState.start(new CliSessionState(hiveConf)); diff --git hcatalog/hcatalog-pig-adapter/src/test/java/org/apache/hcatalog/pig/TestHCatLoaderComplexSchema.java hcatalog/hcatalog-pig-adapter/src/test/java/org/apache/hcatalog/pig/TestHCatLoaderComplexSchema.java index 9db87cb..8032eb8 100644 --- hcatalog/hcatalog-pig-adapter/src/test/java/org/apache/hcatalog/pig/TestHCatLoaderComplexSchema.java +++ hcatalog/hcatalog-pig-adapter/src/test/java/org/apache/hcatalog/pig/TestHCatLoaderComplexSchema.java @@ -87,9 +87,9 @@ private void createTable(String tablename, String schema) throws IOException, Co public static void setUpBeforeClass() throws Exception { HiveConf hiveConf = new HiveConf(TestHCatLoaderComplexSchema.class); - hiveConf.set(HiveConf.ConfVars.PREEXECHOOKS.varname, ""); - hiveConf.set(HiveConf.ConfVars.POSTEXECHOOKS.varname, ""); - hiveConf.set(HiveConf.ConfVars.HIVE_SUPPORT_CONCURRENCY.varname, "false"); + hiveConf.set(HiveConf.ConfVars.PREEXECHOOKS.varname(), ""); + hiveConf.set(HiveConf.ConfVars.POSTEXECHOOKS.varname(), ""); + hiveConf.set(HiveConf.ConfVars.HIVE_SUPPORT_CONCURRENCY.varname(), "false"); driver = new Driver(hiveConf); SessionState.start(new CliSessionState(hiveConf)); //props = new Properties(); diff --git hcatalog/hcatalog-pig-adapter/src/test/java/org/apache/hcatalog/pig/TestHCatStorerMulti.java hcatalog/hcatalog-pig-adapter/src/test/java/org/apache/hcatalog/pig/TestHCatStorerMulti.java index cfa7042..8e9340f 100644 --- hcatalog/hcatalog-pig-adapter/src/test/java/org/apache/hcatalog/pig/TestHCatStorerMulti.java +++ hcatalog/hcatalog-pig-adapter/src/test/java/org/apache/hcatalog/pig/TestHCatStorerMulti.java @@ -81,10 +81,10 @@ private void createTable(String tablename, String schema) throws IOException, Co protected void setUp() throws Exception { if (driver == null) { HiveConf hiveConf = new HiveConf(this.getClass()); - hiveConf.set(HiveConf.ConfVars.PREEXECHOOKS.varname, ""); - hiveConf.set(HiveConf.ConfVars.POSTEXECHOOKS.varname, ""); - hiveConf.set(HiveConf.ConfVars.HIVE_SUPPORT_CONCURRENCY.varname, "false"); - hiveConf.set(HiveConf.ConfVars.METASTOREWAREHOUSE.varname, TEST_WAREHOUSE_DIR); + hiveConf.set(HiveConf.ConfVars.PREEXECHOOKS.varname(), ""); + hiveConf.set(HiveConf.ConfVars.POSTEXECHOOKS.varname(), ""); + hiveConf.set(HiveConf.ConfVars.HIVE_SUPPORT_CONCURRENCY.varname(), "false"); + hiveConf.set(HiveConf.ConfVars.METASTOREWAREHOUSE.varname(), TEST_WAREHOUSE_DIR); driver = new Driver(hiveConf); SessionState.start(new CliSessionState(hiveConf)); } diff --git hcatalog/hcatalog-pig-adapter/src/test/java/org/apache/hive/hcatalog/pig/TestE2EScenarios.java hcatalog/hcatalog-pig-adapter/src/test/java/org/apache/hive/hcatalog/pig/TestE2EScenarios.java index a4b55c8..d0561e0 100644 --- hcatalog/hcatalog-pig-adapter/src/test/java/org/apache/hive/hcatalog/pig/TestE2EScenarios.java +++ hcatalog/hcatalog-pig-adapter/src/test/java/org/apache/hive/hcatalog/pig/TestE2EScenarios.java @@ -81,10 +81,10 @@ protected void setUp() throws Exception { } HiveConf hiveConf = new HiveConf(this.getClass()); - hiveConf.set(HiveConf.ConfVars.PREEXECHOOKS.varname, ""); - hiveConf.set(HiveConf.ConfVars.POSTEXECHOOKS.varname, ""); - hiveConf.set(HiveConf.ConfVars.HIVE_SUPPORT_CONCURRENCY.varname, "false"); - hiveConf.set(HiveConf.ConfVars.METASTOREWAREHOUSE.varname, TEST_WAREHOUSE_DIR); + hiveConf.set(HiveConf.ConfVars.PREEXECHOOKS.varname(), ""); + hiveConf.set(HiveConf.ConfVars.POSTEXECHOOKS.varname(), ""); + hiveConf.set(HiveConf.ConfVars.HIVE_SUPPORT_CONCURRENCY.varname(), "false"); + hiveConf.set(HiveConf.ConfVars.METASTOREWAREHOUSE.varname(), TEST_WAREHOUSE_DIR); driver = new Driver(hiveConf); SessionState.start(new CliSessionState(hiveConf)); diff --git hcatalog/hcatalog-pig-adapter/src/test/java/org/apache/hive/hcatalog/pig/TestHCatLoader.java hcatalog/hcatalog-pig-adapter/src/test/java/org/apache/hive/hcatalog/pig/TestHCatLoader.java index 6344bbf..4e40e81 100644 --- hcatalog/hcatalog-pig-adapter/src/test/java/org/apache/hive/hcatalog/pig/TestHCatLoader.java +++ hcatalog/hcatalog-pig-adapter/src/test/java/org/apache/hive/hcatalog/pig/TestHCatLoader.java @@ -135,10 +135,10 @@ public void setup() throws Exception { } HiveConf hiveConf = new HiveConf(this.getClass()); - hiveConf.set(HiveConf.ConfVars.PREEXECHOOKS.varname, ""); - hiveConf.set(HiveConf.ConfVars.POSTEXECHOOKS.varname, ""); - hiveConf.set(HiveConf.ConfVars.HIVE_SUPPORT_CONCURRENCY.varname, "false"); - hiveConf.set(HiveConf.ConfVars.METASTOREWAREHOUSE.varname, TEST_WAREHOUSE_DIR); + hiveConf.set(HiveConf.ConfVars.PREEXECHOOKS.varname(), ""); + hiveConf.set(HiveConf.ConfVars.POSTEXECHOOKS.varname(), ""); + hiveConf.set(HiveConf.ConfVars.HIVE_SUPPORT_CONCURRENCY.varname(), "false"); + hiveConf.set(HiveConf.ConfVars.METASTOREWAREHOUSE.varname(), TEST_WAREHOUSE_DIR); driver = new Driver(hiveConf); SessionState.start(new CliSessionState(hiveConf)); diff --git hcatalog/hcatalog-pig-adapter/src/test/java/org/apache/hive/hcatalog/pig/TestHCatLoaderComplexSchema.java hcatalog/hcatalog-pig-adapter/src/test/java/org/apache/hive/hcatalog/pig/TestHCatLoaderComplexSchema.java index eadbf20..053f576 100644 --- hcatalog/hcatalog-pig-adapter/src/test/java/org/apache/hive/hcatalog/pig/TestHCatLoaderComplexSchema.java +++ hcatalog/hcatalog-pig-adapter/src/test/java/org/apache/hive/hcatalog/pig/TestHCatLoaderComplexSchema.java @@ -88,9 +88,9 @@ private void createTable(String tablename, String schema) throws IOException, Co public static void setUpBeforeClass() throws Exception { HiveConf hiveConf = new HiveConf(TestHCatLoaderComplexSchema.class); - hiveConf.set(HiveConf.ConfVars.PREEXECHOOKS.varname, ""); - hiveConf.set(HiveConf.ConfVars.POSTEXECHOOKS.varname, ""); - hiveConf.set(HiveConf.ConfVars.HIVE_SUPPORT_CONCURRENCY.varname, "false"); + hiveConf.set(HiveConf.ConfVars.PREEXECHOOKS.varname(), ""); + hiveConf.set(HiveConf.ConfVars.POSTEXECHOOKS.varname(), ""); + hiveConf.set(HiveConf.ConfVars.HIVE_SUPPORT_CONCURRENCY.varname(), "false"); driver = new Driver(hiveConf); SessionState.start(new CliSessionState(hiveConf)); //props = new Properties(); diff --git hcatalog/hcatalog-pig-adapter/src/test/java/org/apache/hive/hcatalog/pig/TestHCatStorerMulti.java hcatalog/hcatalog-pig-adapter/src/test/java/org/apache/hive/hcatalog/pig/TestHCatStorerMulti.java index 76080f7..ba01de1 100644 --- hcatalog/hcatalog-pig-adapter/src/test/java/org/apache/hive/hcatalog/pig/TestHCatStorerMulti.java +++ hcatalog/hcatalog-pig-adapter/src/test/java/org/apache/hive/hcatalog/pig/TestHCatStorerMulti.java @@ -81,10 +81,10 @@ private void createTable(String tablename, String schema) throws IOException, Co protected void setUp() throws Exception { if (driver == null) { HiveConf hiveConf = new HiveConf(this.getClass()); - hiveConf.set(HiveConf.ConfVars.PREEXECHOOKS.varname, ""); - hiveConf.set(HiveConf.ConfVars.POSTEXECHOOKS.varname, ""); - hiveConf.set(HiveConf.ConfVars.HIVE_SUPPORT_CONCURRENCY.varname, "false"); - hiveConf.set(HiveConf.ConfVars.METASTOREWAREHOUSE.varname, TEST_WAREHOUSE_DIR); + hiveConf.set(HiveConf.ConfVars.PREEXECHOOKS.varname(), ""); + hiveConf.set(HiveConf.ConfVars.POSTEXECHOOKS.varname(), ""); + hiveConf.set(HiveConf.ConfVars.HIVE_SUPPORT_CONCURRENCY.varname(), "false"); + hiveConf.set(HiveConf.ConfVars.METASTOREWAREHOUSE.varname(), TEST_WAREHOUSE_DIR); driver = new Driver(hiveConf); SessionState.start(new CliSessionState(hiveConf)); } diff --git hcatalog/server-extensions/src/test/java/org/apache/hcatalog/listener/TestMsgBusConnection.java hcatalog/server-extensions/src/test/java/org/apache/hcatalog/listener/TestMsgBusConnection.java index 2fb4f49..159d51b 100644 --- hcatalog/server-extensions/src/test/java/org/apache/hcatalog/listener/TestMsgBusConnection.java +++ hcatalog/server-extensions/src/test/java/org/apache/hcatalog/listener/TestMsgBusConnection.java @@ -67,12 +67,12 @@ protected void setUp() throws Exception { System.setProperty("java.naming.provider.url", "tcp://localhost:61616"); connectClient(); HiveConf hiveConf = new HiveConf(this.getClass()); - hiveConf.set(ConfVars.METASTORE_EVENT_LISTENERS.varname, + hiveConf.set(ConfVars.METASTORE_EVENT_LISTENERS.varname(), NotificationListener.class.getName()); hiveConf.set("hive.metastore.local", "true"); - hiveConf.set(HiveConf.ConfVars.PREEXECHOOKS.varname, ""); - hiveConf.set(HiveConf.ConfVars.POSTEXECHOOKS.varname, ""); - hiveConf.set(HiveConf.ConfVars.HIVE_SUPPORT_CONCURRENCY.varname, "false"); + hiveConf.set(HiveConf.ConfVars.PREEXECHOOKS.varname(), ""); + hiveConf.set(HiveConf.ConfVars.POSTEXECHOOKS.varname(), ""); + hiveConf.set(HiveConf.ConfVars.HIVE_SUPPORT_CONCURRENCY.varname(), "false"); hiveConf.set(HCatConstants.HCAT_MSGBUS_TOPIC_PREFIX, "planetlab.hcat"); SessionState.start(new CliSessionState(hiveConf)); driver = new Driver(hiveConf); diff --git hcatalog/server-extensions/src/test/java/org/apache/hcatalog/listener/TestNotificationListener.java hcatalog/server-extensions/src/test/java/org/apache/hcatalog/listener/TestNotificationListener.java index bbd3fa4..eb317ca 100644 --- hcatalog/server-extensions/src/test/java/org/apache/hcatalog/listener/TestNotificationListener.java +++ hcatalog/server-extensions/src/test/java/org/apache/hcatalog/listener/TestNotificationListener.java @@ -94,7 +94,7 @@ public void setUp() throws Exception { consumer3.setMessageListener(this); setUpHiveConf(); - hiveConf.set(ConfVars.METASTORE_EVENT_LISTENERS.varname, + hiveConf.set(ConfVars.METASTORE_EVENT_LISTENERS.varname(), NotificationListener.class.getName()); SessionState.start(new CliSessionState(hiveConf)); driver = new Driver(hiveConf); diff --git hcatalog/server-extensions/src/test/java/org/apache/hive/hcatalog/listener/TestMsgBusConnection.java hcatalog/server-extensions/src/test/java/org/apache/hive/hcatalog/listener/TestMsgBusConnection.java index dd69236..1ed11c2 100644 --- hcatalog/server-extensions/src/test/java/org/apache/hive/hcatalog/listener/TestMsgBusConnection.java +++ hcatalog/server-extensions/src/test/java/org/apache/hive/hcatalog/listener/TestMsgBusConnection.java @@ -64,12 +64,12 @@ protected void setUp() throws Exception { System.setProperty("java.naming.provider.url", "tcp://localhost:61616"); connectClient(); HiveConf hiveConf = new HiveConf(this.getClass()); - hiveConf.set(ConfVars.METASTORE_EVENT_LISTENERS.varname, + hiveConf.set(ConfVars.METASTORE_EVENT_LISTENERS.varname(), NotificationListener.class.getName()); hiveConf.set("hive.metastore.local", "true"); - hiveConf.set(HiveConf.ConfVars.PREEXECHOOKS.varname, ""); - hiveConf.set(HiveConf.ConfVars.POSTEXECHOOKS.varname, ""); - hiveConf.set(HiveConf.ConfVars.HIVE_SUPPORT_CONCURRENCY.varname, "false"); + hiveConf.set(HiveConf.ConfVars.PREEXECHOOKS.varname(), ""); + hiveConf.set(HiveConf.ConfVars.POSTEXECHOOKS.varname(), ""); + hiveConf.set(HiveConf.ConfVars.HIVE_SUPPORT_CONCURRENCY.varname(), "false"); hiveConf.set(HCatConstants.HCAT_MSGBUS_TOPIC_PREFIX, "planetlab.hcat"); SessionState.start(new CliSessionState(hiveConf)); driver = new Driver(hiveConf); diff --git hcatalog/server-extensions/src/test/java/org/apache/hive/hcatalog/listener/TestNotificationListener.java hcatalog/server-extensions/src/test/java/org/apache/hive/hcatalog/listener/TestNotificationListener.java index da1ae62..cffe7b2 100644 --- hcatalog/server-extensions/src/test/java/org/apache/hive/hcatalog/listener/TestNotificationListener.java +++ hcatalog/server-extensions/src/test/java/org/apache/hive/hcatalog/listener/TestNotificationListener.java @@ -91,7 +91,7 @@ public void setUp() throws Exception { consumer3.setMessageListener(this); setUpHiveConf(); - hiveConf.set(ConfVars.METASTORE_EVENT_LISTENERS.varname, + hiveConf.set(ConfVars.METASTORE_EVENT_LISTENERS.varname(), NotificationListener.class.getName()); SessionState.start(new CliSessionState(hiveConf)); driver = new Driver(hiveConf); diff --git hcatalog/storage-handlers/hbase/src/test/org/apache/hcatalog/hbase/ManyMiniCluster.java hcatalog/storage-handlers/hbase/src/test/org/apache/hcatalog/hbase/ManyMiniCluster.java index f3bf756..a752b58 100644 --- hcatalog/storage-handlers/hbase/src/test/org/apache/hcatalog/hbase/ManyMiniCluster.java +++ hcatalog/storage-handlers/hbase/src/test/org/apache/hcatalog/hbase/ManyMiniCluster.java @@ -279,10 +279,10 @@ private void setUpMetastore() throws Exception { //The default org.apache.hadoop.hive.ql.hooks.PreExecutePrinter hook //is present only in the ql/test directory - hiveConf.set(HiveConf.ConfVars.PREEXECHOOKS.varname, ""); - hiveConf.set(HiveConf.ConfVars.POSTEXECHOOKS.varname, ""); - hiveConf.set(HiveConf.ConfVars.HIVE_SUPPORT_CONCURRENCY.varname, "false"); - hiveConf.set(HiveConf.ConfVars.METASTORECONNECTURLKEY.varname, + hiveConf.set(HiveConf.ConfVars.PREEXECHOOKS.varname(), ""); + hiveConf.set(HiveConf.ConfVars.POSTEXECHOOKS.varname(), ""); + hiveConf.set(HiveConf.ConfVars.HIVE_SUPPORT_CONCURRENCY.varname(), "false"); + hiveConf.set(HiveConf.ConfVars.METASTORECONNECTURLKEY.varname(), "jdbc:derby:" + new File(workDir + "/metastore_db") + ";create=true"); hiveConf.set(HiveConf.ConfVars.METASTOREWAREHOUSE.toString(), new File(workDir, "warehouse").toString()); diff --git hcatalog/storage-handlers/hbase/src/test/org/apache/hcatalog/hbase/TestHBaseBulkOutputFormat.java hcatalog/storage-handlers/hbase/src/test/org/apache/hcatalog/hbase/TestHBaseBulkOutputFormat.java index fbc9b97..9626c33 100644 --- hcatalog/storage-handlers/hbase/src/test/org/apache/hcatalog/hbase/TestHBaseBulkOutputFormat.java +++ hcatalog/storage-handlers/hbase/src/test/org/apache/hcatalog/hbase/TestHBaseBulkOutputFormat.java @@ -97,10 +97,10 @@ public static void setup() throws Throwable { public TestHBaseBulkOutputFormat() { allConf = getHiveConf(); - allConf.set(HiveConf.ConfVars.SEMANTIC_ANALYZER_HOOK.varname, + allConf.set(HiveConf.ConfVars.SEMANTIC_ANALYZER_HOOK.varname(), HCatSemanticAnalyzer.class.getName()); - allConf.set(HiveConf.ConfVars.HADOOPFS.varname, getFileSystem().getUri().toString()); - allConf.set(HiveConf.ConfVars.METASTOREWAREHOUSE.varname, new Path(getTestDir(), "warehouse").toString()); + allConf.set(HiveConf.ConfVars.HADOOPFS.varname(), getFileSystem().getUri().toString()); + allConf.set(HiveConf.ConfVars.METASTOREWAREHOUSE.varname(), new Path(getTestDir(), "warehouse").toString()); //Add hbase properties for (Map.Entry el : getHbaseConf()) diff --git hcatalog/storage-handlers/hbase/src/test/org/apache/hcatalog/hbase/TestHBaseDirectOutputFormat.java hcatalog/storage-handlers/hbase/src/test/org/apache/hcatalog/hbase/TestHBaseDirectOutputFormat.java index d9562c7..1f84360 100644 --- hcatalog/storage-handlers/hbase/src/test/org/apache/hcatalog/hbase/TestHBaseDirectOutputFormat.java +++ hcatalog/storage-handlers/hbase/src/test/org/apache/hcatalog/hbase/TestHBaseDirectOutputFormat.java @@ -91,10 +91,10 @@ public static void setup() throws Throwable { public TestHBaseDirectOutputFormat() { allConf = getHiveConf(); - allConf.set(HiveConf.ConfVars.SEMANTIC_ANALYZER_HOOK.varname, + allConf.set(HiveConf.ConfVars.SEMANTIC_ANALYZER_HOOK.varname(), HCatSemanticAnalyzer.class.getName()); - allConf.set(HiveConf.ConfVars.HADOOPFS.varname, getFileSystem().getUri().toString()); - allConf.set(HiveConf.ConfVars.METASTOREWAREHOUSE.varname, new Path(getTestDir(), "warehouse").toString()); + allConf.set(HiveConf.ConfVars.HADOOPFS.varname(), getFileSystem().getUri().toString()); + allConf.set(HiveConf.ConfVars.METASTOREWAREHOUSE.varname(), new Path(getTestDir(), "warehouse").toString()); //Add hbase properties for (Map.Entry el : getHbaseConf()) diff --git hcatalog/storage-handlers/hbase/src/test/org/apache/hcatalog/hbase/TestHBaseHCatStorageHandler.java hcatalog/storage-handlers/hbase/src/test/org/apache/hcatalog/hbase/TestHBaseHCatStorageHandler.java index 84cbfaf..cdbcabe 100644 --- hcatalog/storage-handlers/hbase/src/test/org/apache/hcatalog/hbase/TestHBaseHCatStorageHandler.java +++ hcatalog/storage-handlers/hbase/src/test/org/apache/hcatalog/hbase/TestHBaseHCatStorageHandler.java @@ -58,13 +58,13 @@ public static void setup() throws Throwable { public void Initialize() throws Exception { hcatConf = getHiveConf(); - hcatConf.set(ConfVars.SEMANTIC_ANALYZER_HOOK.varname, + hcatConf.set(ConfVars.SEMANTIC_ANALYZER_HOOK.varname(), HCatSemanticAnalyzer.class.getName()); URI fsuri = getFileSystem().getUri(); Path whPath = new Path(fsuri.getScheme(), fsuri.getAuthority(), getTestDir()); - hcatConf.set(HiveConf.ConfVars.HADOOPFS.varname, fsuri.toString()); - hcatConf.set(ConfVars.METASTOREWAREHOUSE.varname, whPath.toString()); + hcatConf.set(HiveConf.ConfVars.HADOOPFS.varname(), fsuri.toString()); + hcatConf.set(ConfVars.METASTOREWAREHOUSE.varname(), whPath.toString()); //Add hbase properties for (Map.Entry el : getHbaseConf()) { diff --git hcatalog/storage-handlers/hbase/src/test/org/apache/hcatalog/hbase/TestHCatHBaseInputFormat.java hcatalog/storage-handlers/hbase/src/test/org/apache/hcatalog/hbase/TestHCatHBaseInputFormat.java index 57175e5..3da0d77 100644 --- hcatalog/storage-handlers/hbase/src/test/org/apache/hcatalog/hbase/TestHCatHBaseInputFormat.java +++ hcatalog/storage-handlers/hbase/src/test/org/apache/hcatalog/hbase/TestHCatHBaseInputFormat.java @@ -92,13 +92,13 @@ public static void setup() throws Throwable { public TestHCatHBaseInputFormat() throws Exception { hcatConf = getHiveConf(); - hcatConf.set(ConfVars.SEMANTIC_ANALYZER_HOOK.varname, + hcatConf.set(ConfVars.SEMANTIC_ANALYZER_HOOK.varname(), HCatSemanticAnalyzer.class.getName()); URI fsuri = getFileSystem().getUri(); Path whPath = new Path(fsuri.getScheme(), fsuri.getAuthority(), getTestDir()); - hcatConf.set(HiveConf.ConfVars.HADOOPFS.varname, fsuri.toString()); - hcatConf.set(ConfVars.METASTOREWAREHOUSE.varname, whPath.toString()); + hcatConf.set(HiveConf.ConfVars.HADOOPFS.varname(), fsuri.toString()); + hcatConf.set(ConfVars.METASTOREWAREHOUSE.varname(), whPath.toString()); //Add hbase properties diff --git hcatalog/storage-handlers/hbase/src/test/org/apache/hcatalog/hbase/TestSnapshots.java hcatalog/storage-handlers/hbase/src/test/org/apache/hcatalog/hbase/TestSnapshots.java index 1c8454a..45c802e 100644 --- hcatalog/storage-handlers/hbase/src/test/org/apache/hcatalog/hbase/TestSnapshots.java +++ hcatalog/storage-handlers/hbase/src/test/org/apache/hcatalog/hbase/TestSnapshots.java @@ -55,13 +55,13 @@ public static void setup() throws Throwable { public void Initialize() throws Exception { hcatConf = getHiveConf(); - hcatConf.set(ConfVars.SEMANTIC_ANALYZER_HOOK.varname, + hcatConf.set(ConfVars.SEMANTIC_ANALYZER_HOOK.varname(), HCatSemanticAnalyzer.class.getName()); URI fsuri = getFileSystem().getUri(); Path whPath = new Path(fsuri.getScheme(), fsuri.getAuthority(), getTestDir()); - hcatConf.set(HiveConf.ConfVars.HADOOPFS.varname, fsuri.toString()); - hcatConf.set(ConfVars.METASTOREWAREHOUSE.varname, whPath.toString()); + hcatConf.set(HiveConf.ConfVars.HADOOPFS.varname(), fsuri.toString()); + hcatConf.set(ConfVars.METASTOREWAREHOUSE.varname(), whPath.toString()); //Add hbase properties diff --git hcatalog/storage-handlers/hbase/src/test/org/apache/hcatalog/hbase/snapshot/TestZNodeSetUp.java hcatalog/storage-handlers/hbase/src/test/org/apache/hcatalog/hbase/snapshot/TestZNodeSetUp.java index e0ea30e..0e27239 100644 --- hcatalog/storage-handlers/hbase/src/test/org/apache/hcatalog/hbase/snapshot/TestZNodeSetUp.java +++ hcatalog/storage-handlers/hbase/src/test/org/apache/hcatalog/hbase/snapshot/TestZNodeSetUp.java @@ -55,13 +55,13 @@ public static void setup() throws Throwable { public void Initialize() throws Exception { hcatConf = getHiveConf(); - hcatConf.set(ConfVars.SEMANTIC_ANALYZER_HOOK.varname, + hcatConf.set(ConfVars.SEMANTIC_ANALYZER_HOOK.varname(), HCatSemanticAnalyzer.class.getName()); URI fsuri = getFileSystem().getUri(); Path whPath = new Path(fsuri.getScheme(), fsuri.getAuthority(), getTestDir()); - hcatConf.set(HiveConf.ConfVars.HADOOPFS.varname, fsuri.toString()); - hcatConf.set(ConfVars.METASTOREWAREHOUSE.varname, whPath.toString()); + hcatConf.set(HiveConf.ConfVars.HADOOPFS.varname(), fsuri.toString()); + hcatConf.set(ConfVars.METASTOREWAREHOUSE.varname(), whPath.toString()); //Add hbase properties diff --git hcatalog/storage-handlers/hbase/src/test/org/apache/hive/hcatalog/hbase/ManyMiniCluster.java hcatalog/storage-handlers/hbase/src/test/org/apache/hive/hcatalog/hbase/ManyMiniCluster.java index ab338db..e973505 100644 --- hcatalog/storage-handlers/hbase/src/test/org/apache/hive/hcatalog/hbase/ManyMiniCluster.java +++ hcatalog/storage-handlers/hbase/src/test/org/apache/hive/hcatalog/hbase/ManyMiniCluster.java @@ -278,10 +278,10 @@ private void setUpMetastore() throws Exception { //The default org.apache.hadoop.hive.ql.hooks.PreExecutePrinter hook //is present only in the ql/test directory - hiveConf.set(HiveConf.ConfVars.PREEXECHOOKS.varname, ""); - hiveConf.set(HiveConf.ConfVars.POSTEXECHOOKS.varname, ""); - hiveConf.set(HiveConf.ConfVars.HIVE_SUPPORT_CONCURRENCY.varname, "false"); - hiveConf.set(HiveConf.ConfVars.METASTORECONNECTURLKEY.varname, + hiveConf.set(HiveConf.ConfVars.PREEXECHOOKS.varname(), ""); + hiveConf.set(HiveConf.ConfVars.POSTEXECHOOKS.varname(), ""); + hiveConf.set(HiveConf.ConfVars.HIVE_SUPPORT_CONCURRENCY.varname(), "false"); + hiveConf.set(HiveConf.ConfVars.METASTORECONNECTURLKEY.varname(), "jdbc:derby:" + new File(workDir + "/metastore_db") + ";create=true"); hiveConf.set(HiveConf.ConfVars.METASTOREWAREHOUSE.toString(), new File(workDir, "warehouse").toString()); diff --git hcatalog/storage-handlers/hbase/src/test/org/apache/hive/hcatalog/hbase/TestHBaseInputFormat.java hcatalog/storage-handlers/hbase/src/test/org/apache/hive/hcatalog/hbase/TestHBaseInputFormat.java index 8bd97ca..38c79b9 100644 --- hcatalog/storage-handlers/hbase/src/test/org/apache/hive/hcatalog/hbase/TestHBaseInputFormat.java +++ hcatalog/storage-handlers/hbase/src/test/org/apache/hive/hcatalog/hbase/TestHBaseInputFormat.java @@ -74,13 +74,13 @@ public TestHBaseInputFormat() throws Exception { hcatConf = getHiveConf(); - hcatConf.set(ConfVars.SEMANTIC_ANALYZER_HOOK.varname, + hcatConf.set(ConfVars.SEMANTIC_ANALYZER_HOOK.varname(), HCatSemanticAnalyzer.class.getName()); URI fsuri = getFileSystem().getUri(); Path whPath = new Path(fsuri.getScheme(), fsuri.getAuthority(), getTestDir()); - hcatConf.set(HiveConf.ConfVars.HADOOPFS.varname, fsuri.toString()); - hcatConf.set(ConfVars.METASTOREWAREHOUSE.varname, whPath.toString()); + hcatConf.set(HiveConf.ConfVars.HADOOPFS.varname(), fsuri.toString()); + hcatConf.set(ConfVars.METASTOREWAREHOUSE.varname(), whPath.toString()); //Add hbase properties diff --git hcatalog/storage-handlers/hbase/src/test/org/apache/hive/hcatalog/hbase/TestHiveHBaseStorageHandler.java hcatalog/storage-handlers/hbase/src/test/org/apache/hive/hcatalog/hbase/TestHiveHBaseStorageHandler.java index 6882c54..eae096e 100644 --- hcatalog/storage-handlers/hbase/src/test/org/apache/hive/hcatalog/hbase/TestHiveHBaseStorageHandler.java +++ hcatalog/storage-handlers/hbase/src/test/org/apache/hive/hcatalog/hbase/TestHiveHBaseStorageHandler.java @@ -49,13 +49,13 @@ public void Initialize() throws Exception { hcatConf = getHiveConf(); - hcatConf.set(ConfVars.SEMANTIC_ANALYZER_HOOK.varname, + hcatConf.set(ConfVars.SEMANTIC_ANALYZER_HOOK.varname(), HCatSemanticAnalyzer.class.getName()); URI fsuri = getFileSystem().getUri(); Path whPath = new Path(fsuri.getScheme(), fsuri.getAuthority(), getTestDir()); - hcatConf.set(HiveConf.ConfVars.HADOOPFS.varname, fsuri.toString()); - hcatConf.set(ConfVars.METASTOREWAREHOUSE.varname, whPath.toString()); + hcatConf.set(HiveConf.ConfVars.HADOOPFS.varname(), fsuri.toString()); + hcatConf.set(ConfVars.METASTOREWAREHOUSE.varname(), whPath.toString()); //Add hbase properties for (Map.Entry el : getHbaseConf()) { diff --git hcatalog/storage-handlers/hbase/src/test/org/apache/hive/hcatalog/hbase/TestHiveHBaseTableOutputFormat.java hcatalog/storage-handlers/hbase/src/test/org/apache/hive/hcatalog/hbase/TestHiveHBaseTableOutputFormat.java index dde8d7d..798ddc4 100644 --- hcatalog/storage-handlers/hbase/src/test/org/apache/hive/hcatalog/hbase/TestHiveHBaseTableOutputFormat.java +++ hcatalog/storage-handlers/hbase/src/test/org/apache/hive/hcatalog/hbase/TestHiveHBaseTableOutputFormat.java @@ -77,10 +77,10 @@ public TestHiveHBaseTableOutputFormat() { allConf = getHiveConf(); - allConf.set(HiveConf.ConfVars.SEMANTIC_ANALYZER_HOOK.varname, + allConf.set(HiveConf.ConfVars.SEMANTIC_ANALYZER_HOOK.varname(), HCatSemanticAnalyzer.class.getName()); - allConf.set(HiveConf.ConfVars.HADOOPFS.varname, getFileSystem().getUri().toString()); - allConf.set(HiveConf.ConfVars.METASTOREWAREHOUSE.varname, new Path(getTestDir(),"warehouse").toString()); + allConf.set(HiveConf.ConfVars.HADOOPFS.varname(), getFileSystem().getUri().toString()); + allConf.set(HiveConf.ConfVars.METASTOREWAREHOUSE.varname(), new Path(getTestDir(),"warehouse").toString()); //Add hbase properties for (Map.Entry el : getHbaseConf()) diff --git hcatalog/webhcat/java-client/src/test/java/org/apache/hcatalog/api/TestHCatClient.java hcatalog/webhcat/java-client/src/test/java/org/apache/hcatalog/api/TestHCatClient.java index 1f416a5..4b332b2 100644 --- hcatalog/webhcat/java-client/src/test/java/org/apache/hcatalog/api/TestHCatClient.java +++ hcatalog/webhcat/java-client/src/test/java/org/apache/hcatalog/api/TestHCatClient.java @@ -97,14 +97,14 @@ public static void startMetaStoreServer() throws Exception { hcatConf.setVar(HiveConf.ConfVars.METASTOREURIS, "thrift://localhost:" + msPort); hcatConf.setIntVar(HiveConf.ConfVars.METASTORETHRIFTCONNECTIONRETRIES, 3); - hcatConf.set(HiveConf.ConfVars.SEMANTIC_ANALYZER_HOOK.varname, + hcatConf.set(HiveConf.ConfVars.SEMANTIC_ANALYZER_HOOK.varname(), HCatSemanticAnalyzer.class.getName()); - hcatConf.set(HiveConf.ConfVars.PREEXECHOOKS.varname, ""); - hcatConf.set(HiveConf.ConfVars.POSTEXECHOOKS.varname, ""); - hcatConf.set(HiveConf.ConfVars.HIVE_SUPPORT_CONCURRENCY.varname, + hcatConf.set(HiveConf.ConfVars.PREEXECHOOKS.varname(), ""); + hcatConf.set(HiveConf.ConfVars.POSTEXECHOOKS.varname(), ""); + hcatConf.set(HiveConf.ConfVars.HIVE_SUPPORT_CONCURRENCY.varname(), "false"); - System.setProperty(HiveConf.ConfVars.PREEXECHOOKS.varname, " "); - System.setProperty(HiveConf.ConfVars.POSTEXECHOOKS.varname, " "); + System.setProperty(HiveConf.ConfVars.PREEXECHOOKS.varname(), " "); + System.setProperty(HiveConf.ConfVars.POSTEXECHOOKS.varname(), " "); } @Test diff --git hcatalog/webhcat/java-client/src/test/java/org/apache/hive/hcatalog/api/TestHCatClient.java hcatalog/webhcat/java-client/src/test/java/org/apache/hive/hcatalog/api/TestHCatClient.java index 7886478..f940950 100644 --- hcatalog/webhcat/java-client/src/test/java/org/apache/hive/hcatalog/api/TestHCatClient.java +++ hcatalog/webhcat/java-client/src/test/java/org/apache/hive/hcatalog/api/TestHCatClient.java @@ -94,14 +94,14 @@ public static void startMetaStoreServer() throws Exception { hcatConf.setVar(HiveConf.ConfVars.METASTOREURIS, "thrift://localhost:" + msPort); hcatConf.setIntVar(HiveConf.ConfVars.METASTORETHRIFTCONNECTIONRETRIES, 3); - hcatConf.set(HiveConf.ConfVars.SEMANTIC_ANALYZER_HOOK.varname, + hcatConf.set(HiveConf.ConfVars.SEMANTIC_ANALYZER_HOOK.varname(), HCatSemanticAnalyzer.class.getName()); - hcatConf.set(HiveConf.ConfVars.PREEXECHOOKS.varname, ""); - hcatConf.set(HiveConf.ConfVars.POSTEXECHOOKS.varname, ""); - hcatConf.set(HiveConf.ConfVars.HIVE_SUPPORT_CONCURRENCY.varname, + hcatConf.set(HiveConf.ConfVars.PREEXECHOOKS.varname(), ""); + hcatConf.set(HiveConf.ConfVars.POSTEXECHOOKS.varname(), ""); + hcatConf.set(HiveConf.ConfVars.HIVE_SUPPORT_CONCURRENCY.varname(), "false"); - System.setProperty(HiveConf.ConfVars.PREEXECHOOKS.varname, " "); - System.setProperty(HiveConf.ConfVars.POSTEXECHOOKS.varname, " "); + System.setProperty(HiveConf.ConfVars.PREEXECHOOKS.varname(), " "); + System.setProperty(HiveConf.ConfVars.POSTEXECHOOKS.varname(), " "); } public static String fixPath(String path) { if(!Shell.WINDOWS) { diff --git jdbc/src/java/org/apache/hive/jdbc/HiveConnection.java jdbc/src/java/org/apache/hive/jdbc/HiveConnection.java index 13fc19b..2a1f013 100644 --- jdbc/src/java/org/apache/hive/jdbc/HiveConnection.java +++ jdbc/src/java/org/apache/hive/jdbc/HiveConnection.java @@ -192,7 +192,7 @@ private TTransport createHttpTransport() throws SQLException { // http path should begin with "/" String httpPath; httpPath = hiveConfMap.get( - HiveConf.ConfVars.HIVE_SERVER2_THRIFT_HTTP_PATH.varname); + HiveConf.ConfVars.HIVE_SERVER2_THRIFT_HTTP_PATH.varname()); if(httpPath == null) { httpPath = "/"; } @@ -320,7 +320,7 @@ private TTransport createBinaryTransport() throws SQLException { private boolean isHttpTransportMode() { String transportMode = - hiveConfMap.get(HiveConf.ConfVars.HIVE_SERVER2_TRANSPORT_MODE.varname); + hiveConfMap.get(HiveConf.ConfVars.HIVE_SERVER2_TRANSPORT_MODE.varname()); if(transportMode != null && (transportMode.equalsIgnoreCase("http"))) { return true; } diff --git metastore/src/java/org/apache/hadoop/hive/metastore/MetaStoreUtils.java metastore/src/java/org/apache/hadoop/hive/metastore/MetaStoreUtils.java index e18e13f..39100b2 100644 --- metastore/src/java/org/apache/hadoop/hive/metastore/MetaStoreUtils.java +++ metastore/src/java/org/apache/hadoop/hive/metastore/MetaStoreUtils.java @@ -1355,7 +1355,7 @@ public static void validatePartitionNameCharacters(List partVals, throw new MetaException("Partition value '" + invalidPartitionVal + "' contains a character " + "not matched by whitelist pattern '" + partitionValidationPattern.toString() + "'. " + "(configure with " + - HiveConf.ConfVars.METASTORE_PARTITION_NAME_WHITELIST_PATTERN.varname + ")"); + HiveConf.ConfVars.METASTORE_PARTITION_NAME_WHITELIST_PATTERN.varname() + ")"); } } diff --git metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java index 0715e22..b729520 100644 --- metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java +++ metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java @@ -48,7 +48,6 @@ import javax.jdo.datastore.DataStoreCache; import javax.jdo.identity.IntIdentity; -import org.antlr.runtime.CharStream; import org.antlr.runtime.CommonTokenStream; import org.antlr.runtime.RecognitionException; import org.apache.commons.logging.Log; @@ -60,14 +59,10 @@ import org.apache.hadoop.hive.common.classification.InterfaceStability; import org.apache.hadoop.hive.conf.HiveConf; import org.apache.hadoop.hive.conf.HiveConf.ConfVars; -import org.apache.hadoop.hive.metastore.api.BinaryColumnStatsData; -import org.apache.hadoop.hive.metastore.api.BooleanColumnStatsData; import org.apache.hadoop.hive.metastore.api.ColumnStatistics; -import org.apache.hadoop.hive.metastore.api.ColumnStatisticsData; import org.apache.hadoop.hive.metastore.api.ColumnStatisticsDesc; import org.apache.hadoop.hive.metastore.api.ColumnStatisticsObj; import org.apache.hadoop.hive.metastore.api.Database; -import org.apache.hadoop.hive.metastore.api.DoubleColumnStatsData; import org.apache.hadoop.hive.metastore.api.FieldSchema; import org.apache.hadoop.hive.metastore.api.HiveObjectPrivilege; import org.apache.hadoop.hive.metastore.api.HiveObjectRef; @@ -76,7 +71,6 @@ import org.apache.hadoop.hive.metastore.api.InvalidInputException; import org.apache.hadoop.hive.metastore.api.InvalidObjectException; import org.apache.hadoop.hive.metastore.api.InvalidPartitionException; -import org.apache.hadoop.hive.metastore.api.LongColumnStatsData; import org.apache.hadoop.hive.metastore.api.MetaException; import org.apache.hadoop.hive.metastore.api.NoSuchObjectException; import org.apache.hadoop.hive.metastore.api.Order; @@ -90,7 +84,6 @@ import org.apache.hadoop.hive.metastore.api.SerDeInfo; import org.apache.hadoop.hive.metastore.api.SkewedInfo; import org.apache.hadoop.hive.metastore.api.StorageDescriptor; -import org.apache.hadoop.hive.metastore.api.StringColumnStatsData; import org.apache.hadoop.hive.metastore.api.Table; import org.apache.hadoop.hive.metastore.api.Type; import org.apache.hadoop.hive.metastore.api.UnknownDBException; @@ -287,7 +280,7 @@ private static Properties getDataSourceProps(Configuration conf) { if (e.getKey().contains("datanucleus") || e.getKey().contains("jdo")) { Object prevVal = prop.setProperty(e.getKey(), conf.get(e.getKey())); if (LOG.isDebugEnabled() - && !e.getKey().equals(HiveConf.ConfVars.METASTOREPWD.varname)) { + && !e.getKey().equals(HiveConf.ConfVars.METASTOREPWD.varname())) { LOG.debug("Overriding " + e.getKey() + " value " + prevVal + " from jpox.properties with " + e.getValue()); } @@ -296,7 +289,7 @@ private static Properties getDataSourceProps(Configuration conf) { if (LOG.isDebugEnabled()) { for (Entry e : prop.entrySet()) { - if (!e.getKey().equals(HiveConf.ConfVars.METASTOREPWD.varname)) { + if (!e.getKey().equals(HiveConf.ConfVars.METASTOREPWD.varname())) { LOG.debug(e.getKey() + " = " + e.getValue()); } } diff --git metastore/src/java/org/apache/hadoop/hive/metastore/Warehouse.java metastore/src/java/org/apache/hadoop/hive/metastore/Warehouse.java index f731dab..5d7f0e6 100755 --- metastore/src/java/org/apache/hadoop/hive/metastore/Warehouse.java +++ metastore/src/java/org/apache/hadoop/hive/metastore/Warehouse.java @@ -51,7 +51,6 @@ import org.apache.hadoop.hive.metastore.api.Database; import org.apache.hadoop.hive.metastore.api.FieldSchema; import org.apache.hadoop.hive.metastore.api.MetaException; -import org.apache.hadoop.hive.metastore.api.Partition; import org.apache.hadoop.hive.metastore.api.SkewedInfo; import org.apache.hadoop.hive.metastore.api.StorageDescriptor; import org.apache.hadoop.hive.metastore.api.Table; @@ -77,7 +76,7 @@ public Warehouse(Configuration conf) throws MetaException { this.conf = conf; whRootString = HiveConf.getVar(conf, HiveConf.ConfVars.METASTOREWAREHOUSE); if (StringUtils.isBlank(whRootString)) { - throw new MetaException(HiveConf.ConfVars.METASTOREWAREHOUSE.varname + throw new MetaException(HiveConf.ConfVars.METASTOREWAREHOUSE.varname() + " is not set in the config or blank"); } fsHandler = getMetaStoreFsHandler(conf); diff --git metastore/src/test/org/apache/hadoop/hive/metastore/DummyRawStoreForJdoConnection.java metastore/src/test/org/apache/hadoop/hive/metastore/DummyRawStoreForJdoConnection.java index f54ae53..8f7d540 100644 --- metastore/src/test/org/apache/hadoop/hive/metastore/DummyRawStoreForJdoConnection.java +++ metastore/src/test/org/apache/hadoop/hive/metastore/DummyRawStoreForJdoConnection.java @@ -20,7 +20,6 @@ import java.util.List; import java.util.Map; -import java.util.Set; import junit.framework.Assert; @@ -76,7 +75,7 @@ public Configuration getConf() { @Override public void setConf(Configuration arg0) { String expected = DummyJdoConnectionUrlHook.newUrl; - String actual = arg0.get(HiveConf.ConfVars.METASTORECONNECTURLKEY.varname); + String actual = arg0.get(HiveConf.ConfVars.METASTORECONNECTURLKEY.varname()); Assert.assertEquals("The expected URL used by JDO to connect to the metastore: " + expected + " did not match the actual value when the Raw Store was initialized: " + actual, diff --git ql/src/java/org/apache/hadoop/hive/ql/Driver.java ql/src/java/org/apache/hadoop/hive/ql/Driver.java index 6705ec4..1de277e 100644 --- ql/src/java/org/apache/hadoop/hive/ql/Driver.java +++ ql/src/java/org/apache/hadoop/hive/ql/Driver.java @@ -1212,7 +1212,7 @@ private boolean validateConfVariables() { try { return HookUtils.getHooks(conf, hookConfVar, clazz); } catch (ClassNotFoundException e) { - console.printError(hookConfVar.varname + " Class not found:" + e.getMessage()); + console.printError(hookConfVar.varname() + " Class not found:" + e.getMessage()); throw e; } } diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java index 1f41a4e..8c11ff3 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java @@ -138,6 +138,7 @@ import org.apache.hadoop.hive.ql.plan.RevokeDesc; import org.apache.hadoop.hive.ql.plan.RoleDDLDesc; import org.apache.hadoop.hive.ql.plan.ShowColumnsDesc; +import org.apache.hadoop.hive.ql.plan.ShowConfDesc; import org.apache.hadoop.hive.ql.plan.ShowCreateTableDesc; import org.apache.hadoop.hive.ql.plan.ShowDatabasesDesc; import org.apache.hadoop.hive.ql.plan.ShowFunctionsDesc; @@ -398,6 +399,11 @@ public int execute(DriverContext driverContext) { return showCreateTable(db, showCreateTbl); } + ShowConfDesc showConf = work.getShowConfDesc(); + if (showConf != null) { + return showConf(db, showConf); + } + RoleDDLDesc roleDDLDesc = work.getRoleDDLDesc(); if (roleDDLDesc != null) { return roleDDL(roleDDLDesc); @@ -460,6 +466,29 @@ public int execute(DriverContext driverContext) { return 0; } + private int showConf(Hive db, ShowConfDesc showConf) throws Exception { + ConfVars conf = HiveConf.getConfVars(showConf.getConfName()); + if (conf == null) { + throw new HiveException("invalid configuration name " + showConf.getConfName()); + } + String description = conf.getDescription(); + DataOutputStream output = getOutputStream(showConf.getResFile()); + try { + if (description != null) { + output.write(description.getBytes()); + output.write(terminator); + } + } finally { + output.close(); + } + return 0; + } + + private DataOutputStream getOutputStream(Path outputFile) throws Exception { + FileSystem fs = outputFile.getFileSystem(conf); + return fs.create(outputFile); + } + /** * First, make sure the source table/partition is not * archived/indexes/non-rcfile. If either of these is true, throw an @@ -3735,9 +3764,9 @@ private int switchDatabase(Hive db, SwitchDatabaseDesc switchDb) Map dbParams = database.getParameters(); if (dbParams != null) { for (HiveConf.ConfVars var: HiveConf.dbVars) { - String newValue = dbParams.get(var.varname); + String newValue = dbParams.get(var.varname()); if (newValue != null) { - LOG.info("Changing " + var.varname + + LOG.info("Changing " + var.varname() + " from " + conf.getVar(var) + " to " + newValue); conf.setVar(var, newValue); } diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/ScriptOperator.java ql/src/java/org/apache/hadoop/hive/ql/exec/ScriptOperator.java index 1354b36..f3927c5 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/ScriptOperator.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/ScriptOperator.java @@ -305,15 +305,15 @@ public void processOp(Object row, int tag) throws HiveException { String[] wrappedCmdArgs = addWrapper(cmdArgs); LOG.info("Executing " + Arrays.asList(wrappedCmdArgs)); LOG.info("tablename=" - + hconf.get(HiveConf.ConfVars.HIVETABLENAME.varname)); + + hconf.get(HiveConf.ConfVars.HIVETABLENAME.varname())); LOG.info("partname=" - + hconf.get(HiveConf.ConfVars.HIVEPARTITIONNAME.varname)); + + hconf.get(HiveConf.ConfVars.HIVEPARTITIONNAME.varname())); LOG.info("alias=" + alias); ProcessBuilder pb = new ProcessBuilder(wrappedCmdArgs); Map env = pb.environment(); addJobConfToEnvironment(hconf, env); - env.put(safeEnvVarName(HiveConf.ConfVars.HIVEALIAS.varname), String + env.put(safeEnvVarName(HiveConf.ConfVars.HIVEALIAS.varname()), String .valueOf(alias)); // Create an environment variable that uniquely identifies this script diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/Utilities.java ql/src/java/org/apache/hadoop/hive/ql/exec/Utilities.java index cc840be..0ab2b61 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/Utilities.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/Utilities.java @@ -72,7 +72,6 @@ import java.util.UUID; import java.util.zip.Deflater; import java.util.zip.DeflaterOutputStream; -import java.util.zip.Inflater; import java.util.zip.InflaterInputStream; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ExecutionException; @@ -780,7 +779,7 @@ public Path read(Kryo kryo, Input input, Class type) { private static void serializePlan(Object plan, OutputStream out, Configuration conf, boolean cloningPlan) { PerfLogger perfLogger = PerfLogger.getPerfLogger(); perfLogger.PerfLogBegin(CLASS_NAME, PerfLogger.SERIALIZE_PLAN); - String serializationType = conf.get(HiveConf.ConfVars.PLAN_SERIALIZATION.varname, "kryo"); + String serializationType = conf.get(HiveConf.ConfVars.PLAN_SERIALIZATION.varname(), "kryo"); LOG.info("Serializing " + plan.getClass().getSimpleName() + " via " + serializationType); if("javaXML".equalsIgnoreCase(serializationType)) { serializeObjectByJavaXML(plan, out); @@ -807,7 +806,7 @@ public static void serializePlan(Object plan, OutputStream out, Configuration co PerfLogger perfLogger = PerfLogger.getPerfLogger(); perfLogger.PerfLogBegin(CLASS_NAME, PerfLogger.DESERIALIZE_PLAN); T plan; - String serializationType = conf.get(HiveConf.ConfVars.PLAN_SERIALIZATION.varname, "kryo"); + String serializationType = conf.get(HiveConf.ConfVars.PLAN_SERIALIZATION.varname(), "kryo"); LOG.info("Deserializing " + planClass.getSimpleName() + " via " + serializationType); if("javaXML".equalsIgnoreCase(serializationType)) { plan = deserializeObjectByJavaXML(in); diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/mr/MapRedTask.java ql/src/java/org/apache/hadoop/hive/ql/exec/mr/MapRedTask.java index 8d1d52d..fe92cd8 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/mr/MapRedTask.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/mr/MapRedTask.java @@ -405,10 +405,10 @@ private void setNumberOfReducers() throws IOException { } console .printInfo("In order to change the average load for a reducer (in bytes):"); - console.printInfo(" set " + HiveConf.ConfVars.BYTESPERREDUCER.varname + console.printInfo(" set " + HiveConf.ConfVars.BYTESPERREDUCER.varname() + "="); console.printInfo("In order to limit the maximum number of reducers:"); - console.printInfo(" set " + HiveConf.ConfVars.MAXREDUCERS.varname + console.printInfo(" set " + HiveConf.ConfVars.MAXREDUCERS.varname() + "="); console.printInfo("In order to set a constant number of reducers:"); console.printInfo(" set " + HiveConf.ConfVars.HADOOPNUMREDUCERS @@ -436,7 +436,7 @@ public static String isEligibleForLocalMode(HiveConf conf, // check for max input size if (inputLength > maxBytes) { return "Input Size (= " + inputLength + ") is larger than " + - HiveConf.ConfVars.LOCALMODEMAXBYTES.varname + " (= " + maxBytes + ")"; + HiveConf.ConfVars.LOCALMODEMAXBYTES.varname() + " (= " + maxBytes + ")"; } // ideally we would like to do this check based on the number of splits @@ -446,7 +446,7 @@ public static String isEligibleForLocalMode(HiveConf conf, if (inputFileCount > maxInputFiles) { return "Number of Input Files (= " + inputFileCount + ") is larger than " + - HiveConf.ConfVars.LOCALMODEMAXINPUTFILES.varname + "(= " + maxInputFiles + ")"; + HiveConf.ConfVars.LOCALMODEMAXINPUTFILES.varname() + "(= " + maxInputFiles + ")"; } // since local mode only runs with 1 reducers - make sure that the diff --git ql/src/java/org/apache/hadoop/hive/ql/index/HiveIndexResult.java ql/src/java/org/apache/hadoop/hive/ql/index/HiveIndexResult.java index 332ced8..f69391c 100644 --- ql/src/java/org/apache/hadoop/hive/ql/index/HiveIndexResult.java +++ ql/src/java/org/apache/hadoop/hive/ql/index/HiveIndexResult.java @@ -122,7 +122,7 @@ public HiveIndexResult(List indexFiles, JobConf conf) throws IOException while (lr.readLine(line) > 0) { if (++lineCounter > maxEntriesToLoad) { throw new HiveException("Number of compact index entries loaded during the query exceeded the maximum of " + maxEntriesToLoad - + " set in " + HiveConf.ConfVars.HIVE_INDEX_COMPACT_QUERY_MAX_ENTRIES.varname); + + " set in " + HiveConf.ConfVars.HIVE_INDEX_COMPACT_QUERY_MAX_ENTRIES.varname()); } add(line); } diff --git ql/src/java/org/apache/hadoop/hive/ql/index/HiveIndexedInputFormat.java ql/src/java/org/apache/hadoop/hive/ql/index/HiveIndexedInputFormat.java index c52624c..1381073 100644 --- ql/src/java/org/apache/hadoop/hive/ql/index/HiveIndexedInputFormat.java +++ ql/src/java/org/apache/hadoop/hive/ql/index/HiveIndexedInputFormat.java @@ -179,7 +179,7 @@ public HiveIndexedInputFormat(String indexFileName) { if (sumSplitLengths > maxInputSize) { throw new IOException( "Size of data to read during a compact-index-based query exceeded the maximum of " - + maxInputSize + " set in " + ConfVars.HIVE_INDEX_COMPACT_QUERY_MAX_SIZE.varname); + + maxInputSize + " set in " + ConfVars.HIVE_INDEX_COMPACT_QUERY_MAX_SIZE.varname()); } newSplits.add(newSplit); } diff --git ql/src/java/org/apache/hadoop/hive/ql/io/RCFile.java ql/src/java/org/apache/hadoop/hive/ql/io/RCFile.java index 3bc7e43..02ad242 100644 --- ql/src/java/org/apache/hadoop/hive/ql/io/RCFile.java +++ ql/src/java/org/apache/hadoop/hive/ql/io/RCFile.java @@ -1059,7 +1059,7 @@ void init(Configuration conf, FSDataOutputStream out, this.codec = codec; this.metadata = metadata; this.useNewMagic = - conf.getBoolean(HiveConf.ConfVars.HIVEUSEEXPLICITRCFILEHEADER.varname, true); + conf.getBoolean(HiveConf.ConfVars.HIVEUSEEXPLICITRCFILEHEADER.varname(), true); } /** Returns the compression codec of data in this file. */ diff --git ql/src/java/org/apache/hadoop/hive/ql/io/orc/MemoryManager.java ql/src/java/org/apache/hadoop/hive/ql/io/orc/MemoryManager.java index 9af12de..d1c7b16 100644 --- ql/src/java/org/apache/hadoop/hive/ql/io/orc/MemoryManager.java +++ ql/src/java/org/apache/hadoop/hive/ql/io/orc/MemoryManager.java @@ -81,7 +81,7 @@ */ MemoryManager(Configuration conf) { HiveConf.ConfVars poolVar = HiveConf.ConfVars.HIVE_ORC_FILE_MEMORY_POOL; - double maxLoad = conf.getFloat(poolVar.varname, poolVar.defaultFloatVal); + double maxLoad = conf.getFloat(poolVar.varname(), poolVar.defaultFloatVal); totalMemoryPool = Math.round(ManagementFactory.getMemoryMXBean(). getHeapMemoryUsage().getMax() * maxLoad); } diff --git ql/src/java/org/apache/hadoop/hive/ql/io/orc/OrcFile.java ql/src/java/org/apache/hadoop/hive/ql/io/orc/OrcFile.java index 54aee08..0639769 100644 --- ql/src/java/org/apache/hadoop/hive/ql/io/orc/OrcFile.java +++ ql/src/java/org/apache/hadoop/hive/ql/io/orc/OrcFile.java @@ -151,10 +151,10 @@ public static Reader createReader(FileSystem fs, Path path, FileMetaInfo fileMet configuration = conf; memoryManagerValue = getMemoryManager(conf); stripeSizeValue = - conf.getLong(HiveConf.ConfVars.HIVE_ORC_DEFAULT_STRIPE_SIZE.varname, + conf.getLong(HiveConf.ConfVars.HIVE_ORC_DEFAULT_STRIPE_SIZE.varname(), DEFAULT_STRIPE_SIZE); String versionName = - conf.get(HiveConf.ConfVars.HIVE_ORC_WRITE_FORMAT.varname); + conf.get(HiveConf.ConfVars.HIVE_ORC_WRITE_FORMAT.varname()); if (versionName == null) { versionValue = Version.CURRENT; } else { diff --git ql/src/java/org/apache/hadoop/hive/ql/io/orc/WriterImpl.java ql/src/java/org/apache/hadoop/hive/ql/io/orc/WriterImpl.java index 7e9bed6..8550b27 100644 --- ql/src/java/org/apache/hadoop/hive/ql/io/orc/WriterImpl.java +++ ql/src/java/org/apache/hadoop/hive/ql/io/orc/WriterImpl.java @@ -902,7 +902,7 @@ void recordPosition(PositionRecorder recorder) throws IOException { directLengthOutput = createIntegerWriter(writer.createStream(id, OrcProto.Stream.Kind.LENGTH), false, isDirectV2); dictionaryKeySizeThreshold = writer.getConfiguration().getFloat( - HiveConf.ConfVars.HIVE_ORC_DICTIONARY_KEY_SIZE_THRESHOLD.varname, + HiveConf.ConfVars.HIVE_ORC_DICTIONARY_KEY_SIZE_THRESHOLD.varname(), HiveConf.ConfVars.HIVE_ORC_DICTIONARY_KEY_SIZE_THRESHOLD. defaultFloatVal); } diff --git ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java index e59decc..43a2b8a 100644 --- ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java +++ ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java @@ -147,8 +147,8 @@ public static Hive get(HiveConf c) throws HiveException { if (db != null) { for (HiveConf.ConfVars oneVar : HiveConf.metaVars) { // Since metaVars are all of different types, use string for comparison - String oldVar = db.getConf().get(oneVar.varname, ""); - String newVar = c.get(oneVar.varname, ""); + String oldVar = db.getConf().get(oneVar.varname(), ""); + String newVar = c.get(oneVar.varname(), ""); if (oldVar.compareToIgnoreCase(newVar) != 0) { needsRefresh = true; break; @@ -1398,7 +1398,7 @@ private void constructOneLBLocationMap(FileStatus fSta, throw new HiveException("Number of dynamic partitions created is " + validPartitions.size() + ", which is more than " + conf.getIntVar(HiveConf.ConfVars.DYNAMICPARTITIONMAXPARTS) - +". To solve this try to set " + HiveConf.ConfVars.DYNAMICPARTITIONMAXPARTS.varname + +". To solve this try to set " + HiveConf.ConfVars.DYNAMICPARTITIONMAXPARTS.varname() + " to at least " + validPartitions.size() + '.'); } diff --git ql/src/java/org/apache/hadoop/hive/ql/metadata/HiveUtils.java ql/src/java/org/apache/hadoop/hive/ql/metadata/HiveUtils.java index eafbeff..cdbdaa9 100644 --- ql/src/java/org/apache/hadoop/hive/ql/metadata/HiveUtils.java +++ ql/src/java/org/apache/hadoop/hive/ql/metadata/HiveUtils.java @@ -29,7 +29,6 @@ import org.apache.hadoop.hive.ql.security.HiveAuthenticationProvider; import org.apache.hadoop.hive.ql.security.authorization.DefaultHiveAuthorizationProvider; import org.apache.hadoop.hive.ql.security.authorization.HiveAuthorizationProvider; -import org.apache.hadoop.hive.ql.security.authorization.plugin.HiveAuthorizer; import org.apache.hadoop.hive.ql.security.authorization.plugin.HiveAuthorizerFactory; import org.apache.hadoop.hive.ql.security.authorization.plugin.sqlstd.SQLStdHiveAuthorizerFactory; import org.apache.hadoop.io.Text; @@ -391,12 +390,12 @@ public static HiveAuthorizerFactory getAuthorizerFactory( Configuration conf, HiveConf.ConfVars authorizationProviderConfKey) throws HiveException { - Class cls = conf.getClass(authorizationProviderConfKey.varname, + Class cls = conf.getClass(authorizationProviderConfKey.varname(), SQLStdHiveAuthorizerFactory.class, HiveAuthorizerFactory.class); if(cls == null){ //should not happen as default value is set - throw new HiveException("Configuration value " + authorizationProviderConfKey.varname + throw new HiveException("Configuration value " + authorizationProviderConfKey.varname() + " is not set to valid HiveAuthorizerFactory subclass" ); } diff --git ql/src/java/org/apache/hadoop/hive/ql/metadata/formatting/MetaDataFormatUtils.java ql/src/java/org/apache/hadoop/hive/ql/metadata/formatting/MetaDataFormatUtils.java index de788f7..6cb7009 100644 --- ql/src/java/org/apache/hadoop/hive/ql/metadata/formatting/MetaDataFormatUtils.java +++ ql/src/java/org/apache/hadoop/hive/ql/metadata/formatting/MetaDataFormatUtils.java @@ -327,7 +327,7 @@ public static String getIndexColumnsHeader() { return indexCols.toString(); } public static MetaDataFormatter getFormatter(HiveConf conf) { - if ("json".equals(conf.get(HiveConf.ConfVars.HIVE_DDL_OUTPUT_FORMAT.varname, "text"))) { + if ("json".equals(conf.get(HiveConf.ConfVars.HIVE_DDL_OUTPUT_FORMAT.varname(), "text"))) { return new JsonMetaDataFormatter(); } else { return new TextMetaDataFormatter(conf.getIntVar(HiveConf.ConfVars.CLIPRETTYOUTPUTNUMCOLS)); diff --git ql/src/java/org/apache/hadoop/hive/ql/parse/DDLSemanticAnalyzer.java ql/src/java/org/apache/hadoop/hive/ql/parse/DDLSemanticAnalyzer.java index eb423c1..8359dbc 100644 --- ql/src/java/org/apache/hadoop/hive/ql/parse/DDLSemanticAnalyzer.java +++ ql/src/java/org/apache/hadoop/hive/ql/parse/DDLSemanticAnalyzer.java @@ -108,6 +108,7 @@ import org.apache.hadoop.hive.ql.plan.RenamePartitionDesc; import org.apache.hadoop.hive.ql.plan.RoleDDLDesc; import org.apache.hadoop.hive.ql.plan.ShowColumnsDesc; +import org.apache.hadoop.hive.ql.plan.ShowConfDesc; import org.apache.hadoop.hive.ql.plan.ShowCreateTableDesc; import org.apache.hadoop.hive.ql.plan.ShowDatabasesDesc; import org.apache.hadoop.hive.ql.plan.ShowFunctionsDesc; @@ -309,6 +310,10 @@ public void analyzeInternal(ASTNode ast) throws SemanticException { ctx.setResFile(ctx.getLocalTmpPath()); analyzeShowDbLocks(ast); break; + case HiveParser.TOK_SHOWCONF: + ctx.setResFile(ctx.getLocalTmpPath()); + analyzeShowConf(ast); + break; case HiveParser.TOK_DESCFUNCTION: ctx.setResFile(ctx.getLocalTmpPath()); analyzeDescFunction(ast); @@ -2189,6 +2194,14 @@ private void analyzeShowDbLocks(ASTNode ast) throws SemanticException { ctx.setNeedLockMgr(true); } + private void analyzeShowConf(ASTNode ast) throws SemanticException { + String confName = stripQuotes(ast.getChild(0).getText()); + ShowConfDesc showConfDesc = new ShowConfDesc(ctx.getResFile(), confName); + rootTasks.add(TaskFactory.get(new DDLWork(getInputs(), getOutputs(), + showConfDesc), conf)); + setFetchTask(createFetchTask(showConfDesc.getSchema())); + } + /** * Add the task according to the parsed command tree. This is used for the CLI * command "LOCK TABLE ..;". diff --git ql/src/java/org/apache/hadoop/hive/ql/parse/EximUtil.java ql/src/java/org/apache/hadoop/hive/ql/parse/EximUtil.java index 56999de..2db7ae7 100644 --- ql/src/java/org/apache/hadoop/hive/ql/parse/EximUtil.java +++ ql/src/java/org/apache/hadoop/hive/ql/parse/EximUtil.java @@ -104,12 +104,12 @@ static URI getValidatedURI(HiveConf conf, String dcPath) throws SemanticExceptio LOG.info("Scheme:" + scheme + ", authority:" + authority + ", path:" + path); Collection eximSchemes = conf.getStringCollection( - HiveConf.ConfVars.HIVE_EXIM_URI_SCHEME_WL.varname); + HiveConf.ConfVars.HIVE_EXIM_URI_SCHEME_WL.varname()); if (!eximSchemes.contains(scheme)) { throw new SemanticException( ErrorMsg.INVALID_PATH.getMsg( "only the following file systems accepted for export/import : " - + conf.get(HiveConf.ConfVars.HIVE_EXIM_URI_SCHEME_WL.varname))); + + conf.get(HiveConf.ConfVars.HIVE_EXIM_URI_SCHEME_WL.varname()))); } try { diff --git ql/src/java/org/apache/hadoop/hive/ql/parse/HiveLexer.g ql/src/java/org/apache/hadoop/hive/ql/parse/HiveLexer.g index aea9c1c..541df10 100644 --- ql/src/java/org/apache/hadoop/hive/ql/parse/HiveLexer.g +++ ql/src/java/org/apache/hadoop/hive/ql/parse/HiveLexer.g @@ -285,6 +285,7 @@ KW_ROLES: 'ROLES'; KW_INNER: 'INNER'; KW_EXCHANGE: 'EXCHANGE'; KW_ADMIN: 'ADMIN'; +KW_CONF: 'CONF'; // Operators // NOTE: if you add a new function/operator, add it to sysFuncNames so that describe function _FUNC_ will work. @@ -426,6 +427,11 @@ Identifier | '`' RegexComponent+ '`' ; +ConfName + : + (Letter | DOT)+ Letter + ; + fragment QuotedIdentifier : diff --git ql/src/java/org/apache/hadoop/hive/ql/parse/HiveParser.g ql/src/java/org/apache/hadoop/hive/ql/parse/HiveParser.g index 3f91ec1..65f1053 100644 --- ql/src/java/org/apache/hadoop/hive/ql/parse/HiveParser.g +++ ql/src/java/org/apache/hadoop/hive/ql/parse/HiveParser.g @@ -163,6 +163,7 @@ TOK_SHOW_CREATETABLE; TOK_SHOW_TABLESTATUS; TOK_SHOW_TBLPROPERTIES; TOK_SHOWLOCKS; +TOK_SHOWCONF; TOK_LOCKTABLE; TOK_UNLOCKTABLE; TOK_LOCKDB; @@ -1290,6 +1291,8 @@ showStatement | KW_SHOW KW_LOCKS KW_DATABASE (dbName=Identifier) (isExtended=KW_EXTENDED)? -> ^(TOK_SHOWDBLOCKS $dbName $isExtended?) | KW_SHOW (showOptions=KW_FORMATTED)? (KW_INDEX|KW_INDEXES) KW_ON showStmtIdentifier ((KW_FROM|KW_IN) db_name=identifier)? -> ^(TOK_SHOWINDEXES showStmtIdentifier $showOptions? $db_name?) + | KW_SHOW KW_CONF ConfName + -> ^(TOK_SHOWCONF ConfName) ; lockStatement diff --git ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzerFactory.java ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzerFactory.java index b1d3371..3788cba 100644 --- ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzerFactory.java +++ ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzerFactory.java @@ -69,6 +69,7 @@ commandType.put(HiveParser.TOK_SHOWPARTITIONS, HiveOperation.SHOWPARTITIONS); commandType.put(HiveParser.TOK_SHOWLOCKS, HiveOperation.SHOWLOCKS); commandType.put(HiveParser.TOK_SHOWDBLOCKS, HiveOperation.SHOWLOCKS); + commandType.put(HiveParser.TOK_SHOWCONF, HiveOperation.SHOWCONF); commandType.put(HiveParser.TOK_CREATEFUNCTION, HiveOperation.CREATEFUNCTION); commandType.put(HiveParser.TOK_DROPFUNCTION, HiveOperation.DROPFUNCTION); commandType.put(HiveParser.TOK_CREATEMACRO, HiveOperation.CREATEMACRO); @@ -193,6 +194,7 @@ public static BaseSemanticAnalyzer get(HiveConf conf, ASTNode tree) case HiveParser.TOK_SHOWINDEXES: case HiveParser.TOK_SHOWLOCKS: case HiveParser.TOK_SHOWDBLOCKS: + case HiveParser.TOK_SHOWCONF: case HiveParser.TOK_CREATEINDEX: case HiveParser.TOK_DROPINDEX: case HiveParser.TOK_ALTERTABLE_CLUSTER_SORT: diff --git ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticException.java ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticException.java index cac5582..45b4b1e 100644 --- ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticException.java +++ ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticException.java @@ -41,6 +41,10 @@ public SemanticException(Throwable cause) { super(cause); } + public SemanticException(HiveException cause) { + super(cause); + } + public SemanticException(String message, Throwable cause) { super(message, cause); } diff --git ql/src/java/org/apache/hadoop/hive/ql/parse/VariableSubstitution.java ql/src/java/org/apache/hadoop/hive/ql/parse/VariableSubstitution.java index f292944..69c948c 100644 --- ql/src/java/org/apache/hadoop/hive/ql/parse/VariableSubstitution.java +++ ql/src/java/org/apache/hadoop/hive/ql/parse/VariableSubstitution.java @@ -17,79 +17,48 @@ */ package org.apache.hadoop.hive.ql.parse; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.hadoop.hive.conf.HiveConf; import org.apache.hadoop.hive.conf.HiveConf.ConfVars; -import org.apache.hadoop.hive.ql.processors.SetProcessor; import org.apache.hadoop.hive.ql.session.SessionState; +import org.apache.hive.common.util.SystemVariables; + +import java.util.Map; -public class VariableSubstitution { +public class VariableSubstitution extends SystemVariables { private static final Log l4j = LogFactory.getLog(VariableSubstitution.class); - protected static Pattern varPat = Pattern.compile("\\$\\{[^\\}\\$\u0020]+\\}"); - private String getSubstitute(HiveConf conf, String var) { - String val = null; - try { - if (var.startsWith(SetProcessor.SYSTEM_PREFIX)) { - val = System.getProperty(var.substring(SetProcessor.SYSTEM_PREFIX.length())); - } - } catch(SecurityException se) { - l4j.warn("Unexpected SecurityException in Configuration", se); - } - if (val ==null){ - if (var.startsWith(SetProcessor.ENV_PREFIX)){ - val = System.getenv(var.substring(SetProcessor.ENV_PREFIX.length())); - } - } + @Override + protected String getSubstitute(HiveConf conf, String var) { + String val = super.getSubstitute(conf, var); if (val == null) { - if (var.startsWith(SetProcessor.HIVECONF_PREFIX)){ - val = conf.get(var.substring(SetProcessor.HIVECONF_PREFIX.length())); + if (var.startsWith(HIVECONF_PREFIX)) { + val = conf.get(var.substring(HIVECONF_PREFIX.length())); } } - if (val ==null){ - if(var.startsWith(SetProcessor.HIVEVAR_PREFIX)){ - val = SessionState.get().getHiveVariables().get(var.substring(SetProcessor.HIVEVAR_PREFIX.length())); + if (val == null){ + Map vars = SessionState.get().getHiveVariables(); + if (var.startsWith(HIVEVAR_PREFIX)) { + val = vars.get(var.substring(HIVEVAR_PREFIX.length())); } else { - val = SessionState.get().getHiveVariables().get(var); + val = vars.get(var); } } return val; } + @Override public String substitute (HiveConf conf, String expr) { - - if (conf.getBoolVar(ConfVars.HIVEVARIABLESUBSTITUTE)){ - l4j.debug("Substitution is on: "+expr); + if (conf.getBoolVar(ConfVars.HIVEVARIABLESUBSTITUTE)) { + l4j.debug("Substitution is on: " + expr); } else { return expr; } if (expr == null) { return null; } - Matcher match = varPat.matcher(""); - String eval = expr; - for(int s=0;s inputs, HashSet outputs, this.truncateTblDesc = truncateTblDesc; } + public DDLWork(HashSet inputs, HashSet outputs, + ShowConfDesc showConfDesc) { + this(inputs, outputs); + this.showConfDesc = showConfDesc; + } + public DescDatabaseDesc getDescDatabaseDesc() { return descDbDesc; } @@ -1085,4 +1093,12 @@ public void setAlterTableExchangePartition( AlterTableExchangePartition alterTableExchangePartition) { this.alterTableExchangePartition = alterTableExchangePartition; } + + public ShowConfDesc getShowConfDesc() { + return showConfDesc; + } + + public void setShowConfDesc(ShowConfDesc showConfDesc) { + this.showConfDesc = showConfDesc; + } } diff --git ql/src/java/org/apache/hadoop/hive/ql/plan/HiveOperation.java ql/src/java/org/apache/hadoop/hive/ql/plan/HiveOperation.java index 93c89de..1ce1625 100644 --- ql/src/java/org/apache/hadoop/hive/ql/plan/HiveOperation.java +++ ql/src/java/org/apache/hadoop/hive/ql/plan/HiveOperation.java @@ -66,6 +66,7 @@ SHOWINDEXES("SHOWINDEXES", null, null), SHOWPARTITIONS("SHOWPARTITIONS", null, null), SHOWLOCKS("SHOWLOCKS", null, null), + SHOWCONF("SHOWCONF", null, null), CREATEFUNCTION("CREATEFUNCTION", null, null), DROPFUNCTION("DROPFUNCTION", null, null), CREATEMACRO("CREATEMACRO", null, null), diff --git ql/src/java/org/apache/hadoop/hive/ql/plan/ShowConfDesc.java ql/src/java/org/apache/hadoop/hive/ql/plan/ShowConfDesc.java new file mode 100644 index 0000000..ea4b860 --- /dev/null +++ ql/src/java/org/apache/hadoop/hive/ql/plan/ShowConfDesc.java @@ -0,0 +1,64 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.hadoop.hive.ql.plan; + +import org.apache.hadoop.fs.Path; + +import java.io.Serializable; + +public class ShowConfDesc extends DDLDesc implements Serializable { + private static final long serialVersionUID = 1L; + + private Path resFile; + private String confName; + + /** + * thrift ddl for the result of show columns. + */ + private static final String schema = "Field#string"; + + public String getSchema() { + return schema; + } + + public ShowConfDesc() { + } + + public ShowConfDesc(Path resFile, String confName) { + this.resFile = resFile; + this.confName = confName; + } + + @Explain(displayName = "result file", normalExplain = false) + public Path getResFile() { + return resFile; + } + + public void setResFile(Path resFile) { + this.resFile = resFile; + } + + @Explain(displayName = "conf name", normalExplain = false) + public String getConfName() { + return confName; + } + + public void setConfName(String confName) { + this.confName = confName; + } +} diff --git ql/src/java/org/apache/hadoop/hive/ql/processors/SetProcessor.java ql/src/java/org/apache/hadoop/hive/ql/processors/SetProcessor.java index 92d5e75..739f929 100644 --- ql/src/java/org/apache/hadoop/hive/ql/processors/SetProcessor.java +++ ql/src/java/org/apache/hadoop/hive/ql/processors/SetProcessor.java @@ -22,6 +22,8 @@ import static org.apache.hadoop.hive.serde.serdeConstants.STRING_TYPE_NAME; import static org.apache.hadoop.hive.serde2.MetadataTypedColumnsetSerDe.defaultNullString; +import static org.apache.hive.common.util.SystemVariables.*; + import java.util.Map; import java.util.Properties; import java.util.SortedMap; @@ -39,12 +41,7 @@ */ public class SetProcessor implements CommandProcessor { - private static String prefix = "set: "; - public static final String ENV_PREFIX = "env:"; - public static final String SYSTEM_PREFIX = "system:"; - public static final String HIVECONF_PREFIX = "hiveconf:"; - public static final String HIVEVAR_PREFIX = "hivevar:"; - public static final String SET_COLUMN_NAME = "set"; + private static final String prefix = "set: "; public static boolean getBoolean(String value) { if (value.equals("on") || value.equals("true")) { @@ -69,7 +66,7 @@ private void dumpOptions(Properties p) { // Inserting hive variables for (String s : ss.getHiveVariables().keySet()) { - sortedMap.put(SetProcessor.HIVEVAR_PREFIX + s, ss.getHiveVariables().get(s)); + sortedMap.put(HIVEVAR_PREFIX + s, ss.getHiveVariables().get(s)); } for (Map.Entry entries : sortedMap.entrySet()) { @@ -108,23 +105,23 @@ private CommandProcessorResponse setVariable(String varname, String varvalue){ if (varvalue.contains("\n")){ ss.err.println("Warning: Value had a \\n character in it."); } - if (varname.startsWith(SetProcessor.ENV_PREFIX)){ + if (varname.startsWith(ENV_PREFIX)){ ss.err.println("env:* variables can not be set."); return new CommandProcessorResponse(1); - } else if (varname.startsWith(SetProcessor.SYSTEM_PREFIX)){ - String propName = varname.substring(SetProcessor.SYSTEM_PREFIX.length()); + } else if (varname.startsWith(SYSTEM_PREFIX)){ + String propName = varname.substring(SYSTEM_PREFIX.length()); System.getProperties().setProperty(propName, new VariableSubstitution().substitute(ss.getConf(),varvalue)); return new CommandProcessorResponse(0); - } else if (varname.startsWith(SetProcessor.HIVECONF_PREFIX)){ - String propName = varname.substring(SetProcessor.HIVECONF_PREFIX.length()); + } else if (varname.startsWith(HIVECONF_PREFIX)){ + String propName = varname.substring(HIVECONF_PREFIX.length()); try { setConf(varname, propName, varvalue, false); return new CommandProcessorResponse(0); } catch (IllegalArgumentException e) { return new CommandProcessorResponse(1, e.getMessage(), "42000"); } - } else if (varname.startsWith(SetProcessor.HIVEVAR_PREFIX)) { - String propName = varname.substring(SetProcessor.HIVEVAR_PREFIX.length()); + } else if (varname.startsWith(HIVEVAR_PREFIX)) { + String propName = varname.substring(HIVEVAR_PREFIX.length()); ss.getHiveVariables().put(propName, new VariableSubstitution().substitute(ss.getConf(),varvalue)); return new CommandProcessorResponse(0); } else { @@ -169,7 +166,7 @@ private void setConf(String varname, String key, String varvalue, boolean regist private SortedMap propertiesToSortedMap(Properties p){ SortedMap sortedPropMap = new TreeMap(); - for (Map.Entry entry :System.getProperties().entrySet() ){ + for (Map.Entry entry : p.entrySet() ){ sortedPropMap.put( (String) entry.getKey(), (String) entry.getValue()); } return sortedPropMap; @@ -188,38 +185,38 @@ private CommandProcessorResponse getVariable(String varname) { ss.out.println("silent" + "=" + ss.getIsSilent()); return createProcessorSuccessResponse(); } - if (varname.startsWith(SetProcessor.SYSTEM_PREFIX)){ - String propName = varname.substring(SetProcessor.SYSTEM_PREFIX.length()); + if (varname.startsWith(SYSTEM_PREFIX)) { + String propName = varname.substring(SYSTEM_PREFIX.length()); String result = System.getProperty(propName); - if (result != null){ - ss.out.println(SetProcessor.SYSTEM_PREFIX+propName + "=" + result); + if (result != null) { + ss.out.println(SYSTEM_PREFIX + propName + "=" + result); return createProcessorSuccessResponse(); } else { - ss.out.println( propName + " is undefined as a system property"); + ss.out.println(propName + " is undefined as a system property"); return new CommandProcessorResponse(1); } - } else if (varname.indexOf(SetProcessor.ENV_PREFIX)==0){ + } else if (varname.indexOf(ENV_PREFIX) == 0) { String var = varname.substring(ENV_PREFIX.length()); - if (System.getenv(var)!=null){ - ss.out.println(SetProcessor.ENV_PREFIX+var + "=" + System.getenv(var)); + if (System.getenv(var) != null) { + ss.out.println(ENV_PREFIX + var + "=" + System.getenv(var)); return createProcessorSuccessResponse(); } else { ss.out.println(varname + " is undefined as an environmental variable"); return new CommandProcessorResponse(1); } - } else if (varname.indexOf(SetProcessor.HIVECONF_PREFIX)==0) { - String var = varname.substring(SetProcessor.HIVECONF_PREFIX.length()); - if (ss.getConf().get(var)!=null){ - ss.out.println(SetProcessor.HIVECONF_PREFIX+var + "=" + ss.getConf().get(var)); + } else if (varname.indexOf(HIVECONF_PREFIX) == 0) { + String var = varname.substring(HIVECONF_PREFIX.length()); + if (ss.getConf().get(var) != null) { + ss.out.println(HIVECONF_PREFIX + var + "=" + ss.getConf().get(var)); return createProcessorSuccessResponse(); } else { ss.out.println(varname + " is undefined as a hive configuration variable"); return new CommandProcessorResponse(1); } - } else if (varname.indexOf(SetProcessor.HIVEVAR_PREFIX)==0) { - String var = varname.substring(SetProcessor.HIVEVAR_PREFIX.length()); - if (ss.getHiveVariables().get(var)!=null){ - ss.out.println(SetProcessor.HIVEVAR_PREFIX+var + "=" + ss.getHiveVariables().get(var)); + } else if (varname.indexOf(HIVEVAR_PREFIX) == 0) { + String var = varname.substring(HIVEVAR_PREFIX.length()); + if (ss.getHiveVariables().get(var) != null) { + ss.out.println(HIVEVAR_PREFIX + var + "=" + ss.getHiveVariables().get(var)); return createProcessorSuccessResponse(); } else { ss.out.println(varname + " is undefined as a hive variable"); diff --git ql/src/java/org/apache/hadoop/hive/ql/session/SessionState.java ql/src/java/org/apache/hadoop/hive/ql/session/SessionState.java index 64a8a60..2690bd3 100644 --- ql/src/java/org/apache/hadoop/hive/ql/session/SessionState.java +++ ql/src/java/org/apache/hadoop/hive/ql/session/SessionState.java @@ -715,7 +715,7 @@ public static boolean canDownloadResource(String value) { private String downloadResource(String value, boolean convertToUnix) { if (canDownloadResource(value)) { getConsole().printInfo("converting to local " + value); - File resourceDir = new File(getConf().getVar(HiveConf.ConfVars.DOWNLOADED_RESOURCES_DIR)); + File resourceDir = new File(getResourceDir()); String destinationName = new Path(value).getName(); File destinationFile = new File(resourceDir, destinationName); if (resourceDir.exists() && ! resourceDir.isDirectory()) { @@ -883,9 +883,8 @@ public void setCurrentDatabase(String currentDatabase) { } public void close() throws IOException { - File resourceDir = - new File(getConf().getVar(HiveConf.ConfVars.DOWNLOADED_RESOURCES_DIR)); - LOG.debug("Removing resource dir " + resourceDir); + File resourceDir = new File(getResourceDir()); + LOG.debug("Removing resource dir " + getResourceDir()); try { if (resourceDir.exists()) { FileUtils.deleteDirectory(resourceDir); @@ -920,6 +919,11 @@ public boolean isAuthorizationModeV2(){ return getAuthorizationMode() == AuthorizationMode.V2; } + private String getResourceDir() { + String var = getConf().getVar(ConfVars.DOWNLOADED_RESOURCES_DIR); + return var + "/" + getSessionId() + "_resources"; + } + /** * @param resetPerfLogger * @return Tries to return an instance of the class whose name is configured in diff --git ql/src/test/org/apache/hadoop/hive/ql/exec/errors/TestTaskLogProcessor.java ql/src/test/org/apache/hadoop/hive/ql/exec/errors/TestTaskLogProcessor.java index 67a86a6..b98d950 100644 --- ql/src/test/org/apache/hadoop/hive/ql/exec/errors/TestTaskLogProcessor.java +++ ql/src/test/org/apache/hadoop/hive/ql/exec/errors/TestTaskLogProcessor.java @@ -98,7 +98,7 @@ private String writeThrowableAsFile(String before, Throwable t, String after, @Test public void testGetStackTraces() throws Exception { JobConf jobConf = new JobConf(); - jobConf.set(HiveConf.ConfVars.HIVEQUERYSTRING.varname, "select * from foo group by moo;"); + jobConf.set(HiveConf.ConfVars.HIVEQUERYSTRING.varname(), "select * from foo group by moo;"); final TaskLogProcessor taskLogProcessor = new TaskLogProcessor(jobConf); @@ -150,7 +150,7 @@ private void checkException(String writenText, List actualTrace) throws @Test public void testScriptErrorHeuristic() throws Exception { JobConf jobConf = new JobConf(); - jobConf.set(HiveConf.ConfVars.HIVEQUERYSTRING.varname, "select * from foo group by moo;"); + jobConf.set(HiveConf.ConfVars.HIVEQUERYSTRING.varname(), "select * from foo group by moo;"); final TaskLogProcessor taskLogProcessor = new TaskLogProcessor(jobConf); @@ -177,7 +177,7 @@ public void testScriptErrorHeuristic() throws Exception { @Test public void testDataCorruptErrorHeuristic() throws Exception { JobConf jobConf = new JobConf(); - jobConf.set(HiveConf.ConfVars.HIVEQUERYSTRING.varname, "select * from foo group by moo;"); + jobConf.set(HiveConf.ConfVars.HIVEQUERYSTRING.varname(), "select * from foo group by moo;"); final TaskLogProcessor taskLogProcessor = new TaskLogProcessor(jobConf); @@ -210,7 +210,7 @@ public void testDataCorruptErrorHeuristic() throws Exception { @Test public void testMapAggrMemErrorHeuristic() throws Exception { JobConf jobConf = new JobConf(); - jobConf.set(HiveConf.ConfVars.HIVEQUERYSTRING.varname, "select * from foo group by moo;"); + jobConf.set(HiveConf.ConfVars.HIVEQUERYSTRING.varname(), "select * from foo group by moo;"); final TaskLogProcessor taskLogProcessor = new TaskLogProcessor(jobConf); diff --git ql/src/test/org/apache/hadoop/hive/ql/io/TestRCFile.java ql/src/test/org/apache/hadoop/hive/ql/io/TestRCFile.java index 9d8009b..50c63bb 100644 --- ql/src/test/org/apache/hadoop/hive/ql/io/TestRCFile.java +++ ql/src/test/org/apache/hadoop/hive/ql/io/TestRCFile.java @@ -793,7 +793,7 @@ public void testRCFileHeader(char[] expected, Configuration conf) @Test public void testNonExplicitRCFileHeader() throws IOException, SerDeException { Configuration conf = new Configuration(); - conf.setBoolean(HiveConf.ConfVars.HIVEUSEEXPLICITRCFILEHEADER.varname, false); + conf.setBoolean(HiveConf.ConfVars.HIVEUSEEXPLICITRCFILEHEADER.varname(), false); char[] expected = new char[] {'S', 'E', 'Q'}; testRCFileHeader(expected, conf); } @@ -801,7 +801,7 @@ public void testNonExplicitRCFileHeader() throws IOException, SerDeException { @Test public void testExplicitRCFileHeader() throws IOException, SerDeException { Configuration conf = new Configuration(); - conf.setBoolean(HiveConf.ConfVars.HIVEUSEEXPLICITRCFILEHEADER.varname, true); + conf.setBoolean(HiveConf.ConfVars.HIVEUSEEXPLICITRCFILEHEADER.varname(), true); char[] expected = new char[] {'R', 'C', 'F'}; testRCFileHeader(expected, conf); } diff --git ql/src/test/org/apache/hadoop/hive/ql/io/orc/TestFileDump.java ql/src/test/org/apache/hadoop/hive/ql/io/orc/TestFileDump.java index 3545a2c..fdd3029 100644 --- ql/src/test/org/apache/hadoop/hive/ql/io/orc/TestFileDump.java +++ ql/src/test/org/apache/hadoop/hive/ql/io/orc/TestFileDump.java @@ -134,7 +134,7 @@ public void testDictionaryThreshold() throws Exception { (MyRecord.class, ObjectInspectorFactory.ObjectInspectorOptions.JAVA); } Configuration conf = new Configuration(); - conf.setFloat(HiveConf.ConfVars.HIVE_ORC_DICTIONARY_KEY_SIZE_THRESHOLD.varname, 0.49f); + conf.setFloat(HiveConf.ConfVars.HIVE_ORC_DICTIONARY_KEY_SIZE_THRESHOLD.varname(), 0.49f); Writer writer = OrcFile.createWriter(fs, testFilePath, conf, inspector, 100000, CompressionKind.ZLIB, 10000, 10000); Random r1 = new Random(1); diff --git service/src/java/org/apache/hive/service/auth/CustomAuthenticationProviderImpl.java service/src/java/org/apache/hive/service/auth/CustomAuthenticationProviderImpl.java index 7094b89..133e853 100644 --- service/src/java/org/apache/hive/service/auth/CustomAuthenticationProviderImpl.java +++ service/src/java/org/apache/hive/service/auth/CustomAuthenticationProviderImpl.java @@ -33,7 +33,7 @@ HiveConf conf = new HiveConf(); this.customHandlerClass = (Class) conf.getClass( - HiveConf.ConfVars.HIVE_SERVER2_CUSTOM_AUTHENTICATION_CLASS.varname, + HiveConf.ConfVars.HIVE_SERVER2_CUSTOM_AUTHENTICATION_CLASS.varname(), PasswdAuthenticationProvider.class); this.customProvider = ReflectionUtils.newInstance(this.customHandlerClass, conf); diff --git service/src/java/org/apache/hive/service/auth/HiveAuthFactory.java service/src/java/org/apache/hive/service/auth/HiveAuthFactory.java index d8ba3aa..0e752f3 100644 --- service/src/java/org/apache/hive/service/auth/HiveAuthFactory.java +++ service/src/java/org/apache/hive/service/auth/HiveAuthFactory.java @@ -97,7 +97,7 @@ public HiveAuthFactory() throws TTransportException { if(hadoopSaslQOP.ordinal() > saslQOP.ordinal()) { LOG.warn(MessageFormat.format("\"hadoop.rpc.protection\" is set to higher security level " + "{0} then {1} which is set to {2}", hadoopSaslQOP.toString(), - ConfVars.HIVE_SERVER2_THRIFT_SASL_QOP.varname, saslQOP.toString())); + ConfVars.HIVE_SERVER2_THRIFT_SASL_QOP.varname(), saslQOP.toString())); } saslProps.put(Sasl.QOP, saslQOP.toString()); saslProps.put(Sasl.SERVER_AUTH, "true"); diff --git service/src/java/org/apache/hive/service/cli/session/HiveSessionImpl.java service/src/java/org/apache/hive/service/cli/session/HiveSessionImpl.java index 445c858..7aca94c 100644 --- service/src/java/org/apache/hive/service/cli/session/HiveSessionImpl.java +++ service/src/java/org/apache/hive/service/cli/session/HiveSessionImpl.java @@ -92,7 +92,7 @@ public HiveSessionImpl(TProtocolVersion protocol, String username, String passwo } } // set an explicit session name to control the download directory name - hiveConf.set(ConfVars.HIVESESSIONID.varname, + hiveConf.set(ConfVars.HIVESESSIONID.varname(), sessionHandle.getHandleIdentifier().toString()); // use thrift transportable formatter hiveConf.set(ListSinkOperator.OUTPUT_FORMATTER, diff --git service/src/java/org/apache/hive/service/cli/thrift/ThriftBinaryCLIService.java service/src/java/org/apache/hive/service/cli/thrift/ThriftBinaryCLIService.java index 6fbc847..ef7fc8d 100644 --- service/src/java/org/apache/hive/service/cli/thrift/ThriftBinaryCLIService.java +++ service/src/java/org/apache/hive/service/cli/thrift/ThriftBinaryCLIService.java @@ -70,7 +70,7 @@ public void run() { } else { String keyStorePath = hiveConf.getVar(ConfVars.HIVE_SERVER2_SSL_KEYSTORE_PATH).trim(); if (keyStorePath.isEmpty()) { - throw new IllegalArgumentException(ConfVars.HIVE_SERVER2_SSL_KEYSTORE_PATH.varname + + throw new IllegalArgumentException(ConfVars.HIVE_SERVER2_SSL_KEYSTORE_PATH.varname() + " Not configured for SSL connection"); } serverSocket = HiveAuthFactory.getServerSSLSocket(hiveHost, portNum, diff --git service/src/java/org/apache/hive/service/cli/thrift/ThriftHttpCLIService.java service/src/java/org/apache/hive/service/cli/thrift/ThriftHttpCLIService.java index a6ff6ce..c80a425 100644 --- service/src/java/org/apache/hive/service/cli/thrift/ThriftHttpCLIService.java +++ service/src/java/org/apache/hive/service/cli/thrift/ThriftHttpCLIService.java @@ -90,7 +90,7 @@ public void run() { String keyStorePath = hiveConf.getVar(ConfVars.HIVE_SERVER2_SSL_KEYSTORE_PATH).trim(); String keyStorePassword = hiveConf.getVar(ConfVars.HIVE_SERVER2_SSL_KEYSTORE_PASSWORD); if (keyStorePath.isEmpty()) { - throw new IllegalArgumentException(ConfVars.HIVE_SERVER2_SSL_KEYSTORE_PATH.varname + + throw new IllegalArgumentException(ConfVars.HIVE_SERVER2_SSL_KEYSTORE_PATH.varname() + " Not configured for SSL connection"); } SslContextFactory sslContextFactory = new SslContextFactory(); diff --git service/src/test/org/apache/hive/service/cli/CLIServiceTest.java service/src/test/org/apache/hive/service/cli/CLIServiceTest.java index 8ec8d43..f42fbeb 100644 --- service/src/test/org/apache/hive/service/cli/CLIServiceTest.java +++ service/src/test/org/apache/hive/service/cli/CLIServiceTest.java @@ -22,14 +22,12 @@ import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; -import static org.junit.Assert.assertTrue; import java.util.Collections; import java.util.HashMap; import java.util.Map; import org.apache.hadoop.hive.conf.HiveConf; -import org.apache.hadoop.hive.ql.ErrorMsg; import org.junit.After; import org.junit.Before; import org.junit.Test; @@ -132,7 +130,7 @@ public void testExecuteStatement() throws Exception { OperationHandle opHandle; - String queryString = "SET " + HiveConf.ConfVars.HIVE_SUPPORT_CONCURRENCY.varname + String queryString = "SET " + HiveConf.ConfVars.HIVE_SUPPORT_CONCURRENCY.varname() + " = false"; opHandle = client.executeStatement(sessionHandle, queryString, confOverlay); client.closeOperation(opHandle); @@ -174,7 +172,7 @@ public void testExecuteStatementAsync() throws Exception { OperationStatus opStatus = null; // Change lock manager, otherwise unit-test doesn't go through - String queryString = "SET " + HiveConf.ConfVars.HIVE_SUPPORT_CONCURRENCY.varname + String queryString = "SET " + HiveConf.ConfVars.HIVE_SUPPORT_CONCURRENCY.varname() + " = false"; opHandle = client.executeStatement(sessionHandle, queryString, confOverlay); client.closeOperation(opHandle); @@ -284,7 +282,7 @@ public void testConfOverlay() throws Exception { String tabName = "TEST_CONF_EXEC"; String tabNameVar = "tabNameVar"; - String setLockMgr = "SET " + HiveConf.ConfVars.HIVE_SUPPORT_CONCURRENCY.varname + String setLockMgr = "SET " + HiveConf.ConfVars.HIVE_SUPPORT_CONCURRENCY.varname() + " = false"; OperationHandle opHandle = client.executeStatement(sessionHandle, setLockMgr, null); client.closeOperation(opHandle); diff --git service/src/test/org/apache/hive/service/cli/session/TestSessionHooks.java service/src/test/org/apache/hive/service/cli/session/TestSessionHooks.java index 2fac800..f38fb28 100644 --- service/src/test/org/apache/hive/service/cli/session/TestSessionHooks.java +++ service/src/test/org/apache/hive/service/cli/session/TestSessionHooks.java @@ -56,7 +56,7 @@ public void run(HiveSessionHookContext sessionHookContext) throws HiveSQLExcepti @Before public void setUp() throws Exception { super.setUp(); - System.setProperty(ConfVars.HIVE_SERVER2_SESSION_HOOK.varname, + System.setProperty(ConfVars.HIVE_SERVER2_SESSION_HOOK.varname(), TestSessionHooks.SessionHookTest.class.getName()); service = new EmbeddedThriftBinaryCLIService(); client = new ThriftCLIServiceClient(service);