Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
kvdb
rocksdb
提交
98422cba
R
rocksdb
项目概览
kvdb
/
rocksdb
12 个月 前同步成功
通知
0
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
rocksdb
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
98422cba
编写于
4月 03, 2014
作者:
T
Thomas Adam
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[C-API] implemented more options
上级
3a30b5b0
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
79 addition
and
7 deletion
+79
-7
db/c.cc
db/c.cc
+62
-7
include/rocksdb/c.h
include/rocksdb/c.h
+17
-0
未找到文件。
db/c.cc
浏览文件 @
98422cba
...
...
@@ -32,6 +32,7 @@ using rocksdb::Comparator;
using
rocksdb
::
CompressionType
;
using
rocksdb
::
DB
;
using
rocksdb
::
Env
;
using
rocksdb
::
InfoLogLevel
;
using
rocksdb
::
FileLock
;
using
rocksdb
::
FilterPolicy
;
using
rocksdb
::
FlushOptions
;
...
...
@@ -657,6 +658,11 @@ void rocksdb_options_set_info_log(rocksdb_options_t* opt, rocksdb_logger_t* l) {
}
}
void
rocksdb_options_set_info_log_level
(
rocksdb_options_t
*
opt
,
int
v
)
{
opt
->
rep
.
info_log_level
=
static_cast
<
InfoLogLevel
>
(
v
);
}
void
rocksdb_options_set_write_buffer_size
(
rocksdb_options_t
*
opt
,
size_t
s
)
{
opt
->
rep
.
write_buffer_size
=
s
;
}
...
...
@@ -715,6 +721,14 @@ void rocksdb_options_set_max_grandparent_overlap_factor(
opt
->
rep
.
max_grandparent_overlap_factor
=
n
;
}
void
rocksdb_options_set_max_bytes_for_level_multiplier_additional
(
rocksdb_options_t
*
opt
,
int
*
level_values
,
size_t
num_levels
)
{
opt
->
rep
.
max_bytes_for_level_multiplier_additional
.
resize
(
num_levels
);
for
(
size_t
i
=
0
;
i
<
num_levels
;
++
i
)
{
opt
->
rep
.
max_bytes_for_level_multiplier_additional
[
i
]
=
level_values
[
i
];
}
}
void
rocksdb_options_enable_statistics
(
rocksdb_options_t
*
opt
)
{
opt
->
rep
.
statistics
=
rocksdb
::
CreateDBStatistics
();
}
...
...
@@ -858,6 +872,24 @@ void rocksdb_options_set_advise_random_on_open(
opt
->
rep
.
advise_random_on_open
=
v
;
}
void
rocksdb_options_set_access_hint_on_compaction_start
(
rocksdb_options_t
*
opt
,
int
v
)
{
switch
(
v
)
{
case
0
:
opt
->
rep
.
access_hint_on_compaction_start
=
rocksdb
::
Options
::
NONE
;
break
;
case
1
:
opt
->
rep
.
access_hint_on_compaction_start
=
rocksdb
::
Options
::
NORMAL
;
break
;
case
2
:
opt
->
rep
.
access_hint_on_compaction_start
=
rocksdb
::
Options
::
SEQUENTIAL
;
break
;
case
3
:
opt
->
rep
.
access_hint_on_compaction_start
=
rocksdb
::
Options
::
WILLNEED
;
break
;
}
}
void
rocksdb_options_set_use_adaptive_mutex
(
rocksdb_options_t
*
opt
,
unsigned
char
v
)
{
opt
->
rep
.
use_adaptive_mutex
=
v
;
...
...
@@ -868,6 +900,11 @@ void rocksdb_options_set_bytes_per_sync(
opt
->
rep
.
bytes_per_sync
=
v
;
}
void
rocksdb_options_set_verify_checksums_in_compaction
(
rocksdb_options_t
*
opt
,
unsigned
char
v
)
{
opt
->
rep
.
verify_checksums_in_compaction
=
v
;
}
void
rocksdb_options_set_filter_deletes
(
rocksdb_options_t
*
opt
,
unsigned
char
v
)
{
opt
->
rep
.
filter_deletes
=
v
;
...
...
@@ -1021,6 +1058,31 @@ void rocksdb_options_set_max_successive_merges(
opt
->
rep
.
max_successive_merges
=
v
;
}
void
rocksdb_options_set_min_partial_merge_operands
(
rocksdb_options_t
*
opt
,
uint32_t
v
)
{
opt
->
rep
.
min_partial_merge_operands
=
v
;
}
void
rocksdb_options_set_bloom_locality
(
rocksdb_options_t
*
opt
,
uint32_t
v
)
{
opt
->
rep
.
bloom_locality
=
v
;
}
void
rocksdb_options_set_allow_thread_local
(
rocksdb_options_t
*
opt
,
unsigned
char
v
)
{
opt
->
rep
.
allow_thread_local
=
v
;
}
void
rocksdb_options_set_inplace_update_support
(
rocksdb_options_t
*
opt
,
unsigned
char
v
)
{
opt
->
rep
.
inplace_update_support
=
v
;
}
void
rocksdb_options_set_inplace_update_num_locks
(
rocksdb_options_t
*
opt
,
size_t
v
)
{
opt
->
rep
.
inplace_update_num_locks
=
v
;
}
void
rocksdb_options_set_compaction_style
(
rocksdb_options_t
*
opt
,
int
style
)
{
opt
->
rep
.
compaction_style
=
static_cast
<
rocksdb
::
CompactionStyle
>
(
style
);
}
...
...
@@ -1035,21 +1097,14 @@ DB::OpenForReadOnly
DB::MultiGet
DB::KeyMayExist
DB::GetOptions
DB::GetLiveFiles
DB::GetSortedWalFiles
DB::GetLatestSequenceNumber
DB::GetUpdatesSince
DB::DeleteFile
DB::GetDbIdentity
DB::RunManualCompaction
custom cache
compaction_filter
max_bytes_for_level_multiplier_additional
access_hint_on_compaction_start
table_factory
table_properties_collectors
inplace_update_support
inplace_update_num_locks
*/
rocksdb_comparator_t
*
rocksdb_comparator_create
(
...
...
include/rocksdb/c.h
浏览文件 @
98422cba
...
...
@@ -243,6 +243,7 @@ extern void rocksdb_options_set_paranoid_checks(
rocksdb_options_t
*
,
unsigned
char
);
extern
void
rocksdb_options_set_env
(
rocksdb_options_t
*
,
rocksdb_env_t
*
);
extern
void
rocksdb_options_set_info_log
(
rocksdb_options_t
*
,
rocksdb_logger_t
*
);
extern
void
rocksdb_options_set_info_log_level
(
rocksdb_options_t
*
,
int
);
extern
void
rocksdb_options_set_write_buffer_size
(
rocksdb_options_t
*
,
size_t
);
extern
void
rocksdb_options_set_max_open_files
(
rocksdb_options_t
*
,
int
);
extern
void
rocksdb_options_set_cache
(
rocksdb_options_t
*
,
rocksdb_cache_t
*
);
...
...
@@ -275,6 +276,8 @@ extern void rocksdb_options_set_expanded_compaction_factor(
rocksdb_options_t
*
,
int
);
extern
void
rocksdb_options_set_max_grandparent_overlap_factor
(
rocksdb_options_t
*
,
int
);
extern
void
rocksdb_options_set_max_bytes_for_level_multiplier_additional
(
rocksdb_options_t
*
,
int
*
level_values
,
size_t
num_levels
);
extern
void
rocksdb_options_enable_statistics
(
rocksdb_options_t
*
);
extern
void
rocksdb_options_set_max_write_buffer_number
(
rocksdb_options_t
*
,
int
);
...
...
@@ -330,10 +333,14 @@ extern void rocksdb_options_set_block_size_deviation(
rocksdb_options_t
*
,
int
);
extern
void
rocksdb_options_set_advise_random_on_open
(
rocksdb_options_t
*
,
unsigned
char
);
extern
void
rocksdb_options_set_access_hint_on_compaction_start
(
rocksdb_options_t
*
,
int
);
extern
void
rocksdb_options_set_use_adaptive_mutex
(
rocksdb_options_t
*
,
unsigned
char
);
extern
void
rocksdb_options_set_bytes_per_sync
(
rocksdb_options_t
*
,
uint64_t
);
extern
void
rocksdb_options_set_verify_checksums_in_compaction
(
rocksdb_options_t
*
,
unsigned
char
);
extern
void
rocksdb_options_set_filter_deletes
(
rocksdb_options_t
*
,
unsigned
char
);
extern
void
rocksdb_options_set_max_sequential_skip_in_iterations
(
...
...
@@ -361,6 +368,16 @@ extern void rocksdb_options_set_memtable_prefix_bloom_probes(
rocksdb_options_t
*
,
uint32_t
);
extern
void
rocksdb_options_set_max_successive_merges
(
rocksdb_options_t
*
,
size_t
);
extern
void
rocksdb_options_set_min_partial_merge_operands
(
rocksdb_options_t
*
,
uint32_t
);
extern
void
rocksdb_options_set_bloom_locality
(
rocksdb_options_t
*
,
uint32_t
);
extern
void
rocksdb_options_set_allow_thread_local
(
rocksdb_options_t
*
,
unsigned
char
);
extern
void
rocksdb_options_set_inplace_update_support
(
rocksdb_options_t
*
,
unsigned
char
);
extern
void
rocksdb_options_set_inplace_update_num_locks
(
rocksdb_options_t
*
,
size_t
);
enum
{
rocksdb_no_compression
=
0
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录