index.html 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335
  1. <h1><a name="JobDesigner-IntroducingJobDesigner"></a>Introducing Job Designer</h1>
  2. <p>The Job Designer application enables you to create and submit Hadoop MapReduce jobs to the Hadoop cluster. You can include variables with your jobs to enable you and other users to enter values for the variables when they run your job. The Job Designer supports MapReduce, streaming, and Java jobs. For more information about Hadoop MapReduce, see the <a href="https://ccp.cloudera.com/display/SUPPORT/Hadoop+Tutorial">Hadoop Tutorial</a>.</p>
  3. <div class='panelMacro'><table class='noteMacro'><colgroup><col width='24'><col></colgroup><tr><td valign='top'><img src="/static/art/help/warning.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td><b>Note</b><br /><ul>
  4. <li>Job Designer uses Oozie to submit MapReduce jobs. Therefore, Oozie must be installed and configured before you can use JobDesigner. For information about installing Oozie, see <a href="https://ccp.cloudera.com/display/CDH4DOC/Oozie+Installation">Oozie Installation</a>.</li>
  5. <li>In order to run Streaming jobs as part of a workflow, Oozie must be configured to use the Oozie ShareLib.</li>
  6. <li>A job's input files must be uploaded to the cluster before you can submit the job.
  7. <br class="atl-forced-newline" /></li>
  8. </ul>
  9. </td></tr></table></div>
  10. <h2><a name="JobDesigner-Contents"></a>Contents</h2>
  11. <style type='text/css'>/*<![CDATA[*/
  12. div.rbtoc1359395639176 {margin-left: 1.5em;padding: 0px;}
  13. div.rbtoc1359395639176 ul {margin-left: 0px;padding-left: 20px;}
  14. div.rbtoc1359395639176 li {margin-left: 0px;padding-left: 0px;}
  15. /*]]>*/</style><div class='rbtoc1359395639176'>
  16. <ul>
  17. <li><a href='#JobDesigner-IntroducingJobDesigner'>Introducing Job Designer</a></li>
  18. <li><a href='#JobDesigner-JobDesignerInstallationandConfiguration'>Job Designer Installation and Configuration</a></li>
  19. <li><a href='#JobDesigner-StartingJobDesigner'>Starting Job Designer</a></li>
  20. <li><a href='#JobDesigner-InstallingtheSampleJobDesigns'>Installing the Sample Job Designs</a></li>
  21. <li><a href='#JobDesigner-JobDesigns'>Job Designs</a></li>
  22. <ul>
  23. <li><a href='#JobDesigner-FilteringJobDesigns'>Filtering Job Designs</a></li>
  24. <li><a href='#JobDesigner-JobDesignSettings'>Job Design Settings</a></li>
  25. <ul>
  26. <li><a href='#JobDesigner-CommonSettings'>Common Settings</a></li>
  27. </ul>
  28. <li><a href='#JobDesigner-CreatingaMapReduceJobDesign'>Creating a MapReduce Job Design</a></li>
  29. <li><a href='#JobDesigner-CreatingaStreamingJobDesign'>Creating a Streaming Job Design</a></li>
  30. <li><a href='#JobDesigner-CreatingaJavaJobDesign'>Creating a Java Job Design</a></li>
  31. <li><a href='#JobDesigner-SubmittingaJobDesign'>Submitting a Job Design</a></li>
  32. <li><a href='#JobDesigner-Copying%2CEditing%2CandDeletingaJobDesign'>Copying, Editing, and Deleting a Job Design</a></li>
  33. </ul>
  34. <li><a href='#JobDesigner-DisplayingResultsofSubmittingaJob'>Displaying Results of Submitting a Job</a></li>
  35. </ul></div>
  36. <p><br class="atl-forced-newline" /></p>
  37. <p><a name="JobDesigner-JobDesignerInstallationandConfiguration"></a></p>
  38. <h1><a name="JobDesigner-JobDesignerInstallationandConfiguration"></a>Job Designer Installation and Configuration</h1>
  39. <p>Job Designer is one of the applications that is installed as part of Hue. For information about installing and configuring Hue, see <a href="https://ccp.cloudera.com/display/CDH4DOC/Hue+Installation">Hue Installation</a>.</p>
  40. <p><a name="JobDesigner-StartingJobDesigner"></a></p>
  41. <h1><a name="JobDesigner-StartingJobDesigner"></a>Starting Job Designer</h1>
  42. <p>To start Job Designer, click the <b>Job Designer</b> icon ( <span class="image-wrap" style=""><img src="/jobsub/static/art/icon.png" height="30" style="border: 0px solid black"/></span>) in the navigation bar at the top of the Hue web page. The <b>Job Designs</b> page opens in the browser.
  43. <br class="atl-forced-newline" /></p>
  44. <p><a name="JobDesigner-InstallingtheJobDesignerSamples"></a></p>
  45. <h1><a name="JobDesigner-InstallingtheSampleJobDesigns"></a>Installing the Sample Job Designs</h1>
  46. <p>The Job Designer sample job designs can help you learn how to use Job Designer.&nbsp;To install the sample job designs, click <b>Install Samples</b> in the <b>Job Designs</b> window and then click <b>Yes</b>. The sample job designs are displayed in the <b>Job Designs</b> window. Job Designer removes the <b>Install Samples</b> button after the samples are installed so you can only install the samples once.&nbsp;</p>
  47. <p><a name="JobDesigner-WorkingwithJobDesigns"></a></p>
  48. <h1><a name="JobDesigner-JobDesigns"></a>Job Designs</h1>
  49. <p>A job design specifies several meta-level properties of a MapReduce job, including the job design name, description, the MapReduce executable scripts or classes, and any parameters for those scripts or classes. You can create three types of job designs:&nbsp;<a href="#JobDesigner-CreatingaMapreducedesign">MapReduce</a>, <a href="#JobDesigner-CreatingaStreamingJobDesign">streaming</a>, and <a href="#JobDesigner-CreatingaJavaJobDesign">Java</a>.</p>
  50. <h2><a name="JobDesigner-FilteringJobDesigns"></a>Filtering Job Designs</h2>
  51. <p>You can filter the job designs that appear in the list by owner, name, type, and description.&nbsp;</p>
  52. <p><b>To filter the Job Designs list:</b></p>
  53. <ol>
  54. <li>In the&nbsp;<b>Job Designs</b>&nbsp;window, click&nbsp;<b>Designs</b>.</li>
  55. <li>Enter text in the Filter text box at the top of the&nbsp;<b>Job Designs</b>&nbsp;window.&nbsp;When you type in the Filter field, the designs are dynamically filtered to display only those rows containing text that matches the specified substring.<br/>
  56. <a name="JobDesigner-DisplayingJobResults"></a></li>
  57. </ol>
  58. <h2><a name="JobDesigner-JobDesignSettings"></a>Job Design Settings</h2>
  59. <p>All job design settings except Name and Description support the use of variables of the form&nbsp;<tt>$</tt><tt><em>variable_name</em></tt>. When you run the job, a dialog box will appear to enable you to specify the values of the variables.</p>
  60. <h3><a name="JobDesigner-CommonSettings"></a>Common Settings</h3>
  61. <p>All job design types support the settings listed in the following table.&nbsp;</p>
  62. <style type="text/css">
  63. td.confluenceTd {
  64. border: #dddddd solid 1px;
  65. height: 36px;
  66. padding: 5px 10px;
  67. vertical-align: top;
  68. }
  69. th.confluenceTh {
  70. border: #dddddd solid 1px;
  71. height: 40px;
  72. padding: 5px 10px;
  73. vertical-align: center;
  74. }
  75. </style>
  76. <div class='table-wrap'>
  77. <table class='confluenceTable'><tbody>
  78. <tr>
  79. <th class='confluenceTh'> Setting </th>
  80. <th class='confluenceTh'> Description </th>
  81. </tr>
  82. <tr>
  83. <td class='confluenceTd'> <b>Name</b> </td>
  84. <td class='confluenceTd'> Identifies the job and its collection of properties and parameters. </td>
  85. </tr>
  86. <tr>
  87. <td class='confluenceTd'> <b>Description</b> </td>
  88. <td class='confluenceTd'> A description of the job. The description is displayed in the dialog box that appears if you specify variables for the job. <br class="atl-forced-newline" /> </td>
  89. </tr>
  90. <tr>
  91. <td class='confluenceTd'> <b>Job Properties</b> </td>
  92. <td class='confluenceTd'> Job properties. To set a property value, click&nbsp;<b>Add Property</b>.&nbsp;&nbsp; <br class="atl-forced-newline" />
  93. <ul>
  94. <li><b>Property name -</b> a&nbsp;configuration property name. This field provides auto-completion, so you can type the first few characters of a property name and then select the one you want from the drop-down list.&nbsp;</li>
  95. <li><b>Value -</b> the property value.</li>
  96. </ul>
  97. </td>
  98. </tr>
  99. <tr>
  100. <td class='confluenceTd'> <b>Files</b> </td>
  101. <td class='confluenceTd'> Files to pass to the job. Equivalent to the Hadoop <tt>-files</tt> option.&nbsp; <br class="atl-forced-newline" /> </td>
  102. </tr>
  103. <tr>
  104. <td class='confluenceTd'> <b>Archives</b> </td>
  105. <td class='confluenceTd'> Archives to pass to the job. Equivalent to the Hadoop <tt>-archives</tt> option. <br class="atl-forced-newline" /> </td>
  106. </tr>
  107. </tbody></table>
  108. </div>
  109. <p><a name="JobDesigner-CreatingaMapreducedesign"></a></p>
  110. <h2><a name="JobDesigner-CreatingaMapReduceJobDesign"></a>Creating a MapReduce Job Design</h2>
  111. <p>A MapReduce job design consists of MapReduce functions written in Java. You can create a<font color="#000000">&nbsp;MapReduce&nbsp;job design from existing mapper and reducer classes without having to write a main Java class. You must specify the mapper and reducer classes as well as other MapReduce properties in the Job Properties setting.</font></p>
  112. <p><b>To create a MapReduce job design:</b></p>
  113. <ol>
  114. <li>In the <b>Job Designs</b> window, click <b>Create MapReduce Design</b>.
  115. <br class="atl-forced-newline" /></li>
  116. <li>In the <b>Job Design (MapReduce type)</b> window, specify the common and job type specific information.
  117. <div class='table-wrap'>
  118. <table class='confluenceTable'><tbody>
  119. <tr>
  120. <th class='confluenceTh'> <b>Setting</b> </th>
  121. <th class='confluenceTh'> <b>Description</b> </th>
  122. </tr>
  123. <tr>
  124. <td class='confluenceTd'> <b>Jar path</b> </td>
  125. <td class='confluenceTd'> The fully-qualified path to a JAR file containing the classes that implement the Mapper and Reducer functions. </td>
  126. </tr>
  127. </tbody></table>
  128. </div>
  129. </li>
  130. <li>Click <b>Save</b> to save the job settings.
  131. <br class="atl-forced-newline" /></li>
  132. </ol>
  133. <p><a name="JobDesigner-CreatingaStreamingJobDesign"></a></p>
  134. <h2><a name="JobDesigner-CreatingaStreamingJobDesign"></a>Creating a Streaming Job Design</h2>
  135. <p>Hadoop streaming jobs enable you to create MapReduce functions in any non-Java language that reads standard Unix input and writes standard Unix output. For more information about Hadoop streaming jobs, see <a href="http://archive.cloudera.com/cdh/3/hadoop-0.20.2+320/streaming.html">Hadoop Streaming</a>.</p>
  136. <p><b>To create a streaming job design:</b></p>
  137. <ol>
  138. <li>In the <b>Job Designs</b> window, click <b>Create Streaming Design</b>.</li>
  139. <li>In the <b>Job Design (streaming type)</b> window,&nbsp;specify the common and job type specific information.
  140. <div class='table-wrap'>
  141. <table class='confluenceTable'><tbody>
  142. <tr>
  143. <th class='confluenceTh'> Setting </th>
  144. <th class='confluenceTh'> Description </th>
  145. </tr>
  146. <tr>
  147. <td class='confluenceTd'> <b>Mapper</b> </td>
  148. <td class='confluenceTd'> The path to the mapper script or class. If the mapper file is not on the machines on the cluster, use the <b>Files</b> option to pass it as a part of job submission. Equivalent to the Hadoop <tt>-mapper</tt> option. </td>
  149. </tr>
  150. <tr>
  151. <td class='confluenceTd'> <b>Reducer</b> </td>
  152. <td class='confluenceTd'> The path to the reducer script or class. If the reducer file is not on the machines on the cluster, use the <b>Files</b> option to pass it as a part of job submission. Equivalent to the Hadoop <tt>-reducer</tt> option. </td>
  153. </tr>
  154. </tbody></table>
  155. </div>
  156. </li>
  157. <li>Click <b>Save</b> to save the job settings.</li>
  158. </ol>
  159. <p><a name="JobDesigner-CreatingaJavaJobDesign"></a></p>
  160. <h2><a name="JobDesigner-CreatingaJavaJobDesign"></a>Creating a Java Job Design</h2>
  161. <p>A Java job design consists of a main class written in Java.</p>
  162. <p><b>To create a Java job design:</b></p>
  163. <ol>
  164. <li>In the <b>Job Designs</b> window, click <b>Create Java Design</b>.</li>
  165. <li>In the <b>Job Design (java type)</b> window, specify the common and job type specific information.
  166. <div class='table-wrap'>
  167. <table class='confluenceTable'><tbody>
  168. <tr>
  169. <th class='confluenceTh'> <b>Setting</b> </th>
  170. <th class='confluenceTh'> <b>Description</b> </th>
  171. </tr>
  172. <tr>
  173. <td class='confluenceTd'> <b>Jar path</b> </td>
  174. <td class='confluenceTd'> The fully-qualified path to a JAR file containing the main class. </td>
  175. </tr>
  176. <tr>
  177. <td class='confluenceTd'> <b>Main class</b> </td>
  178. <td class='confluenceTd'> The main class to invoke the program. </td>
  179. </tr>
  180. <tr>
  181. <td class='confluenceTd'> <b>Args</b> </td>
  182. <td class='confluenceTd'> The arguments to pass to the main class. </td>
  183. </tr>
  184. <tr>
  185. <td class='confluenceTd'> <b>Java opts</b> </td>
  186. <td class='confluenceTd'> The options to pass to the JVM. </td>
  187. </tr>
  188. </tbody></table>
  189. </div>
  190. </li>
  191. <li>Click <b>Save</b> to save the job settings.</li>
  192. </ol>
  193. <p><a name="JobDesigner-SubmittingaJobtoaCluster"></a></p>
  194. <h2><a name="JobDesigner-SubmittingaJobDesign"></a>Submitting a Job Design</h2>
  195. <p><b>To submit a job design:</b></p>
  196. <ol>
  197. <li>In the <b>Job Designs</b> window, click <b>Designs</b> in the upper left corner.<br/>
  198. Your jobs and other users' jobs are displayed in the <b>Job Designs</b> window.</li>
  199. <li>Check the checkbox next to the job you want to submit.</li>
  200. <li>Click the <b>Submit</b> button.
  201. <ol>
  202. <li>If the job contains variables, enter the information requested in the dialog box that appears.&nbsp;For example, the sample grep MapReduce design displays a dialog where you specify the output directory.</li>
  203. <li>Click <b>Submit</b> to submit the job.</li>
  204. </ol>
  205. </li>
  206. </ol>
  207. <p>After the job is complete, the Job Designer displays the results of the job.&nbsp;For information about displaying job results, see <a href="#JobDesigner-DisplayingJobResults">Displaying Job Results</a>.</p>
  208. <p><a name="JobDesigner-Copying%2CEditing%2CandDeletingaJobDesign"></a></p>
  209. <h2><a name="JobDesigner-Copying%2CEditing%2CandDeletingaJobDesign"></a>Copying, Editing, and Deleting a Job Design</h2>
  210. <p>If you want to edit and use a job but you don't own it, you can make a copy of it and then edit and use the copied job.</p>
  211. <p><b>To copy a job design:</b></p>
  212. <ol>
  213. <li>In the <b>Job Designs</b> window, click <b>Designs</b>.&nbsp;The jobs are displayed in the <b>Job Designs</b> window.</li>
  214. <li>Check the checkbox next to the job you want to clone.</li>
  215. <li>Click the <b>Clone</b> button.</li>
  216. <li>In the <b>Job Design Editor</b> window, change the settings and then click <b>Save</b> to save the job settings.</li>
  217. </ol>
  218. <p><b>To edit a job design:</b></p>
  219. <ol>
  220. <li>In the <b>Job Designs</b> window, click <b>Designs</b>.&nbsp;The jobs are displayed in the <b>Job Designs</b> window.</li>
  221. <li>Check the checkbox next to the job you want to edit.</li>
  222. <li>Click the <b>Edit</b> button.</li>
  223. <li>In the <b>Job Design</b> window, change the settings and then click <b>Save</b> to save the job settings.</li>
  224. </ol>
  225. <p><b>To delete a job design:</b></p>
  226. <ol>
  227. <li>In the <b>Job Designs</b> window, click <b>Designs</b>.&nbsp;The jobs are displayed in the <b>Job Designs</b> window.</li>
  228. <li>Check the checkbox next to the job you want to delete.</li>
  229. <li>Click the <b>Delete</b> button.</li>
  230. <li>Click <b>Ok</b> to confirm the deletion.</li>
  231. </ol>
  232. <p><a name="JobDesigner-FilteringtheJobDesigns"></a></p>
  233. <h1><a name="JobDesigner-DisplayingResultsofSubmittingaJob"></a>Displaying Results of Submitting a Job</h1>
  234. <p><b>To display the Job Submission History:</b></p>
  235. <p>In the <b>Job Designs</b> window, click the <b>History</b> tab.&nbsp;The jobs are displayed in the <b>Job Submissions History</b> listed by Oozie job ID.</p>
  236. <p><b>To display Job Details:</b></p>
  237. <p>In the <b>Job Submission History</b> window, click a Oozie Job ID. The results of the job display:</p>
  238. <ul>
  239. <li>Actions - a list of actions in the job.
  240. <ul>
  241. <li>Click <span class="image-wrap" style=""><img src="/jobsub/static/help/cog.png" style="border: 0px solid black"/></span>&nbsp;to display the action configuration. In the action configuration for a MapReduce action, click the value of the mapred.output.dir property to display the job output.</li>
  242. <li>In the root-node row, click the Id in the External Id column to view the job in the Job Browser.</li>
  243. </ul>
  244. </li>
  245. <li>Details - the job details. Click <span class="image-wrap" style=""><img src="/jobsub/static/help/cog.png" style="border: 0px solid black"/></span> to display the Oozie application configuration.</li>
  246. <li>Definition - the Oozie application definition.</li>
  247. <li>Log - the output log.</li>
  248. </ul>
  249. <br/>
  250. </td>
  251. </tr>
  252. </table>
  253. </body>
  254. </html>