Aprendizaje en Grandes Volúmenes de Datos, Clase 16 por Pablo Ariel Duboue, PhD disponible bajo licencia CC-BY-SA Presentación: hadoop history Hadoop for Dummies pages 27, 28 2002, nutch architecture: server, worker (hdfs worker), client servers: yarn resourcemanager (jobtracker), namenode (slave), datanode (hdfs) container Hadoop for Dummies pages 119, 121, 123, 126 hadoop command line HADOOP_HOME hadoop script hdfs interaction jobs Hadoop for Dummies pages 108-109 recordeader recordwriter writing a mapper long lines grep En máquina: # download hadoop-2.4.1.tar.gz # extract PROMPT$ tar -zxvf hadoop-2.4.1.tar.gz PROMPT$ cd hadoop-2.4.1/ PROMPT$ export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64 PROMPT$ export HADOOP_PREFIX=$PWD PROMPT$ bin/hadoop Usage: hadoop [--config confdir] COMMAND where COMMAND is one of: fs run a generic filesystem user client version print the version jar run a jar file checknative [-a|-h] check native hadoop and compression libraries availability distcp copy file or directories recursively archive -archiveName NAME -p * create a hadoop archive classpath prints the class path needed to get the Hadoop jar and the required libraries daemonlog get/set the log level for each daemon or CLASSNAME run the class named CLASSNAME Most commands print help when invoked w/o parameters. PROMPT$ mkdir input PROMPT$ cp etc/hadoop/*.xml input PROMPT$ ./bin/hadoop jar share/hadoop/mapreduce/hadoop-mapreduce-examples-2.4.1.jar grep input output 'dfs[a-z.]+' PROMPT$ cat output/part-r-00000 1 dfsadmin # http://hadoop.apache.org/docs/current/hadoop-mapreduce-client/hadoop-mapreduce-client-core/MapReduceTutorial.html # WordCount.java PROMPT$ export HADOOP_CLASSPATH=$JAVA_HOME/lib/tools.jar PROMPT$ ./bin/hadoop com.sun.tools.javac.Main WordCount.java PROMPT$ jar cf wc.jar WordCount*.class PROMPT$ ./bin/hadoop jar wc.jar WordCount input outputwc PROMPT$ more outputwc/part-r-00000 "*" 17 "AS 6 "License"); 6 "alice,bob 17 (ASF) 1 (root 1 (the 6 --> 11 0.0 1 1.0. 1 2.0 6 2011 1 40. 1 11 0.0 1 1.0. 1 2.0 6 2011 1 40. 1