Skip to content

Commit

Permalink
Revert "[Discovery Service] Remove module and all its references (apa…
Browse files Browse the repository at this point in the history
…che#12119)"

This reverts commit 8c4c630.
  • Loading branch information
michaeljmarshall committed Nov 29, 2022
1 parent 58ad3d0 commit 7a2f0a4
Show file tree
Hide file tree
Showing 32 changed files with 3,490 additions and 7 deletions.
10 changes: 10 additions & 0 deletions bin/pulsar
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ 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_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
DEFAULT_STANDALONE_CONF=$PULSAR_HOME/conf/standalone.conf
DEFAULT_WEBSOCKET_CONF=$PULSAR_HOME/conf/websocket.conf
Expand Down Expand Up @@ -57,6 +58,7 @@ where command is one of:
bookie Run a bookie server
zookeeper Run a zookeeper server
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
Expand Down Expand Up @@ -86,6 +88,7 @@ Environment variables:
PULSAR_BOOKKEEPER_CONF Configuration file for bookie (default: $DEFAULT_BOOKKEEPER_CONF)
PULSAR_ZK_CONF Configuration file for zookeeper (default: $DEFAULT_ZK_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)
PULSAR_WORKER_CONF Configuration file for functions worker (default: $DEFAULT_WORKER_CONF)
Expand Down Expand Up @@ -241,6 +244,10 @@ if [ -z "$PULSAR_CONFIGURATION_STORE_CONF" ]; then
PULSAR_CONFIGURATION_STORE_CONF=$DEFAULT_CONFIGURATION_STORE_CONF
fi

if [ -z "$PULSAR_DISCOVERY_CONF" ]; then
PULSAR_DISCOVERY_CONF=$DEFAULT_DISCOVERY_CONF
fi

if [ -z "$PULSAR_PROXY_CONF" ]; then
PULSAR_PROXY_CONF=$DEFAULT_PROXY_CONF
fi
Expand Down Expand Up @@ -377,6 +384,9 @@ elif [ $COMMAND == "configuration-store" ]; then
# Allow global ZK to turn into read-only mode when it cannot reach the quorum
OPTS="${OPTS} ${ZK_OPTS} -Dreadonlymode.enabled=true"
exec $JAVA $OPTS -Dpulsar.log.file=$PULSAR_LOG_FILE org.apache.zookeeper.server.quorum.QuorumPeerMain $PULSAR_CONFIGURATION_STORE_CONF $@
elif [ $COMMAND == "discovery" ]; then
PULSAR_LOG_FILE=${PULSAR_LOG_FILE:-"discovery.log"}
exec $JAVA $OPTS -Dpulsar.log.file=$PULSAR_LOG_FILE org.apache.pulsar.discovery.service.server.DiscoveryServiceStarter $PULSAR_DISCOVERY_CONF $@
elif [ $COMMAND == "proxy" ]; then
PULSAR_LOG_FILE=${PULSAR_LOG_FILE:-"pulsar-proxy.log"}
exec $JAVA $OPTS -Dpulsar.log.file=$PULSAR_LOG_FILE org.apache.pulsar.proxy.server.ProxyServiceStarter --config $PULSAR_PROXY_CONF $@
Expand Down
4 changes: 4 additions & 0 deletions bin/pulsar-daemon
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ where command is one of:
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
functions-worker Run a functions worker server
standalone Run a standalone Pulsar service
Expand Down Expand Up @@ -99,6 +100,9 @@ case $command in
(configuration-store)
echo "doing $startStop $command ..."
;;
(discovery)
echo "doing $startStop $command ..."
;;
(websocket)
echo "doing $startStop $command ..."
;;
Expand Down
90 changes: 90 additions & 0 deletions conf/discovery.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
#
# 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.
#

# Zookeeper quorum connection string (comma-separated)
zookeeperServers=

# Configuration Store connection string (comma-separated)
configurationStoreServers=

# ZooKeeper session timeout
zookeeperSessionTimeoutMs=30000

# ZooKeeper cache expiry time in seconds
zooKeeperCacheExpirySeconds=300

# Port to use to server binary-proto request
servicePort=6650

# Port to use to server binary-proto-tls request
servicePortTls=

# Port that discovery service listen on
webServicePort=8080

# Port to use to server HTTPS request
webServicePortTls=

# Control whether to bind directly on localhost rather than on normal hostname
bindOnLocalhost=false

### --- Authentication --- ###

# Enable authentication
authenticationEnabled=false

# Authentication provider name list, which is comma separated list of class names (comma-separated)
authenticationProviders=

# Enforce authorization
authorizationEnabled=false

# Authorization provider name list, which is comma separated list of class names
authorizationProviders=org.apache.pulsar.broker.authorization.PulsarAuthorizationProvider

# Role names that are treated as "super-user", meaning they will be able to do all admin
# operations and publish/consume from all topics (comma-separated)
superUserRoles=

# Allow wildcard matching in authorization
# (wildcard matching only applicable if wildcard-char:
# * presents at first or last position eg: *.pulsar.service, pulsar.service.*)
authorizationAllowWildcardsMatching=false

##### --- TLS --- #####
# Deprecated - Use servicePortTls and webServicePortTls instead
tlsEnabled=false

# Path for the TLS certificate file
tlsCertificateFilePath=

# Path for the TLS private key file
tlsKeyFilePath=

# Specify whether Client certificates are required for TLS
# Reject the Connection if the Client Certificate is not trusted.
tlsRequireTrustedClientCertOnConnect=false

# Tls cert refresh duration in seconds (set 0 to check on every new connection)
tlsCertRefreshCheckDurationSec=300

### --- Deprecated config variables --- ###

# Deprecated. Use configurationStoreServers
globalZookeeperServers=
13 changes: 6 additions & 7 deletions distribution/server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>pulsar-discovery-service</artifactId>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>pulsar-proxy</artifactId>
Expand Down Expand Up @@ -175,13 +181,6 @@
<artifactId>simpleclient_log4j2</artifactId>
</dependency>

<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>bouncy-castle-bc</artifactId>
<version>${project.version}</version>
<classifier>pkg</classifier>
</dependency>

<!-- function examples -->
<dependency>
<groupId>${project.groupId}</groupId>
Expand Down
2 changes: 2 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2105,6 +2105,7 @@ flexible messaging model and an intuitive client API.</description>
<module>pulsar-client-all</module>
<module>pulsar-websocket</module>
<module>pulsar-proxy</module>
<module>pulsar-discovery-service</module>
<module>pulsar-testclient</module>
<module>pulsar-broker-auth-athenz</module>
<module>pulsar-client-auth-athenz</module>
Expand Down Expand Up @@ -2169,6 +2170,7 @@ flexible messaging model and an intuitive client API.</description>
<module>pulsar-client-tools-test</module>
<module>pulsar-websocket</module>
<module>pulsar-proxy</module>
<module>pulsar-discovery-service</module>
<module>pulsar-testclient</module>
<module>pulsar-broker-auth-sasl</module>
<module>pulsar-client-auth-sasl</module>
Expand Down
7 changes: 7 additions & 0 deletions pulsar-broker/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,13 @@
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>pulsar-discovery-service</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>pulsar-websocket</artifactId>
Expand Down
Loading

0 comments on commit 7a2f0a4

Please sign in to comment.