hadoop-mapreduce-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sha...@apache.org
Subject svn commit: r816664 [3/9] - in /hadoop/mapreduce/trunk: ./ conf/ src/benchmarks/gridmix/ src/benchmarks/gridmix/pipesort/ src/benchmarks/gridmix2/ src/benchmarks/gridmix2/src/java/org/apache/hadoop/mapreduce/ src/c++/pipes/impl/ src/c++/task-controller...
Date Fri, 18 Sep 2009 15:10:02 GMT
Modified: hadoop/mapreduce/trunk/src/docs/src/documentation/content/xdocs/mapred_tutorial.xml
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/trunk/src/docs/src/documentation/content/xdocs/mapred_tutorial.xml?rev=816664&r1=816663&r2=816664&view=diff
==============================================================================
--- hadoop/mapreduce/trunk/src/docs/src/documentation/content/xdocs/mapred_tutorial.xml (original)
+++ hadoop/mapreduce/trunk/src/docs/src/documentation/content/xdocs/mapred_tutorial.xml Fri Sep 18 15:09:48 2009
@@ -900,7 +900,7 @@
  
             <p>The right number of reduces seems to be <code>0.95</code> or 
             <code>1.75</code> multiplied by (&lt;<em>no. of nodes</em>&gt; * 
-            <code>mapred.tasktracker.reduce.tasks.maximum</code>).</p>
+            <code>mapreduce.tasktracker.reduce.tasks.maximum</code>).</p>
  
             <p>With <code>0.95</code> all of the reduces can launch immediately 
             and start transfering map outputs as the maps finish. With 
@@ -962,7 +962,7 @@
           significant amount of time to process individual key/value pairs, 
           this is crucial since the framework might assume that the task has 
           timed-out and kill that task. Another way to avoid this is to 
-          set the configuration parameter <code>mapred.task.timeout</code> to a
+          set the configuration parameter <code>mapreduce.task.timeout</code> to a
           high-enough value (or even set it to <em>zero</em> for no time-outs).
           </p>
 
@@ -1072,7 +1072,7 @@
 
         <p>
           <code>&lt;property&gt;</code><br/>
-          &nbsp;&nbsp;<code>&lt;name&gt;mapred.map.child.java.opts&lt;/name&gt;</code><br/>
+          &nbsp;&nbsp;<code>&lt;name&gt;mapreduce.map.java.opts&lt;/name&gt;</code><br/>
           &nbsp;&nbsp;<code>&lt;value&gt;</code><br/>
           &nbsp;&nbsp;&nbsp;&nbsp;<code>
                     -Xmx512M -Djava.library.path=/home/mycompany/lib
@@ -1086,7 +1086,7 @@
         
         <p>
           <code>&lt;property&gt;</code><br/>
-          &nbsp;&nbsp;<code>&lt;name&gt;mapred.reduce.child.java.opts&lt;/name&gt;</code><br/>
+          &nbsp;&nbsp;<code>&lt;name&gt;mapreduce.reduce.java.opts&lt;/name&gt;</code><br/>
           &nbsp;&nbsp;<code>&lt;value&gt;</code><br/>
           &nbsp;&nbsp;&nbsp;&nbsp;<code>
                     -Xmx1024M -Djava.library.path=/home/mycompany/lib
@@ -1159,26 +1159,28 @@
 
           <table>
             <tr><th>Name</th><th>Type</th><th>Description</th></tr>
-            <tr><td>io.sort.mb</td><td>int</td>
+            <tr><td>mapreduce.task.io.sort.mb</td><td>int</td>
                 <td>The cumulative size of the serialization and accounting
                 buffers storing records emitted from the map, in megabytes.
                 </td></tr>
-            <tr><td>io.sort.record.percent</td><td>float</td>
+            <tr><td>mapreduce.map.sort.record.percent</td><td>float</td>
                 <td>The ratio of serialization to accounting space can be
                 adjusted. Each serialized record requires 16 bytes of
                 accounting information in addition to its serialized size to
                 effect the sort. This percentage of space allocated from
-                <code>io.sort.mb</code> affects the probability of a spill to
+                <code>mapreduce.task.io.sort.mb</code> affects the 
+                probability of a spill to
                 disk being caused by either exhaustion of the serialization
                 buffer or the accounting space. Clearly, for a map outputting
                 small records, a higher value than the default will likely
                 decrease the number of spills to disk.</td></tr>
-            <tr><td>io.sort.spill.percent</td><td>float</td>
+            <tr><td>mapreduce.map.sort.spill.percent</td><td>float</td>
                 <td>This is the threshold for the accounting and serialization
                 buffers. When this percentage of either buffer has filled,
                 their contents will be spilled to disk in the background. Let
-                <code>io.sort.record.percent</code> be <em>r</em>,
-                <code>io.sort.mb</code> be <em>x</em>, and this value be
+                <code>mapreduce.map.sort.record.percent</code> be <em>r</em>,
+                <code>mapreduce.task.io.sort.mb</code> be <em>x</em>, 
+                and this value be
                 <em>q</em>. The maximum number of records collected before the
                 collection thread will spill is <code>r * x * q * 2^16</code>.
                 Note that a higher value may decrease the number of- or even
@@ -1218,7 +1220,7 @@
 
           <table>
             <tr><th>Name</th><th>Type</th><th>Description</th></tr>
-            <tr><td>io.sort.factor</td><td>int</td>
+            <tr><td>mapreduce.task.io.sort.factor</td><td>int</td>
                 <td>Specifies the number of segments on disk to be merged at
                 the same time. It limits the number of open files and
                 compression codecs during the merge. If the number of files
@@ -1226,7 +1228,7 @@
                 Though this limit also applies to the map, most jobs should be
                 configured so that hitting this limit is unlikely
                 there.</td></tr>
-            <tr><td>mapred.inmem.merge.threshold</td><td>int</td>
+            <tr><td>mapreduce.reduce.merge.inmem.threshold</td><td>int</td>
                 <td>The number of sorted map outputs fetched into memory
                 before being merged to disk. Like the spill thresholds in the
                 preceding note, this is not defining a unit of partition, but
@@ -1235,7 +1237,7 @@
                 less expensive than merging from disk (see notes following
                 this table). This threshold influences only the frequency of
                 in-memory merges during the shuffle.</td></tr>
-            <tr><td>mapred.job.shuffle.merge.percent</td><td>float</td>
+            <tr><td>mapreduce.reduce.shuffle.merge.percent</td><td>float</td>
                 <td>The memory threshold for fetched map outputs before an
                 in-memory merge is started, expressed as a percentage of
                 memory allocated to storing map outputs in memory. Since map
@@ -1245,14 +1247,14 @@
                 reduces whose input can fit entirely in memory. This parameter
                 influences only the frequency of in-memory merges during the
                 shuffle.</td></tr>
-            <tr><td>mapred.job.shuffle.input.buffer.percent</td><td>float</td>
+            <tr><td>mapreduce.reduce.shuffle.input.buffer.percent</td><td>float</td>
                 <td>The percentage of memory- relative to the maximum heapsize
-                as typically specified in <code>mapred.reduce.child.java.opts</code>-
+                as typically specified in <code>mapreduce.reduce.java.opts</code>-
                 that can be allocated to storing map outputs during the
                 shuffle. Though some memory should be set aside for the
                 framework, in general it is advantageous to set this high
                 enough to store large and numerous map outputs.</td></tr>
-            <tr><td>mapred.job.reduce.input.buffer.percent</td><td>float</td>
+            <tr><td>mapreduce.reduce.input.buffer.percent</td><td>float</td>
                 <td>The percentage of memory relative to the maximum heapsize
                 in which map outputs may be retained during the reduce. When
                 the reduce begins, map outputs will be merged to disk until
@@ -1277,7 +1279,8 @@
             than aggressively increasing buffer sizes.</li>
             <li>When merging in-memory map outputs to disk to begin the
             reduce, if an intermediate merge is necessary because there are
-            segments to spill and at least <code>io.sort.factor</code>
+            segments to spill and at least 
+            <code>mapreduce.task.io.sort.factor</code>
             segments already on disk, the in-memory map outputs will be part
             of the intermediate merge.</li>
           </ul>
@@ -1287,7 +1290,7 @@
         <section>
         <title> Directory Structure </title>
         <p>The task tracker has local directory,
-        <code> ${mapred.local.dir}/taskTracker/</code> to create localized
+        <code> ${mapreduce.cluster.local.dir}/taskTracker/</code> to create localized
         cache and localized job. It can define multiple local directories 
         (spanning multiple disks) and then each filename is assigned to a
         semi-random local directory. When the job starts, task tracker 
@@ -1295,24 +1298,24 @@
         specified in the configuration. Thus the task tracker directory 
         structure looks the following: </p>         
         <ul>
-        <li><code>${mapred.local.dir}/taskTracker/archive/</code> :
+        <li><code>${mapreduce.cluster.local.dir}/taskTracker/archive/</code> :
         The distributed cache. This directory holds the localized distributed
         cache. Thus localized distributed cache is shared among all
         the tasks and jobs </li>
-        <li><code>${mapred.local.dir}/taskTracker/jobcache/$jobid/</code> :
+        <li><code>${mapreduce.cluster.local.dir}/taskTracker/jobcache/$jobid/</code> :
         The localized job directory 
         <ul>
-        <li><code>${mapred.local.dir}/taskTracker/jobcache/$jobid/work/</code> 
+        <li><code>${mapreduce.cluster.local.dir}/taskTracker/jobcache/$jobid/work/</code> 
         : The job-specific shared directory. The tasks can use this space as 
         scratch space and share files among them. This directory is exposed
         to the users through the configuration property  
-        <code>job.local.dir</code>. The directory can accessed through 
+        <code>mapreduce.job.local.dir</code>. The directory can accessed through 
         api <a href="ext:api/org/apache/hadoop/mapred/jobconf/getjoblocaldir">
         JobConf.getJobLocalDir()</a>. It is available as System property also.
         So, users (streaming etc.) can call 
-        <code>System.getProperty("job.local.dir")</code> to access the 
+        <code>System.getProperty("mapreduce.job.local.dir")</code> to access the 
         directory.</li>
-        <li><code>${mapred.local.dir}/taskTracker/jobcache/$jobid/jars/</code>
+        <li><code>${mapreduce.cluster.local.dir}/taskTracker/jobcache/$jobid/jars/</code>
         : The jars directory, which has the job jar file and expanded jar.
         The <code>job.jar</code> is the application's jar file that is
         automatically distributed to each machine. It is expanded in jars
@@ -1321,29 +1324,29 @@
         <a href="ext:api/org/apache/hadoop/mapred/jobconf/getjar"> 
         JobConf.getJar() </a>. To access the unjarred directory,
         JobConf.getJar().getParent() can be called.</li>
-        <li><code>${mapred.local.dir}/taskTracker/jobcache/$jobid/job.xml</code>
+        <li><code>${mapreduce.cluster.local.dir}/taskTracker/jobcache/$jobid/job.xml</code>
         : The job.xml file, the generic job configuration, localized for 
         the job. </li>
-        <li><code>${mapred.local.dir}/taskTracker/jobcache/$jobid/$taskid</code>
+        <li><code>${mapreduce.cluster.local.dir}/taskTracker/jobcache/$jobid/$taskid</code>
         : The task directory for each task attempt. Each task directory
         again has the following structure :
         <ul>
-        <li><code>${mapred.local.dir}/taskTracker/jobcache/$jobid/$taskid/job.xml</code>
+        <li><code>${mapreduce.cluster.local.dir}/taskTracker/jobcache/$jobid/$taskid/job.xml</code>
         : A job.xml file, task localized job configuration, Task localization
         means that properties have been set that are specific to
         this particular task within the job. The properties localized for 
         each task are described below.</li>
-        <li><code>${mapred.local.dir}/taskTracker/jobcache/$jobid/$taskid/output</code>
+        <li><code>${mapreduce.cluster.local.dir}/taskTracker/jobcache/$jobid/$taskid/output</code>
         : A directory for intermediate output files. This contains the
         temporary map reduce data generated by the framework
         such as map output files etc. </li>
-        <li><code>${mapred.local.dir}/taskTracker/jobcache/$jobid/$taskid/work</code>
+        <li><code>${mapreduce.cluster.local.dir}/taskTracker/jobcache/$jobid/$taskid/work</code>
         : The curernt working directory of the task. 
         With <a href="#Task+JVM+Reuse">jvm reuse</a> enabled for tasks, this 
         directory will be the directory on which the jvm has started</li>
-        <li><code>${mapred.local.dir}/taskTracker/jobcache/$jobid/$taskid/work/tmp</code>
+        <li><code>${mapreduce.cluster.local.dir}/taskTracker/jobcache/$jobid/$taskid/work/tmp</code>
         : The temporary directory for the task. 
-        (User can specify the property <code>mapred.child.tmp</code> to set
+        (User can specify the property <code>mapreduce.task.tmp.dir</code> to set
         the value of temporary directory for map and reduce tasks. This 
         defaults to <code>./tmp</code>. If the value is not an absolute path,
         it is prepended with task's working directory. Otherwise, it is
@@ -1352,7 +1355,7 @@
         <code>-Djava.io.tmpdir='the absolute path of the tmp dir'</code>.
         Anp pipes and streaming are set with environment variable,
         <code>TMPDIR='the absolute path of the tmp dir'</code>). This 
-        directory is created, if <code>mapred.child.tmp</code> has the value
+        directory is created, if <code>mapreduce.task.tmp.dir</code> has the value
         <code>./tmp</code> </li>
         </ul>
         </li>
@@ -1364,7 +1367,7 @@
         <section>
         <title>Task JVM Reuse</title>
         <p>Jobs can enable task JVMs to be reused by specifying the job 
-        configuration <code>mapred.job.reuse.jvm.num.tasks</code>. If the
+        configuration <code>mapreduce.job.jvm.numtasks</code>. If the
         value is 1 (the default), then JVMs are not reused 
         (i.e. 1 task per JVM). If it is -1, there is no limit to the number
         of tasks a JVM can run (of the same job). One can also specify some
@@ -1379,26 +1382,26 @@
          for each task's execution: </p>
         <table>
           <tr><th>Name</th><th>Type</th><th>Description</th></tr>
-          <tr><td>mapred.job.id</td><td>String</td><td>The job id</td></tr>
-          <tr><td>mapred.jar</td><td>String</td>
+          <tr><td>mapreduce.job.id</td><td>String</td><td>The job id</td></tr>
+          <tr><td>mapreduce.job.jar</td><td>String</td>
               <td>job.jar location in job directory</td></tr>
-          <tr><td>job.local.dir</td><td> String</td>
+          <tr><td>mapreduce.job.local.dir</td><td> String</td>
               <td> The job specific shared scratch space</td></tr>
-          <tr><td>mapred.tip.id</td><td> String</td>
+          <tr><td>mapreduce.task.id</td><td> String</td>
               <td> The task id</td></tr>
-          <tr><td>mapred.task.id</td><td> String</td>
+          <tr><td>mapreduce.task.attempt.id</td><td> String</td>
               <td> The task attempt id</td></tr>
-          <tr><td>mapred.task.is.map</td><td> boolean </td>
+          <tr><td>mapreduce.task.ismap</td><td> boolean </td>
               <td>Is this a map task</td></tr>
-          <tr><td>mapred.task.partition</td><td> int </td>
+          <tr><td>mapreduce.task.partition</td><td> int </td>
               <td>The id of the task within the job</td></tr>
-          <tr><td>map.input.file</td><td> String</td>
+          <tr><td>mapreduce.map.input.file</td><td> String</td>
               <td> The filename that the map is reading from</td></tr>
-          <tr><td>map.input.start</td><td> long</td>
+          <tr><td>mapreduce.map.input.start</td><td> long</td>
               <td> The offset of the start of the map input split</td></tr>
-          <tr><td>map.input.length </td><td>long </td>
+          <tr><td>mapreduce.map.input.length </td><td>long </td>
               <td>The number of bytes in the map input split</td></tr>
-          <tr><td>mapred.work.output.dir</td><td> String </td>
+          <tr><td>mapreduce.task.output.dir</td><td> String </td>
               <td>The task's temporary output directory</td></tr>
         </table>
 
@@ -1406,7 +1409,7 @@
         <strong>Note:</strong>
         During the execution of a streaming job, the names of the "mapred" parameters are transformed. 
         The dots ( . ) become underscores ( _ ).
-        For example, mapred.job.id becomes mapred_job_id and mapred.jar becomes mapred_jar. 
+        For example, mapreduce.job.id becomes mapreduce.job.id and mapreduce.job.jar becomes mapreduce.job.jar. 
         To get the values in a streaming job's mapper/reducer use the parameter names with the underscores.
         </p>
         </section>
@@ -1547,7 +1550,7 @@
         <code>InputSplit</code> instances based on the total size, in bytes, of 
         the input files. However, the <code>FileSystem</code> blocksize of the 
         input files is treated as an upper bound for input splits. A lower bound
-        on the split size can be set via <code>mapred.min.split.size</code>.</p>
+        on the split size can be set via <code>mapreduce.input.fileinputformat.split.minsize</code>.</p>
  
         <p>Clearly, logical splits based on input-size is insufficient for many
         applications since record boundaries must be respected. In such cases, 
@@ -1579,7 +1582,7 @@
           
           <p><a href="ext:api/org/apache/hadoop/mapred/filesplit">
           FileSplit</a> is the default <code>InputSplit</code>. It sets 
-          <code>map.input.file</code> to the path of the input file for the
+          <code>mapreduce.map.input.file</code> to the path of the input file for the
           logical split.</p>
         </section>
         
@@ -1710,27 +1713,27 @@
           <p>To avoid these issues the MapReduce framework, when the 
           <code>OutputCommitter</code> is <code>FileOutputCommitter</code>, 
           maintains a special 
-          <code>${mapred.output.dir}/_temporary/_${taskid}</code> sub-directory
-          accessible via <code>${mapred.work.output.dir}</code>
+          <code>${mapreduce.output.fileoutputformat.outputdir}/_temporary/_${taskid}</code> sub-directory
+          accessible via <code>${mapreduce.task.output.dir}</code>
           for each task-attempt on the <code>FileSystem</code> where the output
           of the task-attempt is stored. On successful completion of the 
           task-attempt, the files in the 
-          <code>${mapred.output.dir}/_temporary/_${taskid}</code> (only) 
-          are <em>promoted</em> to <code>${mapred.output.dir}</code>. Of course, 
+          <code>${mapreduce.output.fileoutputformat.outputdir}/_temporary/_${taskid}</code> (only) 
+          are <em>promoted</em> to <code>${mapreduce.output.fileoutputformat.outputdir}</code>. Of course, 
           the framework discards the sub-directory of unsuccessful task-attempts. 
           This process is completely transparent to the application.</p>
  
           <p>The application-writer can take advantage of this feature by 
-          creating any side-files required in <code>${mapred.work.output.dir}</code>
+          creating any side-files required in <code>${mapreduce.task.output.dir}</code>
           during execution of a task via 
           <a href="ext:api/org/apache/hadoop/mapred/fileoutputformat/getworkoutputpath">
           FileOutputFormat.getWorkOutputPath()</a>, and the framework will promote them 
           similarly for succesful task-attempts, thus eliminating the need to 
           pick unique paths per task-attempt.</p>
           
-          <p>Note: The value of <code>${mapred.work.output.dir}</code> during 
+          <p>Note: The value of <code>${mapreduce.task.output.dir}</code> during 
           execution of a particular task-attempt is actually 
-          <code>${mapred.output.dir}/_temporary/_{$taskid}</code>, and this value is 
+          <code>${mapreduce.output.fileoutputformat.outputdir}/_temporary/_{$taskid}</code>, and this value is 
           set by the MapReduce framework. So, just create any side-files in the 
           path  returned by
           <a href="ext:api/org/apache/hadoop/mapred/fileoutputformat/getworkoutputpath">
@@ -1773,7 +1776,7 @@
           support multiple queues.</p>
           
           <p>A job defines the queue it needs to be submitted to through the
-          <code>mapred.job.queue.name</code> property, or through the
+          <code>mapreduce.job.queuename</code> property, or through the
           <a href="ext:api/org/apache/hadoop/mapred/jobconf/setqueuename">setQueueName(String)</a>
           API. Setting the queue name is optional. If a job is submitted 
           without an associated queue name, it is submitted to the 'default' 
@@ -1853,7 +1856,7 @@
           directory</code> of the task via the 
           <a href="ext:api/org/apache/hadoop/filecache/distributedcache/createsymlink">
           DistributedCache.createSymlink(Configuration)</a> api. Or by setting
-          the configuration property <code>mapred.create.symlink</code>
+          the configuration property <code>mapreduce.job.cache.symlink.create</code>
           as <code>yes</code>. The DistributedCache will use the 
           <code>fragment</code> of the URI as the name of the symlink. 
           For example, the URI 
@@ -1872,7 +1875,7 @@
           can be used to cache files/jars and also add them to the 
           <em>classpath</em> of child-jvm. The same can be done by setting
           the configuration properties 
-          <code>mapred.job.classpath.{files|archives}</code>. Similarly the
+          <code>mapreduce.job.classpath.{files|archives}</code>. Similarly the
           cached files that are symlinked into the working directory of the
           task can be used to distribute native libraries and load them.</p>
           
@@ -1991,7 +1994,7 @@
           
           <p>User can specify whether the system should collect profiler
           information for some of the tasks in the job by setting the
-          configuration property <code>mapred.task.profile</code>. The
+          configuration property <code>mapreduce.task.profile</code>. The
           value can be set using the api 
           <a href="ext:api/org/apache/hadoop/mapred/jobconf/setprofileenabled">
           JobConf.setProfileEnabled(boolean)</a>. If the value is set 
@@ -2001,7 +2004,7 @@
           
           <p>Once user configures that profiling is needed, she/he can use
           the configuration property 
-          <code>mapred.task.profile.{maps|reduces}</code> to set the ranges
+          <code>mapreduce.task.profile.{maps|reduces}</code> to set the ranges
           of MapReduce tasks to profile. The value can be set using the api 
           <a href="ext:api/org/apache/hadoop/mapred/jobconf/setprofiletaskrange">
           JobConf.setProfileTaskRange(boolean,String)</a>.
@@ -2009,7 +2012,7 @@
           
           <p>User can also specify the profiler configuration arguments by 
           setting the configuration property 
-          <code>mapred.task.profile.params</code>. The value can be specified 
+          <code>mapreduce.task.profile.params</code>. The value can be specified 
           using the api
           <a href="ext:api/org/apache/hadoop/mapred/jobconf/setprofileparams">
           JobConf.setProfileParams(String)</a>. If the string contains a 
@@ -2044,8 +2047,8 @@
           <section>
           <title> How to submit the script: </title>
           <p> A quick way to submit the debug script is to set values for the 
-          properties <code>mapred.map.task.debug.script</code> and 
-          <code>mapred.reduce.task.debug.script</code>, for debugging map and 
+          properties <code>mapreduce.map.debug.script</code> and 
+          <code>mapreduce.reduce.debug.script</code>, for debugging map and 
           reduce tasks respectively. These properties can also be set by using APIs 
           <a href="ext:api/org/apache/hadoop/mapred/jobconf/setmapdebugscript">
           JobConf.setMapDebugScript(String) </a> and
@@ -2409,7 +2412,7 @@
             <td>30.</td>
             <td>
               &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-              <code>inputFile = job.get("map.input.file");</code>
+              <code>inputFile = job.get("mapreduce.map.input.file");</code>
             </td>
           </tr>
           <tr>

Modified: hadoop/mapreduce/trunk/src/docs/src/documentation/content/xdocs/streaming.xml
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/trunk/src/docs/src/documentation/content/xdocs/streaming.xml?rev=816664&r1=816663&r2=816664&view=diff
==============================================================================
--- hadoop/mapreduce/trunk/src/docs/src/documentation/content/xdocs/streaming.xml (original)
+++ hadoop/mapreduce/trunk/src/docs/src/documentation/content/xdocs/streaming.xml Fri Sep 18 15:09:48 2009
@@ -223,9 +223,9 @@
 To specify additional local temp directories use:
 </p>
 <source>
-   -D mapred.local.dir=/tmp/local
-   -D mapred.system.dir=/tmp/system
-   -D mapred.temp.dir=/tmp/temp
+   -D mapreduce.cluster.local.dir=/tmp/local
+   -D mapreduce.jobtracker.system.dir=/tmp/system
+   -D mapreduce.cluster.temp.dir=/tmp/temp
 </source>
 <p><strong>Note:</strong> For more details on jobconf parameters see:
 <a href="ext:mapred-default">mapred-default.html</a></p>
@@ -234,14 +234,14 @@
 <section>
 <title>Specifying Map-Only Jobs </title>
 <p>
-Often, you may want to process input data using a map function only. To do this, simply set mapred.reduce.tasks to zero. 
+Often, you may want to process input data using a map function only. To do this, simply set mapreduce.job.reduces to zero. 
 The MapReduce framework will not create any reducer tasks. Rather, the outputs of the mapper tasks will be the final output of the job.
 </p>
 <source>
-    -D mapred.reduce.tasks=0
+    -D mapreduce.job.reduces=0
 </source>
 <p>
-To be backward compatible, Hadoop Streaming also supports the "-reduce NONE" option, which is equivalent to "-D mapred.reduce.tasks=0".
+To be backward compatible, Hadoop Streaming also supports the "-reduce NONE" option, which is equivalent to "-D mapreduce.job.reduces=0".
 </p>
 </section>
 
@@ -252,7 +252,7 @@
 </p>
 <source>
 $HADOOP_HOME/bin/hadoop  jar $HADOOP_HOME/hadoop-streaming.jar \
-    -D mapred.reduce.tasks=2 \
+    -D mapreduce.job.reduces=2 \
     -input myInputDirs \
     -output myOutputDir \
     -mapper org.apache.hadoop.mapred.lib.IdentityMapper \
@@ -350,9 +350,9 @@
 <source>
 $HADOOP_HOME/bin/hadoop  jar $HADOOP_HOME/hadoop-streaming.jar \
                   -archives 'hdfs://hadoop-nn1.example.com/user/me/samples/cachefile/cachedir.jar' \  
-                  -D mapred.map.tasks=1 \
-                  -D mapred.reduce.tasks=1 \ 
-                  -D mapred.job.name="Experiment" \
+                  -D mapreduce.job.maps=1 \
+                  -D mapreduce.job.reduces=1 \ 
+                  -D mapreduce.job.name="Experiment" \
                   -input "/user/me/samples/cachefile/input.txt"  \
                   -output "/user/me/samples/cachefile/out" \  
                   -mapper "xargs cat"  \
@@ -408,9 +408,9 @@
 $HADOOP_HOME/bin/hadoop  jar $HADOOP_HOME/hadoop-streaming.jar \
     -D stream.map.output.field.separator=. \
     -D stream.num.map.output.key.fields=4 \
-    -D map.output.key.field.separator=. \
-    -D mapred.text.key.partitioner.options=-k1,2 \
-    -D mapred.reduce.tasks=12 \
+    -D mapreduce.map.output.key.field.separator=. \
+    -D mapreduce.partition.keypartitioner.options=-k1,2 \
+    -D mapreduce.job.reduces=12 \
     -input myInputDirs \
     -output myOutputDir \
     -mapper org.apache.hadoop.mapred.lib.IdentityMapper \
@@ -423,8 +423,8 @@
 The map output keys of the above MapReduce job normally have four fields
 separated by ".". However, the MapReduce framework will partition the map
 outputs by the first two fields of the keys using the 
-<em>-D mapred.text.key.partitioner.options=-k1,2</em> option. 
-Here, <em>-D map.output.key.field.separator=.</em> specifies the separator 
+<em>-D mapreduce.partition.keypartitioner.options=-k1,2</em> option. 
+Here, <em>-D mapreduce.map.output.key.field.separator=.</em> specifies the separator 
 for the partition. This guarantees that all the key/value pairs with the 
 same first two fields in the keys will be partitioned into the same reducer.
 </p><p>
@@ -469,12 +469,12 @@
 </p>
 <source>
 $HADOOP_HOME/bin/hadoop  jar $HADOOP_HOME/hadoop-streaming.jar \
-    -D mapred.output.key.comparator.class=org.apache.hadoop.mapred.lib.KeyFieldBasedComparator \
+    -D mapreduce.job.output.key.comparator.class=org.apache.hadoop.mapred.lib.KeyFieldBasedComparator \
     -D stream.map.output.field.separator=. \
     -D stream.num.map.output.key.fields=4 \
-    -D map.output.key.field.separator=. \
-    -D mapred.text.key.comparator.options=-k2,2nr \
-    -D mapred.reduce.tasks=12 \
+    -D mapreduce.map.output.key.field.separator=. \
+    -D mapreduce.partition.keycomparator.options=-k2,2nr \
+    -D mapreduce.job.reduces=12 \
     -input myInputDirs \
     -output myOutputDir \
     -mapper org.apache.hadoop.mapred.lib.IdentityMapper \
@@ -484,7 +484,7 @@
 The map output keys of the above MapReduce job normally have four fields
 separated by ".". However, the MapReduce framework will sort the 
 outputs by the second field of the keys using the 
-<em>-D mapred.text.key.comparator.options=-k2,2nr</em> option. 
+<em>-D mapreduce.partition.keycomparator.options=-k2,2nr</em> option. 
 Here, <em>-n</em> specifies that the sorting is numerical sorting and 
 <em>-r</em> specifies that the result should be reversed. A simple illustration
 is shown below:
@@ -525,7 +525,7 @@
 </p>
 <source>
 $HADOOP_HOME/bin/hadoop  jar $HADOOP_HOME/hadoop-streaming.jar \
-    -D mapred.reduce.tasks=12 \
+    -D mapreduce.job.reduces=12 \
     -input myInputDirs \
     -output myOutputDir \
     -mapper myAggregatorForKeyCount.py \
@@ -570,11 +570,11 @@
 <source>
 $HADOOP_HOME/bin/hadoop  jar $HADOOP_HOME/hadoop-streaming.jar \
     -D map.output.key.field.separa=. \
-    -D mapred.text.key.partitioner.options=-k1,2 \
-    -D mapred.data.field.separator=. \
-    -D map.output.key.value.fields.spec=6,5,1-3:0- \
-    -D reduce.output.key.value.fields.spec=0-2:5- \
-    -D mapred.reduce.tasks=12 \
+    -D mapreduce.partition.keypartitioner.options=-k1,2 \
+    -D mapreduce.fieldsel.data.field.separator=. \
+    -D mapreduce.fieldsel.mapreduce.fieldsel.map.output.key.value.fields.spec=6,5,1-3:0- \
+    -D mapreduce.fieldsel.mapreduce.fieldsel.reduce.output.key.value.fields.spec=0-2:5- \
+    -D mapreduce.job.reduces=12 \
     -input myInputDirs \
     -output myOutputDir \
     -mapper org.apache.hadoop.mapred.lib.FieldSelectionMapReduce \
@@ -583,13 +583,13 @@
 </source>
 
 <p>
-The option "-D map.output.key.value.fields.spec=6,5,1-3:0-" specifies key/value selection for the map outputs. 
+The option "-D mapreduce.fieldsel.mapreduce.fieldsel.map.output.key.value.fields.spec=6,5,1-3:0-" specifies key/value selection for the map outputs. 
 Key selection spec and value selection spec are separated by ":". 
 In this case, the map output key will consist of fields 6, 5, 1, 2, and 3. 
 The map output value will consist of all fields (0- means field 0 and all the subsequent fields). 
 </p>
 <p>
-The option "-D reduce.output.key.value.fields.spec=0-2:5-" specifies 
+The option "-D mapreduce.fieldsel.mapreduce.fieldsel.reduce.output.key.value.fields.spec=0-2:5-" specifies 
 key/value selection for the reduce outputs. In this case, the reduce 
 output key will consist of fields 0, 1, 2 (corresponding to the original 
 fields 6, 5, 1). The reduce output value will consist of all fields starting
@@ -675,7 +675,7 @@
 dan     75
 
 $ c2='cut -f2'; $HADOOP_HOME/bin/hadoop jar $HADOOP_HOME/hadoop-streaming.jar \
-    -D mapred.job.name='Experiment'
+    -D mapreduce.job.name='Experiment'
     -input /user/me/samples/student_marks 
     -output /user/me/samples/student_out 
     -mapper \"$c2\" -reducer 'cat'  
@@ -734,7 +734,7 @@
 <section>
 <title>How do I generate output files with gzip format? </title>
 <p>
-Instead of plain text files, you can generate gzip files as your generated output. Pass '-D mapred.output.compress=true -D  mapred.output.compression.codec=org.apache.hadoop.io.compress.GzipCodec' as option to your streaming job.
+Instead of plain text files, you can generate gzip files as your generated output. Pass '-D mapreduce.output.fileoutputformat.compress=true -D  mapreduce.output.fileoutputformat.compression.codec=org.apache.hadoop.io.compress.GzipCodec' as option to your streaming job.
 </p>
 </section>
 
@@ -791,7 +791,7 @@
 <p>
 See the <a href="mapred_tutorial.html#Configured+Parameters">Configured Parameters</a>. 
 During the execution of a streaming job, the names of the "mapred" parameters are transformed. The dots ( . ) become underscores ( _ ).
-For example, mapred.job.id becomes mapred_job_id and mapred.jar becomes mapred_jar. In your code, use the parameter names with the underscores.
+For example, mapreduce.job.id becomes mapreduce.job.id and mapreduce.job.jar becomes mapreduce.job.jar. In your code, use the parameter names with the underscores.
 </p>
 </section>
 

Modified: hadoop/mapreduce/trunk/src/examples/org/apache/hadoop/examples/BaileyBorweinPlouffe.java
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/trunk/src/examples/org/apache/hadoop/examples/BaileyBorweinPlouffe.java?rev=816664&r1=816663&r2=816664&view=diff
==============================================================================
--- hadoop/mapreduce/trunk/src/examples/org/apache/hadoop/examples/BaileyBorweinPlouffe.java (original)
+++ hadoop/mapreduce/trunk/src/examples/org/apache/hadoop/examples/BaileyBorweinPlouffe.java Fri Sep 18 15:09:48 2009
@@ -68,7 +68,8 @@
   public static final String DESCRIPTION
       = "A map/reduce program that uses Bailey-Borwein-Plouffe to compute exact digits of Pi.";
 
-  private static final String NAME = BaileyBorweinPlouffe.class.getSimpleName();
+  private static final String NAME = "mapreduce." + 
+    BaileyBorweinPlouffe.class.getSimpleName();
 
   //custom job properties
   private static final String WORKING_DIR_PROPERTY = NAME + ".dir";
@@ -327,11 +328,11 @@
     job.setInputFormatClass(BbpInputFormat.class);
 
     // disable task timeout
-    jobconf.setLong("mapred.task.timeout", 0);
+    jobconf.setLong(JobContext.TASK_TIMEOUT, 0);
 
     // do not use speculative execution
-    jobconf.setBoolean("mapred.map.tasks.speculative.execution", false);
-    jobconf.setBoolean("mapred.reduce.tasks.speculative.execution", false);
+    jobconf.setBoolean(JobContext.MAP_SPECULATIVE, false);
+    jobconf.setBoolean(JobContext.REDUCE_SPECULATIVE, false);
     return job;
   }
 

Modified: hadoop/mapreduce/trunk/src/examples/org/apache/hadoop/examples/Grep.java
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/trunk/src/examples/org/apache/hadoop/examples/Grep.java?rev=816664&r1=816663&r2=816664&view=diff
==============================================================================
--- hadoop/mapreduce/trunk/src/examples/org/apache/hadoop/examples/Grep.java (original)
+++ hadoop/mapreduce/trunk/src/examples/org/apache/hadoop/examples/Grep.java Fri Sep 18 15:09:48 2009
@@ -52,9 +52,9 @@
           Integer.toString(new Random().nextInt(Integer.MAX_VALUE)));
 
     Configuration conf = getConf();
-    conf.set("mapred.mapper.regex", args[2]);
+    conf.set(RegexMapper.PATTERN, args[2]);
     if (args.length == 4)
-      conf.set("mapred.mapper.regex.group", args[3]);
+      conf.set(RegexMapper.GROUP, args[3]);
 
     Job grepJob = new Job(conf);
     

Modified: hadoop/mapreduce/trunk/src/examples/org/apache/hadoop/examples/Join.java
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/trunk/src/examples/org/apache/hadoop/examples/Join.java?rev=816664&r1=816663&r2=816664&view=diff
==============================================================================
--- hadoop/mapreduce/trunk/src/examples/org/apache/hadoop/examples/Join.java (original)
+++ hadoop/mapreduce/trunk/src/examples/org/apache/hadoop/examples/Join.java Fri Sep 18 15:09:48 2009
@@ -52,7 +52,7 @@
  *            [<i>in-dir</i>]* <i>in-dir</i> <i>out-dir</i> 
  */
 public class Join extends Configured implements Tool {
-
+  public static String REDUCES_PER_HOST = "mapreduce.join.reduces_per_host";
   static int printUsage() {
     System.out.println("join [-r <reduces>] " +
                        "[-inFormat <input format class>] " +
@@ -77,7 +77,7 @@
     JobClient client = new JobClient(conf);
     ClusterStatus cluster = client.getClusterStatus();
     int num_reduces = (int) (cluster.getMaxReduceTasks() * 0.9);
-    String join_reduces = conf.get("mapreduce.join.reduces_per_host");
+    String join_reduces = conf.get(REDUCES_PER_HOST);
     if (join_reduces != null) {
        num_reduces = cluster.getTaskTrackers() * 
                        Integer.parseInt(join_reduces);

Modified: hadoop/mapreduce/trunk/src/examples/org/apache/hadoop/examples/RandomTextWriter.java
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/trunk/src/examples/org/apache/hadoop/examples/RandomTextWriter.java?rev=816664&r1=816663&r2=816664&view=diff
==============================================================================
--- hadoop/mapreduce/trunk/src/examples/org/apache/hadoop/examples/RandomTextWriter.java (original)
+++ hadoop/mapreduce/trunk/src/examples/org/apache/hadoop/examples/RandomTextWriter.java Fri Sep 18 15:09:48 2009
@@ -21,7 +21,6 @@
 import java.io.IOException;
 import java.util.ArrayList;
 import java.util.Date;
-import java.util.Formatter;
 import java.util.List;
 import java.util.Random;
 
@@ -48,23 +47,23 @@
  * <?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
  * <configuration>
  *   <property>
- *     <name>test.randomtextwrite.min_words_key</name>
+ *     <name>mapreduce.randomtextwriter.minwordskey</name>
  *     <value>5</value>
  *   </property>
  *   <property>
- *     <name>test.randomtextwrite.max_words_key</name>
+ *     <name>mapreduce.randomtextwriter.maxwordskey</name>
  *     <value>10</value>
  *   </property>
  *   <property>
- *     <name>test.randomtextwrite.min_words_value</name>
+ *     <name>mapreduce.randomtextwriter.minwordsvalue</name>
  *     <value>20</value>
  *   </property>
  *   <property>
- *     <name>test.randomtextwrite.max_words_value</name>
+ *     <name>mapreduce.randomtextwriter.maxwordsvalue</name>
  *     <value>100</value>
  *   </property>
  *   <property>
- *     <name>test.randomtextwrite.total_bytes</name>
+ *     <name>mapreduce.randomtextwriter.totalbytes</name>
  *     <value>1099511627776</value>
  *   </property>
  * </configuration></xmp>
@@ -76,6 +75,16 @@
  *            [-outFormat <i>output format class</i>] <i>output</i> 
  */
 public class RandomTextWriter extends Configured implements Tool {
+  public static final String TOTAL_BYTES = 
+    "mapreduce.randomtextwriter.totalbytes";
+  public static final String BYTES_PER_MAP = 
+    "mapreduce.randomtextwriter.bytespermap";
+  public static final String MAPS_PER_HOST = 
+    "mapreduce.randomtextwriter.mapsperhost";
+  public static final String MAX_VALUE = "mapreduce.randomtextwriter.maxwordsvalue";
+  public static final String MIN_VALUE = "mapreduce.randomtextwriter.minwordsvalue";
+  public static final String MIN_KEY = "mapreduce.randomtextwriter.minwordskey";
+  public static final String MAX_KEY = "mapreduce.randomtextwriter.maxwordskey";
   
   static int printUsage() {
     System.out.println("randomtextwriter " +
@@ -97,35 +106,19 @@
     private int wordsInKeyRange;
     private int minWordsInValue;
     private int wordsInValueRange;
-
-    private final Random random = new Random();
-    private final Text keyWords = new Text();
-    private final Text valueWords = new Text();
-    private final String STATUS_MSG = "wrote record %d. %d bytes left.";
-    private final Formatter statusFormat = new Formatter(new StringBuilder());
-
-    private Counter byteCounter;
-    private Counter recordCounter;
-
+    private Random random = new Random();
+    
     /**
      * Save the configuration value that we need to write the data.
      */
     public void setup(Context context) {
       Configuration conf = context.getConfiguration();
-      numBytesToWrite = conf.getLong("test.randomtextwrite.bytes_per_map",
+      numBytesToWrite = conf.getLong(BYTES_PER_MAP,
                                     1*1024*1024*1024);
-      minWordsInKey = 
-        conf.getInt("test.randomtextwrite.min_words_key", 5);
-      wordsInKeyRange = 
-        (conf.getInt("test.randomtextwrite.max_words_key", 10) - 
-         minWordsInKey);
-      minWordsInValue = 
-        conf.getInt("test.randomtextwrite.min_words_value", 10);
-      wordsInValueRange = 
-        (conf.getInt("test.randomtextwrite.max_words_value", 100) - 
-         minWordsInValue);
-      byteCounter = context.getCounter(Counters.BYTES_WRITTEN);
-      recordCounter = context.getCounter(Counters.RECORDS_WRITTEN);
+      minWordsInKey = conf.getInt(MIN_KEY, 5);
+      wordsInKeyRange = (conf.getInt(MAX_KEY, 10) - minWordsInKey);
+      minWordsInValue = conf.getInt(MIN_VALUE, 10);
+      wordsInValueRange = (conf.getInt(MAX_VALUE, 100) - minWordsInValue);
     }
     
     /**
@@ -136,39 +129,38 @@
       int itemCount = 0;
       while (numBytesToWrite > 0) {
         // Generate the key/value 
-        final int noWordsKey = minWordsInKey +
+        int noWordsKey = minWordsInKey + 
           (wordsInKeyRange != 0 ? random.nextInt(wordsInKeyRange) : 0);
-        final int noWordsValue = minWordsInValue +
+        int noWordsValue = minWordsInValue + 
           (wordsInValueRange != 0 ? random.nextInt(wordsInValueRange) : 0);
-
-        int recordBytes = generateSentence(keyWords, noWordsKey);
-        recordBytes += generateSentence(valueWords, noWordsValue);
-        numBytesToWrite -= recordBytes;
-
+        Text keyWords = generateSentence(noWordsKey);
+        Text valueWords = generateSentence(noWordsValue);
+        
         // Write the sentence 
         context.write(keyWords, valueWords);
-
+        
+        numBytesToWrite -= (keyWords.getLength() + valueWords.getLength());
+        
         // Update counters, progress etc.
-        recordCounter.increment(1);
-        byteCounter.increment(recordBytes);
-
-        if (++itemCount % 1000 == 0) {
-          ((StringBuilder)statusFormat.out()).setLength(0);
-          context.setStatus(statusFormat.format(STATUS_MSG,
-                itemCount, numBytesToWrite).toString());
+        context.getCounter(Counters.BYTES_WRITTEN).increment(
+                  keyWords.getLength() + valueWords.getLength());
+        context.getCounter(Counters.RECORDS_WRITTEN).increment(1);
+        if (++itemCount % 200 == 0) {
+          context.setStatus("wrote record " + itemCount + ". " + 
+                             numBytesToWrite + " bytes left.");
         }
       }
       context.setStatus("done with " + itemCount + " records.");
     }
     
-    private int generateSentence(Text txt, int noWords) {
-      txt.clear();
+    private Text generateSentence(int noWords) {
+      StringBuffer sentence = new StringBuffer();
+      String space = " ";
       for (int i=0; i < noWords; ++i) {
-        final Text word = words[random.nextInt(words.length)];
-        txt.append(word.getBytes(), 0, word.getLength());
-        txt.append(SPACE, 0, SPACE.length);
+        sentence.append(words[random.nextInt(words.length)]);
+        sentence.append(space);
       }
-      return txt.getLength();
+      return new Text(sentence.toString());
     }
   }
   
@@ -187,21 +179,21 @@
     Configuration conf = getConf();
     JobClient client = new JobClient(conf);
     ClusterStatus cluster = client.getClusterStatus();
-    int numMapsPerHost = conf.getInt("test.randomtextwrite.maps_per_host", 10);
-    long numBytesToWritePerMap = conf.getLong("test.randomtextwrite.bytes_per_map",
+    int numMapsPerHost = conf.getInt(MAPS_PER_HOST, 10);
+    long numBytesToWritePerMap = conf.getLong(BYTES_PER_MAP,
                                              1*1024*1024*1024);
     if (numBytesToWritePerMap == 0) {
-      System.err.println("Cannot have test.randomtextwrite.bytes_per_map set to 0");
+      System.err.println("Cannot have " + BYTES_PER_MAP +" set to 0");
       return -2;
     }
-    long totalBytesToWrite = conf.getLong("test.randomtextwrite.total_bytes", 
+    long totalBytesToWrite = conf.getLong(TOTAL_BYTES, 
          numMapsPerHost*numBytesToWritePerMap*cluster.getTaskTrackers());
     int numMaps = (int) (totalBytesToWrite / numBytesToWritePerMap);
     if (numMaps == 0 && totalBytesToWrite > 0) {
       numMaps = 1;
-      conf.setLong("test.randomtextwrite.bytes_per_map", totalBytesToWrite);
+      conf.setLong(BYTES_PER_MAP, totalBytesToWrite);
     }
-    conf.setInt("mapred.map.tasks", numMaps);
+    conf.setInt(JobContext.NUM_MAPS, numMaps);
     
     Job job = new Job(conf);
     
@@ -257,12 +249,10 @@
     System.exit(res);
   }
 
-  private static final byte[] SPACE = " ".getBytes();
-
   /**
    * A random list of 100 words from /usr/share/dict/words
    */
-  private final static Text[] words = buildText(new String[] {
+  private static String[] words = {
                                    "diurnalness", "Homoiousian",
                                    "spiranthic", "tetragynian",
                                    "silverhead", "ungreat",
@@ -763,14 +753,5 @@
                                    "sterilely", "unrealize",
                                    "unpatched", "hypochondriacism",
                                    "critically", "cheesecutter",
-                                  });
-
-  private static Text[] buildText(String[] str) {
-    Text[] ret = new Text[str.length];
-    for (int i = 0; i < str.length; ++i) {
-      ret[i] = new Text(str[i]);
-    }
-    return ret;
-  }
-
+                                  };
 }

Modified: hadoop/mapreduce/trunk/src/examples/org/apache/hadoop/examples/RandomWriter.java
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/trunk/src/examples/org/apache/hadoop/examples/RandomWriter.java?rev=816664&r1=816663&r2=816664&view=diff
==============================================================================
--- hadoop/mapreduce/trunk/src/examples/org/apache/hadoop/examples/RandomWriter.java (original)
+++ hadoop/mapreduce/trunk/src/examples/org/apache/hadoop/examples/RandomWriter.java Fri Sep 18 15:09:48 2009
@@ -52,23 +52,23 @@
  * <?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
  * <configuration>
  *   <property>
- *     <name>test.randomwrite.min_key</name>
+ *     <name>mapreduce.randomwriter.minkey</name>
  *     <value>10</value>
  *   </property>
  *   <property>
- *     <name>test.randomwrite.max_key</name>
+ *     <name>mapreduce.randomwriter.maxkey</name>
  *     <value>10</value>
  *   </property>
  *   <property>
- *     <name>test.randomwrite.min_value</name>
+ *     <name>mapreduce.randomwriter.minvalue</name>
  *     <value>90</value>
  *   </property>
  *   <property>
- *     <name>test.randomwrite.max_value</name>
+ *     <name>mapreduce.randomwriter.maxvalue</name>
  *     <value>90</value>
  *   </property>
  *   <property>
- *     <name>test.randomwrite.total_bytes</name>
+ *     <name>mapreduce.randomwriter.totalbytes</name>
  *     <value>1099511627776</value>
  *   </property>
  * </configuration></xmp>
@@ -77,6 +77,15 @@
  * and ones supported by {@link GenericOptionsParser} via the command-line.
  */
 public class RandomWriter extends Configured implements Tool {
+  public static final String TOTAL_BYTES = "mapreduce.randomwriter.totalbytes";
+  public static final String BYTES_PER_MAP = 
+    "mapreduce.randomwriter.bytespermap";
+  public static final String MAPS_PER_HOST = 
+    "mapreduce.randomwriter.mapsperhost";
+  public static final String MAX_VALUE = "mapreduce.randomwriter.maxvalue";
+  public static final String MIN_VALUE = "mapreduce.randomwriter.minvalue";
+  public static final String MIN_KEY = "mapreduce.randomwriter.minkey";
+  public static final String MAX_KEY = "mapreduce.randomwriter.maxkey";
   
   /**
    * User counters
@@ -97,7 +106,7 @@
       List<InputSplit> result = new ArrayList<InputSplit>();
       Path outDir = FileOutputFormat.getOutputPath(job);
       int numSplits = 
-            job.getConfiguration().getInt("mapred.map.tasks", 1);
+            job.getConfiguration().getInt(JobContext.NUM_MAPS, 1);
       for(int i=0; i < numSplits; ++i) {
         result.add(new FileSplit(new Path(outDir, "dummy-split-" + i), 0, 1, 
                                   (String[])null));
@@ -207,14 +216,14 @@
     @Override
     public void setup(Context context) {
       Configuration conf = context.getConfiguration();
-      numBytesToWrite = conf.getLong("test.randomwrite.bytes_per_map",
+      numBytesToWrite = conf.getLong(BYTES_PER_MAP,
                                     1*1024*1024*1024);
-      minKeySize = conf.getInt("test.randomwrite.min_key", 10);
+      minKeySize = conf.getInt(MIN_KEY, 10);
       keySizeRange = 
-        conf.getInt("test.randomwrite.max_key", 1000) - minKeySize;
-      minValueSize = conf.getInt("test.randomwrite.min_value", 0);
+        conf.getInt(MAX_KEY, 1000) - minKeySize;
+      minValueSize = conf.getInt(MIN_VALUE, 0);
       valueSizeRange = 
-        conf.getInt("test.randomwrite.max_value", 20000) - minValueSize;
+        conf.getInt(MAX_VALUE, 20000) - minValueSize;
     }
   }
   
@@ -236,21 +245,21 @@
     Configuration conf = getConf();
     JobClient client = new JobClient(conf);
     ClusterStatus cluster = client.getClusterStatus();
-    int numMapsPerHost = conf.getInt("test.randomwriter.maps_per_host", 10);
-    long numBytesToWritePerMap = conf.getLong("test.randomwrite.bytes_per_map",
+    int numMapsPerHost = conf.getInt(MAPS_PER_HOST, 10);
+    long numBytesToWritePerMap = conf.getLong(BYTES_PER_MAP,
                                              1*1024*1024*1024);
     if (numBytesToWritePerMap == 0) {
-      System.err.println("Cannot have test.randomwrite.bytes_per_map set to 0");
+      System.err.println("Cannot have" + BYTES_PER_MAP + " set to 0");
       return -2;
     }
-    long totalBytesToWrite = conf.getLong("test.randomwrite.total_bytes", 
+    long totalBytesToWrite = conf.getLong(TOTAL_BYTES, 
          numMapsPerHost*numBytesToWritePerMap*cluster.getTaskTrackers());
     int numMaps = (int) (totalBytesToWrite / numBytesToWritePerMap);
     if (numMaps == 0 && totalBytesToWrite > 0) {
       numMaps = 1;
-      conf.setLong("test.randomwrite.bytes_per_map", totalBytesToWrite);
+      conf.setLong(BYTES_PER_MAP, totalBytesToWrite);
     }
-    conf.setInt("mapred.map.tasks", numMaps);
+    conf.setInt(JobContext.NUM_MAPS, numMaps);
 
     Job job = new Job(conf);
     

Modified: hadoop/mapreduce/trunk/src/examples/org/apache/hadoop/examples/Sort.java
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/trunk/src/examples/org/apache/hadoop/examples/Sort.java?rev=816664&r1=816663&r2=816664&view=diff
==============================================================================
--- hadoop/mapreduce/trunk/src/examples/org/apache/hadoop/examples/Sort.java (original)
+++ hadoop/mapreduce/trunk/src/examples/org/apache/hadoop/examples/Sort.java Fri Sep 18 15:09:48 2009
@@ -55,6 +55,8 @@
  *            <i>in-dir</i> <i>out-dir</i> 
  */
 public class Sort<K,V> extends Configured implements Tool {
+  public static final String REDUCES_PER_HOST = 
+    "mapreduce.sort.reducesperhost";
   private Job job = null;
 
   static int printUsage() {
@@ -81,7 +83,7 @@
     JobClient client = new JobClient(conf);
     ClusterStatus cluster = client.getClusterStatus();
     int num_reduces = (int) (cluster.getMaxReduceTasks() * 0.9);
-    String sort_reduces = conf.get("test.sort.reduces_per_host");
+    String sort_reduces = conf.get(REDUCES_PER_HOST);
     if (sort_reduces != null) {
        num_reduces = cluster.getTaskTrackers() * 
                        Integer.parseInt(sort_reduces);

Modified: hadoop/mapreduce/trunk/src/examples/org/apache/hadoop/examples/dancing/DistributedPentomino.java
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/trunk/src/examples/org/apache/hadoop/examples/dancing/DistributedPentomino.java?rev=816664&r1=816663&r2=816664&view=diff
==============================================================================
--- hadoop/mapreduce/trunk/src/examples/org/apache/hadoop/examples/dancing/DistributedPentomino.java (original)
+++ hadoop/mapreduce/trunk/src/examples/org/apache/hadoop/examples/dancing/DistributedPentomino.java Fri Sep 18 15:09:48 2009
@@ -109,11 +109,11 @@
     public void setup(Context context) {
       this.context = context;
       Configuration conf = context.getConfiguration();
-      depth = conf.getInt("pent.depth", PENT_DEPTH);
-      width = conf.getInt("pent.width", PENT_WIDTH);
-      height = conf.getInt("pent.height", PENT_HEIGHT);
+      depth = conf.getInt(Pentomino.DEPTH, PENT_DEPTH);
+      width = conf.getInt(Pentomino.WIDTH, PENT_WIDTH);
+      height = conf.getInt(Pentomino.HEIGHT, PENT_HEIGHT);
       pent = (Pentomino) 
-        ReflectionUtils.newInstance(conf.getClass("pent.class", 
+        ReflectionUtils.newInstance(conf.getClass(Pentomino.CLASS, 
                                                   OneSidedPentomino.class), 
                                     conf);
       pent.initialize(width, height);
@@ -172,12 +172,12 @@
     }
 
     Configuration conf = getConf();
-    int width = conf.getInt("pent.width", PENT_WIDTH);
-    int height = conf.getInt("pent.height", PENT_HEIGHT);
-    int depth = conf.getInt("pent.depth", PENT_DEPTH);
-    Class<? extends Pentomino> pentClass = conf.getClass("pent.class", 
+    int width = conf.getInt(Pentomino.WIDTH, PENT_WIDTH);
+    int height = conf.getInt(Pentomino.HEIGHT, PENT_HEIGHT);
+    int depth = conf.getInt(Pentomino.DEPTH, PENT_DEPTH);
+    Class<? extends Pentomino> pentClass = conf.getClass(Pentomino.CLASS, 
       OneSidedPentomino.class, Pentomino.class);
-    int numMaps = conf.getInt("mapred.map.tasks", DEFAULT_MAPS);
+    int numMaps = conf.getInt(JobContext.NUM_MAPS, DEFAULT_MAPS);
     Path output = new Path(args[0]);
     Path input = new Path(output + "_input");
     FileSystem fileSys = FileSystem.get(conf);

Modified: hadoop/mapreduce/trunk/src/examples/org/apache/hadoop/examples/dancing/Pentomino.java
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/trunk/src/examples/org/apache/hadoop/examples/dancing/Pentomino.java?rev=816664&r1=816663&r2=816664&view=diff
==============================================================================
--- hadoop/mapreduce/trunk/src/examples/org/apache/hadoop/examples/dancing/Pentomino.java (original)
+++ hadoop/mapreduce/trunk/src/examples/org/apache/hadoop/examples/dancing/Pentomino.java Fri Sep 18 15:09:48 2009
@@ -21,6 +21,10 @@
 import java.util.*;
 
 public class Pentomino {
+  public static final String DEPTH = "mapreduce.pentomino.depth";
+  public static final String WIDTH = "mapreduce.pentomino.width";
+  public static final String HEIGHT = "mapreduce.pentomino.height";
+  public static final String CLASS = "mapreduce.pentomino.class";
 
   /**
    * This interface just is a marker for what types I expect to get back

Modified: hadoop/mapreduce/trunk/src/examples/org/apache/hadoop/examples/pi/DistSum.java
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/trunk/src/examples/org/apache/hadoop/examples/pi/DistSum.java?rev=816664&r1=816663&r2=816664&view=diff
==============================================================================
--- hadoop/mapreduce/trunk/src/examples/org/apache/hadoop/examples/pi/DistSum.java (original)
+++ hadoop/mapreduce/trunk/src/examples/org/apache/hadoop/examples/pi/DistSum.java Fri Sep 18 15:09:48 2009
@@ -68,7 +68,7 @@
   private static final Log LOG = LogFactory.getLog(DistSum.class);
 
   private static final String NAME = DistSum.class.getSimpleName();
-  private static final String N_PARTS = NAME + ".nParts";
+  private static final String N_PARTS = "mapreduce.pi." + NAME + ".nParts";
   /////////////////////////////////////////////////////////////////////////////
   /** DistSum job parameters */
   static class Parameters {
@@ -433,10 +433,10 @@
     SummationWritable.write(sigma, DistSum.class, jobconf);
 
     // disable task timeout
-    jobconf.setLong("mapred.task.timeout", 0);
+    jobconf.setLong(JobContext.TASK_TIMEOUT, 0);
     // do not use speculative execution
-    jobconf.setBoolean("mapred.map.tasks.speculative.execution", false);
-    jobconf.setBoolean("mapred.reduce.tasks.speculative.execution", false);
+    jobconf.setBoolean(JobContext.MAP_SPECULATIVE, false);
+    jobconf.setBoolean(JobContext.REDUCE_SPECULATIVE, false);
 
     return job; 
   }

Modified: hadoop/mapreduce/trunk/src/examples/org/apache/hadoop/examples/terasort/TeraGen.java
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/trunk/src/examples/org/apache/hadoop/examples/terasort/TeraGen.java?rev=816664&r1=816663&r2=816664&view=diff
==============================================================================
--- hadoop/mapreduce/trunk/src/examples/org/apache/hadoop/examples/terasort/TeraGen.java (original)
+++ hadoop/mapreduce/trunk/src/examples/org/apache/hadoop/examples/terasort/TeraGen.java Fri Sep 18 15:09:48 2009
@@ -59,6 +59,7 @@
  */
 public class TeraGen extends Configured implements Tool {
 
+  public static String NUM_ROWS = "mapreduce.terasort.num-rows";
   /**
    * An input format that assigns ranges of longs to each mapper.
    */
@@ -176,11 +177,11 @@
   }
   
   static long getNumberOfRows(JobConf job) {
-    return job.getLong("terasort.num-rows", 0);
+    return job.getLong(NUM_ROWS, 0);
   }
   
   static void setNumberOfRows(JobConf job, long numRows) {
-    job.setLong("terasort.num-rows", numRows);
+    job.setLong(NUM_ROWS, numRows);
   }
 
   static class RandomGenerator {
@@ -333,7 +334,7 @@
     }
 
   }
-
+  
   /**
    * @param args the cli arguments
    */

Modified: hadoop/mapreduce/trunk/src/examples/org/apache/hadoop/examples/terasort/TeraInputFormat.java
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/trunk/src/examples/org/apache/hadoop/examples/terasort/TeraInputFormat.java?rev=816664&r1=816663&r2=816664&view=diff
==============================================================================
--- hadoop/mapreduce/trunk/src/examples/org/apache/hadoop/examples/terasort/TeraInputFormat.java (original)
+++ hadoop/mapreduce/trunk/src/examples/org/apache/hadoop/examples/terasort/TeraInputFormat.java Fri Sep 18 15:09:48 2009
@@ -46,7 +46,7 @@
 public class TeraInputFormat extends FileInputFormat<Text,Text> {
 
   static final String PARTITION_FILENAME = "_partition.lst";
-  static final String SAMPLE_SIZE = "terasort.partitions.sample";
+  static final String SAMPLE_SIZE = "mapreduce.terasort.partitions.sample";
   private static JobConf lastConf = null;
   private static InputSplit[] lastResult = null;
 

Modified: hadoop/mapreduce/trunk/src/examples/org/apache/hadoop/examples/terasort/TeraOutputFormat.java
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/trunk/src/examples/org/apache/hadoop/examples/terasort/TeraOutputFormat.java?rev=816664&r1=816663&r2=816664&view=diff
==============================================================================
--- hadoop/mapreduce/trunk/src/examples/org/apache/hadoop/examples/terasort/TeraOutputFormat.java (original)
+++ hadoop/mapreduce/trunk/src/examples/org/apache/hadoop/examples/terasort/TeraOutputFormat.java Fri Sep 18 15:09:48 2009
@@ -34,7 +34,7 @@
  * A streamlined text output format that writes key, value, and "\r\n".
  */
 public class TeraOutputFormat extends TextOutputFormat<Text,Text> {
-  static final String FINAL_SYNC_ATTRIBUTE = "terasort.final.sync";
+  static final String FINAL_SYNC_ATTRIBUTE = "mapreduce.terasort.final.sync";
 
   /**
    * Set the requirement for a final sync before the stream is closed.

Modified: hadoop/mapreduce/trunk/src/examples/org/apache/hadoop/examples/terasort/TeraValidate.java
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/trunk/src/examples/org/apache/hadoop/examples/terasort/TeraValidate.java?rev=816664&r1=816663&r2=816664&view=diff
==============================================================================
--- hadoop/mapreduce/trunk/src/examples/org/apache/hadoop/examples/terasort/TeraValidate.java (original)
+++ hadoop/mapreduce/trunk/src/examples/org/apache/hadoop/examples/terasort/TeraValidate.java Fri Sep 18 15:09:48 2009
@@ -33,6 +33,7 @@
 import org.apache.hadoop.mapred.OutputCollector;
 import org.apache.hadoop.mapred.Reducer;
 import org.apache.hadoop.mapred.Reporter;
+import org.apache.hadoop.mapreduce.lib.input.FileInputFormat;
 import org.apache.hadoop.util.Tool;
 import org.apache.hadoop.util.ToolRunner;
 
@@ -140,7 +141,7 @@
     // force a single reducer
     job.setNumReduceTasks(1);
     // force a single split 
-    job.setLong("mapred.min.split.size", Long.MAX_VALUE);
+    job.setLong(FileInputFormat.SPLIT_MINSIZE, Long.MAX_VALUE);
     job.setInputFormat(TeraInputFormat.class);
     JobClient.runJob(job);
     return 0;

Modified: hadoop/mapreduce/trunk/src/examples/org/apache/hadoop/examples/terasort/package.html
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/trunk/src/examples/org/apache/hadoop/examples/terasort/package.html?rev=816664&r1=816663&r2=816664&view=diff
==============================================================================
--- hadoop/mapreduce/trunk/src/examples/org/apache/hadoop/examples/terasort/package.html (original)
+++ hadoop/mapreduce/trunk/src/examples/org/apache/hadoop/examples/terasort/package.html Fri Sep 18 15:09:48 2009
@@ -102,8 +102,9 @@
 1800 tasks to generate a total of 10 billion rows in HDFS, with a
 block size of 1024 MB.
 TeraSort was configured with 1800 maps and 1800 reduces, and
-<i>io.sort.mb</i>,
-<i>io.sort.factor</i>, <i>fs.inmemory.size.mb</i>, and task heap size
+<i>mapreduce.task.io.sort.mb</i>,
+<i>mapreduce.task.io.sort.factor</i>,
+<i>fs.inmemory.size.mb</i>, and task heap size
 sufficient that transient data was never spilled to disk, other at the
 end of the map. The sampler looked at 100,000 keys to determine the
 reduce boundaries, which lead to imperfect balancing with reduce

Modified: hadoop/mapreduce/trunk/src/examples/pipes/conf/word-part.xml
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/trunk/src/examples/pipes/conf/word-part.xml?rev=816664&r1=816663&r2=816664&view=diff
==============================================================================
--- hadoop/mapreduce/trunk/src/examples/pipes/conf/word-part.xml (original)
+++ hadoop/mapreduce/trunk/src/examples/pipes/conf/word-part.xml Fri Sep 18 15:09:48 2009
@@ -2,22 +2,22 @@
 <configuration>
 
 <property>
-  <name>mapred.reduce.tasks</name>
+  <name>mapreduce.job.reduces</name>
   <value>2</value>
 </property>
 
 <property>
-  <name>hadoop.pipes.executable</name>
+  <name>mapreduce.pipes.executable</name>
   <value>hdfs:/examples/bin/wordcount-part</value>
 </property>
 
 <property>
-  <name>hadoop.pipes.java.recordreader</name>
+  <name>mapreduce.pipes.isjavarecordreader</name>
   <value>true</value>
 </property>
 
 <property>
-  <name>hadoop.pipes.java.recordwriter</name>
+  <name>mapreduce.pipes.isjavarecordwriter</name>
   <value>true</value>
 </property>
 

Modified: hadoop/mapreduce/trunk/src/examples/pipes/conf/word.xml
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/trunk/src/examples/pipes/conf/word.xml?rev=816664&r1=816663&r2=816664&view=diff
==============================================================================
--- hadoop/mapreduce/trunk/src/examples/pipes/conf/word.xml (original)
+++ hadoop/mapreduce/trunk/src/examples/pipes/conf/word.xml Fri Sep 18 15:09:48 2009
@@ -2,12 +2,12 @@
 <configuration>
 
 <property>
-  <name>mapred.reduce.tasks</name>
+  <name>mapreduce.job.reduces</name>
   <value>2</value>
 </property>
 
 <property>
-  <name>hadoop.pipes.executable</name>
+  <name>mapreduce.pipes.executable</name>
   <value>/examples/bin/wordcount-simple#wordcount-simple</value>
   <description> Executable path is given as "path#executable-name"
                 sothat the executable will have a symlink in working directory.
@@ -16,12 +16,12 @@
 </property>
 
 <property>
-  <name>hadoop.pipes.java.recordreader</name>
+  <name>mapreduce.pipes.java.recordreader</name>
   <value>true</value>
 </property>
 
 <property>
-  <name>hadoop.pipes.java.recordwriter</name>
+  <name>mapreduce.pipes.java.recordwriter</name>
   <value>true</value>
 </property>
 

Modified: hadoop/mapreduce/trunk/src/examples/pipes/impl/sort.cc
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/trunk/src/examples/pipes/impl/sort.cc?rev=816664&r1=816663&r2=816664&view=diff
==============================================================================
--- hadoop/mapreduce/trunk/src/examples/pipes/impl/sort.cc (original)
+++ hadoop/mapreduce/trunk/src/examples/pipes/impl/sort.cc Fri Sep 18 15:09:48 2009
@@ -52,7 +52,7 @@
   }
 };
 
-const std::string SortMap::MAP_KEEP_PERCENT("hadoop.sort.map.keep.percent");
+const std::string SortMap::MAP_KEEP_PERCENT("mapreduce.loadgen.sort.map.preserve.percent");
 
 class SortReduce: public HadoopPipes::Reducer {
 private:
@@ -87,7 +87,7 @@
 };
 
 const std::string 
-  SortReduce::REDUCE_KEEP_PERCENT("hadoop.sort.reduce.keep.percent");
+  SortReduce::REDUCE_KEEP_PERCENT("mapreduce.loadgen.sort.reduce.preserve.percent");
 
 int main(int argc, char *argv[]) {
   return HadoopPipes::runTask(HadoopPipes::TemplateFactory<SortMap,

Modified: hadoop/mapreduce/trunk/src/examples/pipes/impl/wordcount-nopipe.cc
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/trunk/src/examples/pipes/impl/wordcount-nopipe.cc?rev=816664&r1=816663&r2=816664&view=diff
==============================================================================
--- hadoop/mapreduce/trunk/src/examples/pipes/impl/wordcount-nopipe.cc (original)
+++ hadoop/mapreduce/trunk/src/examples/pipes/impl/wordcount-nopipe.cc Fri Sep 18 15:09:48 2009
@@ -118,8 +118,8 @@
 public:
   WordCountWriter(HadoopPipes::ReduceContext& context) {
     const HadoopPipes::JobConf* job = context.getJobConf();
-    int part = job->getInt("mapred.task.partition");
-    std::string outDir = job->get("mapred.work.output.dir");
+    int part = job->getInt("mapreduce.task.partition");
+    std::string outDir = job->get("mapreduce.task.output.dir");
     // remove the file: schema substring
     std::string::size_type posn = outDir.find(":");
     HADOOP_ASSERT(posn != std::string::npos, 



Mime
View raw message