forked from docs/doc-exports
Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com> Co-authored-by: Yang, Tong <yangtong2@huawei.com> Co-committed-by: Yang, Tong <yangtong2@huawei.com>
691 lines
80 KiB
HTML
691 lines
80 KiB
HTML
<a name="mrs_01_1162"></a><a name="mrs_01_1162"></a>
|
|
|
|
<h1 class="topictitle1">Open Source sqoop-shell Tool Usage Guide</h1>
|
|
<div id="body8662426"><div class="section" id="mrs_01_1162__en-us_topic_0000001173789536_s882b4a42422642509128525110c2c646"><h4 class="sectiontitle">Overview</h4><p id="mrs_01_1162__en-us_topic_0000001173789536_a0bb0f521c2c0494a909db64d943e764c">Sqoop-shell is a shell tool of Loader. All its functions are implemented by executing the <span class="filepath" id="mrs_01_1162__en-us_topic_0000001173789536_fd98f6801cf3f4e308b406f59df931cbe"><b>sqoop2-shell</b></span> script.</p>
|
|
<p id="mrs_01_1162__en-us_topic_0000001173789536_a2072da071ccb431da31ac4c21a307ceb">The sqoop-shell tool provides the following functions:</p>
|
|
<ul id="mrs_01_1162__en-us_topic_0000001173789536_ue5801ba302ab4e429d282710f9925925"><li id="mrs_01_1162__en-us_topic_0000001173789536_l5079b8a17a294864a8a83f3ed6f23140">Creating and updating connectors</li><li id="mrs_01_1162__en-us_topic_0000001173789536_l8755d34523dc48f5be178d861a45f892">Creating and updating jobs</li><li id="mrs_01_1162__en-us_topic_0000001173789536_ld5ce3c3eb35e44059d6acd424b6b6a43">Deleting connectors and jobs</li><li id="mrs_01_1162__en-us_topic_0000001173789536_lf974e2c34c4a4ce6bfce131808cbd5d4">Starting jobs in the synchronous or asynchronous mode.</li><li id="mrs_01_1162__en-us_topic_0000001173789536_l4e11873995a1447fb5ea57767126ea4b">Stopping jobs</li><li id="mrs_01_1162__en-us_topic_0000001173789536_l7c2582c3c6bc4a66a5f1b98c80d97cf9">Viewing job status</li><li id="mrs_01_1162__en-us_topic_0000001173789536_l57a926b8ac5d48e2b3a9c04d3b1459c1">Viewing historical execution records of jobs</li><li id="mrs_01_1162__en-us_topic_0000001173789536_l5241d58d8b484c24bdc90517bfe38c57">Cloning connectors and jobs</li><li id="mrs_01_1162__en-us_topic_0000001173789536_le4ca8ef2d8e24ed1bb6934eb44fe5aa5">Creating and updating conversion steps</li><li id="mrs_01_1162__en-us_topic_0000001173789536_laed9e4d5cc724be8b15ed86ad4356263">Specifying line and field separators</li></ul>
|
|
<p id="mrs_01_1162__en-us_topic_0000001173789536_a1dd1d4046c614f3790f83c4e0d980c06">The sqoop-shell tool supports the following modes:</p>
|
|
<ul id="mrs_01_1162__en-us_topic_0000001173789536_u91f68763694344179a9a8cb26b7bdc46"><li id="mrs_01_1162__en-us_topic_0000001173789536_labcbeda0340a44a98e1d8b832cf50a72">Interaction mode<p id="mrs_01_1162__en-us_topic_0000001173789536_a957d806ae2fd4750b9987c5fd2f2f525"><a name="mrs_01_1162__en-us_topic_0000001173789536_labcbeda0340a44a98e1d8b832cf50a72"></a><a name="en-us_topic_0000001173789536_labcbeda0340a44a98e1d8b832cf50a72"></a>Users execute the <span class="filepath" id="mrs_01_1162__en-us_topic_0000001173789536_f088a10080a6b4daf8fd0b72a085b44ad"><b>sqoop2-shell</b></span> script without parameters to go to the particular interaction window of Loader. After the contents of the script are input, the tool returns the relevant information to the interaction window.</p>
|
|
</li><li id="mrs_01_1162__en-us_topic_0000001173789536_lf7614b64714c429ba37ce5e86bb9af1c">Batch mode<p id="mrs_01_1162__en-us_topic_0000001173789536_a3c0c8b0f784f4467980bf5f69cc37cec"><a name="mrs_01_1162__en-us_topic_0000001173789536_lf7614b64714c429ba37ce5e86bb9af1c"></a><a name="en-us_topic_0000001173789536_lf7614b64714c429ba37ce5e86bb9af1c"></a>The <span class="filepath" id="mrs_01_1162__en-us_topic_0000001173789536_filepath95394437491437"><b>sqoop2-shell</b></span> script has a file name as a parameter and multiple commands are stored in lines in the file. The sqoop-shell tool runs all commands in the file in sequence by executing the script. Alternatively, users can execute the <span class="filepath" id="mrs_01_1162__en-us_topic_0000001173789536_filepath106888260391437"><b>sqoop2-shell</b></span> script, to the end of which a command is attached with the <strong id="mrs_01_1162__en-us_topic_0000001173789536_b81267295191437">-c</strong> parameter as the bridge. In this case, the sqoop-shell tool runs one command each time.</p>
|
|
</li></ul>
|
|
<p id="mrs_01_1162__en-us_topic_0000001173789536_a3ed8f751c5d049ec96cd779bcb6d35c5">The sqoop-shell implements functions of Loader by running the commands in <a href="#mrs_01_1162__en-us_topic_0000001173789536_t377ae098b7e243328537c0bfbe54a211">Table 1</a>.</p>
|
|
|
|
<div class="tablenoborder"><a name="mrs_01_1162__en-us_topic_0000001173789536_t377ae098b7e243328537c0bfbe54a211"></a><a name="en-us_topic_0000001173789536_t377ae098b7e243328537c0bfbe54a211"></a><table cellpadding="4" cellspacing="0" summary="" id="mrs_01_1162__en-us_topic_0000001173789536_t377ae098b7e243328537c0bfbe54a211" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Command list</caption><thead align="left"><tr id="mrs_01_1162__en-us_topic_0000001173789536_rc8cf77da2da94eb8a1ee8a82a3a47272"><th align="left" class="cellrowborder" valign="top" width="9.959999999999999%" id="mcps1.3.1.8.2.3.1.1"><p id="mrs_01_1162__en-us_topic_0000001173789536_a48576bbafa20457ba630a0a2fb6dc335">Command</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="90.03999999999999%" id="mcps1.3.1.8.2.3.1.2"><p id="mrs_01_1162__en-us_topic_0000001173789536_ae12e2d1119f84663a2381e55fed8767b">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="mrs_01_1162__en-us_topic_0000001173789536_rc8cf62fe64a947c9b56b851030fac79b"><td class="cellrowborder" valign="top" width="9.959999999999999%" headers="mcps1.3.1.8.2.3.1.1 "><p id="mrs_01_1162__en-us_topic_0000001173789536_af3e5a9125a2848f5ab90577f1ba6192a">exit</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="90.03999999999999%" headers="mcps1.3.1.8.2.3.1.2 "><p id="mrs_01_1162__en-us_topic_0000001173789536_a8b62450c591642b09091005ea08907a2">Exists the interaction mode.</p>
|
|
<p id="mrs_01_1162__en-us_topic_0000001173789536_a2d64942bb2a84b99ad00748462b5c3f1">This command is supported only in the interaction mode.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_01_1162__en-us_topic_0000001173789536_ra6f9e392585a403cab2149bc5ce7098b"><td class="cellrowborder" valign="top" width="9.959999999999999%" headers="mcps1.3.1.8.2.3.1.1 "><p id="mrs_01_1162__en-us_topic_0000001173789536_a593a8f4c8bdb4b16917f761d5ee808bb">history</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="90.03999999999999%" headers="mcps1.3.1.8.2.3.1.2 "><p id="mrs_01_1162__en-us_topic_0000001173789536_a3b45e4cff60c4b10965ef7e50ee7ceaa">Views the executed commands.</p>
|
|
<p id="mrs_01_1162__en-us_topic_0000001173789536_abc0f93ebab11403281eb74304467d913">This command is supported only in the interaction mode.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_01_1162__en-us_topic_0000001173789536_rc017d2bae58843feb38df2415490fc18"><td class="cellrowborder" valign="top" width="9.959999999999999%" headers="mcps1.3.1.8.2.3.1.1 "><p id="mrs_01_1162__en-us_topic_0000001173789536_aabc446fdeafc4f5fa7d11f19ec102413">help</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="90.03999999999999%" headers="mcps1.3.1.8.2.3.1.2 "><p id="mrs_01_1162__en-us_topic_0000001173789536_a0e43549cc9f44f8bb5d342d43eb2603a">Views the tool help information.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_01_1162__en-us_topic_0000001173789536_rae4819b1b05d4e988ea6e2f5ac7b6e99"><td class="cellrowborder" valign="top" width="9.959999999999999%" headers="mcps1.3.1.8.2.3.1.1 "><p id="mrs_01_1162__en-us_topic_0000001173789536_a18cdbc57e82249b88beb8e265cb6687f">set</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="90.03999999999999%" headers="mcps1.3.1.8.2.3.1.2 "><p id="mrs_01_1162__en-us_topic_0000001173789536_aa597d3ed3ed94e2abc7f82a77d25355d">Sets server attributes.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_01_1162__en-us_topic_0000001173789536_ra6be17d62ed346379e1fefa09b5f9dd1"><td class="cellrowborder" valign="top" width="9.959999999999999%" headers="mcps1.3.1.8.2.3.1.1 "><p id="mrs_01_1162__en-us_topic_0000001173789536_a8e15787064a54887a485c5f7e465d28d">show</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="90.03999999999999%" headers="mcps1.3.1.8.2.3.1.2 "><p id="mrs_01_1162__en-us_topic_0000001173789536_aa909cb95af3c4276aeb9d76fc9ad8781">Displays service attributes and all the metadata information of Loader.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_01_1162__en-us_topic_0000001173789536_rf59aa6186a764241a666566eb6dbcec7"><td class="cellrowborder" valign="top" width="9.959999999999999%" headers="mcps1.3.1.8.2.3.1.1 "><p id="mrs_01_1162__en-us_topic_0000001173789536_a61d1861804b04629b086c7fca3285d12">create</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="90.03999999999999%" headers="mcps1.3.1.8.2.3.1.2 "><p id="mrs_01_1162__en-us_topic_0000001173789536_a7b09e953292b40e79f2206b6d9248760">Creates connectors and jobs.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_01_1162__en-us_topic_0000001173789536_r2157f78b81e2462495a428927f9af1fb"><td class="cellrowborder" valign="top" width="9.959999999999999%" headers="mcps1.3.1.8.2.3.1.1 "><p id="mrs_01_1162__en-us_topic_0000001173789536_ae9f1e18538bc484e8068183a8b08bb7c">update</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="90.03999999999999%" headers="mcps1.3.1.8.2.3.1.2 "><p id="mrs_01_1162__en-us_topic_0000001173789536_a877fae7fe46841f88b62bbc1674c3fbd">Updates connectors and jobs.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_01_1162__en-us_topic_0000001173789536_rf847d05ae6f4415f8a2d1213042e8f8f"><td class="cellrowborder" valign="top" width="9.959999999999999%" headers="mcps1.3.1.8.2.3.1.1 "><p id="mrs_01_1162__en-us_topic_0000001173789536_ae8dc85dc935f4a93989bd65f0571f589">delete</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="90.03999999999999%" headers="mcps1.3.1.8.2.3.1.2 "><p id="mrs_01_1162__en-us_topic_0000001173789536_a9b667d258d244fe0a03994ddf1ec418f">Deletes connectors and jobs.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_01_1162__en-us_topic_0000001173789536_r8f4fed6d096f408f88fa3cc5749c9279"><td class="cellrowborder" valign="top" width="9.959999999999999%" headers="mcps1.3.1.8.2.3.1.1 "><p id="mrs_01_1162__en-us_topic_0000001173789536_ab12ae048614a42f59bf8780950608389">clone</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="90.03999999999999%" headers="mcps1.3.1.8.2.3.1.2 "><p id="mrs_01_1162__en-us_topic_0000001173789536_a12ed5dc21f944e759cb9b239572fbd53">Clones connectors and jobs.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_01_1162__en-us_topic_0000001173789536_r6348d453b28149ac800f15b2d89e213e"><td class="cellrowborder" valign="top" width="9.959999999999999%" headers="mcps1.3.1.8.2.3.1.1 "><p id="mrs_01_1162__en-us_topic_0000001173789536_a9ef4891f3d8142a99f77f961f1cc2b11">start</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="90.03999999999999%" headers="mcps1.3.1.8.2.3.1.2 "><p id="mrs_01_1162__en-us_topic_0000001173789536_a67bb6f7ddfce4d5caa375e956c7fa73d">Starts jobs.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_01_1162__en-us_topic_0000001173789536_r9b63f2dee88c4afc9a1798c121914c65"><td class="cellrowborder" valign="top" width="9.959999999999999%" headers="mcps1.3.1.8.2.3.1.1 "><p id="mrs_01_1162__en-us_topic_0000001173789536_adf5adcfca048444d8f905c0f99a2ed13">stop</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="90.03999999999999%" headers="mcps1.3.1.8.2.3.1.2 "><p id="mrs_01_1162__en-us_topic_0000001173789536_a0c74d507da8b4b7eb879571e28fb41b6">Stops jobs.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_01_1162__en-us_topic_0000001173789536_r47bc75c31f5047f2926db9bfb2b17512"><td class="cellrowborder" valign="top" width="9.959999999999999%" headers="mcps1.3.1.8.2.3.1.1 "><p id="mrs_01_1162__en-us_topic_0000001173789536_a5246022901ca44b090fad04cfaf5e368">status</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="90.03999999999999%" headers="mcps1.3.1.8.2.3.1.2 "><p id="mrs_01_1162__en-us_topic_0000001173789536_a5d1856b024024ada9f59fb0c2617d08c">Views job status.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="mrs_01_1162__en-us_topic_0000001173789536_s6f27fe8d41a7400f8f9ac65b448974c7"><h4 class="sectiontitle">Commands</h4><ul id="mrs_01_1162__en-us_topic_0000001173789536_ucf5e7fb06a1547158c2ee2f5fe02801e"><li id="mrs_01_1162__en-us_topic_0000001173789536_lc9c24dae922c41fba6271d470b9f5162">The sqoop2-shell tool provides two methods to obtain login authentication information. The first method is to obtain login authentication information from the configuration file. For details about the configuration items, see <a href="mrs_01_1163.html">Example for Using the Open-Source sqoop-shell Tool (SFTP-HDFS)</a> and <a href="mrs_01_1164.html">Example for Using the Open-Source sqoop-shell Tool (Oracle-HBase)</a>. The second one is to obtain the authentication information by using parameters. Two modes are available in the second method: password mode and Kerberos authentication mode.</li><li id="mrs_01_1162__en-us_topic_0000001173789536_l4cfdadad170447d288705e6d2b12807d">Command for accessing the interaction mode<p id="mrs_01_1162__en-us_topic_0000001173789536_a9ba02f5734ac4a338e33268979bbc1c2"><a name="mrs_01_1162__en-us_topic_0000001173789536_l4cfdadad170447d288705e6d2b12807d"></a><a name="en-us_topic_0000001173789536_l4cfdadad170447d288705e6d2b12807d"></a>Execute the <span class="filepath" id="mrs_01_1162__en-us_topic_0000001173789536_fb97d5cb18a2e46bfa500f327143d4aa0"><b>sqoop2-shell</b></span> script without parameters to go to the sqoop tool window and run the commands one by one.</p>
|
|
<p id="mrs_01_1162__en-us_topic_0000001173789536_a57874497dec94d179753fdefe53b6e1a">Run the following command to obtain the authentication information by reading the configuration file:</p>
|
|
<p id="mrs_01_1162__en-us_topic_0000001173789536_a1ae6f8182c8747f1815b561990957794"><strong id="mrs_01_1162__en-us_topic_0000001173789536_acfb815766c32445989e3a4df5ee2dfa0">./sqoop2-shell</strong></p>
|
|
<p id="mrs_01_1162__en-us_topic_0000001173789536_a5c3f03dcde1e4c4d980a82dc26622b54">Run the following command to authenticate login using the password mode:</p>
|
|
<p id="mrs_01_1162__en-us_topic_0000001173789536_a40a382381c454230a9f3448b4f1389ab"><strong id="mrs_01_1162__en-us_topic_0000001173789536_a50f929d8765a4ec4be79597ebd5c3c22">./sqoop2-shell -uk false -u username -p encryptedPassword</strong></p>
|
|
<p id="mrs_01_1162__en-us_topic_0000001173789536_a3bc24a1ac78b4e21afb3c95920240aa0">Run the following command to authenticate login using the Kerberos mode:</p>
|
|
<p id="mrs_01_1162__en-us_topic_0000001173789536_a28561435eb134ed488063702f072cbba"><strong id="mrs_01_1162__en-us_topic_0000001173789536_a90e0637dba5240ce82d93b61fdd8a2ff">./sqoop2-shell -uk true -k user.keytab -s userPrincipal</strong></p>
|
|
<p id="mrs_01_1162__en-us_topic_0000001173789536_a8efb6ae98ade43ee9ba5b963f92d0562">The following information is displayed:</p>
|
|
<pre class="screen" id="mrs_01_1162__en-us_topic_0000001173789536_s24ea639684cb40d2a14a02a617524afa">Welcome to sqoop client
|
|
Use the username and password authentication mode
|
|
Authentication success.
|
|
Sqoop Shell: Type 'help' or '\h' for help.
|
|
|
|
sqoop:000> </pre>
|
|
</li><li id="mrs_01_1162__en-us_topic_0000001173789536_lbf15065bc6a44608a73ed5d0e7b93eb7">Command for entering the batch mode<p id="mrs_01_1162__en-us_topic_0000001173789536_ab45444c5cacc40ab9a9ba3036e82d183"><a name="mrs_01_1162__en-us_topic_0000001173789536_lbf15065bc6a44608a73ed5d0e7b93eb7"></a><a name="en-us_topic_0000001173789536_lbf15065bc6a44608a73ed5d0e7b93eb7"></a>Two methods are available for accessing the batch mode.</p>
|
|
<p id="mrs_01_1162__en-us_topic_0000001173789536_ad5867c275c0641349e70ddb74b832de6">1. Execute the <span class="filepath" id="mrs_01_1162__en-us_topic_0000001173789536_f2c044f71e77043bfa2f116dc55a71095"><b>sqoop2-shell</b></span> script, in which a file name is used as a parameter and multiple commands are stored in lines in this file. The sqoop-shell tool runs all commands in the file in sequence. The script must be stored in the home directory of the current user, for example, <strong id="mrs_01_1162__en-us_topic_0000001173789536_b56971943214">/root/batchCommand.sh</strong>.</p>
|
|
<p id="mrs_01_1162__en-us_topic_0000001173789536_a03ae0b5ec1b54e3a892a813a9f0c0203">Run the following command to authenticate login by reading configuration files:</p>
|
|
<p id="mrs_01_1162__en-us_topic_0000001173789536_a54e4d864378649b3bc2070a9ab02d3d3"><strong id="mrs_01_1162__en-us_topic_0000001173789536_a21e9cfacbeb94018aee46422334887f6">./sqoop2-shell </strong><i><span class="varname" id="mrs_01_1162__en-us_topic_0000001173789536_vf8f9700ea8104d7097224e7049ace7ee">/root/batchCommand.sh</span></i></p>
|
|
<p id="mrs_01_1162__en-us_topic_0000001173789536_a2d40cb5ab44649dfab05c6d5351a684c">Run the following command to authenticate login using the password mode:</p>
|
|
<p id="mrs_01_1162__en-us_topic_0000001173789536_afe9aa3c72afa4bc0b0c650d2394f9937"><strong id="mrs_01_1162__en-us_topic_0000001173789536_a67d30c2fdafd47ed88a9c7c3d361ee29">./sqoop2-shell -uk false -u username -p encryptedPassword </strong><i><span class="varname" id="mrs_01_1162__en-us_topic_0000001173789536_vf4e18a94331544d9892f3798c5997e38">/root/batchCommand.sh</span></i></p>
|
|
<p id="mrs_01_1162__en-us_topic_0000001173789536_a1e89968acf134bacb0aca620c6685787">Run the following command to authenticate login using the Kerberos mode:</p>
|
|
<p id="mrs_01_1162__en-us_topic_0000001173789536_a52cbc48a845d42d69f4a5555583b5665"><strong id="mrs_01_1162__en-us_topic_0000001173789536_a5451997f76ff4cf7a9fc946c1d16fcf8">./sqoop2-shell -uk true -k user.keytab -s userPrincipal </strong><i><span class="varname" id="mrs_01_1162__en-us_topic_0000001173789536_v5aeba8fe21694587ad9f011c947d28a3">/root/batchCommand.sh</span></i></p>
|
|
<p id="mrs_01_1162__en-us_topic_0000001173789536_aed372ab1289b4086a143af2920f5b79e"><i><span class="varname" id="mrs_01_1162__en-us_topic_0000001173789536_v72ce161e5bde4a9fa2658e068685cc67">batchCommand.sh</span></i> is the user-defined name of the text file.</p>
|
|
<p id="mrs_01_1162__en-us_topic_0000001173789536_a97c3ceee9e81411e92fc45fc0d478927">2. Execute the <span class="filepath" id="mrs_01_1162__en-us_topic_0000001173789536_f0aa859a4a2f94b4ab2f84f37773f0c35"><b>sqoop2-shell</b></span> script, to the end of which a command is attached with the -c parameter as the bridge. The sqoop-shell tool will execute the command.</p>
|
|
<p id="mrs_01_1162__en-us_topic_0000001173789536_a2d6f82075d59411cb8910c5634f237e0">Run the following command to authenticate login by reading configuration files:</p>
|
|
<p id="mrs_01_1162__en-us_topic_0000001173789536_af16c3f0a51b840e5aab2030988db13b8"><strong id="mrs_01_1162__en-us_topic_0000001173789536_a5082737a429b47a0a310bd8c82bb3450">./sqoop2-shell </strong><i><span class="varname" id="mrs_01_1162__en-us_topic_0000001173789536_ve831b61bca3149a5a998136a455b7b5c">-c expression</span></i></p>
|
|
<p id="mrs_01_1162__en-us_topic_0000001173789536_a3b263cf8cba94139b35b2440927172e9">Run the following command to authenticate login using the password mode:</p>
|
|
<p id="mrs_01_1162__en-us_topic_0000001173789536_a9f7f68b41c81475e8596d3c5e47f3abe"><strong id="mrs_01_1162__en-us_topic_0000001173789536_a1e39806b75754f2cad40cd1fba444585">./sqoop2-shell -uk false -u username -p encryptedPassword </strong><i><span class="varname" id="mrs_01_1162__en-us_topic_0000001173789536_v0044dbd6d5054483b594795121fe3707">-c expression</span></i></p>
|
|
<p id="mrs_01_1162__en-us_topic_0000001173789536_a68e5e9f2f5004e43904821a90c33e19f">Run the following command to authenticate login using the Kerberos mode:</p>
|
|
<p id="mrs_01_1162__en-us_topic_0000001173789536_ac17cdec8ae0040b1a36cc9b17b94667d"><strong id="mrs_01_1162__en-us_topic_0000001173789536_a73d6165fbfc74075ab04f7b7302774d1">./sqoop2-shell -uk true -k user.keytab -s userPrincipal </strong><i><span class="varname" id="mrs_01_1162__en-us_topic_0000001173789536_v4b2c5643c62248e3a6e70280a4136ccc">-c expression</span></i></p>
|
|
<p id="mrs_01_1162__en-us_topic_0000001173789536_aaf3ce1d8b53f4bf59ba1f4dd077a6602"><i><span class="varname" id="mrs_01_1162__en-us_topic_0000001173789536_v266b23cbcd6240289fa81a4cc9d2406f">expression</span></i> is the attached statement, whose format is the same as that in the text file in the first method.</p>
|
|
</li><li id="mrs_01_1162__en-us_topic_0000001173789536_l001c84eaaebf40b8b2318791eab4fd86">Exit command<p id="mrs_01_1162__en-us_topic_0000001173789536_ad59a1a80b6ca4b108474eb9ec772f4ad"><a name="mrs_01_1162__en-us_topic_0000001173789536_l001c84eaaebf40b8b2318791eab4fd86"></a><a name="en-us_topic_0000001173789536_l001c84eaaebf40b8b2318791eab4fd86"></a>This command is used for exiting the interaction mode and supported only in the interaction mode.</p>
|
|
<p id="mrs_01_1162__en-us_topic_0000001173789536_a24916a15226d4eaa931bf56d9e2603d4">Example:</p>
|
|
<pre class="screen" id="mrs_01_1162__en-us_topic_0000001173789536_s5cdaebc45b0c449a954a71d22c0bbfbd">Welcome to sqoop client
|
|
Use the username and password authentication mode
|
|
Authentication success.
|
|
Sqoop Shell: Type 'help' or '\h' for help.
|
|
|
|
sqoop:000> exit
|
|
10-5-211-9:/opt/hadoopclient/Loader/loader-tools-1.99.3/sqoop-shell#</pre>
|
|
</li><li id="mrs_01_1162__en-us_topic_0000001173789536_l708715e3694e442eabfd37039e9bca07">History command<p id="mrs_01_1162__en-us_topic_0000001173789536_abd33997017ef4432be3833c9a28af794"><a name="mrs_01_1162__en-us_topic_0000001173789536_l708715e3694e442eabfd37039e9bca07"></a><a name="en-us_topic_0000001173789536_l708715e3694e442eabfd37039e9bca07"></a>This command is used for viewing the executed commands and supported only in the interaction mode.</p>
|
|
<p id="mrs_01_1162__en-us_topic_0000001173789536_a4c301bf9ab16463484f83468418308b1">Example:</p>
|
|
<pre class="screen" id="mrs_01_1162__en-us_topic_0000001173789536_sd49761c1625346a9971cfa4c03a455f2">sqoop:000> history
|
|
0 show connector
|
|
1 create connection -c 4
|
|
2 show connections;
|
|
3 show connection;
|
|
4 show connection -a;
|
|
5 show connections;
|
|
6 show connection;
|
|
7 show connection -x 53;
|
|
8 show connection -x 52;
|
|
9 show connection -x 2
|
|
10 show connection -x 53;
|
|
11 show connection
|
|
12 show connection -x 53
|
|
13 create job -x 53 -t import
|
|
14 show connector
|
|
15 create connection -c 5
|
|
16 show connection -x 54
|
|
17 exit
|
|
18 show connector
|
|
19 create connection -c 5
|
|
20 exit
|
|
21 show connector
|
|
22 create connection -c 6
|
|
23 create job -x 20 -t import
|
|
24 start job -j 85 -s
|
|
25 \x
|
|
26 exit
|
|
27 history
|
|
sqoop:000> </pre>
|
|
</li><li id="mrs_01_1162__en-us_topic_0000001173789536_lb87bf752d186422f8fc1f70260900de6">Help command<p id="mrs_01_1162__en-us_topic_0000001173789536_a2a3a0f2618314371b2e916f8829b94e2"><a name="mrs_01_1162__en-us_topic_0000001173789536_lb87bf752d186422f8fc1f70260900de6"></a><a name="en-us_topic_0000001173789536_lb87bf752d186422f8fc1f70260900de6"></a>This command is used for viewing the tool help information.</p>
|
|
<p id="mrs_01_1162__en-us_topic_0000001173789536_ad1841308f842405dbee6bc7eb4a951d8">Example:</p>
|
|
<pre class="screen" id="mrs_01_1162__en-us_topic_0000001173789536_s0a675bd2973a4754b64a2819ffd2771d">sqoop:000> help
|
|
For information about Sqoop, visit: http://sqoop.apache.org/docs/1.99.3/index.html
|
|
|
|
Available commands:
|
|
exit (\x ) Exit the shell
|
|
history (\H ) Display, manage and recall edit-line history
|
|
help (\h ) Display this help message
|
|
set (\st ) Set server or option Info
|
|
show (\sh ) Show server, connector, framework, connection, job, submission or option Info
|
|
create (\cr ) Create connection or job Info
|
|
delete (\d ) Delete connection or job Info
|
|
update (\up ) Update connection or job Info
|
|
clone (\cl ) Clone connection or job Info
|
|
start (\sta) Start job
|
|
stop (\stp) Stop job
|
|
status (\stu) Status job
|
|
|
|
For help on a specific command type: help command
|
|
|
|
sqoop:000> </pre>
|
|
</li><li id="mrs_01_1162__en-us_topic_0000001173789536_lc8154be2cfd84f6c99aec5484da95b12">Set command<p id="mrs_01_1162__en-us_topic_0000001173789536_ab4514c3b4e684d9791658f4e452ba313"><a name="mrs_01_1162__en-us_topic_0000001173789536_lc8154be2cfd84f6c99aec5484da95b12"></a><a name="en-us_topic_0000001173789536_lc8154be2cfd84f6c99aec5484da95b12"></a>The set command is used for setting attributes of clients and servers and supports the following attributes:</p>
|
|
<ul id="mrs_01_1162__en-us_topic_0000001173789536_uf55a0be045a84a4593ff51be8c3fecb4"><li id="mrs_01_1162__en-us_topic_0000001173789536_l265582436b3a41e597bfea73859b9e1a"><strong id="mrs_01_1162__en-us_topic_0000001173789536_b33266105591437">server</strong> indicates setting the connection attributes for servers.<div class="note" id="mrs_01_1162__en-us_topic_0000001173789536_n57b9b7e0ca44489196bc14fd14f2ea1a"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="mrs_01_1162__en-us_topic_0000001173789536_ac03592ed52884a8f95b4c2687ca318a0">When attribute -u is set, attributes -h, -p, and -w can be ignored.</p>
|
|
</div></div>
|
|
</li><li id="mrs_01_1162__en-us_topic_0000001173789536_la9ead22c8aad4a4b92cb143b7845af6e"><strong id="mrs_01_1162__en-us_topic_0000001173789536_b133005166791437">option</strong> indicates setting the client attributes.<div class="note" id="mrs_01_1162__en-us_topic_0000001173789536_ncce3e637e76348138b129bcb14b849a7"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="mrs_01_1162__en-us_topic_0000001173789536_ae7e5f68bfdc34a19a26593b407ddee35"><strong id="mrs_01_1162__en-us_topic_0000001173789536_b127838889591437">option</strong> can be set by key values. For example, <strong id="mrs_01_1162__en-us_topic_0000001173789536_b31009051791437">set option --name verbose --value true</strong>.</p>
|
|
</div></div>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="mrs_01_1162__en-us_topic_0000001173789536_t4dbeb033060f49fba1c7ee70e940ed0b" frame="border" border="1" rules="all"><thead align="left"><tr id="mrs_01_1162__en-us_topic_0000001173789536_rbab56a6e53db423b85ecf71c6a832104"><th align="left" class="cellrowborder" valign="top" width="28.99%" id="mcps1.3.2.2.7.2.2.3.1.4.1.1"><p id="mrs_01_1162__en-us_topic_0000001173789536_afcac901d2fb342ef83f0981a0da9a156">Attribute Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="36.24%" id="mcps1.3.2.2.7.2.2.3.1.4.1.2"><p id="mrs_01_1162__en-us_topic_0000001173789536_a38e536bab8704141b9e0a0f0b62ce109">Subattribute</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="34.77%" id="mcps1.3.2.2.7.2.2.3.1.4.1.3"><p id="mrs_01_1162__en-us_topic_0000001173789536_a3f810c5dd65c40358a24c1a1a6d0537d">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="mrs_01_1162__en-us_topic_0000001173789536_r209abee2d09745d989477d0abcf73062"><td class="cellrowborder" rowspan="4" valign="top" width="28.99%" headers="mcps1.3.2.2.7.2.2.3.1.4.1.1 "><p id="mrs_01_1162__en-us_topic_0000001173789536_a15f5e06365cd422ea3b97fd8c952cc80">server</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="36.24%" headers="mcps1.3.2.2.7.2.2.3.1.4.1.2 "><p id="mrs_01_1162__en-us_topic_0000001173789536_a5d8d51c3c36a427ebdffcd9521f0e3a1">-h,--host</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="34.77%" headers="mcps1.3.2.2.7.2.2.3.1.4.1.3 "><p id="mrs_01_1162__en-us_topic_0000001173789536_abf5b46de14eb4a178e0f98b1034bea69">Service IP address.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_01_1162__en-us_topic_0000001173789536_r81e9fc3c7e694a6ea8e0a366b5110751"><td class="cellrowborder" valign="top" headers="mcps1.3.2.2.7.2.2.3.1.4.1.1 "><p id="mrs_01_1162__en-us_topic_0000001173789536_a96fdb9cc81dc426ba4e3bb26735fb8c1">-p,--port</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" headers="mcps1.3.2.2.7.2.2.3.1.4.1.2 "><p id="mrs_01_1162__en-us_topic_0000001173789536_a1124f0d0fbc04b53a8ff98fb34c60d48">Service Port</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_01_1162__en-us_topic_0000001173789536_r8f7a32ab518545a5af3c740448284adf"><td class="cellrowborder" valign="top" headers="mcps1.3.2.2.7.2.2.3.1.4.1.1 "><p id="mrs_01_1162__en-us_topic_0000001173789536_a669f20c099134de09d2c6ceacc7c1745">-w,--webapp</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" headers="mcps1.3.2.2.7.2.2.3.1.4.1.2 "><p id="mrs_01_1162__en-us_topic_0000001173789536_a3e851f5301414a5f8390ae160a802526">Tomcat application name.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_01_1162__en-us_topic_0000001173789536_r6a60c637626646649472990a845e4bab"><td class="cellrowborder" valign="top" headers="mcps1.3.2.2.7.2.2.3.1.4.1.1 "><p id="mrs_01_1162__en-us_topic_0000001173789536_a9586dbc535564818930ff3956643b58e">-u,--url</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" headers="mcps1.3.2.2.7.2.2.3.1.4.1.2 "><p id="mrs_01_1162__en-us_topic_0000001173789536_ae7f3401066194237ad29c18d5dcb467d">Sqoop service URL.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_01_1162__en-us_topic_0000001173789536_raef3364b33bc404aaa196b5268c762e9"><td class="cellrowborder" rowspan="2" valign="top" width="28.99%" headers="mcps1.3.2.2.7.2.2.3.1.4.1.1 "><p id="mrs_01_1162__en-us_topic_0000001173789536_a0c14f3541a834cc3af5ad9e6aea0d384">option</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="36.24%" headers="mcps1.3.2.2.7.2.2.3.1.4.1.2 "><p id="mrs_01_1162__en-us_topic_0000001173789536_a0d6c36262d394520b6aee7720b4007e3">verbose</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="34.77%" headers="mcps1.3.2.2.7.2.2.3.1.4.1.3 "><p id="mrs_01_1162__en-us_topic_0000001173789536_aedec027a201546f8b0e3a5ac0c5f054b">Redundancy mode, which indicates that more information is printed.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_01_1162__en-us_topic_0000001173789536_r97a82ed7e2644037a7b5fc434b0f9d69"><td class="cellrowborder" valign="top" headers="mcps1.3.2.2.7.2.2.3.1.4.1.1 "><p id="mrs_01_1162__en-us_topic_0000001173789536_a340e258eaf18439fb9bff4813d61c102">poll-timeout</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" headers="mcps1.3.2.2.7.2.2.3.1.4.1.2 "><p id="mrs_01_1162__en-us_topic_0000001173789536_af0e632a85be2482881e5009a9f95a5fd">Sets the polling timeout duration.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</li></ul>
|
|
<p id="mrs_01_1162__en-us_topic_0000001173789536_ae5263410d5154948a634ade8b82c66a3">Example:</p>
|
|
<pre class="screen" id="mrs_01_1162__en-us_topic_0000001173789536_s2127945ca09d4f63a2606eada16520d4">set option --name verbose --value false
|
|
set server --host 10.0.0.1 --port 21351 --webapp loader</pre>
|
|
</li><li id="mrs_01_1162__en-us_topic_0000001173789536_lc119012d65274a0c8a9ab7fffad74c9b"><strong id="mrs_01_1162__en-us_topic_0000001173789536_b127979451217">show </strong>command<p id="mrs_01_1162__en-us_topic_0000001173789536_a1bf9383cfb2a4d4d8d82c04e56fce431">This command is used for displaying information, such as variable information and storage metadata information.</p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="mrs_01_1162__en-us_topic_0000001173789536_tfe0c0240013949a8ac09e3383856d575" frame="border" border="1" rules="all"><thead align="left"><tr id="mrs_01_1162__en-us_topic_0000001173789536_r0c7f39812e074721b052f3f9fcbc000d"><th align="left" class="cellrowborder" valign="top" width="28.99%" id="mcps1.3.2.2.8.3.1.4.1.1"><p id="mrs_01_1162__en-us_topic_0000001173789536_a2fa788f337f84bc7a304139d47c375b2">Attribute Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="36.24%" id="mcps1.3.2.2.8.3.1.4.1.2"><p id="mrs_01_1162__en-us_topic_0000001173789536_a4107b8407fb84366a7777106d4686cfe">Subattribute</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="34.77%" id="mcps1.3.2.2.8.3.1.4.1.3"><p id="mrs_01_1162__en-us_topic_0000001173789536_ab4fd137d0f5d4e249c5f808437ed0f7a">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="mrs_01_1162__en-us_topic_0000001173789536_r207bf9a67617442399911f7b14e3ae2d"><td class="cellrowborder" rowspan="4" valign="top" width="28.99%" headers="mcps1.3.2.2.8.3.1.4.1.1 "><p id="mrs_01_1162__en-us_topic_0000001173789536_a8f6984e81af9435489f819b2e348d741">server</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="36.24%" headers="mcps1.3.2.2.8.3.1.4.1.2 "><p id="mrs_01_1162__en-us_topic_0000001173789536_aa89406cafd054c32a03314953771c0e8">-a,--all</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="34.77%" headers="mcps1.3.2.2.8.3.1.4.1.3 "><p id="mrs_01_1162__en-us_topic_0000001173789536_a80ba72669e3f4fe5bf1f9dda284b8bf7">Displays all server attributes.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_01_1162__en-us_topic_0000001173789536_re20267a9cfee4ba38bcb794cfce7e251"><td class="cellrowborder" valign="top" headers="mcps1.3.2.2.8.3.1.4.1.1 "><p id="mrs_01_1162__en-us_topic_0000001173789536_aabed9dcdb6274f19af01f30236434019">-p,--port</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" headers="mcps1.3.2.2.8.3.1.4.1.2 "><p id="mrs_01_1162__en-us_topic_0000001173789536_ad40b8289057a414f8a6bc5cc7cbf28b7">Displays the service port.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_01_1162__en-us_topic_0000001173789536_r8d6fdbf958444614b75d64aaf20dbe3e"><td class="cellrowborder" valign="top" headers="mcps1.3.2.2.8.3.1.4.1.1 "><p id="mrs_01_1162__en-us_topic_0000001173789536_ade13ee73072e40938882366837b34485">-w,--webapp</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" headers="mcps1.3.2.2.8.3.1.4.1.2 "><p id="mrs_01_1162__en-us_topic_0000001173789536_a83f28de0b7f04e7d906902c9f594787b">Displays the Tomcat application name.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_01_1162__en-us_topic_0000001173789536_r95e8a80f1e8144bc8949479cfc5e9f47"><td class="cellrowborder" valign="top" headers="mcps1.3.2.2.8.3.1.4.1.1 "><p id="mrs_01_1162__en-us_topic_0000001173789536_a099a77619da84872a362ce25402215d1">-h,--host</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" headers="mcps1.3.2.2.8.3.1.4.1.2 "><p id="mrs_01_1162__en-us_topic_0000001173789536_aa28962a6c3034c57ad58a9aaf6fdbfa1">Displays the service IP address.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_01_1162__en-us_topic_0000001173789536_ra1395a11398b4f91a3d12c3400971014"><td class="cellrowborder" valign="top" width="28.99%" headers="mcps1.3.2.2.8.3.1.4.1.1 "><p id="mrs_01_1162__en-us_topic_0000001173789536_aacabb98c58b6436e8e9477499fafa9f0">option</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="36.24%" headers="mcps1.3.2.2.8.3.1.4.1.2 "><p id="mrs_01_1162__en-us_topic_0000001173789536_a2f676b7b36c24ab29dd3a95f82652389">-name</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="34.77%" headers="mcps1.3.2.2.8.3.1.4.1.3 "><p id="mrs_01_1162__en-us_topic_0000001173789536_a76e573b68fc94e268dba230dc5faed4d">Displays the attributes of the specified name.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_01_1162__en-us_topic_0000001173789536_ra5ffd050edbd488c981376c5f88599eb"><td class="cellrowborder" rowspan="2" valign="top" width="28.99%" headers="mcps1.3.2.2.8.3.1.4.1.1 "><p id="mrs_01_1162__en-us_topic_0000001173789536_a305cd0d19243414ea062972759fa14b9">connector</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="36.24%" headers="mcps1.3.2.2.8.3.1.4.1.2 "><p id="mrs_01_1162__en-us_topic_0000001173789536_ae774f72ecde4411289b8bc76e7053315">-a,--all</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="34.77%" headers="mcps1.3.2.2.8.3.1.4.1.3 "><p id="mrs_01_1162__en-us_topic_0000001173789536_a01d445554c8a49c0a333a17621fa0e2e">Displays information about all connection types.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_01_1162__en-us_topic_0000001173789536_rfa2f5bb4f307457aa38e41d7e2aca442"><td class="cellrowborder" valign="top" headers="mcps1.3.2.2.8.3.1.4.1.1 "><p id="mrs_01_1162__en-us_topic_0000001173789536_abd3b2574856d4b6b9483cc83751dfa2a">-c,--cid</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" headers="mcps1.3.2.2.8.3.1.4.1.2 "><p id="mrs_01_1162__en-us_topic_0000001173789536_a791cdbe9027845719427d14ba470e249">Displays information about the connection type of a specified ID.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_01_1162__en-us_topic_0000001173789536_r2912874499ca428ea72d0e024ebdb81b"><td class="cellrowborder" valign="top" width="28.99%" headers="mcps1.3.2.2.8.3.1.4.1.1 "><p id="mrs_01_1162__en-us_topic_0000001173789536_acf4eb9d8e0394c1b8af0b0eac7131652">framework</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="36.24%" headers="mcps1.3.2.2.8.3.1.4.1.2 "><p id="mrs_01_1162__en-us_topic_0000001173789536_ae07f850bea21470d949fc17a205b822a">None.</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="34.77%" headers="mcps1.3.2.2.8.3.1.4.1.3 "><p id="mrs_01_1162__en-us_topic_0000001173789536_ab9f556cac5f04b9da960d7e456b0a976">Displays metadata information about frameworks.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_01_1162__en-us_topic_0000001173789536_r5fe5a086e3524fd18248b1c231071306"><td class="cellrowborder" rowspan="3" valign="top" width="28.99%" headers="mcps1.3.2.2.8.3.1.4.1.1 "><p id="mrs_01_1162__en-us_topic_0000001173789536_ae8bb3c0096ec4ec0bd5a8e05cd2452b6">connection</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="36.24%" headers="mcps1.3.2.2.8.3.1.4.1.2 "><p id="mrs_01_1162__en-us_topic_0000001173789536_a5a082d38526546c393d3133d7e841ff2">-a,--all</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="34.77%" headers="mcps1.3.2.2.8.3.1.4.1.3 "><p id="mrs_01_1162__en-us_topic_0000001173789536_a965ad2d612ca43cdb0eab218f076793a">Displays all connection attributes.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_01_1162__en-us_topic_0000001173789536_ra02b3c843b224dc7a99ab1b08b9200d1"><td class="cellrowborder" valign="top" headers="mcps1.3.2.2.8.3.1.4.1.1 "><p id="mrs_01_1162__en-us_topic_0000001173789536_ad2b076fe20e74ce39b0398c094ec4d90">-x,--xid</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" headers="mcps1.3.2.2.8.3.1.4.1.2 "><p id="mrs_01_1162__en-us_topic_0000001173789536_ab36b8f4a1e62453f8822beb1b5405f20">Displays the attributes of a specified connection.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_01_1162__en-us_topic_0000001173789536_r8fa968b3abb647cabcb9973cf6f4ed24"><td class="cellrowborder" valign="top" headers="mcps1.3.2.2.8.3.1.4.1.1 "><p id="mrs_01_1162__en-us_topic_0000001173789536_a7522f54d688a440e80da7070de39d379">-n,--name</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" headers="mcps1.3.2.2.8.3.1.4.1.2 "><p id="mrs_01_1162__en-us_topic_0000001173789536_a03f3a137adc64ced9f7988b605a01ef6">Displays the connection attributes of a specified name.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_01_1162__en-us_topic_0000001173789536_r66bb5d81f1944863be0d3386f935181b"><td class="cellrowborder" rowspan="3" valign="top" width="28.99%" headers="mcps1.3.2.2.8.3.1.4.1.1 "><p id="mrs_01_1162__en-us_topic_0000001173789536_a225ed1b2dbc34e759975747244f812ca">job</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="36.24%" headers="mcps1.3.2.2.8.3.1.4.1.2 "><p id="mrs_01_1162__en-us_topic_0000001173789536_a505b0f0b65ff4c7a9e5e61ac1425118b">-a,--all</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="34.77%" headers="mcps1.3.2.2.8.3.1.4.1.3 "><p id="mrs_01_1162__en-us_topic_0000001173789536_ab456fbe613f245a88b40ede182f06825">Displays information about all jobs.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_01_1162__en-us_topic_0000001173789536_rd9a186f95cc347b78d80d7b51d9c6058"><td class="cellrowborder" valign="top" headers="mcps1.3.2.2.8.3.1.4.1.1 "><p id="mrs_01_1162__en-us_topic_0000001173789536_a79ed40a9ea8940c9aa0a21bfd0f50170">-j,--jid</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" headers="mcps1.3.2.2.8.3.1.4.1.2 "><p id="mrs_01_1162__en-us_topic_0000001173789536_abbe2dc1062264414bf2db9896bb10c7d">Displays job information about a specified ID.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_01_1162__en-us_topic_0000001173789536_r4634bc2b45f4409f9ab9279d80f56b78"><td class="cellrowborder" valign="top" headers="mcps1.3.2.2.8.3.1.4.1.1 "><p id="mrs_01_1162__en-us_topic_0000001173789536_ad86889ccb24e4316878eb5225ed55e1e">-n,--name</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" headers="mcps1.3.2.2.8.3.1.4.1.2 "><p id="mrs_01_1162__en-us_topic_0000001173789536_a0672b4765b1049efbf01a2f8c84c256f">Displays job information about a specified name.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_01_1162__en-us_topic_0000001173789536_r4b14ebbfe97a4aecaa03a8f9f3c9dc16"><td class="cellrowborder" rowspan="2" valign="top" width="28.99%" headers="mcps1.3.2.2.8.3.1.4.1.1 "><p id="mrs_01_1162__en-us_topic_0000001173789536_a8cc908fb931d45be90a188540f176f3e">submission</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="36.24%" headers="mcps1.3.2.2.8.3.1.4.1.2 "><p id="mrs_01_1162__en-us_topic_0000001173789536_a5f2f88a426304eac88325b77f109eb3e">-j,--jid</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="34.77%" headers="mcps1.3.2.2.8.3.1.4.1.3 "><p id="mrs_01_1162__en-us_topic_0000001173789536_a3ab49b608ace42a2bf5419b8437137b0">Displays the submission record of a specified job.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_01_1162__en-us_topic_0000001173789536_r96a4e00dd3ea4469a12a780dcb7820a6"><td class="cellrowborder" valign="top" headers="mcps1.3.2.2.8.3.1.4.1.1 "><p id="mrs_01_1162__en-us_topic_0000001173789536_a4e036b8d33d146c49990c7196f9481ea">-d,--detail</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" headers="mcps1.3.2.2.8.3.1.4.1.2 "><p id="mrs_01_1162__en-us_topic_0000001173789536_a439d7126c210429cb2f6f8a32f0f5806">Displays details.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p id="mrs_01_1162__en-us_topic_0000001173789536_afcc1f367a6934c069e729d905a667672">Example:</p>
|
|
<pre class="screen" id="mrs_01_1162__en-us_topic_0000001173789536_s9a87b0a799b0468b9adf5cd162468e69">show server -all
|
|
show option --name verbose
|
|
show connector -all
|
|
show framework
|
|
show connection -all
|
|
show connection -n sftp-example
|
|
show job -all
|
|
show job -j 1
|
|
show submission --jid 1
|
|
show submission --jid 1 -d</pre>
|
|
</li><li id="mrs_01_1162__en-us_topic_0000001173789536_l7a2b0b6a09424f178a315bc5fcb98a54">Create command<div class="p" id="mrs_01_1162__en-us_topic_0000001173789536_a2bcb10b626d84a9185d7c5ad9109b4e6"><a name="mrs_01_1162__en-us_topic_0000001173789536_l7a2b0b6a09424f178a315bc5fcb98a54"></a><a name="en-us_topic_0000001173789536_l7a2b0b6a09424f178a315bc5fcb98a54"></a>This command is used for creating connectors and jobs.
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="mrs_01_1162__en-us_topic_0000001173789536_t8759cddc48ed4b0d865d3ace0761d5ae" frame="border" border="1" rules="all"><thead align="left"><tr id="mrs_01_1162__en-us_topic_0000001173789536_r07f751925f424ab685493c78408b72c6"><th align="left" class="cellrowborder" valign="top" width="28.99%" id="mcps1.3.2.2.9.1.1.1.4.1.1"><p id="mrs_01_1162__en-us_topic_0000001173789536_a4c9eec0d575149a4a332efcbfda54cd0">Attribute Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="36.24%" id="mcps1.3.2.2.9.1.1.1.4.1.2"><p id="mrs_01_1162__en-us_topic_0000001173789536_a869bddb20b2943d88ea170c3a13d48d1">Subattribute</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="34.77%" id="mcps1.3.2.2.9.1.1.1.4.1.3"><p id="mrs_01_1162__en-us_topic_0000001173789536_a7abf3e95718247bbb1108b8e5f69ea6b">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="mrs_01_1162__en-us_topic_0000001173789536_ra0e27e2e2e034c8796ad930a2efbae83"><td class="cellrowborder" rowspan="2" valign="top" width="28.99%" headers="mcps1.3.2.2.9.1.1.1.4.1.1 "><p id="mrs_01_1162__en-us_topic_0000001173789536_a3a6230232d8b4a539087f164f89626e7">connection</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="36.24%" headers="mcps1.3.2.2.9.1.1.1.4.1.2 "><p id="mrs_01_1162__en-us_topic_0000001173789536_a649cdd1a664f46f195ca6fd34444f37f">-c,--cid</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="34.77%" headers="mcps1.3.2.2.9.1.1.1.4.1.3 "><p id="mrs_01_1162__en-us_topic_0000001173789536_a9a1e17f134494963a22684dae6a53fc8">Specifies the ID of a connector type.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_01_1162__en-us_topic_0000001173789536_ra920af86fcd049cd91ed06c2fe66679a"><td class="cellrowborder" valign="top" headers="mcps1.3.2.2.9.1.1.1.4.1.1 "><p id="mrs_01_1162__en-us_topic_0000001173789536_a52b239bce63c4faea9fb1def709d8989">-cn,--cname</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" headers="mcps1.3.2.2.9.1.1.1.4.1.2 "><p id="mrs_01_1162__en-us_topic_0000001173789536_a2ecba8a759f241369cb3848b36457758">Specifies the name of a specified connector type.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_01_1162__en-us_topic_0000001173789536_r9f4bd7394dc1495fbf426b120e0f0fdb"><td class="cellrowborder" rowspan="3" valign="top" width="28.99%" headers="mcps1.3.2.2.9.1.1.1.4.1.1 "><p id="mrs_01_1162__en-us_topic_0000001173789536_a6981da337e2d43dab6d6c5984fa1a88d">job</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="36.24%" headers="mcps1.3.2.2.9.1.1.1.4.1.2 "><p id="mrs_01_1162__en-us_topic_0000001173789536_af0e344db70ae4315844f0c391920cc4e">-x,--xid</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="34.77%" headers="mcps1.3.2.2.9.1.1.1.4.1.3 "><p id="mrs_01_1162__en-us_topic_0000001173789536_a41d14494024947c89cf14d5ae3851022">Specifies the connector ID.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_01_1162__en-us_topic_0000001173789536_r25f210f903b8464a88c93fd7b18297ff"><td class="cellrowborder" valign="top" headers="mcps1.3.2.2.9.1.1.1.4.1.1 "><p id="mrs_01_1162__en-us_topic_0000001173789536_af6ac033c7b954970ad4c3d4703ed47cf">-xn,--xname</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" headers="mcps1.3.2.2.9.1.1.1.4.1.2 "><p id="mrs_01_1162__en-us_topic_0000001173789536_a441e9e5abca048cabff9f9187167794c">Specifies the connector name.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_01_1162__en-us_topic_0000001173789536_r8faedb35867d42ac8b93a7a2a6e2304b"><td class="cellrowborder" valign="top" headers="mcps1.3.2.2.9.1.1.1.4.1.1 "><p id="mrs_01_1162__en-us_topic_0000001173789536_ab559e6ff75094f47923a087bb6dcb1e0">-t,--type</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" headers="mcps1.3.2.2.9.1.1.1.4.1.2 "><p id="mrs_01_1162__en-us_topic_0000001173789536_a959b94b77281450696076148462af598">Specifies the job type.</p>
|
|
<div class="p" id="mrs_01_1162__en-us_topic_0000001173789536_a8482ea0ed71748eeb317c309b2261e27">Possible values:<ul id="mrs_01_1162__en-us_topic_0000001173789536_u3d8f7888e6e4496fb0cef4f1933908c9"><li id="mrs_01_1162__en-us_topic_0000001173789536_lb2510b21205a48a7bf1d3275774cd4e9">import</li><li id="mrs_01_1162__en-us_topic_0000001173789536_lf089991e79d44d67867d57b8411be4f6">export</li></ul>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<ul id="mrs_01_1162__en-us_topic_0000001173789536_u577f1a6203e74debaa34d229b2d37ae9"><li id="mrs_01_1162__en-us_topic_0000001173789536_l186c1de599e84110bdae76c7aeab8718">In the interaction mode, enter the attribute values one by one as prompted.<p id="mrs_01_1162__en-us_topic_0000001173789536_af57bc27d19854d14bce1447a4323ae6d"><a name="mrs_01_1162__en-us_topic_0000001173789536_l186c1de599e84110bdae76c7aeab8718"></a><a name="en-us_topic_0000001173789536_l186c1de599e84110bdae76c7aeab8718"></a>Example for creating connectors:</p>
|
|
<pre class="screen" id="mrs_01_1162__en-us_topic_0000001173789536_sdd91fd85e8d949d9815a3f7ce4c8fe58">create connection -c 1
|
|
create connection -cn example</pre>
|
|
<p id="mrs_01_1162__en-us_topic_0000001173789536_a08b83e2348834d18b7731b29b9c7aece">Example for creating jobs:</p>
|
|
<pre class="screen" id="mrs_01_1162__en-us_topic_0000001173789536_s5dd31baa6e934fd093fbc818485e10e1">create job -x 1 -t import
|
|
create job -xn job_example -t export</pre>
|
|
</li><li id="mrs_01_1162__en-us_topic_0000001173789536_l3520217a97fd4bba96ca0aa36fa1e3d3">In the batch mode, run the following command to view the specific attribute and then set a value for the attribute:<p id="mrs_01_1162__en-us_topic_0000001173789536_a1e8db2489f0e4050b7fb9b3ac57a4d2a"><a name="mrs_01_1162__en-us_topic_0000001173789536_l3520217a97fd4bba96ca0aa36fa1e3d3"></a><a name="en-us_topic_0000001173789536_l3520217a97fd4bba96ca0aa36fa1e3d3"></a><strong id="mrs_01_1162__en-us_topic_0000001173789536_a20e05867cef7449a8275687a3f598891">create job -t import -x 1 --help</strong></p>
|
|
<p id="mrs_01_1162__en-us_topic_0000001173789536_p52692922153227">You can run the above command in either of the following ways:</p>
|
|
<p id="mrs_01_1162__en-us_topic_0000001173789536_p29407023154048">Save the command to a text file and attach this file to the end of the <strong id="mrs_01_1162__en-us_topic_0000001173789536_b69926163891437">sqoop-shell</strong> script, and run the following command:</p>
|
|
<p id="mrs_01_1162__en-us_topic_0000001173789536_p17212890154930"><strong id="mrs_01_1162__en-us_topic_0000001173789536_b20698289154930">./sqoop2-shell </strong><i><span class="varname" id="mrs_01_1162__en-us_topic_0000001173789536_varname52066878154930">batchCommand.sh</span></i></p>
|
|
<p id="mrs_01_1162__en-us_topic_0000001173789536_p1816914915448">Attach a command with the <strong id="mrs_01_1162__en-us_topic_0000001173789536_b117388078291437">-c</strong> parameter to the end of the <strong id="mrs_01_1162__en-us_topic_0000001173789536_b54452019791437">sqoop-shell</strong> script and run the following command:</p>
|
|
<p id="mrs_01_1162__en-us_topic_0000001173789536_p49918595154956"><strong id="mrs_01_1162__en-us_topic_0000001173789536_b46614172154956">./sqoop2-shell </strong><i><span class="varname" id="mrs_01_1162__en-us_topic_0000001173789536_varname16874366154956">-c expression</span></i></p>
|
|
<p id="mrs_01_1162__en-us_topic_0000001173789536_p44489278155114">For details about command execution, refer to previous description in this section. The following shows two complete commands:</p>
|
|
<p id="mrs_01_1162__en-us_topic_0000001173789536_a9f19c00cda334043b45825c5f41caef7">Example for creating connectors:</p>
|
|
<pre class="screen" id="mrs_01_1162__en-us_topic_0000001173789536_s47b8cfb9e82f400794163c6a91cebfae">create connection -c 4 --connector-connection-sftpPassword xxxxx --connector-connection-sftpServerIp 10.0.0.1 --connector-connection-sftpServerPort 22 --connector-connection-sftpUser root--name testConnection</pre>
|
|
<p id="mrs_01_1162__en-us_topic_0000001173789536_a27dba6bf3d454bde8b4ed3e7a0963893">Example for creating jobs:</p>
|
|
<pre class="screen" id="mrs_01_1162__en-us_topic_0000001173789536_sd469997412d74d91bb1706e5ab573506">create job -t import -x 1 --connector-file-inputPath /opt/tempfile --connector-file-fileFilter * --framework-output-outputDirectory /user/loader/1 --framework-output-storageType HDFS --framework-throttling-extractorSize 120 --framework-output-fileType TEXT_FILE --connector-file-splitType FILE -queue default -priority low -name newJob</pre>
|
|
</li><li id="mrs_01_1162__en-us_topic_0000001173789536_ldee47cfb09f744b895e76ff6382bf932">In the batch mode, you can attach a statement using the <strong id="mrs_01_1162__en-us_topic_0000001173789536_b169821819191437">-c</strong> parameter as the bridge.<p id="mrs_01_1162__en-us_topic_0000001173789536_a016d3cee82d943b5b0f020512f42a02f">Example for creating connectors:</p>
|
|
<pre class="screen" id="mrs_01_1162__en-us_topic_0000001173789536_s696bf2414643491f84cf7acffb418d5c">./sqoop2-shell -c "create connection -c 4 --connector-connection-sftpPassword xxxxx --connector-connection-sftpServerIp 10.0.0.1 --connector-connection-sftpServerPort 22 --connector-connection-sftpUser root--name testConnection"</pre>
|
|
</li></ul>
|
|
</div>
|
|
</li><li id="mrs_01_1162__en-us_topic_0000001173789536_la2e061c3a4264ee5b8099e3c32c8d10d"><strong id="mrs_01_1162__en-us_topic_0000001173789536_b125751114132019">update </strong>command<p id="mrs_01_1162__en-us_topic_0000001173789536_adc4449918a864787a978a1f97ed4a056">This command is used for updating connectors and jobs.</p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="mrs_01_1162__en-us_topic_0000001173789536_t8312057d5146427383511c5d100a1d6b" frame="border" border="1" rules="all"><thead align="left"><tr id="mrs_01_1162__en-us_topic_0000001173789536_r40a5f85df27d49b88e09fae79e37992a"><th align="left" class="cellrowborder" valign="top" width="28.99%" id="mcps1.3.2.2.10.3.1.4.1.1"><p id="mrs_01_1162__en-us_topic_0000001173789536_a33ee4940987541edbc5513e26a76e1b8">Attribute Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="36.24%" id="mcps1.3.2.2.10.3.1.4.1.2"><p id="mrs_01_1162__en-us_topic_0000001173789536_a3c748172b55e4074a1a38b3b6ce470c2">Subattribute</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="34.77%" id="mcps1.3.2.2.10.3.1.4.1.3"><p id="mrs_01_1162__en-us_topic_0000001173789536_a6cf787b3a6254a2b8594e425fe45e946">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="mrs_01_1162__en-us_topic_0000001173789536_r6793991631c94bab9d57209735ecfa9d"><td class="cellrowborder" valign="top" width="28.99%" headers="mcps1.3.2.2.10.3.1.4.1.1 "><p id="mrs_01_1162__en-us_topic_0000001173789536_a99fc464ba5dc463791321a87fa75a5d7">connection</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="36.24%" headers="mcps1.3.2.2.10.3.1.4.1.2 "><p id="mrs_01_1162__en-us_topic_0000001173789536_ac1bb190b779143348e492e7974fd025d">-x,--xid</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="34.77%" headers="mcps1.3.2.2.10.3.1.4.1.3 "><p id="mrs_01_1162__en-us_topic_0000001173789536_a7a943e81d8c84d09b62d6b6083f0d33a">Specifies the connector ID.</p>
|
|
<div class="note" id="mrs_01_1162__en-us_topic_0000001173789536_nbd0e2ed6da6f43fa8eb1033c2f81843d"><span class="notetitle"> NOTE: </span><div class="notebody"><p id="mrs_01_1162__en-us_topic_0000001173789536_a9ad0b57986fe49baa2ee342d31a671a9">When the connectors are updated, the password must be set.</p>
|
|
</div></div>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_01_1162__en-us_topic_0000001173789536_r2c41deedff4e482d9749d091f34e1752"><td class="cellrowborder" valign="top" width="28.99%" headers="mcps1.3.2.2.10.3.1.4.1.1 "><p id="mrs_01_1162__en-us_topic_0000001173789536_a023194fef47348c082be4dee72c4989f">job</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="36.24%" headers="mcps1.3.2.2.10.3.1.4.1.2 "><p id="mrs_01_1162__en-us_topic_0000001173789536_aeb553af97c144018a582f37bdf1c366e">-j,--jid</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="34.77%" headers="mcps1.3.2.2.10.3.1.4.1.3 "><p id="mrs_01_1162__en-us_topic_0000001173789536_a891e592c37a24efcaecbd36df72992fe">Specifies the job ID.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<ul id="mrs_01_1162__en-us_topic_0000001173789536_uecf7e54294784dfebccdbf9cf9acd630"><li id="mrs_01_1162__en-us_topic_0000001173789536_l166284cca7984d0f9f7db3f54fb807d8">Interaction mode<p id="mrs_01_1162__en-us_topic_0000001173789536_ab65d5086db39495fa7b9a3fbde991e77"><a name="mrs_01_1162__en-us_topic_0000001173789536_l166284cca7984d0f9f7db3f54fb807d8"></a><a name="en-us_topic_0000001173789536_l166284cca7984d0f9f7db3f54fb807d8"></a>Example for updating connectors:</p>
|
|
<pre class="screen" id="mrs_01_1162__en-us_topic_0000001173789536_s25ecada2a29d40f590720c9efa1b69ab">update connection --xid 1</pre>
|
|
<p id="mrs_01_1162__en-us_topic_0000001173789536_abc0cf12ae82f442cb7f5dd53848a4ef1">Example for updating jobs:</p>
|
|
<pre class="screen" id="mrs_01_1162__en-us_topic_0000001173789536_sac66f23b094f46b89fcdcf9d21851980">update job --jid 1</pre>
|
|
</li><li id="mrs_01_1162__en-us_topic_0000001173789536_l1120d80617c64011a239d1c97f18fc5c">Batch mode<p id="mrs_01_1162__en-us_topic_0000001173789536_ae3470472764042fea2e3b26dc8b47700"><a name="mrs_01_1162__en-us_topic_0000001173789536_l1120d80617c64011a239d1c97f18fc5c"></a><a name="en-us_topic_0000001173789536_l1120d80617c64011a239d1c97f18fc5c"></a>Example for updating connectors:</p>
|
|
<pre class="screen" id="mrs_01_1162__en-us_topic_0000001173789536_s2d8e7352c6a14233bb14e677a968b3b2">update connection -x 6 --connector-connection-sftpServerPort 21 - --name sfp_130--connector-connection-sftpPassword xxxx</pre>
|
|
<p id="mrs_01_1162__en-us_topic_0000001173789536_add4d20a028114e019497eb4e62c76d3e">Example for updating jobs:</p>
|
|
<pre class="screen" id="mrs_01_1162__en-us_topic_0000001173789536_s6247a9f637964711a08634405806b61c">update job -jid 1 -name sftp2hdfs --connector-file-fileFilter *.txt</pre>
|
|
</li></ul>
|
|
</li><li id="mrs_01_1162__en-us_topic_0000001173789536_l3bb7ddeac1a84b8dba2a131e3ec33505"><strong id="mrs_01_1162__en-us_topic_0000001173789536_b1588164224811">delete </strong>command<p id="mrs_01_1162__en-us_topic_0000001173789536_aedd16362cedb43e1853524fc546df5d6">This command is used for deleting connectors and jobs.</p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="mrs_01_1162__en-us_topic_0000001173789536_t498ca4ceea39481a8c1a961dab29144e" frame="border" border="1" rules="all"><thead align="left"><tr id="mrs_01_1162__en-us_topic_0000001173789536_r93cdb6d2d5fe466eac47ac514311f94c"><th align="left" class="cellrowborder" valign="top" width="28.99%" id="mcps1.3.2.2.11.3.1.4.1.1"><p id="mrs_01_1162__en-us_topic_0000001173789536_afbdc95575a2c43e688e41f0c0ffeba45">Attribute Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="36.24%" id="mcps1.3.2.2.11.3.1.4.1.2"><p id="mrs_01_1162__en-us_topic_0000001173789536_a43b1ebc27434438eb00e51aa8ea6c4c7">Subattribute</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="34.77%" id="mcps1.3.2.2.11.3.1.4.1.3"><p id="mrs_01_1162__en-us_topic_0000001173789536_ab7b273c8284241e0b456b7e7339eacf9">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="mrs_01_1162__en-us_topic_0000001173789536_r68808b1c5d604a14855b88aecd7c646d"><td class="cellrowborder" rowspan="2" valign="top" width="28.99%" headers="mcps1.3.2.2.11.3.1.4.1.1 "><p id="mrs_01_1162__en-us_topic_0000001173789536_a7394b6d12a184f97b977c075c07a32f1">connection</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="36.24%" headers="mcps1.3.2.2.11.3.1.4.1.2 "><p id="mrs_01_1162__en-us_topic_0000001173789536_adfe1586299fd4a029a531721f9c75b94">-x,--xid</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="34.77%" headers="mcps1.3.2.2.11.3.1.4.1.3 "><p id="mrs_01_1162__en-us_topic_0000001173789536_a3b16586d73774913bd0514d02f00d41c">Specifies the connector ID.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_01_1162__en-us_topic_0000001173789536_r1584161caf2645398c7ae7d2d721d864"><td class="cellrowborder" valign="top" headers="mcps1.3.2.2.11.3.1.4.1.1 "><p id="mrs_01_1162__en-us_topic_0000001173789536_abde1437454484d8fb6276e12aa18d0b4">-n,--name</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" headers="mcps1.3.2.2.11.3.1.4.1.2 "><p id="mrs_01_1162__en-us_topic_0000001173789536_a5f436a6a91dd4d4180ad7c0b5dfcc1a9">Specifies the connector name.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_01_1162__en-us_topic_0000001173789536_r02e05a20e853402f8b16c1df8cd6670b"><td class="cellrowborder" rowspan="2" valign="top" width="28.99%" headers="mcps1.3.2.2.11.3.1.4.1.1 "><p id="mrs_01_1162__en-us_topic_0000001173789536_a6e1ebe7c708b418498bec98b153ae6cc">job</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="36.24%" headers="mcps1.3.2.2.11.3.1.4.1.2 "><p id="mrs_01_1162__en-us_topic_0000001173789536_a1c3e37045ca14134af86ff9e34a68e51">-j,--jid</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="34.77%" headers="mcps1.3.2.2.11.3.1.4.1.3 "><p id="mrs_01_1162__en-us_topic_0000001173789536_aa29a46a24876484c888a9653b499a764">Specifies the job ID.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_01_1162__en-us_topic_0000001173789536_r43a28dcff6cb4555815ac65d211d3396"><td class="cellrowborder" valign="top" headers="mcps1.3.2.2.11.3.1.4.1.1 "><p id="mrs_01_1162__en-us_topic_0000001173789536_acf08e83aa4124c4d8bb05b57aa2ce0f4">-n,--name</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" headers="mcps1.3.2.2.11.3.1.4.1.2 "><p id="mrs_01_1162__en-us_topic_0000001173789536_a6d20c6f83fc54668a0c88329f5ec6c9b">Specifies the job name.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p id="mrs_01_1162__en-us_topic_0000001173789536_afc0dbae743e64c07a3b5d301150b86ac">Example:</p>
|
|
<pre class="screen" id="mrs_01_1162__en-us_topic_0000001173789536_s0fe5c6ad9b284f06ae9f9754367d2347">delete connection -x 1
|
|
delete connection --name abc
|
|
delete job -j 1
|
|
delete job -n qwerty</pre>
|
|
</li><li id="mrs_01_1162__en-us_topic_0000001173789536_l7a4118ac77aa436db6d0f78ebcd8073a"><strong id="mrs_01_1162__en-us_topic_0000001173789536_b56831193487">clone </strong>command<p id="mrs_01_1162__en-us_topic_0000001173789536_a48f8703ebf594da098edcb1b877f53d6">This command is used for cloning connectors and jobs.</p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="mrs_01_1162__en-us_topic_0000001173789536_td2ce1b591da2416498fc224b6ecbe250" frame="border" border="1" rules="all"><thead align="left"><tr id="mrs_01_1162__en-us_topic_0000001173789536_r68767eb98c854c1da8ec1760d97cdd2a"><th align="left" class="cellrowborder" valign="top" width="28.99%" id="mcps1.3.2.2.12.3.1.4.1.1"><p id="mrs_01_1162__en-us_topic_0000001173789536_a838f5df469b5405d83341fd6462250de">Attribute Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="36.24%" id="mcps1.3.2.2.12.3.1.4.1.2"><p id="mrs_01_1162__en-us_topic_0000001173789536_ad7aac7ac60a245e58895c8538f79faff">Subattribute</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="34.77%" id="mcps1.3.2.2.12.3.1.4.1.3"><p id="mrs_01_1162__en-us_topic_0000001173789536_a838ca26b76d44df8a0965f95b87d8b4c">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="mrs_01_1162__en-us_topic_0000001173789536_r1ab15d449ef24260b11f8995d8f42d9a"><td class="cellrowborder" valign="top" width="28.99%" headers="mcps1.3.2.2.12.3.1.4.1.1 "><p id="mrs_01_1162__en-us_topic_0000001173789536_a4c53d1716dcd4d5082c641f89bc491d7">connection</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="36.24%" headers="mcps1.3.2.2.12.3.1.4.1.2 "><p id="mrs_01_1162__en-us_topic_0000001173789536_ab64af9e46048415e83563c54bb618cb3">-x,--xid</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="34.77%" headers="mcps1.3.2.2.12.3.1.4.1.3 "><p id="mrs_01_1162__en-us_topic_0000001173789536_ab822aadd324145c9b91603b64f7861bf">Specifies the connector ID.</p>
|
|
<div class="note" id="mrs_01_1162__en-us_topic_0000001173789536_nbd0231b729164c069f36a46b567db4b3"><span class="notetitle"> NOTE: </span><div class="notebody"><p id="mrs_01_1162__en-us_topic_0000001173789536_a6d7bea1bc6974eeaa35d281fef8ba628">The password and connector name must be entered when the connectors are cloned.</p>
|
|
</div></div>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_01_1162__en-us_topic_0000001173789536_r6bd4a731b9ad41dd8160bbc051c30451"><td class="cellrowborder" valign="top" width="28.99%" headers="mcps1.3.2.2.12.3.1.4.1.1 "><p id="mrs_01_1162__en-us_topic_0000001173789536_a34c303bc5320412c8e22c2f59745632b">job</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="36.24%" headers="mcps1.3.2.2.12.3.1.4.1.2 "><p id="mrs_01_1162__en-us_topic_0000001173789536_a9bde08fa303c40c294d81b54e8e11209">-j,--jid</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="34.77%" headers="mcps1.3.2.2.12.3.1.4.1.3 "><p id="mrs_01_1162__en-us_topic_0000001173789536_a905dd9891b814257b5f938549a8d953a">Specifies the job ID.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p id="mrs_01_1162__en-us_topic_0000001173789536_a606ffaaebb4e476ebda85d186933b4a2">Example:</p>
|
|
<pre class="screen" id="mrs_01_1162__en-us_topic_0000001173789536_sc6b4e753610643daa0a70c7bd0f68b4d">clone job -j 1</pre>
|
|
</li><li id="mrs_01_1162__en-us_topic_0000001173789536_l071b105e43b945299388f5c382e73369"><strong id="mrs_01_1162__en-us_topic_0000001173789536_b17327184218260">start </strong>command<p id="mrs_01_1162__en-us_topic_0000001173789536_a18d6523bc17d43e3b14757ae859995c9">This command is used for starting jobs.</p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="mrs_01_1162__en-us_topic_0000001173789536_t2d720f88a1534138ba17256870826e9f" frame="border" border="1" rules="all"><thead align="left"><tr id="mrs_01_1162__en-us_topic_0000001173789536_r64f8a7fdccea490c810f268fe55b6877"><th align="left" class="cellrowborder" valign="top" width="28.99%" id="mcps1.3.2.2.13.3.1.4.1.1"><p id="mrs_01_1162__en-us_topic_0000001173789536_aed6e7384e6654711a7df2b68a6368ccb">Attribute Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="36.24%" id="mcps1.3.2.2.13.3.1.4.1.2"><p id="mrs_01_1162__en-us_topic_0000001173789536_aab524d1b6b754f648cb07848bb776332">Subattribute</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="34.77%" id="mcps1.3.2.2.13.3.1.4.1.3"><p id="mrs_01_1162__en-us_topic_0000001173789536_aecf47acf980a4559b161ce782a5bb681">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="mrs_01_1162__en-us_topic_0000001173789536_r716954bf7940407484af2328405f430b"><td class="cellrowborder" rowspan="3" valign="top" width="28.99%" headers="mcps1.3.2.2.13.3.1.4.1.1 "><p id="mrs_01_1162__en-us_topic_0000001173789536_ad7d7625211c4451088763cd24dea1a06">job</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="36.24%" headers="mcps1.3.2.2.13.3.1.4.1.2 "><p id="mrs_01_1162__en-us_topic_0000001173789536_a67ae37c02b49473a88fc4579d2c327af">-j,--jid</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="34.77%" headers="mcps1.3.2.2.13.3.1.4.1.3 "><p id="mrs_01_1162__en-us_topic_0000001173789536_aa8568c8a765642cca56fe3b87e643c7f">Specifies the job ID.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_01_1162__en-us_topic_0000001173789536_rc0dabcb9e0564dab98c742602d6f732d"><td class="cellrowborder" valign="top" headers="mcps1.3.2.2.13.3.1.4.1.1 "><p id="mrs_01_1162__en-us_topic_0000001173789536_a7f062d1184094814b3f97390756cb2f7">-n,--name</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" headers="mcps1.3.2.2.13.3.1.4.1.2 "><p id="mrs_01_1162__en-us_topic_0000001173789536_acf50135e3b20499c88c90ac3bf1ddc58">Specifies the job name.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_01_1162__en-us_topic_0000001173789536_r94191fbfd4c4467f98a7e1601180768a"><td class="cellrowborder" valign="top" headers="mcps1.3.2.2.13.3.1.4.1.1 "><p id="mrs_01_1162__en-us_topic_0000001173789536_a2f25076587ba41cc8fda066feb6f06d5">-s,--synchronous</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" headers="mcps1.3.2.2.13.3.1.4.1.2 "><p id="mrs_01_1162__en-us_topic_0000001173789536_a8bca0d2de794416ea257b59d1a06f80b">Whether to start jobs in the synchronous mode or not.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p id="mrs_01_1162__en-us_topic_0000001173789536_aad2f51e6ec3445e18afe163effb9ff26">Example for starting jobs in the asynchronous mode:</p>
|
|
<pre class="screen" id="mrs_01_1162__en-us_topic_0000001173789536_sc51baa790abb4b309bf8b2d5b7ba68b6">start job -j 1
|
|
start job -n abc</pre>
|
|
<p id="mrs_01_1162__en-us_topic_0000001173789536_a233c1c676b584c25970c250491661625">Example for starting jobs in the synchronous mode:</p>
|
|
<pre class="screen" id="mrs_01_1162__en-us_topic_0000001173789536_saf96f5bd2e4b42bf9ba617b98d2bebff">start job -j 1 -s
|
|
start job --name abc --synchronous</pre>
|
|
</li><li id="mrs_01_1162__en-us_topic_0000001173789536_l4bafd19b405649dfa902cf464fcbf33b"><strong id="mrs_01_1162__en-us_topic_0000001173789536_b131491413213">stop </strong>command<p id="mrs_01_1162__en-us_topic_0000001173789536_aa579131793b2405492083096cd0ae39e">This command is used for stopping jobs.</p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="mrs_01_1162__en-us_topic_0000001173789536_tec54d18681764b5195a1167e948cbe33" frame="border" border="1" rules="all"><thead align="left"><tr id="mrs_01_1162__en-us_topic_0000001173789536_r71726bef33cd4c619e222041561c65a7"><th align="left" class="cellrowborder" valign="top" width="28.99%" id="mcps1.3.2.2.14.3.1.4.1.1"><p id="mrs_01_1162__en-us_topic_0000001173789536_a7c3f2e6e8d874f069ada665a464deefc">Attribute Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="36.24%" id="mcps1.3.2.2.14.3.1.4.1.2"><p id="mrs_01_1162__en-us_topic_0000001173789536_ac9805ecbc5a442619bb7f416084e6476">Subattribute</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="34.77%" id="mcps1.3.2.2.14.3.1.4.1.3"><p id="mrs_01_1162__en-us_topic_0000001173789536_a30cf9b13cb1642ad9c056619559e9565">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="mrs_01_1162__en-us_topic_0000001173789536_rc9d8ac7c7dac4c68aefd1f251b9c3d15"><td class="cellrowborder" rowspan="2" valign="top" width="28.99%" headers="mcps1.3.2.2.14.3.1.4.1.1 "><p id="mrs_01_1162__en-us_topic_0000001173789536_aea03b7f25a14408396e41cdf7e414a8a">job</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="36.24%" headers="mcps1.3.2.2.14.3.1.4.1.2 "><p id="mrs_01_1162__en-us_topic_0000001173789536_a1b4c103089a942aea4c43bdae75cdfc8">-j,--jid</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="34.77%" headers="mcps1.3.2.2.14.3.1.4.1.3 "><p id="mrs_01_1162__en-us_topic_0000001173789536_ad1934a087d484683b469086085a3966c">Specifies the job ID.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_01_1162__en-us_topic_0000001173789536_r74e2a644bb324aa498be86327ddeaa5a"><td class="cellrowborder" valign="top" headers="mcps1.3.2.2.14.3.1.4.1.1 "><p id="mrs_01_1162__en-us_topic_0000001173789536_af1c54449be3440339ea678801bed0b8e">-n,--name</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" headers="mcps1.3.2.2.14.3.1.4.1.2 "><p id="mrs_01_1162__en-us_topic_0000001173789536_abfac91f06dd246f6aa7f10b164f2a56e">Specifies the job name.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p id="mrs_01_1162__en-us_topic_0000001173789536_a8ad863f4d96a4b5a94356b81b0260886">Example:</p>
|
|
<pre class="screen" id="mrs_01_1162__en-us_topic_0000001173789536_s7c61dd75704f41628e05b08dd5a4909e">stop job -j 1
|
|
stop job -n abc</pre>
|
|
</li><li id="mrs_01_1162__en-us_topic_0000001173789536_l6a9c60a3c0e64cc6b4708402d3104385">Status command<p id="mrs_01_1162__en-us_topic_0000001173789536_a8d92ed1ed5b04554aa269da51ab35918"><a name="mrs_01_1162__en-us_topic_0000001173789536_l6a9c60a3c0e64cc6b4708402d3104385"></a><a name="en-us_topic_0000001173789536_l6a9c60a3c0e64cc6b4708402d3104385"></a>This command is used for viewing job status.</p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="mrs_01_1162__en-us_topic_0000001173789536_t614c9d512ad74b698cbf8906dd3efc3d" frame="border" border="1" rules="all"><thead align="left"><tr id="mrs_01_1162__en-us_topic_0000001173789536_rda35df67b1904a9f8a4e595943d93f67"><th align="left" class="cellrowborder" valign="top" width="28.99%" id="mcps1.3.2.2.15.2.1.4.1.1"><p id="mrs_01_1162__en-us_topic_0000001173789536_a44fadb70dc2e47b2b96e99d7092e4b2d">Attribute Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="36.24%" id="mcps1.3.2.2.15.2.1.4.1.2"><p id="mrs_01_1162__en-us_topic_0000001173789536_a4c43c76506ba4e03b6384ca8c7d3fb02">Subattribute</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="34.77%" id="mcps1.3.2.2.15.2.1.4.1.3"><p id="mrs_01_1162__en-us_topic_0000001173789536_a4baf89fc3f0c4b2cabc11163557f50c4"><strong id="mrs_01_1162__en-us_topic_0000001173789536_b22511033091437">Description</strong></p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="mrs_01_1162__en-us_topic_0000001173789536_r25dd580225f24e37bcb1629bad066761"><td class="cellrowborder" valign="top" width="28.99%" headers="mcps1.3.2.2.15.2.1.4.1.1 "><p id="mrs_01_1162__en-us_topic_0000001173789536_a6d7814da2daa444185294d3a6d6bb344">job</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="36.24%" headers="mcps1.3.2.2.15.2.1.4.1.2 "><p id="mrs_01_1162__en-us_topic_0000001173789536_a3098b9bac2014e019b9e54d3397d29e0">-j,--jid</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="34.77%" headers="mcps1.3.2.2.15.2.1.4.1.3 "><p id="mrs_01_1162__en-us_topic_0000001173789536_a0950d4aef5c64ddf8be670d48382556c">Specifies the job ID.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p id="mrs_01_1162__en-us_topic_0000001173789536_a72dcc09cb0da4d55917a060fc9accc5a">When <strong id="mrs_01_1162__en-us_topic_0000001173789536_b99025380291437">-s</strong> parameter is attached to the command, the result only contains the enumerated value of job status.</p>
|
|
<p id="mrs_01_1162__en-us_topic_0000001173789536_af018800140bb45aaa9f9444e26a5bdc0">Example:</p>
|
|
<pre class="screen" id="mrs_01_1162__en-us_topic_0000001173789536_sc3a4cfd171e04c9991e2c23712a7f738">status job -j 1
|
|
status job -j 1 -s</pre>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="mrs_01_1162__en-us_topic_0000001173789536_sa814e0c1fca1411295f45c74db3cdbe9"><h4 class="sectiontitle">Extended Attributes of Create Command</h4><p id="mrs_01_1162__en-us_topic_0000001173789536_a88c1c9a692004ac7a6f8a8afbef724aa">For the scenario in which HDFS exchanges data with the SFTP server or RDB, MRS extends the create command attributes on the basis of the open source sqoop-shell tool, so as to specify line and field separators and conversion steps when jobs are created.</p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="mrs_01_1162__en-us_topic_0000001173789536_t2b36806bb02846629a91bf80b7a856e0" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Extended Attributes of Create Command</caption><thead align="left"><tr id="mrs_01_1162__en-us_topic_0000001173789536_r258ec4ee4a2f40d8ac9ec9aa8dfe2de7"><th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.3.3.2.3.1.1"><p id="mrs_01_1162__en-us_topic_0000001173789536_a14247c4fb59244d5a981af70320010a3">Property</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.3.3.2.3.1.2"><p id="mrs_01_1162__en-us_topic_0000001173789536_a1c6a8aa2fdbc4f079083c1c8b783571d">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="mrs_01_1162__en-us_topic_0000001173789536_r8bdb4927cf2f490a94bb08101a28396a"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.3.3.2.3.1.1 "><p id="mrs_01_1162__en-us_topic_0000001173789536_a77d99e59321a4a8da0bbacbf28fc5dd6">fields-terminated-by</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.3.3.2.3.1.2 "><p id="mrs_01_1162__en-us_topic_0000001173789536_ad17e5fb9cd8a4242a47809221ee15ac0">Default field separator.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_01_1162__en-us_topic_0000001173789536_r5988fadbf5584df7ba3415649b7c88dc"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.3.3.2.3.1.1 "><p id="mrs_01_1162__en-us_topic_0000001173789536_a1f562bb194184b7695492b104193e7e5">lines-terminated-by</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.3.3.2.3.1.2 "><p id="mrs_01_1162__en-us_topic_0000001173789536_a8ea8a83340ef46f486f00c593d298107">Default line separator.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_01_1162__en-us_topic_0000001173789536_r7412b779288c4ad8ac9a14c6736a6082"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.3.3.2.3.1.1 "><p id="mrs_01_1162__en-us_topic_0000001173789536_a5abc58d380ac4c0795edfa575be75d71">input-fields-terminated-by</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.3.3.2.3.1.2 "><p id="mrs_01_1162__en-us_topic_0000001173789536_a77af99ebdc5a49d4b53809001b97ccd6">Inputs the step field separator. If the step field separator is not specified, the value equals to <strong id="mrs_01_1162__en-us_topic_0000001173789536_b118769940491437">fields-terminated-by</strong> by default.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_01_1162__en-us_topic_0000001173789536_r74c07fe045ea49599cd8a2ff547486ee"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.3.3.2.3.1.1 "><p id="mrs_01_1162__en-us_topic_0000001173789536_a96034d11b48745d78adc75fd89180f69">input-lines-terminated-by</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.3.3.2.3.1.2 "><p id="mrs_01_1162__en-us_topic_0000001173789536_ab1bbbd04c51746f8b4bd3a276bbbdb43">Inputs the step line separator. If the step line separator is not specified, the value equals to <strong id="mrs_01_1162__en-us_topic_0000001173789536_b85182268191437">lines-terminated-by</strong> by default.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_01_1162__en-us_topic_0000001173789536_r0f3871022b9a47a989db6133f5ba5346"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.3.3.2.3.1.1 "><p id="mrs_01_1162__en-us_topic_0000001173789536_aff35adf034f741948bae99fb3b27f08c">output-fields-terminated-by</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.3.3.2.3.1.2 "><p id="mrs_01_1162__en-us_topic_0000001173789536_a6ffe1debb6d74b7b94823ba6308a53fd">Outputs the step field separator. If the step field separator is not specified, the value equals to <strong id="mrs_01_1162__en-us_topic_0000001173789536_b87090107491437">fields-terminated-by</strong> by default.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_01_1162__en-us_topic_0000001173789536_r6a1f2a55ba394c479343c6ae3c47863a"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.3.3.2.3.1.1 "><p id="mrs_01_1162__en-us_topic_0000001173789536_aa22fc4cecee2479196316476252dd3eb">output-lines-terminated-by</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.3.3.2.3.1.2 "><p id="mrs_01_1162__en-us_topic_0000001173789536_a5189981f81fa47d881ca32f6259edee1">Outputs the step line separator. If the step line separator is not specified, the value equals to <strong id="mrs_01_1162__en-us_topic_0000001173789536_b147871403891437">lines-terminated-by</strong> by default.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_01_1162__en-us_topic_0000001173789536_rfa2c8e13854f4507ae50cdaa26a7c864"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.3.3.2.3.1.1 "><p id="mrs_01_1162__en-us_topic_0000001173789536_a74526dd3fc9947b984ee157b7ca7bc4f">trans</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.3.3.2.3.1.2 "><p id="mrs_01_1162__en-us_topic_0000001173789536_adf14efe006c54e93b1837d5fecea5bda">Specifies the conversion steps. The value is the directory where the conversion step file is located. When the relative directory of file is specified, the file is by default stored in the directory where the <span class="filepath" id="mrs_01_1162__en-us_topic_0000001173789536_fac65792f61e441ebbafedabefa73d7f8"><b>sqoop2-shell</b></span> script is located. When the attribute is set, the other extended attributes can be ignored.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="mrs_01_1162__en-us_topic_0000001173789536_section0865633111314"><h4 class="sectiontitle">Interconnecting Sqoop1 with MRS</h4><ol id="mrs_01_1162__en-us_topic_0000001173789536_ol778931016180"><li id="mrs_01_1162__en-us_topic_0000001173789536_li19789111017182"><span>Download the open source Sqoop from <a href="http://www.apache.org/dyn/closer.lua/sqoo:p/1.4.7" target="_blank" rel="noopener noreferrer">http://www.apache.org/dyn/closer.lua/sqoo:p/1.4.7</a>.</span></li><li id="mrs_01_1162__en-us_topic_0000001173789536_li6789510181819"><span>Save the downloaded <strong id="mrs_01_1162__en-us_topic_0000001173789536_b64238234573">sqoop-1.4.7.bin__hadoop-2.6.0.tar.gz</strong> package to the <strong id="mrs_01_1162__en-us_topic_0000001173789536_b38218339577">/opt/sqoop</strong> directory on the Master node in the MRS cluster and decompress the package.</span><p><p id="mrs_01_1162__en-us_topic_0000001173789536_p207898102181"><strong id="mrs_01_1162__en-us_topic_0000001173789536_b7789171071819">tar zxvf sqoop-1.4.7.bin__hadoop-2.6.0.tar.gz</strong></p>
|
|
</p></li><li id="mrs_01_1162__en-us_topic_0000001173789536_li117891410161818"><span>Go to the directory where the package is decompressed and modify the configuration.</span><p><p id="mrs_01_1162__en-us_topic_0000001173789536_p12789201017181"><strong id="mrs_01_1162__en-us_topic_0000001173789536_b1978921013184">cd /opt/sqoop/sqoop-1.4.7.bin__hadoop-2.6.0/conf</strong></p>
|
|
<p id="mrs_01_1162__en-us_topic_0000001173789536_p1578971051813"><strong id="mrs_01_1162__en-us_topic_0000001173789536_b67891310181818">cp sqoop-env-template.sh sqoop-env.sh</strong></p>
|
|
<p id="mrs_01_1162__en-us_topic_0000001173789536_p17789121081814"><strong id="mrs_01_1162__en-us_topic_0000001173789536_b187891310171813">vi sqoop-env.sh</strong></p>
|
|
<p id="mrs_01_1162__en-us_topic_0000001173789536_p1278921018185">Add the following configurations:</p>
|
|
<p id="mrs_01_1162__en-us_topic_0000001173789536_p147893100187">export HADOOP_COMMON_HOME=/opt/client/HDFS/hadoop</p>
|
|
<p id="mrs_01_1162__en-us_topic_0000001173789536_p14789010161816">export HADOOP_MAPRED_HOME=/opt/client/HDFS/hadoop</p>
|
|
<p id="mrs_01_1162__en-us_topic_0000001173789536_p18789161041812">export HIVE_HOME=/opt/Bigdata/MRS_1.9.X/install/FusionInsight-Hive-3.1.0/hive (Enter the actual path.)</p>
|
|
<p id="mrs_01_1162__en-us_topic_0000001173789536_p167892010151812">export HIVE_CONF_DIR=/opt/client/Hive/config</p>
|
|
<p id="mrs_01_1162__en-us_topic_0000001173789536_p178916103188">export HCAT_HOME=/opt/client/Hive/HCatalog</p>
|
|
</p></li></ol><ol start="4" id="mrs_01_1162__en-us_topic_0000001173789536_ol2078918103182"><li id="mrs_01_1162__en-us_topic_0000001173789536_li147881910101815"><span>Add the system variable <strong id="mrs_01_1162__en-us_topic_0000001173789536_b1142173775917">SQOOP_HOME</strong> to <strong id="mrs_01_1162__en-us_topic_0000001173789536_b12833193819594">PATH</strong>.</span><p><p id="mrs_01_1162__en-us_topic_0000001173789536_p1944813553139"><strong id="mrs_01_1162__en-us_topic_0000001173789536_b4928204419185">vi /etc/profile</strong></p>
|
|
<p id="mrs_01_1162__en-us_topic_0000001173789536_p5448165591315">Add the following information:</p>
|
|
<p id="mrs_01_1162__en-us_topic_0000001173789536_p14481755151310">export SQOOP_HOME=/opt/sqoop/sqoop-1.4.7.bin__hadoop-2.6.0</p>
|
|
<p id="mrs_01_1162__en-us_topic_0000001173789536_p844825519135">export PATH=$PATH:$SQOOP_HOME/bin</p>
|
|
</p></li><li id="mrs_01_1162__en-us_topic_0000001173789536_li850015189252"><span>Run the following command to copy the <strong id="mrs_01_1162__en-us_topic_0000001173789536_b164551519912">jline-2.12.jar</strong> file to the <strong id="mrs_01_1162__en-us_topic_0000001173789536_b2783822718">lib</strong> file.</span><p><p id="mrs_01_1162__en-us_topic_0000001173789536_p316052016255"><strong id="mrs_01_1162__en-us_topic_0000001173789536_b71344256256">cp /opt/share/jline-2.12/jline-2.12.jar /opt/sqoop/sqoop-1.4.7.bin__hadoop-2.6.0/lib</strong></p>
|
|
</p></li><li id="mrs_01_1162__en-us_topic_0000001173789536_li41766535187"><span>Run the following command to add the following configuration to the file.</span><p><p id="mrs_01_1162__en-us_topic_0000001173789536_p1565162517280"><strong id="mrs_01_1162__en-us_topic_0000001173789536_b10405173012817">vim $JAVA_HOME/jre/lib/security/java.policy</strong></p>
|
|
<p id="mrs_01_1162__en-us_topic_0000001173789536_p142039032819">permission javax.management.MBeanTrustPermission "register";</p>
|
|
</p></li><li id="mrs_01_1162__en-us_topic_0000001173789536_li7790204914304"><span>Run the following command to interconnect sqoop1 with MRS.</span><p><p id="mrs_01_1162__en-us_topic_0000001173789536_p1872912522303"><strong id="mrs_01_1162__en-us_topic_0000001173789536_b726874663010">source /etc/profile</strong></p>
|
|
</p></li></ol>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="mrs_01_1155.html">Client Tool Description</a></div>
|
|
</div>
|
|
</div>
|
|
|