QuorumPeerConfig.parse
生活随笔
收集整理的這篇文章主要介紹了
QuorumPeerConfig.parse
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
這里會根據一個外部的文件去進行解析,然后其中有一段是這樣,解析對應的集群配置數據放到servers這個集合中
} else if (key.startsWith("server.")) { int dot = key.indexOf('.'); long sid = Long.parseLong(key.substring(dot + 1)); String parts[] = splitWithLeadingHostname(value); if ((parts.length != 2) && (parts.length != 3) && (parts.length !=4)) { LOG.error(value + " does not have the form host:port or host:port:port " + " or host:port:port:type"); }?
總結
以上是生活随笔為你收集整理的QuorumPeerConfig.parse的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: QuorumPeerMain.runFr
- 下一篇: ZkServer服务启动的逻辑-Quor