在arm架构上需要手动编译安装mysql,编译安装mysql请看下一个博客。
在此只说一下hive的安装。hive可以直接安装使用。
因为hive是数据仓库,它主要就是将执行的sql语句转化为mapreduce任务,存储结构化数据,其实数据还是存储在hdfs上的,所以依赖hadoop集群,在此我们将hive安装到master节点。
首先,我们将hive的安装包拷贝到master节点下apache-hive-2.3.3-bin.tar.gz
其次,将安装包解压 tar -zxvf apache-hive-2.3.3-bin.tar.gz,要hive与mysql进行关联,hive的元数据存储在mysql数据库中,将mysql的驱动包拷贝到hive目录下的lib目录下
然后,修改conf的配置文件,将hive-env.sh.template复制出一份改名为hive-env.sh
cp hive-env.sh.template hive-env.sh 添加hive的配置文件,如下:
HADOOP_HOME=/usr/local/hadoop-2.7.6
HIVE_HOME=/usr/local/apache-hive-2.3.3-bin
JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-arm64
# Hive Configuration Directory can be controlled by:
export HIVE_CONF_DIR=/usr/local/apache-hive-2.3.3-bin/conf
export CLASSPATH=$CLASSPATH:$JAVA_HOME/lib:$HADOOP_HOME/lib:$HIVE_HOME/lib
添加hive-site.xml配置文件,如下:
需要初始化hive数据仓库,在bin目录下执行 ./schematool -dbType mysql -initSchema
其实主要是修改几个地方就ok,url,mysql密码等,自己进去看一下就可以了。
配置好配置文件好直接在bin目录下执行./hive进入交互模式,或将hive直接配好全局变量,直接执行hive也是ok的。
去除警告:
root@master:/usr/local/apache-hive-2.3.3-bin/bin# ./hive
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/usr/local/apache-hive-2.3.3-bin/lib/log4j-slf4j-impl-2.6.2.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/local/hadoop-2.7.6/share/hadoop/common/lib/slf4j-log4j12-1.7.10.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.apache.logging.slf4j.Log4jLoggerFactory]
Logging initialized using configuration in jar:file:/usr/local/apache-hive-2.3.3-bin/lib/hive-common-2.3.3.jar!/hive-log4j2.properties Async: true
Hive-on-MR is deprecated in Hive 2 and may not be available in the future versions. Consider using a different execution engine (i.e. spark, tez) or using Hive 1.X releases.
hive> show databases;
Mon Sep 03 04:48:55 UTC 2018 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
OK
default
Time taken: 9.657 seconds, Fetched: 1 row(s)
修改:
在mysql连接上加上&useSSL=true
如下:jdbc:mysql:///:3366:test?useUnicode=true&characterEncoding=utf-8&useSSL=true。
Query plan format serialization between client and task nodes.
Two supported values are : kryo and javaXML. Kryo is default.
Determines whether local tasks (typically mapjoin hashtable generation phase) runs in
separate JVM (true recommended) or not.
Avoids the overhead of spawning new JVM, but can lead to out-of-memory issues.
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
When enabled, this option allows a user script to exit successfully without consuming
all the data from the standard input.
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*
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*
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.
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.
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.
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.
Comma-separated list of hooks to be invoked for each query which can
tranform the query before it's placed in the job.xml file. Must be a Java class which
extends from the org.apache.hadoop.hive.ql.hooks.Redactor abstract class.
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.
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.
In strict mode, the user must specify at least one static partition
in case the user accidentally overwrites all partitions.
In nonstrict mode all partitions are allowed to be dynamic.
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.
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.
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
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.
Make column names unique in the result set by qualifying column names with table alias if needed.
Table alias will be added to column names for queries of type "select *" or
if query explicitly uses table alias "select r1.x..".
Expects a time value with unit (d/day, h/hour, m/min, s/sec, ms/msec, us/usec, ns/nsec), which is sec if not specified.
Number of seconds for the client to wait between consecutive connection attempts
Expects a time value with unit (d/day, h/hour, m/min, s/sec, ms/msec, us/usec, ns/nsec), which is sec if not specified.
MetaStore Client socket timeout in seconds
Expects a time value with unit (d/day, h/hour, m/min, s/sec, ms/msec, us/usec, ns/nsec), which is sec if not specified.
MetaStore Client socket lifetime in seconds. After this time is exceeded, client
reconnects on the next MetaStore operation. A value of 0s means the connection
has an infinite lifetime.
Expects a time value with unit (d/day, h/hour, m/min, s/sec, ms/msec, us/usec, ns/nsec), which is msec if not specified.
The time between HMSHandler retry attempts on failure.
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.
Intermediate dir suffixes used for archiving. Not important what they
are, as long as collisions are avoided
The service principal for the metastore Thrift server.
The special string _HOST will be replaced automatically with the correct host name.
If true, the metastore Thrift interface will use TCompactProtocol. When false (default) TBinaryProtocol will be used.
Setting it to true will break compatibility with older clients running TBinaryProtocol.
The ZooKeeper token store connect string. You can re-use the configuration value
set in hive.zookeeper.quorum, by leaving this parameter unset.
The root path for token store data. Note that this is used by both HiveServer2 and
MetaStore to store delegation Token. One directory gets created for each of them.
The final directory names would have the servername appended to it (HIVESERVER2,
METASTORE).
ACL for token store entries. Comma separated list of ACL entries. For example:
sasl:hive/[email protected]:cdrwa,sasl:hive/[email protected]:cdrwa
Defaults to all permissions for the hiveserver2/metastore process user.
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.
When true the current MS version is recorded in the VERSION table. If this is disabled and verification is
enabled the MS will be unusable.
Name of the identifier factory to use when generating table/column names etc.
'datanucleus1' is used for backward compatibility with DataNucleus v1
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.
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.
Expects a time value with unit (d/day, h/hour, m/min, s/sec, ms/msec, us/usec, ns/nsec), which is sec if not specified.
time after which events will be removed from the database listener queue
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).
Expects a time value with unit (d/day, h/hour, m/min, s/sec, ms/msec, us/usec, ns/nsec), which is sec if not specified.
Frequency at which timer task runs to purge expired events in metastore.
Expects a time value with unit (d/day, h/hour, m/min, s/sec, ms/msec, us/usec, ns/nsec), which is sec if not specified.
Duration after which events expire from events table
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.
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.
Whether the Hive metastore should try to use direct SQL queries instead of the
DataNucleus for certain read paths. This can improve metastore performance when
fetching many partitions or column statistics by orders of magnitude; however, it
is not guaranteed to work on all RDBMS-es and all versions. In case of SQL failures,
the metastore will fall back to the DataNucleus, so it's safe even if SQL doesn't
work for all queries on your datastore. If all SQL queries fail (for example, your
metastore is backed by MongoDB), you might want to disable this to save the
try-and-fall-back cost.
Batch size for partition and other object retrieval from the underlying DB in direct
SQL. For some DBs like Oracle and MSSQL, there are hardcoded or perf-based limitations
that necessitate this. For DBs that can handle the queries, this isn't necessary and
may impede performance. -1 means no batching, 0 means automatic batching.
Same as hive.metastore.try.direct.sql, for read statements within a transaction that
modifies metastore data. Due to non-standard behavior in Postgres, if a direct SQL
select query has incorrect syntax or something similar inside a transaction, the
entire transaction will fail and fall-back to DataNucleus will not be possible. You
should disable the usage of direct SQL inside transactions if that happens in your case.
If true (default is false), ALTER TABLE operations which change the type of a
column (say STRING) to an incompatible type (say MAP) 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.
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
List of comma separated keys occurring in table properties which will get inherited to newly created partitions.
* implies all the keys will get inherited.
Expects a time value with unit (d/day, h/hour, m/min, s/sec, ms/msec, us/usec, ns/nsec), which is sec if not specified.
Number of seconds for a cached node to be active in the cache before they become stale.
Expects a time value with unit (d/day, h/hour, m/min, s/sec, ms/msec, us/usec, ns/nsec), which is msec if not specified.
Number of milliseconds a writer will wait to acquire the writelock before giving up.
Expects a time value with unit (d/day, h/hour, m/min, s/sec, ms/msec, us/usec, ns/nsec), which is msec if not specified.
Number of milliseconds a reader will wait to acquire the readlock before giving up.
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.
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.
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.
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.
Expects a time value with unit (d/day, h/hour, m/min, s/sec, ms/msec, us/usec, ns/nsec), which is sec if not specified.
How long to run autoprogressor for the script/UDTF operators.
Set to 0 for forever.
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.
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)
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.
Whether Hive should use memory-optimized hash table for MapJoin. Only works on Tez,
because memory-optimized hashtable cannot be serialized.
Optimized hashtable (see hive.mapjoin.optimized.hashtable) uses a chain of buffers to
store data. This is one buffer size. HT may be slightly faster if this is larger, but for small
joins unnecessary memory will be allocated and then trimmed.
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
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.
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.
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.
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.
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.
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.
Expects one of [textfile, sequencefile, rcfile, orc].
Default file format for CREATE TABLE statement. Users can explicitly override it by CREATE TABLE ... STORED AS [FORMAT]
Expects one of [none, textfile, sequencefile, rcfile, orc].
Default file format for CREATE TABLE statement applied to managed tables only. External tables will be
created with format specified by hive.default.fileformat. Leaving this null will result in using hive.default.fileformat
for all tables.
Expects one of [textfile, sequencefile, rcfile].
Default file format for storing result of the query.
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
Expects a time value with unit (d/day, h/hour, m/min, s/sec, ms/msec, us/usec, ns/nsec), which is msec if not specified.
The interval to wait between logging the plan's progress.
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.
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.
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
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
In test mode, specfies sampling frequency for table, which is not bucketed,
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))
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.
When hive.merge.mapfiles, hive.merge.mapredfiles or hive.merge.tezfiles is enabled
while writing a table with ORC file format, enabling this config will do stripe-level
fast merge for small ORC files. Note that enabling this config will not honor the
padding tolerance config (hive.exec.orc.block.padding.tolerance).
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.
Maximum fraction of heap that can be used by Parquet file writers in one task.
It is for avoiding OutOfMemory error in tasks. Work with Parquet 1.6.0 and above.
This config parameter is defined in Parquet, so that it does not start with 'hive.'.
Boolean/tinyint/smallint/int/bigint value is interpreted as milliseconds during the timestamp conversion.
Set this flag to true to interpret the value as seconds to be consistent with float/double.
Define the version of the file to write. Possible values are 0.11 and 0.12.
If this parameter is not defined, ORC will use the run length encoding (RLE)
introduced in Hive 0.12. Any value other than 0.11 results in the 0.12 encoding.
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.
Define the default ORC index stride in number of rows. (Stride is the number of rows
an index entry represents.)
If enabled dictionary check will happen after first row index stride (default 10000 rows)
else dictionary check will happen before writing first stripe. In both cases, the decision
to use dictionary or not will be retained thereafter.
Define the tolerance for block padding as a decimal fraction of stripe size (for
example, the default value 0.05 is 5% of the stripe size). For the defaults of 64Mb
ORC stripe and 256Mb HDFS blocks, the default block padding tolerance of 5% will
reserve a maximum of 3.2Mb for padding within the 256Mb block. In that case, if the
available size within the block is more than 3.2Mb, a new smaller stripe will be
inserted to fit within that space. This will make sure that no stripe written will
cross block boundaries and cause remote reads within a node local task.
Expects one of [speed, compression].
Define the encoding strategy to use while writing data. Changing this will
only affect the light weight encoding for integers. This flag will not
change the compression level of higher level compression codec (like ZLIB).
Expects one of [speed, compression].
Define the compression strategy to use while writing data.
This changes the compression level of higher level compression codec (like ZLIB).
Expects one of [hybrid, bi, etl].
This is not a user level config. BI strategy is used when the requirement is to spend less time in split generation as opposed to query execution (split generation does not read or cache file footers). ETL strategy is used when spending little more time in split generation is acceptable (split generation reads and caches file footers). HYBRID chooses between the above strategies based on heuristics.
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.
If ORC reader encounters corrupt data, this value will be used to determine
whether to skip the corrupt data or throw exception. The default behavior is to throw exception.
LazySimpleSerde uses this property to determine if it treats 'T', 't', 'F', 'f',
'1', and '0' as extened, legal boolean literal, in addition to 'TRUE' and 'FALSE'.
The default is false, which means only 'TRUE' and 'FALSE' are treated as legal
boolean literal.
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.
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).
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
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.
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.
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.
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.
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.
This controls how many partitions can be scanned for each partitioned table.
The default value "-1" means no limit.
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.
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.
By default Tez will ask for however many cpus map-reduce is configured to use per container.
This can be used to overwrite.
The log level to use for tasks executing as part of the DAG.
Used only if hive.tez.java.opts is used to configure Java options.
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.
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.
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.
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.
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.
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 automatically disabled if number of reducers would be less than specified value.
When enabled dynamic partitioning column will be globally sorted.
This way we can keep only one record writer open for each partition value
in the reducer thereby reducing the memory pressure on reducers.
Expects value between 0.0f and 1.0f.
Probability with which a row will be chosen.
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.
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
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.
Expects one of the pattern in [jdbc(:.*), hbase, counter, custom, fs].
The storage that stores temporary Hive statistics. In filesystem based statistics collection ('fs'),
each task writes statistics it has collected in a file on the filesystem, which will be aggregated
after the job has finished. Supported values are fs (filesystem), jdbc:database (where database
can be derby, mysql, etc.), hbase, counter, and custom as defined in StatsSetupConst.java.
Expects a time value with unit (d/day, h/hour, m/min, s/sec, ms/msec, us/usec, ns/nsec), which is sec if not specified.
Timeout value used by JDBC connection and statements.
Maximum number of retries when stats publisher/aggregator got an exception updating intermediate database.
Default is no tries on failures.
Expects a time value with unit (d/day, h/hour, m/min, s/sec, ms/msec, us/usec, ns/nsec), which is msec if not specified.
The base waiting window before the next retry. The actual wait time is calculated by baseWindow * failures baseWindow * (failure + 1) * (random number between [0.0,1.0]).
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
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.
Number of threads used by partialscan/noscan analyze command for partitioned tables.
This is applicable only for file formats that implement StatsProvidingRecordReader (like ORC).
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.
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.
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.
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
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.
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.).
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.
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.
Annotation of operator tree with statistics information requires partition level basic
statistics 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.
Annotation of operator tree with statistics information requires column statistics.
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/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/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.
Whether Hive supports concurrency control or not.
A ZooKeeper instance must be up and running when using zookeeper Hive lock manager
Expects a time value with unit (d/day, h/hour, m/min, s/sec, ms/msec, us/usec, ns/nsec), which is sec if not specified.
The sleep time between various retries
This param is to control whether or not only do lock on queries
that need to execute at least one mapred job.
List of ZooKeeper servers to talk to. This is needed for:
1. Read/write locks - when hive.lock.manager is set to
org.apache.hadoop.hive.ql.lockmgr.zookeeper.ZooKeeperHiveLockManager,
2. When HiveServer2 supports service discovery via Zookeeper.
3. For delegation token storage if zookeeper store is used, if
hive.cluster.delegation.token.store.zookeeper.connectString is not set
The port of ZooKeeper servers to talk to.
If the list of Zookeeper servers specified in hive.zookeeper.quorum
does not contain port numbers, this value is used.
Expects a time value with unit (d/day, h/hour, m/min, s/sec, ms/msec, us/usec, ns/nsec), which is msec if not specified.
ZooKeeper client's session timeout (in milliseconds). The client is disconnected, and as a result, all locks released,
if a heartbeat is not sent in the timeout.
Expects a time value with unit (d/day, h/hour, m/min, s/sec, ms/msec, us/usec, ns/nsec), which is msec if not specified.
Initial amount of time (in milliseconds) to wait between retries
when connecting to the ZooKeeper server when using ExponentialBackoffRetry policy.
Set to org.apache.hadoop.hive.ql.lockmgr.DbTxnManager as part of turning on Hive
transactions, which also requires appropriate settings for hive.compactor.initiator.on,
hive.compactor.worker.threads, hive.support.concurrency (true), hive.enforce.bucketing
(true), and hive.exec.dynamic.partition.mode (nonstrict).
The default DummyTxnManager replicates pre-Hive-0.13 behavior and provides
no transactions.
Expects a time value with unit (d/day, h/hour, m/min, s/sec, ms/msec, us/usec, ns/nsec), which is sec if not specified.
time after which transactions are declared aborted if the client has not sent a heartbeat.
Maximum number of transactions that can be fetched in one call to open_txns().
This controls how many transactions streaming agents such as Flume or Storm open
simultaneously. The streaming agent then writes that number of entries into a single
file (per Flume agent or Storm bolt). Thus increasing this value decreases the number
of delta files created by streaming agents. But it also increases the number of open
transactions that Hive has to track at any given time, which may negatively affect
read performance.
Whether to run the initiator and cleaner threads on this metastore instance or not.
Set this to true on one instance of the Thrift metastore service as part of turning
on Hive transactions. For a complete list of parameters required for turning on
transactions, see hive.txn.manager.
How many compactor worker threads to run on this metastore instance. Set this to a
positive number on one or more instances of the Thrift metastore service as part of
turning on Hive transactions. For a complete list of parameters required for turning
on transactions, see hive.txn.manager.
Worker threads spawn MapReduce jobs to do compactions. They do not do the compactions
themselves. Increasing the number of worker threads will decrease the time it takes
tables or partitions to be compacted once they are determined to need compaction.
It will also increase the background load on the Hadoop cluster as more MapReduce jobs
will be running in the background.
Expects a time value with unit (d/day, h/hour, m/min, s/sec, ms/msec, us/usec, ns/nsec), which is sec if not specified.
Time in seconds after which a compaction job will be declared failed and the
compaction re-queued.
Expects a time value with unit (d/day, h/hour, m/min, s/sec, ms/msec, us/usec, ns/nsec), which is sec if not specified.
Time in seconds between checks to see if any tables or partitions need to be
compacted. This should be kept high because each check for compaction requires
many calls against the NameNode.
Decreasing this value will reduce the time it takes for compaction to be started
for a table or partition that requires compaction. However, checking if compaction
is needed requires several calls to the NameNode for each table or partition that
has had a transaction done on it since the last major compaction. So decreasing this
value will increase the load on the NameNode.
Number of delta directories in a table or partition that will trigger a minor
compaction.
Percentage (fractional) size of the delta files relative to the base that will trigger
a major compaction. (1.0 = 100%, so the default 0.1 = 10%.)
Number of aborted transactions involving a given table or partition that will trigger
a major compaction.
Expects a time value with unit (d/day, h/hour, m/min, s/sec, ms/msec, us/usec, ns/nsec), which is msec if not specified.
Time between runs of the cleaner thread
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.
Expects one of [none, minimal, more].
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.
0. none : disable hive.fetch.task.conversion
1. minimal : SELECT STAR, FILTER on partition columns, LIMIT only
2. more : SELECT, FILTER, LIMIT only (support TABLESAMPLE and virtual columns)
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.
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.
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.
If true, the evaluation result of a deterministic expression referenced twice or more
will be cached.
For example, in a filter condition like '.. where key + 10 = 100 or key + 10 = 0'
the expression 'key + 10' will be evaluated/cached once and reused for the following
expression ('key + 10 = 0'). Currently, this is applied only to expressions in select
or filter operators.
The Hive client authorization manager class name. The user defined authorization class should implement
interface org.apache.hadoop.hive.ql.security.authorization.HiveAuthorizationProvider.
hive client authenticator manager class name. The user defined authenticator should implement
interface org.apache.hadoop.hive.ql.security.HiveAuthenticationProvider.
Names of authorization manager classes (comma separated) to be used in the metastore
for authorization. The user defined authorization class should implement interface
org.apache.hadoop.hive.ql.security.authorization.HiveMetastoreAuthorizationProvider.
All authorization manager classes have to successfully authorize the metastore API
call for the command execution to be allowed.
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.
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.
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.
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.
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. Note that the default gives the creator of a table no access to the
table (but see HIVE-8067).
List of comma separated Java regexes. Configurations parameters that match these
regexes can be modified by user when SQL standard authorization is enabled.
To get the default value, use the 'set <param>' command.
Note that the hive.conf.restricted.list checks are still enforced after the white list
check
List of comma separated Java regexes, to be appended to list set in
hive.security.authorization.sqlstd.confwhitelist. Using this list instead
of updating the original list means that you can append to the defaults
set by SQL standard authorization instead of replacing it entirely.
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.
Parameter that determines if 'regular' (non-replication) export dumps can be
imported on to tables that are the target of replication. If this parameter is
set, regular imports will check if the destination table(if it exists) has a 'repl.last.id' set on it. If so, it will fail.
Parameter that can be used to override which ReplicationTaskFactory will be
used to instantiate ReplicationTask events. Override for third party repl plugins
should rework the mapred work or not.
This is first introduced by SymlinkTextInputFormat to replace symlink files with real paths at compile time.
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.
A list of io exception handler class names. This is used
to construct a list exception handlers to handle exceptions thrown
by record readers
Expects one of [none, execution, performance, verbose].
HS2 operation logging mode available to clients to be set at session level.
For this to work, hive.server2.logging.operation.enabled should be set to true.
NONE: Ignore any logging
EXECUTION: Log completion of tasks
PERFORMANCE: Execution + Performance logs
VERBOSE: All logs
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 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).
Whether to log explain output for every query.
When enabled, will log EXPLAIN EXTENDED output for the query at INFO log4j log level.
Whether to show explain result at user level.
When enabled, will log EXPLAIN output for the query at user level.
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.
The class responsible for logging client side performance metrics.
Must be a subclass of org.apache.hadoop.hive.ql.log.PerfLogger
Where to insert into multilevel directories like
"insert directory '/HIVEFT25686/chinna/' from table"
Set this to false if the table directories should be created
with the permissions derived from dfs umask instead of
inheriting the permission of the warehouse or database directory.
Expects one of [memory, ssd, default].
Define the storage policy for temporary tables.Choices between memory, ssd and default
The data format to use for DDL output. One of "text" (for human
readable text) or "json" (for a json object).
In older Hive version (0.10 and earlier) no distinction was made between
partition columns or non-partition columns while displaying columns in describe
table. From 0.12 onwards, they are displayed separately. This flag will let you
get old behavior, if desired. See, test-case in patch for HIVE-6689.
Expects value bigger than 0.
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.
Either the location of a HS2 global init file or a directory containing a .hiverc file. If the
property is set, the value must be a valid path to an init file or directory where the init file is located.
Expects one of [binary, http].
Transport mode of HiveServer2.
Expects a time value with unit (d/day, h/hour, m/min, s/sec, ms/msec, us/usec, ns/nsec), which is msec if not specified.
Maximum idle time for a connection on the server when in HTTP mode.
Expects a time value with unit (d/day, h/hour, m/min, s/sec, ms/msec, us/usec, ns/nsec), which is sec if not specified.
Keepalive time for an idle http worker thread. When the number of workers exceeds min workers, excessive threads are killed after this time interval.
Expects a time value with unit (d/day, h/hour, m/min, s/sec, ms/msec, us/usec, ns/nsec), which is sec if not specified.
Maximum age in seconds for server side cookie used by HS2 in HTTP mode.
Expects one of [auth, auth-int, auth-conf].
Sasl QOP value; set it to one of following values to enable higher levels of
protection for HiveServer2 communication with clients.
Setting hadoop.rpc.protection to a higher level than HiveServer2 does not
make sense in most situations. HiveServer2 ignores hadoop.rpc.protection in favor
of hive.server2.thrift.sasl.qop.
"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.
Expects a time value with unit (d/day, h/hour, m/min, s/sec, ms/msec, us/usec, ns/nsec), which is msec if not specified.
Binary exponential backoff slot time for Thrift clients during login to HiveServer2,
for retries until hitting Thrift client timeout
Expects a time value with unit (d/day, h/hour, m/min, s/sec, ms/msec, us/usec, ns/nsec), which is sec if not specified.
Timeout for Thrift clients during login to HiveServer2
Expects a time value with unit (d/day, h/hour, m/min, s/sec, ms/msec, us/usec, ns/nsec), which is sec if not specified.
Keepalive time (in seconds) for an idle worker thread. When the number of workers exceeds min workers, excessive threads are killed after this time interval.
Expects a time value with unit (d/day, h/hour, m/min, s/sec, ms/msec, us/usec, ns/nsec), which is sec if not specified.
How long HiveServer2 shutdown will wait for async threads to terminate.
Size of the wait queue for async thread pool in HiveServer2.
After hitting this limit, the async thread pool will reject new requests.
Expects a time value with unit (d/day, h/hour, m/min, s/sec, ms/msec, us/usec, ns/nsec), which is sec if not specified.
Time that an idle HiveServer2 async thread (from the thread pool) will wait for a new task
to arrive before terminating
Expects a time value with unit (d/day, h/hour, m/min, s/sec, ms/msec, us/usec, ns/nsec), which is msec if not specified.
Time that HiveServer2 will wait before responding to asynchronous calls that use long polling
Expects one of [nosasl, none, ldap, kerberos, pam, custom].
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)
PAM: Pluggable authentication module
NOSASL: Raw transport
keytab file for SPNego principal, optional,
typical value would look like /etc/security/keytabs/spnego.service.keytab,
This keytab would be used by HiveServer2 when Kerberos security is enabled and
HTTP transport mode is used.
This needs to be set only if SPNEGO is to be used in authentication.
SPNego authentication would be honored only if valid
hive.server2.authentication.spnego.principal
and
hive.server2.authentication.spnego.keytab
are specified.
SPNego service principal, optional,
typical value would look like HTTP/[email protected]
SPNego service principal would be used by HiveServer2 when Kerberos security is enabled
and HTTP transport mode is used.
This needs to be set only if SPNEGO is to be used in authentication.
LDAP connection URL(s),
this value could contain URLs to mutiple LDAP servers instances for HA,
each LDAP URL is separated by a SPACE character. URLs are used in the
order specified until a connection is successful.
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 implement Hadoop's
org.apache.hadoop.conf.Configurable class to grab Hive's Configuration object.
List of the underlying pam services that should be used when auth type is PAM
A file with the same name must exist in /etc/pam.d
Setting this property to true will have HiveServer2 execute
Hive operations as the user making the calls to it.
Expects one of [classic, hive].
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
If the YARN fair scheduler is configured and HiveServer2 is running in non-impersonation mode,
this setting determines the user for fair scheduler queue mapping.
If set to true (default), the logged-in user determines the fair scheduler queue
for submitted jobs, so that map reduce resource usage can be tracked by user.
If set to false, all Hive jobs go to the 'hive' user's queue.
Comma separated list of builtin udf names allowed in queries.
An empty whitelist allows all builtin udfs to be executed. The udf black list takes precedence over udf white list
Expects a time value with unit (d/day, h/hour, m/min, s/sec, ms/msec, us/usec, ns/nsec), which is msec if not specified.
The time should be bigger than or equal to 3000 msec.
The check interval for session/operation timeout, which can be disabled by setting to zero or negative value.
Expects a time value with unit (d/day, h/hour, m/min, s/sec, ms/msec, us/usec, ns/nsec), which is msec if not specified.
Session will be closed when it's not accessed for this duration, which can be disabled by setting to zero or negative value.
Expects a time value with unit (d/day, h/hour, m/min, s/sec, ms/msec, us/usec, ns/nsec), which is msec if not specified.
Operation will be closed when it's not accessed for this duration of time, which can be disabled by setting to zero value.
With positive value, it's checked for operations in terminal state only (FINISHED, CANCELED, CLOSED, ERROR).
With negative value, it's checked for all of the operations regardless of state.
Session will be considered to be idle only if there is no activity, and there is no pending operation.
This setting takes effect only if session idle timeout (hive.server2.idle.session.timeout) and checking
(hive.server2.session.check.interval) are enabled.
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.
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)
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.
Expects a time value with unit (d/day, h/hour, m/min, s/sec, ms/msec, us/usec, ns/nsec), which is sec if not specified.
Timeout for the HiveServer to close the connection if no response from the client. By default, 10 seconds.
Expects one of [mr, tez, spark].
Chooses execution engine. Options are: mr (Map reduce, default), tez (hadoop 2 only), spark
This is the location hive in tez mode will look for to find a site wide
installed hive instance.
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.
This flag should be set to true to enable vectorized mode of query execution.
The default value is false.
This flag should be set to true to enable vectorized mode of the reduce-side of query execution.
The default value is true.
This flag should be set to true to enable vectorized mode of the reduce-side GROUP BY query execution.
The default value is true.
This flag should be set to true to enable native (i.e. non-pass through) vectorization
of queries using MapJoin.
The default value is true.
This flag should be set to true to restrict use of native vector map join hash tables to
the MultiKey in queries using MapJoin.
The default value is false.
This flag should be set to true to enable vector map join hash tables to
use max / max filtering for integer join queries using MapJoin.
The default value is false.
The number of small table rows for a match in vector map join hash tables
where we use the repeated field optimization in overflow vectorized row batch for join queries using MapJoin.
A value of -1 means do use the join result optimization. Otherwise, threshold value can be 0 to maximum integer.
This flag should be set to true to enable use of native fast vector map join hash tables in
queries using MapJoin.
The default value is false.
Max number of entries in the vector group by aggregation hashtables.
Exceeding this will trigger a flush irrelevant of memory pressure condition.
For Windows OS, we need to pass HIVE_HADOOP_CLASSPATH Java parameter while starting HiveServer2
using "-hiveconf hive.hadoop.classpath=%HIVE_LIB%".
Expects one of [none, idonly, traverse, execution].
A list of comma separated values corresponding to YARN queues of the same name.
When HiveServer2 is launched in Tez mode, this configuration needs to be set
for multiple Tez sessions to run in parallel on the cluster.
A positive integer that determines the number of Tez sessions that should be
launched on each of the queues specified by "hive.server2.tez.default.queues".
Determines the parallelism on each queue.
This flag is used in HiveServer2 to enable a user to use HiveServer2 without
turning on Tez for HiveServer2. The user could potentially want to run queries
over Tez without the pool of sessions.
Expects one of [none, column].
Whether to use quoted identifier. 'none' or 'column' can be used.
none: default(past) behavior. Implies only alphaNumeric and underscore are valid characters in identifiers.
column: implies column names can contain any character.
This flag should be set to true to enable support for SQL2011 reserved keywords.
The default value is true.
Comma separated list of users who are in admin role for bootstrapping.
More users can be added in ADMIN role later.
Enable (configurable) deprecated behaviors by setting desired level of backward compatibility.
Setting to 0.12:
Maintains division behavior: int / int = double
Whether joins can be automatically converted to bucket map joins in hive
when tez is used as the execution engine.
Expects a time value with unit (d/day, h/hour, m/min, s/sec, ms/msec, us/usec, ns/nsec), which is msec if not specified.
Time to wait for another thread to localize the same resource for hive-tez.
Turn on Tez' auto reducer parallelism feature. When enabled, Hive will still estimate data sizes
and set parallelism estimates. Tez will sample source vertices' output sizes and adjust the estimates at runtime as
necessary.
When auto reducer parallelism is enabled this factor will be used to put a lower limit to the number
of reducers that tez specifies.
When dynamic pruning is enabled, joins on partition keys will be processed by sending
events from the processing vertices to the Tez application master. These events will be
used to prune unnecessary partitions.
Expects a time value with unit (d/day, h/hour, m/min, s/sec, ms/msec, us/usec, ns/nsec), which is sec if not specified.
Timeout for requests from Hive client to remote Spark driver.
Expects a time value with unit (d/day, h/hour, m/min, s/sec, ms/msec, us/usec, ns/nsec), which is sec if not specified.
Timeout for job monitor to get Spark job state.
Expects a time value with unit (d/day, h/hour, m/min, s/sec, ms/msec, us/usec, ns/nsec), which is msec if not specified.
Timeout for remote Spark driver in connecting back to Hive client.
Expects a time value with unit (d/day, h/hour, m/min, s/sec, ms/msec, us/usec, ns/nsec), which is msec if not specified.
Timeout for handshake between Hive client and remote Spark driver. Checked by both processes.
Expects value bigger than 0.
If value is greater than 0 logs in fixed intervals of size n rather than exponentially.