diff --git a/managed-ledger/src/test/java/org/apache/bookkeeper/mledger/impl/ManagedLedgerTest.java b/managed-ledger/src/test/java/org/apache/bookkeeper/mledger/impl/ManagedLedgerTest.java index 0add15154bf9e..72d19ce11dac6 100644 --- a/managed-ledger/src/test/java/org/apache/bookkeeper/mledger/impl/ManagedLedgerTest.java +++ b/managed-ledger/src/test/java/org/apache/bookkeeper/mledger/impl/ManagedLedgerTest.java @@ -95,7 +95,7 @@ import org.apache.bookkeeper.test.MockedBookKeeperTestCase; import org.apache.commons.lang3.tuple.Pair; import org.apache.pulsar.common.allocator.PulsarByteBufAllocator; -import org.apache.pulsar.common.api.ByteBufPair; +import org.apache.pulsar.common.protocol.ByteBufPair; import org.apache.pulsar.common.api.proto.PulsarApi.CommandSubscribe.InitialPosition; import org.apache.pulsar.common.api.proto.PulsarApi.MessageMetadata; import org.apache.pulsar.common.util.protobuf.ByteBufCodedOutputStream; diff --git a/pulsar-broker-common/src/main/java/org/apache/pulsar/broker/ServiceConfiguration.java b/pulsar-broker-common/src/main/java/org/apache/pulsar/broker/ServiceConfiguration.java index c92b3879b9df8..1d626fbbd4099 100644 --- a/pulsar-broker-common/src/main/java/org/apache/pulsar/broker/ServiceConfiguration.java +++ b/pulsar-broker-common/src/main/java/org/apache/pulsar/broker/ServiceConfiguration.java @@ -33,7 +33,7 @@ import lombok.Setter; import org.apache.bookkeeper.client.api.DigestType; import org.apache.pulsar.broker.authorization.PulsarAuthorizationProvider; -import org.apache.pulsar.common.api.Commands; +import org.apache.pulsar.common.protocol.Commands; import org.apache.pulsar.common.configuration.Category; import org.apache.pulsar.common.configuration.FieldContext; import org.apache.pulsar.common.configuration.PulsarConfiguration; diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/PulsarBrokerStarter.java b/pulsar-broker/src/main/java/org/apache/pulsar/PulsarBrokerStarter.java index a274795d7212c..4502ea29212f7 100644 --- a/pulsar-broker/src/main/java/org/apache/pulsar/PulsarBrokerStarter.java +++ b/pulsar-broker/src/main/java/org/apache/pulsar/PulsarBrokerStarter.java @@ -50,7 +50,7 @@ import org.apache.pulsar.broker.ServiceConfiguration; import org.apache.pulsar.broker.ServiceConfigurationUtils; import org.apache.pulsar.common.allocator.PulsarByteBufAllocator; -import org.apache.pulsar.common.api.Commands; +import org.apache.pulsar.common.protocol.Commands; import org.apache.pulsar.functions.worker.WorkerConfig; import org.apache.pulsar.functions.worker.WorkerService; import org.slf4j.Logger; diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/broker/BookKeeperClientFactoryImpl.java b/pulsar-broker/src/main/java/org/apache/pulsar/broker/BookKeeperClientFactoryImpl.java index 2105af5fe3bb5..3704800505b88 100644 --- a/pulsar-broker/src/main/java/org/apache/pulsar/broker/BookKeeperClientFactoryImpl.java +++ b/pulsar-broker/src/main/java/org/apache/pulsar/broker/BookKeeperClientFactoryImpl.java @@ -30,7 +30,7 @@ import org.apache.bookkeeper.client.RackawareEnsemblePlacementPolicy; import org.apache.bookkeeper.client.RegionAwareEnsemblePlacementPolicy; import org.apache.bookkeeper.conf.ClientConfiguration; -import org.apache.pulsar.common.api.Commands; +import org.apache.pulsar.common.protocol.Commands; import org.apache.pulsar.zookeeper.ZkBookieRackAffinityMapping; import org.apache.pulsar.zookeeper.ZkIsolatedBookieEnsemblePlacementPolicy; import org.apache.pulsar.zookeeper.ZooKeeperCache; diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java b/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java index bfea5e57213ac..29dc789ca5bb0 100644 --- a/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java +++ b/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java @@ -87,7 +87,7 @@ import org.apache.pulsar.client.api.PulsarClientException; import org.apache.pulsar.client.impl.MessageIdImpl; import org.apache.pulsar.common.allocator.PulsarByteBufAllocator; -import org.apache.pulsar.common.api.Commands; +import org.apache.pulsar.common.protocol.Commands; import org.apache.pulsar.common.api.proto.PulsarApi.CommandSubscribe.InitialPosition; import org.apache.pulsar.common.api.proto.PulsarApi.KeyValue; import org.apache.pulsar.common.api.proto.PulsarApi.MessageMetadata; diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/v2/SchemasResource.java b/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/v2/SchemasResource.java index ccb3c12bd8f3e..eb7cc646d6eb4 100644 --- a/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/v2/SchemasResource.java +++ b/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/v2/SchemasResource.java @@ -53,13 +53,13 @@ import org.apache.pulsar.broker.service.schema.SchemaCompatibilityStrategy; import org.apache.pulsar.broker.web.RestException; import org.apache.pulsar.common.naming.TopicName; -import org.apache.pulsar.common.schema.DeleteSchemaResponse; -import org.apache.pulsar.common.schema.GetSchemaResponse; -import org.apache.pulsar.common.schema.PostSchemaPayload; -import org.apache.pulsar.common.schema.PostSchemaResponse; -import org.apache.pulsar.common.schema.SchemaData; +import org.apache.pulsar.common.protocol.schema.DeleteSchemaResponse; +import org.apache.pulsar.common.protocol.schema.GetSchemaResponse; +import org.apache.pulsar.common.protocol.schema.PostSchemaPayload; +import org.apache.pulsar.common.protocol.schema.PostSchemaResponse; +import org.apache.pulsar.common.protocol.schema.SchemaData; import org.apache.pulsar.common.schema.SchemaType; -import org.apache.pulsar.common.schema.SchemaVersion; +import org.apache.pulsar.common.protocol.schema.SchemaVersion; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/broker/lookup/TopicLookupBase.java b/pulsar-broker/src/main/java/org/apache/pulsar/broker/lookup/TopicLookupBase.java index 118d46bd53d89..bac10d48e6391 100644 --- a/pulsar-broker/src/main/java/org/apache/pulsar/broker/lookup/TopicLookupBase.java +++ b/pulsar-broker/src/main/java/org/apache/pulsar/broker/lookup/TopicLookupBase.java @@ -19,8 +19,8 @@ package org.apache.pulsar.broker.lookup; import static com.google.common.base.Preconditions.checkNotNull; -import static org.apache.pulsar.common.api.Commands.newLookupErrorResponse; -import static org.apache.pulsar.common.api.Commands.newLookupResponse; +import static org.apache.pulsar.common.protocol.Commands.newLookupErrorResponse; +import static org.apache.pulsar.common.protocol.Commands.newLookupResponse; import io.netty.buffer.ByteBuf; diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/AbstractBaseDispatcher.java b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/AbstractBaseDispatcher.java index 92ce2b0d7af09..896d270193868 100644 --- a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/AbstractBaseDispatcher.java +++ b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/AbstractBaseDispatcher.java @@ -26,8 +26,8 @@ import org.apache.bookkeeper.mledger.Entry; import org.apache.bookkeeper.mledger.impl.PositionImpl; -import org.apache.pulsar.common.api.Commands; -import org.apache.pulsar.common.api.Markers; +import org.apache.pulsar.common.protocol.Commands; +import org.apache.pulsar.common.protocol.Markers; import org.apache.pulsar.common.api.proto.PulsarApi.CommandAck.AckType; import org.apache.pulsar.common.api.proto.PulsarApi.MessageMetadata; diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/AbstractDispatcherMultipleConsumers.java b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/AbstractDispatcherMultipleConsumers.java index c36c8ab41f682..464b85404fd33 100644 --- a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/AbstractDispatcherMultipleConsumers.java +++ b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/AbstractDispatcherMultipleConsumers.java @@ -23,7 +23,7 @@ import io.netty.buffer.ByteBuf; import org.apache.commons.lang3.StringUtils; import org.apache.pulsar.broker.service.persistent.PersistentStickyKeyDispatcherMultipleConsumers; -import org.apache.pulsar.common.api.Commands; +import org.apache.pulsar.common.protocol.Commands; import org.apache.pulsar.common.api.proto.PulsarApi; import org.apache.pulsar.common.api.proto.PulsarApi.CommandSubscribe.SubType; import org.apache.pulsar.utils.CopyOnWriteArrayList; diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/AbstractTopic.java b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/AbstractTopic.java index 31b27f763d36d..2c65f57edbd4d 100644 --- a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/AbstractTopic.java +++ b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/AbstractTopic.java @@ -25,8 +25,8 @@ import org.apache.pulsar.broker.service.schema.SchemaRegistryService; import org.apache.pulsar.common.naming.TopicName; import org.apache.pulsar.common.policies.data.Policies; -import org.apache.pulsar.common.schema.SchemaData; -import org.apache.pulsar.common.schema.SchemaVersion; +import org.apache.pulsar.common.protocol.schema.SchemaData; +import org.apache.pulsar.common.protocol.schema.SchemaVersion; import org.apache.pulsar.common.util.collections.ConcurrentOpenHashSet; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/Consumer.java b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/Consumer.java index 840a0caf394ac..927689212efc9 100644 --- a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/Consumer.java +++ b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/Consumer.java @@ -45,9 +45,7 @@ import org.apache.bookkeeper.util.collections.ConcurrentLongLongPairHashMap; import org.apache.bookkeeper.util.collections.ConcurrentLongLongPairHashMap.LongPair; import org.apache.pulsar.broker.authentication.AuthenticationDataSource; -import org.apache.pulsar.common.api.Commands; -import org.apache.pulsar.common.api.Markers; -import org.apache.pulsar.common.api.proto.PulsarApi; +import org.apache.pulsar.common.protocol.Commands; import org.apache.pulsar.common.api.proto.PulsarApi.CommandAck; import org.apache.pulsar.common.api.proto.PulsarApi.CommandAck.AckType; import org.apache.pulsar.common.api.proto.PulsarApi.CommandSubscribe.InitialPosition; diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/Producer.java b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/Producer.java index c3fe4204ce6d7..25f91ee76a022 100644 --- a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/Producer.java +++ b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/Producer.java @@ -20,8 +20,8 @@ import static com.google.common.base.Preconditions.checkNotNull; import static com.scurrilous.circe.checksum.Crc32cIntChecksum.computeChecksum; -import static org.apache.pulsar.common.api.Commands.hasChecksum; -import static org.apache.pulsar.common.api.Commands.readChecksum; +import static org.apache.pulsar.common.protocol.Commands.hasChecksum; +import static org.apache.pulsar.common.protocol.Commands.readChecksum; import com.google.common.annotations.VisibleForTesting; import com.google.common.base.MoreObjects; @@ -42,13 +42,13 @@ import org.apache.pulsar.broker.service.Topic.PublishContext; import org.apache.pulsar.broker.service.nonpersistent.NonPersistentTopic; import org.apache.pulsar.broker.service.persistent.PersistentTopic; -import org.apache.pulsar.common.api.Commands; +import org.apache.pulsar.common.protocol.Commands; import org.apache.pulsar.common.api.proto.PulsarApi.MessageMetadata; import org.apache.pulsar.common.api.proto.PulsarApi.ServerError; import org.apache.pulsar.common.naming.TopicName; import org.apache.pulsar.common.policies.data.NonPersistentPublisherStats; import org.apache.pulsar.common.policies.data.PublisherStats; -import org.apache.pulsar.common.schema.SchemaVersion; +import org.apache.pulsar.common.protocol.schema.SchemaVersion; import org.apache.pulsar.common.util.DateFormatter; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/PulsarChannelInitializer.java b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/PulsarChannelInitializer.java index f3e8214ffe1c9..6dbbfdb4857bc 100644 --- a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/PulsarChannelInitializer.java +++ b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/PulsarChannelInitializer.java @@ -20,9 +20,8 @@ import org.apache.pulsar.broker.PulsarService; import org.apache.pulsar.broker.ServiceConfiguration; -import org.apache.pulsar.common.api.ByteBufPair; -import org.apache.pulsar.common.api.Commands; -import org.apache.pulsar.common.conf.InternalConfigurationData; +import org.apache.pulsar.common.protocol.ByteBufPair; +import org.apache.pulsar.common.protocol.Commands; import org.apache.pulsar.common.util.NettySslContextBuilder; import io.netty.channel.ChannelInitializer; diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/ServerCnx.java b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/ServerCnx.java index 84729706eb088..027d6743905a5 100644 --- a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/ServerCnx.java +++ b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/ServerCnx.java @@ -22,7 +22,7 @@ import static org.apache.commons.lang3.StringUtils.isNotBlank; import static org.apache.pulsar.broker.admin.impl.PersistentTopicsBase.getPartitionedTopicMetadata; import static org.apache.pulsar.broker.lookup.TopicLookupBase.lookupTopicAsync; -import static org.apache.pulsar.common.api.Commands.newLookupErrorResponse; +import static org.apache.pulsar.common.protocol.Commands.newLookupErrorResponse; import static org.apache.pulsar.common.api.proto.PulsarApi.ProtocolVersion.v5; import com.google.common.base.Strings; @@ -61,15 +61,14 @@ import org.apache.pulsar.broker.service.schema.IncompatibleSchemaException; import org.apache.pulsar.broker.service.schema.SchemaRegistryService; import org.apache.pulsar.broker.web.RestException; -import org.apache.pulsar.client.admin.PulsarAdminException; import org.apache.pulsar.client.api.PulsarClientException; import org.apache.pulsar.client.impl.BatchMessageIdImpl; import org.apache.pulsar.client.impl.ClientCnx; import org.apache.pulsar.client.impl.MessageIdImpl; import org.apache.pulsar.common.api.AuthData; -import org.apache.pulsar.common.api.CommandUtils; -import org.apache.pulsar.common.api.Commands; -import org.apache.pulsar.common.api.PulsarHandler; +import org.apache.pulsar.common.protocol.CommandUtils; +import org.apache.pulsar.common.protocol.Commands; +import org.apache.pulsar.common.protocol.PulsarHandler; import org.apache.pulsar.common.api.proto.PulsarApi; import org.apache.pulsar.common.api.proto.PulsarApi.CommandAck; import org.apache.pulsar.common.api.proto.PulsarApi.CommandAuthResponse; @@ -101,9 +100,9 @@ import org.apache.pulsar.common.naming.TopicName; import org.apache.pulsar.common.policies.data.BacklogQuota; import org.apache.pulsar.common.policies.data.ConsumerStats; -import org.apache.pulsar.common.schema.SchemaData; -import org.apache.pulsar.common.schema.SchemaInfoUtil; -import org.apache.pulsar.common.schema.SchemaVersion; +import org.apache.pulsar.common.protocol.schema.SchemaData; +import org.apache.pulsar.common.protocol.schema.SchemaInfoUtil; +import org.apache.pulsar.common.protocol.schema.SchemaVersion; import org.apache.pulsar.common.util.FutureUtil; import org.apache.pulsar.common.util.collections.ConcurrentLongHashMap; import org.apache.pulsar.shaded.com.google.protobuf.v241.GeneratedMessageLite; diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/Topic.java b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/Topic.java index de6292c3de472..028292b5d1e71 100644 --- a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/Topic.java +++ b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/Topic.java @@ -33,8 +33,8 @@ import org.apache.pulsar.common.policies.data.PersistentTopicInternalStats; import org.apache.pulsar.common.policies.data.Policies; import org.apache.pulsar.common.policies.data.TopicStats; -import org.apache.pulsar.common.schema.SchemaData; -import org.apache.pulsar.common.schema.SchemaVersion; +import org.apache.pulsar.common.protocol.schema.SchemaData; +import org.apache.pulsar.common.protocol.schema.SchemaVersion; import org.apache.pulsar.common.util.collections.ConcurrentOpenHashMap; import org.apache.pulsar.common.util.collections.ConcurrentOpenHashSet; import org.apache.pulsar.policies.data.loadbalancer.NamespaceBundleStats; diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/nonpersistent/NonPersistentDispatcherMultipleConsumers.java b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/nonpersistent/NonPersistentDispatcherMultipleConsumers.java index 78513c5801cd4..b2f6d386b68dc 100644 --- a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/nonpersistent/NonPersistentDispatcherMultipleConsumers.java +++ b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/nonpersistent/NonPersistentDispatcherMultipleConsumers.java @@ -34,7 +34,7 @@ import org.apache.pulsar.broker.service.RedeliveryTrackerDisabled; import org.apache.pulsar.broker.service.SendMessageInfo; import org.apache.pulsar.broker.service.Subscription; -import org.apache.pulsar.common.api.Commands; +import org.apache.pulsar.common.protocol.Commands; import org.apache.pulsar.common.api.proto.PulsarApi.CommandSubscribe.SubType; import org.apache.pulsar.utils.CopyOnWriteArrayList; import org.slf4j.Logger; diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/nonpersistent/NonPersistentDispatcherSingleActiveConsumer.java b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/nonpersistent/NonPersistentDispatcherSingleActiveConsumer.java index 71792d82ce521..9295ab91c8e43 100644 --- a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/nonpersistent/NonPersistentDispatcherSingleActiveConsumer.java +++ b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/nonpersistent/NonPersistentDispatcherSingleActiveConsumer.java @@ -33,7 +33,7 @@ import org.apache.pulsar.broker.service.RedeliveryTrackerDisabled; import org.apache.pulsar.broker.service.SendMessageInfo; import org.apache.pulsar.broker.service.Subscription; -import org.apache.pulsar.common.api.Commands; +import org.apache.pulsar.common.protocol.Commands; import org.apache.pulsar.common.api.proto.PulsarApi.CommandSubscribe.SubType; import org.apache.pulsar.common.naming.TopicName; import org.apache.pulsar.common.policies.data.Policies; diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/nonpersistent/NonPersistentStickyKeyDispatcherMultipleConsumers.java b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/nonpersistent/NonPersistentStickyKeyDispatcherMultipleConsumers.java index 3f0d90376655f..37ba31d052ae1 100644 --- a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/nonpersistent/NonPersistentStickyKeyDispatcherMultipleConsumers.java +++ b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/nonpersistent/NonPersistentStickyKeyDispatcherMultipleConsumers.java @@ -26,7 +26,7 @@ import org.apache.pulsar.broker.service.SendMessageInfo; import org.apache.pulsar.broker.service.StickyKeyConsumerSelector; import org.apache.pulsar.broker.service.Subscription; -import org.apache.pulsar.common.api.Commands; +import org.apache.pulsar.common.protocol.Commands; import org.apache.pulsar.common.api.proto.PulsarApi.CommandSubscribe.SubType; import org.apache.pulsar.common.util.Murmur3_32Hash; diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/nonpersistent/NonPersistentTopic.java b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/nonpersistent/NonPersistentTopic.java index c8779d9531151..d7a3eeddf6cd3 100644 --- a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/nonpersistent/NonPersistentTopic.java +++ b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/nonpersistent/NonPersistentTopic.java @@ -77,7 +77,7 @@ import org.apache.pulsar.common.policies.data.PersistentTopicInternalStats.CursorStats; import org.apache.pulsar.common.policies.data.Policies; import org.apache.pulsar.common.policies.data.PublisherStats; -import org.apache.pulsar.common.schema.SchemaData; +import org.apache.pulsar.common.protocol.schema.SchemaData; import org.apache.pulsar.common.util.FutureUtil; import org.apache.pulsar.common.util.collections.ConcurrentOpenHashMap; import org.apache.pulsar.policies.data.loadbalancer.NamespaceBundleStats; diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/MessageDeduplication.java b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/MessageDeduplication.java index daf9646c9d3aa..6279f2530377d 100644 --- a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/MessageDeduplication.java +++ b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/MessageDeduplication.java @@ -40,7 +40,7 @@ import org.apache.pulsar.broker.PulsarService; import org.apache.pulsar.broker.admin.AdminResource; import org.apache.pulsar.broker.service.Topic.PublishContext; -import org.apache.pulsar.common.api.Commands; +import org.apache.pulsar.common.protocol.Commands; import org.apache.pulsar.common.api.proto.PulsarApi.MessageMetadata; import org.apache.pulsar.common.naming.TopicName; import org.apache.pulsar.common.util.collections.ConcurrentOpenHashMap; diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentReplicator.java b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentReplicator.java index dc5752e195733..d33eeff175c69 100644 --- a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentReplicator.java +++ b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentReplicator.java @@ -53,9 +53,7 @@ import org.apache.pulsar.client.impl.ProducerImpl; import org.apache.pulsar.client.impl.SendCallback; import org.apache.pulsar.common.policies.data.Policies; -import org.apache.pulsar.common.api.Markers; import org.apache.pulsar.common.api.proto.PulsarMarkers.MarkerType; -import org.apache.pulsar.common.api.proto.PulsarMarkers.ReplicatedSubscriptionsSnapshotRequest; import org.apache.pulsar.common.policies.data.ReplicatorStats; import org.apache.pulsar.common.util.Codec; import org.slf4j.Logger; diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentTopic.java b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentTopic.java index 389846b277b14..1110b2992c1be 100644 --- a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentTopic.java +++ b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentTopic.java @@ -103,7 +103,7 @@ import org.apache.pulsar.common.policies.data.PublisherStats; import org.apache.pulsar.common.policies.data.ReplicatorStats; import org.apache.pulsar.common.policies.data.SubscriptionStats; -import org.apache.pulsar.common.schema.SchemaData; +import org.apache.pulsar.common.protocol.schema.SchemaData; import org.apache.pulsar.common.util.Codec; import org.apache.pulsar.common.util.DateFormatter; import org.apache.pulsar.common.util.FutureUtil; diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/ReplicatedSubscriptionsController.java b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/ReplicatedSubscriptionsController.java index 3f14246b06642..232cf59727d00 100644 --- a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/ReplicatedSubscriptionsController.java +++ b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/ReplicatedSubscriptionsController.java @@ -36,7 +36,7 @@ import org.apache.bookkeeper.mledger.Position; import org.apache.bookkeeper.mledger.impl.PositionImpl; import org.apache.pulsar.broker.service.Topic; -import org.apache.pulsar.common.api.Markers; +import org.apache.pulsar.common.protocol.Markers; import org.apache.pulsar.common.api.proto.PulsarMarkers.MarkerType; import org.apache.pulsar.common.api.proto.PulsarMarkers.ReplicatedSubscriptionsSnapshotRequest; import org.apache.pulsar.common.api.proto.PulsarMarkers.ReplicatedSubscriptionsSnapshotResponse; diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/ReplicatedSubscriptionsSnapshotBuilder.java b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/ReplicatedSubscriptionsSnapshotBuilder.java index 753c7775a46d0..c66e6ea194b43 100644 --- a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/ReplicatedSubscriptionsSnapshotBuilder.java +++ b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/ReplicatedSubscriptionsSnapshotBuilder.java @@ -34,7 +34,7 @@ import org.apache.bookkeeper.mledger.Position; import org.apache.bookkeeper.mledger.impl.PositionImpl; import org.apache.pulsar.broker.ServiceConfiguration; -import org.apache.pulsar.common.api.Markers; +import org.apache.pulsar.common.protocol.Markers; import org.apache.pulsar.common.api.proto.PulsarMarkers.MessageIdData; import org.apache.pulsar.common.api.proto.PulsarMarkers.ReplicatedSubscriptionsSnapshotResponse; diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/schema/AvroSchemaBasedCompatibilityCheck.java b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/schema/AvroSchemaBasedCompatibilityCheck.java index 99594e0db5957..8a94cf10995cb 100644 --- a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/schema/AvroSchemaBasedCompatibilityCheck.java +++ b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/schema/AvroSchemaBasedCompatibilityCheck.java @@ -28,7 +28,7 @@ import org.apache.avro.SchemaValidationException; import org.apache.avro.SchemaValidator; import org.apache.avro.SchemaValidatorBuilder; -import org.apache.pulsar.common.schema.SchemaData; +import org.apache.pulsar.common.protocol.schema.SchemaData; import lombok.extern.slf4j.Slf4j; /** diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/schema/BookkeeperSchemaStorage.java b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/schema/BookkeeperSchemaStorage.java index 56fca20bf16f1..c5d67bd5381c1 100644 --- a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/schema/BookkeeperSchemaStorage.java +++ b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/schema/BookkeeperSchemaStorage.java @@ -39,7 +39,6 @@ import java.util.concurrent.CompletableFuture; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentMap; -import java.util.stream.Collectors; import javax.validation.constraints.NotNull; @@ -51,7 +50,7 @@ import org.apache.bookkeeper.util.ZkUtils; import org.apache.pulsar.broker.PulsarService; import org.apache.pulsar.broker.ServiceConfiguration; -import org.apache.pulsar.common.schema.SchemaVersion; +import org.apache.pulsar.common.protocol.schema.SchemaVersion; import org.apache.pulsar.zookeeper.ZooKeeperCache; import org.apache.zookeeper.CreateMode; import org.apache.zookeeper.KeeperException; diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/schema/DefaultSchemaRegistryService.java b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/schema/DefaultSchemaRegistryService.java index 38e09979fcd0e..fe63b3422bfff 100644 --- a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/schema/DefaultSchemaRegistryService.java +++ b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/schema/DefaultSchemaRegistryService.java @@ -23,8 +23,8 @@ import java.util.Collections; import java.util.List; import java.util.concurrent.CompletableFuture; -import org.apache.pulsar.common.schema.SchemaData; -import org.apache.pulsar.common.schema.SchemaVersion; +import org.apache.pulsar.common.protocol.schema.SchemaData; +import org.apache.pulsar.common.protocol.schema.SchemaVersion; public class DefaultSchemaRegistryService implements SchemaRegistryService { @Override diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/schema/JsonSchemaCompatibilityCheck.java b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/schema/JsonSchemaCompatibilityCheck.java index 0865a17f460b6..442825a5a574f 100644 --- a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/schema/JsonSchemaCompatibilityCheck.java +++ b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/schema/JsonSchemaCompatibilityCheck.java @@ -25,7 +25,7 @@ import java.io.IOException; import org.apache.avro.Schema; import org.apache.avro.SchemaParseException; -import org.apache.pulsar.common.schema.SchemaData; +import org.apache.pulsar.common.protocol.schema.SchemaData; import org.apache.pulsar.common.schema.SchemaType; /** diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/schema/KeyValueSchemaCompatibilityCheck.java b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/schema/KeyValueSchemaCompatibilityCheck.java index f9c9fc2a142a0..b7cf5b45f3806 100644 --- a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/schema/KeyValueSchemaCompatibilityCheck.java +++ b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/schema/KeyValueSchemaCompatibilityCheck.java @@ -19,11 +19,8 @@ package org.apache.pulsar.broker.service.schema; import com.google.gson.Gson; -import org.apache.avro.SchemaParseException; -import org.apache.avro.SchemaValidationException; -import org.apache.pulsar.client.api.Schema; import org.apache.pulsar.common.schema.KeyValue; -import org.apache.pulsar.common.schema.SchemaData; +import org.apache.pulsar.common.protocol.schema.SchemaData; import org.apache.pulsar.common.schema.SchemaType; import java.nio.ByteBuffer; diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/schema/LongSchemaVersion.java b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/schema/LongSchemaVersion.java index c9bbf78884c0a..7da2d870d2bbc 100644 --- a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/schema/LongSchemaVersion.java +++ b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/schema/LongSchemaVersion.java @@ -21,7 +21,7 @@ import com.google.common.base.MoreObjects; import java.nio.ByteBuffer; import java.util.Objects; -import org.apache.pulsar.common.schema.SchemaVersion; +import org.apache.pulsar.common.protocol.schema.SchemaVersion; public class LongSchemaVersion implements SchemaVersion { private final long version; diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/schema/SchemaCompatibilityCheck.java b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/schema/SchemaCompatibilityCheck.java index b50d7ad98a6a4..508d8c2268e6b 100644 --- a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/schema/SchemaCompatibilityCheck.java +++ b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/schema/SchemaCompatibilityCheck.java @@ -18,7 +18,7 @@ */ package org.apache.pulsar.broker.service.schema; -import org.apache.pulsar.common.schema.SchemaData; +import org.apache.pulsar.common.protocol.schema.SchemaData; import org.apache.pulsar.common.schema.SchemaType; public interface SchemaCompatibilityCheck { diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/schema/SchemaRegistry.java b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/schema/SchemaRegistry.java index 12ab192435a29..9b9f591ead0e9 100644 --- a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/schema/SchemaRegistry.java +++ b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/schema/SchemaRegistry.java @@ -23,8 +23,8 @@ import java.util.List; import java.util.Objects; import java.util.concurrent.CompletableFuture; -import org.apache.pulsar.common.schema.SchemaData; -import org.apache.pulsar.common.schema.SchemaVersion; +import org.apache.pulsar.common.protocol.schema.SchemaData; +import org.apache.pulsar.common.protocol.schema.SchemaVersion; public interface SchemaRegistry extends AutoCloseable { diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/schema/SchemaRegistryServiceImpl.java b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/schema/SchemaRegistryServiceImpl.java index 43f79c8e77d09..5c38c8a1d5e7c 100644 --- a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/schema/SchemaRegistryServiceImpl.java +++ b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/schema/SchemaRegistryServiceImpl.java @@ -41,9 +41,9 @@ import org.apache.bookkeeper.common.concurrent.FutureUtils; import org.apache.pulsar.broker.service.schema.proto.SchemaRegistryFormat; -import org.apache.pulsar.common.schema.SchemaData; +import org.apache.pulsar.common.protocol.schema.SchemaData; import org.apache.pulsar.common.schema.SchemaType; -import org.apache.pulsar.common.schema.SchemaVersion; +import org.apache.pulsar.common.protocol.schema.SchemaVersion; import org.apache.pulsar.common.util.FutureUtil; public class SchemaRegistryServiceImpl implements SchemaRegistryService { diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/schema/SchemaStorage.java b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/schema/SchemaStorage.java index 5a3b44ccf9bd8..f1336667bd5a1 100644 --- a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/schema/SchemaStorage.java +++ b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/schema/SchemaStorage.java @@ -20,7 +20,7 @@ import java.util.List; import java.util.concurrent.CompletableFuture; -import org.apache.pulsar.common.schema.SchemaVersion; +import org.apache.pulsar.common.protocol.schema.SchemaVersion; public interface SchemaStorage { diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/schema/StoredSchema.java b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/schema/StoredSchema.java index fd2602bccb39b..b1866eca5df99 100644 --- a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/schema/StoredSchema.java +++ b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/schema/StoredSchema.java @@ -21,7 +21,7 @@ import com.google.common.base.MoreObjects; import java.util.Arrays; import java.util.Objects; -import org.apache.pulsar.common.schema.SchemaVersion; +import org.apache.pulsar.common.protocol.schema.SchemaVersion; public class StoredSchema { public final byte[] data; diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/client/api/RawMessage.java b/pulsar-broker/src/main/java/org/apache/pulsar/client/api/RawMessage.java index e6d3081b416e3..786fa972cc54a 100644 --- a/pulsar-broker/src/main/java/org/apache/pulsar/client/api/RawMessage.java +++ b/pulsar-broker/src/main/java/org/apache/pulsar/client/api/RawMessage.java @@ -18,7 +18,6 @@ */ package org.apache.pulsar.client.api; -import org.apache.pulsar.common.api.ByteBufPair; import org.apache.pulsar.common.api.proto.PulsarApi.MessageIdData; import io.netty.buffer.ByteBuf; diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/client/impl/RawBatchConverter.java b/pulsar-broker/src/main/java/org/apache/pulsar/client/impl/RawBatchConverter.java index 5c11059c5cd6e..e252426acbbfa 100644 --- a/pulsar-broker/src/main/java/org/apache/pulsar/client/impl/RawBatchConverter.java +++ b/pulsar-broker/src/main/java/org/apache/pulsar/client/impl/RawBatchConverter.java @@ -33,7 +33,7 @@ import org.apache.pulsar.client.api.MessageId; import org.apache.pulsar.client.api.RawMessage; import org.apache.pulsar.common.allocator.PulsarByteBufAllocator; -import org.apache.pulsar.common.api.Commands; +import org.apache.pulsar.common.protocol.Commands; import org.apache.pulsar.common.api.proto.PulsarApi.CompressionType; import org.apache.pulsar.common.api.proto.PulsarApi.MessageMetadata; import org.apache.pulsar.common.api.proto.PulsarApi.SingleMessageMetadata; diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/compaction/TwoPhaseCompactor.java b/pulsar-broker/src/main/java/org/apache/pulsar/compaction/TwoPhaseCompactor.java index b070f3bf80ee3..62503ffffdd12 100644 --- a/pulsar-broker/src/main/java/org/apache/pulsar/compaction/TwoPhaseCompactor.java +++ b/pulsar-broker/src/main/java/org/apache/pulsar/compaction/TwoPhaseCompactor.java @@ -18,14 +18,11 @@ */ package org.apache.pulsar.compaction; -import static java.nio.charset.StandardCharsets.UTF_8; - import com.google.common.collect.ImmutableMap; import io.netty.buffer.ByteBuf; import java.io.IOException; -import java.util.Collections; import java.util.HashMap; import java.util.Map; import java.util.Optional; @@ -47,8 +44,7 @@ import org.apache.pulsar.client.api.RawMessage; import org.apache.pulsar.client.api.RawReader; import org.apache.pulsar.client.impl.RawBatchConverter; -import org.apache.pulsar.common.api.Commands; -import org.apache.pulsar.common.api.proto.PulsarApi.CompressionType; +import org.apache.pulsar.common.protocol.Commands; import org.apache.pulsar.common.api.proto.PulsarApi.MessageMetadata; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/AdminApiSchemaValidationEnforced.java b/pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/AdminApiSchemaValidationEnforced.java index b193d3ab3a835..cf197121181d2 100644 --- a/pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/AdminApiSchemaValidationEnforced.java +++ b/pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/AdminApiSchemaValidationEnforced.java @@ -27,7 +27,7 @@ import org.apache.pulsar.client.api.Schema; import org.apache.pulsar.common.policies.data.ClusterData; import org.apache.pulsar.common.policies.data.TenantInfo; -import org.apache.pulsar.common.schema.PostSchemaPayload; +import org.apache.pulsar.common.protocol.schema.PostSchemaPayload; import org.apache.pulsar.common.schema.SchemaInfo; import org.apache.pulsar.common.schema.SchemaType; import org.slf4j.Logger; diff --git a/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/NonPersistentTopicE2ETest.java b/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/NonPersistentTopicE2ETest.java index d6d873d42e9b6..cd475593dbb6a 100644 --- a/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/NonPersistentTopicE2ETest.java +++ b/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/NonPersistentTopicE2ETest.java @@ -30,7 +30,7 @@ import org.apache.pulsar.client.api.schema.SchemaDefinition; import org.apache.pulsar.client.impl.schema.JSONSchema; import org.apache.pulsar.common.naming.TopicName; -import org.apache.pulsar.common.schema.SchemaData; +import org.apache.pulsar.common.protocol.schema.SchemaData; import org.apache.pulsar.common.schema.SchemaType; import org.testng.annotations.AfterMethod; import org.testng.annotations.BeforeMethod; diff --git a/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/PersistentMessageFinderTest.java b/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/PersistentMessageFinderTest.java index 08230c8c502bb..b2c22463996ab 100644 --- a/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/PersistentMessageFinderTest.java +++ b/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/PersistentMessageFinderTest.java @@ -43,7 +43,7 @@ import org.apache.pulsar.broker.service.persistent.PersistentMessageExpiryMonitor; import org.apache.pulsar.broker.service.persistent.PersistentMessageFinder; import org.apache.pulsar.common.allocator.PulsarByteBufAllocator; -import org.apache.pulsar.common.api.ByteBufPair; +import org.apache.pulsar.common.protocol.ByteBufPair; import org.apache.pulsar.common.api.proto.PulsarApi; import org.apache.pulsar.common.util.protobuf.ByteBufCodedOutputStream; import org.testng.annotations.Test; diff --git a/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/PersistentTopicE2ETest.java b/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/PersistentTopicE2ETest.java index da42cdb78e1c4..790505d4438fb 100644 --- a/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/PersistentTopicE2ETest.java +++ b/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/PersistentTopicE2ETest.java @@ -74,7 +74,7 @@ import org.apache.pulsar.common.api.proto.PulsarApi.CommandSubscribe.SubType; import org.apache.pulsar.common.naming.TopicName; import org.apache.pulsar.common.policies.data.RetentionPolicies; -import org.apache.pulsar.common.schema.SchemaData; +import org.apache.pulsar.common.protocol.schema.SchemaData; import org.apache.pulsar.common.schema.SchemaType; import org.apache.pulsar.common.stats.Metrics; import org.apache.pulsar.common.util.collections.ConcurrentLongPairSet; diff --git a/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/PersistentTopicTest.java b/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/PersistentTopicTest.java index 556f77bd1a48a..325a73505c270 100644 --- a/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/PersistentTopicTest.java +++ b/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/PersistentTopicTest.java @@ -99,7 +99,7 @@ import org.apache.pulsar.common.naming.NamespaceBundle; import org.apache.pulsar.common.naming.TopicName; import org.apache.pulsar.common.policies.data.Policies; -import org.apache.pulsar.common.schema.SchemaVersion; +import org.apache.pulsar.common.protocol.schema.SchemaVersion; import org.apache.pulsar.common.util.collections.ConcurrentOpenHashMap; import org.apache.pulsar.compaction.CompactedTopic; import org.apache.pulsar.compaction.Compactor; diff --git a/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/ReplicatorTest.java b/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/ReplicatorTest.java index 91d4ee7816f2d..4a65b938d7a2b 100644 --- a/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/ReplicatorTest.java +++ b/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/ReplicatorTest.java @@ -46,13 +46,9 @@ import org.apache.bookkeeper.mledger.ManagedLedgerException; import org.apache.bookkeeper.mledger.ManagedLedgerException.CursorAlreadyClosedException; import org.apache.bookkeeper.mledger.impl.ManagedLedgerImpl; -import org.apache.pulsar.broker.namespace.NamespaceService; -import org.apache.pulsar.broker.namespace.OwnedBundle; -import org.apache.pulsar.broker.namespace.OwnershipCache; import org.apache.pulsar.broker.service.BrokerServiceException.NamingException; import org.apache.pulsar.broker.service.persistent.PersistentReplicator; import org.apache.pulsar.broker.service.persistent.PersistentTopic; -import org.apache.pulsar.client.admin.PulsarAdminException.PreconditionFailedException; import org.apache.pulsar.client.api.MessageRoutingMode; import org.apache.pulsar.client.api.Producer; import org.apache.pulsar.client.api.PulsarClient; @@ -62,9 +58,7 @@ import org.apache.pulsar.client.impl.ProducerImpl; import org.apache.pulsar.client.impl.PulsarClientImpl; import org.apache.pulsar.client.impl.conf.ProducerConfigurationData; -import org.apache.pulsar.common.api.Commands; -import org.apache.pulsar.common.naming.NamespaceBundle; -import org.apache.pulsar.common.naming.NamespaceName; +import org.apache.pulsar.common.protocol.Commands; import org.apache.pulsar.common.naming.TopicName; import org.apache.pulsar.common.policies.data.BacklogQuota; import org.apache.pulsar.common.policies.data.BacklogQuota.RetentionPolicy; diff --git a/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/ServerCnxTest.java b/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/ServerCnxTest.java index a43057cbb2c29..217b6f1cd16cc 100644 --- a/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/ServerCnxTest.java +++ b/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/ServerCnxTest.java @@ -80,10 +80,10 @@ import org.apache.pulsar.broker.service.schema.DefaultSchemaRegistryService; import org.apache.pulsar.broker.service.utils.ClientChannelHelper; import org.apache.pulsar.common.api.AuthData; -import org.apache.pulsar.common.api.ByteBufPair; -import org.apache.pulsar.common.api.Commands; -import org.apache.pulsar.common.api.Commands.ChecksumType; -import org.apache.pulsar.common.api.PulsarHandler; +import org.apache.pulsar.common.protocol.ByteBufPair; +import org.apache.pulsar.common.protocol.Commands; +import org.apache.pulsar.common.protocol.Commands.ChecksumType; +import org.apache.pulsar.common.protocol.PulsarHandler; import org.apache.pulsar.common.api.proto.PulsarApi; import org.apache.pulsar.common.api.proto.PulsarApi.AuthMethod; import org.apache.pulsar.common.api.proto.PulsarApi.CommandAck.AckType; diff --git a/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/persistent/ChecksumTest.java b/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/persistent/ChecksumTest.java index e3aac46e9a8d3..d15d9d0a95da1 100644 --- a/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/persistent/ChecksumTest.java +++ b/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/persistent/ChecksumTest.java @@ -30,7 +30,7 @@ import org.apache.pulsar.client.api.Producer; import org.apache.pulsar.client.api.RawMessage; import org.apache.pulsar.client.api.RawReader; -import org.apache.pulsar.common.api.Commands; +import org.apache.pulsar.common.protocol.Commands; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; diff --git a/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/persistent/ReplicatedSubscriptionsSnapshotBuilderTest.java b/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/persistent/ReplicatedSubscriptionsSnapshotBuilderTest.java index 95b984f841c7e..b4d15214fe362 100644 --- a/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/persistent/ReplicatedSubscriptionsSnapshotBuilderTest.java +++ b/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/persistent/ReplicatedSubscriptionsSnapshotBuilderTest.java @@ -35,8 +35,8 @@ import org.apache.bookkeeper.mledger.impl.PositionImpl; import org.apache.pulsar.broker.ServiceConfiguration; -import org.apache.pulsar.common.api.Commands; -import org.apache.pulsar.common.api.Markers; +import org.apache.pulsar.common.protocol.Commands; +import org.apache.pulsar.common.protocol.Markers; import org.apache.pulsar.common.api.proto.PulsarMarkers.ClusterMessageId; import org.apache.pulsar.common.api.proto.PulsarMarkers.MessageIdData; import org.apache.pulsar.common.api.proto.PulsarMarkers.ReplicatedSubscriptionsSnapshot; diff --git a/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/schema/AvroSchemaCompatibilityCheckTest.java b/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/schema/AvroSchemaCompatibilityCheckTest.java index 695d6645b6b81..dccdf0c35baef 100644 --- a/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/schema/AvroSchemaCompatibilityCheckTest.java +++ b/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/schema/AvroSchemaCompatibilityCheckTest.java @@ -18,11 +18,6 @@ */ package org.apache.pulsar.broker.service.schema; -import org.apache.pulsar.common.schema.SchemaData; -import org.apache.pulsar.common.schema.SchemaType; -import org.testng.Assert; -import org.testng.annotations.Test; - public class AvroSchemaCompatibilityCheckTest extends BaseAvroSchemaCompatibilityTest{ @Override diff --git a/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/schema/BaseAvroSchemaCompatibilityTest.java b/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/schema/BaseAvroSchemaCompatibilityTest.java index c9bf39f905d86..bea4e91e6ed63 100644 --- a/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/schema/BaseAvroSchemaCompatibilityTest.java +++ b/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/schema/BaseAvroSchemaCompatibilityTest.java @@ -18,7 +18,7 @@ */ package org.apache.pulsar.broker.service.schema; -import org.apache.pulsar.common.schema.SchemaData; +import org.apache.pulsar.common.protocol.schema.SchemaData; import org.apache.pulsar.common.schema.SchemaType; import org.testng.Assert; import org.testng.annotations.Test; diff --git a/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/schema/JsonSchemaCompatibilityCheckTest.java b/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/schema/JsonSchemaCompatibilityCheckTest.java index a78592740bfdc..f234b18ee2235 100644 --- a/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/schema/JsonSchemaCompatibilityCheckTest.java +++ b/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/schema/JsonSchemaCompatibilityCheckTest.java @@ -35,7 +35,7 @@ import org.apache.pulsar.client.api.SchemaSerializationException; import org.apache.pulsar.client.api.schema.SchemaDefinition; import org.apache.pulsar.client.impl.schema.JSONSchema; -import org.apache.pulsar.common.schema.SchemaData; +import org.apache.pulsar.common.protocol.schema.SchemaData; import org.apache.pulsar.common.schema.SchemaInfo; import org.apache.pulsar.common.schema.SchemaType; import org.testng.Assert; diff --git a/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/schema/KeyValueSchemaCompatibilityCheckTest.java b/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/schema/KeyValueSchemaCompatibilityCheckTest.java index 0ba8a1c4e0c87..b3d471692cbd3 100644 --- a/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/schema/KeyValueSchemaCompatibilityCheckTest.java +++ b/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/schema/KeyValueSchemaCompatibilityCheckTest.java @@ -22,13 +22,12 @@ import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; -import org.apache.pulsar.client.api.Schema; import org.apache.pulsar.client.api.schema.SchemaDefinition; import org.apache.pulsar.client.impl.schema.AvroSchema; import org.apache.pulsar.client.impl.schema.JSONSchema; import org.apache.pulsar.client.impl.schema.StringSchema; import org.apache.pulsar.client.impl.schema.KeyValueSchema; -import org.apache.pulsar.common.schema.SchemaData; +import org.apache.pulsar.common.protocol.schema.SchemaData; import org.apache.pulsar.common.schema.SchemaType; import org.testng.Assert; import org.testng.annotations.BeforeClass; diff --git a/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/schema/SchemaServiceTest.java b/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/schema/SchemaServiceTest.java index baa9542fa48ae..291e64e3cd404 100644 --- a/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/schema/SchemaServiceTest.java +++ b/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/schema/SchemaServiceTest.java @@ -35,9 +35,9 @@ import java.util.concurrent.ExecutionException; import org.apache.pulsar.broker.auth.MockedPulsarServiceBaseTest; -import org.apache.pulsar.common.schema.SchemaData; +import org.apache.pulsar.common.protocol.schema.SchemaData; import org.apache.pulsar.common.schema.SchemaType; -import org.apache.pulsar.common.schema.SchemaVersion; +import org.apache.pulsar.common.protocol.schema.SchemaVersion; import org.testng.annotations.AfterMethod; import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; diff --git a/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/utils/ClientChannelHelper.java b/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/utils/ClientChannelHelper.java index 3699f78112b6d..31dfb43b14fe1 100644 --- a/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/utils/ClientChannelHelper.java +++ b/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/utils/ClientChannelHelper.java @@ -20,7 +20,7 @@ import java.util.Queue; -import org.apache.pulsar.common.api.PulsarDecoder; +import org.apache.pulsar.common.protocol.PulsarDecoder; import org.apache.pulsar.common.api.proto.PulsarApi.CommandAck; import org.apache.pulsar.common.api.proto.PulsarApi.CommandCloseConsumer; import org.apache.pulsar.common.api.proto.PulsarApi.CommandCloseProducer; diff --git a/pulsar-broker/src/test/java/org/apache/pulsar/client/api/ClientErrorsTest.java b/pulsar-broker/src/test/java/org/apache/pulsar/client/api/ClientErrorsTest.java index def895b63120a..025d42d7e8023 100644 --- a/pulsar-broker/src/test/java/org/apache/pulsar/client/api/ClientErrorsTest.java +++ b/pulsar-broker/src/test/java/org/apache/pulsar/client/api/ClientErrorsTest.java @@ -30,13 +30,12 @@ import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicReference; import org.apache.bookkeeper.test.PortManager; -import org.apache.pulsar.client.api.PulsarClientException.LookupException; import org.apache.pulsar.client.impl.ConsumerBase; import org.apache.pulsar.client.impl.ProducerBase; -import org.apache.pulsar.common.api.Commands; +import org.apache.pulsar.common.protocol.Commands; import org.apache.pulsar.common.api.proto.PulsarApi.CommandLookupTopicResponse.LookupType; import org.apache.pulsar.common.api.proto.PulsarApi.ServerError; -import org.apache.pulsar.common.schema.SchemaVersion; +import org.apache.pulsar.common.protocol.schema.SchemaVersion; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; diff --git a/pulsar-broker/src/test/java/org/apache/pulsar/client/api/MockBrokerService.java b/pulsar-broker/src/test/java/org/apache/pulsar/client/api/MockBrokerService.java index 91e5bbe6dd925..11462452dbe3d 100644 --- a/pulsar-broker/src/test/java/org/apache/pulsar/client/api/MockBrokerService.java +++ b/pulsar-broker/src/test/java/org/apache/pulsar/client/api/MockBrokerService.java @@ -38,8 +38,8 @@ import org.apache.pulsar.client.api.MockBrokerServiceHooks.CommandSubscribeHook; import org.apache.pulsar.client.api.MockBrokerServiceHooks.CommandTopicLookupHook; import org.apache.pulsar.client.api.MockBrokerServiceHooks.CommandUnsubscribeHook; -import org.apache.pulsar.common.api.Commands; -import org.apache.pulsar.common.api.PulsarDecoder; +import org.apache.pulsar.common.protocol.Commands; +import org.apache.pulsar.common.protocol.PulsarDecoder; import org.apache.pulsar.common.api.proto.PulsarApi; import org.apache.pulsar.common.api.proto.PulsarApi.CommandLookupTopic; import org.apache.pulsar.common.api.proto.PulsarApi.CommandLookupTopicResponse.LookupType; @@ -47,7 +47,7 @@ import org.apache.pulsar.common.api.proto.PulsarApi.CommandSend; import org.apache.pulsar.common.lookup.data.LookupData; import org.apache.pulsar.common.partition.PartitionedTopicMetadata; -import org.apache.pulsar.common.schema.SchemaVersion; +import org.apache.pulsar.common.protocol.schema.SchemaVersion; import org.apache.pulsar.common.util.netty.EventLoopUtil; import org.eclipse.jetty.server.Request; import org.eclipse.jetty.server.Server; diff --git a/pulsar-broker/src/test/java/org/apache/pulsar/client/api/SimpleProducerConsumerTest.java b/pulsar-broker/src/test/java/org/apache/pulsar/client/api/SimpleProducerConsumerTest.java index 32c6fa8f5ecb3..e7209a17c2674 100644 --- a/pulsar-broker/src/test/java/org/apache/pulsar/client/api/SimpleProducerConsumerTest.java +++ b/pulsar-broker/src/test/java/org/apache/pulsar/client/api/SimpleProducerConsumerTest.java @@ -70,10 +70,9 @@ import org.apache.pulsar.client.impl.MessageImpl; import org.apache.pulsar.client.impl.TopicMessageImpl; import org.apache.pulsar.client.impl.TypedMessageBuilderImpl; -import org.apache.pulsar.common.api.Commands; +import org.apache.pulsar.common.protocol.Commands; import org.apache.pulsar.common.api.EncryptionContext; import org.apache.pulsar.common.api.EncryptionContext.EncryptionKey; -import org.apache.pulsar.common.api.PulsarDecoder; import org.apache.pulsar.common.api.proto.PulsarApi; import org.apache.pulsar.common.api.proto.PulsarApi.EncryptionKeys; import org.apache.pulsar.common.api.proto.PulsarApi.MessageMetadata; diff --git a/pulsar-broker/src/test/java/org/apache/pulsar/client/api/SimpleTypedProducerConsumerTest.java b/pulsar-broker/src/test/java/org/apache/pulsar/client/api/SimpleTypedProducerConsumerTest.java index 586f72b49dec0..9aa35738dd146 100644 --- a/pulsar-broker/src/test/java/org/apache/pulsar/client/api/SimpleTypedProducerConsumerTest.java +++ b/pulsar-broker/src/test/java/org/apache/pulsar/client/api/SimpleTypedProducerConsumerTest.java @@ -42,7 +42,7 @@ import org.apache.pulsar.client.impl.schema.AvroSchema; import org.apache.pulsar.client.impl.schema.JSONSchema; import org.apache.pulsar.client.impl.schema.ProtobufSchema; -import org.apache.pulsar.common.schema.SchemaData; +import org.apache.pulsar.common.protocol.schema.SchemaData; import org.apache.pulsar.common.schema.SchemaType; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/pulsar-broker/src/test/java/org/apache/pulsar/client/api/v1/V1_ProducerConsumerTest.java b/pulsar-broker/src/test/java/org/apache/pulsar/client/api/v1/V1_ProducerConsumerTest.java index 2040979f36954..f437eda3a0080 100644 --- a/pulsar-broker/src/test/java/org/apache/pulsar/client/api/v1/V1_ProducerConsumerTest.java +++ b/pulsar-broker/src/test/java/org/apache/pulsar/client/api/v1/V1_ProducerConsumerTest.java @@ -55,7 +55,6 @@ import org.apache.bookkeeper.mledger.impl.EntryCacheImpl; import org.apache.bookkeeper.mledger.impl.ManagedLedgerImpl; import org.apache.pulsar.broker.service.persistent.PersistentTopic; -import org.apache.pulsar.client.api.CompressionType; import org.apache.pulsar.client.api.Consumer; import org.apache.pulsar.client.api.ConsumerBuilder; import org.apache.pulsar.client.api.ConsumerCryptoFailureAction; @@ -73,8 +72,7 @@ import org.apache.pulsar.client.impl.ConsumerImpl; import org.apache.pulsar.client.impl.MessageIdImpl; import org.apache.pulsar.client.impl.TypedMessageBuilderImpl; -import org.apache.pulsar.common.api.Commands; -import org.apache.pulsar.common.api.PulsarDecoder; +import org.apache.pulsar.common.protocol.Commands; import org.apache.pulsar.common.naming.TopicName; import org.apache.pulsar.common.util.FutureUtil; import org.slf4j.Logger; diff --git a/pulsar-broker/src/test/java/org/apache/pulsar/client/impl/BrokerClientIntegrationTest.java b/pulsar-broker/src/test/java/org/apache/pulsar/client/impl/BrokerClientIntegrationTest.java index 2ee0071490b38..c89fd20cc7068 100644 --- a/pulsar-broker/src/test/java/org/apache/pulsar/client/impl/BrokerClientIntegrationTest.java +++ b/pulsar-broker/src/test/java/org/apache/pulsar/client/impl/BrokerClientIntegrationTest.java @@ -74,7 +74,7 @@ import org.apache.pulsar.client.api.PulsarClientException; import org.apache.pulsar.client.api.SubscriptionType; import org.apache.pulsar.client.impl.HandlerState.State; -import org.apache.pulsar.common.api.PulsarHandler; +import org.apache.pulsar.common.protocol.PulsarHandler; import org.apache.pulsar.common.naming.NamespaceBundle; import org.apache.pulsar.common.naming.TopicName; import org.apache.pulsar.common.policies.data.ClusterData; diff --git a/pulsar-broker/src/test/java/org/apache/pulsar/client/impl/CompactedOutBatchMessageTest.java b/pulsar-broker/src/test/java/org/apache/pulsar/client/impl/CompactedOutBatchMessageTest.java index de1b88a21f965..f7020378d5655 100644 --- a/pulsar-broker/src/test/java/org/apache/pulsar/client/impl/CompactedOutBatchMessageTest.java +++ b/pulsar-broker/src/test/java/org/apache/pulsar/client/impl/CompactedOutBatchMessageTest.java @@ -25,7 +25,7 @@ import org.apache.pulsar.client.api.Message; import org.apache.pulsar.client.api.ProducerConsumerBase; -import org.apache.pulsar.common.api.Commands; +import org.apache.pulsar.common.protocol.Commands; import org.apache.pulsar.common.api.proto.PulsarApi.MessageIdData; import org.apache.pulsar.common.api.proto.PulsarApi.MessageMetadata; import org.apache.pulsar.common.api.proto.PulsarApi.SingleMessageMetadata; diff --git a/pulsar-broker/src/test/java/org/apache/pulsar/client/impl/MessageIdTest.java b/pulsar-broker/src/test/java/org/apache/pulsar/client/impl/MessageIdTest.java index 82a830ff9d90d..14349f7c4f8f8 100644 --- a/pulsar-broker/src/test/java/org/apache/pulsar/client/impl/MessageIdTest.java +++ b/pulsar-broker/src/test/java/org/apache/pulsar/client/impl/MessageIdTest.java @@ -50,9 +50,9 @@ import org.apache.pulsar.client.api.TypedMessageBuilder; import org.apache.pulsar.client.impl.ProducerImpl.OpSendMsg; import org.apache.pulsar.client.impl.conf.ClientConfigurationData; -import org.apache.pulsar.common.api.ByteBufPair; -import org.apache.pulsar.common.api.Commands; -import org.apache.pulsar.common.api.Commands.ChecksumType; +import org.apache.pulsar.common.protocol.ByteBufPair; +import org.apache.pulsar.common.protocol.Commands; +import org.apache.pulsar.common.protocol.Commands.ChecksumType; import org.apache.pulsar.common.api.proto.PulsarApi.MessageMetadata; import org.apache.pulsar.common.api.proto.PulsarApi.MessageMetadata.Builder; import org.slf4j.Logger; diff --git a/pulsar-broker/src/test/java/org/apache/pulsar/client/impl/MessageParserTest.java b/pulsar-broker/src/test/java/org/apache/pulsar/client/impl/MessageParserTest.java index 1e0c45c2ac29c..e00643b40064b 100644 --- a/pulsar-broker/src/test/java/org/apache/pulsar/client/impl/MessageParserTest.java +++ b/pulsar-broker/src/test/java/org/apache/pulsar/client/impl/MessageParserTest.java @@ -34,7 +34,7 @@ import org.apache.pulsar.broker.service.persistent.PersistentTopic; import org.apache.pulsar.client.api.Producer; import org.apache.pulsar.client.api.Schema; -import org.apache.pulsar.common.api.Commands; +import org.apache.pulsar.common.protocol.Commands; import org.apache.pulsar.common.api.raw.MessageParser; import org.apache.pulsar.common.api.raw.RawMessage; import org.apache.pulsar.common.naming.TopicName; diff --git a/pulsar-broker/src/test/java/org/apache/pulsar/client/impl/RawReaderTest.java b/pulsar-broker/src/test/java/org/apache/pulsar/client/impl/RawReaderTest.java index 9d353bdaee672..50857634b3815 100644 --- a/pulsar-broker/src/test/java/org/apache/pulsar/client/impl/RawReaderTest.java +++ b/pulsar-broker/src/test/java/org/apache/pulsar/client/impl/RawReaderTest.java @@ -42,7 +42,7 @@ import org.apache.pulsar.client.api.Producer; import org.apache.pulsar.client.api.RawMessage; import org.apache.pulsar.client.api.RawReader; -import org.apache.pulsar.common.api.Commands; +import org.apache.pulsar.common.protocol.Commands; import org.apache.pulsar.common.api.proto.PulsarApi.MessageMetadata; import org.apache.pulsar.common.policies.data.ClusterData; import org.apache.pulsar.common.policies.data.TenantInfo; diff --git a/pulsar-broker/src/test/java/org/apache/pulsar/compaction/CompactorTest.java b/pulsar-broker/src/test/java/org/apache/pulsar/compaction/CompactorTest.java index bddc2bc9c0677..262337b77273b 100644 --- a/pulsar-broker/src/test/java/org/apache/pulsar/compaction/CompactorTest.java +++ b/pulsar-broker/src/test/java/org/apache/pulsar/compaction/CompactorTest.java @@ -45,7 +45,7 @@ import org.apache.pulsar.client.api.Producer; import org.apache.pulsar.client.api.RawMessage; import org.apache.pulsar.client.impl.RawMessageImpl; -import org.apache.pulsar.common.api.Commands; +import org.apache.pulsar.common.protocol.Commands; import org.apache.pulsar.common.policies.data.ClusterData; import org.apache.pulsar.common.policies.data.TenantInfo; import org.testng.Assert; diff --git a/pulsar-client-admin/src/main/java/org/apache/pulsar/client/admin/Schemas.java b/pulsar-client-admin/src/main/java/org/apache/pulsar/client/admin/Schemas.java index dfb89d40a4141..abc8d16da8b79 100644 --- a/pulsar-client-admin/src/main/java/org/apache/pulsar/client/admin/Schemas.java +++ b/pulsar-client-admin/src/main/java/org/apache/pulsar/client/admin/Schemas.java @@ -18,7 +18,7 @@ */ package org.apache.pulsar.client.admin; -import org.apache.pulsar.common.schema.PostSchemaPayload; +import org.apache.pulsar.common.protocol.schema.PostSchemaPayload; import org.apache.pulsar.common.schema.SchemaInfo; /** diff --git a/pulsar-client-admin/src/main/java/org/apache/pulsar/client/admin/internal/SchemasImpl.java b/pulsar-client-admin/src/main/java/org/apache/pulsar/client/admin/internal/SchemasImpl.java index f2ff401c3d92b..df2e62e4459b9 100644 --- a/pulsar-client-admin/src/main/java/org/apache/pulsar/client/admin/internal/SchemasImpl.java +++ b/pulsar-client-admin/src/main/java/org/apache/pulsar/client/admin/internal/SchemasImpl.java @@ -25,9 +25,9 @@ import org.apache.pulsar.client.api.Authentication; import org.apache.pulsar.common.naming.TopicName; import org.apache.pulsar.common.policies.data.ErrorData; -import org.apache.pulsar.common.schema.DeleteSchemaResponse; -import org.apache.pulsar.common.schema.GetSchemaResponse; -import org.apache.pulsar.common.schema.PostSchemaPayload; +import org.apache.pulsar.common.protocol.schema.DeleteSchemaResponse; +import org.apache.pulsar.common.protocol.schema.GetSchemaResponse; +import org.apache.pulsar.common.protocol.schema.PostSchemaPayload; import org.apache.pulsar.common.schema.SchemaInfo; public class SchemasImpl extends BaseResource implements Schemas { diff --git a/pulsar-client-admin/src/main/java/org/apache/pulsar/client/admin/internal/TopicsImpl.java b/pulsar-client-admin/src/main/java/org/apache/pulsar/client/admin/internal/TopicsImpl.java index 89d5162c55a30..dfd90bd76e1aa 100644 --- a/pulsar-client-admin/src/main/java/org/apache/pulsar/client/admin/internal/TopicsImpl.java +++ b/pulsar-client-admin/src/main/java/org/apache/pulsar/client/admin/internal/TopicsImpl.java @@ -60,7 +60,7 @@ import org.apache.pulsar.client.api.Schema; import org.apache.pulsar.client.impl.MessageIdImpl; import org.apache.pulsar.client.impl.MessageImpl; -import org.apache.pulsar.common.api.Commands; +import org.apache.pulsar.common.protocol.Commands; import org.apache.pulsar.common.api.proto.PulsarApi; import org.apache.pulsar.common.api.proto.PulsarApi.KeyValue; import org.apache.pulsar.common.api.proto.PulsarApi.SingleMessageMetadata; diff --git a/pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdSchemas.java b/pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdSchemas.java index 0ac8e41d89815..5d71035e3dc8c 100644 --- a/pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdSchemas.java +++ b/pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdSchemas.java @@ -34,7 +34,7 @@ import com.google.gson.JsonSerializer; import org.apache.pulsar.admin.cli.utils.SchemaExtractor; import org.apache.pulsar.client.admin.PulsarAdmin; -import org.apache.pulsar.common.schema.PostSchemaPayload; +import org.apache.pulsar.common.protocol.schema.PostSchemaPayload; import org.apache.pulsar.common.schema.SchemaInfo; @Parameters(commandDescription = "Operations about schemas") diff --git a/pulsar-client/src/main/java/org/apache/pulsar/client/impl/BatchMessageContainer.java b/pulsar-client/src/main/java/org/apache/pulsar/client/impl/BatchMessageContainer.java index 4e49dcf20059a..0e1adee0da07c 100644 --- a/pulsar-client/src/main/java/org/apache/pulsar/client/impl/BatchMessageContainer.java +++ b/pulsar-client/src/main/java/org/apache/pulsar/client/impl/BatchMessageContainer.java @@ -25,7 +25,7 @@ import java.util.List; import org.apache.pulsar.common.allocator.PulsarByteBufAllocator; -import org.apache.pulsar.common.api.Commands; +import org.apache.pulsar.common.protocol.Commands; import org.apache.pulsar.common.api.proto.PulsarApi; import org.apache.pulsar.common.compression.CompressionCodec; import org.apache.pulsar.common.compression.CompressionCodecProvider; diff --git a/pulsar-client/src/main/java/org/apache/pulsar/client/impl/BinaryProtoLookupService.java b/pulsar-client/src/main/java/org/apache/pulsar/client/impl/BinaryProtoLookupService.java index d33ddd0aefad5..fae3a4f5b3f4b 100644 --- a/pulsar-client/src/main/java/org/apache/pulsar/client/impl/BinaryProtoLookupService.java +++ b/pulsar-client/src/main/java/org/apache/pulsar/client/impl/BinaryProtoLookupService.java @@ -36,14 +36,14 @@ import org.apache.commons.lang3.tuple.Pair; import org.apache.pulsar.client.api.PulsarClientException; -import org.apache.pulsar.common.api.Commands; +import org.apache.pulsar.common.protocol.Commands; import org.apache.pulsar.common.api.proto.PulsarApi.CommandGetTopicsOfNamespace.Mode; import org.apache.pulsar.common.api.proto.PulsarApi.CommandLookupTopicResponse; import org.apache.pulsar.common.api.proto.PulsarApi.CommandLookupTopicResponse.LookupType; import org.apache.pulsar.common.naming.NamespaceName; import org.apache.pulsar.common.naming.TopicName; import org.apache.pulsar.common.partition.PartitionedTopicMetadata; -import org.apache.pulsar.common.schema.BytesSchemaVersion; +import org.apache.pulsar.common.protocol.schema.BytesSchemaVersion; import org.apache.pulsar.common.schema.SchemaInfo; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/pulsar-client/src/main/java/org/apache/pulsar/client/impl/ClientCnx.java b/pulsar-client/src/main/java/org/apache/pulsar/client/impl/ClientCnx.java index 09dbcc9ebc482..8943ed5752d27 100644 --- a/pulsar-client/src/main/java/org/apache/pulsar/client/impl/ClientCnx.java +++ b/pulsar-client/src/main/java/org/apache/pulsar/client/impl/ClientCnx.java @@ -60,8 +60,8 @@ import org.apache.pulsar.client.impl.BinaryProtoLookupService.LookupDataResult; import org.apache.pulsar.client.impl.conf.ClientConfigurationData; import org.apache.pulsar.common.api.AuthData; -import org.apache.pulsar.common.api.Commands; -import org.apache.pulsar.common.api.PulsarHandler; +import org.apache.pulsar.common.protocol.Commands; +import org.apache.pulsar.common.protocol.PulsarHandler; import org.apache.pulsar.common.api.proto.PulsarApi.CommandActiveConsumerChange; import org.apache.pulsar.common.api.proto.PulsarApi.CommandAuthChallenge; import org.apache.pulsar.common.api.proto.PulsarApi.CommandCloseConsumer; @@ -82,7 +82,7 @@ import org.apache.pulsar.common.api.proto.PulsarApi.MessageIdData; import org.apache.pulsar.common.api.proto.PulsarApi.ServerError; import org.apache.pulsar.common.schema.SchemaInfo; -import org.apache.pulsar.common.schema.SchemaInfoUtil; +import org.apache.pulsar.common.protocol.schema.SchemaInfoUtil; import org.apache.pulsar.common.util.collections.ConcurrentLongHashMap; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/pulsar-client/src/main/java/org/apache/pulsar/client/impl/ConsumerImpl.java b/pulsar-client/src/main/java/org/apache/pulsar/client/impl/ConsumerImpl.java index 877f502e47269..5548356d62983 100644 --- a/pulsar-client/src/main/java/org/apache/pulsar/client/impl/ConsumerImpl.java +++ b/pulsar-client/src/main/java/org/apache/pulsar/client/impl/ConsumerImpl.java @@ -20,8 +20,8 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.scurrilous.circe.checksum.Crc32cIntChecksum.computeChecksum; -import static org.apache.pulsar.common.api.Commands.hasChecksum; -import static org.apache.pulsar.common.api.Commands.readChecksum; +import static org.apache.pulsar.common.protocol.Commands.hasChecksum; +import static org.apache.pulsar.common.protocol.Commands.readChecksum; import com.google.common.annotations.VisibleForTesting; import com.google.common.collect.Iterables; @@ -63,7 +63,7 @@ import org.apache.pulsar.client.api.SubscriptionInitialPosition; import org.apache.pulsar.client.api.SubscriptionType; import org.apache.pulsar.client.impl.conf.ConsumerConfigurationData; -import org.apache.pulsar.common.api.Commands; +import org.apache.pulsar.common.protocol.Commands; import org.apache.pulsar.common.api.EncryptionContext; import org.apache.pulsar.common.api.EncryptionContext.EncryptionKey; import org.apache.pulsar.common.api.proto.PulsarApi; diff --git a/pulsar-client/src/main/java/org/apache/pulsar/client/impl/HttpLookupService.java b/pulsar-client/src/main/java/org/apache/pulsar/client/impl/HttpLookupService.java index 8e26c879983c6..4fe030dd0647e 100644 --- a/pulsar-client/src/main/java/org/apache/pulsar/client/impl/HttpLookupService.java +++ b/pulsar-client/src/main/java/org/apache/pulsar/client/impl/HttpLookupService.java @@ -40,9 +40,9 @@ import org.apache.pulsar.common.naming.NamespaceName; import org.apache.pulsar.common.naming.TopicName; import org.apache.pulsar.common.partition.PartitionedTopicMetadata; -import org.apache.pulsar.common.schema.GetSchemaResponse; +import org.apache.pulsar.common.protocol.schema.GetSchemaResponse; import org.apache.pulsar.common.schema.SchemaInfo; -import org.apache.pulsar.common.schema.SchemaInfoUtil; +import org.apache.pulsar.common.protocol.schema.SchemaInfoUtil; import org.apache.pulsar.common.util.FutureUtil; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/pulsar-client/src/main/java/org/apache/pulsar/client/impl/MessageImpl.java b/pulsar-client/src/main/java/org/apache/pulsar/client/impl/MessageImpl.java index aae4e612ef658..7fc37ccbf2f49 100644 --- a/pulsar-client/src/main/java/org/apache/pulsar/client/impl/MessageImpl.java +++ b/pulsar-client/src/main/java/org/apache/pulsar/client/impl/MessageImpl.java @@ -42,7 +42,7 @@ import org.apache.pulsar.client.api.MessageId; import org.apache.pulsar.client.api.Schema; import org.apache.pulsar.client.impl.schema.KeyValueSchema; -import org.apache.pulsar.common.api.Commands; +import org.apache.pulsar.common.protocol.Commands; import org.apache.pulsar.common.api.EncryptionContext; import org.apache.pulsar.common.api.proto.PulsarApi; import org.apache.pulsar.common.api.proto.PulsarApi.KeyValue; diff --git a/pulsar-client/src/main/java/org/apache/pulsar/client/impl/PersistentAcknowledgmentsGroupingTracker.java b/pulsar-client/src/main/java/org/apache/pulsar/client/impl/PersistentAcknowledgmentsGroupingTracker.java index b40cce4eaea49..56ea2c98f1f57 100644 --- a/pulsar-client/src/main/java/org/apache/pulsar/client/impl/PersistentAcknowledgmentsGroupingTracker.java +++ b/pulsar-client/src/main/java/org/apache/pulsar/client/impl/PersistentAcknowledgmentsGroupingTracker.java @@ -35,7 +35,7 @@ import org.apache.commons.lang3.tuple.Pair; import org.apache.pulsar.client.api.MessageId; import org.apache.pulsar.client.impl.conf.ConsumerConfigurationData; -import org.apache.pulsar.common.api.Commands; +import org.apache.pulsar.common.protocol.Commands; import org.apache.pulsar.common.api.proto.PulsarApi.CommandAck.AckType; /** diff --git a/pulsar-client/src/main/java/org/apache/pulsar/client/impl/ProducerImpl.java b/pulsar-client/src/main/java/org/apache/pulsar/client/impl/ProducerImpl.java index 7e7f8652616dc..ab6b5b6b00310 100644 --- a/pulsar-client/src/main/java/org/apache/pulsar/client/impl/ProducerImpl.java +++ b/pulsar-client/src/main/java/org/apache/pulsar/client/impl/ProducerImpl.java @@ -22,8 +22,8 @@ import static com.scurrilous.circe.checksum.Crc32cIntChecksum.computeChecksum; import static com.scurrilous.circe.checksum.Crc32cIntChecksum.resumeChecksum; import static java.lang.String.format; -import static org.apache.pulsar.common.api.Commands.hasChecksum; -import static org.apache.pulsar.common.api.Commands.readChecksum; +import static org.apache.pulsar.common.protocol.Commands.hasChecksum; +import static org.apache.pulsar.common.protocol.Commands.readChecksum; import com.google.common.collect.Queues; @@ -58,9 +58,9 @@ import org.apache.pulsar.client.api.Schema; import org.apache.pulsar.client.impl.conf.ProducerConfigurationData; import org.apache.pulsar.client.impl.schema.JSONSchema; -import org.apache.pulsar.common.api.ByteBufPair; -import org.apache.pulsar.common.api.Commands; -import org.apache.pulsar.common.api.Commands.ChecksumType; +import org.apache.pulsar.common.protocol.ByteBufPair; +import org.apache.pulsar.common.protocol.Commands; +import org.apache.pulsar.common.protocol.Commands.ChecksumType; import org.apache.pulsar.common.api.proto.PulsarApi.MessageMetadata; import org.apache.pulsar.common.api.proto.PulsarApi.ProtocolVersion; import org.apache.pulsar.common.compression.CompressionCodec; diff --git a/pulsar-client/src/main/java/org/apache/pulsar/client/impl/PulsarChannelInitializer.java b/pulsar-client/src/main/java/org/apache/pulsar/client/impl/PulsarChannelInitializer.java index af7d23c4145cf..a9322530637a8 100644 --- a/pulsar-client/src/main/java/org/apache/pulsar/client/impl/PulsarChannelInitializer.java +++ b/pulsar-client/src/main/java/org/apache/pulsar/client/impl/PulsarChannelInitializer.java @@ -30,8 +30,8 @@ import org.apache.pulsar.client.api.AuthenticationDataProvider; import org.apache.pulsar.client.impl.conf.ClientConfigurationData; import org.apache.pulsar.client.util.ObjectCache; -import org.apache.pulsar.common.api.ByteBufPair; -import org.apache.pulsar.common.api.Commands; +import org.apache.pulsar.common.protocol.ByteBufPair; +import org.apache.pulsar.common.protocol.Commands; import org.apache.pulsar.common.util.SecurityUtility; public class PulsarChannelInitializer extends ChannelInitializer { diff --git a/pulsar-client/src/main/java/org/apache/pulsar/client/impl/schema/SchemaUtils.java b/pulsar-client/src/main/java/org/apache/pulsar/client/impl/schema/SchemaUtils.java index 7ffdd18e1f1e4..3ba36b1945bb7 100644 --- a/pulsar-client/src/main/java/org/apache/pulsar/client/impl/schema/SchemaUtils.java +++ b/pulsar-client/src/main/java/org/apache/pulsar/client/impl/schema/SchemaUtils.java @@ -27,7 +27,6 @@ import java.util.List; import java.util.Map; import org.apache.pulsar.common.schema.SchemaType; -import org.apache.pulsar.common.schema.SchemaVersion; /** * Utils for schemas. diff --git a/pulsar-client/src/test/java/org/apache/pulsar/client/impl/ClientCnxTest.java b/pulsar-client/src/test/java/org/apache/pulsar/client/impl/ClientCnxTest.java index 0584b78870bd2..c969374900916 100644 --- a/pulsar-client/src/test/java/org/apache/pulsar/client/impl/ClientCnxTest.java +++ b/pulsar-client/src/test/java/org/apache/pulsar/client/impl/ClientCnxTest.java @@ -27,7 +27,7 @@ import org.apache.pulsar.client.api.PulsarClientException; import org.apache.pulsar.client.impl.conf.ClientConfigurationData; -import org.apache.pulsar.common.api.PulsarHandler; +import org.apache.pulsar.common.protocol.PulsarHandler; import org.apache.pulsar.common.util.netty.EventLoopUtil; import org.testng.annotations.Test; diff --git a/pulsar-common/src/main/java/org/apache/pulsar/common/api/raw/MessageParser.java b/pulsar-common/src/main/java/org/apache/pulsar/common/api/raw/MessageParser.java index 1939d4b68cc20..2f9c1692929f3 100644 --- a/pulsar-common/src/main/java/org/apache/pulsar/common/api/raw/MessageParser.java +++ b/pulsar-common/src/main/java/org/apache/pulsar/common/api/raw/MessageParser.java @@ -19,8 +19,8 @@ package org.apache.pulsar.common.api.raw; import static com.scurrilous.circe.checksum.Crc32cIntChecksum.computeChecksum; -import static org.apache.pulsar.common.api.Commands.hasChecksum; -import static org.apache.pulsar.common.api.Commands.readChecksum; +import static org.apache.pulsar.common.protocol.Commands.hasChecksum; +import static org.apache.pulsar.common.protocol.Commands.readChecksum; import io.netty.buffer.ByteBuf; import io.netty.util.ReferenceCountUtil; @@ -30,8 +30,7 @@ import lombok.experimental.UtilityClass; import lombok.extern.slf4j.Slf4j; -import org.apache.pulsar.common.api.Commands; -import org.apache.pulsar.common.api.PulsarDecoder; +import org.apache.pulsar.common.protocol.Commands; import org.apache.pulsar.common.api.proto.PulsarApi; import org.apache.pulsar.common.api.proto.PulsarApi.MessageMetadata; import org.apache.pulsar.common.compression.CompressionCodec; diff --git a/pulsar-common/src/main/java/org/apache/pulsar/common/api/ByteBufPair.java b/pulsar-common/src/main/java/org/apache/pulsar/common/protocol/ByteBufPair.java similarity index 99% rename from pulsar-common/src/main/java/org/apache/pulsar/common/api/ByteBufPair.java rename to pulsar-common/src/main/java/org/apache/pulsar/common/protocol/ByteBufPair.java index b99270b1c1bb6..1953482401624 100644 --- a/pulsar-common/src/main/java/org/apache/pulsar/common/api/ByteBufPair.java +++ b/pulsar-common/src/main/java/org/apache/pulsar/common/protocol/ByteBufPair.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.pulsar.common.api; +package org.apache.pulsar.common.protocol; import com.google.common.annotations.VisibleForTesting; diff --git a/pulsar-common/src/main/java/org/apache/pulsar/common/api/CommandUtils.java b/pulsar-common/src/main/java/org/apache/pulsar/common/protocol/CommandUtils.java similarity index 98% rename from pulsar-common/src/main/java/org/apache/pulsar/common/api/CommandUtils.java rename to pulsar-common/src/main/java/org/apache/pulsar/common/protocol/CommandUtils.java index 5abe1f8232a92..609ff723e26e9 100644 --- a/pulsar-common/src/main/java/org/apache/pulsar/common/api/CommandUtils.java +++ b/pulsar-common/src/main/java/org/apache/pulsar/common/protocol/CommandUtils.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.pulsar.common.api; +package org.apache.pulsar.common.protocol; import org.apache.pulsar.common.api.proto.PulsarApi; diff --git a/pulsar-common/src/main/java/org/apache/pulsar/common/api/Commands.java b/pulsar-common/src/main/java/org/apache/pulsar/common/protocol/Commands.java similarity index 99% rename from pulsar-common/src/main/java/org/apache/pulsar/common/api/Commands.java rename to pulsar-common/src/main/java/org/apache/pulsar/common/protocol/Commands.java index f5f0998c9a3cc..1de08cf7d8d29 100644 --- a/pulsar-common/src/main/java/org/apache/pulsar/common/api/Commands.java +++ b/pulsar-common/src/main/java/org/apache/pulsar/common/protocol/Commands.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.pulsar.common.api; +package org.apache.pulsar.common.protocol; import static com.scurrilous.circe.checksum.Crc32cIntChecksum.computeChecksum; import static com.scurrilous.circe.checksum.Crc32cIntChecksum.resumeChecksum; @@ -41,6 +41,7 @@ import org.apache.commons.lang3.tuple.Pair; import org.apache.pulsar.common.allocator.PulsarByteBufAllocator; +import org.apache.pulsar.common.api.AuthData; import org.apache.pulsar.common.api.proto.PulsarApi; import org.apache.pulsar.common.api.proto.PulsarApi.AuthMethod; import org.apache.pulsar.common.api.proto.PulsarApi.BaseCommand; @@ -90,7 +91,7 @@ import org.apache.pulsar.common.api.proto.PulsarApi.ServerError; import org.apache.pulsar.common.schema.SchemaInfo; import org.apache.pulsar.common.schema.SchemaType; -import org.apache.pulsar.common.schema.SchemaVersion; +import org.apache.pulsar.common.protocol.schema.SchemaVersion; import org.apache.pulsar.common.util.protobuf.ByteBufCodedInputStream; import org.apache.pulsar.common.util.protobuf.ByteBufCodedOutputStream; import org.apache.pulsar.shaded.com.google.protobuf.v241.ByteString; diff --git a/pulsar-common/src/main/java/org/apache/pulsar/common/api/Markers.java b/pulsar-common/src/main/java/org/apache/pulsar/common/protocol/Markers.java similarity index 98% rename from pulsar-common/src/main/java/org/apache/pulsar/common/api/Markers.java rename to pulsar-common/src/main/java/org/apache/pulsar/common/protocol/Markers.java index a042ea0931be7..48843489a8fe9 100644 --- a/pulsar-common/src/main/java/org/apache/pulsar/common/api/Markers.java +++ b/pulsar-common/src/main/java/org/apache/pulsar/common/protocol/Markers.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.pulsar.common.api; +package org.apache.pulsar.common.protocol; import io.netty.buffer.ByteBuf; import io.netty.buffer.PooledByteBufAllocator; @@ -28,7 +28,7 @@ import lombok.SneakyThrows; import lombok.experimental.UtilityClass; -import org.apache.pulsar.common.api.Commands.ChecksumType; +import org.apache.pulsar.common.protocol.Commands.ChecksumType; import org.apache.pulsar.common.api.proto.PulsarApi.MessageMetadata; import org.apache.pulsar.common.api.proto.PulsarMarkers.ClusterMessageId; import org.apache.pulsar.common.api.proto.PulsarMarkers.MarkerType; diff --git a/pulsar-common/src/main/java/org/apache/pulsar/common/api/PulsarDecoder.java b/pulsar-common/src/main/java/org/apache/pulsar/common/protocol/PulsarDecoder.java similarity index 99% rename from pulsar-common/src/main/java/org/apache/pulsar/common/api/PulsarDecoder.java rename to pulsar-common/src/main/java/org/apache/pulsar/common/protocol/PulsarDecoder.java index 38ff90f95938f..9e45c67d4f0b7 100644 --- a/pulsar-common/src/main/java/org/apache/pulsar/common/api/PulsarDecoder.java +++ b/pulsar-common/src/main/java/org/apache/pulsar/common/protocol/PulsarDecoder.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.pulsar.common.api; +package org.apache.pulsar.common.protocol; import static com.google.common.base.Preconditions.checkArgument; diff --git a/pulsar-common/src/main/java/org/apache/pulsar/common/api/PulsarHandler.java b/pulsar-common/src/main/java/org/apache/pulsar/common/protocol/PulsarHandler.java similarity index 99% rename from pulsar-common/src/main/java/org/apache/pulsar/common/api/PulsarHandler.java rename to pulsar-common/src/main/java/org/apache/pulsar/common/protocol/PulsarHandler.java index 1094359b8e70e..c83bc72b8c439 100644 --- a/pulsar-common/src/main/java/org/apache/pulsar/common/api/PulsarHandler.java +++ b/pulsar-common/src/main/java/org/apache/pulsar/common/protocol/PulsarHandler.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.pulsar.common.api; +package org.apache.pulsar.common.protocol; import java.net.SocketAddress; import java.util.concurrent.TimeUnit; diff --git a/pulsar-common/src/main/java/org/apache/pulsar/common/schema/BytesSchemaVersion.java b/pulsar-common/src/main/java/org/apache/pulsar/common/protocol/schema/BytesSchemaVersion.java similarity index 96% rename from pulsar-common/src/main/java/org/apache/pulsar/common/schema/BytesSchemaVersion.java rename to pulsar-common/src/main/java/org/apache/pulsar/common/protocol/schema/BytesSchemaVersion.java index 13e875f198d27..5ceacbd446055 100644 --- a/pulsar-common/src/main/java/org/apache/pulsar/common/schema/BytesSchemaVersion.java +++ b/pulsar-common/src/main/java/org/apache/pulsar/common/protocol/schema/BytesSchemaVersion.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.pulsar.common.schema; +package org.apache.pulsar.common.protocol.schema; /** * Bytes schema version diff --git a/pulsar-common/src/main/java/org/apache/pulsar/common/schema/DeleteSchemaResponse.java b/pulsar-common/src/main/java/org/apache/pulsar/common/protocol/schema/DeleteSchemaResponse.java similarity index 95% rename from pulsar-common/src/main/java/org/apache/pulsar/common/schema/DeleteSchemaResponse.java rename to pulsar-common/src/main/java/org/apache/pulsar/common/protocol/schema/DeleteSchemaResponse.java index 56e5f8233200c..d663fb7534cad 100644 --- a/pulsar-common/src/main/java/org/apache/pulsar/common/schema/DeleteSchemaResponse.java +++ b/pulsar-common/src/main/java/org/apache/pulsar/common/protocol/schema/DeleteSchemaResponse.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.pulsar.common.schema; +package org.apache.pulsar.common.protocol.schema; import lombok.AllArgsConstructor; import lombok.Builder; diff --git a/pulsar-common/src/main/java/org/apache/pulsar/common/schema/EmptyVersion.java b/pulsar-common/src/main/java/org/apache/pulsar/common/protocol/schema/EmptyVersion.java similarity index 95% rename from pulsar-common/src/main/java/org/apache/pulsar/common/schema/EmptyVersion.java rename to pulsar-common/src/main/java/org/apache/pulsar/common/protocol/schema/EmptyVersion.java index d2febd0566598..6696d4c28295d 100644 --- a/pulsar-common/src/main/java/org/apache/pulsar/common/schema/EmptyVersion.java +++ b/pulsar-common/src/main/java/org/apache/pulsar/common/protocol/schema/EmptyVersion.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.pulsar.common.schema; +package org.apache.pulsar.common.protocol.schema; public final class EmptyVersion implements SchemaVersion { private static final byte[] EMPTY = new byte[]{}; diff --git a/pulsar-common/src/main/java/org/apache/pulsar/common/schema/GetSchemaResponse.java b/pulsar-common/src/main/java/org/apache/pulsar/common/protocol/schema/GetSchemaResponse.java similarity index 92% rename from pulsar-common/src/main/java/org/apache/pulsar/common/schema/GetSchemaResponse.java rename to pulsar-common/src/main/java/org/apache/pulsar/common/protocol/schema/GetSchemaResponse.java index 4f3df27a452c9..9f1bdb7350ed5 100644 --- a/pulsar-common/src/main/java/org/apache/pulsar/common/schema/GetSchemaResponse.java +++ b/pulsar-common/src/main/java/org/apache/pulsar/common/protocol/schema/GetSchemaResponse.java @@ -16,13 +16,14 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.pulsar.common.schema; +package org.apache.pulsar.common.protocol.schema; import java.util.Map; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; +import org.apache.pulsar.common.schema.SchemaType; @Data @Builder diff --git a/pulsar-common/src/main/java/org/apache/pulsar/common/schema/LatestVersion.java b/pulsar-common/src/main/java/org/apache/pulsar/common/protocol/schema/LatestVersion.java similarity index 95% rename from pulsar-common/src/main/java/org/apache/pulsar/common/schema/LatestVersion.java rename to pulsar-common/src/main/java/org/apache/pulsar/common/protocol/schema/LatestVersion.java index 25bf05435369d..781b57f6c7501 100644 --- a/pulsar-common/src/main/java/org/apache/pulsar/common/schema/LatestVersion.java +++ b/pulsar-common/src/main/java/org/apache/pulsar/common/protocol/schema/LatestVersion.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.pulsar.common.schema; +package org.apache.pulsar.common.protocol.schema; public final class LatestVersion implements SchemaVersion { private static final byte[] EMPTY = new byte[]{}; diff --git a/pulsar-common/src/main/java/org/apache/pulsar/common/schema/PostSchemaPayload.java b/pulsar-common/src/main/java/org/apache/pulsar/common/protocol/schema/PostSchemaPayload.java similarity index 95% rename from pulsar-common/src/main/java/org/apache/pulsar/common/schema/PostSchemaPayload.java rename to pulsar-common/src/main/java/org/apache/pulsar/common/protocol/schema/PostSchemaPayload.java index a01caf54985bb..89668f0a4cf86 100644 --- a/pulsar-common/src/main/java/org/apache/pulsar/common/schema/PostSchemaPayload.java +++ b/pulsar-common/src/main/java/org/apache/pulsar/common/protocol/schema/PostSchemaPayload.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.pulsar.common.schema; +package org.apache.pulsar.common.protocol.schema; import java.util.Map; import lombok.AllArgsConstructor; diff --git a/pulsar-common/src/main/java/org/apache/pulsar/common/schema/PostSchemaResponse.java b/pulsar-common/src/main/java/org/apache/pulsar/common/protocol/schema/PostSchemaResponse.java similarity index 95% rename from pulsar-common/src/main/java/org/apache/pulsar/common/schema/PostSchemaResponse.java rename to pulsar-common/src/main/java/org/apache/pulsar/common/protocol/schema/PostSchemaResponse.java index 93c29325e5dd9..d9ae768b63f5d 100644 --- a/pulsar-common/src/main/java/org/apache/pulsar/common/schema/PostSchemaResponse.java +++ b/pulsar-common/src/main/java/org/apache/pulsar/common/protocol/schema/PostSchemaResponse.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.pulsar.common.schema; +package org.apache.pulsar.common.protocol.schema; import lombok.AllArgsConstructor; import lombok.Builder; diff --git a/pulsar-common/src/main/java/org/apache/pulsar/common/schema/SchemaData.java b/pulsar-common/src/main/java/org/apache/pulsar/common/protocol/schema/SchemaData.java similarity index 92% rename from pulsar-common/src/main/java/org/apache/pulsar/common/schema/SchemaData.java rename to pulsar-common/src/main/java/org/apache/pulsar/common/protocol/schema/SchemaData.java index d07f94f821ac7..e68603eacdb11 100644 --- a/pulsar-common/src/main/java/org/apache/pulsar/common/schema/SchemaData.java +++ b/pulsar-common/src/main/java/org/apache/pulsar/common/protocol/schema/SchemaData.java @@ -16,13 +16,14 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.pulsar.common.schema; +package org.apache.pulsar.common.protocol.schema; import java.util.HashMap; import java.util.Map; import lombok.Builder; import lombok.Data; import lombok.ToString; +import org.apache.pulsar.common.schema.SchemaType; @Builder @Data diff --git a/pulsar-common/src/main/java/org/apache/pulsar/common/schema/SchemaInfoUtil.java b/pulsar-common/src/main/java/org/apache/pulsar/common/protocol/schema/SchemaInfoUtil.java similarity index 93% rename from pulsar-common/src/main/java/org/apache/pulsar/common/schema/SchemaInfoUtil.java rename to pulsar-common/src/main/java/org/apache/pulsar/common/protocol/schema/SchemaInfoUtil.java index 9d0e2b59b3916..d53b3111c3342 100644 --- a/pulsar-common/src/main/java/org/apache/pulsar/common/schema/SchemaInfoUtil.java +++ b/pulsar-common/src/main/java/org/apache/pulsar/common/protocol/schema/SchemaInfoUtil.java @@ -16,16 +16,17 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.pulsar.common.schema; +package org.apache.pulsar.common.protocol.schema; import java.util.Collections; import java.util.TreeMap; import lombok.experimental.UtilityClass; -import org.apache.pulsar.common.api.Commands; +import org.apache.pulsar.common.protocol.Commands; import org.apache.pulsar.common.api.proto.PulsarApi; import org.apache.pulsar.common.api.proto.PulsarApi.Schema; +import org.apache.pulsar.common.schema.SchemaInfo; @UtilityClass public class SchemaInfoUtil { diff --git a/pulsar-common/src/main/java/org/apache/pulsar/common/schema/SchemaVersion.java b/pulsar-common/src/main/java/org/apache/pulsar/common/protocol/schema/SchemaVersion.java similarity index 95% rename from pulsar-common/src/main/java/org/apache/pulsar/common/schema/SchemaVersion.java rename to pulsar-common/src/main/java/org/apache/pulsar/common/protocol/schema/SchemaVersion.java index e31e45d050e82..b77e3ecf34e40 100644 --- a/pulsar-common/src/main/java/org/apache/pulsar/common/schema/SchemaVersion.java +++ b/pulsar-common/src/main/java/org/apache/pulsar/common/protocol/schema/SchemaVersion.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.pulsar.common.schema; +package org.apache.pulsar.common.protocol.schema; public interface SchemaVersion { SchemaVersion Latest = new LatestVersion(); diff --git a/pulsar-common/src/test/java/org/apache/pulsar/common/compression/CommandsTest.java b/pulsar-common/src/test/java/org/apache/pulsar/common/compression/CommandsTest.java index 35d213a80cee0..9de87d3693536 100644 --- a/pulsar-common/src/test/java/org/apache/pulsar/common/compression/CommandsTest.java +++ b/pulsar-common/src/test/java/org/apache/pulsar/common/compression/CommandsTest.java @@ -29,9 +29,9 @@ import java.io.IOException; import org.apache.pulsar.common.allocator.PulsarByteBufAllocator; -import org.apache.pulsar.common.api.ByteBufPair; -import org.apache.pulsar.common.api.Commands; -import org.apache.pulsar.common.api.Commands.ChecksumType; +import org.apache.pulsar.common.protocol.ByteBufPair; +import org.apache.pulsar.common.protocol.Commands; +import org.apache.pulsar.common.protocol.Commands.ChecksumType; import org.apache.pulsar.common.api.proto.PulsarApi.MessageMetadata; import org.apache.pulsar.common.util.protobuf.ByteBufCodedOutputStream; import org.testng.annotations.Test; diff --git a/pulsar-common/src/test/java/org/apache/pulsar/common/api/ByteBufPairTest.java b/pulsar-common/src/test/java/org/apache/pulsar/common/protocol/ByteBufPairTest.java similarity index 98% rename from pulsar-common/src/test/java/org/apache/pulsar/common/api/ByteBufPairTest.java rename to pulsar-common/src/test/java/org/apache/pulsar/common/protocol/ByteBufPairTest.java index bc426a0fe30dc..548b7bee3eded 100644 --- a/pulsar-common/src/test/java/org/apache/pulsar/common/api/ByteBufPairTest.java +++ b/pulsar-common/src/test/java/org/apache/pulsar/common/protocol/ByteBufPairTest.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.pulsar.common.api; +package org.apache.pulsar.common.protocol; import static org.mockito.Matchers.any; import static org.mockito.Mockito.mock; diff --git a/pulsar-common/src/test/java/org/apache/pulsar/common/api/CommandUtilsTests.java b/pulsar-common/src/test/java/org/apache/pulsar/common/protocol/CommandUtilsTests.java similarity index 99% rename from pulsar-common/src/test/java/org/apache/pulsar/common/api/CommandUtilsTests.java rename to pulsar-common/src/test/java/org/apache/pulsar/common/protocol/CommandUtilsTests.java index ceaeb03e67281..44facf17ab7ba 100644 --- a/pulsar-common/src/test/java/org/apache/pulsar/common/api/CommandUtilsTests.java +++ b/pulsar-common/src/test/java/org/apache/pulsar/common/protocol/CommandUtilsTests.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.pulsar.common.api; +package org.apache.pulsar.common.protocol; import org.apache.pulsar.common.api.proto.PulsarApi; import org.testng.Assert; diff --git a/pulsar-common/src/test/java/org/apache/pulsar/common/api/MarkersTest.java b/pulsar-common/src/test/java/org/apache/pulsar/common/protocol/MarkersTest.java similarity index 99% rename from pulsar-common/src/test/java/org/apache/pulsar/common/api/MarkersTest.java rename to pulsar-common/src/test/java/org/apache/pulsar/common/protocol/MarkersTest.java index 12a8a74f9ffbf..da0bb36740a5e 100644 --- a/pulsar-common/src/test/java/org/apache/pulsar/common/api/MarkersTest.java +++ b/pulsar-common/src/test/java/org/apache/pulsar/common/protocol/MarkersTest.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.pulsar.common.api; +package org.apache.pulsar.common.protocol; import static org.testng.Assert.assertEquals; diff --git a/pulsar-common/src/test/java/org/apache/pulsar/common/api/PulsarDecoderTest.java b/pulsar-common/src/test/java/org/apache/pulsar/common/protocol/PulsarDecoderTest.java similarity index 97% rename from pulsar-common/src/test/java/org/apache/pulsar/common/api/PulsarDecoderTest.java rename to pulsar-common/src/test/java/org/apache/pulsar/common/protocol/PulsarDecoderTest.java index c57a8c873e9a6..7f41e498f61d8 100644 --- a/pulsar-common/src/test/java/org/apache/pulsar/common/api/PulsarDecoderTest.java +++ b/pulsar-common/src/test/java/org/apache/pulsar/common/protocol/PulsarDecoderTest.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.pulsar.common.api; +package org.apache.pulsar.common.protocol; import static org.mockito.Matchers.any; import static org.mockito.Mockito.CALLS_REAL_METHODS; diff --git a/pulsar-discovery-service/src/main/java/org/apache/pulsar/discovery/service/ServerConnection.java b/pulsar-discovery-service/src/main/java/org/apache/pulsar/discovery/service/ServerConnection.java index b89a0285b9c86..c109440661670 100644 --- a/pulsar-discovery-service/src/main/java/org/apache/pulsar/discovery/service/ServerConnection.java +++ b/pulsar-discovery-service/src/main/java/org/apache/pulsar/discovery/service/ServerConnection.java @@ -29,14 +29,13 @@ import org.apache.pulsar.broker.PulsarServerException; import org.apache.pulsar.broker.authentication.AuthenticationDataCommand; import org.apache.pulsar.broker.authentication.AuthenticationDataSource; -import org.apache.pulsar.common.api.Commands; -import org.apache.pulsar.common.api.PulsarHandler; +import org.apache.pulsar.common.protocol.Commands; +import org.apache.pulsar.common.protocol.PulsarHandler; import org.apache.pulsar.common.api.proto.PulsarApi.CommandConnect; import org.apache.pulsar.common.api.proto.PulsarApi.CommandLookupTopic; import org.apache.pulsar.common.api.proto.PulsarApi.CommandPartitionedTopicMetadata; import org.apache.pulsar.common.api.proto.PulsarApi.ServerError; import org.apache.pulsar.common.naming.TopicName; -import org.apache.pulsar.discovery.service.server.ServiceConfig; import org.apache.pulsar.policies.data.loadbalancer.LoadManagerReport; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/pulsar-discovery-service/src/main/java/org/apache/pulsar/discovery/service/ServiceChannelInitializer.java b/pulsar-discovery-service/src/main/java/org/apache/pulsar/discovery/service/ServiceChannelInitializer.java index 50d698d076612..6052f2b7b1ea9 100644 --- a/pulsar-discovery-service/src/main/java/org/apache/pulsar/discovery/service/ServiceChannelInitializer.java +++ b/pulsar-discovery-service/src/main/java/org/apache/pulsar/discovery/service/ServiceChannelInitializer.java @@ -18,7 +18,7 @@ */ package org.apache.pulsar.discovery.service; -import org.apache.pulsar.common.api.Commands; +import org.apache.pulsar.common.protocol.Commands; import org.apache.pulsar.common.util.NettySslContextBuilder; import org.apache.pulsar.discovery.service.server.ServiceConfig; diff --git a/pulsar-discovery-service/src/test/java/org/apache/pulsar/discovery/service/DiscoveryServiceTest.java b/pulsar-discovery-service/src/test/java/org/apache/pulsar/discovery/service/DiscoveryServiceTest.java index 1e3f031833c67..576c2b89e3545 100644 --- a/pulsar-discovery-service/src/test/java/org/apache/pulsar/discovery/service/DiscoveryServiceTest.java +++ b/pulsar-discovery-service/src/test/java/org/apache/pulsar/discovery/service/DiscoveryServiceTest.java @@ -34,7 +34,7 @@ import java.util.concurrent.TimeUnit; import org.apache.bookkeeper.util.ZkUtils; -import org.apache.pulsar.common.api.Commands; +import org.apache.pulsar.common.protocol.Commands; import org.apache.pulsar.common.api.proto.PulsarApi.BaseCommand; import org.apache.pulsar.common.naming.TopicName; import org.apache.pulsar.common.partition.PartitionedTopicMetadata; diff --git a/pulsar-proxy/src/main/java/org/apache/pulsar/proxy/server/DirectProxyHandler.java b/pulsar-proxy/src/main/java/org/apache/pulsar/proxy/server/DirectProxyHandler.java index 62768194d9b67..c2d9ecaaec449 100644 --- a/pulsar-proxy/src/main/java/org/apache/pulsar/proxy/server/DirectProxyHandler.java +++ b/pulsar-proxy/src/main/java/org/apache/pulsar/proxy/server/DirectProxyHandler.java @@ -51,8 +51,8 @@ import org.apache.pulsar.client.api.AuthenticationDataProvider; import org.apache.pulsar.common.allocator.PulsarByteBufAllocator; import org.apache.pulsar.common.api.AuthData; -import org.apache.pulsar.common.api.Commands; -import org.apache.pulsar.common.api.PulsarDecoder; +import org.apache.pulsar.common.protocol.Commands; +import org.apache.pulsar.common.protocol.PulsarDecoder; import org.apache.pulsar.common.api.proto.PulsarApi.CommandAuthChallenge; import org.apache.pulsar.common.api.proto.PulsarApi.CommandConnected; import org.slf4j.Logger; diff --git a/pulsar-proxy/src/main/java/org/apache/pulsar/proxy/server/LookupProxyHandler.java b/pulsar-proxy/src/main/java/org/apache/pulsar/proxy/server/LookupProxyHandler.java index 548c52269d73a..469e16890f5de 100644 --- a/pulsar-proxy/src/main/java/org/apache/pulsar/proxy/server/LookupProxyHandler.java +++ b/pulsar-proxy/src/main/java/org/apache/pulsar/proxy/server/LookupProxyHandler.java @@ -27,7 +27,7 @@ import java.util.Optional; import org.apache.commons.lang3.StringUtils; -import org.apache.pulsar.common.api.Commands; +import org.apache.pulsar.common.protocol.Commands; import org.apache.pulsar.common.api.proto.PulsarApi.CommandGetTopicsOfNamespace; import org.apache.pulsar.common.api.proto.PulsarApi.CommandGetSchema; import org.apache.pulsar.common.api.proto.PulsarApi.CommandLookupTopic; @@ -35,7 +35,7 @@ import org.apache.pulsar.common.api.proto.PulsarApi.CommandPartitionedTopicMetadata; import org.apache.pulsar.common.api.proto.PulsarApi.ServerError; import org.apache.pulsar.common.naming.TopicName; -import org.apache.pulsar.common.schema.BytesSchemaVersion; +import org.apache.pulsar.common.protocol.schema.BytesSchemaVersion; import org.apache.pulsar.common.schema.SchemaInfo; import org.apache.pulsar.policies.data.loadbalancer.ServiceLookupData; import org.slf4j.Logger; diff --git a/pulsar-proxy/src/main/java/org/apache/pulsar/proxy/server/ProxyClientCnx.java b/pulsar-proxy/src/main/java/org/apache/pulsar/proxy/server/ProxyClientCnx.java index 624391ec3724a..0878370a29557 100644 --- a/pulsar-proxy/src/main/java/org/apache/pulsar/proxy/server/ProxyClientCnx.java +++ b/pulsar-proxy/src/main/java/org/apache/pulsar/proxy/server/ProxyClientCnx.java @@ -25,7 +25,7 @@ import org.apache.pulsar.client.impl.ClientCnx; import org.apache.pulsar.client.impl.conf.ClientConfigurationData; import org.apache.pulsar.common.api.AuthData; -import org.apache.pulsar.common.api.Commands; +import org.apache.pulsar.common.protocol.Commands; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/pulsar-proxy/src/main/java/org/apache/pulsar/proxy/server/ProxyConnection.java b/pulsar-proxy/src/main/java/org/apache/pulsar/proxy/server/ProxyConnection.java index 18e4e5d750822..d9960c5a1ec31 100644 --- a/pulsar-proxy/src/main/java/org/apache/pulsar/proxy/server/ProxyConnection.java +++ b/pulsar-proxy/src/main/java/org/apache/pulsar/proxy/server/ProxyConnection.java @@ -26,7 +26,6 @@ import javax.naming.AuthenticationException; import javax.net.ssl.SSLSession; -import org.apache.pulsar.broker.authentication.AuthenticationDataCommand; import org.apache.pulsar.broker.authentication.AuthenticationDataSource; import org.apache.pulsar.broker.authentication.AuthenticationProvider; import org.apache.pulsar.broker.authentication.AuthenticationState; @@ -40,8 +39,8 @@ import org.apache.pulsar.client.impl.PulsarClientImpl; import org.apache.pulsar.client.impl.conf.ClientConfigurationData; import org.apache.pulsar.common.api.AuthData; -import org.apache.pulsar.common.api.Commands; -import org.apache.pulsar.common.api.PulsarHandler; +import org.apache.pulsar.common.protocol.Commands; +import org.apache.pulsar.common.protocol.PulsarHandler; import org.apache.pulsar.common.api.proto.PulsarApi; import org.apache.pulsar.common.api.proto.PulsarApi.CommandAuthResponse; import org.apache.pulsar.common.api.proto.PulsarApi.CommandConnect; diff --git a/pulsar-proxy/src/main/java/org/apache/pulsar/proxy/server/ServiceChannelInitializer.java b/pulsar-proxy/src/main/java/org/apache/pulsar/proxy/server/ServiceChannelInitializer.java index 9be109c2027b1..156492a039678 100644 --- a/pulsar-proxy/src/main/java/org/apache/pulsar/proxy/server/ServiceChannelInitializer.java +++ b/pulsar-proxy/src/main/java/org/apache/pulsar/proxy/server/ServiceChannelInitializer.java @@ -22,7 +22,7 @@ import org.apache.pulsar.client.api.AuthenticationDataProvider; import org.apache.pulsar.client.api.AuthenticationFactory; -import org.apache.pulsar.common.api.Commands; +import org.apache.pulsar.common.protocol.Commands; import org.apache.pulsar.common.util.ClientSslContextRefresher; import org.apache.pulsar.common.util.NettySslContextBuilder; diff --git a/pulsar-sql/presto-pulsar/src/main/java/org/apache/pulsar/sql/presto/PulsarConnectorConfig.java b/pulsar-sql/presto-pulsar/src/main/java/org/apache/pulsar/sql/presto/PulsarConnectorConfig.java index d36c90dbc56fd..a6b625fd92e39 100644 --- a/pulsar-sql/presto-pulsar/src/main/java/org/apache/pulsar/sql/presto/PulsarConnectorConfig.java +++ b/pulsar-sql/presto-pulsar/src/main/java/org/apache/pulsar/sql/presto/PulsarConnectorConfig.java @@ -23,7 +23,7 @@ import org.apache.pulsar.client.admin.PulsarAdmin; import org.apache.pulsar.client.api.PulsarClientException; import org.apache.bookkeeper.stats.NullStatsProvider; -import org.apache.pulsar.common.api.Commands; +import org.apache.pulsar.common.protocol.Commands; import javax.validation.constraints.NotNull; import java.io.IOException; diff --git a/pulsar-sql/presto-pulsar/src/test/java/org/apache/pulsar/sql/presto/TestPulsarConnector.java b/pulsar-sql/presto-pulsar/src/test/java/org/apache/pulsar/sql/presto/TestPulsarConnector.java index cedde2078303a..1a5e87a598804 100644 --- a/pulsar-sql/presto-pulsar/src/test/java/org/apache/pulsar/sql/presto/TestPulsarConnector.java +++ b/pulsar-sql/presto-pulsar/src/test/java/org/apache/pulsar/sql/presto/TestPulsarConnector.java @@ -48,7 +48,7 @@ import org.apache.pulsar.client.api.schema.SchemaDefinition; import org.apache.pulsar.client.impl.schema.AvroSchema; import org.apache.pulsar.client.impl.schema.JSONSchema; -import org.apache.pulsar.common.api.Commands; +import org.apache.pulsar.common.protocol.Commands; import org.apache.pulsar.common.api.proto.PulsarApi; import org.apache.pulsar.common.naming.NamespaceName; import org.apache.pulsar.common.naming.TopicName; @@ -81,7 +81,7 @@ import static com.facebook.presto.spi.type.DateType.DATE; import static com.facebook.presto.spi.type.TimeType.TIME; import static com.facebook.presto.spi.type.TimestampType.TIMESTAMP; -import static org.apache.pulsar.common.api.Commands.serializeMetadataAndPayload; +import static org.apache.pulsar.common.protocol.Commands.serializeMetadataAndPayload; import static org.mockito.Matchers.any; import static org.mockito.Matchers.anyInt; import static org.mockito.Matchers.anyString;