Rhadoop的安装

5 篇文章 0 订阅

说明

环境说明

操作系统:centos7.2
hadoop环境使用的是2.7.2
java使用的是1.8

安装Rhadoop的准备环境

必要的包

install.packages("rJava")
install.packages("reshape2")
install.packages("Rcpp")
install.packages("iterators")
install.packages("itertools")
install.packages("digest")
install.packages("RJSONIO")
install.packages("functional")
install.packages("caTools")

环境变量的设置

HADOOP_CMD环境变量的设置(易错):
要把hadoop的bin下的hadoop赋给HADOOP_CMD

HADOOP_CMD=/opt/hadoop-2.7.2/bin/hadoop

HADOOP_STREAMING环境变量的设置(rmr需要):

export  HADOOP_STREAMING=/opt/hadoop-2.7.2/share/hadoop/tools/lib/hadoop-streaming-2.7.2.jar

安装Rhadoop

rhdfs的安装(只需要在user-client上安装即可)

R CMD INSTALL rhdfs_1.0.8.tar.gz

rmr2的安装(每个节点都需要安装)

R CMD INSTALL rmr2_3.3.1.tar.gz

测试

rhdfs

>library("rhdfs")
> hdfs.init()
16/08/01 15:55:35 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
> hdfs.ls("/")
  permission         owner      group size          modtime     file
1 drwxr-xr-x          root supergroup    0 2016-07-31 14:53 /library
2 drwxr-xr-x Administrator supergroup    0 2016-07-31 16:37    /user

rmr2

Rhadoop中各个包在集群中的安装情况

PackageWhere to Install
plyrmrOn every node in the cluster
ravroOnly on the node that runs the R client
rhbaseOnly on the node that runs the R client
rhdfsOnly on the node that runs the R client
rmr2On every node in the cluster

补充

官方github上的文档可以参考以下,对于重要的地方我个人认为还是提示的不错

相关类型的文章

张丹(统计之都)
sparkexpert
sparkexpert

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Unlike other books about R, written from the perspective of statistics, R for Programmers: Mastering the Tools is written from the perspective of programmers, providing a channel for programmers with expertise in other programming languages to quickly understand R. The contents are divided into four sections: The first section consists of the basics of R, which explains the advantages of using R, the installation of different versions of R, and the 12 frequently used packages of R. This will help you understand the tool packages, time series packages, and performance monitoring packages of R quickly. The second section discusses the server of R, which examines the communication between R and other programming languages and the application of R as servers. This will help you integrate R with other programming languages and implement the server application of R. The third section discusses databases and big data, which covers the communication between R and various databases, as well as R’s integration with Hadoop. This will help you integrate R with the underlying level of other databases and implement the processing of big data by R, based on Hadoop. The fourth section comprises the appendices, which introduce the installation of Java, various databases, and Hadoop. Because this is a reference book, there is no special sequence for reading all the chapters. You can choose the chapters in which you have an interest. If you are new to R, and you wish to master R comprehensively, simply follow the chapters in sequence. Table of Contents Chapter 1: Basic R Packages Chapter 2: Basic Packages of Time Series Chapter 3: Performance Monitoring Packages of R Chapter 4: Cross-Platform Communication of R Chapter 5: Server Implementation of R Chapter 6: Database and NoSQL Chapter 7: RHadoop Appendix A: Installation of Java Environment Appendix B: Installation of MySQL Appendix C: Installation of Redis Appendix D: Installation of MongoDB Appendix E: Installation of Cassandra Appendix F: Installation of Hadoop Appendix G: Installation of the Hive Environment Appendix H: Installation of HBase

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值