linux环境下的hive mysql hadoop环境搭建

软件环境

Centos6.5
vmware workstation 11
JDK1.6或者以上版本
hadoop-1.2.1
hive-0.8.1
ssh

hadoop环境搭建

  1. sshd服务安装和配置ssh免密码登陆
    一般来说Linux下默认安装了ssh服务,运行service sshd start启动ssh服务.如果没有安装的,可以使用yum install ssh来安装sshd服务.
    在ssh服务启动之后,运行ssh-keygen -t dsa -P ” -f ~/.ssh/id_dsa
    linux环境下的hive mysql hadoop环境搭建_第1张图片
    运行之后,在~/.ssh/目录下生成一个秘钥文件id_dsa.pub
    讲这个秘钥中内容拷贝到authorized_keys中.
    cat id_dsa.pub > authorized_keys
    全部运行完之后在终端运行
    ssh localhost看看有没有配置成功
    这里写图片描述
  2. 关闭Linux上iptables
    这里写图片描述

  3. jdk安装
    tar -zxvf jdk-8u31-linux-i586.gz
    mv mv jdk1.8.0_31 /usr/local/lib/jdk
    /etc/profile中追加以下几行
    export JAVA_HOME=/usr/local/lib/jdk
    export PATH=$PATH:$JAVA_HOME/bin:$JAVA_HOME/jre/bin
    export CLASSPATH=.:$JAVA_HOME/lib:$JAVA_HOME/jre/lib
    运行java -v,显示如下画面,说明Java安装成功
    linux环境下的hive mysql hadoop环境搭建_第2张图片
    *PS:linux默认安装了jdk,建议事先删除Linux上的jdk。
    rpm -qa | grep jdk | xargs rpm -e

  4. hadoop安装
    解压。
    cp hadoop-1.2.1.tag.gz /home/拷贝文件/
    tar -zxvf hadoop-1.2.1.tag.gz/解压/
    ln -s hadoop-1.2.1 hadoop/监理符号链接/
    在/etc/profile中追加下面几行
    export HADOOP_HOME=/home/hadoop
    export PATH=$PATH:$HADOOP_HOME/bin:\$HADOOP_HOME/sbin

    export CLASSPATH=$CLASSPATH:$HADOOP_HOME:$HADOOP_HOME/hadoop-core-1.2.1.jar
    cd /home/hadoop/conf

将 core-site.xml中内容修改成

<configuration>
<property>
<name>hadoop.tmp.dirname>
<value>/home/data/hadooptmpvalue>
property>
<property>
<name>fs.default.namename>
<value>hdfs://192.168.24.129:9000value>
property>
configuration>

/home/data/hadooptmp目录需要提前创建
192.168.24.129时namenode的地址

修改hadoop-env.sh

echo “export JAVA_HOME=”$JAVA_HOME >> hadoop-env.sh

修改hdfs-site.xml

<configuration>
<property>
<name>dfs.replicationname>
<value>1value>
property>
configuration>

修改master和slave

master中填入namenode的ip
slave中填入datanode的ip

启动hadoop

cd /home/hadoop/bin
./start-all.sh
linux环境下的hive mysql hadoop环境搭建_第3张图片

或者浏览器出入http://192.168.24.129:50070/
linux环境下的hive mysql hadoop环境搭建_第4张图片

Mysql搭建

•yum install mysql-server
•建立数据库hive
•create database hive
•创建hive用户,并授权
•grant all on hive.* to hive@’%’ identified by ‘hive’;
•flush privileges;

Hive搭建

tar -zxvf hive-0.8.1.tar.gz
ln -s tar -zxvf hive-0.8.1 hive
/etc/profile中追加以下几行

 export HIVE_HOME=/home/hive
 export PATH=$PATH:.:$HIVE_HOME/bin
 export CLASSPATH=$CLASSPATH:$HIVE_HOME/lib

cp mysql-connector-java-5.1.18-bin.jar ./hive/lib
cd hive/conf
cp hive-default.xml.template hive-site.xml
修改hive中-site.xml





<configuration>







<property>
  <name>mapred.reduce.tasksname>
  <value>-1value>
    <description>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.
  description>
property>

<property>
  <name>hive.exec.reducers.bytes.per.reducername>
  <value>1000000000value>
  <description>size per reducer.The default is 1G, i.e if the input size is 10G, it will use 10 reducers.description>
property>

<property>
  <name>hive.exec.reducers.maxname>
  <value>999value>
  <description>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.description>
property>

<property>
  <name>hive.cli.print.headername>
  <value>falsevalue>
  <description>Whether to print the names of the columns in query output.description>
property>

<property>
  <name>hive.cli.print.current.dbname>
  <value>falsevalue>
  <description>Whether to include the current database in the hive prompt.description>
property>

<property>
  <name>hive.exec.scratchdirname>
  <value>/tmp/hive-${user.name}value>
  <description>Scratch space for Hive jobsdescription>
property>

<property>
  <name>hive.test.modename>
  <value>falsevalue>
  <description>whether hive is running in test mode. If yes, it turns on sampling and prefixes the output tablenamedescription>
property>

<property>
  <name>hive.test.mode.prefixname>
  <value>test_value>
  <description>if hive is running in test mode, prefixes the output table by this stringdescription>
property>








<property>
  <name>hive.test.mode.samplefreqname>
  <value>32value>
  <description>if hive is running in test mode and table is not bucketed, sampling frequencydescription>
property>

<property>
  <name>hive.test.mode.nosamplelistname>
  <value>value>
  <description>if hive is running in test mode, dont sample the above comma seperated list of tablesdescription>
property>

<property>
  <name>hive.metastore.localname>
  <value>truevalue>
  <description>controls whether to connect to remove metastore server or open a new metastore server in Hive Client JVMdescription>
property>

<property>
  <name>javax.jdo.option.ConnectionURLname>
  <value>jdbc:mysql://192.168.24.129:3306/hive?createDatabaseIfNotExist=truevalue>
  <description>JDBC connect string for a JDBC metastoredescription>
property>

<property>
  <name>javax.jdo.option.ConnectionDriverNamename>
  <value>com.mysql.jdbc.Drivervalue>
  <description>Driver class name for a JDBC metastoredescription>
property>

<property>
  <name>javax.jdo.PersistenceManagerFactoryClassname>
  <value>org.datanucleus.jdo.JDOPersistenceManagerFactoryvalue>
  <description>class implementing the jdo persistencedescription>
property>

<property>
  <name>javax.jdo.option.DetachAllOnCommitname>
  <value>truevalue>
  <description>detaches all objects from session so that they can be used after transaction is committeddescription>
property>

<property>
  <name>javax.jdo.option.NonTransactionalReadname>
  <value>truevalue>
  <description>reads outside of transactionsdescription>
property>

<property>
  <name>javax.jdo.option.ConnectionUserNamename>
  <value>hivevalue>
  <description>username to use against metastore databasedescription>
property>

<property>
  <name>javax.jdo.option.ConnectionPasswordname>
  <value>hivevalue>
  <description>password to use against metastore databasedescription>
property>

<property>
  <name>javax.jdo.option.Multithreadedname>
  <value>truevalue>
  <description>Set this to true if multiple threads access metastore through JDO concurrently.description>
property>

<property>
  <name>datanucleus.connectionPoolingTypename>
  <value>DBCPvalue>
  <description>Uses a DBCP connection pool for JDBC metastoredescription>
property>

<property>
  <name>datanucleus.validateTablesname>
  <value>falsevalue>
  <description>validates existing schema against code. turn this on if you want to verify existing schema description>
property>

<property>
  <name>datanucleus.validateColumnsname>
  <value>falsevalue>
  <description>validates existing schema against code. turn this on if you want to verify existing schema description>
property>

<property>
  <name>datanucleus.validateConstraintsname>
  <value>falsevalue>
  <description>validates existing schema against code. turn this on if you want to verify existing schema description>
property>

<property>
  <name>datanucleus.storeManagerTypename>
  <value>rdbmsvalue>
  <description>metadata store typedescription>
property>

<property>
  <name>datanucleus.autoCreateSchemaname>
  <value>truevalue>
  <description>creates necessary schema on a startup if one doesn't exist. set this to false, after creating it oncedescription>
property>

<property>
  <name>datanucleus.autoStartMechanismModename>
  <value>checkedvalue>
  <description>throw exception if metadata tables are incorrectdescription>
property>

<property>
  <name>datanucleus.transactionIsolationname>
  <value>read-committedvalue>
  <description>Default transaction isolation level for identity generation. description>
property>

<property>
  <name>datanucleus.cache.level2name>
  <value>falsevalue>
  <description>Use a level 2 cache. Turn this off if metadata is changed independently of hive metastore serverdescription>
property>

<property>
  <name>datanucleus.cache.level2.typename>
  <value>SOFTvalue>
  <description>SOFT=soft reference based cache, WEAK=weak reference based cache.description>
property>

<property>
  <name>datanucleus.identifierFactoryname>
  <value>datanucleusvalue>
  <description>Name of the identifier factory to use when generating table/column names etc. 'datanucleus' is used for backward compatibilitydescription>
property>

<property>
  <name>datanucleus.plugin.pluginRegistryBundleCheckname>
  <value>LOGvalue>
  <description>Defines what happens when plugin bundles are found and are duplicated [EXCEPTION|LOG|NONE]description>
property>

<property>
  <name>hive.metastore.warehouse.dirname>
  <value>/user/hive/warehousevalue>
  <description>location of default database for the warehousedescription>
property>

<property>
  <name>hive.metastore.execute.setuginame>
  <value>falsevalue>
  <description>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.description>
property>

<property>
  <name>hive.metastore.event.listenersname>
  <value>value>
  <description>list of comma seperated listeners for metastore events.description>
property>

<property>
  <name>hive.metastore.partition.inherit.table.propertiesname>
  <value>value>
  <description>list of comma seperated keys occurring in table properties which will get inherited to newly created partitions. * implies all the keys will get inherited.description>
property>

<property>
  <name>hive.metastore.end.function.listenersname>
  <value>value>
  <description>list of comma separated listeners for the end of metastore functions.description>
property>

<property>
  <name>hive.metastore.event.expiry.durationname>
  <value>0value>
  <description>Duration after which events expire from events table (in seconds)description>
property>

<property>
  <name>hive.metastore.event.clean.freqname>
  <value>0value>
  <description>Frequency at which timer task runs to purge expired events in metastore(in seconds).description>
property>

<property>
  <name>hive.metastore.connect.retriesname>
  <value>5value>
  <description>Number of retries while opening a connection to metastoredescription>
property>

<property>
  <name>hive.metastore.client.connect.retry.delayname>
  <value>1value>
  <description>Number of seconds for the client to wait between consecutive connection attemptsdescription>
property>

<property>
  <name>hive.metastore.client.socket.timeoutname>
  <value>20value>
  <description>MetaStore Client socket timeout in secondsdescription>
property>

<property>
  <name>hive.metastore.rawstore.implname>
  <value>org.apache.hadoop.hive.metastore.ObjectStorevalue>
  <description>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, databasedescription>
property>

<property>
  <name>hive.metastore.batch.retrieve.maxname>
  <value>300value>
  <description>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.description>
property>

<property>
  <name>hive.default.fileformatname>
  <value>TextFilevalue>
  <description>Default file format for CREATE TABLE statement. Options are TextFile and SequenceFile. Users can explicitly say CREATE TABLE ... STORED AS <TEXTFILE|SEQUENCEFILE> to overridedescription>
property>

<property>
  <name>hive.fileformat.checkname>
  <value>truevalue>
  <description>Whether to check file format or not when loading data filesdescription>
property>


<property> 
   <name>datanucleus.autoCreateSchema name> 
   <value>false value> 
property> 

<property> 
   <name>datanucleus.fixedDatastore name> 
   <value>true value> 
property> 

<property>
  <name>hive.map.aggrname>
  <value>truevalue>
  <description>Whether to use map-side aggregation in Hive Group By queriesdescription>
property>

<property>
  <name>hive.groupby.skewindataname>
  <value>falsevalue>
  <description>Whether there is skew in data to optimize group by queriesdescription>
property>

<property>
  <name>hive.groupby.mapaggr.checkintervalname>
  <value>100000value>
  <description>Number of rows after which size of the grouping keys/aggregation classes is performeddescription>
property>

<property>
  <name>hive.mapred.local.memname>
  <value>0value>
  <description>For local mode, memory of the mappers/reducersdescription>
property>

<property>
  <name>hive.mapjoin.followby.map.aggr.hash.percentmemoryname>
  <value>0.3value>
  <description>Portion of total memory to be used by map-side grup aggregation hash table, when this group by is followed by map joindescription>
property>

<property>
  <name>hive.map.aggr.hash.force.flush.memory.thresholdname>
  <value>0.9value>
  <description>The max memory to be used by map-side grup aggregation hash table, if the memory usage is higher than this number, force to flush datadescription>
property>

<property>
  <name>hive.map.aggr.hash.percentmemoryname>
  <value>0.5value>
  <description>Portion of total memory to be used by map-side grup aggregation hash tabledescription>
property>

<property>
  <name>hive.map.aggr.hash.min.reductionname>
  <value>0.5value>
  <description>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.description>
property>

<property>
  <name>hive.optimize.cpname>
  <value>truevalue>
  <description>Whether to enable column prunerdescription>
property>

<property>
  <name>hive.optimize.index.filtername>
  <value>falsevalue>
  <description>Whether to enable automatic use of indexesdescription>
property>

<property>
  <name>hive.optimize.index.groupbyname>
  <value>falsevalue>
  <description>Whether to enable optimization of group-by queries using Aggregate indexes.description>
property>

<property>
  <name>hive.optimize.ppdname>
  <value>truevalue>
  <description>Whether to enable predicate pushdowndescription>
property>

<property>
  <name>hive.optimize.ppd.storagename>
  <value>truevalue>
  <description>Whether to push predicates down into storage handlers.  Ignored when hive.optimize.ppd is false.description>
property>

<property>
  <name>hive.ppd.recognizetransivityname>
  <value>truevalue>
  <description>Whether to transitively replicate predicate filters over equijoin conditions.description>
property>

<property>
  <name>hive.optimize.groupbyname>
  <value>truevalue>
  <description>Whether to enable the bucketed group by from bucketed partitions/tables.description>
property>

<property>
  <name>hive.multigroupby.singlemrname>
  <value>falsevalue>
  <description>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.description>
property>
<property>
  <name>hive.join.emit.intervalname>
  <value>1000value>
  <description>How many rows in the right-most join operand Hive should buffer before emitting the join result. description>
property>

<property>
  <name>hive.join.cache.sizename>
  <value>25000value>
  <description>How many rows in the joining tables (except the streaming table) should be cached in memory. description>
property>

<property>
  <name>hive.mapjoin.bucket.cache.sizename>
  <value>100value>
  <description>How many values in each keys in the map-joined table should be cached in memory. description>
property>

<property>
  <name>hive.mapjoin.cache.numrowsname>
  <value>25000value>
  <description>How many rows should be cached by jdbm for map join. description>
property>

<property>
  <name>hive.optimize.skewjoinname>
  <value>falsevalue>
  <description>Whether to enable skew join optimization. description>
property>

<property>
  <name>hive.skewjoin.keyname>
  <value>100000value>
  <description>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. description>
property>

<property>
  <name>hive.skewjoin.mapjoin.map.tasksname>
  <value>10000value>
  <description> 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.description>
property>

<property>
  <name>hive.skewjoin.mapjoin.min.splitname>
  <value>33554432value>
  <description> 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.description>
property>

<property>
  <name>hive.mapred.modename>
  <value>nonstrictvalue>
  <description>The mode in which the hive operations are being performed. In strict mode, some risky queries are not allowed to rundescription>
property>

<property>
  <name>hive.exec.script.maxerrsizename>
  <value>100000value>
  <description>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 description>
property>

<property>
  <name>hive.exec.script.allow.partial.consumptionname>
  <value>falsevalue>
  <description> When enabled, this option allows a user script to exit successfully without consuming all the data from the standard input.
  description>
property>

<property>
  <name>hive.script.operator.id.env.varname>
  <value>HIVE_SCRIPT_OPERATOR_IDvalue>
  <description> 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)
  description>
property>

<property>
  <name>hive.exec.compress.outputname>
  <value>falsevalue>
  <description> 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* description>
property>

<property>
  <name>hive.exec.compress.intermediatename>
  <value>falsevalue>
  <description> 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* description>
property>

<property>
  <name>hive.exec.parallelname>
  <value>falsevalue>
  <description>Whether to execute jobs in paralleldescription>
property>

<property>
  <name>hive.exec.parallel.thread.numbername>
  <value>8value>
  <description>How many jobs at most can be executed in paralleldescription>
property>

<property>
  <name>hive.exec.rowoffsetname>
  <value>falsevalue>
  <description>Whether to provide the row offset virtual columndescription>
property>

<property>
  <name>hive.task.progressname>
  <value>falsevalue>
  <description>Whether Hive should periodically update task progress counters during execution.  Enabling this allows task progress to be monitored more closely in the job tracker, but may impose a performance penalty.  This flag is automatically set to true for jobs with hive.exec.dynamic.partition set to true.description>
property>

<property>
  <name>hive.hwi.war.filename>
  <value>lib/hive-hwi-0.8.1.warvalue>
  <description>This sets the path to the HWI war file, relative to ${HIVE_HOME}. description>
property>

<property>
  <name>hive.hwi.listen.hostname>
  <value>0.0.0.0value>
  <description>This is the host address the Hive Web Interface will listen ondescription>
property>

<property>
  <name>hive.hwi.listen.portname>
  <value>9999value>
  <description>This is the port the Hive Web Interface will listen ondescription>
property>

<property>
  <name>hive.exec.pre.hooksname>
  <value>value>
  <description>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.description>
property>

<property>
  <name>hive.exec.post.hooksname>
  <value>value>
  <description>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.description>
property>

<property>
  <name>hive.exec.failure.hooksname>
  <value>value>
  <description>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.description>
property>

<property>
  <name>hive.client.stats.publishersname>
  <value>value>
  <description>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.description>
property>

<property>
  <name>hive.client.stats.countersname>
  <value>value>
  <description>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 useddescription>
property>

<property> 
   <name>hive.hwi.listen.portname> 
   <value>9999value> 
   <description>This is the port the Hive Web Interface will listen on description> 
property>

<property>
  <name>hive.merge.mapfilesname>
  <value>truevalue>
  <description>Merge small files at the end of a map-only jobdescription>
property>

<property>
  <name>hive.merge.mapredfilesname>
  <value>falsevalue>
  <description>Merge small files at the end of a map-reduce jobdescription>
property>

<property>
  <name>hive.mergejob.maponlyname>
  <value>truevalue>
  <description>Try to generate a map-only job for merging files if CombineHiveInputFormat is supported.description>
property>

<property>
  <name>hive.heartbeat.intervalname>
  <value>1000value>
  <description>Send a heartbeat after this interval - used by mapjoin and filter operatorsdescription>
property>

<property>
  <name>hive.merge.size.per.taskname>
  <value>256000000value>
  <description>Size of merged files at the end of the jobdescription>
property>

<property>
  <name>hive.merge.smallfiles.avgsizename>
  <value>16000000value>
  <description>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.description>
property>

<property>
  <name>hive.mapjoin.smalltable.filesizename>
  <value>25000000value>
  <description>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 joindescription>
property>

<property>
  <name>hive.mapjoin.localtask.max.memory.usagename>
  <value>0.90value>
  <description>This number means how much memory the local task can take to hold the key/value into in-memory hash table; If the local task's memory usage is more than this number, the local task will be abort by themself. It means the data of small table is too large to be hold in the memory.description>
property>

<property>
  <name>hive.mapjoin.followby.gby.localtask.max.memory.usagename>
  <value>0.55value>
  <description>This number means how much memory the local task can take to hold the key/value into in-memory hash table when this map join followed by a group by; If the local task's memory usage is more than this number, the local task will be abort by themself. It means the data of small table is too large to be hold in the memory.description>
property>

<property>
  <name>hive.mapjoin.check.memory.rowsname>
  <value>100000value>
  <description>The number means after how many rows processed it needs to check the memory usagedescription>
property>

<property>
  <name>hive.auto.convert.joinname>
  <value>falsevalue>
  <description>Whether Hive enable the optimization about converting common join into mapjoin based on the input file sizedescription>
property>


<property>
  <name>hive.script.auto.progressname>
  <value>falsevalue>
  <description>Whether Hive Tranform/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.  description>
property>

<property>
  <name>hive.script.serdename>
  <value>org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDevalue>
  <description>The default serde for trasmitting input data to and reading output data from the user scripts. description>
property>

<property>
  <name>hive.script.recordreadername>
  <value>org.apache.hadoop.hive.ql.exec.TextRecordReadervalue>
  <description>The default record reader for reading data from the user scripts. description>
property>

<property>
  <name>hive.script.recordwritername>
  <value>org.apache.hadoop.hive.ql.exec.TextRecordWritervalue>
  <description>The default record writer for writing data to the user scripts. description>
property>

<property>
  <name>hive.input.formatname>
  <value>org.apache.hadoop.hive.ql.io.CombineHiveInputFormatvalue>
  <description>The default input format. Set this to HiveInputFormat if you encounter problems with CombineHiveInputFormat.description>
property>

<property>
  <name>hive.udtf.auto.progressname>
  <value>falsevalue>
  <description>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 infinte loops.  description>
property>

<property>
  <name>hive.mapred.reduce.tasks.speculative.executionname>
  <value>truevalue>
  <description>Whether speculative execution for reducers should be turned on. description>
property>

<property>
  <name>hive.exec.counters.pull.intervalname>
  <value>1000value>
  <description>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.description>
property>

<property>
  <name>hive.enforce.bucketingname>
  <value>falsevalue>
  <description>Whether bucketing is enforced. If true, while inserting into the table, bucketing is enforced. description>
property>

<property>
  <name>hive.enforce.sortingname>
  <value>falsevalue>
  <description>Whether sorting is enforced. If true, while inserting into the table, sorting is enforced. description>
property>

<property>
  <name>hive.metastore.ds.connection.url.hookname>
  <value>value>
  <description>Name of the hook to use for retriving the JDO connection URL. If empty, the value in javax.jdo.option.ConnectionURL is used description>
property>

<property>
  <name>hive.metastore.ds.retry.attemptsname>
  <value>1value>
  <description>The number of times to retry a metastore call if there were a connection errordescription>
property>

<property>
   <name>hive.metastore.ds.retry.intervalname>
   <value>1000value>
   <description>The number of miliseconds between metastore retry attemptsdescription>
property>

<property>
  <name>hive.metastore.server.min.threadsname>
  <value>200value>
  <description>Minimum number of worker threads in the Thrift server's pool.description>
property>

<property>
  <name>hive.metastore.server.max.threadsname>
  <value>100000value>
  <description>Maximum number of worker threads in the Thrift server's pool.description>
property>

<property>
  <name>hive.metastore.server.tcp.keepalivename>
  <value>truevalue>
  <description>Whether to enable TCP keepalive for the metastore server. Keepalive will prevent accumulation of half-open connections.description>
property>

<property>
  <name>hive.metastore.sasl.enabledname>
  <value>falsevalue>
  <description>If true, the metastore thrift interface will be secured with SASL. Clients must authenticate with Kerberos.description>
property>

<property>
  <name>hive.metastore.kerberos.keytab.filename>
  <value>value>
  <description>The path to the Kerberos Keytab file containing the metastore thrift server's service principal.description>
property>

<property>
  <name>hive.metastore.kerberos.principalname>
  <value>hive-metastore/[email protected]value>
  <description>The service principal for the metastore thrift server. The special string _HOST will be replaced automatically with the correct host name.description>
property>

<property>
  <name>hive.metastore.cache.pinobjtypesname>
  <value>Table,StorageDescriptor,SerDeInfo,Partition,Database,Type,FieldSchema,Ordervalue>
  <description>List of comma separated metastore object types that should be pinned in the cachedescription>
property>

<property>
  <name>hive.optimize.reducededuplicationname>
  <value>truevalue>
  <description>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.description>
property>

<property>
  <name>hive.exec.dynamic.partitionname>
  <value>falsevalue>
  <description>Whether or not to allow dynamic partitions in DML/DDL.description>
property>

<property>
  <name>hive.exec.dynamic.partition.modename>
  <value>strictvalue>
  <description>In strict mode, the user must specify at least one static partition in case the user accidentally overwrites all partitions.description>
property>

<property>
  <name>hive.exec.max.dynamic.partitionsname>
  <value>1000value>
  <description>Maximum number of dynamic partitions allowed to be created in total.description>
property>

<property>
  <name>hive.exec.max.dynamic.partitions.pernodename>
  <value>100value>
  <description>Maximum number of dynamic partitions allowed to be created in each mapper/reducer node.description>
property>

<property>
  <name>hive.exec.max.created.filesname>
  <value>100000value>
  <description>Maximum number of HDFS files created by all mappers/reducers in a MapReduce job.description>
property>

<property>
  <name>hive.exec.default.partition.namename>
  <value>__HIVE_DEFAULT_PARTITION__value>
  <description>The default partition name in case the dynamic partition column value is null/empty string or anyother 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.description>
property>

<property>
  <name>hive.stats.dbclassname>
  <value>jdbc:derbyvalue>
  <description>The default database that stores temporary hive statistics.description>
property>

<property>
  <name>hive.stats.autogathername>
  <value>truevalue>
  <description>A flag to gather statistics automatically during the INSERT OVERWRITE command.description>
property>

<property>
  <name>hive.stats.jdbcdrivername>
  <value>org.apache.derby.jdbc.EmbeddedDrivervalue>
  <description>The JDBC driver for the database that stores temporary hive statistics.description>
property>

<property>
  <name>hive.stats.dbconnectionstringname>
  <value>jdbc:derby:;databaseName=TempStatsStore;create=truevalue>
  <description>The default connection string for the database that stores temporary hive statistics.description>
property>

<property>
  <name>hive.stats.default.publishername>
  <value>value>
  <description>The Java class (implementing the StatsPublisher interface) that is used by default if hive.stats.dbclass is not JDBC or HBase.description>
property>

<property>
  <name>hive.stats.default.aggregatorname>
  <value>value>
  <description>The Java class (implementing the StatsAggregator interface) that is used by default if hive.stats.dbclass is not JDBC or HBase.description>
property>

<property>
  <name>hive.stats.jdbc.timeoutname>
  <value>30value>
  <description>Timeout value (number of seconds) used by JDBC connection and statements.description>
property>

<property>
  <name>hive.stats.retries.maxname>
  <value>0value>
  <description>Maximum number of retries when stats publisher/aggregator got an exception updating intermediate database. Default is no tries on failures.description>
property>

<property>
  <name>hive.stats.retries.waitname>
  <value>3000value>
  <description>The base waiting window (in milliseconds) before the next retry. The actual wait time is calculated by baseWindow * failues + baseWindow * (failure + 1) * (random number between [0.0,1.0]).description>
property>

<property>
  <name>hive.support.concurrencyname>
  <value>falsevalue>
  <description>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.description>
property>

<property>
  <name>hive.lock.numretriesname>
  <value>100value>
  <description>The number of times you want to try to get all the locksdescription>
property>

<property>
  <name>hive.unlock.numretriesname>
  <value>10value>
  <description>The number of times you want to retry to do one unlockdescription>
property>

<property>
  <name>hive.lock.sleep.between.retriesname>
  <value>60value>
  <description>The sleep time (in seconds) between various retriesdescription>
property>

<property>
  <name>hive.zookeeper.quorumname>
  <value>value>
  <description>The list of zookeeper servers to talk to. This is only needed for read/write locks.description>
property>

<property>
  <name>hive.zookeeper.client.portname>
  <value>2181value>
  <description>The port of zookeeper servers to talk to. This is only needed for read/write locks.description>
property>

<property>
  <name>hive.zookeeper.session.timeoutname>
  <value>600000value>
  <description>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.description>
property>

<property>
  <name>hive.zookeeper.namespacename>
  <value>hive_zookeeper_namespacevalue>
  <description>The parent node under which all zookeeper nodes are created.description>
property>

<property>
  <name>hive.zookeeper.clean.extra.nodesname>
  <value>falsevalue>
  <description>Clean extra nodes at the end of the session.description>
property>

<property>
  <name>fs.har.implname>
  <value>org.apache.hadoop.hive.shims.HiveHarFileSystemvalue>
  <description>The implementation for accessing Hadoop Archives. Note that this won't be applicable to Hadoop vers less than 0.20description>
property>

<property>
  <name>hive.archive.enabledname>
  <value>falsevalue>
  <description>Whether archiving operations are permitteddescription>
property>

<property>
  <name>hive.archive.har.parentdir.settablename>
  <value>falsevalue>
  <description>In new Hadoop versions, the parent directory must be set while
  creating a HAR. Because this functionality is hard to detect with just version
  numbers, this conf var needs to be set manually.description>
property>

<property>
  <name>hive.fetch.output.serdename>
  <value>org.apache.hadoop.hive.serde2.DelimitedJSONSerDevalue>
  <description>The serde used by FetchTask to serialize the fetch output.description>
property>

<property>
  <name>hive.exec.mode.local.autoname>
  <value>falsevalue>
  <description> Let hive determine whether to run in local mode automatically description>
property>

<property>
  <name>hive.exec.drop.ignorenonexistentname>
  <value>truevalue>
  <description>
    Do not report an error if DROP TABLE/VIEW specifies a non-existent table/view
  description>
property>

<property>
  <name>hive.exec.show.job.failure.debug.infoname>
  <value>truevalue>
  <description>
    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.
  description>
property>

<property>
  <name>hive.auto.progress.timeoutname>
  <value>0value>
  <description>
    How long to run autoprogressor for the script/UDTF operators (in seconds).
    Set to 0 for forever.
  description>
property>



<property>
  <name>hive.hbase.wal.enabledname>
  <value>truevalue>
  <description>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.description>
property>

<property>
  <name>hive.table.parameters.defaultname>
  <value>value>
  <description>Default property values for newly created tablesdescription>
property>

<property>
  <name>hive.variable.substitutename>
  <value>truevalue>
  <description>This enables substitution using syntax like ${var} ${system:var} and ${env:var}.description>
property>


<property>
  <name>hive.security.authorization.enabledname>
  <value>falsevalue>
  <description>enable or disable the hive client authorizationdescription>
property>

<property>
  <name>hive.security.authorization.managername>
  <value>org.apache.hadoop.hive.ql.security.authorization.DefaultHiveAuthorizationProvidervalue>
  <description>the hive client authorization manager class name.
  The user defined authorization class should implement interface org.apache.hadoop.hive.ql.security.authorization.HiveAuthorizationProvider. 
  description>
property>

<property>
  <name>hive.security.authenticator.managername>
  <value>org.apache.hadoop.hive.ql.security.HadoopDefaultAuthenticatorvalue>
  <description>hive client authenticator manager class name. 
  The user defined authenticator should implement interface org.apache.hadoop.hive.ql.security.HiveAuthenticationProvider.description>
property>

<property>
  <name>hive.security.authorization.createtable.user.grantsname>
  <value>value>
  <description>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.description>
property>

<property>
  <name>hive.security.authorization.createtable.group.grantsname>
  <value>value>
  <description>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.description>
property>

<property>
  <name>hive.security.authorization.createtable.role.grantsname>
  <value>value>
  <description>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.description>
property>

<property>
  <name>hive.security.authorization.createtable.owner.grantsname>
  <value>value>
  <description>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 tabledescription>
property>

<property>
  <name>hive.metastore.authorization.storage.checksname>
  <value>falsevalue>
  <description>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).description>
property>

<property>
  <name>hive.error.on.empty.partitionname>
  <value>falsevalue>
  <description>Whether to throw an excpetion if dynamic partition insert generates empty results.description>
property>

<property>
  <name>hive.index.compact.file.ignore.hdfsname>
  <value>falsevalue>
  <description>True the hdfs location stored in the index file will be igbored at runtime. 
  If the data got moved or the name of the cluster got changed, the index data should still be usable.description>
property>

<property>
  <name>hive.optimize.index.filter.compact.minsizename>
  <value>5368709120value>
  <description>Minimum size (in bytes) of the inputs on which a compact index is automatically used.description>
property>

<property>
  <name>hive.optimize.index.filter.compact.maxsizename>
  <value>-1value>
  <description>Maximum size (in bytes) of the inputs on which a compact index is automatically used.
  A negative number is equivalent to infinity.description>
property>

<property>
  <name>hive.index.compact.query.max.sizename>
  <value>10737418240value>
  <description>The maximum number of bytes that a query using the compact index can read. Negative value is equivalent to infinity.description>
property>

<property>
  <name>hive.index.compact.query.max.entriesname>
  <value>10000000value>
  <description>The maximum number of index entries to read during a query that uses the compact index. Negative value is equivalent to infinity.description>
property>

<property>
  <name>hive.index.compact.binary.searchname>
  <value>truevalue>
  <description>Whether or not to use a binary search to find the entries in an index table that match the filter, where possibledescription>
property>

<property>
  <name>hive.exim.uri.scheme.whitelistname>
  <value>hdfs,pfilevalue>
  <description>A comma separated list of acceptable URI schemes for import and export.description>
property>

<property>
  <name>hive.lock.mapred.only.operationname>
  <value>falsevalue>
  <description>This param is to control whether or not only do lock on queries 
  that need to execute at least one mapred job.description>
property>

<property>
  <name>hive.limit.row.max.sizename>
  <value>100000value>
  <description>When trying a smaller subset of data for simple LIMIT, how much size we need to guarantee
   each row to have at least.description>
property>

<property>
  <name>hive.limit.optimize.limit.filename>
  <value>10value>
  <description>When trying a smaller subset of data for simple LIMIT, maximum number of files we can
   sample.description>
property>

<property>
  <name>hive.limit.optimize.enablename>
  <value>falsevalue>
  <description>Whether to enable to optimization to trying a smaller subset of data for simple LIMIT first.description>
property>

<property>
  <name>hive.limit.optimize.fetch.maxname>
  <value>50000value>
  <description>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.description>
property>

<property>
  <name>hive.rework.mapredworkname>
  <value>falsevalue>
  <description>should rework the mapred work or not. 
  This is first introduced by SymlinkTextInputFormat to replace symlink files with real paths at compile time.description>
property>

<property>
  <name>hive.exec.concatenate.check.indexname>
  <value>truevalue>
  <description>If this sets 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.description>
property>

<property>
  <name>hive.sample.seednumbername>
  <value>0value>
  <description>A number used to percentage sampling. By changing this number, user will change the subsets
   of data sampled.description>
property>

<property>
    <name>hive.io.exception.handlersname>
    <value>value>
    <description>A list of io exception handler class names. This is used
        to construct a list exception handlers to handle exceptions thrown 
        by record readersdescription>
property>

<property>
  <name>hive.autogen.columnalias.prefix.labelname>
  <value>_cvalue>
  <description>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.description>
property>

<property>
  <name>hive.autogen.columnalias.prefix.includefuncnamename>
  <value>falsevalue>
  <description>Whether to include function name in the column alias auto generated by hive.description>
property>

<property>
  <name>hive.exec.perf.loggername>
  <value>org.apache.hadoop.hive.ql.log.PerfLoggervalue>
  <description>The class responsible logging client side performance metrics.  Must be a subclass of org.apache.hadoop.hive.ql.log.PerfLoggerdescription>
property>

<property>
  <name>hive.start.cleanup.scratchdirname>
  <value>falsevalue>
  <description>To cleanup the hive scratchdir while starting the hive serverdescription>
property>

<property>
  <name>hive.output.file.extensionname>
  <value>value>
  <description>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.description>
property>

<property>
  <name>hive.insert.into.multilevel.dirsname>
  <value>falsevalue>
  <description>Where to insert into multilevel directories like 
  "insert directory '/HIVEFT25686/chinna/' from table"description>
property>

configuration>

cp hive-site.xml $HADOOP_HOME/conf
命令行运行./hive –service hwi
linux环境下的hive mysql hadoop环境搭建_第5张图片
这样就可以通过IE行访问hive了
linux环境下的hive mysql hadoop环境搭建_第6张图片

完事了,洗澡睡觉了

你可能感兴趣的:(互联网)