diff --git a/.github/workflows/ci-license.yaml b/.github/workflows/ci-license.yaml index f706a1cd73bfb..e94d1913cacda 100644 --- a/.github/workflows/ci-license.yaml +++ b/.github/workflows/ci-license.yaml @@ -86,4 +86,4 @@ jobs: - name: license check if: ${{ steps.check_changes.outputs.docs_only != 'true' }} - run: src/check-binary-license ./distribution/server/target/apache-pulsar-*-bin.tar.gz + run: src/check-binary-license.sh ./distribution/server/target/apache-pulsar-*-bin.tar.gz diff --git a/bin/pulsar-admin-common.sh b/bin/pulsar-admin-common.sh index 46ab6d8c75818..a8c5d9aadb8aa 100755 --- a/bin/pulsar-admin-common.sh +++ b/bin/pulsar-admin-common.sh @@ -98,6 +98,7 @@ OPTS="$OPTS $PULSAR_EXTRA_OPTS" # log directory & file PULSAR_LOG_DIR=${PULSAR_LOG_DIR:-"$PULSAR_HOME/logs"} PULSAR_LOG_APPENDER=${PULSAR_LOG_APPENDER:-"RoutingAppender"} +PULSAR_LOG_ROOT_LEVEL=${PULSAR_LOG_ROOT_LEVEL:-"info"} PULSAR_LOG_LEVEL=${PULSAR_LOG_LEVEL:-"info"} PULSAR_ROUTING_APPENDER_DEFAULT=${PULSAR_ROUTING_APPENDER_DEFAULT:-"Console"} @@ -105,4 +106,5 @@ PULSAR_ROUTING_APPENDER_DEFAULT=${PULSAR_ROUTING_APPENDER_DEFAULT:-"Console"} OPTS="$OPTS -Dpulsar.log.appender=$PULSAR_LOG_APPENDER" OPTS="$OPTS -Dpulsar.log.dir=$PULSAR_LOG_DIR" OPTS="$OPTS -Dpulsar.log.level=$PULSAR_LOG_LEVEL" +OPTS="$OPTS -Dpulsar.log.root.level=$PULSAR_LOG_ROOT_LEVEL" OPTS="$OPTS -Dpulsar.routing.appender.default=$PULSAR_ROUTING_APPENDER_DEFAULT" diff --git a/bin/pulsar-client b/bin/pulsar-client index dcee2e3b646a9..618f32def771c 100755 --- a/bin/pulsar-client +++ b/bin/pulsar-client @@ -101,12 +101,14 @@ OPTS="$OPTS $PULSAR_EXTRA_OPTS" # log directory & file PULSAR_LOG_DIR=${PULSAR_LOG_DIR:-"$PULSAR_HOME/logs"} PULSAR_LOG_APPENDER=${PULSAR_LOG_APPENDER:-"Console"} +PULSAR_LOG_ROOT_LEVEL=${PULSAR_LOG_ROOT_LEVEL:-"info"} PULSAR_LOG_LEVEL=${PULSAR_LOG_LEVEL:-"info"} #Configure log configuration system properties OPTS="$OPTS -Dpulsar.log.dir=$PULSAR_LOG_DIR" OPTS="$OPTS -Dpulsar.log.appender=$PULSAR_LOG_APPENDER" OPTS="$OPTS -Dpulsar.log.level=$PULSAR_LOG_LEVEL" +OPTS="$OPTS -Dpulsar.log.root.level=$PULSAR_LOG_ROOT_LEVEL" #Change to PULSAR_HOME to support relative paths cd "$PULSAR_HOME" diff --git a/bin/pulsar-perf b/bin/pulsar-perf index 85afdf475dd14..9cf38332288ae 100755 --- a/bin/pulsar-perf +++ b/bin/pulsar-perf @@ -138,9 +138,13 @@ OPTS="$OPTS $PULSAR_EXTRA_OPTS" PULSAR_LOG_APPENDER=${PULSAR_LOG_APPENDER:-"Console"} PULSAR_LOG_DIR=${PULSAR_LOG_DIR:-"$PULSAR_HOME/logs"} PULSAR_LOG_FILE=${PULSAR_LOG_FILE:-"pulsar-perftest.log"} +PULSAR_LOG_ROOT_LEVEL=${PULSAR_LOG_ROOT_LEVEL:-"info"} +PULSAR_LOG_LEVEL=${PULSAR_LOG_LEVEL:-"info"} #Configure log configuration system properties OPTS="$OPTS -Dpulsar.log.appender=$PULSAR_LOG_APPENDER" +OPTS="$OPTS -Dpulsar.log.level=$PULSAR_LOG_LEVEL" +OPTS="$OPTS -Dpulsar.log.root.level=$PULSAR_LOG_ROOT_LEVEL" OPTS="$OPTS -Dpulsar.log.dir=$PULSAR_LOG_DIR" OPTS="$OPTS -Dpulsar.log.file=$PULSAR_LOG_FILE" diff --git a/distribution/io/pom.xml b/distribution/io/pom.xml index da2cbb628096c..b0abad738c67a 100644 --- a/distribution/io/pom.xml +++ b/distribution/io/pom.xml @@ -111,7 +111,7 @@ exec - ${project.basedir}/../../src/pulsar-io-gen + ${project.basedir}/../../src/pulsar-io-gen.sh ${project.basedir}/target/pulsar-io-gen.output conf diff --git a/pulsar-metadata/src/main/java/org/apache/pulsar/metadata/impl/AbstractMetadataStore.java b/pulsar-metadata/src/main/java/org/apache/pulsar/metadata/impl/AbstractMetadataStore.java index 4a85cf6ab57ae..e20eb6424ecc5 100644 --- a/pulsar-metadata/src/main/java/org/apache/pulsar/metadata/impl/AbstractMetadataStore.java +++ b/pulsar-metadata/src/main/java/org/apache/pulsar/metadata/impl/AbstractMetadataStore.java @@ -41,6 +41,7 @@ import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; import org.apache.pulsar.common.util.FutureUtil; +import org.apache.pulsar.metadata.api.GetResult; import org.apache.pulsar.metadata.api.MetadataCache; import org.apache.pulsar.metadata.api.MetadataSerde; import org.apache.pulsar.metadata.api.MetadataStoreException; @@ -141,6 +142,21 @@ public MetadataCache getMetadataCache(MetadataSerde serde) { return metadataCache; } + @Override + public CompletableFuture> get(String path) { + if (!isValidPath(path)) { + return FutureUtil.failedFuture(new MetadataStoreException.InvalidPathException(path)); + } + return storeGet(path); + } + + protected abstract CompletableFuture> storeGet(String path); + + @Override + public CompletableFuture put(String path, byte[] value, Optional expectedVersion) { + return put(path, value, expectedVersion, EnumSet.noneOf(CreateOption.class)); + } + @Override public final CompletableFuture> getChildren(String path) { if (!isValidPath(path)) { diff --git a/pulsar-metadata/src/main/java/org/apache/pulsar/metadata/impl/LocalMemoryMetadataStore.java b/pulsar-metadata/src/main/java/org/apache/pulsar/metadata/impl/LocalMemoryMetadataStore.java index 4de2a7b5ae345..d0578996c1c88 100644 --- a/pulsar-metadata/src/main/java/org/apache/pulsar/metadata/impl/LocalMemoryMetadataStore.java +++ b/pulsar-metadata/src/main/java/org/apache/pulsar/metadata/impl/LocalMemoryMetadataStore.java @@ -90,10 +90,7 @@ public LocalMemoryMetadataStore(String metadataURL, MetadataStoreConfig metadata } @Override - public CompletableFuture> get(String path) { - if (!isValidPath(path)) { - return FutureUtil.failedFuture(new MetadataStoreException.InvalidPathException(path)); - } + public CompletableFuture> storeGet(String path) { synchronized (map) { Value v = map.get(path); if (v != null) { @@ -140,11 +137,6 @@ public CompletableFuture existsFromStore(String path) { } } - @Override - public CompletableFuture put(String path, byte[] value, Optional expectedVersion) { - return put(path, value, expectedVersion, EnumSet.noneOf(CreateOption.class)); - } - @Override public CompletableFuture storePut(String path, byte[] data, Optional optExpectedVersion, EnumSet options) { diff --git a/pulsar-metadata/src/main/java/org/apache/pulsar/metadata/impl/ZKMetadataStore.java b/pulsar-metadata/src/main/java/org/apache/pulsar/metadata/impl/ZKMetadataStore.java index 03ac79fc6c9f3..b1d40eb2b0298 100644 --- a/pulsar-metadata/src/main/java/org/apache/pulsar/metadata/impl/ZKMetadataStore.java +++ b/pulsar-metadata/src/main/java/org/apache/pulsar/metadata/impl/ZKMetadataStore.java @@ -128,7 +128,7 @@ protected void receivedSessionEvent(SessionEvent event) { } @Override - public CompletableFuture> get(String path) { + public CompletableFuture> storeGet(String path) { CompletableFuture> future = new CompletableFuture<>(); try { @@ -201,11 +201,6 @@ public CompletableFuture existsFromStore(String path) { return future; } - @Override - public CompletableFuture put(String path, byte[] value, Optional optExpectedVersion) { - return put(path, value, optExpectedVersion, EnumSet.noneOf(CreateOption.class)); - } - @Override protected CompletableFuture storePut(String path, byte[] value, Optional optExpectedVersion, EnumSet options) { diff --git a/site2/docs/admin-api-permissions.md b/site2/docs/admin-api-permissions.md index 78adb373d8cd6..9e7f8a14d92de 100644 --- a/site2/docs/admin-api-permissions.md +++ b/site2/docs/admin-api-permissions.md @@ -14,8 +14,13 @@ sidebar_label: Permissions > > - For the latest and complete information about `Java admin API`, including classes, methods, descriptions, and more, see [Java admin API doc](https://pulsar.apache.org/api/admin/). -Permissions in Pulsar are managed at the [namespace](reference-terminology.md#namespace) level -(that is, within [tenants](reference-terminology.md#tenant) and [clusters](reference-terminology.md#cluster)). +Pulsar allows you to grant namespace-level or topic-level permission to users. + +- If you grant a namespace-level permission to a user, then the user can access all the topics under the namespace. + +- If you grant a topic-level permission to a user, then the user can access only the topic. + +The chapters below demonstrate how to grant namespace-level permissions to users. For how to grant topic-level permissions to users, see [manage topics](admin-api-topics.md/#grant-permission). ## Grant permissions diff --git a/site2/docs/client-libraries-rest.md b/site2/docs/client-libraries-rest.md new file mode 100644 index 0000000000000..d9faf947fda70 --- /dev/null +++ b/site2/docs/client-libraries-rest.md @@ -0,0 +1,122 @@ +--- +id: client-libraries-rest +title: Pulsar REST +sidebar_label: REST +--- + +Pulsar not only provides REST endpoints to manage resources in Pulsar clusters, but also provides methods to query the state for those resources. In addition, Pulsar REST provides a simple way to interact with Pulsar **without using client libraries**, which is convenient for applications to use HTTP to interact with Pulsar. + +## Connection + +To connect to Pulsar, you need to specify a URL. + +- Produce messages to non-partitioned or partitioned topics + + ``` + brokerUrl:{8080/8081}/topics/{persistent/non-persistent}/{my-tenant}/{my-namespace}/{my-topic} + ``` + +- Produce messages to specific partitions of partitioned topics + + ``` + brokerUrl:{8080/8081}/topics/{persistent/non-persistent}/{my-tenant}/{my-namespace}/{my-topic}/partitions/{partition-number} + ``` + +## Producer + +Currently, you can produce messages to the following destinations with tools like cURL or Postman via REST. + +- Non-partitioned or partitioned topics + +- Specific partitions of partitioned topics + +> **Note** +> +> You can only produce messages to **topics that already exist** in Pulsar via REST. + +Consuming and reading messages via REST will be supported in the future. + +### Message + +- Below is the structure of a request payload. + + Parameter|Required?|Description + |---|---|--- + `schemaVersion`|No| Schema version of existing schema used for this message

You need provide one of the following:

- `schemaVersion`
- `keySchema`/`valueSchema`

If both of them are provided, then `schemaVersion` is used + `keySchema/valueSchema`|No|Key schema / Value schema used for this message + `producerName`|No|Producer name + `Messages[] SingleMessage`|Yes|Messages to be sent + +- Below is the structure of a message. + + Parameter|Required?|Type|Description + |---|---|---|--- + `payload`|Yes|`String`|Actual message payload

Messages are sent in strings and encoded with given schemas on the server side + `properties`|No|`Map`|Custom properties + `key`|No|`String`|Partition key + `replicationClusters`|No|`List`|Clusters to which messages replicate + `eventTime`|No|`String`|Message event time + `sequenceId`|No|`long`|Message sequence ID + `disableReplication`|No|`boolean`|Whether to disable replication of messages + `deliverAt`|No|`long`|Deliver messages only at or after specified absolute timestamp + `deliverAfterMs`|No|`long`|Deliver messages only after specified relative delay (in milliseconds) + +### Schema + +- Currently, Primitive, Avro, JSON, and KeyValue schemas are supported. + +- For Primitive, Avro and JSON schemas, schemas should be provided as the full schema encoded as a string. + +- If the schema is not set, messages are encoded with string schema. + +### Example + +Below is an example of sending messages to topics using JSON schema via REST. + +Assume that you send messages representing the following class. + +```java + class Seller { + public String state; + public String street; + public long zipCode; + } + + class PC { + public String brand; + public String model; + public int year; + public GPU gpu; + public Seller seller; + } +``` + +Send messages to topics with JSON schema using the command below. + +```shell +curl --location --request POST 'brokerUrl:{8080/8081}/topics/{persistent/non-persistent}/{my-tenant}/{my-namespace}/{my-topic}' \ +--header 'Content-Type: application/json' \ +--data-raw '{ + "valueSchema": "{\"name\":\"\",\"schema\":\"eyJ0eXBlIjoicmVjb3JkIiwibmFtZSI6IlBDIiwibmFtZXNwYWNlIjoib3JnLmFwYWNoZS5wdWxzYXIuYnJva2VyLmFkbWluLlRvcGljc1Rlc3QiLCJmaWVsZHMiOlt7Im5hbWUiOiJicmFuZCIsInR5cGUiOlsibnVsbCIsInN0cmluZyJdLCJkZWZhdWx0IjpudWxsfSx7Im5hbWUiOiJncHUiLCJ0eXBlIjpbIm51bGwiLHsidHlwZSI6ImVudW0iLCJuYW1lIjoiR1BVIiwic3ltYm9scyI6WyJBTUQiLCJOVklESUEiXX1dLCJkZWZhdWx0IjpudWxsfSx7Im5hbWUiOiJtb2RlbCIsInR5cGUiOlsibnVsbCIsInN0cmluZyJdLCJkZWZhdWx0IjpudWxsfSx7Im5hbWUiOiJzZWxsZXIiLCJ0eXBlIjpbIm51bGwiLHsidHlwZSI6InJlY29yZCIsIm5hbWUiOiJTZWxsZXIiLCJmaWVsZHMiOlt7Im5hbWUiOiJzdGF0ZSIsInR5cGUiOlsibnVsbCIsInN0cmluZyJdLCJkZWZhdWx0IjpudWxsfSx7Im5hbWUiOiJzdHJlZXQiLCJ0eXBlIjpbIm51bGwiLCJzdHJpbmciXSwiZGVmYXVsdCI6bnVsbH0seyJuYW1lIjoiemlwQ29kZSIsInR5cGUiOiJsb25nIn1dfV0sImRlZmF1bHQiOm51bGx9LHsibmFtZSI6InllYXIiLCJ0eXBlIjoiaW50In1dfQ==\",\"type\":\"JSON\",\"properties\":{\"__jsr310ConversionEnabled\":\"false\",\"__alwaysAllowNull\":\"true\"},\"schemaDefinition\":\"{\\\"type\\\":\\\"record\\\",\\\"name\\\":\\\"PC\\\",\\\"namespace\\\":\\\"org.apache.pulsar.broker.admin.TopicsTest\\\",\\\"fields\\\":[{\\\"name\\\":\\\"brand\\\",\\\"type\\\":[\\\"null\\\",\\\"string\\\"],\\\"default\\\":null},{\\\"name\\\":\\\"gpu\\\",\\\"type\\\":[\\\"null\\\",{\\\"type\\\":\\\"enum\\\",\\\"name\\\":\\\"GPU\\\",\\\"symbols\\\":[\\\"AMD\\\",\\\"NVIDIA\\\"]}],\\\"default\\\":null},{\\\"name\\\":\\\"model\\\",\\\"type\\\":[\\\"null\\\",\\\"string\\\"],\\\"default\\\":null},{\\\"name\\\":\\\"seller\\\",\\\"type\\\":[\\\"null\\\",{\\\"type\\\":\\\"record\\\",\\\"name\\\":\\\"Seller\\\",\\\"fields\\\":[{\\\"name\\\":\\\"state\\\",\\\"type\\\":[\\\"null\\\",\\\"string\\\"],\\\"default\\\":null},{\\\"name\\\":\\\"street\\\",\\\"type\\\":[\\\"null\\\",\\\"string\\\"],\\\"default\\\":null},{\\\"name\\\":\\\"zipCode\\\",\\\"type\\\":\\\"long\\\"}]}],\\\"default\\\":null},{\\\"name\\\":\\\"year\\\",\\\"type\\\":\\\"int\\\"}]}\"}", + +// Schema data is just the base 64 encoded schemaDefinition. + + "producerName": "rest-producer", + "messages": [ + { + "key":"my-key", + "payload":"{\"brand\":\"dell\",\"model\":\"alienware\",\"year\":2021,\"gpu\":\"AMD\",\"seller\":{\"state\":\"WA\",\"street\":\"main street\",\"zipCode\":98004}}", + "eventTime":1603045262772, + "sequenceId":1 + }, + { + "key":"my-key", + "payload":"{\"brand\":\"asus\",\"model\":\"rog\",\"year\":2020,\"gpu\":\"NVIDIA\",\"seller\":{\"state\":\"CA\",\"street\":\"back street\",\"zipCode\":90232}}", + "eventTime":1603045262772, + "sequenceId":2 + } + ] +} +` +// Sample message +``` diff --git a/site2/website-next/docusaurus.config.js b/site2/website-next/docusaurus.config.js index 937454557083b..7b28081717d58 100644 --- a/site2/website-next/docusaurus.config.js +++ b/site2/website-next/docusaurus.config.js @@ -3,7 +3,7 @@ const darkCodeTheme = require("prism-react-renderer/themes/dracula"); const linkifyRegex = require("./plugins/remark-linkify-regex"); -const url = "https://pulsar.incubator.apache.org"; +const url = "https://pulsar.apache.org"; const javadocUrl = url + "/api"; const restApiUrl = url + "/admin-rest-api"; const functionsApiUrl = url + "/functions-rest-api"; diff --git a/site2/website/sidebars.json b/site2/website/sidebars.json index 3b8e1307aae36..af39e9c60377e 100644 --- a/site2/website/sidebars.json +++ b/site2/website/sidebars.json @@ -117,7 +117,8 @@ "client-libraries-cpp", "client-libraries-node", "client-libraries-websocket", - "client-libraries-dotnet" + "client-libraries-dotnet", + "client-libraries-rest" ], "Admin API": [ "admin-api-overview", diff --git a/site2/website/siteConfig.js b/site2/website/siteConfig.js index 0f5e884c64cb7..430cecd2fece3 100644 --- a/site2/website/siteConfig.js +++ b/site2/website/siteConfig.js @@ -88,7 +88,7 @@ const renderEndpoint = (initializedPlugin, baseUrl, keyparts, restUrl) => { return rendered_content; }; -const url = 'https://pulsar.incubator.apache.org'; +const url = 'https://pulsar.apache.org'; const javadocUrl = url + '/api'; const restApiUrl = url + "/admin-rest-api"; const functionsApiUrl = url + "/functions-rest-api"; diff --git a/site2/website/versioned_docs/version-2.8.2/admin-api-brokers.md b/site2/website/versioned_docs/version-2.8.2/admin-api-brokers.md index 6257a38598666..35b4bca16d483 100644 --- a/site2/website/versioned_docs/version-2.8.2/admin-api-brokers.md +++ b/site2/website/versioned_docs/version-2.8.2/admin-api-brokers.md @@ -5,6 +5,16 @@ sidebar_label: Brokers original_id: admin-api-brokers --- +> **Important** +> +> This page only shows **some frequently used operations**. +> +> - For the latest and complete information about `Pulsar admin`, including commands, flags, descriptions, and more, see [Pulsar admin doc](https://pulsar.apache.org/tools/pulsar-admin/). +> +> - For the latest and complete information about `REST API`, including parameters, responses, samples, and more, see {@inject: rest:REST:/} API doc. +> +> - For the latest and complete information about `Java admin API`, including classes, methods, descriptions, and more, see [Java admin API doc](https://pulsar.apache.org/api/admin/). + Pulsar brokers consist of two components: 1. An HTTP server exposing a {@inject: rest:REST:/} interface administration and [topic](reference-terminology.md#topic) lookup. diff --git a/site2/website/versioned_docs/version-2.8.2/admin-api-clusters.md b/site2/website/versioned_docs/version-2.8.2/admin-api-clusters.md index e3b0fe9cd5f95..e38614da610f0 100644 --- a/site2/website/versioned_docs/version-2.8.2/admin-api-clusters.md +++ b/site2/website/versioned_docs/version-2.8.2/admin-api-clusters.md @@ -5,6 +5,16 @@ sidebar_label: Clusters original_id: admin-api-clusters --- +> **Important** +> +> This page only shows **some frequently used operations**. +> +> - For the latest and complete information about `Pulsar admin`, including commands, flags, descriptions, and more, see [Pulsar admin doc](https://pulsar.apache.org/tools/pulsar-admin/). +> +> - For the latest and complete information about `REST API`, including parameters, responses, samples, and more, see {@inject: rest:REST:/} API doc. +> +> - For the latest and complete information about `Java admin API`, including classes, methods, descriptions, and more, see [Java admin API doc](https://pulsar.apache.org/api/admin/). + Pulsar clusters consist of one or more Pulsar [brokers](reference-terminology.md#broker), one or more [BookKeeper](reference-terminology.md#bookkeeper) servers (aka [bookies](reference-terminology.md#bookie)), and a [ZooKeeper](https://zookeeper.apache.org) cluster that provides configuration and coordination management. diff --git a/site2/website/versioned_docs/version-2.8.2/admin-api-functions.md b/site2/website/versioned_docs/version-2.8.2/admin-api-functions.md index 6c0467e27337f..3396b93bb932d 100644 --- a/site2/website/versioned_docs/version-2.8.2/admin-api-functions.md +++ b/site2/website/versioned_docs/version-2.8.2/admin-api-functions.md @@ -5,6 +5,16 @@ sidebar_label: Functions original_id: admin-api-functions --- +> **Important** +> +> This page only shows **some frequently used operations**. +> +> - For the latest and complete information about `Pulsar admin`, including commands, flags, descriptions, and more, see [Pulsar admin doc](https://pulsar.apache.org/tools/pulsar-admin/). +> +> - For the latest and complete information about `REST API`, including parameters, responses, samples, and more, see {@inject: rest:REST:/} API doc. +> +> - For the latest and complete information about `Java admin API`, including classes, methods, descriptions, and more, see [Java admin API doc](https://pulsar.apache.org/api/admin/). + **Pulsar Functions** are lightweight compute processes that * consume messages from one or more Pulsar topics diff --git a/site2/website/versioned_docs/version-2.8.2/admin-api-namespaces.md b/site2/website/versioned_docs/version-2.8.2/admin-api-namespaces.md index 2493806151fd8..79435ea65def3 100644 --- a/site2/website/versioned_docs/version-2.8.2/admin-api-namespaces.md +++ b/site2/website/versioned_docs/version-2.8.2/admin-api-namespaces.md @@ -5,6 +5,16 @@ sidebar_label: Namespaces original_id: admin-api-namespaces --- +> **Important** +> +> This page only shows **some frequently used operations**. +> +> - For the latest and complete information about `Pulsar admin`, including commands, flags, descriptions, and more, see [Pulsar admin doc](https://pulsar.apache.org/tools/pulsar-admin/). +> +> - For the latest and complete information about `REST API`, including parameters, responses, samples, and more, see {@inject: rest:REST:/} API doc. +> +> - For the latest and complete information about `Java admin API`, including classes, methods, descriptions, and more, see [Java admin API doc](https://pulsar.apache.org/api/admin/). + Pulsar [namespaces](reference-terminology.md#namespace) are logical groupings of [topics](reference-terminology.md#topic). Namespaces can be managed via: diff --git a/site2/website/versioned_docs/version-2.8.2/admin-api-overview.md b/site2/website/versioned_docs/version-2.8.2/admin-api-overview.md index 342d03fad3006..1aef9c9aeeea0 100644 --- a/site2/website/versioned_docs/version-2.8.2/admin-api-overview.md +++ b/site2/website/versioned_docs/version-2.8.2/admin-api-overview.md @@ -9,16 +9,27 @@ The Pulsar admin interface enables you to manage all important entities in a Pul You can interact with the admin interface via: -- HTTP calls, which are made against the admin {@inject: rest:REST:/} API provided by Pulsar brokers. For some RESTful APIs, they might be redirected to the owner brokers for serving with [`307 Temporary Redirect`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/307), hence the HTTP callers should handle `307 Temporary Redirect`. If you use `curl` commands, you should specify `-L` to handle redirections. -- A Java client interface. - The `pulsar-admin` CLI tool, which is available in the `bin` folder of your Pulsar installation: ```shell - $ bin/pulsar-admin + bin/pulsar-admin ``` - For complete commands of `pulsar-admin` tool, see [Pulsar admin snapshot](https://pulsar.apache.org/tools/pulsar-admin/). + > **Important** + > + > For the latest and complete information about `Pulsar admin`, including commands, flags, descriptions, and more, see [Pulsar admin doc](https://pulsar.apache.org/tools/pulsar-admin/). +- HTTP calls, which are made against the admin {@inject: rest:REST:/} API provided by Pulsar brokers. For some RESTful APIs, they might be redirected to the owner brokers for serving with [`307 Temporary Redirect`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/307), hence the HTTP callers should handle `307 Temporary Redirect`. If you use `curl` commands, you should specify `-L` to handle redirections. + + > **Important** + > + > For the latest and complete information about `REST API`, including parameters, responses, samples, and more, see {@inject: rest:REST:/} API doc. + +- A Java client interface. + + > **Important** + > + > For the latest and complete information about `Java admin API`, including classes, methods, descriptions, and more, see [Java admin API doc](https://pulsar.apache.org/api/admin/). > **The REST API is the admin interface**. Both the `pulsar-admin` CLI tool and the Java client use the REST API. If you implement your own admin interface client, you should use the REST API. diff --git a/site2/website/versioned_docs/version-2.8.2/admin-api-packages.md b/site2/website/versioned_docs/version-2.8.2/admin-api-packages.md index bfa5af6c3406a..bb8ceaf7b1ead 100644 --- a/site2/website/versioned_docs/version-2.8.2/admin-api-packages.md +++ b/site2/website/versioned_docs/version-2.8.2/admin-api-packages.md @@ -5,6 +5,16 @@ sidebar_label: Packages original_id: admin-api-packages --- +> **Important** +> +> This page only shows **some frequently used operations**. +> +> - For the latest and complete information about `Pulsar admin`, including commands, flags, descriptions, and more, see [Pulsar admin doc](https://pulsar.apache.org/tools/pulsar-admin/). +> +> - For the latest and complete information about `REST API`, including parameters, responses, samples, and more, see {@inject: rest:REST:/} API doc. +> +> - For the latest and complete information about `Java admin API`, including classes, methods, descriptions, and more, see [Java admin API doc](https://pulsar.apache.org/api/admin/). + Package management enables version management and simplifies the upgrade and rollback processes for Functions, Sinks, and Sources. When you use the same function, sink and source in different namespaces, you can upload them to a common package management system. ## Package name diff --git a/site2/website/versioned_docs/version-2.8.2/admin-api-permissions.md b/site2/website/versioned_docs/version-2.8.2/admin-api-permissions.md index 216e2d79b4e8f..293d335c05515 100644 --- a/site2/website/versioned_docs/version-2.8.2/admin-api-permissions.md +++ b/site2/website/versioned_docs/version-2.8.2/admin-api-permissions.md @@ -5,8 +5,23 @@ sidebar_label: Permissions original_id: admin-api-permissions --- -Permissions in Pulsar are managed at the [namespace](reference-terminology.md#namespace) level -(that is, within [tenants](reference-terminology.md#tenant) and [clusters](reference-terminology.md#cluster)). +> **Important** +> +> This page only shows **some frequently used operations**. +> +> - For the latest and complete information about `Pulsar admin`, including commands, flags, descriptions, and more, see [Pulsar admin doc](https://pulsar.apache.org/tools/pulsar-admin/). +> +> - For the latest and complete information about `REST API`, including parameters, responses, samples, and more, see {@inject: rest:REST:/} API doc. +> +> - For the latest and complete information about `Java admin API`, including classes, methods, descriptions, and more, see [Java admin API doc](https://pulsar.apache.org/api/admin/). + +Pulsar allows you to grant namespace-level or topic-level permission to users. + +- If you grant a namespace-level permission to a user, then the user can access all the topics under the namespace. + +- If you grant a topic-level permission to a user, then the user can access only the topic. + +The chapters below demonstrate how to grant namespace-level permissions to users. For how to grant topic-level permissions to users, see [manage topics](admin-api-topics.md/#grant-permission). ## Grant permissions diff --git a/site2/website/versioned_docs/version-2.8.2/admin-api-tenants.md b/site2/website/versioned_docs/version-2.8.2/admin-api-tenants.md index 433c76eab5311..cb7fd028e5e2c 100644 --- a/site2/website/versioned_docs/version-2.8.2/admin-api-tenants.md +++ b/site2/website/versioned_docs/version-2.8.2/admin-api-tenants.md @@ -5,6 +5,16 @@ sidebar_label: Tenants original_id: admin-api-tenants --- +> **Important** +> +> This page only shows **some frequently used operations**. +> +> - For the latest and complete information about `Pulsar admin`, including commands, flags, descriptions, and more, see [Pulsar admin doc](https://pulsar.apache.org/tools/pulsar-admin/). +> +> - For the latest and complete information about `REST API`, including parameters, responses, samples, and more, see {@inject: rest:REST:/} API doc. +> +> - For the latest and complete information about `Java admin API`, including classes, methods, descriptions, and more, see [Java admin API doc](https://pulsar.apache.org/api/admin/). + Tenants, like namespaces, can be managed using the [admin API](admin-api-overview.md). There are currently two configurable aspects of tenants: * Admin roles diff --git a/site2/website/versioned_docs/version-2.8.2/admin-api-topics.md b/site2/website/versioned_docs/version-2.8.2/admin-api-topics.md index f1c0f507298d3..c24c35241bec7 100644 --- a/site2/website/versioned_docs/version-2.8.2/admin-api-topics.md +++ b/site2/website/versioned_docs/version-2.8.2/admin-api-topics.md @@ -5,6 +5,16 @@ sidebar_label: Topics original_id: admin-api-topics --- +> **Important** +> +> This page only shows **some frequently used operations**. +> +> - For the latest and complete information about `Pulsar admin`, including commands, flags, descriptions, and more, see [Pulsar admin doc](https://pulsar.apache.org/tools/pulsar-admin/). +> +> - For the latest and complete information about `REST API`, including parameters, responses, samples, and more, see {@inject: rest:REST:/} API doc. +> +> - For the latest and complete information about `Java admin API`, including classes, methods, descriptions, and more, see [Java admin API doc](https://pulsar.apache.org/api/admin/). + Pulsar has persistent and non-persistent topics. Persistent topic is a logical endpoint for publishing and consuming messages. The topic name structure for persistent topics is: ```shell diff --git a/src/assembly-source-package.xml b/src/assembly-source-package.xml index 2677299357f3f..676e603787e7d 100644 --- a/src/assembly-source-package.xml +++ b/src/assembly-source-package.xml @@ -90,6 +90,7 @@ /src *.sh + *.py 0755 diff --git a/src/check-binary-license b/src/check-binary-license.sh similarity index 100% rename from src/check-binary-license rename to src/check-binary-license.sh diff --git a/src/pulsar-io-gen b/src/pulsar-io-gen.sh similarity index 100% rename from src/pulsar-io-gen rename to src/pulsar-io-gen.sh