Yang, Tong 3f5759eed2 MRS comp-lts 2.0.38.SP20 version
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>
2023-01-19 17:08:45 +00:00

163 lines
27 KiB
HTML

<a name="mrs_01_0598"></a><a name="mrs_01_0598"></a>
<h1 class="topictitle1">Common Flink Shell Commands</h1>
<div id="body8662426"><p id="mrs_01_0598__en-us_topic_0000001219149715_p18665940151218">Before running the Flink shell commands, perform the following steps:</p>
<ol id="mrs_01_0598__en-us_topic_0000001219149715_ol168757872718"><li id="mrs_01_0598__en-us_topic_0000001219149715_li2087512818273"><span>Install the Flink client in a directory, for example, <strong id="mrs_01_0598__en-us_topic_0000001219149715_b198041135155410">/opt/client</strong>.</span></li><li id="mrs_01_0598__en-us_topic_0000001219149715_li9875180279"><span>Run the following command to initialize environment variables:</span><p><p id="mrs_01_0598__en-us_topic_0000001219149715_p10423946122715"><strong id="mrs_01_0598__en-us_topic_0000001219149715_b1587412231213">source /opt/client/bigdata_env</strong></p>
</p></li><li id="mrs_01_0598__en-us_topic_0000001219149715_li1987413236217"><span>If Kerberos authentication is enabled for the current cluster, run the following command to authenticate the user. If Kerberos authentication is disabled, skip this step.</span><p><p id="mrs_01_0598__en-us_topic_0000001219149715_p4874112317214"><strong id="mrs_01_0598__en-us_topic_0000001219149715_b1731715554552">kinit</strong> <em id="mrs_01_0598__en-us_topic_0000001219149715_i332212558552">Service user</em></p>
</p></li><li id="mrs_01_0598__en-us_topic_0000001219149715_li68752817272"><span>Run the related commands according to <a href="#mrs_01_0598__en-us_topic_0000001219149715_table65101640171215">Table 1</a>.</span><p>
<div class="tablenoborder"><a name="mrs_01_0598__en-us_topic_0000001219149715_table65101640171215"></a><a name="en-us_topic_0000001219149715_table65101640171215"></a><table cellpadding="4" cellspacing="0" summary="" id="mrs_01_0598__en-us_topic_0000001219149715_table65101640171215" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Flink Shell commands</caption><thead align="left"><tr id="mrs_01_0598__en-us_topic_0000001219149715_row266514404129"><th align="left" class="cellrowborder" valign="top" width="19.01190119011901%" id="mcps1.3.2.4.2.1.2.4.1.1"><p id="mrs_01_0598__en-us_topic_0000001219149715_p2149115918167"><strong id="mrs_01_0598__en-us_topic_0000001219149715_b2356134965617">Command</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="47.65476547654765%" id="mcps1.3.2.4.2.1.2.4.1.2"><p id="mrs_01_0598__en-us_topic_0000001219149715_p1149105911160"><strong id="mrs_01_0598__en-us_topic_0000001219149715_b12821192155710">Description</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.2.4.2.1.2.4.1.3"><p id="mrs_01_0598__en-us_topic_0000001219149715_p41492597169"><strong id="mrs_01_0598__en-us_topic_0000001219149715_b17421114155715">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="mrs_01_0598__en-us_topic_0000001219149715_row1666534011216"><td class="cellrowborder" valign="top" width="19.01190119011901%" headers="mcps1.3.2.4.2.1.2.4.1.1 "><p id="mrs_01_0598__en-us_topic_0000001219149715_p76657406128">yarn-session.sh</p>
</td>
<td class="cellrowborder" valign="top" width="47.65476547654765%" headers="mcps1.3.2.4.2.1.2.4.1.2 "><p id="mrs_01_0598__en-us_topic_0000001219149715_p3863102264419"><strong id="mrs_01_0598__en-us_topic_0000001219149715_b203642184232">-at,--applicationType &lt;arg&gt;</strong>: Defines the Yarn application type.</p>
<p id="mrs_01_0598__en-us_topic_0000001219149715_p196669401122"><strong id="mrs_01_0598__en-us_topic_0000001219149715_b1049319122512">-D &lt;property=value&gt;</strong>: Configures dynamic parameter.</p>
<p id="mrs_01_0598__en-us_topic_0000001219149715_p156661540141215"><strong id="mrs_01_0598__en-us_topic_0000001219149715_b65551855135814">-d,--detached</strong>: Disables the interactive mode and starts a separate Flink Yarn session.</p>
<p id="mrs_01_0598__en-us_topic_0000001219149715_p179554635316"><strong id="mrs_01_0598__en-us_topic_0000001219149715_b12927458981095">-h,--help</strong>: Displays the help information about the Yarn session CLI.</p>
<p id="mrs_01_0598__en-us_topic_0000001219149715_p5666174051214"><strong id="mrs_01_0598__en-us_topic_0000001219149715_b763712414591">-id,--applicationId &lt;arg&gt;</strong>: Binds to a running Yarn session.</p>
<p id="mrs_01_0598__en-us_topic_0000001219149715_p4666124011215"><strong id="mrs_01_0598__en-us_topic_0000001219149715_b192512399251">-j,--jar &lt;arg&gt;</strong>: Sets the path of the user's JAR file.</p>
<p id="mrs_01_0598__en-us_topic_0000001219149715_p1166624051218"><strong id="mrs_01_0598__en-us_topic_0000001219149715_b248414419010">-jm,--jobManagerMemory &lt;arg&gt;</strong>: Sets the JobManager memory.</p>
<p id="mrs_01_0598__en-us_topic_0000001219149715_p176056318546"><strong id="mrs_01_0598__en-us_topic_0000001219149715_b16635140131095">-m,--jobmanager &lt;arg&gt;</strong>: Address of the JobManager (master) to which to connect. Use this parameter to connect to a specified JobManager.</p>
<p id="mrs_01_0598__en-us_topic_0000001219149715_p1790718322544"><strong id="mrs_01_0598__en-us_topic_0000001219149715_b159731313192811">-nl,--nodeLabel &lt;arg&gt;</strong>: Specifies the nodeLabel of the Yarn application.</p>
<p id="mrs_01_0598__en-us_topic_0000001219149715_p1366624081213"><strong id="mrs_01_0598__en-us_topic_0000001219149715_b1474141762818">-nm,--name &lt;arg&gt;</strong>: Customizes a name for the application on Yarn.</p>
<p id="mrs_01_0598__en-us_topic_0000001219149715_p13666340171211"><strong id="mrs_01_0598__en-us_topic_0000001219149715_b1843102110281">-q,--query</strong>: Queries available Yarn resources.</p>
<p id="mrs_01_0598__en-us_topic_0000001219149715_p15666154041213"><strong id="mrs_01_0598__en-us_topic_0000001219149715_b1444624162815">-qu,--queue &lt;arg&gt;</strong>: Specifies a Yarn queue.</p>
<p id="mrs_01_0598__en-us_topic_0000001219149715_p13666154016129"><strong id="mrs_01_0598__en-us_topic_0000001219149715_b5611172719289">-s,--slots &lt;arg&gt;</strong>: Sets the number of slots for each TaskManager.</p>
<p id="mrs_01_0598__en-us_topic_0000001219149715_p266618404129"><strong id="mrs_01_0598__en-us_topic_0000001219149715_b1226436172814">-t,--ship &lt;arg&gt;</strong>: specifies the directory of the file to be sent.</p>
<p id="mrs_01_0598__en-us_topic_0000001219149715_p106661040151219"><strong id="mrs_01_0598__en-us_topic_0000001219149715_b26451639112812">-tm,--taskManagerMemory &lt;arg&gt;</strong>: sets the TaskManager memory.</p>
<p id="mrs_01_0598__en-us_topic_0000001219149715_p169065914518"><strong id="mrs_01_0598__en-us_topic_0000001219149715_b1561954252818">-yd,--yarndetached</strong>: starts Yarn in the detached mode.</p>
<p id="mrs_01_0598__en-us_topic_0000001219149715_p126524256429"><strong id="mrs_01_0598__en-us_topic_0000001219149715_b11871046192817">-z,--zookeeperNamespace &lt;args&gt;</strong>: specifies the namespace of ZooKeeper.</p>
<p id="mrs_01_0598__en-us_topic_0000001219149715_p186668401122"><strong id="mrs_01_0598__en-us_topic_0000001219149715_b2043174942815">-h</strong>: Gets help information.</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.2.4.2.1.2.4.1.3 "><p id="mrs_01_0598__en-us_topic_0000001219149715_p1866634041219">Start a resident Flink cluster to receive tasks from the Flink client.</p>
</td>
</tr>
<tr id="mrs_01_0598__en-us_topic_0000001219149715_row566634012127"><td class="cellrowborder" valign="top" width="19.01190119011901%" headers="mcps1.3.2.4.2.1.2.4.1.1 "><p id="mrs_01_0598__en-us_topic_0000001219149715_p17666174011213">flink run</p>
</td>
<td class="cellrowborder" valign="top" width="47.65476547654765%" headers="mcps1.3.2.4.2.1.2.4.1.2 "><p id="mrs_01_0598__en-us_topic_0000001219149715_p1166619405122"><strong id="mrs_01_0598__en-us_topic_0000001219149715_b193823151139">-c,--class &lt;classname&gt;</strong>: Specifies a class as the entry for running programs.</p>
<p id="mrs_01_0598__en-us_topic_0000001219149715_p116661540121211"><strong id="mrs_01_0598__en-us_topic_0000001219149715_b15209541739">-C,--classpath &lt;url&gt;</strong>: Specifies <strong id="mrs_01_0598__en-us_topic_0000001219149715_b621494115311">classpath</strong>.</p>
<p id="mrs_01_0598__en-us_topic_0000001219149715_p466644016122"><strong id="mrs_01_0598__en-us_topic_0000001219149715_b103427596318">-d,--detached</strong>: Runs a job in the detached mode.</p>
<p id="mrs_01_0598__en-us_topic_0000001219149715_p117611123153412"><strong id="mrs_01_0598__en-us_topic_0000001219149715_b53520910291">-files,--dependencyFiles &lt;arg&gt;</strong>: File on which the Flink program depends.</p>
<p id="mrs_01_0598__en-us_topic_0000001219149715_p165351205200"><strong id="mrs_01_0598__en-us_topic_0000001219149715_b18244745391095">-n,--allowNonRestoredState</strong>: A state that cannot be restored can be skipped during restoration from a snapshot point in time. For example, if an operator in the program is deleted, you need to add this parameter when restoring the snapshot point.</p>
<p id="mrs_01_0598__en-us_topic_0000001219149715_p466611406123"><strong id="mrs_01_0598__en-us_topic_0000001219149715_b10102131516412">-m,--jobmanager &lt;host:port&gt;</strong>: Specifies the JobManager.</p>
<p id="mrs_01_0598__en-us_topic_0000001219149715_p9666040101211"><strong id="mrs_01_0598__en-us_topic_0000001219149715_b394552511418">-p,--parallelism &lt;parallelism&gt;</strong>: Specifies the job DOP, which will overwrite the DOP parameter in the configuration file.</p>
<p id="mrs_01_0598__en-us_topic_0000001219149715_p1666617401121"><strong id="mrs_01_0598__en-us_topic_0000001219149715_b104411667359">-q,--sysoutLogging</strong>: Disables the function of outputting Flink logs to the console.</p>
<p id="mrs_01_0598__en-us_topic_0000001219149715_p4666164041210"><strong id="mrs_01_0598__en-us_topic_0000001219149715_b825112462519">-s,--fromSavepoint &lt;savepointPath&gt;</strong>: Specifies a savepoint path for recovering jobs.</p>
<p id="mrs_01_0598__en-us_topic_0000001219149715_p14666154051215"><strong id="mrs_01_0598__en-us_topic_0000001219149715_b15331164062">-z,--zookeeperNamespace &lt;zookeeperNamespace&gt;</strong>: specifies the namespace of ZooKeeper.</p>
<p id="mrs_01_0598__en-us_topic_0000001219149715_p6804183315571"><strong id="mrs_01_0598__en-us_topic_0000001219149715_b162821257133120">-yat,--yarnapplicationType &lt;arg&gt;</strong>: Defines the Yarn application type.</p>
<p id="mrs_01_0598__en-us_topic_0000001219149715_p666624031220"><strong id="mrs_01_0598__en-us_topic_0000001219149715_b199239868">-yD &lt;arg&gt;</strong>: Dynamic parameter configuration.</p>
<p id="mrs_01_0598__en-us_topic_0000001219149715_p36666403129"><strong id="mrs_01_0598__en-us_topic_0000001219149715_b105673178611">-yd,--yarndetached</strong>: Starts Yarn in the detached mode.</p>
<p id="mrs_01_0598__en-us_topic_0000001219149715_p20452144655712"><strong id="mrs_01_0598__en-us_topic_0000001219149715_b1014713242327">-yh,--yarnhelp</strong>: Obtains the Yarn help.</p>
<p id="mrs_01_0598__en-us_topic_0000001219149715_p2666140151214"><strong id="mrs_01_0598__en-us_topic_0000001219149715_b1269322510612">-yid,--yarnapplicationId &lt;arg&gt;</strong>: Binds a job to a Yarn session.</p>
<p id="mrs_01_0598__en-us_topic_0000001219149715_p11666134091215"><strong id="mrs_01_0598__en-us_topic_0000001219149715_b1551692976">-yj,--yarnjar &lt;arg&gt;</strong>: Sets the path to Flink jar file.</p>
<p id="mrs_01_0598__en-us_topic_0000001219149715_p12666240121218"><strong id="mrs_01_0598__en-us_topic_0000001219149715_b793613916717">-yjm,--yarnjobManagerMemory &lt;arg&gt;</strong>: Sets the JobManager memory (MB).</p>
<p id="mrs_01_0598__en-us_topic_0000001219149715_p0666134071220"><strong id="mrs_01_0598__en-us_topic_0000001219149715_b789910441083">-ynm,--yarnname &lt;arg&gt;</strong>: Customizes a name for the application on Yarn.</p>
<p id="mrs_01_0598__en-us_topic_0000001219149715_p166604012125"><strong id="mrs_01_0598__en-us_topic_0000001219149715_b14581981699">-yq,--yarnquery</strong>: Queries available Yarn resources (memory and CPUs).</p>
<p id="mrs_01_0598__en-us_topic_0000001219149715_p26661240121211"><strong id="mrs_01_0598__en-us_topic_0000001219149715_b1577514304912">-yqu,--yarnqueue &lt;arg&gt;</strong>: Specifies a Yarn queue.</p>
<p id="mrs_01_0598__en-us_topic_0000001219149715_p86669405127"><strong id="mrs_01_0598__en-us_topic_0000001219149715_b115125372092">-ys,--yarnslots</strong>: Sets the number of slots for each TaskManager.</p>
<p id="mrs_01_0598__en-us_topic_0000001219149715_p26665407124"><strong id="mrs_01_0598__en-us_topic_0000001219149715_b47703425912">-yt,--yarnship &lt;arg&gt;</strong>: Specifies the path of the file to be sent.</p>
<p id="mrs_01_0598__en-us_topic_0000001219149715_p966624015128"><strong id="mrs_01_0598__en-us_topic_0000001219149715_b145396521093">-ytm,--yarntaskManagerMemory &lt;arg&gt;</strong>: Sets the TaskManager memory (MB).</p>
<p id="mrs_01_0598__en-us_topic_0000001219149715_p7666154041216"><strong id="mrs_01_0598__en-us_topic_0000001219149715_b89278651014">-yz,--yarnzookeeperNamespace &lt;arg&gt;</strong>: Specifies the namespace of ZooKeeper. The value must be the same as the value of <strong id="mrs_01_0598__en-us_topic_0000001219149715_b393313612108">yarn-session.sh -z</strong>.</p>
<p id="mrs_01_0598__en-us_topic_0000001219149715_p8666134011217"><strong id="mrs_01_0598__en-us_topic_0000001219149715_b15477201516106">-h</strong>: Gets help information.</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.2.4.2.1.2.4.1.3 "><p id="mrs_01_0598__en-us_topic_0000001219149715_p20666144013122">Submit a Flink job.</p>
<p id="mrs_01_0598__en-us_topic_0000001219149715_p6666164041220">1. The <strong id="mrs_01_0598__en-us_topic_0000001219149715_b397143218101">-y*</strong> parameter is used in the <strong id="mrs_01_0598__en-us_topic_0000001219149715_b1997653213102">yarn-cluster</strong> mode.</p>
<p id="mrs_01_0598__en-us_topic_0000001219149715_p866617403121">2. If the parameter is not <strong id="mrs_01_0598__en-us_topic_0000001219149715_b1415816393107">-y*</strong>, you need to run the <strong id="mrs_01_0598__en-us_topic_0000001219149715_b11633391108">yarn-session</strong> command to start the Flink cluster before running this command to submit a task.</p>
</td>
</tr>
<tr id="mrs_01_0598__en-us_topic_0000001219149715_row196662400129"><td class="cellrowborder" valign="top" width="19.01190119011901%" headers="mcps1.3.2.4.2.1.2.4.1.1 "><p id="mrs_01_0598__en-us_topic_0000001219149715_p146666406129">flink info</p>
</td>
<td class="cellrowborder" valign="top" width="47.65476547654765%" headers="mcps1.3.2.4.2.1.2.4.1.2 "><p id="mrs_01_0598__en-us_topic_0000001219149715_p166661040141215"><strong id="mrs_01_0598__en-us_topic_0000001219149715_b1040117371120">-c,--class &lt;classname&gt;</strong>: Specifies a class as the entry for running programs.</p>
<p id="mrs_01_0598__en-us_topic_0000001219149715_p6666194051216"><strong id="mrs_01_0598__en-us_topic_0000001219149715_b14309413122">-p,--parallelism &lt;parallelism&gt;</strong>: Specifies the DOP for running programs.</p>
<p id="mrs_01_0598__en-us_topic_0000001219149715_p1766615404129"><strong id="mrs_01_0598__en-us_topic_0000001219149715_b11756143413124">-h</strong>: Gets help information.</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.2.4.2.1.2.4.1.3 "><p id="mrs_01_0598__en-us_topic_0000001219149715_p15666940161210">Display the execution plan (JSON) of the running program.</p>
</td>
</tr>
<tr id="mrs_01_0598__en-us_topic_0000001219149715_row1966620404121"><td class="cellrowborder" valign="top" width="19.01190119011901%" headers="mcps1.3.2.4.2.1.2.4.1.1 "><p id="mrs_01_0598__en-us_topic_0000001219149715_p26661440181210">flink list</p>
</td>
<td class="cellrowborder" valign="top" width="47.65476547654765%" headers="mcps1.3.2.4.2.1.2.4.1.2 "><p id="mrs_01_0598__en-us_topic_0000001219149715_p2080113346583"><strong id="mrs_01_0598__en-us_topic_0000001219149715_b92269983312">-a,--all</strong>: displays all jobs.</p>
<p id="mrs_01_0598__en-us_topic_0000001219149715_p1666704016124"><strong id="mrs_01_0598__en-us_topic_0000001219149715_b1352095013132">-m,--jobmanager &lt;host:port&gt;</strong>: specifies the JobManager.</p>
<p id="mrs_01_0598__en-us_topic_0000001219149715_p1966716406124"><strong id="mrs_01_0598__en-us_topic_0000001219149715_b1779253101316">-r,--running:</strong> displays only jobs in the running state.</p>
<p id="mrs_01_0598__en-us_topic_0000001219149715_p1066718409128"><strong id="mrs_01_0598__en-us_topic_0000001219149715_b18801101411145">-s,--scheduled</strong>: displays only jobs in the scheduled state.</p>
<p id="mrs_01_0598__en-us_topic_0000001219149715_p7667104031218"><strong id="mrs_01_0598__en-us_topic_0000001219149715_b17214102418140">-z,--zookeeperNamespace &lt;zookeeperNamespace&gt;</strong>: specifies the namespace of ZooKeeper.</p>
<p id="mrs_01_0598__en-us_topic_0000001219149715_p8667840141220"><strong id="mrs_01_0598__en-us_topic_0000001219149715_b122551828131414">-yid,--yarnapplicationId &lt;arg&gt;</strong>: binds a job to a Yarn session.</p>
<p id="mrs_01_0598__en-us_topic_0000001219149715_p76671940201213"><strong id="mrs_01_0598__en-us_topic_0000001219149715_b553016338147">-h</strong>: gets help information.</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.2.4.2.1.2.4.1.3 "><p id="mrs_01_0598__en-us_topic_0000001219149715_p1066710408129">Query running programs in the cluster.</p>
</td>
</tr>
<tr id="mrs_01_0598__en-us_topic_0000001219149715_row196671040171216"><td class="cellrowborder" valign="top" width="19.01190119011901%" headers="mcps1.3.2.4.2.1.2.4.1.1 "><p id="mrs_01_0598__en-us_topic_0000001219149715_p76674408126">flink stop</p>
</td>
<td class="cellrowborder" valign="top" width="47.65476547654765%" headers="mcps1.3.2.4.2.1.2.4.1.2 "><p id="mrs_01_0598__en-us_topic_0000001219149715_p19051445144410"><strong id="mrs_01_0598__en-us_topic_0000001219149715_b184181037163311">-d,--drain</strong>: sends MAX_WATERMARK before the savepoint is triggered and the job is stopped.</p>
<p id="mrs_01_0598__en-us_topic_0000001219149715_p1216545415462"><strong id="mrs_01_0598__en-us_topic_0000001219149715_b430663912387">-p,--savepointPath &lt;savepointPath&gt;</strong>: path for storing savepoints. The default value is <strong id="mrs_01_0598__en-us_topic_0000001219149715_b101307491385">state.savepoints.dir</strong>.</p>
<p id="mrs_01_0598__en-us_topic_0000001219149715_p206671040131217"><strong id="mrs_01_0598__en-us_topic_0000001219149715_b6201053161410">-m,--jobmanager &lt;host:port&gt;</strong>: specifies the JobManager.</p>
<p id="mrs_01_0598__en-us_topic_0000001219149715_p066724011128"><strong id="mrs_01_0598__en-us_topic_0000001219149715_b107333547147">-z,--zookeeperNamespace &lt;zookeeperNamespace&gt;</strong>: specifies the namespace of ZooKeeper.</p>
<p id="mrs_01_0598__en-us_topic_0000001219149715_p366710405126"><strong id="mrs_01_0598__en-us_topic_0000001219149715_b04855564142">-yid,--yarnapplicationId &lt;arg&gt;</strong>: binds a job to a Yarn session.</p>
<p id="mrs_01_0598__en-us_topic_0000001219149715_p1766713402129"><strong id="mrs_01_0598__en-us_topic_0000001219149715_b1115010313155">-h</strong>: gets help information.</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.2.4.2.1.2.4.1.3 "><p id="mrs_01_0598__en-us_topic_0000001219149715_p6310236191215">Forcibly stop a running job (only streaming jobs are supported. <strong id="mrs_01_0598__en-us_topic_0000001219149715_b16728105819266">StoppableFunction</strong> needs to be implemented on the source side in service code).</p>
</td>
</tr>
<tr id="mrs_01_0598__en-us_topic_0000001219149715_row20667144020128"><td class="cellrowborder" valign="top" width="19.01190119011901%" headers="mcps1.3.2.4.2.1.2.4.1.1 "><p id="mrs_01_0598__en-us_topic_0000001219149715_p66671140171214">flink cancel</p>
</td>
<td class="cellrowborder" valign="top" width="47.65476547654765%" headers="mcps1.3.2.4.2.1.2.4.1.2 "><p id="mrs_01_0598__en-us_topic_0000001219149715_p176671640161210"><strong id="mrs_01_0598__en-us_topic_0000001219149715_b81777145270">-m,--jobmanager &lt;host:port&gt;</strong>: specifies the JobManager.</p>
<p id="mrs_01_0598__en-us_topic_0000001219149715_p3667204017121"><strong id="mrs_01_0598__en-us_topic_0000001219149715_b1535616172273">-s,--withSavepoint &lt;targetDirectory&gt;</strong>: triggers a savepoint when a job is canceled. The default directory is <strong id="mrs_01_0598__en-us_topic_0000001219149715_b03579176276">state.savepoints.dir</strong>.</p>
<p id="mrs_01_0598__en-us_topic_0000001219149715_p14667040201212"><strong id="mrs_01_0598__en-us_topic_0000001219149715_b1334375082718">-z,--zookeeperNamespace &lt;zookeeperNamespace&gt;</strong>: specifies the namespace of ZooKeeper.</p>
<p id="mrs_01_0598__en-us_topic_0000001219149715_p466717409125"><strong id="mrs_01_0598__en-us_topic_0000001219149715_b5944195118273">-yid,--yarnapplicationId &lt;arg&gt;</strong>: binds a job to a Yarn session.</p>
<p id="mrs_01_0598__en-us_topic_0000001219149715_p266714019127"><strong id="mrs_01_0598__en-us_topic_0000001219149715_b1756185482716">-h</strong>: gets help information.</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.2.4.2.1.2.4.1.3 "><p id="mrs_01_0598__en-us_topic_0000001219149715_p14667174010127">Cancel a running job.</p>
</td>
</tr>
<tr id="mrs_01_0598__en-us_topic_0000001219149715_row2667340161211"><td class="cellrowborder" valign="top" width="19.01190119011901%" headers="mcps1.3.2.4.2.1.2.4.1.1 "><p id="mrs_01_0598__en-us_topic_0000001219149715_p36673402126">flink savepoint</p>
</td>
<td class="cellrowborder" valign="top" width="47.65476547654765%" headers="mcps1.3.2.4.2.1.2.4.1.2 "><p id="mrs_01_0598__en-us_topic_0000001219149715_p1466719406125"><strong id="mrs_01_0598__en-us_topic_0000001219149715_b967725832718">-d,--dispose &lt;arg&gt;</strong>: specifies a directory for storing the savepoint.</p>
<p id="mrs_01_0598__en-us_topic_0000001219149715_p116677406121"><strong id="mrs_01_0598__en-us_topic_0000001219149715_b283514158287">-m,--jobmanager &lt;host:port&gt;</strong>: specifies the JobManager.</p>
<p id="mrs_01_0598__en-us_topic_0000001219149715_p76673402128"><strong id="mrs_01_0598__en-us_topic_0000001219149715_b204111217132814">-z,--zookeeperNamespace &lt;zookeeperNamespace&gt;</strong>: specifies the namespace of ZooKeeper.</p>
<p id="mrs_01_0598__en-us_topic_0000001219149715_p206678404125"><strong id="mrs_01_0598__en-us_topic_0000001219149715_b16438319112810">-yid,--yarnapplicationId &lt;arg&gt;</strong>: binds a job to a Yarn session.</p>
<p id="mrs_01_0598__en-us_topic_0000001219149715_p1667114012124"><strong id="mrs_01_0598__en-us_topic_0000001219149715_b96282162814">-h</strong>: gets help information.</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.2.4.2.1.2.4.1.3 "><p id="mrs_01_0598__en-us_topic_0000001219149715_p26671340111212">Trigger a savepoint.</p>
</td>
</tr>
<tr id="mrs_01_0598__en-us_topic_0000001219149715_row196671440191210"><td class="cellrowborder" valign="top" width="19.01190119011901%" headers="mcps1.3.2.4.2.1.2.4.1.1 "><p id="mrs_01_0598__en-us_topic_0000001219149715_p1966894016124"><strong id="mrs_01_0598__en-us_topic_0000001219149715_b13376624162817">source</strong> <em id="mrs_01_0598__en-us_topic_0000001219149715_i18377172411288">Client installation directory</em><strong id="mrs_01_0598__en-us_topic_0000001219149715_b14377172482814">/bigdata_env</strong></p>
</td>
<td class="cellrowborder" valign="top" width="47.65476547654765%" headers="mcps1.3.2.4.2.1.2.4.1.2 "><p id="mrs_01_0598__en-us_topic_0000001219149715_p19668124071210">None</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.2.4.2.1.2.4.1.3 "><p id="mrs_01_0598__en-us_topic_0000001219149715_p106686404129">Import client environment variables.</p>
<p id="mrs_01_0598__en-us_topic_0000001219149715_p866810404126">Restriction: If the user uses a custom script (for example, <strong id="mrs_01_0598__en-us_topic_0000001219149715_b8954123417289">A.sh</strong>) and runs this command in the script, variables cannot be imported to the <strong id="mrs_01_0598__en-us_topic_0000001219149715_b3959534192820">A.sh</strong> script. If variables need to be imported to the custom script <strong id="mrs_01_0598__en-us_topic_0000001219149715_b6187713298">A.sh</strong>, the user needs to use the secondary calling method.</p>
<p id="mrs_01_0598__en-us_topic_0000001219149715_p15668840141212">For example, first call the <strong id="mrs_01_0598__en-us_topic_0000001219149715_b1696414020296">B.sh</strong> script in the <strong id="mrs_01_0598__en-us_topic_0000001219149715_b796912408297">A.sh</strong> script, and then run this command in the <strong id="mrs_01_0598__en-us_topic_0000001219149715_b119701840202919">B.sh</strong> script. Parameters can be imported to the <strong id="mrs_01_0598__en-us_topic_0000001219149715_b98081343014">A.sh</strong> script but cannot be imported to the <strong id="mrs_01_0598__en-us_topic_0000001219149715_b18131634306">B.sh</strong> script.</p>
</td>
</tr>
<tr id="mrs_01_0598__en-us_topic_0000001219149715_row1682194612319"><td class="cellrowborder" valign="top" width="19.01190119011901%" headers="mcps1.3.2.4.2.1.2.4.1.1 "><p id="mrs_01_0598__en-us_topic_0000001219149715_p13624041424">start-scala-shell.sh</p>
</td>
<td class="cellrowborder" valign="top" width="47.65476547654765%" headers="mcps1.3.2.4.2.1.2.4.1.2 "><p id="mrs_01_0598__en-us_topic_0000001219149715_p56251441822">local | remote &lt;host&gt; &lt;port&gt; | yarn: running mode</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.2.4.2.1.2.4.1.3 "><p id="mrs_01_0598__en-us_topic_0000001219149715_p1262510414211">Start the scala shell.</p>
</td>
</tr>
<tr id="mrs_01_0598__en-us_topic_0000001219149715_row996022135716"><td class="cellrowborder" valign="top" width="19.01190119011901%" headers="mcps1.3.2.4.2.1.2.4.1.1 "><p id="mrs_01_0598__en-us_topic_0000001219149715_p59601821185711">sh generate_keystore.sh</p>
</td>
<td class="cellrowborder" valign="top" width="47.65476547654765%" headers="mcps1.3.2.4.2.1.2.4.1.2 "><p id="mrs_01_0598__en-us_topic_0000001219149715_p996012114576">-</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.2.4.2.1.2.4.1.3 "><p id="mrs_01_0598__en-us_topic_0000001219149715_p796018218571">Run the <strong id="mrs_01_0598__en-us_topic_0000001219149715_b1413611359206">generate_keystore.sh</strong> script to generate security cookie, <strong id="mrs_01_0598__en-us_topic_0000001219149715_b18140113518207">flink.keystore</strong>, and <strong id="mrs_01_0598__en-us_topic_0000001219149715_b1414013512016">flink.truststore</strong>. You need to enter a user-defined password that does not contain number signs (#).</p>
</td>
</tr>
</tbody>
</table>
</div>
</p></li></ol>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="mrs_01_0591.html">Using Flink</a></div>
</div>
</div>