org.apache.hadoop.conf.Configurable, org.apache.hadoop.util.Toolpublic class RandomTextWriter
extends org.apache.hadoop.conf.Configured
implements org.apache.hadoop.util.Tool
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<configuration>
<property>
<name>mapreduce.randomtextwriter.minwordskey</name>
<value>5</value>
</property>
<property>
<name>mapreduce.randomtextwriter.maxwordskey</name>
<value>10</value>
</property>
<property>
<name>mapreduce.randomtextwriter.minwordsvalue</name>
<value>20</value>
</property>
<property>
<name>mapreduce.randomtextwriter.maxwordsvalue</name>
<value>100</value>
</property>
<property>
<name>mapreduce.randomtextwriter.totalbytes</name>
<value>1099511627776</value>
</property>
</configuration>
Equivalently, RandomTextWriter also supports all the above options
and ones supported by Tool via the command-line.
To run: bin/hadoop jar hadoop-${version}-examples.jar randomtextwriter
[-outFormat output format class] output| Modifier and Type | Field | Description |
|---|---|---|
static java.lang.String |
BYTES_PER_MAP |
|
static java.lang.String |
MAPS_PER_HOST |
|
static java.lang.String |
MAX_KEY |
|
static java.lang.String |
MAX_VALUE |
|
static java.lang.String |
MIN_KEY |
|
static java.lang.String |
MIN_VALUE |
|
static java.lang.String |
TOTAL_BYTES |
| Constructor | Description |
|---|---|
RandomTextWriter() |
| Modifier and Type | Method | Description |
|---|---|---|
static void |
main(java.lang.String[] args) |
|
int |
run(java.lang.String[] args) |
This is the main routine for launching a distributed random write job.
|
public static final java.lang.String TOTAL_BYTES
public static final java.lang.String BYTES_PER_MAP
public static final java.lang.String MAPS_PER_HOST
public static final java.lang.String MAX_VALUE
public static final java.lang.String MIN_VALUE
public static final java.lang.String MIN_KEY
public static final java.lang.String MAX_KEY
public int run(java.lang.String[] args)
throws java.lang.Exception
run in interface org.apache.hadoop.util.Tooljava.io.IOExceptionjava.lang.Exceptionpublic static void main(java.lang.String[] args)
throws java.lang.Exception
java.lang.ExceptionCopyright © 2008–2025 Apache Software Foundation. All rights reserved.