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>
31 lines
5.0 KiB
HTML
31 lines
5.0 KiB
HTML
<a name="mrs_01_1039"></a><a name="mrs_01_1039"></a>
|
|
|
|
<h1 class="topictitle1">Checking the Consumption Status of Consumer Group</h1>
|
|
<div id="body1590134593893"><div class="section" id="mrs_01_1039__section16495586143216"><h4 class="sectiontitle">Scenario</h4><p id="mrs_01_1039__p4372151411224">This section describes how to view the current expenditure on the client based on service requirements.</p>
|
|
<p id="mrs_01_1039__p1944684185813">This section applies to MRS 3.<em id="mrs_01_1039__i46510418526">x</em> or later.</p>
|
|
</div>
|
|
<div class="section" id="mrs_01_1039__section25964774143228"><h4 class="sectiontitle">Prerequisites</h4><ul id="mrs_01_1039__ul6069050143251"><li id="mrs_01_1039__li40521849143251">The system administrator has understood service requirements and prepared a system user.</li></ul>
|
|
</div>
|
|
<ul id="mrs_01_1039__ul54621450143251"><li id="mrs_01_1039__li10166364143251">The Kafka client has been installed.</li></ul>
|
|
<div class="section" id="mrs_01_1039__section14399982143239"><h4 class="sectiontitle">Procedure</h4><ol id="mrs_01_1039__ol39347335143522"><li id="mrs_01_1039__li11285618143522"><span>Log in as a client installation user to the node on which the Kafka client is installed.</span></li><li id="mrs_01_1039__li61987727143524"><span>Switch to the Kafka client installation directory, for example, <strong id="mrs_01_1039__b18635258171318">/opt/kafkaclient</strong>.</span><p><p id="mrs_01_1039__p3064111714354"><strong id="mrs_01_1039__b3995695415225">cd /opt/kafkaclient</strong></p>
|
|
</p></li><li id="mrs_01_1039__li48669262143532"><span>Run the following command to configure environment variables:</span><p><p id="mrs_01_1039__p4532096914354"><strong id="mrs_01_1039__b10329033143547">source bigdata_env</strong></p>
|
|
</p></li><li id="mrs_01_1039__li10284003143554"><span>Run the following command to perform user authentication (skip this step in normal mode):</span><p><p id="mrs_01_1039__p5861543214354"><strong id="mrs_01_1039__b3225124112157">kinit</strong> <em id="mrs_01_1039__i723034141512">Component service user</em></p>
|
|
</p></li><li id="mrs_01_1039__li13769366143610"><span>Run the following command to switch to the Kafka client installation directory:</span><p><p id="mrs_01_1039__p4206274514354"><strong id="mrs_01_1039__b30695343143616">cd Kafka/kafka/bin</strong></p>
|
|
</p></li><li id="mrs_01_1039__li34880554143641"><span>Run the <strong id="mrs_01_1039__b7544155521516">kafka-consumer-groups.sh</strong> command to check the current consumption status. </span><p><ul id="mrs_01_1039__ul2069738714499"><li id="mrs_01_1039__li1523497914499">Check the Consumer Group list on Kafka saved by Offset:<p id="mrs_01_1039__p26226751143715"><a name="mrs_01_1039__li1523497914499"></a><a name="li1523497914499"></a><strong id="mrs_01_1039__b45704206144259">./kafka-consumer-groups.sh --list --bootstrap-server</strong> <<em id="mrs_01_1039__i30665082143959"><em id="mrs_01_1039__i19246654184713">Service IP address of any broker node</em>:21007</em>><strong id="mrs_01_1039__b3768339814434"> --command-config ../config/consumer.properties</strong></p>
|
|
<p id="mrs_01_1039__p48311586143710">eg:./kafka-consumer-groups.sh --bootstrap-server 192.168.1.1:21007 --list --command-config ../config/consumer.properties</p>
|
|
</li></ul>
|
|
<ul id="mrs_01_1039__ul19428758144915"><li id="mrs_01_1039__li56709724144915">Check the consumption status of Consumer Group on Kafka saved by Offset:<p id="mrs_01_1039__p39082589143736"><a name="mrs_01_1039__li56709724144915"></a><a name="li56709724144915"></a><strong id="mrs_01_1039__b53123589144318">./kafka-consumer-groups.sh --describe --bootstrap-server</strong> <<em id="mrs_01_1039__i7400057144230"><em id="mrs_01_1039__i460320159218"><em id="mrs_01_1039__i751216224811">Service IP address of any broker node</em></em>:21007</em>><em id="mrs_01_1039__i53480706144329"> --group Consumer group name</em> <strong id="mrs_01_1039__b36741120144335">--command-config ../config/consumer.properties</strong></p>
|
|
<p id="mrs_01_1039__p2914888314354">eg:./kafka-consumer-groups.sh --describe --bootstrap-server 192.168.1.1:21007 --group example-group --command-config ../config/consumer.properties</p>
|
|
</li></ul>
|
|
<div class="notice" id="mrs_01_1039__note8546766143748"><span class="noticetitle"><img src="public_sys-resources/notice_3.0-en-us.png"> </span><div class="noticebody"><ol type="a" id="mrs_01_1039__ol5256348114380"><li id="mrs_01_1039__li933450714380">Ensure that the current consumer is online and consumes data.</li><li id="mrs_01_1039__li4041913714380">Configure the <strong id="mrs_01_1039__b1722335022715">group.id</strong> in the <strong id="mrs_01_1039__b1888035311270">consumer.properties</strong> configuration file and <strong id="mrs_01_1039__b289618012810">--group</strong> in the command to the group to be queried.</li><li id="mrs_01_1039__li5388817103242">The Kafka cluster's IP port number is 21007 in security mode and 9092 in normal mode.</li></ol>
|
|
</div></div>
|
|
</p></li></ol>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="mrs_01_0375.html">Using Kafka</a></div>
|
|
</div>
|
|
</div>
|
|
|