Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
kvdb
rocksdb
提交
d0a18c28
R
rocksdb
项目概览
kvdb
/
rocksdb
11 个月 前同步成功
通知
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,发现更多精彩内容 >>
提交
d0a18c28
编写于
10月 27, 2015
作者:
S
Siying Dong
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #786 from aloukissas/unused_param
Fix unused parameter warnings in db.h
上级
c37223c0
2adad23a
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
23 addition
and
23 deletion
+23
-23
include/rocksdb/db.h
include/rocksdb/db.h
+10
-8
include/rocksdb/listener.h
include/rocksdb/listener.h
+6
-7
include/rocksdb/table_properties.h
include/rocksdb/table_properties.h
+3
-4
include/rocksdb/write_batch.h
include/rocksdb/write_batch.h
+4
-4
未找到文件。
include/rocksdb/db.h
浏览文件 @
d0a18c28
...
@@ -258,9 +258,10 @@ class DB {
...
@@ -258,9 +258,10 @@ class DB {
// This check is potentially lighter-weight than invoking DB::Get(). One way
// This check is potentially lighter-weight than invoking DB::Get(). One way
// to make this lighter weight is to avoid doing any IOs.
// to make this lighter weight is to avoid doing any IOs.
// Default implementation here returns true and sets 'value_found' to false
// Default implementation here returns true and sets 'value_found' to false
virtual
bool
KeyMayExist
(
const
ReadOptions
&
options
,
virtual
bool
KeyMayExist
(
const
ReadOptions
&
/*options*/
,
ColumnFamilyHandle
*
column_family
,
const
Slice
&
key
,
ColumnFamilyHandle
*
/*column_family*/
,
std
::
string
*
value
,
bool
*
value_found
=
nullptr
)
{
const
Slice
&
/*key*/
,
std
::
string
*
/*value*/
,
bool
*
value_found
=
nullptr
)
{
if
(
value_found
!=
nullptr
)
{
if
(
value_found
!=
nullptr
)
{
*
value_found
=
false
;
*
value_found
=
false
;
}
}
...
@@ -502,8 +503,8 @@ class DB {
...
@@ -502,8 +503,8 @@ class DB {
return
CompactRange
(
options
,
DefaultColumnFamily
(),
begin
,
end
);
return
CompactRange
(
options
,
DefaultColumnFamily
(),
begin
,
end
);
}
}
virtual
Status
SetOptions
(
ColumnFamilyHandle
*
column_family
,
virtual
Status
SetOptions
(
ColumnFamilyHandle
*
/*column_family*/
,
const
std
::
unordered_map
<
std
::
string
,
std
::
string
>&
new_options
)
{
const
std
::
unordered_map
<
std
::
string
,
std
::
string
>&
/*new_options*/
)
{
return
Status
::
NotSupported
(
"Not implemented"
);
return
Status
::
NotSupported
(
"Not implemented"
);
}
}
virtual
Status
SetOptions
(
virtual
Status
SetOptions
(
...
@@ -653,7 +654,8 @@ class DB {
...
@@ -653,7 +654,8 @@ class DB {
// Returns a list of all table files with their level, start key
// Returns a list of all table files with their level, start key
// and end key
// and end key
virtual
void
GetLiveFilesMetaData
(
std
::
vector
<
LiveFileMetaData
>*
metadata
)
{}
virtual
void
GetLiveFilesMetaData
(
std
::
vector
<
LiveFileMetaData
>*
/*metadata*/
)
{}
// Obtains the meta data of the specified column family of the DB.
// Obtains the meta data of the specified column family of the DB.
// Status::NotFound() will be returned if the current DB does not have
// Status::NotFound() will be returned if the current DB does not have
...
@@ -662,8 +664,8 @@ class DB {
...
@@ -662,8 +664,8 @@ class DB {
// If cf_name is not specified, then the metadata of the default
// If cf_name is not specified, then the metadata of the default
// column family will be returned.
// column family will be returned.
virtual
void
GetColumnFamilyMetaData
(
virtual
void
GetColumnFamilyMetaData
(
ColumnFamilyHandle
*
column_family
,
ColumnFamilyHandle
*
/*column_family*/
,
ColumnFamilyMetaData
*
metadata
)
{}
ColumnFamilyMetaData
*
/*metadata*/
)
{}
// Get the metadata of the default column family.
// Get the metadata of the default column family.
void
GetColumnFamilyMetaData
(
void
GetColumnFamilyMetaData
(
...
...
include/rocksdb/listener.h
浏览文件 @
d0a18c28
...
@@ -150,8 +150,8 @@ class EventListener {
...
@@ -150,8 +150,8 @@ class EventListener {
// Note that the this function must be implemented in a way such that
// Note that the this function must be implemented in a way such that
// it should not run for an extended period of time before the function
// it should not run for an extended period of time before the function
// returns. Otherwise, RocksDB may be blocked.
// returns. Otherwise, RocksDB may be blocked.
virtual
void
OnFlushCompleted
(
virtual
void
OnFlushCompleted
(
DB
*
/*db*/
,
DB
*
db
,
const
FlushJobInfo
&
flush_job_info
)
{}
const
FlushJobInfo
&
/*flush_job_info*/
)
{}
// A call-back function for RocksDB which will be called whenever
// A call-back function for RocksDB which will be called whenever
// a SST file is deleted. Different from OnCompactionCompleted and
// a SST file is deleted. Different from OnCompactionCompleted and
...
@@ -164,8 +164,7 @@ class EventListener {
...
@@ -164,8 +164,7 @@ class EventListener {
// Note that if applications would like to use the passed reference
// Note that if applications would like to use the passed reference
// outside this function call, they should make copies from the
// outside this function call, they should make copies from the
// returned value.
// returned value.
virtual
void
OnTableFileDeleted
(
virtual
void
OnTableFileDeleted
(
const
TableFileDeletionInfo
&
/*info*/
)
{}
const
TableFileDeletionInfo
&
info
)
{}
// A call-back function for RocksDB which will be called whenever
// A call-back function for RocksDB which will be called whenever
// a registered RocksDB compacts a file. The default implementation
// a registered RocksDB compacts a file. The default implementation
...
@@ -180,7 +179,8 @@ class EventListener {
...
@@ -180,7 +179,8 @@ class EventListener {
// @param ci a reference to a CompactionJobInfo struct. 'ci' is released
// @param ci a reference to a CompactionJobInfo struct. 'ci' is released
// after this function is returned, and must be copied if it is needed
// after this function is returned, and must be copied if it is needed
// outside of this function.
// outside of this function.
virtual
void
OnCompactionCompleted
(
DB
*
db
,
const
CompactionJobInfo
&
ci
)
{}
virtual
void
OnCompactionCompleted
(
DB
*
/*db*/
,
const
CompactionJobInfo
&
/*ci*/
)
{}
// A call-back function for RocksDB which will be called whenever
// A call-back function for RocksDB which will be called whenever
// a SST file is created. Different from OnCompactionCompleted and
// a SST file is created. Different from OnCompactionCompleted and
...
@@ -193,8 +193,7 @@ class EventListener {
...
@@ -193,8 +193,7 @@ class EventListener {
// Note that if applications would like to use the passed reference
// Note that if applications would like to use the passed reference
// outside this function call, they should make copies from these
// outside this function call, they should make copies from these
// returned value.
// returned value.
virtual
void
OnTableFileCreated
(
virtual
void
OnTableFileCreated
(
const
TableFileCreationInfo
&
/*info*/
)
{}
const
TableFileCreationInfo
&
info
)
{}
virtual
~
EventListener
()
{}
virtual
~
EventListener
()
{}
};
};
...
...
include/rocksdb/table_properties.h
浏览文件 @
d0a18c28
...
@@ -107,7 +107,7 @@ class TablePropertiesCollector {
...
@@ -107,7 +107,7 @@ class TablePropertiesCollector {
// Add() will be called when a new key/value pair is inserted into the table.
// Add() will be called when a new key/value pair is inserted into the table.
// @params key the user key that is inserted into the table.
// @params key the user key that is inserted into the table.
// @params value the value that is inserted into the table.
// @params value the value that is inserted into the table.
virtual
Status
Add
(
const
Slice
&
key
,
const
Slice
&
value
)
{
virtual
Status
Add
(
const
Slice
&
/*key*/
,
const
Slice
&
/*value*/
)
{
return
Status
::
InvalidArgument
(
return
Status
::
InvalidArgument
(
"TablePropertiesCollector::Add() deprecated."
);
"TablePropertiesCollector::Add() deprecated."
);
}
}
...
@@ -116,10 +116,9 @@ class TablePropertiesCollector {
...
@@ -116,10 +116,9 @@ class TablePropertiesCollector {
// table.
// table.
// @params key the user key that is inserted into the table.
// @params key the user key that is inserted into the table.
// @params value the value that is inserted into the table.
// @params value the value that is inserted into the table.
// @params file_size file size up to now
virtual
Status
AddUserKey
(
const
Slice
&
key
,
const
Slice
&
value
,
virtual
Status
AddUserKey
(
const
Slice
&
key
,
const
Slice
&
value
,
EntryType
type
,
SequenceNumber
seq
,
EntryType
/*type*/
,
SequenceNumber
/*seq*/
,
uint64_t
file_size
)
{
uint64_t
/*file_size*/
)
{
// For backwards-compatibility.
// For backwards-compatibility.
return
Add
(
key
,
value
);
return
Add
(
key
,
value
);
}
}
...
...
include/rocksdb/write_batch.h
浏览文件 @
d0a18c28
...
@@ -147,7 +147,7 @@ class WriteBatch : public WriteBatchBase {
...
@@ -147,7 +147,7 @@ class WriteBatch : public WriteBatchBase {
return
Status
::
InvalidArgument
(
return
Status
::
InvalidArgument
(
"non-default column family and PutCF not implemented"
);
"non-default column family and PutCF not implemented"
);
}
}
virtual
void
Put
(
const
Slice
&
key
,
const
Slice
&
value
)
{}
virtual
void
Put
(
const
Slice
&
/*key*/
,
const
Slice
&
/*value*/
)
{}
virtual
Status
DeleteCF
(
uint32_t
column_family_id
,
const
Slice
&
key
)
{
virtual
Status
DeleteCF
(
uint32_t
column_family_id
,
const
Slice
&
key
)
{
if
(
column_family_id
==
0
)
{
if
(
column_family_id
==
0
)
{
...
@@ -157,7 +157,7 @@ class WriteBatch : public WriteBatchBase {
...
@@ -157,7 +157,7 @@ class WriteBatch : public WriteBatchBase {
return
Status
::
InvalidArgument
(
return
Status
::
InvalidArgument
(
"non-default column family and DeleteCF not implemented"
);
"non-default column family and DeleteCF not implemented"
);
}
}
virtual
void
Delete
(
const
Slice
&
key
)
{}
virtual
void
Delete
(
const
Slice
&
/*key*/
)
{}
virtual
Status
SingleDeleteCF
(
uint32_t
column_family_id
,
const
Slice
&
key
)
{
virtual
Status
SingleDeleteCF
(
uint32_t
column_family_id
,
const
Slice
&
key
)
{
if
(
column_family_id
==
0
)
{
if
(
column_family_id
==
0
)
{
...
@@ -167,7 +167,7 @@ class WriteBatch : public WriteBatchBase {
...
@@ -167,7 +167,7 @@ class WriteBatch : public WriteBatchBase {
return
Status
::
InvalidArgument
(
return
Status
::
InvalidArgument
(
"non-default column family and SingleDeleteCF not implemented"
);
"non-default column family and SingleDeleteCF not implemented"
);
}
}
virtual
void
SingleDelete
(
const
Slice
&
key
)
{}
virtual
void
SingleDelete
(
const
Slice
&
/*key*/
)
{}
// Merge and LogData are not pure virtual. Otherwise, we would break
// Merge and LogData are not pure virtual. Otherwise, we would break
// existing clients of Handler on a source code level. The default
// existing clients of Handler on a source code level. The default
...
@@ -181,7 +181,7 @@ class WriteBatch : public WriteBatchBase {
...
@@ -181,7 +181,7 @@ class WriteBatch : public WriteBatchBase {
return
Status
::
InvalidArgument
(
return
Status
::
InvalidArgument
(
"non-default column family and MergeCF not implemented"
);
"non-default column family and MergeCF not implemented"
);
}
}
virtual
void
Merge
(
const
Slice
&
key
,
const
Slice
&
value
)
{}
virtual
void
Merge
(
const
Slice
&
/*key*/
,
const
Slice
&
/*value*/
)
{}
// The default implementation of LogData does nothing.
// The default implementation of LogData does nothing.
virtual
void
LogData
(
const
Slice
&
blob
);
virtual
void
LogData
(
const
Slice
&
blob
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录