This is an automated email from the ASF dual-hosted git repository. mmerli pushed a commit to branch pull/1059 in repository https://gitbox.apache.org/repos/asf/incubator-pulsar.git
commit f1f4b3631e5aa4cfadff5208d1f3ec1353932638 Author: Matteo Merli <mme...@apache.org> AuthorDate: Thu Apr 26 22:32:10 2018 -0700 Hide deprecated options and few more adjustments --- bin/pulsar | 13 ++++----- bin/pulsar-admin | 1 - bin/pulsar-daemon | 13 +++++---- conf/broker.conf | 9 ++++--- conf/discovery.conf | 9 ++++--- conf/proxy.conf | 13 +++++---- conf/standalone.conf | 9 ++++--- conf/websocket.conf | 9 ++++--- .../apache/pulsar/broker/ServiceConfiguration.java | 6 +++++ .../apache/pulsar/PulsarClusterMetadataSetup.java | 5 ++-- .../pulsar/zookeeper/GlobalZooKeeperStarter.java | 31 ---------------------- site/docs/latest/deployment/cluster.md | 4 +-- 12 files changed, 55 insertions(+), 67 deletions(-) diff --git a/bin/pulsar b/bin/pulsar index 16854b4..4a58d30 100755 --- a/bin/pulsar +++ b/bin/pulsar @@ -24,7 +24,6 @@ PULSAR_HOME=`cd $BINDIR/..;pwd` DEFAULT_BROKER_CONF=$PULSAR_HOME/conf/broker.conf DEFAULT_BOOKKEEPER_CONF=$PULSAR_HOME/conf/bookkeeper.conf DEFAULT_ZK_CONF=$PULSAR_HOME/conf/zookeeper.conf -DEFAULT_GLOBAL_ZK_CONF=$PULSAR_HOME/conf/global_zookeeper.conf DEFAULT_CONFIGURATION_STORE_CONF=$PULSAR_HOME/conf/global_zookeeper.conf DEFAULT_DISCOVERY_CONF=$PULSAR_HOME/conf/discovery.conf DEFAULT_PROXY_CONF=$PULSAR_HOME/conf/proxy.conf @@ -104,19 +103,19 @@ pulsar_help() { cat <<EOF Usage: pulsar <command> where command is one of: + broker Run a broker server bookie Run a bookie server zookeeper Run a zookeeper server - global-zookeeper Run a configuration-store server (Deprecated. Use "bin/pulsar configuration-store" instead) configuration-store Run a configuration-store server discovery Run a discovery server proxy Run a pulsar proxy websocket Run a web socket proxy server functions-worker Run a functions worker server standalone Run a broker server with local bookies and local zookeeper - compact-topic Run compaction against a topic initialize-cluster-metadata One-time metadata initialization + compact-topic Run compaction against a topic zookeeper-shell Open a ZK shell client help This help message @@ -128,8 +127,7 @@ Environment variables: PULSAR_BROKER_CONF Configuration file for broker (default: $DEFAULT_BROKER_CONF) PULSAR_BOOKKEEPER_CONF Configuration file for bookie (default: $DEFAULT_BOOKKEEPER_CONF) PULSAR_ZK_CONF Configuration file for zookeeper (default: $DEFAULT_ZK_CONF) - PULSAR_GLOBAL_ZK_CONF Configuration file for global configuration zookeeper (default: $DEFAULT_GLOBAL_ZK_CONF) (Deprecated. Replace with "PULSAR_CONFIGURATION_STORE_CONF") - PULSAR_CONFIGURATION_STORE_CONF Configuration file for global configuration zookeeper (default: $DEFAULT_CONFIGURATION_STORE_CONF) + PULSAR_CONFIGURATION_STORE_CONF Configuration file for global configuration store (default: $DEFAULT_CONFIGURATION_STORE_CONF) PULSAR_DISCOVERY_CONF Configuration file for discovery service (default: $DEFAULT_DISCOVERY_CONF) PULSAR_WEBSOCKET_CONF Configuration file for websocket proxy (default: $DEFAULT_WEBSOCKET_CONF) PULSAR_PROXY_CONF Configuration file for Pulsar proxy (default: $DEFAULT_PROXY_CONF) @@ -298,5 +296,8 @@ elif [ $COMMAND == "compact-topic" ]; then elif [ $COMMAND == "help" ]; then pulsar_help; else - exec $JAVA $OPTS $COMMAND $@ + echo "" + echo "-- Invalid command '$COMMAND' -- Use '$0 help' to get a list of valid commands" + echo "" + exit 1 fi diff --git a/bin/pulsar-admin b/bin/pulsar-admin index c8b41da..837a605 100755 --- a/bin/pulsar-admin +++ b/bin/pulsar-admin @@ -146,5 +146,4 @@ OPTS="$OPTS -Dpulsar.functions.python.instance.file=${PY_INSTANCE_FILE}" #Change to PULSAR_HOME to support relative paths cd "$PULSAR_HOME" - exec $JAVA $OPTS org.apache.pulsar.admin.cli.PulsarAdminTool $PULSAR_CLIENT_CONF "$@" diff --git a/bin/pulsar-daemon b/bin/pulsar-daemon index ee102d0..0957413 100755 --- a/bin/pulsar-daemon +++ b/bin/pulsar-daemon @@ -22,14 +22,13 @@ usage() { cat <<EOF Usage: pulsar-daemon (start|stop) <command> <args...> where command is one of: - broker Run a broker server - bookie Run a bookie server - zookeeper Run a zookeeper server - global-zookeeper Run a configuration-store server (Deprecated. Use pulsar-daemon configuration-store instead) + broker Run a broker server + bookie Run a bookie server + zookeeper Run a zookeeper server configuration-store Run a configuration-store server - discovery Run a discovery server - websocket Run a websocket proxy server - standalone Run a standalone Pulsar service + discovery Run a discovery server + websocket Run a websocket proxy server + standalone Run a standalone Pulsar service where argument is one of: -force (accepted only with stop command): Decides whether to stop the server forcefully if not stopped by normal shutdown diff --git a/conf/broker.conf b/conf/broker.conf index 8b95457..08e218c 100644 --- a/conf/broker.conf +++ b/conf/broker.conf @@ -22,9 +22,6 @@ # Zookeeper quorum connection string zookeeperServers= -# Deprecated. Global Zookeeper quorum connection string -globalZookeeperServers= - # Configuration Store connection string configurationStoreServers= @@ -455,3 +452,9 @@ exposeTopicLevelMetricsInPrometheus=true # Enable Functions Worker Service in Broker functionsWorkerEnabled=false + + +### --- Deprecated config variables --- ### + +# Deprecated. Use configurationStoreServers +globalZookeeperServers= diff --git a/conf/discovery.conf b/conf/discovery.conf index ceb3cd6..b1b6f41 100644 --- a/conf/discovery.conf +++ b/conf/discovery.conf @@ -20,9 +20,6 @@ # Zookeeper quorum connection string (comma-separated) zookeeperServers= -# Deprecated. Global zookeeper quorum connection string (comma-separated) -globalZookeeperServers= - # Configuration Store connection string (comma-separated) configurationStoreServers= @@ -80,3 +77,9 @@ tlsKeyFilePath= # Specify whether Client certificates are required for TLS # Reject the Connection if the Client Certificate is not trusted. tlsRequireTrustedClientCertOnConnect=false + + +### --- Deprecated config variables --- ### + +# Deprecated. Use configurationStoreServers +globalZookeeperServers= diff --git a/conf/proxy.conf b/conf/proxy.conf index 440de09..a904f47 100644 --- a/conf/proxy.conf +++ b/conf/proxy.conf @@ -20,9 +20,6 @@ # Zookeeper quorum connection string (comma-separated) zookeeperServers= -# Deprecated. Global zookeeper quorum connection string (comma-separated) -globalZookeeperServers= - # Configuration Store connection string (comma-separated) configurationStoreServers= @@ -73,10 +70,10 @@ superUserRoles= forwardAuthorizationCredentials=false # --- RateLimiting ---- -# Max concurrent inbound Connections, proxy will reject requests beyond that. Default value is 10,000 +# Max concurrent inbound Connections, proxy will reject requests beyond that. Default value is 10,000 maxConcurrentInboundConnections=10000 -# Max concurrent outbound Connections, proxy will error out requests beyond that. Default value is 10,000 +# Max concurrent outbound Connections, proxy will error out requests beyond that. Default value is 10,000 maxConcurrentLookupRequests=10000 ##### --- TLS --- ##### @@ -99,3 +96,9 @@ tlsHostnameVerificationEnabled=false # Specify whether Client certificates are required for TLS # Reject the Connection if the Client Certificate is not trusted. tlsRequireTrustedClientCertOnConnect=false + + +### --- Deprecated config variables --- ### + +# Deprecated. Use configurationStoreServers +globalZookeeperServers= diff --git a/conf/standalone.conf b/conf/standalone.conf index 4da94db..d10f674 100644 --- a/conf/standalone.conf +++ b/conf/standalone.conf @@ -22,9 +22,6 @@ # Zookeeper quorum connection string zookeeperServers= -# Deprecated. Global Zookeeper quorum connection string -globalZookeeperServers= - # Configuration Store connection string configurationStoreServers= @@ -394,3 +391,9 @@ webSocketConnectionsPerBroker=8 # Enable topic level metrics exposeTopicLevelMetricsInPrometheus=true + + +### --- Deprecated config variables --- ### + +# Deprecated. Use configurationStoreServers +globalZookeeperServers= diff --git a/conf/websocket.conf b/conf/websocket.conf index 67577bc..f9f2436 100644 --- a/conf/websocket.conf +++ b/conf/websocket.conf @@ -19,9 +19,6 @@ ### --- Web Socket proxy settings --- ### -# Deprecated. Global zookeeper quorum connection string -globalZookeeperServers= - # Configuration Store connection string configurationStoreServers= @@ -106,3 +103,9 @@ tlsTrustCertsFilePath= # Specify whether Client certificates are required for TLS # Reject the Connection if the Client Certificate is not trusted. tlsRequireTrustedClientCertOnConnect=false + + +### --- Deprecated config variables --- ### + +# Deprecated. Use configurationStoreServers +globalZookeeperServers= 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 b46c4bd..cbf2360 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 @@ -464,6 +464,9 @@ public class ServiceConfiguration implements PulsarConfiguration { this.zookeeperServers = zookeeperServers; } + /** + * @deprecated See {@link #getConfigurationStoreServers} + */ @Deprecated public String getGlobalZookeeperServers() { if (this.globalZookeeperServers == null || this.globalZookeeperServers.isEmpty()) { @@ -474,6 +477,9 @@ public class ServiceConfiguration implements PulsarConfiguration { return globalZookeeperServers; } + /** + * @deprecated See {@link #setConfigurationStoreServers(String)} + */ @Deprecated public void setGlobalZookeeperServers(String globalZookeeperServers) { this.globalZookeeperServers = globalZookeeperServers; diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/PulsarClusterMetadataSetup.java b/pulsar-broker/src/main/java/org/apache/pulsar/PulsarClusterMetadataSetup.java index 2aed5be..ae27b56 100644 --- a/pulsar-broker/src/main/java/org/apache/pulsar/PulsarClusterMetadataSetup.java +++ b/pulsar-broker/src/main/java/org/apache/pulsar/PulsarClusterMetadataSetup.java @@ -78,13 +78,12 @@ public class PulsarClusterMetadataSetup { "--zookeeper" }, description = "Local ZooKeeper quorum connection string", required = true) private String zookeeper; - @Deprecated @Parameter(names = { "-gzk", - "--global-zookeeper" }, description = "Global ZooKeeper quorum connection string", required = true) + "--global-zookeeper" }, description = "Global ZooKeeper quorum connection string", required = true, hidden = true) private String globalZookeeper; @Parameter(names = { "-cs", - "--configuration-store" }, description = "Configuration Store connection string", required = false) + "--configuration-store" }, description = "Configuration Store connection string", required = true) private String configurationStore; @Parameter(names = { "-h", "--help" }, description = "Show this help message") diff --git a/pulsar-zookeeper/src/main/java/org/apache/pulsar/zookeeper/GlobalZooKeeperStarter.java b/pulsar-zookeeper/src/main/java/org/apache/pulsar/zookeeper/GlobalZooKeeperStarter.java deleted file mode 100644 index 92b3d1f..0000000 --- a/pulsar-zookeeper/src/main/java/org/apache/pulsar/zookeeper/GlobalZooKeeperStarter.java +++ /dev/null @@ -1,31 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.pulsar.zookeeper; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@Deprecated -public class GlobalZooKeeperStarter extends ZooKeeperStarter { - public static void main(String[] args) throws Exception { - start(args, "8001"); - } - - private static final Logger log = LoggerFactory.getLogger(GlobalZooKeeperStarter.class); -} diff --git a/site/docs/latest/deployment/cluster.md b/site/docs/latest/deployment/cluster.md index 0a23b0e..773cfa2 100644 --- a/site/docs/latest/deployment/cluster.md +++ b/site/docs/latest/deployment/cluster.md @@ -142,7 +142,7 @@ You can initialize this metadata using the [`initialize-cluster-metadata`](../.. $ bin/pulsar initialize-cluster-metadata \ --cluster pulsar-cluster-1 \ --zookeeper zk1.us-west.example.com:2181 \ - --global-zookeeper zk1.us-west.example.com:2181 \ + --configuration-store zk1.us-west.example.com:2181 \ --web-service-url http://pulsar.us-west.example.com:8080 \ --web-service-url-tls https://pulsar.us-west.example.com:8443 \ --broker-service-url pulsar://pulsar.us-west.example.com:6650 \ @@ -155,7 +155,7 @@ Flag | Description :----|:----------- `--cluster` | A name for the cluster `--zookeeper` | A "local" ZooKeeper connection string for the cluster. This connection string only needs to include *one* machine in the ZooKeeper cluster. -`--global-zookeeper` | The "global" ZooKeeper connection string for the entire instance. As with the `--zookeeper` flag, this connection string only needs to include *one* machine in the ZooKeeper cluster. +`--configuration-store` | The configuration store (ZooKeeper) where the configuration policies for all tenants and namespaces across all clusters will be stored. As with the `--zookeeper` flag, this connection string only needs to include *one* machine in the ZooKeeper cluster. `--web-service-url` | The web service URL for the cluster, plus a port. This URL should be a standard DNS name. The default port is 8080 (we don't recommend using a different port). `--web-service-url-tls` | If you're using [TLS](../../../admin/Authz#tls-client-auth), you'll also need to specify a TLS web service URL for the cluster. The default port is 8443 (we don't recommend using a different port). `--broker-service-url` | A broker service URL enabling interaction with the {% popover brokers %} in the cluster. This URL should use the same DNS name as the web service URL but should use the `pulsar` scheme instead. The default port is 6650 (we don't recommend using a different port). -- To stop receiving notification emails like this one, please contact mme...@apache.org.