zoukankan      html  css  js  c++  java
  • Hive 3、Hive 的安装配置(本地derby模式)

    这种方式是最简单的存储方式,只需要在hive-site.xml做如下配置便可;

    $  vim hive-site.xml
    

      

    <configuration>  
    <property>  
      <name>javax.jdo.option.ConnectionURL</name>  
      <value>jdbc:derby:;databaseName=metastore_db;create=true</value>  
    </property> 
     
    <property>  
      <name>javax.jdo.option.ConnectionDriverName</name>  
      <value>org.apache.derby.jdbc.EmbeddedDriver</value>  
    </property> 
     
    <property>  
      <name>hive.metastore.local</name>  
      <value>true</value>  
    </property>  
    
    <property>  
      <name>hive.metastore.warehouse.dir</name>  
      <value>/user/hive/warehouse</value>  
    </property>  
       
    </configuration>
    

      

    注:使用derby存储方式时,运行hive会在当前目录生成一个derby文件和一个metastore_db目录。这种存储方式的弊端是在同一个目录下同时只能有一个hive客户端能使用数据库,否则会提示如下错误:
    
     
    

      

    hive> show tables;  
    FAILED: Error in metadata: javax.jdo.JDOFatalDataStoreException: Failed to start database 'metastore_db', see the next exception for details.  
    NestedThrowables:  
    java.sql.SQLException: Failed to start database 'metastore_db', see the next exception for details.  
    FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask  
    hive> show tables;
    FAILED: Error in metadata: javax.jdo.JDOFatalDataStoreException: Failed to start database 'metastore_db', see the next exception for details.
    NestedThrowables:
    java.sql.SQLException: Failed to start database 'metastore_db', see the next exception for details.
    FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask
    

      

  • 相关阅读:
    java.lang.NoClassDefFoundError: sun/swing/plaf/synth/SynthIcon
    微信数据库解密--代码报错:未定义标识符 HMAC_CTX_init
    Windows家庭版组策略编辑
    Visual Studio x64 使用 .asm 文件
    某数据库管理软件离线注册分析
    EV剪辑分析
    ciscn_lonelywolf
    arm-pwn
    libc-2.32.so在orw上与其他版本的区别
    更新libc
  • 原文地址:https://www.cnblogs.com/tesla-turing/p/11509245.html
Copyright © 2011-2022 走看看