Ohara: Cluster APIs should honor cluster key rather than cluster name

Created on 21 Sep 2019  ·  8Comments  ·  Source: oharastream/ohara

cluster accept group now but our APIs still require user to pass name rather than key...

ObjectKey's json parser is about to accept following json representation.

"key": {
  "group":"g",
  "name":"n"
}

```json
"key": {
"name":"n"
}

```json
"key": "n"

Hence, the "default group" to all objects should be identical to make a global json parser for key type.

The sub issues are listed below.


    • [x] unify default group for all objects (#2754)


    • [x] enable json parser of "key" to accept following type: {"group": "g", "name": "n"}, {"name":"n"} and "n" (#2764)


    • [x] Broker APIs should honor cluster key (#2808)


    • [x] remove zookeeperClusterName from Broker APIs (#2845)


    • [x] Worker APIs should honor cluster key (#2817)


    • [x] remove brokerClusterName from Worker APIs


    • [x] Stream APIs should honor cluster key (#2800)

      ~- [ ] Stream does not handle the stale filed in definition (#2831)~


    • [x] remove brokerClusterName from Stream APIs (#2834)


    • [x] Collie should honor cluster key (#2839)

related to #2769

incompatibility v0.8.0

Most helpful comment

/cc @oharastream/frontend

The latest changes of cluster APIs are traced here, I will remove all the stale fields in this release (0.8).
If you had any problem, please let me know :)

All 8 comments

cluster accept creation without group specified. If we use key instead of group and name, how could we create an object with default group?

If we use key instead of group and name, how could we create an object with default group?

The Scala APIs accept the key and the json APIs take both key and name.

The former is for consistent in writing pure scala code. Converting key to name is a weird and ugly style across our project.

The later take “key” but accept the key lacking of “group”. For example: the following requests are identical.

bkKey: {
group:default,
name:”a”
}

bkkey: a

The Scala APIs accept the key and the json APIs take both key and name.

Since scala APIs are part of "client", this conclusion is very important for later developers/users.
Could you add this conclusion to the key() comment? :)

Could you add this conclusion to the key() comment? :)

sure, boss

/cc @oharastream/frontend

The latest changes of cluster APIs are traced here, I will remove all the stale fields in this release (0.8).
If you had any problem, please let me know :)

The latest changes of cluster APIs are traced here, I will remove all the stale fields in this release (0.8).
If you had any problem, please let me know :)

tumblr_m5hb570SOP1rq4q6jo1_500

@saivirtue Brace for the impact...

@oharastream/frontend
All done! You can test the APIs of cluster to see the stale fields should not available now :)

Was this page helpful?
0 / 5 - 0 ratings