2520.
$ brew install hadoop
== Downloading http://www.apache.org/dyn/closer.cgi?path=hadoop/core/hadoop-
1.1.2/hadoop-1.1.2.tar.gz
== Best Mirror http://apache.tt.co.kr/hadoop/core/hadoop-1.1.2/hadoop-1.1.2.
tar.gz
####################################################################### 99.
2%
######################################################################## 100.
0%
== Caveats
In Hadoop's config file:
/usr/local/Cellar/hadoop/1.1.2/libexec/conf/hadoop-env.sh
$JAVA_HOME has been set to be the output of:
/usr/libexec/java_home
== Summary
🍺 /usr/local/Cellar/hadoop/1.1.2: 271 files, 78M, built in 49.1 minutes
$ hadoop version
Hadoop 1.1.2
Subversion https://svn.apache.org/repos/asf/hadoop/common/branches/branch-1.1
-r 1440782
Compiled by hortonfo on Thu Jan 31 02:03:24 UTC 2013
From source with checksum c720ddcf4b926991de7467d253a79b8b
2564.
?xml-stylesheet type=text/xsl href=configuration.xsl?
!-- Put site-specific property overrides in this file. --
configuration
property
namehadoop.tmp.dir/name
value/Users/${user.name}/hadoop-store/value
descriptionA base for other temporary directories./
description
/property
property
namefs.default.name/name
valuehdfs://localhost:8020/value
/property
/configuration
2658.
$ ssh localhost
The authenticity of host 'localhost (::1)' can't be established.
RSA key fingerprint is fb:cc:5d:08:ed:a2:d3:c2:7f:48:61:17:55:af:
d1:86.
Are you sure you want to continue connecting (yes/no)?
2694.
$ hadoop jar /usr/local/Cellar/hadoop/1.1.2/libexec/hadoop-examples-1.1.2.j
ar pi 10 100
Number of Maps = 10
Samples per Map = 100
Wrote input for Map #0
…
Wrote input for Map #9
Starting Job
13/05/29 10:49:21 INFO mapred.FileInputFormat: Total input paths to process
: 10
13/05/29 10:49:21 INFO mapred.JobClient: Running job: job_201305291048_0001
13/05/29 10:49:22 INFO mapred.JobClient: map 0% reduce 0%
…13/05/29 10:49:52 INFO mapred.JobClient: map 100% reduce 100%
13/05/29 10:49:53 INFO mapred.JobClient: Job complete: job_201305291048_000
1
...
Job Finished in 31.939 seconds
Estimated value of Pi is 3.14800000000000000000
2703.
$ hadoop jar /usr/local/Cellar/hadoop/1.1.2/libexec/hadoop-examples-1.1.2.j
ar pi 10 100
Number of Maps = 10
Samples per Map = 100
org.apache.hadoop.ipc.RemoteException: org.apache.hadoop.hdfs.server.nameno
de.SafeModeException: Cannot create directory /user/androidbee/PiEstimator_
TMP_3_141592654/in. Name node is in safe mode.
The reported blocks 1 has reached the threshold 0.9990 of total blocks 1. S
afe mode will be turned off automatically in 5 seconds.
2820.
#!/usr/bin/node
var stdin = process.stdin;
var stdout = process.stdout;
var data = '';
function processLine(line) {
if(line line.trim().length 0) {
var s = line.trim().split(' ');
for(var i = 0; i s.length; ++i) {
stdout.write(s[i] + 't1n');
}
}
}
// 계속…
http://rabrown.net/hadoop-word-count-streaming-example-with-nodejs
node