Skip to content
New issue

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

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

Already on GitHub? # to your account

根据主机的IP生成workerId的IdGenerator实现 #191

Closed
hanahmily opened this issue Nov 22, 2016 · 1 comment
Closed

根据主机的IP生成workerId的IdGenerator实现 #191

hanahmily opened this issue Nov 22, 2016 · 1 comment

Comments

@hanahmily
Copy link
Contributor

hanahmily commented Nov 22, 2016

IPWorkerIdIdGenerator:获取机器的二进制表示的后10位,设置成workerId。
列如:
机器的IP为192.168.1.108(C0. A8.01. 6C),二进制后十位为:00000001.01101100设置workerId为364。

@hanahmily hanahmily changed the title 根据主机的IP生成Id的IdGenerator实现 根据主机的IP生成workerId的IdGenerator实现 Nov 22, 2016
@xydonne
Copy link
Contributor

xydonne commented Dec 14, 2016

@hanahmily 已参考HostNameIdGenerator的修改,已提交PR。

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

2 participants