[ 
https://issues.apache.org/jira/browse/KAFKA-19938?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Mickael Maison updated KAFKA-19938:
-----------------------------------
    Description: 
If I create a cluster via KafkaClusterTestKit with combined nodes and multiple 
log directories, the log directories that does not host the metadata log are 
not formatted.

For example:

{code:java}
KafkaClusterTestKit cluster = new KafkaClusterTestKit.Builder(
            new TestKitNodes.Builder().
                setNumBrokerNodes(numBrokers).
                setNumDisksPerBroker(numDisks).
                setCombined(combined).
                setNumControllerNodes(numControllers).build()).build())
cluster.format();
{code}
I get the following:

{noformat}
.
├── combined_0_0
│   ├── __cluster_metadata-0
│   │   ├── 00000000000000000000.index
│   │   ├── 00000000000000000000.log
│   │   ├── 00000000000000000000.timeindex
│   │   ├── leader-epoch-checkpoint
│   │   ├── partition.metadata
│   │   └── quorum-state
│   ├── bootstrap.checkpoint
│   └── meta.properties
└── combined_0_1
{noformat}
we can see the combined_0_1 directory has not been formatted, we don't have a 
meta.properties file.

If I run

{code:bash}
bin/kafka-storage.sh format --standalone -t $KAFKA_CLUSTER_ID -c 
config/controller.properties
{code}
With log.dirs=/tmp/kraft-controller-logs,/tmp/kraft-controller-logs in 
controller.properties, the 2 log directories are correctly formatted.

{noformat}
./kraft-combined-logs
├── __cluster_metadata-0
│   └── 00000000000000000000-0000000000.checkpoint
├── bootstrap.checkpoint
└── meta.properties
./kraft-combined-logs2
├── bootstrap.checkpoint
└── meta.properties
{noformat}



  was:
If I create a cluster via KafkaClusterTestKit with combined nodes and multiple 
log directories, the log directories that does not host the metadata log are 
not formatted.

For example:

{code:java}
KafkaClusterTestKit cluster = new KafkaClusterTestKit.Builder(
            new TestKitNodes.Builder().
                setNumBrokerNodes(numBrokers).
                setNumDisksPerBroker(numDisks).
                setCombined(combined).
                setNumControllerNodes(numControllers).build()).build())
cluster.format();
{code}
I get the following:

{noformat}
.
├── combined_0_0
│   ├── __cluster_metadata-0
│   │   ├── 00000000000000000000.index
│   │   ├── 00000000000000000000.log
│   │   ├── 00000000000000000000.timeindex
│   │   ├── leader-epoch-checkpoint
│   │   ├── partition.metadata
│   │   └── quorum-state
│   ├── bootstrap.checkpoint
│   └── meta.properties
└── combined_0_1
{noformat}
we can see the combined_0_1 directory has not been formatted. 

If I run

{code:bash}
bin/kafka-storage.sh format --standalone -t $KAFKA_CLUSTER_ID -c 
config/controller.properties
{code}
With log.dirs=/tmp/kraft-controller-logs,/tmp/kraft-controller-logs in 
controller.properties, the 2 log directories are correctly formatted.

{noformat}
./kraft-combined-logs
├── __cluster_metadata-0
│   └── 00000000000000000000-0000000000.checkpoint
├── bootstrap.checkpoint
└── meta.properties
./kraft-combined-logs2
├── bootstrap.checkpoint
└── meta.properties
{noformat}




> KafkaClusterTestKit not formatting all log directories on combined noes
> -----------------------------------------------------------------------
>
>                 Key: KAFKA-19938
>                 URL: https://issues.apache.org/jira/browse/KAFKA-19938
>             Project: Kafka
>          Issue Type: Bug
>            Reporter: Mickael Maison
>            Assignee: Mickael Maison
>            Priority: Major
>
> If I create a cluster via KafkaClusterTestKit with combined nodes and 
> multiple log directories, the log directories that does not host the metadata 
> log are not formatted.
> For example:
> {code:java}
> KafkaClusterTestKit cluster = new KafkaClusterTestKit.Builder(
>             new TestKitNodes.Builder().
>                 setNumBrokerNodes(numBrokers).
>                 setNumDisksPerBroker(numDisks).
>                 setCombined(combined).
>                 setNumControllerNodes(numControllers).build()).build())
> cluster.format();
> {code}
> I get the following:
> {noformat}
> .
> ├── combined_0_0
> │   ├── __cluster_metadata-0
> │   │   ├── 00000000000000000000.index
> │   │   ├── 00000000000000000000.log
> │   │   ├── 00000000000000000000.timeindex
> │   │   ├── leader-epoch-checkpoint
> │   │   ├── partition.metadata
> │   │   └── quorum-state
> │   ├── bootstrap.checkpoint
> │   └── meta.properties
> └── combined_0_1
> {noformat}
> we can see the combined_0_1 directory has not been formatted, we don't have a 
> meta.properties file.
> If I run
> {code:bash}
> bin/kafka-storage.sh format --standalone -t $KAFKA_CLUSTER_ID -c 
> config/controller.properties
> {code}
> With log.dirs=/tmp/kraft-controller-logs,/tmp/kraft-controller-logs in 
> controller.properties, the 2 log directories are correctly formatted.
> {noformat}
> ./kraft-combined-logs
> ├── __cluster_metadata-0
> │   └── 00000000000000000000-0000000000.checkpoint
> ├── bootstrap.checkpoint
> └── meta.properties
> ./kraft-combined-logs2
> ├── bootstrap.checkpoint
> └── meta.properties
> {noformat}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to