This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
cluster:115 [2013/05/28 13:54] hmeij [Rhadoop] |
cluster:115 [2013/09/10 19:04] (current) hmeij [Rhadoop] |
||
---|---|---|---|
Line 2: | Line 2: | ||
**[[cluster: | **[[cluster: | ||
- | ===== Use Hadoop | + | ===== Use Hadoop Cluster ===== |
[[cluster: | [[cluster: | ||
Line 275: | Line 275: | ||
R CMD INSTALL rmr-2.2.0.tar.gz | R CMD INSTALL rmr-2.2.0.tar.gz | ||
R CMD INSTALL rhdfs_1.0.5.tar.gz | R CMD INSTALL rhdfs_1.0.5.tar.gz | ||
+ | </ | ||
+ | |||
+ | Verify | ||
+ | |||
+ | < | ||
+ | Type ' | ||
+ | |||
+ | > library(rmr2) | ||
+ | Loading required package: Rcpp | ||
+ | Loading required package: RJSONIO | ||
+ | Loading required package: digest | ||
+ | Loading required package: functional | ||
+ | Loading required package: stringr | ||
+ | Loading required package: plyr | ||
+ | Loading required package: reshape2 | ||
+ | > library(rhdfs) | ||
+ | Loading required package: rJava | ||
+ | |||
+ | HADOOP_CMD=/ | ||
+ | |||
+ | Be sure to run hdfs.init() | ||
+ | > sessionInfo() | ||
+ | R version 3.0.0 (2013-04-03) | ||
+ | Platform: x86_64-redhat-linux-gnu (64-bit) | ||
+ | |||
+ | locale: | ||
+ | [1] LC_CTYPE=en_US.UTF-8 | ||
+ | [3] LC_TIME=en_US.UTF-8 | ||
+ | [5] LC_MONETARY=en_US.UTF-8 | ||
+ | [7] LC_PAPER=C | ||
+ | [9] LC_ADDRESS=C | ||
+ | [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C | ||
+ | |||
+ | attached base packages: | ||
+ | [1] stats | ||
+ | |||
+ | other attached packages: | ||
+ | [1] rhdfs_1.0.5 | ||
+ | [6] stringr_0.6.2 | ||
+ | |||
</ | </ | ||
Line 294: | Line 334: | ||
</ | </ | ||
+ | Then Hbase for Rhbase: | ||
+ | [[http:// | ||
+ | But first Trift, the language interface to the database Hbase: | ||
+ | |||
+ | < | ||
+ | yum install openssl098e | ||
+ | </ | ||
+ | |||
+ | Download Trift: [[http:// | ||
+ | |||
+ | < | ||
+ | yum install byacc -y | ||
+ | yum install automake libtool flex bison pkgconfig gcc-c++ boost-devel libevent-devel zlib-devel python-devel ruby-devel | ||
+ | |||
+ | ./configure | ||
+ | make | ||
+ | make install | ||
+ | export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/ | ||
+ | pkg-config --cflags thrift | ||
+ | cp -p / | ||
+ | |||
+ | HBASE_ROOT/ | ||
+ | lsof -i:9090 that is server, port 9095 is monitor | ||
+ | |||
+ | </ | ||
+ | |||
+ | Configure for distributed environment: | ||
+ | |||
+ | * used 3 zookeepers with quorum, see config example online | ||
+ | * start with rolling_restart, | ||
+ | * /hbase owened by root:root | ||
+ | * permissions reset on /hdfs, not sure why | ||
+ | * also use / | ||
+ | * some more notes below | ||
+ | |||
+ | |||
+ | < | ||
+ | |||
+ | |||
+ | install.packages(' | ||
+ | install.packages(" | ||
+ | install.packages(c(" | ||
+ | |||
+ | wget http:// | ||
+ | wget -O rmr-2.2.0.tar.gz http:// | ||
+ | wget -O rhdfs_1.0.5.tar.gz https:// | ||
+ | |||
+ | R CMD INSTALL Rcpp_0.9.8.tar.gz | ||
+ | R CMD INSTALL rmr-2.2.0.tar.gz | ||
+ | R CMD INSTALL rhdfs_1.0.5.tar.gz | ||
+ | R CMD INSTALL rhbase_1.2.0.tar.gz | ||
+ | |||
+ | yum install openssl098e openssl openssl-devel flex boost ruby ruby-libs ruby-devel php php-libs php-devel \ | ||
+ | automake libtool flex bison pkgconfig gcc-c++ boost-devel libevent-devel zlib-devel python-devel ruby-devel | ||
+ | |||
+ | b2 install --prefix=/ | ||
+ | |||
+ | thrift: ./configure --prefix=/ | ||
+ | make install | ||
+ | |||
+ | cp -p / | ||
+ | cd /usr/lib; ln -s libthrift-0.9.0.so libthrift.so | ||
+ | |||
+ | SKIP (nasty replaced with straight copy, could go to nodes) | ||
+ | http:// | ||
+ | 'o conf commit' | ||
+ | cpan> install Hadoop:: | ||
+ | |||
+ | whitetail only, unpack hbase, edit conf/ | ||
+ | also edit conf/ | ||
+ | copy / | ||
+ | |||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | </ | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | The directory where the snapshot is stored. | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | |||
+ | </ | ||
Line 487: | Line 615: | ||
==== Perl Hadoop:: | ==== Perl Hadoop:: | ||
+ | |||
+ | * All nodes | ||
+ | |||
* [[http:// | * [[http:// |