dubbo icon indicating copy to clipboard operation
dubbo copied to clipboard

Znode long name when using Zookeeper as service registry

Open DatPhanTien opened this issue 7 years ago • 1 comments

  • [x] I have searched the issues of this repository and believe that this is not a duplicate.
  • [x] I have checked the FAQ of this repository and believe that this is not a duplicate.

Environment

  • Dubbo version: 2.7.1
  • Operating System version: CentOS 7.5
  • Java version: 1.8.202

Steps to reproduce this issue

Simply using Zookeeper for the service registry. Register a service.

Actual Result

When browsing Zookeeper Znodes, we see the service providers is stored in a ZNodes with long name, such as /dubbo/com.test.dubbo.TestDubboPoc$MyService/providers/dubbo://127.0.0.1:20880/com.test.dubbo.TestDubboPoc$MyService?anyhost=true&application=first-dubbo-provider&default.deprecated=false&default.dynamic=false&default.register=true&deprecated=false&dubbo=2.0.2&dynamic=false&generic=false&interface=com.test.dubbo.TestDubboPoc$MyService&loadbalance=roundrobin&methods=writeFile,getData&optimizer=com.test.dubbo.SerializationOptimizerImpl&payload=2147483647&pid=10894&register=true&release=2.7.1&revision=version1&serialization=avro&side=provider&timestamp=1556969914059&version=version1

Expectation

Is it possible to manage the znode name, such as providing a SHA hashing ID?

DatPhanTien avatar May 04 '19 11:05 DatPhanTien

But the problem is I don't think there's a way to retrieve the original value from a hash ID.

chickenlj avatar May 05 '19 04:05 chickenlj