B+Tree on-disk implementation in Java

巧了我就是萌 提交于 2019-12-06 00:28:59

问题


Does anyone know where to find a B+Tree on-disk implementation? I went through google forward and backward and unfortunately I couldn't find anything sensible. Other threads have suggested to maybe take the tree from sqlite, sqljet or bdb but these trees are nested in the whole database and you can't really "just" filter out the B+Tree. I'm really looking for only a on-disk B+Tree... without any fancy things around.


回答1:


There is a GDBM-inspired Java persistence engine: MapDB




回答2:


If you need it for real usage rather than for educational purposes (studying B+Tree data structure, etc.), LMDBJava is probably the best solution, available in Java now. It's not B+Tree exactly, but also a sorted key-value store, so practically the same as B+Tree.




回答3:


I've implemented disk-based B+-tree in the past. https://github.com/myui/xbird/blob/master/xbird-open/main/src/java/xbird/storage/index/BIndexFile.java

Find usage in https://github.com/myui/xbird/blob/master/xbird-open/main/test/java/xbird/storage/index/BIndexMultiValueFileTest.java



来源:https://stackoverflow.com/questions/3192812/btree-on-disk-implementation-in-java

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!