rhive.connect错误 - 文件:///rhive/lib/2.0-0.0/rhive_udf.jar不存在

时间:2014-07-04 05:03:00

标签: r

使用rhive软件包将R与Hive连接时,我遇到了错误。该软件包安装完美,但在使用rhive.connect时返回错误。请注意以下事项:

  1. Rserve作为守护程序运行
  2. R和Hive安装在不同的服务器上,但在同一个群集中
  3. RHive是使用git从源代码构建的。版本是2.0-0.0
  4. 我正在连接到在端口10000上运行的hiveserver
  5. 错误消息显示" file:///rhive/lib/2.0-0.0/rhive_udf.jar不存在"虽然文件在那里(在linux目录中),整个目录和文件都有完全权限。
  6. 以下是错误的快照:

    library(RHive)
    
    Loading required package: rJava
    
    Loading required package: Rserve
    
    rhive.env()
    
    hadoop home: /opt/cloudera/parcels/CDH-5.0.2-1.cdh5.0.2.p0.13/lib/hadoop
    hive home: /opt/cloudera/parcels/CDH-5.0.2-1.cdh5.0.2.p0.13/lib/hive
    
    rhive.connect("10.0.192.108")
    
    14/07/04 00:45:51 INFO Configuration.deprecation: fs.default.name is deprecated. Instead, use fs.defaultFS
    SLF4J: Class path contains multiple SLF4J bindings.
    SLF4J: Found binding in [jar:file:/opt/cloudera/parcels/CDH-5.0.2-1.cdh5.0.2.p0.13/lib/hadoop/client-0.20/slf4j-log4j12.jar!/org/slf4j/impl/StaticLoggerBinder.class]
    SLF4J: Found binding in [jar:file:/opt/cloudera/parcels/CDH-5.0.2-1.cdh5.0.2.p0.13/lib/hadoop/client/slf4j-log4j12.jar!/org/slf4j/impl/StaticLoggerBinder.class]
    SLF4J: Found binding in [jar:file:/opt/cloudera/parcels/CDH-5.0.2-1.cdh5.0.2.p0.13/lib/hadoop/lib/slf4j-log4j12.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.slf4j.impl.Log4jLoggerFactory]
    14/07/04 00:45:52 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
    
    Warning:
            +----------------------------------------------------------+
            + / hiveServer2 argument has not been provided correctly.  +
            + / RHive will use a default value: hiveServer2=TRUE.      +
            +----------------------------------------------------------+
    
    Error: java.sql.SQLException: Error while processing statement: file:///rhive/lib/2.0-0.0/rhive_udf.jar does not exist.
    

    有人可以帮忙吗?谢谢。

1 个答案:

答案 0 :(得分:0)

您需要指定defaultFS参数。如果不提供defaultFS参数,RHive会尝试写入文件系统而不是HDFS。

rhive.connect("10.0.192.108", defaultFS="hdfs://10.0.192.108:8020")