-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from luoluoyuyu/Imp-opendb
Improvement of openDB
- Loading branch information
Showing
41 changed files
with
1,715 additions
and
322 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# OpenDB | ||
|
||
Based on LSM tree-structured database with up to 100,000 data writes per second. | ||
|
||
## Create DB | ||
|
||
``` | ||
openDB = OpenDBImp.open(new Options(),"src/test/resources/data/"); | ||
ColumnFamilyDescriptor columnFamilyDescriptor= new ColumnFamilyDescriptor(); | ||
columnFamilyDescriptor.setName("luoluoyuyu"); | ||
columnFamilyDescriptor.setKeyType(KeyType.intKey); | ||
columnFamilyDescriptor.setValueType(ValueType.intValue); | ||
columnFamilyDescriptor.setBlockSize(1<<12); | ||
openDB.createColumnFamily(columnFamilyDescriptor); | ||
Key key = new IntKey(1); | ||
Value value = new IntValue(1); | ||
openDB.put(key, value, columnFamilyHandle); | ||
columnFamilyHandle=openDB.getColumnFamilyHandle("luoluoyuyu").date; | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.