-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
22 changed files
with
189 additions
and
844 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
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
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
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
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
38 changes: 38 additions & 0 deletions
38
java/src/main/java/org/rocksdb/HashSpdbMemTableConfig.java
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,38 @@ | ||
// Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. | ||
package org.rocksdb; | ||
|
||
/** | ||
* The config for hash spdbd memtable representation. | ||
*/ | ||
public class HashSpdbMemTableConfig extends MemTableConfig { | ||
public static final int DEFAULT_BUCKET_COUNT = 1000000; | ||
|
||
/** | ||
* HashSpdbMemTableConfig constructor | ||
*/ | ||
public HashSpdbMemTableConfig() { | ||
bucketCount_ = DEFAULT_BUCKET_COUNT; | ||
} | ||
|
||
/** | ||
* Set the number of hash buckets used in the hash spdb memtable. | ||
* Default = 1000000. | ||
* | ||
* @param count the number of hash buckets used in the hash | ||
* spdb memtable. | ||
* @return the reference to the current HashSpdbMemTableConfig. | ||
*/ | ||
public HashSpdbMemTableConfig setBucketCount(final long count) { | ||
bucketCount_ = count; | ||
return this; | ||
} | ||
|
||
@Override | ||
protected long newMemTableFactoryHandle() { | ||
return newMemTableFactoryHandle(bucketCount_); | ||
} | ||
|
||
private native long newMemTableFactoryHandle(long bucketCount) throws IllegalArgumentException; | ||
|
||
private long bucketCount_; | ||
} |
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.