昆仑山:眼中无形心中有穴之穴人合一

夫君子之行,静以修身,俭以养德;非澹泊无以明志,非宁静无以致远。夫学须静也,才须学也;非学无以广才,非志无以成学。怠慢则不能励精,险躁则不能冶性。年与时驰,意与岁去,遂成枯落,多不接世。悲守穷庐,将复何及!

 

大数据系列:hive配置

配置hive一定要有hadoop 环境

在hive-site.xml中 修改如下配置



<property>
    <name>javax.jdo.option.ConnectionURL</name>
    <value>jdbc:mysql://192.168.41.143:3306/hive?createDatabaseIfNotExist=true</value>
    <description>JDBC connect string for a JDBC metastore</description>
</property>



<property>
    <name>javax.jdo.option.ConnectionDriverName</name>
    <value>com.mysql.cj.jdbc.Driver</value>
    <description>Driver class name for a JDBC metastore</description>
</property>



  <property>
    <name>javax.jdo.option.ConnectionUserName</name>
    <value>root</value>
    <description>Username to use against metastore database</description>
  </property>


  <property>
    <name>javax.jdo.option.ConnectionPassword</name>
    <value>123456</value>
    <description>password to use against metastore database</description>
  </property>



  <property>
    <name>hive.querylog.location</name>
    <value>/usr/local/handle_hive/apache-hive/tmp</value>
    <description>Location of Hive run time structured log file</description>
  </property>



<property>
    <name>hive.exec.local.scratchdir</name>
    <value>/usr/local/handle_hive/apache-hive/tmp</value>
    <description>Local scratch space for Hive jobs</description>
  </property>





<property>
    <name>hive.downloaded.resources.dir</name>
    <value>/usr/local/handle_hive/apache-hive/tmp</value>
    <description>Temporary local directory for added resources in the remote file system.</description>
  </property>




数据库拷贝



拷贝mysql驱动到/usr/local/soft/hive-1.2.1/lib目录下
			 cp /usr/local/soft/mysql-connector-java-5.1.17.jar ../lib/



将hadoop的/hadoop/share/hadoop/yarn/lib /jline-0.9.94.jar的jar替换成hive的版本。
hive的 jline-2.12.jar 位置在 /usr/local/soft/hive-1.2.1/lib/jline-2.12.jar

将Hadoop的删除
rm -rf   /usr/local/soft/hadoop-2.6.0/share/hadoop/yarn/lib/jline-0.9.94.jar
然后将hive的jar拷过去hadoop下:

命令:
cp
 /usr/local/soft/hive-1.2.1/lib/jline-2.12.jar /usr/local/soft/hadoop-2.6.0/share/hadoop/yarn/lib/


初始化

/usr/local/handle_sample/apache-hive/bin
[root@master bin]# schematool -dbType mysql -initSchema

启动

启动Hive

./hive

或者
./hive -hiveconf hive.root.logger=DEBUG,console

posted on 2019-07-15 16:36  Indian_Mysore  阅读(128)  评论(0编辑  收藏  举报

导航