Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
R
rust-rocksdb
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fangzongwu
rust-rocksdb
Commits
76b3a4b7
Commit
76b3a4b7
authored
Jun 08, 2017
by
zhangjinpeng1987
Committed by
GitHub
Jun 08, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add GetFilterBitsBuilder/GetFilterBitsReader for c bloom (#64)
parent
e0de1aad
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
3 deletions
+13
-3
c.cc
librocksdb_sys/crocksdb/c.cc
+11
-1
c.h
librocksdb_sys/crocksdb/rocksdb/c.h
+2
-2
No files found.
librocksdb_sys/crocksdb/c.cc
View file @
76b3a4b7
...
...
@@ -81,6 +81,8 @@ using rocksdb::RateLimiter;
using
rocksdb
::
NewGenericRateLimiter
;
using
rocksdb
::
HistogramData
;
using
rocksdb
::
PinnableSlice
;
using
rocksdb
::
FilterBitsBuilder
;
using
rocksdb
::
FilterBitsReader
;
using
std
::
shared_ptr
;
...
...
@@ -2089,7 +2091,8 @@ void crocksdb_options_set_fifo_compaction_options(
opt
->
rep
.
compaction_options_fifo
=
fifo
->
rep
;
}
void
crocksdb_options_set_compaction_priority
(
crocksdb_options_t
*
opt
,
unsigned
char
priority
)
{
void
crocksdb_options_set_compaction_priority
(
crocksdb_options_t
*
opt
,
unsigned
char
priority
)
{
opt
->
rep
.
compaction_pri
=
static_cast
<
rocksdb
::
CompactionPri
>
(
priority
);
}
...
...
@@ -2310,6 +2313,13 @@ crocksdb_filterpolicy_t* crocksdb_filterpolicy_create_bloom_format(int bits_per_
bool
KeyMayMatch
(
const
Slice
&
key
,
const
Slice
&
filter
)
const
override
{
return
rep_
->
KeyMayMatch
(
key
,
filter
);
}
virtual
FilterBitsBuilder
*
GetFilterBitsBuilder
()
const
override
{
return
rep_
->
GetFilterBitsBuilder
();
}
virtual
FilterBitsReader
*
GetFilterBitsReader
(
const
Slice
&
contents
)
const
override
{
return
rep_
->
GetFilterBitsReader
(
contents
);
}
static
void
DoNothing
(
void
*
)
{
}
};
Wrapper
*
wrapper
=
new
Wrapper
;
...
...
librocksdb_sys/crocksdb/rocksdb/c.h
View file @
76b3a4b7
...
...
@@ -840,8 +840,8 @@ enum {
compaction_by_oldest_smallest_seq_first
=
2
,
compaction_by_min_overlapping_ratio
=
3
,
};
extern
C_ROCKSDB_LIBRARY_API
void
crocksdb_options_set_compaction_priority
(
crocksdb_options_t
*
,
unsigned
char
);
extern
C_ROCKSDB_LIBRARY_API
void
crocksdb_options_set_compaction_priority
(
crocksdb_options_t
*
,
unsigned
char
);
/* RateLimiter */
extern
C_ROCKSDB_LIBRARY_API
crocksdb_ratelimiter_t
*
crocksdb_ratelimiter_create
(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment