gitextract_86du7eze/ ├── .gitignore ├── LICENSE ├── README.md ├── README_CN.md ├── leaf-core/ │ ├── pom.xml │ └── src/ │ ├── main/ │ │ └── java/ │ │ └── com/ │ │ └── sankuai/ │ │ └── inf/ │ │ └── leaf/ │ │ ├── IDGen.java │ │ ├── common/ │ │ │ ├── CheckVO.java │ │ │ ├── PropertyFactory.java │ │ │ ├── Result.java │ │ │ ├── Status.java │ │ │ ├── Utils.java │ │ │ └── ZeroIDGen.java │ │ ├── segment/ │ │ │ ├── SegmentIDGenImpl.java │ │ │ ├── dao/ │ │ │ │ ├── IDAllocDao.java │ │ │ │ ├── IDAllocMapper.java │ │ │ │ └── impl/ │ │ │ │ └── IDAllocDaoImpl.java │ │ │ └── model/ │ │ │ ├── LeafAlloc.java │ │ │ ├── Segment.java │ │ │ └── SegmentBuffer.java │ │ └── snowflake/ │ │ ├── SnowflakeIDGenImpl.java │ │ ├── SnowflakeZookeeperHolder.java │ │ └── exception/ │ │ ├── CheckLastTimeException.java │ │ ├── CheckOtherNodeException.java │ │ └── ClockGoBackException.java │ └── test/ │ ├── java/ │ │ └── com/ │ │ └── sankuai/ │ │ └── inf/ │ │ └── leaf/ │ │ ├── segment/ │ │ │ ├── IDGenServiceTest.java │ │ │ └── SpringIDGenServiceTest.java │ │ └── snowflake/ │ │ └── SnowflakeIDGenImplTest.java │ └── resources/ │ ├── applicationContext.xml │ ├── leaf.properties │ └── log4j2.xml ├── leaf-server/ │ ├── deploy/ │ │ └── run.sh │ ├── pom.xml │ └── src/ │ ├── main/ │ │ ├── java/ │ │ │ └── com/ │ │ │ └── sankuai/ │ │ │ └── inf/ │ │ │ └── leaf/ │ │ │ └── server/ │ │ │ ├── Constants.java │ │ │ ├── LeafServerApplication.java │ │ │ ├── controller/ │ │ │ │ ├── LeafController.java │ │ │ │ └── LeafMonitorController.java │ │ │ ├── exception/ │ │ │ │ ├── InitException.java │ │ │ │ ├── LeafServerException.java │ │ │ │ └── NoKeyException.java │ │ │ ├── model/ │ │ │ │ └── SegmentBufferView.java │ │ │ └── service/ │ │ │ ├── SegmentService.java │ │ │ └── SnowflakeService.java │ │ └── resources/ │ │ ├── application.properties │ │ ├── leaf.properties │ │ └── templates/ │ │ ├── db.ftl │ │ └── segment.ftl │ └── test/ │ └── java/ │ └── com/ │ └── sankuai/ │ └── inf/ │ └── leaf/ │ └── server/ │ └── LeafServerApplicationTests.java ├── pom.xml └── scripts/ └── leaf_alloc.sql