protected void triggerPreferredLeaderElection(ZkUtils zkUtils,List<PartitionInfo> partitionInfoList){
  scala.collection.mutable.HashSet<TopicAndPartition> scalaPartitionInfoSet=new scala.collection.mutable.HashSet<>();
  for (  PartitionInfo javaPartitionInfo : partitionInfoList) {
    scalaPartitionInfoSet.add(new TopicAndPartition(_topic,javaPartitionInfo.partition()));
  }
  PreferredReplicaLeaderElectionCommand.writePreferredReplicaElectionData(zkUtils,scalaPartitionInfoSet);
}

protected void triggerPreferredLeaderElection ( ZkUtils zkUtils , List < PartitionInfo > partitionInfoList ) { scala . collection . mutable . HashSet < TopicAndPartition > scalaPartitionInfoSet = new scala . collection . mutable . HashSet < > ( ) ; for ( PartitionInfo javaPartitionInfo : partitionInfoList ) { scalaPartitionInfoSet . add ( new TopicAndPartition ( _topic , javaPartitionInfo . partition ( ) ) ) ; } PreferredReplicaLeaderElectionCommand . writePreferredReplicaElectionData ( zkUtils , scalaPartitionInfoSet ) ; }
this runs the preferred replica election for all partitions .
