You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2021/12/01 16:06:52 UTC
[GitHub] [pulsar] merlimat commented on a change in pull request #12841: PIP-45: Converted BookieRackAffinityMapping to use MetadataStore
merlimat commented on a change in pull request #12841:
URL: https://github.com/apache/pulsar/pull/12841#discussion_r760333559
##########
File path: pulsar-broker-common/src/main/java/org/apache/pulsar/bookie/rackawareness/BookieRackAffinityMapping.java
##########
@@ -16,69 +16,67 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.pulsar.zookeeper;
-
-import com.fasterxml.jackson.databind.ObjectMapper;
+package org.apache.pulsar.bookie.rackawareness;
import java.net.InetAddress;
-import java.net.URI;
import java.util.ArrayList;
+import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Optional;
-import java.util.concurrent.TimeUnit;
-
+import java.util.concurrent.CompletableFuture;
import org.apache.bookkeeper.client.ITopologyAwareEnsemblePlacementPolicy;
import org.apache.bookkeeper.client.RackChangeNotifier;
-import org.apache.bookkeeper.conf.ClientConfiguration;
import org.apache.bookkeeper.net.AbstractDNSToSwitchMapping;
import org.apache.bookkeeper.net.BookieId;
import org.apache.bookkeeper.net.BookieNode;
import org.apache.bookkeeper.net.BookieSocketAddress;
import org.apache.bookkeeper.proto.BookieAddressResolver;
-import org.apache.bookkeeper.zookeeper.ZooKeeperClient;
import org.apache.commons.configuration.Configuration;
import org.apache.pulsar.common.policies.data.BookieInfo;
import org.apache.pulsar.common.policies.data.BookiesRackConfiguration;
-import org.apache.pulsar.common.util.ObjectMapperFactory;
-import org.apache.zookeeper.ZooKeeper;
-import org.apache.zookeeper.data.Stat;
+import org.apache.pulsar.metadata.api.MetadataCache;
+import org.apache.pulsar.metadata.api.MetadataStore;
+import org.apache.pulsar.metadata.api.Notification;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import static org.apache.bookkeeper.meta.zk.ZKMetadataDriverBase.getZKServersFromServiceUri;
-
/**
* It provides the mapping of bookies to its rack from zookeeper.
*/
-public class ZkBookieRackAffinityMapping extends AbstractDNSToSwitchMapping
Review comment:
I don't find it in the config files, but yes, it's a good idea to retain the name. I'll add it back as an empty class extending the new one.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org