kafka_neu-1778570057504.zip-extract/kafka-4.2.0-src/tests/kafkatest/utils/transactions_utils.py

Path
kafka_neu-1778570057504.zip-extract/kafka-4.2.0-src/tests/kafkatest/utils/transactions_utils.py
Status
scanned
Type
file
Name
transactions_utils.py
Extension
.py
Programming language
Python
Mime type
text/x-script.python
File type
Python script, ASCII text executable
Tag

      
    
Rootfs path

      
    
Size
2355 (2.3 KB)
MD5
9e56909a541320d2c90f4f49d32e25fc
SHA1
9d81085d037c4db8a31e24d6f3ae50cd09e4c15e
SHA256
2395251bb100a1b3cbb6fa8668f5cce6d44b7597df36032f6ca1adae0b54b8bf
SHA512

      
    
SHA1_git
f84c49e2b0a5c096bd557f5119d3bc66c3530429
Is binary

      
    
Is text
True
Is archive

      
    
Is media

      
    
Is legal

      
    
Is manifest

      
    
Is readme

      
    
Is top level

      
    
Is key file

      
    
transactions_utils.py | 2.3 KB |

# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. from kafkatest.services.transactional_message_copier import TransactionalMessageCopier from ducktape.utils.util import wait_until def create_and_start_message_copier(test_context, kafka, consumer_group, input_topic, input_partition, output_topic, transaction_size, transaction_timeout, transactional_id, use_group_metadata): message_copier = TransactionalMessageCopier( context=test_context, num_nodes=1, kafka=kafka, transactional_id=transactional_id, consumer_group=consumer_group, input_topic=input_topic, input_partition=input_partition, output_topic=output_topic, max_messages=-1, transaction_size=transaction_size, transaction_timeout=transaction_timeout, use_group_metadata=use_group_metadata ) message_copier.start() wait_until(lambda: message_copier.alive(message_copier.nodes[0]), timeout_sec=10, err_msg="Message copier failed to start after 10 s") return message_copier def create_and_start_copiers(test_context, kafka, consumer_group, input_topic, output_topic, transaction_size, transaction_timeout, num_copiers, use_group_metadata): copiers = [] for i in range(0, num_copiers): copiers.append(create_and_start_message_copier( test_context=test_context, kafka=kafka, consumer_group=consumer_group, input_topic=input_topic, output_topic=output_topic, input_partition=i, transaction_size=transaction_size, transaction_timeout=transaction_timeout, transactional_id="copier-" + str(i), use_group_metadata=use_group_metadata )) return copiers
Detected license expression
apache-2.0
Detected license expression (SPDX)
Apache-2.0
Percentage of license text
30.04
Copyrights

      
    
Holders

      
    
Authors

      
    
License detections License expression License expression SPDX
apache_2_0-c4e30bcd-ccfd-bbc3-d2f1-196ab911e47d apache-2.0 Apache-2.0
URL Start line End line
http://www.apache.org/licenses/LICENSE-2.0 5 5
Package URL License Primary language
pkg:pypi/kafkatest@4.2.0 apache-2.0 Python