Skip to content

Commit

Permalink
Xinfra Monitor MultiClusterTopicManagementService Exception Signature…
Browse files Browse the repository at this point in the history
… Changes (#318)

Xinfra Monitor MultiClusterTopicManagementService: InterruptedException, ExecutionException, TimeoutException
`Signed-off-by: Andrew Choi <[email protected]>`
  • Loading branch information
Andrew Choi authored Oct 14, 2020
1 parent 5c38a99 commit f9194e8
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,9 @@
import com.linkedin.xinfra.monitor.services.configs.MultiClusterTopicManagementServiceConfig;
import com.linkedin.xinfra.monitor.services.configs.TopicManagementServiceConfig;
import com.linkedin.xinfra.monitor.topicfactory.TopicFactory;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import kafka.admin.AdminUtils;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
Expand All @@ -35,6 +33,7 @@
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
import java.util.concurrent.atomic.AtomicBoolean;
import kafka.admin.AdminUtils;
import kafka.admin.BrokerMetadata;
import org.apache.kafka.clients.admin.AdminClient;
import org.apache.kafka.clients.admin.AdminClientConfig;
Expand Down Expand Up @@ -219,7 +218,7 @@ public void run() {
TopicManagementHelper helper = entry.getValue();
try {
helper.maybeElectLeader();
} catch (IOException | KafkaException e) {
} catch (KafkaException e) {
LOGGER.warn(_serviceName + "/MultiClusterTopicManagementService will retry later in cluster " + clusterName,
e);
}
Expand Down Expand Up @@ -435,6 +434,7 @@ void maybeReassignPartitionAndElectLeader() throws ExecutionException, Interrupt

if (expectedReplicationFactor > currentReplicationFactor && Utils.ongoingPartitionReassignments(_adminClient)
.isEmpty()) {

LOGGER.info(
"MultiClusterTopicManagementService will increase the replication factor of the topic {} in cluster"
+ "from {} to {}", _topic, currentReplicationFactor, expectedReplicationFactor);
Expand Down Expand Up @@ -482,7 +482,7 @@ void maybeReassignPartitionAndElectLeader() throws ExecutionException, Interrupt
}
}

void maybeElectLeader() throws Exception {
void maybeElectLeader() throws InterruptedException, ExecutionException, TimeoutException {
if (!_preferredLeaderElectionRequested) {
return;
}
Expand Down

0 comments on commit f9194e8

Please sign in to comment.