This is an automated email from the ASF dual-hosted git repository. ijuma pushed a commit to branch trunk in repository https://gitbox.apache.org/repos/asf/kafka.git
The following commit(s) were added to refs/heads/trunk by this push: new 70e0dbd7954 Delete unused classes (#14797) 70e0dbd7954 is described below commit 70e0dbd7954c68910b8d7de75e3deb680dd53357 Author: Ismael Juma <ism...@juma.me.uk> AuthorDate: Tue Jan 23 22:04:44 2024 -0800 Delete unused classes (#14797) Reviewers: Mickael Maison <mickael.mai...@gmail.com> --- .../common/InconsistentBrokerIdException.scala | 27 ---------------------- .../InconsistentBrokerMetadataException.scala | 27 ---------------------- .../common/InconsistentClusterIdException.scala | 27 ---------------------- .../kafka/common/InconsistentNodeIdException.scala | 22 ------------------ .../kafka/server/ServerGenerateBrokerIdTest.scala | 6 +---- 5 files changed, 1 insertion(+), 108 deletions(-) diff --git a/core/src/main/scala/kafka/common/InconsistentBrokerIdException.scala b/core/src/main/scala/kafka/common/InconsistentBrokerIdException.scala deleted file mode 100644 index 0c0d1cd731a..00000000000 --- a/core/src/main/scala/kafka/common/InconsistentBrokerIdException.scala +++ /dev/null @@ -1,27 +0,0 @@ -/** - * 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. - */ - -package kafka.common - -/** - * Indicates the brokerId stored in logDirs is not consistent across logDirs. - */ -class InconsistentBrokerIdException(message: String, cause: Throwable) extends RuntimeException(message, cause) { - def this(message: String) = this(message, null) - def this(cause: Throwable) = this(null, cause) - def this() = this(null, null) -} diff --git a/core/src/main/scala/kafka/common/InconsistentBrokerMetadataException.scala b/core/src/main/scala/kafka/common/InconsistentBrokerMetadataException.scala deleted file mode 100644 index 2b11512e44c..00000000000 --- a/core/src/main/scala/kafka/common/InconsistentBrokerMetadataException.scala +++ /dev/null @@ -1,27 +0,0 @@ -/** - * 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. - */ - -package kafka.common - -/** - * Indicates the BrokerMetadata stored in logDirs is not consistent across logDirs. - */ -class InconsistentBrokerMetadataException(message: String, cause: Throwable) extends RuntimeException(message, cause) { - def this(message: String) = this(message, null) - def this(cause: Throwable) = this(null, cause) - def this() = this(null, null) -} diff --git a/core/src/main/scala/kafka/common/InconsistentClusterIdException.scala b/core/src/main/scala/kafka/common/InconsistentClusterIdException.scala deleted file mode 100644 index 6868dd8780d..00000000000 --- a/core/src/main/scala/kafka/common/InconsistentClusterIdException.scala +++ /dev/null @@ -1,27 +0,0 @@ -/** - * 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. - */ - -package kafka.common - -/** - * Indicates the clusterId stored in logDirs is not consistent with the clusterIs stored in ZK. - */ -class InconsistentClusterIdException(message: String, cause: Throwable) extends RuntimeException(message, cause) { - def this(message: String) = this(message, null) - def this(cause: Throwable) = this(null, cause) - def this() = this(null, null) -} diff --git a/core/src/main/scala/kafka/common/InconsistentNodeIdException.scala b/core/src/main/scala/kafka/common/InconsistentNodeIdException.scala deleted file mode 100644 index 2fd8f15ac0d..00000000000 --- a/core/src/main/scala/kafka/common/InconsistentNodeIdException.scala +++ /dev/null @@ -1,22 +0,0 @@ -/* - * 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. - */ - -package kafka.common - -class InconsistentNodeIdException(message: String, cause: Throwable) extends RuntimeException(message, cause) { - def this(message: String) = this(message, null) -} diff --git a/core/src/test/scala/unit/kafka/server/ServerGenerateBrokerIdTest.scala b/core/src/test/scala/unit/kafka/server/ServerGenerateBrokerIdTest.scala index e424f77c3e7..b6305bfb2bb 100755 --- a/core/src/test/scala/unit/kafka/server/ServerGenerateBrokerIdTest.scala +++ b/core/src/test/scala/unit/kafka/server/ServerGenerateBrokerIdTest.scala @@ -131,11 +131,7 @@ class ServerGenerateBrokerIdTest extends QuorumTestHarness { servers = Seq(server1) server1.shutdown() server1 = new KafkaServer(config2, threadNamePrefix = Option(this.getClass.getName)) // user specified broker id - try { - server1.startup() - } catch { - case _: kafka.common.InconsistentBrokerIdException => //success - } + server1.startup() server1.shutdown() TestUtils.assertNoNonDaemonThreads(this.getClass.getName) }