
    9hmu                     \   S SK r S SKrS SKJr  S SKJr  S SKJr  S SKJ	r	J
r
Jr  S SKrS SKJr  S SKJr  S SKJrJrJrJrJr  S S	KJrJrJrJrJrJrJrJrJ r   S S
K!J"r"J#r#  S SK$J%r%J&r&  S SK'J(r(  S SK)J*r*J+r+  SSK,J-r-J.r.  SSK/J0r0  SSK1J2r2  SSK3J4r4  \Rj                  " \65      r7 " S S5      r8g)    N)defaultdict)Sequence)
SSLContext)AnyOptionalUnion)__version__)AIOKafkaClient)IncompatibleBrokerVersionLeaderNotAvailableErrorNotControllerErrorNotLeaderForPartitionErrorfor_code)	AlterConfigsRequestApiVersionRequest_v0CreatePartitionsRequestCreateTopicsRequestDeleteRecordsRequestDeleteTopicsRequestDescribeConfigsRequestDescribeGroupsRequestListGroupsRequest)RequestResponse)GroupCoordinatorRequestOffsetFetchRequest)MetadataRequest)OffsetAndMetadataTopicPartition   )ConfigResourceConfigResourceType)NewPartitions)NewTopic)RecordsToDeletec                    :   \ rS rSrSrSSS\-   SSSS	S
SSSSSSSSS.S\\\\   4   S\S\	S\	S\	S\	S\S\
\   S\S\S\
\   S\
\   S\S\
\   S\
\   4S jjrS r SPS \S!\
\	   S"\4S# jjrS$ rS% rS&\\\      S"\	4S' jrS!\	S \S"\4S( jrS \S"\4S) jr\S* 5       r  SQS+\\   S,\
\	   S-\S"\4S. jjr SPS/\\   S,\
\	   S"\4S0 jjr SPS/\
\\      S"\4S1 jjrS"\\   4S2 jr SPS/\
\\      S"\\    4S3 jjr!S"\"\\ 4   4S4 jr# SRS5\\$   S6\S"\\   4S7 jjr%S5\\$   S"\\   4S8 jr&\S9 5       r'\S: 5       r(\) SSS5\\$   S;\S"\*\"\	\ 4   \\    4   4S< jj5       r+\S=\"\\,4   4S> j5       r-  SQS=\"\\,4   S,\
\	   S-\S"\4S? jjr.  SQS@\\   SA\
\	   SB\S"\\   4SC jjr/ SPSD\
\\	      S"\\*\ SE4      4SF jjr0STSG\SH\	S"\	4SI jjr1  SUSG\SA\
\	   SJ\
\\2      S"\"\2\34   4SK jjr4 SPSL\"\2\54   S,\
\	   S"\"\2\	4   4SM jjr6\SL\"\\\*\	\54      4   4SN j5       r7SOr8g)VAIOKafkaAdminClient+   a  A class for administering the Kafka cluster.

.. note::

    This class is considered **experimental**, so beware that it is subject
    to changes even in patch releases.

Keyword Arguments:
    bootstrap_servers: 'host[:port]' string (or list of 'host[:port]'
        strings) that the consumer should contact to bootstrap initial
        cluster metadata. This does not have to be the full node list.
        It just needs to have at least one broker that will respond to a
        Metadata API Request. Default port is 9092. If no servers are
        specified, will default to localhost:9092.
    client_id (str): a name for this client. This string is passed in
        each request to servers and can be used to identify specific
        server-side log entries that correspond to this client. Also
        submitted to GroupCoordinator for logging with respect to
        consumer group administration. Default: 'aiokafka-{version}'
    request_timeout_ms (int): Client request timeout in milliseconds.
        Default: 40000.
    connections_max_idle_ms: Close idle connections after the number of
        milliseconds specified by this config. The broker closes idle
        connections after connections.max.idle.ms, so this avoids hitting
        unexpected socket disconnected errors on the client.
        Default: 540000
    retry_backoff_ms (int): Milliseconds to backoff when retrying on
        errors. Default: 100.
    metadata_max_age_ms (int): The period of time in milliseconds after
        which we force a refresh of metadata even if we haven't seen any
        partition leadership changes to proactively discover any new
        brokers or partitions. Default: 300000
    security_protocol (str): Protocol used to communicate with brokers.
        Valid values are: PLAINTEXT, SSL, SASL_PLAINTEXT, SASL_SSL.
        Default: PLAINTEXT.
    ssl_context (ssl.SSLContext): Pre-configured SSLContext for wrapping
        socket connections. If provided, all other ssl_* configurations
        will be ignored. Default: None.
    api_version (str): Specify which kafka API version to use.
        AIOKafka supports Kafka API versions >=0.9 only.
        If set to 'auto', will attempt to infer the broker version by
        probing various APIs. Default: auto
N	localhostz	aiokafka-i@  i`= d   i 	PLAINTEXTautoPLAINkafka)loopbootstrap_servers	client_idrequest_timeout_msconnections_max_idle_msretry_backoff_msmetadata_max_age_mssecurity_protocolssl_contextapi_versionsasl_mechanismsasl_plain_usernamesasl_plain_passwordsasl_kerberos_service_namesasl_kerberos_domain_namesasl_oauth_token_providerr0   r1   r2   r3   r4   r5   r6   r7   r8   r9   r:   r;   r<   r=   r>   c                    SU l         SU l        0 U l        X@l        [	        S0 SU_SU_SU_SU_SU_SU_SU
_S	U	_S
U_SU_SU_SU_SU_SU_SU_SU_6U l        g )NFr/   r0   r1   r5   r2   r4   r8   r7   r6   r3   r9   r:   r;   r<   r=   r>    )_closed_started_version_info_request_timeout_msr
   _client)selfr/   r0   r1   r2   r3   r4   r5   r6   r7   r8   r9   r:   r;   r<   r=   r>   s                    ZC:\Suresh\moveshuttle\MDcreated\moveengine\venv\Lib\site-packages\aiokafka/admin/client.py__init__AIOKafkaAdminClient.__init__X   s    ( #5 % 

/
  
 !4	

  2
 .
 $
 $
 0
 %<
 *
 !4
 !4
 (B
 '@
  '@!
    c                    #    [        U S5      (       a  U R                  (       a  [        R                  S5        gU R                  R                  5       I Sh  vN   SU l        [        R                  S5        g N!7f)z=Close the AIOKafkaAdminClient connection to the Kafka broker.rA   z#AIOKafkaAdminClient already closed.NTz"AIOKafkaAdminClient is now closed.)hasattrrA   loginforE   closedebugrF   s    rG   rO   AIOKafkaAdminClient.close   sW     tY''4<<HH:;ll  """		67 	#s   AA<A:"A<requestnode_idreturnc                    #    Uc  U R                   R                  5       nU R                   R                  X!5      I S h  vN $  N7fN)rE   get_random_nodesend)rF   rS   rT   s      rG   _send_request!AIOKafkaAdminClient._send_request   s9     
 ?ll224G\\&&w8888s   <AAAc                    #    U R                  [        5       5      I S h  vN nUR                   H  u  p#nX44U R                  U'   M     g  N+7frW   )rZ   r   api_versionsrC   )rF   respapi_keymin_versionmax_versions        rG   _get_version_info%AIOKafkaAdminClient._get_version_info   sK     ''(<(>??151B1B-G++6*DDw' 2C @s   AA,Ac                    #    U R                   (       a  g U R                  R                  5       I S h  vN   U R                  5       I S h  vN   [        R                  S5        SU l         g  N9 N#7f)NzAIOKafkaAdminClient startedT)rB   rE   	bootstraprb   rM   rP   rQ   s    rG   startAIOKafkaAdminClient.start   sS     ==ll$$&&&$$&&&		/0 	'&s!   0A0A,A0
A."A0.A0	operationc                 0   US   R                   nU R                  (       a  X R                  ;  a  [        SUS   R                   S35      eU R                  U   u  p4[	        [        U5      S-
  U5      nXS:  a  [        SUS   R                   S35      eU$ )aw  Find the latest version of the protocol operation
supported by both this library and the broker.

This resolves to the lesser of either the latest api
version this library supports, or the max version
supported by the broker.

:param operation: A list of protocol operation versions from
aiokafka.protocol.
:return: The max matching version number between client and broker.
r   z#Kafka broker does not support the 'z' Kafka protocol.r    zNo version of the 'z<' Kafka protocol is supported by both the client and broker.)API_KEYrC   r   __name__minlen)rF   rh   r_   r`   ra   versions         rG   _matching_api_version)AIOKafkaAdminClient._matching_api_version   s     A,&&!!W4F4F%F+5il6K6K5L M" "  $(#5#5g#> c)nq(+6 +%il&;&;%< => >  rJ   c                   #    [         R                  " U R                  R                  S-  5       IS h  vN    U R                  R	                  U5      I S h  vN nU(       a  O4[
        R                  " U R                  R                  5      I S h  vN   M_  S S S 5      IS h  vN   U R                  R                  X5      I S h  vN $  N Nu N= N-! , IS h  vN  (       d  f       NB= f N&7f)Ni  )	async_timeouttimeoutrE   rD   readyasynciosleep_retry_backoffrY   )rF   rT   rS   rt   s       rG   _send_request_to_node)AIOKafkaAdminClient._send_request_to_node   s      (()I)ID)PQQ"ll0099mmDLL$?$?@@@	  RQ \\&&w888 R9 A RQQQ 9st   2C0CC0 CC9CCCC0$C%"C0C.C0CCC0C+CC+'C0c                 
  #    U R                   R                  R                  c"  U R                   R                  5       I S h  vN    U R	                  U R                   R                  R                  R
                  U5      I S h  vN $  NG N! [         ai    U R                   R                  5       I S h  vN    U R	                  U R                   R                  R                  R
                  U5      I S h  vN  s $ f = f7frW   )rE   cluster
controllerforce_metadata_updaterx   nodeIdr   )rF   rS   s     rG   _send_to_controller'AIOKafkaAdminClient._send_to_controller   s      <<**2,,44666	33$$//66  	 7 " 	,,4466633$$//66   	s`   ?DB	D=B BB DB 'D 4B75AD 7C:8D =D?D  Dc                     U R                   U R                  U R                  [        U R                  R                  5       5      [        U R                  R                  5       5      4$ rW   )namenum_partitionsreplication_factorlistreplica_assignmentsitemstopic_configs)	new_topics    rG   _convert_new_topic_request.AIOKafkaAdminClient._convert_new_topic_request   sU     NN$$((..4467((..01
 	
rJ   
new_topics
timeout_msvalidate_onlyc                   #    U R                  [        5      nU Vs/ s H  oPR                  U5      PM     nn[        R	                  SU5        U=(       d    U R
                  nUS:X  a9  U(       a#  [        SU R                  R                   S35      e[        U   " UUS9nO%US::  a  [        U   " UUUS9nO[        SU S	35      eU R                  U5      I S
h  vN $ s  snf  N	7f)ad  Create new topics in the cluster.

:param new_topics: A list of NewTopic objects.
:param timeout_ms: Milliseconds to wait for new topics to be created
    before the broker returns.
:param validate_only: If True, don't actually create new topics.
    Not supported by all versions. Default: False
:return: Appropriate version of CreateTopicResponse class.
z.Attempting to send create topic request for %rr   zRvalidate_only requires CreateTopicsRequest >= v1, which is not supported by Kafka .)create_topic_requestsrs      )r   rs   r   zSupport for CreateTopics vz/ has not yet been added to AIOKafkaAdminClient.N)ro   r   r   rM   rP   rD   r   rE   r8   NotImplementedErrorr   )rF   r   r   r   rn   nttopicsrS   s           rG   create_topics!AIOKafkaAdminClient.create_topics   s     ,,-@A@JK
"11"5
K		BJO;4#;#;
a</77;||7O7O6PPQS  *'2&,"G \)'2&,"+G &,WI 6* *  --g6661 L0 7s   C'C B%C'C%
C'r   c                    #    U R                  [        5      n[        U   nU" X=(       d    U R                  5      nU R                  U5      I Sh  vN $  N7f)zDelete topics from the cluster.

:param topics: A list of topic name strings.
:param timeout_ms: Milliseconds to wait for topics to be deleted
    before the broker returns.
:return: Appropriate version of DeleteTopicsResponse class.
N)ro   r   rD   r   )rF   r   r   rn   req_clsrS   s         rG   delete_topics!AIOKafkaAdminClient.delete_topics  sN      ,,-@A%g.&"H0H0HI--g6666s   AAAAc                    #    [         U R                  [         5         nU" US9nU R                  U5      I Sh  vN $  N7f)zs
Retrieve cluster metadata
:param topics List of topic names, None means "get all topics"
:return MetadataResponse
r   N)r   ro   rZ   )rF   r   r   rS   s       rG   _get_cluster_metadata)AIOKafkaAdminClient._get_cluster_metadata  s=      "$"<"<_"MN(''0000s   7A >A c                    #    U R                  S S9I S h  vN nUR                  5       nUS    Vs/ s H  o3S   PM	     sn$  N,s  snf 7f)Nr   r   topicr   	to_object)rF   metadataobjts       rG   list_topicsAIOKafkaAdminClient.list_topics+  sM     3343@@  "$'M2Mq'
M22 A2s   A	AA	AA	A	c                 f   #    U R                  US9I S h  vN nUR                  5       nUS   $  N7f)Nr   r   r   )rF   r   r   r   s       rG   describe_topics#AIOKafkaAdminClient.describe_topics0  s;      3363BB  "8} Cs   1/1c                    #    U R                  5       I S h  vN nUR                  5       nUR                  S5        U$  N'7f)Nr   )r   r   pop)rF   r   r   s      rG   describe_cluster$AIOKafkaAdminClient.describe_cluster8  s:     3355  "
 6s   A >(A config_resourcesinclude_synonymsc                 
  #    / nU R                  [        5      nUS:X  a*  U(       a#  [        SU R                  R                   S35      eU R                  US5      u  pV[        U   nU H;  nUS:X  a	  U" XX   S9n	O	U" XX   US9n	UR                  U R                  X5      5        M=     U(       a7  US:X  a	  U" U5      n	OU" Xb5      n	UR                  U R                  U	5      5        [        R                  " U6 I Sh  vN $  N7f)a  Fetch configuration parameters for one or more Kafka resources.

:param config_resources: An list of ConfigResource objects.
    Any keys in ConfigResource.configs dict will be used to filter the
    result. Setting the configs dict to None will get all values. An
    empty dict will get zero values (as per Kafka protocol).
:param include_synonyms: If True, return synonyms in response. Not
    supported by all versions. Default: False.
:return: List of appropriate version of DescribeConfigsResponse class.
r   zXinclude_synonyms requires DescribeConfigsRequest >= v1, which is not supported by Kafka r   describe	resources)r   r   N)
ro   r   r   rE   r8   _convert_config_resourcesappendrZ   ru   gather)
rF   r   r   futuresrn   
broker_res	topic_resr   	broker_idreqs
             rG   describe_configs$AIOKafkaAdminClient.describe_configs>  s      ,,-CDa<,+448LL4L4L3MQP  !% > >!

 )1#I!|
(=>(3%5 NN4--c=> $ !|i(i:NN4--c23^^W----s   C:D<D=Dc                 V  #    / nU R                  [        5      nU R                  US5      u  pE[        U   nUR                  U R	                  U" US95      5        U H+  nU" XG   S9nUR                  U R	                  X5      5        M-     [
        R                  " U6 I Sh  vN $  N7f)zAlter configuration parameters of one or more Kafka resources.
:param config_resources: A list of ConfigResource objects.
:return: Appropriate version of AlterConfigsResponse class.
alterr   N)ro   r   r   r   rZ   ru   r   )	rF   r   r   rn   broker_resourcestopic_resourcesr   r   r   s	            rG   alter_configs!AIOKafkaAdminClient.alter_configsk  s      ,,-@A,0,J,J-
) &g.t))'O*LMN)I$4$?@CNN4--c=> * ^^W----s   B B)"B'#B)c                     U R                   U R                  U R                  (       a$  [        U R                  R	                  5       5      4$ S 4$ rW   )resource_typer   configsr   keysconfig_resources    rG   )_convert_describe_config_resource_request=AIOKafkaAdminClient._convert_describe_config_resource_request  sP     ))  4C4K4KD((--/0
 	
 RV
 	
rJ   c                 v    U R                   U R                  [        U R                  R	                  5       5      4$ rW   )r   r   r   r   r   r   s    rG   &_convert_alter_config_resource_request:AIOKafkaAdminClient._convert_alter_config_resource_request  s7     ))  ((..01
 	
rJ   op_typec                 ,   [        [        5      n/ nUS:X  a  U R                  nOU R                  nU H\  nU" U5      nUR                  [
        R                  :X  a"  U[        US   5         R                  U5        MK  UR                  U5        M^     X44$ )Nr   r    )	r   r   r   r   r   r"   BROKERintr   )clsr   r   r   r   convert_funcr   resources           rG   r   -AIOKafkaAdminClient._convert_config_resources  s     't,j HHLEEL/O#O4H,,0B0I0II Xa[!1299(C&&x0  0  00rJ   topic_partitionsc                     U R                  5        VVs/ s H  u  pXR                  UR                  44PM      snn$ s  snnf rW   )r   total_countnew_assignments)r   
topic_namenew_parts      rG   _convert_topic_partitions-AIOKafkaAdminClient._convert_topic_partitions  sI     )9(>(>(@
(@$
 ..0H0HIJ(@
 	
 
s   %=c                 D  #    U R                  [        5      n[        U   nU R                  U5      nU" UU=(       d    U R                  US9nU R	                  U5      I Sh  vN nUR
                   H&  u  pnU
(       d  M  [        U
5      nU" SU	 SU 35      e   U$  N<7f)a  Create additional partitions for an existing topic.

:param topic_partitions: A map of topic name strings to NewPartition
 objects.
:param timeout_ms: Milliseconds to wait for new partitions to be
    created before the broker returns.
:param validate_only: If True, don't actually create new partitions.
    Default: False
:return: Appropriate version of CreatePartitionsResponse class.
)r   rs   r   Nz Could not create partitions for z: )ro   r   r   rD   r   topic_errorsr   )rF   r   r   r   rn   	req_classconverted_partitionsr   r^   r   codemessageerr_clss                rG   create_partitions%AIOKafkaAdminClient.create_partitions  s       ,,-DE+G4	#==>NO1:$":":'

 --c22$($5$5 Et"4. @r'STT %6  3s   AB !B"B B 	group_idsgroup_coordinator_idinclude_authorized_operationsc                   #    U R                  [        5      nUS:  a  U(       a  [        SU 35      e[        U   n/ n[        [        5      nU H5  nUc  U R                  U5      I Sh  vN n	OUn	Xy   R                  U5        M7     UR                  5        HN  u  pU(       a  U" [        U
5      US9nOU" [        U
5      S9nU R                  X5      nUR                  U5        MP     [        R                  " U6 I Sh  vN nU$  N N7f)a  Describe a set of consumer groups.

Any errors are immediately raised.

:param group_ids: A list of consumer group IDs. These are typically the
    group names as strings.
:param group_coordinator_id: The node_id of the groups' coordinator
    broker. If set to None, it will query the cluster for each group to
    find that group's coordinator. Explicitly specifying this can be
    useful for avoiding extra network round trips if you already know
    the group coordinator. This is only useful when all the group_ids
    have the same coordinator, otherwise it will error. Default: None.
:param include_authorized_operations: Whether or not to include
    information about the operations a group is allowed to perform.
    Only supported on API version >= v3. Default: False.
:return: A list of group descriptions. For now the group descriptions
    are the raw results from the DescribeGroupsResponse.
r   zdinclude_authorized_operations requests DescribeGroupsRequest >= v3, which is not supported by Kafka N)groupsr   )r   )ro   r   r   r   setfind_coordinatoraddr   r   rZ   r   ru   r   )rF   r   r   r   rn   r   r   node_to_groupsgroup_idrT   r   r   futureresultss                 rG   describe_consumer_groups,AIOKafkaAdminClient.describe_consumer_groups  s    0 ,,-BCQ;8+&&-Y0 
 *'2	$S)!H#+ $ 5 5h ??.#''1 "  .335OG,<2O
  tF|4''5FNN6"  6  00 @ 1s%   A'D)D*BD D	D	D
broker_ids.c                   #    Uc6  U R                  5       I Sh  vN nUR                   Vs/ s H  o3S   PM	     nn[        5       nU H  nU R                  [        U R                  [        5         " 5       U5      I Sh  vN nUR                  (       a  [        UR                  5      " S5      eUR                  UR                  5        M     [        U5      $  Ns  snf  Na7f)af  List all consumer groups known to the cluster.

This returns a list of Consumer Group tuples. The tuples are
composed of the consumer group name and the consumer group protocol
type.

Only consumer groups that store their offsets in Kafka are returned.
The protocol type will be an empty string for groups created using
Kafka < 0.9 APIs because, although they store their offsets in Kafka,
they don't use Kafka for group coordination. For groups created using
Kafka >= 0.9, the protocol type will typically be "consumer".

As soon as any error is encountered, it is immediately raised.

:param broker_ids: A list of broker node_ids to query for consumer
    groups. If set to None, will query all brokers in the cluster.
    Explicitly specifying broker(s) can be useful for determining which
    consumer groups are coordinated by those broker(s). Default: None
:return list: List of tuples of Consumer Groups.
:exception GroupCoordinatorNotAvailableError: The coordinator is not
    available, so cannot process requests.
:exception GroupLoadInProgressError: The coordinator is loading and
    hence can't process requests.
Nr   zError listing consumer groups)r   brokersr   rZ   r   ro   
error_coder   updater   r   )rF   r   r   brokerconsumer_groupsr   responses          rG   list_consumer_groups(AIOKafkaAdminClient.list_consumer_groups  s     8 !7799H2:2B2BC2B)2BJC%#I!//!$"<"<=N"OPR H ""x2234STT""8??3 $ O$$ :Cs-   C#CC#CAC#?C! AC#C#r   coordinator_typec                 P  #    U R                  [        5      nUS:X  a  U(       a  [        S5      e[        U   nUS:X  a  U" US9nOU" X5      nU R                  U5      I Sh  vN nUR                  (       a   [        UR                  5      nU" SU 35      eUR                  $  NA7f)a  Find the broker id for a given consumer group

:param group_id: str the group id
:param coordinator_type: int the type of coordinator:
0 for group, 1 for transaction. Defaults to group.
Only supported by version 1 and up

:return int: the acting coordinator broker id
r   z9Cannot query for transaction id on current broker version)consumer_groupNz!Unable to get coordinator id for )ro   r   r   rZ   r   r   coordinator_id)rF   r   r  rn   r   rS   r   errs           rG   r   $AIOKafkaAdminClient.find_coordinator(  s      ,,-DEa<,+K  ,G4	a<x8G;G++G448../C9(DEE&&&	 5s   A B&"B$#AB&
partitionsc                   #    U R                  [        5      nUS::  a  Uc  [        SU S35      eU(       a]  [        [        5      nU H  u  pgXV   R                  U5        M     UR                  5        VVs/ s H  u  pcU[        U5      4PM     snnn[        U   " X5      nUc  U R                  U5      I Sh  vN nU R                  X5      I Sh  vN n	0 n
U	R                   HU  u  pcU HJ  u  p{pU(       a#  [        U	R                  5      nU" SU SU 35      e[        Xg5      n[        X5      nUX'   ML     MW     U
$ s  snnf  N Nu7f)av  Fetch Consumer Offsets for a single consumer group.

Note:
This does not verify that the group_id or partitions actually exist
in the cluster.

As soon as any error is encountered, it is immediately raised.

:param group_id: The consumer group id name for which to fetch offsets.
:param group_coordinator_id: The node_id of the group's coordinator
    broker. If set to None, will query the cluster to find the group
    coordinator. Explicitly specifying this can be useful to prevent
    that extra network round trip if you already know the group
    coordinator. Default: None.
:param partitions: A list of TopicPartitions for which to fetch
    offsets. On brokers >= 0.10.2, this can be set to None to fetch all
    known offsets for the consumer group. Default: None.
:return dictionary: A dictionary with TopicPartition keys and
    OffsetAndMetada values. Partitions that are not specified and for
    which the group_id does not have a recorded offset are omitted. An
    offset value of `-1` indicates the group_id has no offset for that
    TopicPartition. A `-1` can only happen for partitions that are
    explicitly specified.
r    NOffsetFetchRequest_vz requires specifying the
                partitions for which to fetch offsets. Omitting the
                partitions is only supported on brokers >= 0.10.2zUnable to get offset info for z and )ro   r   
ValueErrorr   r   r   r   r   r   rZ   r   r   r   r   r   )rF   r   r   r  rn   topics_partitions_dictr   	partitionrS   r   response_dictoffsetr   r   r  tpoffset_plus_metas                    rG   list_consumer_group_offsets/AIOKafkaAdminClient.list_consumer_group_offsetsB  sk    < ,,-?@a<J.(	 2B E 
 %0%5"$. &-11)< %/ *@)E)E)G)G%E Z())GJ %W-hC')-)>)>x)H#H ++GJJ!)E;E7	8"8#6#67C >ugU9+VWW#E5#4V#F $4! <F "1 # $IJs1   A5E7E*E:E;EE	A4E	Erecords_to_deletec           	      P  #    U R                  [        5      nU R                  5       I Sh  vN nU R                  R                  R                  U5        [        S 5      n0 nUR                  5        Hs  u  pxU R                  R                  R                  U5      n	U	c
  [        5       eU	S:X  a
  [        5       eXY   UR                     R                  UR                  U45        Mu     [        U   n
UR                  5        H  u  pU
" U R                  U5      U=(       d    U R                  5      nU R                  R!                  X5      I Sh  vN nUR"                   H5  tpnU H*  tnnnnU(       a  [%        U5      nUeUU['        UU5      '   M,     M7     M     U$  GNv NR7f)zDelete records from partitions.

:param records_to_delete: A map of RecordsToDelete for each TopicPartition
:param timeout_ms: Milliseconds to wait for the deletion to complete.
:return: Appropriate version of DeleteRecordsResponse class.
Nc                       [        [        5      $ rW   )r   r   r@   rJ   rG   <lambda>4AIOKafkaAdminClient.delete_records.<locals>.<lambda>  s	    {4'8rJ   )ro   r   r   rE   r{   update_metadatar   r   leader_for_partitionr   r   r   r   r  _convert_records_to_deleterD   rY   r   r   r   )rF   r  r   rn   r   requests	responsesr  recordsleaderr   delete_requestrS   r   r   r  _partition_indexlow_watermarkr   r  s                        rG   delete_records"AIOKafkaAdminClient.delete_records~  s~     ,,-AB3355,,X689	,224KB\\))>>rBF~0222-//RXX&--r||W.EF 5 'w/&.nn&6"F//?6d66G "\\..v??H)1%AFPBO]J!&z2!	HUInUODE	 GQ *9 '7 = 6, @s#   )F&F!D%F&F$AF&$F&c                     U R                  5        VVVVs/ s H(  u  pX VVs/ s H  u  p4X4R                  4PM     snn4PM*     snnnn$ s  snnf s  snnnnf rW   )r   before_offset)r  r   r  r  recs        rG   r  .AIOKafkaAdminClient._convert_records_to_delete  sV     #4"9"9";
"; 'R'	i!2!23'RS";
 	
R
s   A
A	A
A
)rE   rA   rD   rB   rC   rW   )NF)F)r   )r   )NN)9rk   
__module____qualname____firstlineno____doc__r	   r   strr   r   r   r   rH   rO   r   r   rZ   rb   rf   r   typero   rx   r   staticmethodr   r$   boolr   r   r   r   r   r   dictr   r!   r   r   r   r   classmethodtupler   r#   r   r   r   r   r   r   r   r  r%   r%  r  __static_attributes__r@   rJ   rG   r'   r'   +   s   *^ 3>${2"''- ##)!,,0!%-1-1*13737%)
 !d3i0	)

 )
  )
 "%)
 )
 !)
 )
 j))
 )
 )
 &c])
 &c])
  %(!)
" $,C=#)
$ $,C=%)
V8 "&99 #9 
	9E
xW/F 3 693 9 9X 9 X " 
 
 %)#	(7N(7 SM(7 	(7
 
(7Z %)7S	7 SM7 
	7& '+1c#1 
1349 3 '+c# 
cS#X  "'+.~.+. +. 
h	+.Z. $^ 4.	h.( 
 
 
 
  "1~.1 1 
tCH~tCy(	)	1 1& 
Dm9K4L 
 
 %)#	sM12 SM 	
 
D /3.3	393 'sm3 (,	3
 
h3n +/(%T#Y'(% 
eCHo	(%T's 'c 'RU ': /359	:: 'sm: T.12	:
 
n//	0:~ %)+ ?@+ SM+ 
nc!	"	+Z 
T%_0D*E%F FG
 
rJ   r'   )9ru   loggingcollectionsr   collections.abcr   sslr   typingr   r   r   rr   aiokafkar	   aiokafka.clientr
   aiokafka.errorsr   r   r   r   r   aiokafka.protocol.adminr   r   r   r   r   r   r   r   r   aiokafka.protocol.apir   r   aiokafka.protocol.commitr   r   aiokafka.protocol.metadatar   aiokafka.structsr   r   r   r!   r"   new_partitionsr#   r   r$   r  r%   	getLoggerrk   rM   r'   r@   rJ   rG   <module>rF     sr      # $  ' '    * 
 
 
 4 P 6 > ? )  .!G

 G

rJ   