FreeBSD下安装配置Hadoop集群(Hive)(3)

接下来是Oracle当metastore的配置


<property>
    <name>Javax.jdo.option.ConnectionURL</name>
    <value>jdbc:oracle:thin:@127.0.0.1:1521:hive</value>
<!--OCI8连接方式未验证-->
    <description></description>
</property>

<property>
    <name>javax.jdo.option.ConnectionDriverName</name>
    <value>oracle.jdbc.driver.OracleDriver</value>        
    <description>Driver class name for a JDBC metastore</description>
</property>

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

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



还有就是比较另类的SQL Server当metastore。


<property>
        <name>javax.jdo.option.ConnectionURL</name>
        <value>jdbc:sqlserver://10.8.0.205:1433; DatabaseName=hive</value>
        <description></description>
</property>

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

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

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


然后赘述一句,hive只要你保存了metastore,就可以正常的使用hive-cli,但是,如果你需要远程其他程序连接hive,就需要启动hiveserver模式,hiveserver其实是启动了一个hive的Thrift server。这是我认为hive跟传统型数据库差异比较大的一点。事实上,严格的说,hive并不能算是一个数据库,他只是一个语言转换器,把sql语言翻译成map/reduce的方式,所以他不需要具备常规数据库所必需的C/S模式。


另外,启动hive不需要Hadoop进程的支持,但是需要hadoop的文件,也就是说,你只要把hadoop的文件丢在那里能正常连接hdfs就可以了,然后为hive指定HADOOP_HOME就可以使用了,不需要启动任何hadoop的进程。

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:http://www.heiqu.com/642d54ea3114481512f4f4051a860438.html