[ERROR] [main] c.s.i.l.s.SnowflakeZookeeperHolder:? []Start node ERROR {}
java.lang.NumberFormatException: For input string: "server"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
at java.lang.Integer.parseInt(Integer.java:580)
at java.lang.Integer.parseInt(Integer.java:615)
at com.sankuai.inf.leaf.snowflake.SnowflakeZookeeperHolder.init(SnowflakeZookeeperHolder.java:89)
at com.sankuai.inf.leaf.snowflake.SnowflakeIDGenImpl.<init>(SnowflakeIDGenImpl.java:50)
While We set this application name to xxx-xxx like below
idgen-server
then newNode will return snowflake.idgen-server.forever.xxxx:xxxx-sequence
So server will be parsed. Then this will cause leaf not start as expected
I Found that https://github.com/Meituan-Dianping/Leaf/blob/86a6441d263497b9f9ee321de13422b9c63f0c06/leaf-core/src/main/java/com/sankuai/inf/leaf/snowflake/SnowflakeZookeeperHolder.java#L89
While We set this application name to
xxx-xxx
like belowidgen-server
thennewNode
will returnsnowflake.idgen-server.forever.xxxx:xxxx-sequence
Soserver
will be parsed. Then this will cause leaf not start as expected