hadoop自带RandomWriter例子解析

步骤:

                   在eclipse中运行

                   右键--》run as -->run configuration

                   在Programs argument中添加:/user/hadoop/output(此处随你自己修改)

代码:

/**

 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */


package org.apache.hadoop.examples;


import java.io.IOException;
import java.util.Date;
import java.util.Random;


import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.conf.Configured;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.io.BytesWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.io.Writable;
import org.apache.hadoop.io.WritableComparable;
import org.apache.hadoop.mapred.ClusterStatus;
import org.apache.hadoop.mapred.FileOutputFormat;
import org.apache.hadoop.mapred.FileSplit;
import org.apache.hadoop.mapred.InputFormat;
import org.apache.hadoop.mapred.InputSplit;
import org.apache.hadoop.mapred.JobClient;
import org.apache.hadoop.mapred.JobConf;
import org.apache.hadoop.mapred.MapReduceBase;
import org.apache.hadoop.mapred.Mapper;
import org.apache.hadoop.mapred.OutputCollector;
import org.apache.hadoop.mapred.RecordReader;
import org.apache.hadoop.mapred.Reporter;
import org.apache.hadoop.mapred.SequenceFileOutputFormat;
import org.apache.hadoop.mapred.lib.IdentityReducer;
import org.apache.hadoop.util.GenericOptionsParser;
import org.apache.hadoop.util.Tool;
import org.apache.hadoop.util.ToolRunner;


/**
 * This program uses map/reduce to just run a distributed job where there is no
 * interaction between the tasks and each task write a large unsorted random
 * binary sequence file of BytesWritable. In order for this program to generate
 * data for terasort with 10-byte keys and 90-byte values, have the following
 * config: <xmp> <?xml version="1.0"?> <?xml-stylesheet type="text/xsl"
 * href="configuration.xsl"?> <configuration> <property>
 * <name>test.randomwrite.min_key</name> <value>10</value> </property>
 * <property> <name>test.randomwrite.max_key</name> <value>10</value>
 * </property> <property> <name>test.randomwrite.min_value</name>
 * <value>90</value> </property> <property>
 * <name>test.randomwrite.max_value</name> <value>90</value> </property>
 * <property> <name>test.randomwrite.total_bytes</name>
 * <value>1099511627776</value> </property> </configuration></xmp>
 * 
 * Equivalently, {@link RandomWriter} also supports all the above options and
 * ones supported by {@link GenericOptionsParser} via the command-line.
 */
public class RandomWriter extends Configured implements Tool {


/**
* User counters
*/
static enum Counters {
RECORDS_WRITTEN, BYTES_WRITTEN
}


/**
* A custom input format that creates virtual inputs of a single string for
* each map.
*/
static class RandomInputFormat extends Configured implements
InputFormat<Text, Text> {
/**
* Generate the requested number of file splits, with the filename set
* to the filename of the output file.
*/
public InputSplit[] getSplits(JobConf job, int numSplits)
throws IOException {
/**  设置输入分片的个数  在run方法中设在的Map数量只是建议性质的 Map的数量是由InputFormat的getSplits方法放回的数组个数决定的  所以在这里进行设置**/
JobClient client = new JobClient(job);
ClusterStatus cluster = client.getClusterStatus();
/** 如果属性不存在 则返回默认的值 **/
int numMapsPerHost = job.getInt("test.randomwriter.maps_per_host",
10);
long numBytesToWritePerMap = job.getLong(
"test.randomwrite.bytes_per_map", 1 * 1024 * 1024 * 1024);
if (numBytesToWritePerMap == 0) {
System.err
.println("Cannot have test.randomwrite.bytes_per_map set to 0");
}
long totalBytesToWrite = job
.getLong("test.randomwrite.total_bytes", numMapsPerHost
* numBytesToWritePerMap * cluster.getTaskTrackers());
int numMaps = (int) (totalBytesToWrite / numBytesToWritePerMap);
if (numMaps == 0 && totalBytesToWrite > 0) {
numMaps = 1;
}
System.out.println("numMaps-------" + numMaps);
InputSplit[] result = new InputSplit[numMaps];
Path outDir = FileOutputFormat.getOutputPath(job);
for (int i = 0; i < result.length; ++i) {
result[i] = new FileSplit(new Path(outDir, "dummy-split-" + i),
0, 1, (String[]) null);
}
return result;
}


/**
* Return a single record (filename, "") where the filename is taken
* from the file split.
*/
static class RandomRecordReader implements RecordReader<Text, Text> {
Path name;


public RandomRecordReader(Path p) {
name = p;
}


public boolean next(Text key, Text value) {
if (name != null) {
key.set(name.getName());
name = null;
return true;
}
return false;
}


public Text createKey() {
return new Text();
}


public Text createValue() {
return new Text();
}


public long getPos() {
return 0;
}


public void close() {
}


public float getProgress() {
return 0.0f;
}
}


public RecordReader<Text, Text> getRecordReader(InputSplit split,
JobConf job, Reporter reporter) throws IOException {
return new RandomRecordReader(((FileSplit) split).getPath());
}
}


static class Map extends MapReduceBase implements
Mapper<WritableComparable, Writable, BytesWritable, BytesWritable> {


private long numBytesToWrite;
private int minKeySize;
private int keySizeRange;
private int minValueSize;
private int valueSizeRange;
private Random random = new Random();
private BytesWritable randomKey = new BytesWritable();
private BytesWritable randomValue = new BytesWritable();


private void randomizeBytes(byte[] data, int offset, int length) {
for (int i = offset + length - 1; i >= offset; --i) {
data[i] = (byte) random.nextInt(256);
}
}


/**
* Given an output filename, write a bunch of random records to it.
*/
public void map(WritableComparable key, Writable value,
OutputCollector<BytesWritable, BytesWritable> output,
Reporter reporter) throws IOException {
int itemCount = 0;
while (numBytesToWrite > 0) {
int keyLength = minKeySize
+ (keySizeRange != 0 ? random.nextInt(keySizeRange) : 0);
randomKey.setSize(keyLength);
randomizeBytes(randomKey.getBytes(), 0, randomKey.getLength());
int valueLength = minValueSize
+ (valueSizeRange != 0 ? random.nextInt(valueSizeRange)
: 0);
randomValue.setSize(valueLength);
randomizeBytes(randomValue.getBytes(), 0,
randomValue.getLength());
output.collect(randomKey, randomValue);
numBytesToWrite -= keyLength + valueLength;
reporter.incrCounter(Counters.BYTES_WRITTEN, keyLength
+ valueLength);
reporter.incrCounter(Counters.RECORDS_WRITTEN, 1);
if (++itemCount % 200 == 0) {
reporter.setStatus("wrote record " + itemCount + ". "
+ numBytesToWrite + " bytes left.");
}
}
reporter.setStatus("done with " + itemCount + " records.");
}


/**
* Save the values out of the configuaration that we need to write the
* data.
*/
@Override

public void configure(JobConf job) {

                        /*当个Map写的字节数  变量读能见名知意**/

numBytesToWrite = job.getLong("test.randomwrite.bytes_per_map",
1 * 1024 * 1024 * 20);
minKeySize = job.getInt("test.randomwrite.min_key", 100);
keySizeRange = job.getInt("test.randomwrite.max_key", 1000)
- minKeySize;
minValueSize = job.getInt("test.randomwrite.min_value", 0);
valueSizeRange = job.getInt("test.randomwrite.max_value", 20000)
- minValueSize;
}


}


/**
* This is the main routine for launching a distributed random write job. It
* runs 10 maps/node and each node writes 1 gig of data to a DFS file. The
* reduce doesn't do anything.

* @throws IOException
*/
public int run(String[] args) throws Exception {
if (args.length == 0) {
System.out.println("Usage: writer <out-dir>");
ToolRunner.printGenericCommandUsage(System.out);
return -1;
}


Path outDir = new Path(args[0]);
JobConf job = new JobConf(getConf());


job.setJarByClass(RandomWriter.class);
job.setJobName("random-writer");
FileOutputFormat.setOutputPath(job, outDir);


job.setOutputKeyClass(BytesWritable.class);

job.setOutputValueClass(BytesWritable.class);

                /* 此处设置输入类型*/

job.setInputFormat(RandomInputFormat.class);
job.setMapperClass(Map.class);

job.setReducerClass(IdentityReducer.class);

                /**设置输出类型 此处要修改的话 前面那个randomKey类型也需要修改 **/

job.setOutputFormat(SequenceFileOutputFormat.class);


JobClient client = new JobClient(job);
ClusterStatus cluster = client.getClusterStatus();
/** 如果属性不存在 则返回默认的值 **/
int numMapsPerHost = job.getInt("test.randomwriter.maps_per_host", 10);
long numBytesToWritePerMap = job.getLong(
"test.randomwrite.bytes_per_map", 1 * 1024 * 1024 * 1024);
if (numBytesToWritePerMap == 0) {
System.err
.println("Cannot have test.randomwrite.bytes_per_map set to 0");
return -2;
}
long totalBytesToWrite = job.getLong(
"test.randomwrite.total_bytes",
numMapsPerHost * numBytesToWritePerMap
* cluster.getTaskTrackers());
int numMaps = (int) (totalBytesToWrite / numBytesToWritePerMap);
if (numMaps == 0 && totalBytesToWrite > 0) {
numMaps = 1;
job.setLong("test.randomwrite.bytes_per_map", totalBytesToWrite);
}


job.setNumMapTasks(numMaps);/** 建议型的 **/
System.out.println("Running " + numMaps + " maps.");


// reducer NONE
job.setNumReduceTasks(0);


Date startTime = new Date();
System.out.println("Job started: " + startTime);
JobClient.runJob(job);
Date endTime = new Date();
System.out.println("Job ended: " + endTime);
System.out.println("The job took "
+ (endTime.getTime() - startTime.getTime()) / 1000
+ " seconds.");


return 0;
}


public static void main(String[] args) throws Exception {
int res = ToolRunner.run(new Configuration(), new RandomWriter(), args);
System.exit(res);
}


}


输出:

Running 10 maps.
Job started: Wed Apr 10 22:41:10 CST 2013
13/04/10 22:41:10 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
numMaps-------10
13/04/10 22:41:11 INFO mapred.JobClient: Running job: job_local_0001
13/04/10 22:41:11 INFO util.ProcessTree: setsid exited with exit code 0
13/04/10 22:41:11 INFO mapred.Task:  Using ResourceCalculatorPlugin : org.apache.hadoop.util.LinuxResourceCalculatorPlugin@28bd68
13/04/10 22:41:11 INFO mapred.MapTask: numReduceTasks: 0
13/04/10 22:41:12 INFO mapred.JobClient:  map 0% reduce 0%
13/04/10 22:41:13 INFO mapred.Task: Task:attempt_local_0001_m_000000_0 is done. And is in the process of commiting
13/04/10 22:41:13 INFO mapred.LocalJobRunner: 
13/04/10 22:41:13 INFO mapred.Task: Task attempt_local_0001_m_000000_0 is allowed to commit now
13/04/10 22:41:14 INFO mapred.FileOutputCommitter: Saved output of task 'attempt_local_0001_m_000000_0' to hdfs://localhost:49002/user/hadoop/output
13/04/10 22:41:14 INFO mapred.LocalJobRunner: done with 1987 records.
13/04/10 22:41:14 INFO mapred.Task: Task 'attempt_local_0001_m_000000_0' done.
13/04/10 22:41:14 INFO mapred.Task:  Using ResourceCalculatorPlugin : org.apache.hadoop.util.LinuxResourceCalculatorPlugin@209661
13/04/10 22:41:14 INFO mapred.MapTask: numReduceTasks: 0
13/04/10 22:41:15 INFO mapred.JobClient:  map 100% reduce 0%
13/04/10 22:41:18 INFO mapred.Task: Task:attempt_local_0001_m_000001_0 is done. And is in the process of commiting
13/04/10 22:41:18 INFO mapred.LocalJobRunner: 
13/04/10 22:41:18 INFO mapred.Task: Task attempt_local_0001_m_000001_0 is allowed to commit now
13/04/10 22:41:18 INFO mapred.FileOutputCommitter: Saved output of task 'attempt_local_0001_m_000001_0' to hdfs://localhost:49002/user/hadoop/output
13/04/10 22:41:19 INFO mapred.JobClient:  map 50% reduce 0%
13/04/10 22:41:20 INFO mapred.LocalJobRunner: done with 2038 records.
13/04/10 22:41:20 INFO mapred.LocalJobRunner: done with 2038 records.
13/04/10 22:41:20 INFO mapred.Task: Task 'attempt_local_0001_m_000001_0' done.
13/04/10 22:41:20 INFO mapred.Task:  Using ResourceCalculatorPlugin : org.apache.hadoop.util.LinuxResourceCalculatorPlugin@1f2b5c
13/04/10 22:41:20 INFO mapred.MapTask: numReduceTasks: 0
13/04/10 22:41:21 INFO mapred.JobClient:  map 100% reduce 0%
13/04/10 22:41:22 INFO mapred.Task: Task:attempt_local_0001_m_000002_0 is done. And is in the process of commiting
13/04/10 22:41:22 INFO mapred.LocalJobRunner: 
13/04/10 22:41:22 INFO mapred.Task: Task attempt_local_0001_m_000002_0 is allowed to commit now
13/04/10 22:41:22 INFO mapred.JobClient:  map 66% reduce 0%
13/04/10 22:41:22 INFO mapred.FileOutputCommitter: Saved output of task 'attempt_local_0001_m_000002_0' to hdfs://localhost:49002/user/hadoop/output
13/04/10 22:41:23 INFO mapred.LocalJobRunner: done with 1988 records.
13/04/10 22:41:23 INFO mapred.Task: Task 'attempt_local_0001_m_000002_0' done.
13/04/10 22:41:23 INFO mapred.Task:  Using ResourceCalculatorPlugin : org.apache.hadoop.util.LinuxResourceCalculatorPlugin@195804b
13/04/10 22:41:23 INFO mapred.MapTask: numReduceTasks: 0
13/04/10 22:41:24 INFO mapred.JobClient:  map 100% reduce 0%
13/04/10 22:41:27 INFO mapred.Task: Task:attempt_local_0001_m_000003_0 is done. And is in the process of commiting
13/04/10 22:41:27 INFO mapred.LocalJobRunner: 
13/04/10 22:41:27 INFO mapred.Task: Task attempt_local_0001_m_000003_0 is allowed to commit now
13/04/10 22:41:27 INFO mapred.FileOutputCommitter: Saved output of task 'attempt_local_0001_m_000003_0' to hdfs://localhost:49002/user/hadoop/output
13/04/10 22:41:28 INFO mapred.JobClient:  map 75% reduce 0%
13/04/10 22:41:29 INFO mapred.LocalJobRunner: done with 2003 records.
13/04/10 22:41:29 INFO mapred.LocalJobRunner: done with 2003 records.
13/04/10 22:41:29 INFO mapred.Task: Task 'attempt_local_0001_m_000003_0' done.
13/04/10 22:41:29 INFO mapred.Task:  Using ResourceCalculatorPlugin : org.apache.hadoop.util.LinuxResourceCalculatorPlugin@9ee241
13/04/10 22:41:29 INFO mapred.MapTask: numReduceTasks: 0
13/04/10 22:41:30 INFO mapred.JobClient:  map 100% reduce 0%
13/04/10 22:41:32 INFO mapred.Task: Task:attempt_local_0001_m_000004_0 is done. And is in the process of commiting
13/04/10 22:41:32 INFO mapred.LocalJobRunner: 
13/04/10 22:41:32 INFO mapred.Task: Task attempt_local_0001_m_000004_0 is allowed to commit now
13/04/10 22:41:32 INFO mapred.JobClient:  map 80% reduce 0%
13/04/10 22:41:32 INFO mapred.FileOutputCommitter: Saved output of task 'attempt_local_0001_m_000004_0' to hdfs://localhost:49002/user/hadoop/output
13/04/10 22:41:32 INFO mapred.LocalJobRunner: done with 1961 records.
13/04/10 22:41:32 INFO mapred.Task: Task 'attempt_local_0001_m_000004_0' done.
13/04/10 22:41:32 INFO mapred.Task:  Using ResourceCalculatorPlugin : org.apache.hadoop.util.LinuxResourceCalculatorPlugin@10ef227
13/04/10 22:41:32 INFO mapred.MapTask: numReduceTasks: 0
13/04/10 22:41:33 INFO mapred.JobClient:  map 100% reduce 0%
13/04/10 22:41:34 INFO mapred.Task: Task:attempt_local_0001_m_000005_0 is done. And is in the process of commiting
13/04/10 22:41:34 INFO mapred.LocalJobRunner: 
13/04/10 22:41:34 INFO mapred.Task: Task attempt_local_0001_m_000005_0 is allowed to commit now
13/04/10 22:41:35 INFO mapred.FileOutputCommitter: Saved output of task 'attempt_local_0001_m_000005_0' to hdfs://localhost:49002/user/hadoop/output
13/04/10 22:41:35 INFO mapred.JobClient:  map 83% reduce 0%
13/04/10 22:41:35 INFO mapred.LocalJobRunner: done with 1984 records.
13/04/10 22:41:35 INFO mapred.Task: Task 'attempt_local_0001_m_000005_0' done.
13/04/10 22:41:35 INFO mapred.Task:  Using ResourceCalculatorPlugin : org.apache.hadoop.util.LinuxResourceCalculatorPlugin@1b647b9
13/04/10 22:41:35 INFO mapred.MapTask: numReduceTasks: 0
13/04/10 22:41:36 INFO mapred.JobClient:  map 100% reduce 0%
13/04/10 22:41:38 INFO mapred.Task: Task:attempt_local_0001_m_000006_0 is done. And is in the process of commiting
13/04/10 22:41:38 INFO mapred.LocalJobRunner: 
13/04/10 22:41:38 INFO mapred.Task: Task attempt_local_0001_m_000006_0 is allowed to commit now
13/04/10 22:41:38 INFO mapred.JobClient:  map 85% reduce 0%
13/04/10 22:41:38 INFO mapred.FileOutputCommitter: Saved output of task 'attempt_local_0001_m_000006_0' to hdfs://localhost:49002/user/hadoop/output
13/04/10 22:41:38 INFO mapred.LocalJobRunner: done with 1980 records.
13/04/10 22:41:38 INFO mapred.Task: Task 'attempt_local_0001_m_000006_0' done.
13/04/10 22:41:38 INFO mapred.Task:  Using ResourceCalculatorPlugin : org.apache.hadoop.util.LinuxResourceCalculatorPlugin@730333
13/04/10 22:41:38 INFO mapred.MapTask: numReduceTasks: 0
13/04/10 22:41:39 INFO mapred.JobClient:  map 100% reduce 0%
13/04/10 22:41:40 INFO mapred.Task: Task:attempt_local_0001_m_000007_0 is done. And is in the process of commiting
13/04/10 22:41:40 INFO mapred.LocalJobRunner: 
13/04/10 22:41:40 INFO mapred.Task: Task attempt_local_0001_m_000007_0 is allowed to commit now
13/04/10 22:41:41 INFO mapred.FileOutputCommitter: Saved output of task 'attempt_local_0001_m_000007_0' to hdfs://localhost:49002/user/hadoop/output
13/04/10 22:41:41 INFO mapred.JobClient:  map 87% reduce 0%
13/04/10 22:41:41 INFO mapred.LocalJobRunner: done with 1992 records.
13/04/10 22:41:41 INFO mapred.Task: Task 'attempt_local_0001_m_000007_0' done.
13/04/10 22:41:41 INFO mapred.Task:  Using ResourceCalculatorPlugin : org.apache.hadoop.util.LinuxResourceCalculatorPlugin@890800
13/04/10 22:41:41 INFO mapred.MapTask: numReduceTasks: 0
13/04/10 22:41:42 INFO mapred.JobClient:  map 100% reduce 0%
13/04/10 22:41:45 INFO mapred.Task: Task:attempt_local_0001_m_000008_0 is done. And is in the process of commiting
13/04/10 22:41:45 INFO mapred.LocalJobRunner: 
13/04/10 22:41:45 INFO mapred.Task: Task attempt_local_0001_m_000008_0 is allowed to commit now
13/04/10 22:41:46 INFO mapred.FileOutputCommitter: Saved output of task 'attempt_local_0001_m_000008_0' to hdfs://localhost:49002/user/hadoop/output
13/04/10 22:41:46 INFO mapred.JobClient:  map 88% reduce 0%
13/04/10 22:41:47 INFO mapred.LocalJobRunner: done with 1999 records.
13/04/10 22:41:47 INFO mapred.LocalJobRunner: done with 1999 records.
13/04/10 22:41:47 INFO mapred.Task: Task 'attempt_local_0001_m_000008_0' done.
13/04/10 22:41:47 INFO mapred.Task:  Using ResourceCalculatorPlugin : org.apache.hadoop.util.LinuxResourceCalculatorPlugin@36f7a0
13/04/10 22:41:47 INFO mapred.MapTask: numReduceTasks: 0
13/04/10 22:41:48 INFO mapred.JobClient:  map 100% reduce 0%
13/04/10 22:41:49 INFO mapred.Task: Task:attempt_local_0001_m_000009_0 is done. And is in the process of commiting
13/04/10 22:41:50 INFO mapred.LocalJobRunner: 
13/04/10 22:41:50 INFO mapred.Task: Task attempt_local_0001_m_000009_0 is allowed to commit now
13/04/10 22:41:50 INFO mapred.FileOutputCommitter: Saved output of task 'attempt_local_0001_m_000009_0' to hdfs://localhost:49002/user/hadoop/output
13/04/10 22:41:50 INFO mapred.JobClient:  map 89% reduce 0%
13/04/10 22:41:50 INFO mapred.LocalJobRunner: done with 2025 records.
13/04/10 22:41:50 INFO mapred.Task: Task 'attempt_local_0001_m_000009_0' done.
13/04/10 22:41:51 INFO mapred.JobClient:  map 100% reduce 0%
13/04/10 22:41:51 INFO mapred.JobClient: Job complete: job_local_0001
13/04/10 22:41:51 INFO mapred.JobClient: Counters: 16
13/04/10 22:41:51 INFO mapred.JobClient:   File Input Format Counters 
13/04/10 22:41:51 INFO mapred.JobClient:     Bytes Read=0
13/04/10 22:41:51 INFO mapred.JobClient:   File Output Format Counters 
13/04/10 22:41:51 INFO mapred.JobClient:     Bytes Written=210459071
13/04/10 22:41:51 INFO mapred.JobClient:   org.apache.hadoop.examples.RandomWriter$Counters
13/04/10 22:41:51 INFO mapred.JobClient:     BYTES_WRITTEN=209767059
13/04/10 22:41:51 INFO mapred.JobClient:     RECORDS_WRITTEN=19957
13/04/10 22:41:51 INFO mapred.JobClient:   FileSystemCounters
13/04/10 22:41:51 INFO mapred.JobClient:     FILE_BYTES_READ=2382785
13/04/10 22:41:51 INFO mapred.JobClient:     FILE_BYTES_WRITTEN=2782330
13/04/10 22:41:51 INFO mapred.JobClient:     HDFS_BYTES_WRITTEN=1157478956
13/04/10 22:41:51 INFO mapred.JobClient:   Map-Reduce Framework
13/04/10 22:41:51 INFO mapred.JobClient:     Map input records=10
13/04/10 22:41:51 INFO mapred.JobClient:     Physical memory (bytes) snapshot=0
13/04/10 22:41:51 INFO mapred.JobClient:     Spilled Records=0
13/04/10 22:41:51 INFO mapred.JobClient:     CPU time spent (ms)=0
13/04/10 22:41:51 INFO mapred.JobClient:     Total committed heap usage (bytes)=356450304
13/04/10 22:41:51 INFO mapred.JobClient:     Virtual memory (bytes) snapshot=0
13/04/10 22:41:51 INFO mapred.JobClient:     Map input bytes=0
13/04/10 22:41:51 INFO mapred.JobClient:     Map output records=19957
13/04/10 22:41:51 INFO mapred.JobClient:     SPLIT_RAW_BYTES=1080
Job ended: Wed Apr 10 22:41:51 CST 2013
The job took 41 seconds.

你可能感兴趣的:(java,hadoop,hdfs)