diff --git a/distribution/server/src/assemble/LICENSE.bin.txt b/distribution/server/src/assemble/LICENSE.bin.txt
index 34722a8fc1159..cf0a4e27d98d5 100644
--- a/distribution/server/src/assemble/LICENSE.bin.txt
+++ b/distribution/server/src/assemble/LICENSE.bin.txt
@@ -442,6 +442,7 @@ The Apache Software License, Version 2.0
- net.jodah-typetools-0.5.0.jar
* Apache Avro
- org.apache.avro-avro-1.8.2.jar
+ - org.apache.avro-avro-protobuf-1.8.2.jar
* Apache Curator
- org.apache.curator-curator-client-4.0.1.jar
- org.apache.curator-curator-framework-4.0.1.jar
diff --git a/examples/flink-consumer-source/pom.xml b/examples/flink-consumer-source/pom.xml
index 3f407d58f1a2a..3bf7b6c47a524 100644
--- a/examples/flink-consumer-source/pom.xml
+++ b/examples/flink-consumer-source/pom.xml
@@ -37,11 +37,6 @@
flink-streaming-java_${scala.binary.version}
${flink.version}
-
- org.apache.pulsar
- pulsar-client-schema
- ${project.version}
-
org.apache.pulsar
pulsar-flink
diff --git a/managed-ledger-shaded/pom.xml b/managed-ledger-shaded/pom.xml
index 43f6329900930..15355287553ce 100644
--- a/managed-ledger-shaded/pom.xml
+++ b/managed-ledger-shaded/pom.xml
@@ -57,7 +57,6 @@
- org.apache.pulsar:pulsar-functions-proto
org.apache.pulsar:pulsar-client-original
org.apache.pulsar:pulsar-client-admin-original
org.apache.pulsar:managed-ledger-original
@@ -130,6 +129,9 @@
com.google
org.apache.pulsar.shade.com.google
+
+ com.google.protobuf.*
+
com.fasterxml.jackson
diff --git a/pom.xml b/pom.xml
index 7212cddef27c5..93da47bd8d83a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -81,9 +81,9 @@ flexible messaging model and an intuitive client API.
pulsar-broker-common
pulsar-broker
pulsar-broker-shaded
+ pulsar-client-api
pulsar-client
pulsar-client-shaded
- pulsar-client-schema
pulsar-client-admin
pulsar-client-admin-shaded
pulsar-client-tools
diff --git a/pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/AdminApiSchemaAutoUpdateTest.java b/pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/AdminApiSchemaAutoUpdateTest.java
index 5060c8867f71a..dc7a9ac8354d1 100644
--- a/pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/AdminApiSchemaAutoUpdateTest.java
+++ b/pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/AdminApiSchemaAutoUpdateTest.java
@@ -30,10 +30,8 @@
import org.apache.pulsar.broker.service.Topic;
import org.apache.pulsar.broker.service.schema.SchemaCompatibilityStrategy;
import org.apache.pulsar.client.api.Producer;
-import org.apache.pulsar.client.api.PulsarClient;
import org.apache.pulsar.client.api.PulsarClientException;
import org.apache.pulsar.client.api.Schema;
-import org.apache.pulsar.common.naming.TopicName;
import org.apache.pulsar.common.policies.data.ClusterData;
import org.apache.pulsar.common.policies.data.TenantInfo;
import org.apache.pulsar.common.policies.data.SchemaAutoUpdateCompatibilityStrategy;
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 ee9fb74c5ce7c..71ae98ec8c7b5 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,6 @@
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.DataProvider;
-import org.testng.annotations.Ignore;
import org.testng.annotations.Test;
/**
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 528ff64d7e806..28c6b907211d9 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
@@ -39,7 +39,6 @@
import java.util.concurrent.TimeUnit;
import org.apache.bookkeeper.mledger.AsyncCallbacks.DeleteCursorCallback;
-import org.apache.bookkeeper.mledger.AsyncCallbacks.ReadEntriesCallback;
import org.apache.bookkeeper.mledger.Entry;
import org.apache.bookkeeper.mledger.ManagedCursor;
import org.apache.bookkeeper.mledger.ManagedLedgerException;
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 9a8a53930fb7b..17b39b79677cc 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
@@ -25,15 +25,12 @@
import java.io.IOException;
import java.util.Collections;
-import java.util.Date;
import java.util.Map;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
-import org.apache.pulsar.client.api.Producer;
-import org.apache.pulsar.client.api.PulsarClient;
import org.apache.pulsar.client.api.Schema;
import org.apache.pulsar.client.api.SchemaSerializationException;
import org.apache.pulsar.client.impl.schema.JSONSchema;
diff --git a/pulsar-client-admin-shaded/pom.xml b/pulsar-client-admin-shaded/pom.xml
index 647e8ce31306f..a60239f66e580 100644
--- a/pulsar-client-admin-shaded/pom.xml
+++ b/pulsar-client-admin-shaded/pom.xml
@@ -57,7 +57,6 @@
- org.apache.pulsar:pulsar-functions-proto
org.apache.pulsar:pulsar-client-original
org.apache.pulsar:pulsar-client-admin-original
org.apache.commons:commons-lang3
@@ -118,6 +117,9 @@
com.google
org.apache.pulsar.shade.com.google
+
+ com.google.protobuf.*
+
com.fasterxml.jackson
diff --git a/pulsar-client-admin/pom.xml b/pulsar-client-admin/pom.xml
index b87962f67b820..e24f621e98ca2 100644
--- a/pulsar-client-admin/pom.xml
+++ b/pulsar-client-admin/pom.xml
@@ -40,12 +40,6 @@
${project.version}
-
- ${project.groupId}
- pulsar-functions-proto
- ${project.version}
-
-
org.glassfish.jersey.core
jersey-client
diff --git a/pulsar-client-admin/src/main/java/org/apache/pulsar/client/admin/Worker.java b/pulsar-client-admin/src/main/java/org/apache/pulsar/client/admin/Worker.java
index b21f326cff50b..ddeb1df576e7b 100644
--- a/pulsar-client-admin/src/main/java/org/apache/pulsar/client/admin/Worker.java
+++ b/pulsar-client-admin/src/main/java/org/apache/pulsar/client/admin/Worker.java
@@ -29,12 +29,12 @@
* Admin interface for worker stats management.
*/
public interface Worker {
-
-
+
+
/**
* Get all functions stats on a worker
* @return
- * @throws PulsarAdminException
+ * @throws PulsarAdminException
*/
List getFunctionsStats() throws PulsarAdminException;
diff --git a/pulsar-client-admin/src/main/java/org/apache/pulsar/client/admin/internal/FunctionsImpl.java b/pulsar-client-admin/src/main/java/org/apache/pulsar/client/admin/internal/FunctionsImpl.java
index 5f80593303e18..1493d1df805b5 100644
--- a/pulsar-client-admin/src/main/java/org/apache/pulsar/client/admin/internal/FunctionsImpl.java
+++ b/pulsar-client-admin/src/main/java/org/apache/pulsar/client/admin/internal/FunctionsImpl.java
@@ -20,8 +20,6 @@
import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
-import com.google.protobuf.AbstractMessage.Builder;
-import com.google.protobuf.util.JsonFormat;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.apache.pulsar.client.admin.Functions;
@@ -373,9 +371,4 @@ public FunctionState getFunctionState(String tenant, String namespace, String fu
throw getApiException(e);
}
}
-
-
- public static void mergeJson(String json, Builder builder) throws IOException {
- JsonFormat.parser().merge(json, builder);
- }
}
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 8e386dda3ad4a..216275d17bed0 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
@@ -40,9 +40,6 @@
import java.util.stream.Collectors;
import java.util.stream.Stream;
-import javax.ws.rs.ClientErrorException;
-import javax.ws.rs.ServerErrorException;
-import javax.ws.rs.WebApplicationException;
import javax.ws.rs.client.Entity;
import javax.ws.rs.client.InvocationCallback;
import javax.ws.rs.client.WebTarget;
@@ -77,8 +74,6 @@
import org.apache.pulsar.common.policies.data.PartitionedTopicStats;
import org.apache.pulsar.common.policies.data.PersistentTopicInternalStats;
import org.apache.pulsar.common.policies.data.TopicStats;
-import org.apache.pulsar.common.policies.data.PersistentTopicStats;
-import org.apache.pulsar.common.policies.data.BacklogQuota.BacklogQuotaType;
import org.apache.pulsar.common.util.Codec;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
diff --git a/pulsar-client-api/pom.xml b/pulsar-client-api/pom.xml
new file mode 100644
index 0000000000000..c9bf63c4edf64
--- /dev/null
+++ b/pulsar-client-api/pom.xml
@@ -0,0 +1,35 @@
+
+
+ 4.0.0
+
+
+ org.apache.pulsar
+ pulsar
+ 2.3.0-SNAPSHOT
+ ..
+
+
+ pulsar-client-api
+ Pulsar Client :: API
+
+
diff --git a/pulsar-client-schema/src/main/java/org/apache/pulsar/client/api/schema/Field.java b/pulsar-client-api/src/main/java/org/apache/pulsar/client/api/schema/Field.java
similarity index 99%
rename from pulsar-client-schema/src/main/java/org/apache/pulsar/client/api/schema/Field.java
rename to pulsar-client-api/src/main/java/org/apache/pulsar/client/api/schema/Field.java
index 653b5d6090707..39f1fa300ae74 100644
--- a/pulsar-client-schema/src/main/java/org/apache/pulsar/client/api/schema/Field.java
+++ b/pulsar-client-api/src/main/java/org/apache/pulsar/client/api/schema/Field.java
@@ -39,5 +39,5 @@ public class Field {
* The index of the field within the record.
*/
private final int index;
-
+
}
diff --git a/pulsar-client-schema/src/main/java/org/apache/pulsar/client/api/schema/GenericRecord.java b/pulsar-client-api/src/main/java/org/apache/pulsar/client/api/schema/GenericRecord.java
similarity index 100%
rename from pulsar-client-schema/src/main/java/org/apache/pulsar/client/api/schema/GenericRecord.java
rename to pulsar-client-api/src/main/java/org/apache/pulsar/client/api/schema/GenericRecord.java
diff --git a/pulsar-client-kafka-compat/pulsar-client-kafka-shaded/pom.xml b/pulsar-client-kafka-compat/pulsar-client-kafka-shaded/pom.xml
index a6b54f7f68474..b171c652eac4d 100644
--- a/pulsar-client-kafka-compat/pulsar-client-kafka-shaded/pom.xml
+++ b/pulsar-client-kafka-compat/pulsar-client-kafka-shaded/pom.xml
@@ -68,7 +68,6 @@
org.apache.kafka:kafka-clients
org.apache.pulsar:pulsar-client-kafka-original
org.apache.pulsar:pulsar-client-original
- org.apache.pulsar:pulsar-client-schema
org.apache.commons:commons-lang3
commons-codec:commons-codec
commons-collections:commons-collections
@@ -97,6 +96,15 @@
commons-*:*
org.yaml:snakeyaml
org.objenesis:*
+
+ org.apache.avro:*
+
+ org.codehaus.jackson:jackson-core-asl
+ org.codehaus.jackson:jackson-mapper-asl
+ com.thoughtworks.paranamer:paranamer
+ org.xerial.snappy:snappy-java
+ org.apache.commons:commons-compress
+ org.tukaani:xz
@@ -183,6 +191,43 @@
org.yaml
org.apache.pulsar.shade.org.yaml
+
+ org.apache.avro
+ org.apache.pulsar.shade.org.apache.avro
+
+ org.apache.avro.reflect.AvroAlias
+ org.apache.avro.reflect.AvroDefault
+ org.apache.avro.reflect.AvroEncode
+ org.apache.avro.reflect.AvroIgnore
+ org.apache.avro.reflect.AvroMeta
+ org.apache.avro.reflect.AvroName
+ org.apache.avro.reflect.AvroSchema
+ org.apache.avro.reflect.Nullable
+ org.apache.avro.reflect.Stringable
+ org.apache.avro.reflect.Union
+
+
+
+
+ org.codehaus.jackson
+ org.apache.pulsar.shade.org.codehaus.jackson
+
+
+ com.thoughtworks.paranamer
+ org.apache.pulsar.shade.com.thoughtworks.paranamer
+
+
+ org.xerial.snappy
+ org.apache.pulsar.shade.org.xerial.snappy
+
+
+ org.apache.commons
+ org.apache.pulsar.shade.org.apache.commons
+
+
+ org.tukaani
+ org.apache.pulsar.shade.org.tukaani
+
diff --git a/pulsar-client-kafka-compat/pulsar-client-kafka/src/main/java/org/apache/kafka/clients/producer/PulsarKafkaProducer.java b/pulsar-client-kafka-compat/pulsar-client-kafka/src/main/java/org/apache/kafka/clients/producer/PulsarKafkaProducer.java
index 726ca78367905..055259115eeda 100644
--- a/pulsar-client-kafka-compat/pulsar-client-kafka/src/main/java/org/apache/kafka/clients/producer/PulsarKafkaProducer.java
+++ b/pulsar-client-kafka-compat/pulsar-client-kafka/src/main/java/org/apache/kafka/clients/producer/PulsarKafkaProducer.java
@@ -43,7 +43,6 @@
import org.apache.pulsar.client.api.ProducerBuilder;
import org.apache.pulsar.client.api.PulsarClient;
import org.apache.pulsar.client.api.PulsarClientException;
-import org.apache.pulsar.client.api.SchemaSerializationException;
import org.apache.pulsar.client.api.TypedMessageBuilder;
import org.apache.pulsar.client.impl.MessageIdImpl;
import org.apache.pulsar.client.impl.TypedMessageBuilderImpl;
diff --git a/pulsar-client-schema/pom.xml b/pulsar-client-schema/pom.xml
deleted file mode 100644
index 5e90779d7193d..0000000000000
--- a/pulsar-client-schema/pom.xml
+++ /dev/null
@@ -1,197 +0,0 @@
-
-
- 4.0.0
-
-
- org.apache.pulsar
- pulsar
- 2.3.0-SNAPSHOT
- ..
-
-
- pulsar-client-schema
- Pulsar Client Schema
-
-
-
-
- ${project.groupId}
- pulsar-common
- ${project.parent.version}
- provided
-
-
-
- org.slf4j
- slf4j-api
-
-
-
- org.apache.avro
- avro
- ${avro.version}
-
-
-
- org.apache.avro
- avro-protobuf
- ${avro.version}
-
-
-
- com.google.protobuf
- protobuf-java
- ${protobuf3.version}
- provided
-
-
-
- com.fasterxml.jackson.module
- jackson-module-jsonSchema
-
-
-
-
- org.apache.pulsar
- pulsar-functions-proto
- ${project.parent.version}
- test
-
-
-
-
-
-
- src/main/resources
- true
-
-
-
-
-
- org.xolstice.maven.plugins
- protobuf-maven-plugin
- ${protobuf-maven-plugin.version}
-
- com.google.protobuf:protoc:${protoc3.version}:exe:${os.detected.classifier}
- true
- grpc-java
- io.grpc:protoc-gen-grpc-java:${protoc-gen-grpc-java.version}:exe:${os.detected.classifier}
-
-
-
-
- test-compile
-
-
-
-
-
- org.apache.maven.plugins
- maven-shade-plugin
-
-
- package
-
- shade
-
-
- true
- true
-
-
-
-
- com.fasterxml.jackson.*:*
-
- org.apache.avro:*
-
- org.codehaus.jackson:jackson-core-asl
- org.codehaus.jackson:jackson-mapper-asl
- com.thoughtworks.paranamer:paranamer
- org.xerial.snappy:snappy-java
- org.apache.commons:commons-compress
- org.tukaani:xz
- org.objenesis:*
-
-
-
-
-
- com.fasterxml.jackson
- org.apache.pulsar.shade.com.fasterxml.jackson
-
-
-
- org.apache.avro
- org.apache.pulsar.shade.org.apache.avro
-
- org.apache.avro.reflect.AvroAlias
- org.apache.avro.reflect.AvroDefault
- org.apache.avro.reflect.AvroEncode
- org.apache.avro.reflect.AvroIgnore
- org.apache.avro.reflect.AvroMeta
- org.apache.avro.reflect.AvroName
- org.apache.avro.reflect.AvroSchema
- org.apache.avro.reflect.Nullable
- org.apache.avro.reflect.Stringable
- org.apache.avro.reflect.Union
-
-
-
-
- org.codehaus.jackson
- org.apache.pulsar.shade.org.codehaus.jackson
-
-
- com.thoughtworks.paranamer
- org.apache.pulsar.shade.com.thoughtworks.paranamer
-
-
- org.xerial.snappy
- org.apache.pulsar.shade.org.xerial.snappy
-
-
- org.apache.commons
- org.apache.pulsar.shade.org.apache.commons
-
-
- org.tukaani
- org.apache.pulsar.shade.org.tukaani
-
-
- org.objenesis
- org.apache.pulsar.shade.org.objenesis
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/pulsar-client-shaded/pom.xml b/pulsar-client-shaded/pom.xml
index 3b7b17b7b23c3..c461849a61e02 100644
--- a/pulsar-client-shaded/pom.xml
+++ b/pulsar-client-shaded/pom.xml
@@ -42,6 +42,38 @@
+
+
+
+ org.apache.maven.plugins
+ maven-dependency-plugin
+ 3.1.1
+
+
+ unpack
+ generate-sources
+
+ unpack
+
+
+
+
+ org.apache.pulsar
+ pulsar-client-original
+ ${project.version}
+ jar
+ true
+ **/ProtobufSchema.class
+ ${project.build.directory}/classes
+
+
+
+
+
+
+
+
+
org.apache.maven.plugins
@@ -58,9 +90,6 @@
false
-
- org.apache.pulsar:pulsar-client-schema
-
org.apache.pulsar:pulsar-client-original
org.apache.commons:commons-lang3
@@ -72,7 +101,6 @@
org.reactivestreams:reactive-streams
com.typesafe.netty:netty-reactive-streams
org.javassist:javassist
- com.google.protobuf:protobuf-java
com.google.guava:guava
com.google.code.gson:gson
com.fasterxml.jackson.core
@@ -95,6 +123,15 @@
org.objenesis:*
org.yaml:snakeyaml
+ org.apache.avro:*
+
+ org.codehaus.jackson:jackson-core-asl
+ org.codehaus.jackson:jackson-mapper-asl
+ com.thoughtworks.paranamer:paranamer
+ org.xerial.snappy:snappy-java
+ org.apache.commons:commons-compress
+ org.tukaani:xz
+
@@ -123,6 +160,9 @@
com.google
org.apache.pulsar.shade.com.google
+
+ com.google.protobuf.*
+
com.fasterxml.jackson
@@ -172,6 +212,43 @@
org.yaml
org.apache.pulsar.shade.org.yaml
+
+ org.apache.avro
+ org.apache.pulsar.shade.org.apache.avro
+
+ org.apache.avro.reflect.AvroAlias
+ org.apache.avro.reflect.AvroDefault
+ org.apache.avro.reflect.AvroEncode
+ org.apache.avro.reflect.AvroIgnore
+ org.apache.avro.reflect.AvroMeta
+ org.apache.avro.reflect.AvroName
+ org.apache.avro.reflect.AvroSchema
+ org.apache.avro.reflect.Nullable
+ org.apache.avro.reflect.Stringable
+ org.apache.avro.reflect.Union
+
+
+
+
+ org.codehaus.jackson
+ org.apache.pulsar.shade.org.codehaus.jackson
+
+
+ com.thoughtworks.paranamer
+ org.apache.pulsar.shade.com.thoughtworks.paranamer
+
+
+ org.xerial.snappy
+ org.apache.pulsar.shade.org.xerial.snappy
+
+
+ org.apache.commons
+ org.apache.pulsar.shade.org.apache.commons
+
+
+ org.tukaani
+ org.apache.pulsar.shade.org.tukaani
+
diff --git a/pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdFunctions.java b/pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdFunctions.java
index 048a528dba2de..00ce1af338001 100644
--- a/pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdFunctions.java
+++ b/pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdFunctions.java
@@ -30,9 +30,7 @@
import com.google.common.annotations.VisibleForTesting;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
-import com.google.gson.JsonParser;
import com.google.gson.reflect.TypeToken;
-import com.google.protobuf.util.JsonFormat;
import java.io.File;
import java.lang.reflect.Field;
diff --git a/pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdSinks.java b/pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdSinks.java
index 5d1b9c02a115d..dd533ace3612f 100644
--- a/pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdSinks.java
+++ b/pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdSinks.java
@@ -29,7 +29,6 @@
import com.beust.jcommander.converters.StringConverter;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
-import com.google.gson.JsonParser;
import com.google.gson.reflect.TypeToken;
import java.io.File;
@@ -39,7 +38,6 @@
import java.util.*;
import java.util.stream.Collectors;
-import com.google.protobuf.util.JsonFormat;
import lombok.Getter;
import lombok.extern.slf4j.Slf4j;
diff --git a/pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdSources.java b/pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdSources.java
index 7acd85b8f02d8..c61b69af02e5b 100644
--- a/pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdSources.java
+++ b/pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdSources.java
@@ -29,7 +29,6 @@
import com.beust.jcommander.converters.StringConverter;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
-import com.google.gson.JsonParser;
import com.google.gson.reflect.TypeToken;
import java.io.File;
@@ -42,7 +41,6 @@
import java.util.Set;
import java.util.stream.Collectors;
-import com.google.protobuf.util.JsonFormat;
import lombok.Getter;
import lombok.extern.slf4j.Slf4j;
diff --git a/pulsar-client/pom.xml b/pulsar-client/pom.xml
index 01aec7cc44d15..b196f203f63fd 100644
--- a/pulsar-client/pom.xml
+++ b/pulsar-client/pom.xml
@@ -34,21 +34,14 @@
- ${project.groupId}
- pulsar-common
+ org.apache.pulsar
+ pulsar-client-api
${project.parent.version}
-
${project.groupId}
- pulsar-client-schema
+ pulsar-common
${project.parent.version}
-
-
- org.apache.avro
- *
-
-
@@ -96,6 +89,38 @@
+
+
+
+
+ org.apache.avro
+ avro
+ ${avro.version}
+
+
+
+ org.apache.avro
+ avro-protobuf
+ ${avro.version}
+
+
+ com.google.protobuf
+ protobuf-java
+
+
+
+
+
+ com.google.protobuf
+ protobuf-java
+ ${protobuf3.version}
+ provided
+
+
+
+ com.fasterxml.jackson.module
+ jackson-module-jsonSchema
+
@@ -125,5 +150,27 @@
true
+
+
+
+ org.xolstice.maven.plugins
+ protobuf-maven-plugin
+ ${protobuf-maven-plugin.version}
+
+ com.google.protobuf:protoc:${protoc3.version}:exe:${os.detected.classifier}
+ true
+ grpc-java
+ io.grpc:protoc-gen-grpc-java:${protoc-gen-grpc-java.version}:exe:${os.detected.classifier}
+
+
+
+
+
+ test-compile
+
+
+
+
+
diff --git a/pulsar-client-schema/src/main/java/org/apache/pulsar/client/api/Schema.java b/pulsar-client/src/main/java/org/apache/pulsar/client/api/Schema.java
similarity index 100%
rename from pulsar-client-schema/src/main/java/org/apache/pulsar/client/api/Schema.java
rename to pulsar-client/src/main/java/org/apache/pulsar/client/api/Schema.java
diff --git a/pulsar-client-schema/src/main/java/org/apache/pulsar/client/api/SchemaSerializationException.java b/pulsar-client/src/main/java/org/apache/pulsar/client/api/SchemaSerializationException.java
similarity index 100%
rename from pulsar-client-schema/src/main/java/org/apache/pulsar/client/api/SchemaSerializationException.java
rename to pulsar-client/src/main/java/org/apache/pulsar/client/api/SchemaSerializationException.java
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 621c86ccd003a..88f9b1c4196da 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
@@ -70,7 +70,6 @@
import org.apache.pulsar.common.schema.SchemaInfo;
import org.apache.pulsar.common.schema.SchemaType;
import org.apache.pulsar.common.util.DateFormatter;
-import org.apache.pulsar.common.util.FutureUtil;
import org.apache.pulsar.shaded.com.google.protobuf.v241.ByteString;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
diff --git a/pulsar-client-schema/src/main/java/org/apache/pulsar/client/impl/schema/AutoConsumeSchema.java b/pulsar-client/src/main/java/org/apache/pulsar/client/impl/schema/AutoConsumeSchema.java
similarity index 100%
rename from pulsar-client-schema/src/main/java/org/apache/pulsar/client/impl/schema/AutoConsumeSchema.java
rename to pulsar-client/src/main/java/org/apache/pulsar/client/impl/schema/AutoConsumeSchema.java
diff --git a/pulsar-client-schema/src/main/java/org/apache/pulsar/client/impl/schema/AutoProduceBytesSchema.java b/pulsar-client/src/main/java/org/apache/pulsar/client/impl/schema/AutoProduceBytesSchema.java
similarity index 100%
rename from pulsar-client-schema/src/main/java/org/apache/pulsar/client/impl/schema/AutoProduceBytesSchema.java
rename to pulsar-client/src/main/java/org/apache/pulsar/client/impl/schema/AutoProduceBytesSchema.java
diff --git a/pulsar-client-schema/src/main/java/org/apache/pulsar/client/impl/schema/AvroSchema.java b/pulsar-client/src/main/java/org/apache/pulsar/client/impl/schema/AvroSchema.java
similarity index 100%
rename from pulsar-client-schema/src/main/java/org/apache/pulsar/client/impl/schema/AvroSchema.java
rename to pulsar-client/src/main/java/org/apache/pulsar/client/impl/schema/AvroSchema.java
diff --git a/pulsar-client-schema/src/main/java/org/apache/pulsar/client/impl/schema/ByteBufSchema.java b/pulsar-client/src/main/java/org/apache/pulsar/client/impl/schema/ByteBufSchema.java
similarity index 100%
rename from pulsar-client-schema/src/main/java/org/apache/pulsar/client/impl/schema/ByteBufSchema.java
rename to pulsar-client/src/main/java/org/apache/pulsar/client/impl/schema/ByteBufSchema.java
diff --git a/pulsar-client-schema/src/main/java/org/apache/pulsar/client/impl/schema/ByteBufferSchema.java b/pulsar-client/src/main/java/org/apache/pulsar/client/impl/schema/ByteBufferSchema.java
similarity index 100%
rename from pulsar-client-schema/src/main/java/org/apache/pulsar/client/impl/schema/ByteBufferSchema.java
rename to pulsar-client/src/main/java/org/apache/pulsar/client/impl/schema/ByteBufferSchema.java
diff --git a/pulsar-client-schema/src/main/java/org/apache/pulsar/client/impl/schema/ByteSchema.java b/pulsar-client/src/main/java/org/apache/pulsar/client/impl/schema/ByteSchema.java
similarity index 100%
rename from pulsar-client-schema/src/main/java/org/apache/pulsar/client/impl/schema/ByteSchema.java
rename to pulsar-client/src/main/java/org/apache/pulsar/client/impl/schema/ByteSchema.java
diff --git a/pulsar-client-schema/src/main/java/org/apache/pulsar/client/impl/schema/BytesSchema.java b/pulsar-client/src/main/java/org/apache/pulsar/client/impl/schema/BytesSchema.java
similarity index 100%
rename from pulsar-client-schema/src/main/java/org/apache/pulsar/client/impl/schema/BytesSchema.java
rename to pulsar-client/src/main/java/org/apache/pulsar/client/impl/schema/BytesSchema.java
diff --git a/pulsar-client-schema/src/main/java/org/apache/pulsar/client/impl/schema/DoubleSchema.java b/pulsar-client/src/main/java/org/apache/pulsar/client/impl/schema/DoubleSchema.java
similarity index 100%
rename from pulsar-client-schema/src/main/java/org/apache/pulsar/client/impl/schema/DoubleSchema.java
rename to pulsar-client/src/main/java/org/apache/pulsar/client/impl/schema/DoubleSchema.java
diff --git a/pulsar-client-schema/src/main/java/org/apache/pulsar/client/impl/schema/FloatSchema.java b/pulsar-client/src/main/java/org/apache/pulsar/client/impl/schema/FloatSchema.java
similarity index 100%
rename from pulsar-client-schema/src/main/java/org/apache/pulsar/client/impl/schema/FloatSchema.java
rename to pulsar-client/src/main/java/org/apache/pulsar/client/impl/schema/FloatSchema.java
diff --git a/pulsar-client-schema/src/main/java/org/apache/pulsar/client/impl/schema/IntSchema.java b/pulsar-client/src/main/java/org/apache/pulsar/client/impl/schema/IntSchema.java
similarity index 100%
rename from pulsar-client-schema/src/main/java/org/apache/pulsar/client/impl/schema/IntSchema.java
rename to pulsar-client/src/main/java/org/apache/pulsar/client/impl/schema/IntSchema.java
diff --git a/pulsar-client-schema/src/main/java/org/apache/pulsar/client/impl/schema/JSONSchema.java b/pulsar-client/src/main/java/org/apache/pulsar/client/impl/schema/JSONSchema.java
similarity index 100%
rename from pulsar-client-schema/src/main/java/org/apache/pulsar/client/impl/schema/JSONSchema.java
rename to pulsar-client/src/main/java/org/apache/pulsar/client/impl/schema/JSONSchema.java
diff --git a/pulsar-client-schema/src/main/java/org/apache/pulsar/client/impl/schema/KeyValueSchema.java b/pulsar-client/src/main/java/org/apache/pulsar/client/impl/schema/KeyValueSchema.java
similarity index 100%
rename from pulsar-client-schema/src/main/java/org/apache/pulsar/client/impl/schema/KeyValueSchema.java
rename to pulsar-client/src/main/java/org/apache/pulsar/client/impl/schema/KeyValueSchema.java
diff --git a/pulsar-client-schema/src/main/java/org/apache/pulsar/client/impl/schema/LongSchema.java b/pulsar-client/src/main/java/org/apache/pulsar/client/impl/schema/LongSchema.java
similarity index 100%
rename from pulsar-client-schema/src/main/java/org/apache/pulsar/client/impl/schema/LongSchema.java
rename to pulsar-client/src/main/java/org/apache/pulsar/client/impl/schema/LongSchema.java
diff --git a/pulsar-client-schema/src/main/java/org/apache/pulsar/client/impl/schema/ProtobufSchema.java b/pulsar-client/src/main/java/org/apache/pulsar/client/impl/schema/ProtobufSchema.java
similarity index 100%
rename from pulsar-client-schema/src/main/java/org/apache/pulsar/client/impl/schema/ProtobufSchema.java
rename to pulsar-client/src/main/java/org/apache/pulsar/client/impl/schema/ProtobufSchema.java
diff --git a/pulsar-client-schema/src/main/java/org/apache/pulsar/client/impl/schema/ShortSchema.java b/pulsar-client/src/main/java/org/apache/pulsar/client/impl/schema/ShortSchema.java
similarity index 100%
rename from pulsar-client-schema/src/main/java/org/apache/pulsar/client/impl/schema/ShortSchema.java
rename to pulsar-client/src/main/java/org/apache/pulsar/client/impl/schema/ShortSchema.java
diff --git a/pulsar-client-schema/src/main/java/org/apache/pulsar/client/impl/schema/StringSchema.java b/pulsar-client/src/main/java/org/apache/pulsar/client/impl/schema/StringSchema.java
similarity index 100%
rename from pulsar-client-schema/src/main/java/org/apache/pulsar/client/impl/schema/StringSchema.java
rename to pulsar-client/src/main/java/org/apache/pulsar/client/impl/schema/StringSchema.java
diff --git a/pulsar-client-schema/src/main/java/org/apache/pulsar/client/impl/schema/generic/GenericAvroRecord.java b/pulsar-client/src/main/java/org/apache/pulsar/client/impl/schema/generic/GenericAvroRecord.java
similarity index 100%
rename from pulsar-client-schema/src/main/java/org/apache/pulsar/client/impl/schema/generic/GenericAvroRecord.java
rename to pulsar-client/src/main/java/org/apache/pulsar/client/impl/schema/generic/GenericAvroRecord.java
diff --git a/pulsar-client-schema/src/main/java/org/apache/pulsar/client/impl/schema/generic/GenericAvroSchema.java b/pulsar-client/src/main/java/org/apache/pulsar/client/impl/schema/generic/GenericAvroSchema.java
similarity index 100%
rename from pulsar-client-schema/src/main/java/org/apache/pulsar/client/impl/schema/generic/GenericAvroSchema.java
rename to pulsar-client/src/main/java/org/apache/pulsar/client/impl/schema/generic/GenericAvroSchema.java
diff --git a/pulsar-client-schema/src/main/java/org/apache/pulsar/client/impl/schema/generic/GenericJsonRecord.java b/pulsar-client/src/main/java/org/apache/pulsar/client/impl/schema/generic/GenericJsonRecord.java
similarity index 100%
rename from pulsar-client-schema/src/main/java/org/apache/pulsar/client/impl/schema/generic/GenericJsonRecord.java
rename to pulsar-client/src/main/java/org/apache/pulsar/client/impl/schema/generic/GenericJsonRecord.java
diff --git a/pulsar-client-schema/src/main/java/org/apache/pulsar/client/impl/schema/generic/GenericJsonSchema.java b/pulsar-client/src/main/java/org/apache/pulsar/client/impl/schema/generic/GenericJsonSchema.java
similarity index 100%
rename from pulsar-client-schema/src/main/java/org/apache/pulsar/client/impl/schema/generic/GenericJsonSchema.java
rename to pulsar-client/src/main/java/org/apache/pulsar/client/impl/schema/generic/GenericJsonSchema.java
diff --git a/pulsar-client-schema/src/main/java/org/apache/pulsar/client/impl/schema/generic/GenericSchema.java b/pulsar-client/src/main/java/org/apache/pulsar/client/impl/schema/generic/GenericSchema.java
similarity index 100%
rename from pulsar-client-schema/src/main/java/org/apache/pulsar/client/impl/schema/generic/GenericSchema.java
rename to pulsar-client/src/main/java/org/apache/pulsar/client/impl/schema/generic/GenericSchema.java
diff --git a/pulsar-client-schema/src/test/java/org/apache/pulsar/client/schema/AvroSchemaTest.java b/pulsar-client/src/test/java/org/apache/pulsar/client/impl/schema/AvroSchemaTest.java
similarity index 87%
rename from pulsar-client-schema/src/test/java/org/apache/pulsar/client/schema/AvroSchemaTest.java
rename to pulsar-client/src/test/java/org/apache/pulsar/client/impl/schema/AvroSchemaTest.java
index 58d159347a4c3..e00e1a653cbaa 100644
--- a/pulsar-client-schema/src/test/java/org/apache/pulsar/client/schema/AvroSchemaTest.java
+++ b/pulsar-client/src/test/java/org/apache/pulsar/client/impl/schema/AvroSchemaTest.java
@@ -16,17 +16,16 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.pulsar.client.schema;
+package org.apache.pulsar.client.impl.schema;
-import static org.apache.pulsar.client.schema.SchemaTestUtils.FOO_FIELDS;
-import static org.apache.pulsar.client.schema.SchemaTestUtils.SCHEMA_JSON;
+import static org.apache.pulsar.client.impl.schema.SchemaTestUtils.FOO_FIELDS;
+import static org.apache.pulsar.client.impl.schema.SchemaTestUtils.SCHEMA_JSON;
import static org.testng.Assert.assertEquals;
import lombok.extern.slf4j.Slf4j;
import org.apache.avro.Schema;
-import org.apache.pulsar.client.impl.schema.AvroSchema;
-import org.apache.pulsar.client.schema.SchemaTestUtils.Bar;
-import org.apache.pulsar.client.schema.SchemaTestUtils.Foo;
+import org.apache.pulsar.client.impl.schema.SchemaTestUtils.Bar;
+import org.apache.pulsar.client.impl.schema.SchemaTestUtils.Foo;
import org.apache.pulsar.common.schema.SchemaType;
import org.testng.Assert;
import org.testng.annotations.Test;
diff --git a/pulsar-client/src/test/java/org/apache/pulsar/client/schema/DefaultSchemasTest.java b/pulsar-client/src/test/java/org/apache/pulsar/client/impl/schema/DefaultSchemasTest.java
similarity index 97%
rename from pulsar-client/src/test/java/org/apache/pulsar/client/schema/DefaultSchemasTest.java
rename to pulsar-client/src/test/java/org/apache/pulsar/client/impl/schema/DefaultSchemasTest.java
index 8ab034914a34e..70416f3495dd7 100644
--- a/pulsar-client/src/test/java/org/apache/pulsar/client/schema/DefaultSchemasTest.java
+++ b/pulsar-client/src/test/java/org/apache/pulsar/client/impl/schema/DefaultSchemasTest.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.pulsar.client.schema;
+package org.apache.pulsar.client.impl.schema;
import org.apache.pulsar.client.api.ConsumerBuilder;
import org.apache.pulsar.client.api.Message;
@@ -25,7 +25,6 @@
import org.apache.pulsar.client.api.PulsarClient;
import org.apache.pulsar.client.api.PulsarClientException;
import org.apache.pulsar.client.api.ReaderBuilder;
-import org.apache.pulsar.client.impl.schema.StringSchema;
import org.testng.Assert;
import org.testng.annotations.AfterClass;
import org.testng.annotations.BeforeClass;
diff --git a/pulsar-client-schema/src/test/java/org/apache/pulsar/client/schema/JSONSchemaTest.java b/pulsar-client/src/test/java/org/apache/pulsar/client/impl/schema/JSONSchemaTest.java
similarity index 91%
rename from pulsar-client-schema/src/test/java/org/apache/pulsar/client/schema/JSONSchemaTest.java
rename to pulsar-client/src/test/java/org/apache/pulsar/client/impl/schema/JSONSchemaTest.java
index 93f34785f267a..1177983501868 100644
--- a/pulsar-client-schema/src/test/java/org/apache/pulsar/client/schema/JSONSchemaTest.java
+++ b/pulsar-client/src/test/java/org/apache/pulsar/client/impl/schema/JSONSchemaTest.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.pulsar.client.schema;
+package org.apache.pulsar.client.impl.schema;
import java.util.Collections;
import java.util.List;
@@ -24,17 +24,17 @@
import lombok.extern.slf4j.Slf4j;
import org.apache.avro.Schema;
import org.apache.pulsar.client.impl.schema.JSONSchema;
-import org.apache.pulsar.client.schema.SchemaTestUtils.Bar;
-import org.apache.pulsar.client.schema.SchemaTestUtils.DerivedFoo;
-import org.apache.pulsar.client.schema.SchemaTestUtils.Foo;
-import org.apache.pulsar.client.schema.SchemaTestUtils.NestedBar;
-import org.apache.pulsar.client.schema.SchemaTestUtils.NestedBarList;
+import org.apache.pulsar.client.impl.schema.SchemaTestUtils.Bar;
+import org.apache.pulsar.client.impl.schema.SchemaTestUtils.DerivedFoo;
+import org.apache.pulsar.client.impl.schema.SchemaTestUtils.Foo;
+import org.apache.pulsar.client.impl.schema.SchemaTestUtils.NestedBar;
+import org.apache.pulsar.client.impl.schema.SchemaTestUtils.NestedBarList;
import org.apache.pulsar.common.schema.SchemaType;
import org.testng.Assert;
import org.testng.annotations.Test;
-import static org.apache.pulsar.client.schema.SchemaTestUtils.FOO_FIELDS;
-import static org.apache.pulsar.client.schema.SchemaTestUtils.SCHEMA_JSON;
+import static org.apache.pulsar.client.impl.schema.SchemaTestUtils.FOO_FIELDS;
+import static org.apache.pulsar.client.impl.schema.SchemaTestUtils.SCHEMA_JSON;
@Slf4j
public class JSONSchemaTest {
diff --git a/pulsar-client-schema/src/test/java/org/apache/pulsar/client/schema/KeyValueSchemaTest.java b/pulsar-client/src/test/java/org/apache/pulsar/client/impl/schema/KeyValueSchemaTest.java
similarity index 96%
rename from pulsar-client-schema/src/test/java/org/apache/pulsar/client/schema/KeyValueSchemaTest.java
rename to pulsar-client/src/test/java/org/apache/pulsar/client/impl/schema/KeyValueSchemaTest.java
index 23d502264fda0..d355fc7cf5c15 100644
--- a/pulsar-client-schema/src/test/java/org/apache/pulsar/client/schema/KeyValueSchemaTest.java
+++ b/pulsar-client/src/test/java/org/apache/pulsar/client/impl/schema/KeyValueSchemaTest.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.pulsar.client.schema;
+package org.apache.pulsar.client.impl.schema;
import static org.testng.Assert.assertEquals;
@@ -25,9 +25,9 @@
import org.apache.pulsar.client.impl.schema.AvroSchema;
import org.apache.pulsar.client.impl.schema.JSONSchema;
import org.apache.pulsar.client.impl.schema.KeyValueSchema;
-import org.apache.pulsar.client.schema.SchemaTestUtils.Bar;
-import org.apache.pulsar.client.schema.SchemaTestUtils.Color;
-import org.apache.pulsar.client.schema.SchemaTestUtils.Foo;
+import org.apache.pulsar.client.impl.schema.SchemaTestUtils.Bar;
+import org.apache.pulsar.client.impl.schema.SchemaTestUtils.Color;
+import org.apache.pulsar.client.impl.schema.SchemaTestUtils.Foo;
import org.apache.pulsar.common.schema.KeyValue;
import org.apache.pulsar.common.schema.SchemaType;
import org.testng.Assert;
diff --git a/pulsar-client-schema/src/test/java/org/apache/pulsar/client/schema/PrimitiveSchemaTest.java b/pulsar-client/src/test/java/org/apache/pulsar/client/impl/schema/PrimitiveSchemaTest.java
similarity index 99%
rename from pulsar-client-schema/src/test/java/org/apache/pulsar/client/schema/PrimitiveSchemaTest.java
rename to pulsar-client/src/test/java/org/apache/pulsar/client/impl/schema/PrimitiveSchemaTest.java
index aac2d8c5c103a..0932bc3b7ae23 100644
--- a/pulsar-client-schema/src/test/java/org/apache/pulsar/client/schema/PrimitiveSchemaTest.java
+++ b/pulsar-client/src/test/java/org/apache/pulsar/client/impl/schema/PrimitiveSchemaTest.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.pulsar.client.schema;
+package org.apache.pulsar.client.impl.schema;
import static java.nio.charset.StandardCharsets.UTF_8;
import static org.testng.Assert.assertEquals;
diff --git a/pulsar-client-schema/src/test/java/org/apache/pulsar/client/schema/ProtobufSchemaTest.java b/pulsar-client/src/test/java/org/apache/pulsar/client/impl/schema/ProtobufSchemaTest.java
similarity index 99%
rename from pulsar-client-schema/src/test/java/org/apache/pulsar/client/schema/ProtobufSchemaTest.java
rename to pulsar-client/src/test/java/org/apache/pulsar/client/impl/schema/ProtobufSchemaTest.java
index 69c66dcfa6ddb..5a9716e9af874 100644
--- a/pulsar-client-schema/src/test/java/org/apache/pulsar/client/schema/ProtobufSchemaTest.java
+++ b/pulsar-client/src/test/java/org/apache/pulsar/client/impl/schema/ProtobufSchemaTest.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.pulsar.client.schema;
+package org.apache.pulsar.client.impl.schema;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
diff --git a/pulsar-client-schema/src/test/java/org/apache/pulsar/client/schema/SchemaTestUtils.java b/pulsar-client/src/test/java/org/apache/pulsar/client/impl/schema/SchemaTestUtils.java
similarity index 97%
rename from pulsar-client-schema/src/test/java/org/apache/pulsar/client/schema/SchemaTestUtils.java
rename to pulsar-client/src/test/java/org/apache/pulsar/client/impl/schema/SchemaTestUtils.java
index b31b007e2915a..0081f0e457ec1 100644
--- a/pulsar-client-schema/src/test/java/org/apache/pulsar/client/schema/SchemaTestUtils.java
+++ b/pulsar-client/src/test/java/org/apache/pulsar/client/impl/schema/SchemaTestUtils.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.pulsar.client.schema;
+package org.apache.pulsar.client.impl.schema;
import java.util.List;
@@ -88,7 +88,7 @@ public static class DerivedDerivedFoo extends DerivedFoo {
}
public static final String SCHEMA_JSON
- = "{\"type\":\"record\",\"name\":\"Foo\",\"namespace\":\"org.apache.pulsar.client.schema" +
+ = "{\"type\":\"record\",\"name\":\"Foo\",\"namespace\":\"org.apache.pulsar.client.impl.schema" +
".SchemaTestUtils$\",\"fields\":[{\"name\":\"field1\",\"type\":[\"null\",\"string\"],\"default\":null}," +
"{\"name\":\"field2\",\"type\":[\"null\",\"string\"],\"default\":null},{\"name\":\"field3\"," +
"\"type\":\"int\"},{\"name\":\"field4\",\"type\":[\"null\",{\"type\":\"record\",\"name\":\"Bar\"," +
diff --git a/pulsar-client-schema/src/test/java/org/apache/pulsar/client/impl/schema/generic/GenericSchemaTest.java b/pulsar-client/src/test/java/org/apache/pulsar/client/impl/schema/generic/GenericSchemaTest.java
similarity index 96%
rename from pulsar-client-schema/src/test/java/org/apache/pulsar/client/impl/schema/generic/GenericSchemaTest.java
rename to pulsar-client/src/test/java/org/apache/pulsar/client/impl/schema/generic/GenericSchemaTest.java
index f00d05da0bddb..4e6e2616b99dd 100644
--- a/pulsar-client-schema/src/test/java/org/apache/pulsar/client/impl/schema/generic/GenericSchemaTest.java
+++ b/pulsar-client/src/test/java/org/apache/pulsar/client/impl/schema/generic/GenericSchemaTest.java
@@ -26,8 +26,8 @@
import org.apache.pulsar.client.api.Schema;
import org.apache.pulsar.client.api.schema.GenericRecord;
import org.apache.pulsar.client.impl.schema.AutoConsumeSchema;
-import org.apache.pulsar.client.schema.SchemaTestUtils.Bar;
-import org.apache.pulsar.client.schema.SchemaTestUtils.Foo;
+import org.apache.pulsar.client.impl.schema.SchemaTestUtils.Bar;
+import org.apache.pulsar.client.impl.schema.SchemaTestUtils.Foo;
import org.testng.annotations.Test;
/**
diff --git a/pulsar-client-schema/src/test/proto/Test.proto b/pulsar-client/src/test/proto/Test.proto
similarity index 100%
rename from pulsar-client-schema/src/test/proto/Test.proto
rename to pulsar-client/src/test/proto/Test.proto
diff --git a/pulsar-functions/api-java/pom.xml b/pulsar-functions/api-java/pom.xml
index d22107250620e..7b590e058d4f4 100644
--- a/pulsar-functions/api-java/pom.xml
+++ b/pulsar-functions/api-java/pom.xml
@@ -37,12 +37,6 @@
slf4j-api
-
- ${project.groupId}
- pulsar-client-schema
- ${project.version}
-
-
net.jodah
typetools
diff --git a/pulsar-functions/instance/src/main/java/org/apache/pulsar/functions/instance/ContextImpl.java b/pulsar-functions/instance/src/main/java/org/apache/pulsar/functions/instance/ContextImpl.java
index 06048795a7b02..69fd6c865df46 100644
--- a/pulsar-functions/instance/src/main/java/org/apache/pulsar/functions/instance/ContextImpl.java
+++ b/pulsar-functions/instance/src/main/java/org/apache/pulsar/functions/instance/ContextImpl.java
@@ -35,7 +35,6 @@
import org.apache.pulsar.functions.api.Record;
import org.apache.pulsar.functions.instance.state.StateContextImpl;
import org.apache.pulsar.functions.proto.Function.SinkSpec;
-import org.apache.pulsar.functions.proto.InstanceCommunication.MetricsData;
import org.apache.pulsar.functions.secretsprovider.SecretsProvider;
import org.apache.pulsar.functions.source.TopicSchema;
import org.apache.pulsar.io.core.SinkContext;
diff --git a/pulsar-functions/instance/src/test/java/org/apache/pulsar/functions/instance/ContextImplTest.java b/pulsar-functions/instance/src/test/java/org/apache/pulsar/functions/instance/ContextImplTest.java
index 0ac3502fd6f6f..77427f74e17b5 100644
--- a/pulsar-functions/instance/src/test/java/org/apache/pulsar/functions/instance/ContextImplTest.java
+++ b/pulsar-functions/instance/src/test/java/org/apache/pulsar/functions/instance/ContextImplTest.java
@@ -32,7 +32,6 @@
import io.prometheus.client.CollectorRegistry;
import org.apache.pulsar.client.api.Producer;
-import org.apache.pulsar.client.api.PulsarClient;
import org.apache.pulsar.client.api.Schema;
import org.apache.pulsar.client.impl.ProducerBuilderImpl;
import org.apache.pulsar.client.impl.PulsarClientImpl;
diff --git a/pulsar-functions/java-examples/pom.xml b/pulsar-functions/java-examples/pom.xml
index 4e1856c82055b..055d3f356d8af 100644
--- a/pulsar-functions/java-examples/pom.xml
+++ b/pulsar-functions/java-examples/pom.xml
@@ -41,6 +41,11 @@
pulsar-functions-api
${project.version}
+
+ org.apache.pulsar
+ pulsar-client-api
+ ${project.version}
+
diff --git a/pulsar-functions/utils/pom.xml b/pulsar-functions/utils/pom.xml
index 82d9dcfbde91e..e6d09500e5e1f 100644
--- a/pulsar-functions/utils/pom.xml
+++ b/pulsar-functions/utils/pom.xml
@@ -93,6 +93,12 @@
typetools
+
+ org.apache.pulsar
+ pulsar-client-original
+ ${project.version}
+
+
diff --git a/pulsar-functions/utils/src/main/java/org/apache/pulsar/functions/utils/ValidatorUtils.java b/pulsar-functions/utils/src/main/java/org/apache/pulsar/functions/utils/ValidatorUtils.java
index 483ea08fa1dd2..72051e5018798 100644
--- a/pulsar-functions/utils/src/main/java/org/apache/pulsar/functions/utils/ValidatorUtils.java
+++ b/pulsar-functions/utils/src/main/java/org/apache/pulsar/functions/utils/ValidatorUtils.java
@@ -19,25 +19,12 @@
package org.apache.pulsar.functions.utils;
-import com.google.gson.Gson;
-import com.google.gson.reflect.TypeToken;
import net.jodah.typetools.TypeResolver;
-import org.apache.commons.lang.StringUtils;
import org.apache.pulsar.client.api.Schema;
import org.apache.pulsar.common.schema.SchemaType;
import org.apache.pulsar.functions.api.SerDe;
-import org.apache.pulsar.functions.proto.Function;
-import org.apache.pulsar.functions.proto.Function.FunctionDetails;
-import java.io.File;
-import java.lang.reflect.Type;
-import java.net.MalformedURLException;
-import java.util.*;
-
-import static org.apache.commons.lang.StringUtils.isNotBlank;
-import static org.apache.commons.lang.StringUtils.isNotEmpty;
import static org.apache.commons.lang3.StringUtils.isEmpty;
-import static org.apache.pulsar.functions.utils.Utils.loadJar;
public class ValidatorUtils {
private static final String DEFAULT_SERDE = "org.apache.pulsar.functions.api.utils.DefaultSerDe";
diff --git a/pulsar-io/kafka-connect-adaptor/src/test/java/org/apache/pulsar/io/kafka/connect/KafkaConnectSourceTest.java b/pulsar-io/kafka-connect-adaptor/src/test/java/org/apache/pulsar/io/kafka/connect/KafkaConnectSourceTest.java
index f887b3969feaf..7ff884576ebfe 100644
--- a/pulsar-io/kafka-connect-adaptor/src/test/java/org/apache/pulsar/io/kafka/connect/KafkaConnectSourceTest.java
+++ b/pulsar-io/kafka-connect-adaptor/src/test/java/org/apache/pulsar/io/kafka/connect/KafkaConnectSourceTest.java
@@ -23,7 +23,6 @@
import java.io.File;
import java.io.OutputStream;
-import java.nio.ByteBuffer;
import java.nio.file.Files;
import java.util.HashMap;
import java.util.Map;
@@ -31,7 +30,6 @@
import org.apache.kafka.connect.file.FileStreamSourceConnector;
import org.apache.kafka.connect.runtime.TaskConfig;
import org.apache.pulsar.client.api.ProducerConsumerBase;
-import org.apache.pulsar.client.api.Schema;
import org.apache.pulsar.common.schema.KeyValue;
import org.apache.pulsar.functions.api.Record;
import org.testng.annotations.AfterMethod;
diff --git a/pulsar-proxy/src/test/java/org/apache/pulsar/proxy/server/ProxyAuthenticationTest.java b/pulsar-proxy/src/test/java/org/apache/pulsar/proxy/server/ProxyAuthenticationTest.java
index cd3862877e4f8..6a3a799217042 100644
--- a/pulsar-proxy/src/test/java/org/apache/pulsar/proxy/server/ProxyAuthenticationTest.java
+++ b/pulsar-proxy/src/test/java/org/apache/pulsar/proxy/server/ProxyAuthenticationTest.java
@@ -21,14 +21,10 @@
import static org.mockito.Mockito.spy;
import java.io.IOException;
-import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
-import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
-import java.util.concurrent.CompletableFuture;
-import java.util.concurrent.TimeUnit;
import java.util.Set;
import javax.naming.AuthenticationException;
@@ -41,27 +37,19 @@
import org.apache.pulsar.client.admin.PulsarAdmin;
import org.apache.pulsar.client.api.Authentication;
import org.apache.pulsar.client.api.AuthenticationDataProvider;
-import org.apache.pulsar.client.api.Consumer;
-import org.apache.pulsar.client.api.Message;
-import org.apache.pulsar.client.api.MessageId;
-import org.apache.pulsar.client.api.Producer;
import org.apache.pulsar.client.api.ProducerConsumerBase;
import org.apache.pulsar.client.api.PulsarClient;
import org.apache.pulsar.client.api.PulsarClientException;
import org.apache.pulsar.client.api.Schema;
-import org.apache.pulsar.client.impl.ConsumerImpl;
import org.apache.pulsar.common.configuration.PulsarConfigurationLoader;
import org.apache.pulsar.common.policies.data.AuthAction;
-import org.apache.pulsar.common.util.FutureUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import org.testng.Assert;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
import com.google.common.collect.Sets;
-import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
diff --git a/pulsar-sql/presto-distribution/LICENSE b/pulsar-sql/presto-distribution/LICENSE
index 4d158a49f4a76..1320f79759842 100644
--- a/pulsar-sql/presto-distribution/LICENSE
+++ b/pulsar-sql/presto-distribution/LICENSE
@@ -344,6 +344,7 @@ The Apache Software License, Version 2.0
- xbean-reflect-3.4.jar
* Avro
- avro-1.8.2.jar
+ - avro-protobuf-1.8.2.jar
* Javax
- javax.inject-1.jar
- javax.inject-1.jar
@@ -418,7 +419,6 @@ BSD License
MIT License
* Animal Sniffer Annotations
- animal-sniffer-annotations-1.14.jar
- - animal-sniffer-annotations-1.17.jar
* Checker Qua -- checker-compat-qual-2.0.0.jar
* PCollections
- pcollections-2.1.2.jar
diff --git a/site/scripts/javadoc-gen.sh b/site/scripts/javadoc-gen.sh
index bdd57e83ecfab..851088cded754 100755
--- a/site/scripts/javadoc-gen.sh
+++ b/site/scripts/javadoc-gen.sh
@@ -36,8 +36,7 @@ JDK_COMMON_PKGS=java.lang:java.util:java.util.concurrent:java.nio:java.net:java.
-noqualifier $JDK_COMMON_PKGS \
-notimestamp \
-Xdoclint:none \
- `find pulsar-client/src/main/java/org/apache/pulsar/client/api -name *.java` \
- `find pulsar-client-schema/src/main/java -name *.java | grep -v /impl/`
+ `find pulsar-client/src/main/java/org/apache/pulsar/client/api -name *.java`
# Java admin
javadoc \
diff --git a/src/check-binary-license b/src/check-binary-license
index c5d609dd165ef..de817dac8cccd 100755
--- a/src/check-binary-license
+++ b/src/check-binary-license
@@ -84,7 +84,7 @@ for J in $NOTICEJARS; do
done
# check pulsar sql jars
-JARS=$(tar -tf $TARBALL | grep '\.jar' | grep 'lib/presto/' | grep -v 'managed-ledger' | grep -v 'pulsar-client-admin' | grep -v 'pulsar-client-schema' | grep -v 'pulsar-functions-api' | grep -v 'pulsar-presto-connector-original' | grep -v 'pulsar-presto-distribution' | grep -v 'pulsar-common' | grep -v 'pulsar-functions-proto' | grep -v 'pulsar-functions-utils' | grep -v 'pulsar-io-core' | sed 's!.*/!!' | sort)
+JARS=$(tar -tf $TARBALL | grep '\.jar' | grep 'lib/presto/' | grep -v 'managed-ledger' | grep -v 'pulsar-client-admin' | grep -v 'pulsar-client-api' | grep -v 'pulsar-functions-api' | grep -v 'pulsar-presto-connector-original' | grep -v 'pulsar-presto-distribution' | grep -v 'pulsar-common' | grep -v 'pulsar-functions-proto' | grep -v 'pulsar-functions-utils' | grep -v 'pulsar-io-core' | sed 's!.*/!!' | sort)
LICENSEPATH=$(tar -tf $TARBALL | awk '/^[^\/]*\/lib\/presto\/LICENSE/')
LICENSE=$(tar -O -xf $TARBALL "$LICENSEPATH")
LICENSEJARS=$(echo "$LICENSE" | sed -nE 's!.* (.*\.jar).*!\1!gp')
diff --git a/tests/integration/pom.xml b/tests/integration/pom.xml
index a7b70570fab6e..119fce498a07b 100644
--- a/tests/integration/pom.xml
+++ b/tests/integration/pom.xml
@@ -48,12 +48,6 @@
pulsar-functions-api-examples
${project.version}
test
-
-
- org.apache.pulsar
- pulsar-client-schema
-
-
org.apache.pulsar
diff --git a/tests/integration/src/test/java/org/apache/pulsar/tests/integration/cli/CLITest.java b/tests/integration/src/test/java/org/apache/pulsar/tests/integration/cli/CLITest.java
index 4311645a05e41..ce876d4220d9d 100644
--- a/tests/integration/src/test/java/org/apache/pulsar/tests/integration/cli/CLITest.java
+++ b/tests/integration/src/test/java/org/apache/pulsar/tests/integration/cli/CLITest.java
@@ -24,7 +24,6 @@
import org.apache.pulsar.client.api.PulsarClient;
import org.apache.pulsar.client.api.PulsarClientException;
import org.apache.pulsar.client.api.Schema;
-import org.apache.pulsar.client.impl.schema.JSONSchema;
import org.apache.pulsar.functions.api.examples.pojo.Tick;
import org.apache.pulsar.tests.integration.containers.BrokerContainer;
import org.apache.pulsar.tests.integration.docker.ContainerExecException;
diff --git a/tests/integration/src/test/java/org/apache/pulsar/tests/integration/functions/PulsarFunctionsTest.java b/tests/integration/src/test/java/org/apache/pulsar/tests/integration/functions/PulsarFunctionsTest.java
index 94aad281e9d45..0469d80269cb3 100644
--- a/tests/integration/src/test/java/org/apache/pulsar/tests/integration/functions/PulsarFunctionsTest.java
+++ b/tests/integration/src/test/java/org/apache/pulsar/tests/integration/functions/PulsarFunctionsTest.java
@@ -23,7 +23,6 @@
import static org.testng.Assert.assertTrue;
import static org.testng.Assert.fail;
-import com.fasterxml.jackson.databind.ObjectMapper;
import com.google.common.base.Stopwatch;
import com.google.gson.Gson;