kafka_neu-1778570057504.zip-extract/kafka-4.2.0-src/tests/kafkatest/services/kafka/util.py

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

      
    
Rootfs path

      
    
Size
2297 (2.2 KB)
MD5
210dd5c5d6ef48f75b82a7e1148bf2bb
SHA1
08d6a7bfbc9d6267fa254ee08542023769a6c80f
SHA256
d193250a5206c79fe2cf87982f1402902ac1134e3fe7760ec13187c9ec27c151
SHA512

      
    
SHA1_git
a2e22ac32b7c3f13b1aa2251d0f2ac0fb51cb7ef
Is binary

      
    
Is text
True
Is archive

      
    
Is media

      
    
Is legal

      
    
Is manifest

      
    
Is readme

      
    
Is top level

      
    
Is key file

      
    
util.py | 2.2 KB |

# Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You 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 collections import namedtuple from kafkatest.utils.remote_account import java_version from kafkatest.version import LATEST_4_0, get_version TopicPartition = namedtuple('TopicPartition', ['topic', 'partition']) def fix_opts_for_new_jvm(node): # Startup scripts for early versions of Kafka contains options # that not supported on latest versions of JVM like -XX:+PrintGCDateStamps or -XX:UseParNewGC. # When system test run on JVM that doesn't support these options # we should setup environment variables with correct options. java_ver = java_version(node) if java_ver <= 9: return "" return "" def get_log4j_config_param(node): return '-Dlog4j2.configurationFile=file:' if get_version(node) >= LATEST_4_0 else '-Dlog4j.configuration=file:' def get_log4j_config(node): return 'log4j2.yaml' if get_version(node) >= LATEST_4_0 else 'log4j.properties' def get_log4j_config_for_connect(node): return 'connect_log4j2.yaml' if get_version(node) >= LATEST_4_0 else 'connect_log4j.properties' def get_log4j_config_for_tools(node): return 'tools_log4j2.yaml' if get_version(node) >= LATEST_4_0 else 'tools_log4j.properties' def get_log4j_config_for_trogdor_coordinator(node): return 'trogdor-coordinator-log4j2.yaml' if get_version(node) >= LATEST_4_0 else 'trogdor-coordinator-log4j.properties' def get_log4j_config_for_trogdor_agent(node): return 'trogdor-agent-log4j2.yaml' if get_version(node) >= LATEST_4_0 else 'trogdor-agent-log4j.properties'
Detected license expression
apache-2.0
Detected license expression (SPDX)
Apache-2.0
Percentage of license text
35.1
Copyrights

      
    
Holders

      
    
Authors

      
    
License detections License expression License expression SPDX
apache_2_0-4bde3f57-78aa-4201-96bf-531cba09e7de apache-2.0 Apache-2.0
URL Start line End line
http://www.apache.org/licenses/LICENSE-2.0 8 8
Package URL License Primary language
pkg:pypi/kafkatest@4.2.0 apache-2.0 Python