Skip to content

Commit

Permalink
Renamed java package names in scripts and documentation (apache#524)
Browse files Browse the repository at this point in the history
  • Loading branch information
merlimat committed Jun 23, 2017
1 parent 70da31b commit 251594e
Show file tree
Hide file tree
Showing 31 changed files with 136 additions and 136 deletions.
14 changes: 7 additions & 7 deletions bin/pulsar
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ OPTS="$OPTS -Dpulsar.log.dir=$PULSAR_LOG_DIR"
cd "$PULSAR_HOME"
if [ $COMMAND == "broker" ]; then
PULSAR_LOG_FILE=${PULSAR_LOG_FILE:-"pulsar-broker.log"}
exec $JAVA $OPTS -Dpulsar.log.file=$PULSAR_LOG_FILE com.yahoo.pulsar.PulsarBrokerStarter $PULSAR_BROKER_CONF $@
exec $JAVA $OPTS -Dpulsar.log.file=$PULSAR_LOG_FILE org.apache.pulsar.PulsarBrokerStarter $PULSAR_BROKER_CONF $@
elif [ $COMMAND == "bookie" ]; then
PULSAR_LOG_FILE=${PULSAR_LOG_FILE:-"bookkeeper.log"}
exec $JAVA $OPTS -Dpulsar.log.file=$PULSAR_LOG_FILE org.apache.bookkeeper.proto.BookieServer --conf $PULSAR_BOOKKEEPER_CONF $@
Expand All @@ -199,26 +199,26 @@ elif [ $COMMAND == "zookeeper" ]; then
# Add instrumentation
WEAVER_JAR=`find $PULSAR_HOME/lib -name 'aspectjweaver-*.jar'`
if [ -n "$WEAVER_JAR" ]; then OPTS="$OPTS -javaagent:$WEAVER_JAR"; fi
exec $JAVA $OPTS -Dpulsar.log.file=$PULSAR_LOG_FILE com.yahoo.pulsar.zookeeper.ZooKeeperStarter $PULSAR_ZK_CONF $@
exec $JAVA $OPTS -Dpulsar.log.file=$PULSAR_LOG_FILE org.apache.pulsar.zookeeper.ZooKeeperStarter $PULSAR_ZK_CONF $@
elif [ $COMMAND == "global-zookeeper" ]; then
PULSAR_LOG_FILE=${PULSAR_LOG_FILE:-"global-zookeeper.log"}
# Allow global ZK to turn into read-only mode when it cannot reach the quorum
OPTS="${OPTS} -Dreadonlymode.enabled=true"
# Add instrumentation
WEAVER_JAR=`find $PULSAR_HOME/lib -name 'aspectjweaver-*.jar'`
if [ -n "$WEAVER_JAR" ]; then OPTS="$OPTS -javaagent:$WEAVER_JAR"; fi
exec $JAVA $OPTS -Dpulsar.log.file=$PULSAR_LOG_FILE com.yahoo.pulsar.zookeeper.ZooKeeperStarter $PULSAR_GLOBAL_ZK_CONF $@
exec $JAVA $OPTS -Dpulsar.log.file=$PULSAR_LOG_FILE org.apache.pulsar.zookeeper.ZooKeeperStarter $PULSAR_GLOBAL_ZK_CONF $@
elif [ $COMMAND == "discovery" ]; then
PULSAR_LOG_FILE=${PULSAR_LOG_FILE:-"discovery.log"}
exec $JAVA $OPTS -Dpulsar.log.file=$PULSAR_LOG_FILE com.yahoo.pulsar.discovery.service.server.DiscoveryServiceStarter $PULSAR_DISCOVERY_CONF $@
exec $JAVA $OPTS -Dpulsar.log.file=$PULSAR_LOG_FILE org.apache.pulsar.discovery.service.server.DiscoveryServiceStarter $PULSAR_DISCOVERY_CONF $@
elif [ $COMMAND == "websocket" ]; then
PULSAR_LOG_FILE=${PULSAR_LOG_FILE:-"pulsar-websocket.log"}
exec $JAVA $OPTS -Dpulsar.log.file=$PULSAR_LOG_FILE com.yahoo.pulsar.websocket.service.WebSocketServiceStarter $PULSAR_WEBSOCKET_CONF $@
exec $JAVA $OPTS -Dpulsar.log.file=$PULSAR_LOG_FILE org.apache.pulsar.websocket.service.WebSocketServiceStarter $PULSAR_WEBSOCKET_CONF $@
elif [ $COMMAND == "standalone" ]; then
PULSAR_LOG_FILE=${PULSAR_LOG_FILE:-"pulsar-standalone.log"}
exec $JAVA $OPTS -Dpulsar.log.file=$PULSAR_LOG_FILE com.yahoo.pulsar.PulsarStandaloneStarter --config $PULSAR_STANDALONE_CONF $@
exec $JAVA $OPTS -Dpulsar.log.file=$PULSAR_LOG_FILE org.apache.pulsar.PulsarStandaloneStarter --config $PULSAR_STANDALONE_CONF $@
elif [ $COMMAND == "initialize-cluster-metadata" ]; then
exec $JAVA $OPTS com.yahoo.pulsar.PulsarClusterMetadataSetup $@
exec $JAVA $OPTS org.apache.pulsar.PulsarClusterMetadataSetup $@
elif [ $COMMAND == "zookeeper-shell" ]; then
exec $JAVA $OPTS org.apache.zookeeper.ZooKeeperMain $@
elif [ $COMMAND == "help" ]; then
Expand Down
2 changes: 1 addition & 1 deletion bin/pulsar-admin
Original file line number Diff line number Diff line change
Expand Up @@ -106,4 +106,4 @@ OPTS="$OPTS -Dpulsar.log.dir=$PULSAR_LOG_DIR"
#Change to PULSAR_HOME to support relative paths
cd "$PULSAR_HOME"

exec $JAVA $OPTS com.yahoo.pulsar.admin.cli.PulsarAdminTool $PULSAR_CLIENT_CONF "$@"
exec $JAVA $OPTS org.apache.pulsar.admin.cli.PulsarAdminTool $PULSAR_CLIENT_CONF "$@"
2 changes: 1 addition & 1 deletion bin/pulsar-client
Original file line number Diff line number Diff line change
Expand Up @@ -106,4 +106,4 @@ OPTS="$OPTS -Dpulsar.log.dir=$PULSAR_LOG_DIR"
#Change to PULSAR_HOME to support relative paths
cd "$PULSAR_HOME"

exec $JAVA $OPTS com.yahoo.pulsar.client.cli.PulsarClientTool $PULSAR_CLIENT_CONF "$@"
exec $JAVA $OPTS org.apache.pulsar.client.cli.PulsarClientTool $PULSAR_CLIENT_CONF "$@"
14 changes: 7 additions & 7 deletions bin/pulsar-perf
Original file line number Diff line number Diff line change
Expand Up @@ -143,19 +143,19 @@ COMMAND=$1
shift

if [ "$COMMAND" == "produce" ]; then
exec $JAVA $OPTS com.yahoo.pulsar.testclient.PerformanceProducer --conf-file $PULSAR_PERFTEST_CONF "$@"
exec $JAVA $OPTS org.apache.pulsar.testclient.PerformanceProducer --conf-file $PULSAR_PERFTEST_CONF "$@"
elif [ "$COMMAND" == "consume" ]; then
exec $JAVA $OPTS com.yahoo.pulsar.testclient.PerformanceConsumer --conf-file $PULSAR_PERFTEST_CONF "$@"
exec $JAVA $OPTS org.apache.pulsar.testclient.PerformanceConsumer --conf-file $PULSAR_PERFTEST_CONF "$@"
elif [ "$COMMAND" == "read" ]; then
exec $JAVA $OPTS com.yahoo.pulsar.testclient.PerformanceReader --conf-file $PULSAR_PERFTEST_CONF "$@"
exec $JAVA $OPTS org.apache.pulsar.testclient.PerformanceReader --conf-file $PULSAR_PERFTEST_CONF "$@"
elif [ "$COMMAND" == "monitor-brokers" ]; then
exec $JAVA $OPTS com.yahoo.pulsar.testclient.BrokerMonitor "$@"
exec $JAVA $OPTS org.apache.pulsar.testclient.BrokerMonitor "$@"
elif [ "$COMMAND" == "simulation-client" ]; then
exec $JAVA $OPTS com.yahoo.pulsar.testclient.LoadSimulationClient "$@"
exec $JAVA $OPTS org.apache.pulsar.testclient.LoadSimulationClient "$@"
elif [ "$COMMAND" == "simulation-controller" ]; then
exec $JAVA $OPTS com.yahoo.pulsar.testclient.LoadSimulationController "$@"
exec $JAVA $OPTS org.apache.pulsar.testclient.LoadSimulationController "$@"
elif [ "$COMMAND" == "websocket-producer" ]; then
exec $JAVA $OPTS com.yahoo.pulsar.proxy.socket.client.PerformanceClient "$@"
exec $JAVA $OPTS org.apache.pulsar.proxy.socket.client.PerformanceClient "$@"
elif [ "$COMMAND" == "help" ]; then
pulsar_help;
else
Expand Down
2 changes: 1 addition & 1 deletion conf/broker.conf
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ keepAliveIntervalSeconds=30
brokerServicePurgeInactiveFrequencyInSeconds=60

# Name of load manager to use
loadManagerClassName=com.yahoo.pulsar.broker.loadbalance.impl.SimpleLoadManagerImpl
loadManagerClassName=org.apache.pulsar.broker.loadbalance.impl.SimpleLoadManagerImpl

### --- WebSocket --- ###

Expand Down
2 changes: 1 addition & 1 deletion docs/AdminTools.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ each API and how admin CLI command maps to its appropriate REST api.

### Java API

Java-api can be accessed by : ```com.yahoo.pulsar.client.admin.PulsarAdmin```
Java-api can be accessed by : ```org.apache.pulsar.client.admin.PulsarAdmin```

Below code snippet shows how to initialize *PulsarAdmin* and later in
the document we will see how to use it in order to manage Pulsar
Expand Down
8 changes: 4 additions & 4 deletions docs/Authentication.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ tlsTrustCertsFilePath=/path/to/cacert.pem
# Add TLS auth provider
authenticationEnabled=true
authorizationEnabled=true
authenticationProviders=com.yahoo.pulsar.broker.authentication.AuthenticationProviderTls
authenticationProviders=org.apache.pulsar.broker.authentication.AuthenticationProviderTls
```

#### Configure discovery service
Expand Down Expand Up @@ -171,7 +171,7 @@ add there the authentication parameters:
```shell
serviceUrl=https://broker.example.com:8443/
authPlugin=com.yahoo.pulsar.client.impl.auth.AuthenticationTls
authPlugin=org.apache.pulsar.client.impl.auth.AuthenticationTls
authParams=tlsCertFile:/path/to/client-cert.pem,tlsKeyFile:/path/to/client-key.pem
useTls=true
tlsAllowInsecureConnection=false
Expand Down Expand Up @@ -223,7 +223,7 @@ The class name of the Athenz authentication provider and comma separated provide
# Add Athenz auth provider
authenticationEnabled=true
authorizationEnabled=true
authenticationProviders=com.yahoo.pulsar.broker.authentication.AuthenticationProviderAthenz
authenticationProviders=org.apache.pulsar.broker.authentication.AuthenticationProviderAthenz
athenzDomainNames=pulsar

# Enable TLS
Expand Down Expand Up @@ -265,7 +265,7 @@ add there the authentication parameters:
serviceUrl=https://broker.example.com:8443/

# Set Athenz auth plugin and its parameters
authPlugin=com.yahoo.pulsar.client.impl.auth.AuthenticationAthenz
authPlugin=org.apache.pulsar.client.impl.auth.AuthenticationAthenz
authParams=tenantDomain:shopping,tenantService:some_app,providerDomain:pulsar,privateKeyPath:/path/to/private.pem,keyId:v1

# Enable TLS
Expand Down
38 changes: 19 additions & 19 deletions docs/ModularLoadManager.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@ abstractions so that complex load management strategies may be implemented.
## Usage
To use the modular load manager, change

`loadManagerClassName=com.yahoo.pulsar.broker.loadbalance.impl.SimpleLoadManagerImpl`
`loadManagerClassName=org.apache.pulsar.broker.loadbalance.impl.SimpleLoadManagerImpl`

in `broker.conf` to

`loadManagerClassName=com.yahoo.pulsar.broker.loadbalance.impl.ModularLoadManagerImpl`
`loadManagerClassName=org.apache.pulsar.broker.loadbalance.impl.ModularLoadManagerImpl`

Alternatively, the load manager may also be changed dynamically via the `pulsar-admin` tool as follows:

`pulsar-admin update-dynamic-config --config loadManagerClassName --value
com.yahoo.pulsar.broker.loadbalance.impl.ModularLoadManagerImpl`
org.apache.pulsar.broker.loadbalance.impl.ModularLoadManagerImpl`

The admin tool may also be used to change back to `com.yahoo.pulsar.broker.loadbalance.impl.SimpleLoadManagerImpl`. In either
The admin tool may also be used to change back to `org.apache.pulsar.broker.loadbalance.impl.SimpleLoadManagerImpl`. In either
case, any mistake in specifying the load manager will cause Pulsar to default to `SimpleLoadManagerImpl`.

## Verification
Expand All @@ -29,18 +29,18 @@ There are a few different ways to determine which load manager is being used:
```
$ ./pulsar-admin brokers get-all-dynamic-config
{
"loadManagerClassName" : "com.yahoo.pulsar.broker.loadbalance.impl.ModularLoadManagerImpl"
"loadManagerClassName" : "org.apache.pulsar.broker.loadbalance.impl.ModularLoadManagerImpl"
}
```

If there is no `loadManagerClassName` element, then the default load manager (`com.yahoo.pulsar.broker.loadbalance.impl.SimpleLoadManagerImpl`)
If there is no `loadManagerClassName` element, then the default load manager (`org.apache.pulsar.broker.loadbalance.impl.SimpleLoadManagerImpl`)
is being used.

2. Look at a load report in ZooKeeper

With `com.yahoo.pulsar.broker.loadbalance.impl.ModularLoadManagerImpl`, the load report in `/loadbalance/brokers/...`
With `org.apache.pulsar.broker.loadbalance.impl.ModularLoadManagerImpl`, the load report in `/loadbalance/brokers/...`
will have many differences. E.g., the `systemResourceUsage` subelements (`bandwidthIn`, `bandwidthOut`, ...) are now all at the top-level.
Here is an example load report from `com.yahoo.pulsar.broker.loadbalance.impl.ModularLoadManagerImpl`:
Here is an example load report from `org.apache.pulsar.broker.loadbalance.impl.ModularLoadManagerImpl`:

```
{
Expand All @@ -65,7 +65,7 @@ Here is an example load report from `com.yahoo.pulsar.broker.loadbalance.impl.Mo
}
```

With `com.yahoo.pulsar.broker.loadbalance.impl.SimpleLoadManagerImpl`, the load report in `/loadbalance/brokers/...`
With `org.apache.pulsar.broker.loadbalance.impl.SimpleLoadManagerImpl`, the load report in `/loadbalance/brokers/...`
will look like this:

```
Expand Down Expand Up @@ -99,7 +99,7 @@ will look like this:
3. The command-line broker monitor (`./pulsar-perf monitor-brokers ...`) will have a different output format depending on which load manager
implementation is being used.

Here is an example from `com.yahoo.pulsar.broker.loadbalance.impl.ModularLoadManagerImpl`:
Here is an example from `org.apache.pulsar.broker.loadbalance.impl.ModularLoadManagerImpl`:
```
===================================================================================================================
||SYSTEM |CPU % |MEMORY % |DIRECT % |BW IN % |BW OUT % |MAX % ||
Expand All @@ -115,7 +115,7 @@ Here is an example from `com.yahoo.pulsar.broker.loadbalance.impl.ModularLoadMan
===================================================================================================================
```

Here is an example from `com.yahoo.pulsar.broker.loadbalance.impl.SimpleLoadManagerImpl`:
Here is an example from `org.apache.pulsar.broker.loadbalance.impl.SimpleLoadManagerImpl`:
```
===================================================================================================================
||COUNT |TOPIC |BUNDLE |PRODUCER |CONSUMER |BUNDLE + |BUNDLE - ||
Expand All @@ -130,24 +130,24 @@ Here is an example from `com.yahoo.pulsar.broker.loadbalance.impl.SimpleLoadMana
|| |54.84 |134.48 |189.31 |126.54 |320.96 |447.50 ||
===================================================================================================================
```
It is important to note that `com.yahoo.pulsar.broker.loadbalance.impl.ModularLoadManagerImpl` is _centralized_, meaning all requests
It is important to note that `org.apache.pulsar.broker.loadbalance.impl.ModularLoadManagerImpl` is _centralized_, meaning all requests
to assign a bundle (whether it's been seen before or whether this is the first time) only get handled by the _lead_ broker
(which can change over time). To determine the current lead broker, examine this node in ZooKeeper: `/loadbalance/leader`

## Implementation

### Data
The data monitored by the modular load manager is contained in the class `com.yahoo.pulsar.broker.loadbalance.LoadData`.
The data monitored by the modular load manager is contained in the class `org.apache.pulsar.broker.loadbalance.LoadData`.
Here, the available data is subdivided into the bundle data and the broker data.

#### Broker Data
The broker data is contained in the class `com.yahoo.pulsar.broker.BrokerData`. It is further subdivided into two parts,
The broker data is contained in the class `org.apache.pulsar.broker.BrokerData`. It is further subdivided into two parts,
one being the local data which every broker individually writes to ZooKeeper, and the other being the historical broker
data which is written to ZooKeeper by the leader broker.

##### Local Broker Data
The local broker data is contained in the class
`com.yahoo.pulsar.broker.LocalBrokerData` and gives information about the following resources:
`org.apache.pulsar.broker.LocalBrokerData` and gives information about the following resources:

* CPU usage
* JVM heap memory usage
Expand All @@ -164,7 +164,7 @@ receive the update immediately via a ZooKeeper watch, where the local data is re
`/loadbalance/brokers/<broker host/port>`

##### Historical Broker Data
The historical broker data is contained in the class `com.yahoo.pulsar.broker.TimeAverageBrokerData`.
The historical broker data is contained in the class `org.apache.pulsar.broker.TimeAverageBrokerData`.
In order to reconcile the need to make good decisions in a steady-state scenario and make reactive decisions in a
critical scenario, the historical data is split into two parts: the short-term data for reactive decisions, and the
long-term data for steady-state decisions. Both time frames maintain the following information:
Expand All @@ -180,7 +180,7 @@ writes their local data to ZooKeeper. Then, the historical data is written to Zo
periodically according to the configuration `loadBalancerResourceQuotaUpdateIntervalMinutes`.

##### Bundle Data
The bundle data is contained in the class `com.yahoo.pulsar.broker.BundleData`.
The bundle data is contained in the class `org.apache.pulsar.broker.BundleData`.
Like the historical broker data, the bundle data is split into a short-term and a long-term time frame.
The information maintained in each time frame is

Expand All @@ -205,10 +205,10 @@ broker data, according to the configuration `loadBalancerResourceQuotaUpdateInte

### Traffic Distribution
The modular load manager uses the abstraction provided by
`com.yahoo.pulsar.broker.loadbalance.ModularLoadManagerStrategy` to make decisions about bundle assignment. The
`org.apache.pulsar.broker.loadbalance.ModularLoadManagerStrategy` to make decisions about bundle assignment. The
strategy makes a decision by considering the service configuration, the entire load data, and the bundle data for the
bundle to be assigned. Currently, the only supported strategy is
`com.yahoo.pulsar.broker.loadbalance.impl.LeastLongTermMessageRate`, though soon users will have the ability to inject
`org.apache.pulsar.broker.loadbalance.impl.LeastLongTermMessageRate`, though soon users will have the ability to inject
their own strategies if desired.

#### Least Long Term Message Rate Strategy
Expand Down
2 changes: 1 addition & 1 deletion docs/PulsarSpark.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,5 @@ JavaReceiverInputDStream<byte[]> msgs = jssc


## Example
You can find a complete example [here](../pulsar-spark/src/test/java/com/yahoo/pulsar/spark/example/SparkStreamingPulsarReceiverExample.java).
You can find a complete example [here](../pulsar-spark/src/test/java/org/apache/pulsar/spark/example/SparkStreamingPulsarReceiverExample.java).
In this example, the number of messages which contain "Pulsar" string in received messages is counted.
2 changes: 1 addition & 1 deletion docs/PulsarStorm.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,4 +104,4 @@ PulsarBolt bolt = new PulsarBolt(boltConf, clientConf);
```

## Example
You can find a complete example [here](../pulsar-storm/src/test/java/com/yahoo/pulsar/storm/example/StormExample.java).
You can find a complete example [here](../pulsar-storm/src/test/java/org/apache/pulsar/storm/example/StormExample.java).
6 changes: 3 additions & 3 deletions docs/SimulationTools.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ The simulation client is a machine which will create and subscribe to topics wit
Because it is sometimes necessary in simulating large load to use multiple client machines, the user does not interact
with the simulation client directly, but instead delegates their requests to the simulation controller, which will then
send signals to clients to start incurring load. The client implementation is in the class
`com.yahoo.pulsar.testclient.LoadSimulationClient`.
`org.apache.pulsar.testclient.LoadSimulationClient`.

### Usage
To Start a simulation client, use the `pulsar-perf` script with the command `simulation-client` as follows:
Expand All @@ -22,7 +22,7 @@ The client will then be ready to receive controller commands.
## Simulation Controller
The simulation controller send signals to the simulation clients, requesting them to create new topics, stop old
topics, change the load incurred by topics, as well as several other tasks. It is implemented in the class
`com.yahoo.pulsar.testclient.LoadSimulationController` and presents a shell to the user as an interface to send
`org.apache.pulsar.testclient.LoadSimulationController` and presents a shell to the user as an interface to send
command with.

### Usage
Expand Down Expand Up @@ -87,7 +87,7 @@ be sent at only `5%` of the rate of the load that is being simulated.

## Broker Monitor
To observe the behavior of the load manager in these simulations, one may utilize the broker monitor, which is
implemented in `com.yahoo.pulsar.testclient.BrokerMonitor`. The broker monitor will print tabular load data to the
implemented in `org.apache.pulsar.testclient.BrokerMonitor`. The broker monitor will print tabular load data to the
console as it is updated using watchers.

### Usage
Expand Down
2 changes: 1 addition & 1 deletion docs/locale/ja/AdminTools.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ Pulsar admin REST APIの定義については*swaggerドキュメント*から

### Java API

Java APIは```com.yahoo.pulsar.client.admin.PulsarAdmin```によりアクセスできます。
Java APIは```org.apache.pulsar.client.admin.PulsarAdmin```によりアクセスできます。

下記のコードスニペットは*PulsarAdmin*の初期化の方法を示しています。後のドキュメントでPulsarのエンティティを管理するための使用方法について説明します。

Expand Down
4 changes: 2 additions & 2 deletions docs/locale/ja/Authentication.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ tlsTrustCertsFilePath=/path/to/cacert.pem
# Add TLS auth provider
authenticationEnabled=true
authorizationEnabled=true
authenticationProviders=com.yahoo.pulsar.broker.authentication.AuthenticationProviderTls
authenticationProviders=org.apache.pulsar.broker.authentication.AuthenticationProviderTls
```

#### ディスカバリサービスの設定
Expand Down Expand Up @@ -133,7 +133,7 @@ PulsarClient client = PulsarClient.create(

```shell
serviceUrl=https://broker.example.com:8443/
authPlugin=com.yahoo.pulsar.client.impl.auth.AuthenticationTls
authPlugin=org.apache.pulsar.client.impl.auth.AuthenticationTls
authParams=tlsCertFile:/path/to/client-cert.pem,tlsKeyFile:/path/to/client-cert.pem
useTls=true
tlsAllowInsecureConnection=false
Expand Down
Loading

0 comments on commit 251594e

Please sign in to comment.