Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adminApi: add brokerServiceUrl while creating cluster #140

Merged
merged 1 commit into from
Dec 7, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions docs/AdminTools.md
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ It provisions a new cluster in Pulsar. It also requires Pulsar super-user privil
###### CLI

```
$ pulsar-admin clusters create --url http://my-cluster.org.com:8080/ cl1
$ pulsar-admin clusters create --url http://my-cluster.org.com:8080/ --broker-url pulsar://my-cluster.org.com:6650/ cl1
```

```
Expand All @@ -416,7 +416,7 @@ PUT /admin/clusters/{cluster}
###### Java

```java
admin.clusters().createCluster(cluster, new ClusterData(serviceUrl, serviceUrlTls))
admin.clusters().createCluster(cluster, new ClusterData(serviceUrl, serviceUrlTls, brokerServiceUrl, brokerServiceUrlTls))
```


Expand All @@ -434,7 +434,9 @@ $ pulsar-admin clusters get cl1
```json
{
"serviceUrl": "http://my-cluster.org.com:8080/",
"serviceUrlTls": null
"serviceUrlTls": null,
"brokerServiceUrl": "pulsar://my-cluster.org.com:6650/",
"brokerServiceUrlTls": null
}
```

Expand All @@ -458,7 +460,7 @@ It updates cluster configuration data for a given existing cluster.
###### CLI

```
$ pulsar-admin clusters update --url http://my-cluster.org.com:4081/ cl1
$ pulsar-admin clusters update --url http://my-cluster.org.com:4081/ --broker-url pulsar://my-cluster.org.com:3350/ cl1
```

```
Expand All @@ -474,7 +476,7 @@ POST /admin/clusters/{cluster}
###### Java

```java
admin.clusters().updateCluster(cluster, new ClusterData(serviceUrl, serviceUrlTls))
admin.clusters().updateCluster(cluster, new ClusterData(serviceUrl, serviceUrlTls, brokerServiceUrl, brokerServiceUrlTls))
```


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,17 @@ private class Create extends CliCommand {

@Parameter(names = "--url-secure", description = "service-url for secure connection", required = false)
private String serviceUrlTls;

@Parameter(names = "--broker-url", description = "broker-service-url", required = false)
private String brokerServiceUrl;

@Parameter(names = "--broker-url-secure", description = "broker-service-url for secure connection", required = false)
private String brokerServiceUrlTls;

void run() throws PulsarAdminException {
String cluster = getOneArgument(params);
admin.clusters().createCluster(cluster, new ClusterData(serviceUrl, serviceUrlTls));
admin.clusters().createCluster(cluster,
new ClusterData(serviceUrl, serviceUrlTls, brokerServiceUrl, brokerServiceUrlTls));
}
}

Expand All @@ -69,10 +76,17 @@ private class Update extends CliCommand {

@Parameter(names = "--url-secure", description = "service-url for secure connection", required = false)
private String serviceUrlTls;

@Parameter(names = "--broker-url", description = "broker-service-url", required = false)
private String brokerServiceUrl;

@Parameter(names = "--broker-url-secure", description = "broker-service-url for secure connection", required = false)
private String brokerServiceUrlTls;

void run() throws PulsarAdminException {
String cluster = getOneArgument(params);
admin.clusters().updateCluster(cluster, new ClusterData(serviceUrl, serviceUrlTls));
admin.clusters().updateCluster(cluster,
new ClusterData(serviceUrl, serviceUrlTls, brokerServiceUrl, brokerServiceUrlTls));
}
}

Expand Down