Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Metz
oceanbase
提交
fd0fb243
O
oceanbase
项目概览
Metz
/
oceanbase
与 Fork 源项目一致
Fork自
oceanbase / oceanbase
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
oceanbase
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
fd0fb243
编写于
11月 22, 2021
作者:
S
simonjoylet
提交者:
LINGuanRen
11月 22, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix compile and dump sstable_meta of ob_admin
上级
a22496d9
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
51 addition
and
70 deletion
+51
-70
tools/ob_admin/backup_tool/ob_admin_dump_backup_data_executor.h
...ob_admin/backup_tool/ob_admin_dump_backup_data_executor.h
+0
-1
tools/ob_admin/dumpsst/ob_admin_dumpsst_executor.cpp
tools/ob_admin/dumpsst/ob_admin_dumpsst_executor.cpp
+51
-64
tools/ob_admin/dumpsst/ob_admin_dumpsst_executor.h
tools/ob_admin/dumpsst/ob_admin_dumpsst_executor.h
+0
-1
tools/ob_admin/slog_tool/ob_admin_slog_executor.cpp
tools/ob_admin/slog_tool/ob_admin_slog_executor.cpp
+0
-4
未找到文件。
tools/ob_admin/backup_tool/ob_admin_dump_backup_data_executor.h
浏览文件 @
fd0fb243
...
@@ -22,7 +22,6 @@
...
@@ -22,7 +22,6 @@
#include "share/backup/ob_tenant_name_mgr.h"
#include "share/backup/ob_tenant_name_mgr.h"
#include "storage/blocksstable/ob_block_sstable_struct.h"
#include "storage/blocksstable/ob_block_sstable_struct.h"
#include "storage/blocksstable/ob_macro_block_meta_mgr.h"
#include "storage/blocksstable/ob_store_file.h"
#include "storage/blocksstable/ob_store_file.h"
#include "storage/ob_i_table.h"
#include "storage/ob_i_table.h"
#include "observer/ob_server_struct.h"
#include "observer/ob_server_struct.h"
...
...
tools/ob_admin/dumpsst/ob_admin_dumpsst_executor.cpp
浏览文件 @
fd0fb243
...
@@ -15,9 +15,7 @@
...
@@ -15,9 +15,7 @@
#include "storage/blocksstable/ob_store_file.h"
#include "storage/blocksstable/ob_store_file.h"
#include "storage/ob_partition_service.h"
#include "storage/ob_partition_service.h"
#include "storage/ob_table_mgr.h"
#include "storage/ob_table_mgr.h"
#include "storage/ob_table_mgr_meta_block_reader.h"
#include "storage/ob_sstable.h"
#include "storage/ob_sstable.h"
#include "storage/blocksstable/ob_macro_meta_block_reader.h"
#include "storage/ob_tenant_config_mgr.h"
#include "storage/ob_tenant_config_mgr.h"
#include "storage/ob_tenant_config_meta_block_reader.h"
#include "storage/ob_tenant_config_meta_block_reader.h"
#include "storage/blocksstable/ob_micro_block_scanner.h"
#include "storage/blocksstable/ob_micro_block_scanner.h"
...
@@ -358,66 +356,58 @@ int ObAdminDumpsstExecutor::open_store_file()
...
@@ -358,66 +356,58 @@ int ObAdminDumpsstExecutor::open_store_file()
void
ObAdminDumpsstExecutor
::
print_macro_meta
()
void
ObAdminDumpsstExecutor
::
print_macro_meta
()
{
{
// int ret = OB_SUCCESS;
// int ret = OB_SUCCESS;
const
ObMacroBlockMeta
*
meta
=
NULL
;
const
ObMacroBlockMeta
*
meta
=
NULL
;
ObMacroBlockMetaHandle
meta_handle
;
MacroBlockId
macro_id
(
dump_macro_context_
.
macro_id_
);
MacroBlockId
macro_id
(
dump_macro_context_
.
macro_id_
);
/*if (OB_FAIL(ObMacroBlockMetaMgr::get_instance().get_meta(macro_id, meta_handle))) {
PrintHelper
::
print_dump_title
(
"Macro Meta"
);
STORAGE_LOG(ERROR, "failed to get meta", K(ret));
PrintHelper
::
print_dump_line
(
"macro_block_id"
,
dump_macro_context_
.
macro_id_
);
} else if (OB_ISNULL(meta = meta_handle.get_meta())) {
PrintHelper
::
print_dump_line
(
"attr"
,
meta
->
attr_
);
ret = OB_ERR_UNEXPECTED;
PrintHelper
::
print_dump_line
(
"data_version"
,
meta
->
data_version_
);
STORAGE_LOG(ERROR, "meta is null", K(ret));
PrintHelper
::
print_dump_line
(
"column_number"
,
meta
->
column_number_
);
} else {*/
PrintHelper
::
print_dump_line
(
"rowkey_column_number"
,
meta
->
rowkey_column_number_
);
PrintHelper
::
print_dump_title
(
"Macro Meta"
);
PrintHelper
::
print_dump_line
(
"column_index_scale"
,
meta
->
column_index_scale_
);
PrintHelper
::
print_dump_line
(
"macro_block_id"
,
dump_macro_context_
.
macro_id_
);
PrintHelper
::
print_dump_line
(
"row_store_type"
,
meta
->
row_store_type_
);
PrintHelper
::
print_dump_line
(
"attr"
,
meta
->
attr_
);
PrintHelper
::
print_dump_line
(
"row_count"
,
meta
->
row_count_
);
PrintHelper
::
print_dump_line
(
"data_version"
,
meta
->
data_version_
);
PrintHelper
::
print_dump_line
(
"occupy_size"
,
meta
->
occupy_size_
);
PrintHelper
::
print_dump_line
(
"column_number"
,
meta
->
column_number_
);
PrintHelper
::
print_dump_line
(
"data_checksum"
,
meta
->
data_checksum_
);
PrintHelper
::
print_dump_line
(
"rowkey_column_number"
,
meta
->
rowkey_column_number_
);
PrintHelper
::
print_dump_line
(
"micro_block_count"
,
meta
->
micro_block_count_
);
PrintHelper
::
print_dump_line
(
"column_index_scale"
,
meta
->
column_index_scale_
);
PrintHelper
::
print_dump_line
(
"micro_block_data_offset"
,
meta
->
micro_block_data_offset_
);
PrintHelper
::
print_dump_line
(
"row_store_type"
,
meta
->
row_store_type_
);
PrintHelper
::
print_dump_line
(
"micro_block_index_offset"
,
meta
->
micro_block_index_offset_
);
PrintHelper
::
print_dump_line
(
"row_count"
,
meta
->
row_count_
);
PrintHelper
::
print_dump_line
(
"micro_block_endkey_offset"
,
meta
->
micro_block_endkey_offset_
);
PrintHelper
::
print_dump_line
(
"occupy_size"
,
meta
->
occupy_size_
);
PrintHelper
::
print_dump_line
(
"compressor"
,
meta
->
compressor_
);
PrintHelper
::
print_dump_line
(
"data_checksum"
,
meta
->
data_checksum_
);
PrintHelper
::
print_dump_line
(
"table_id"
,
meta
->
table_id_
);
PrintHelper
::
print_dump_line
(
"micro_block_count"
,
meta
->
micro_block_count_
);
PrintHelper
::
print_dump_line
(
"data_seq"
,
meta
->
data_seq_
);
PrintHelper
::
print_dump_line
(
"micro_block_data_offset"
,
meta
->
micro_block_data_offset_
);
PrintHelper
::
print_dump_line
(
"schema_version"
,
meta
->
schema_version_
);
PrintHelper
::
print_dump_line
(
"micro_block_index_offset"
,
meta
->
micro_block_index_offset_
);
PrintHelper
::
print_dump_line
(
"snapshot_version"
,
meta
->
snapshot_version_
);
PrintHelper
::
print_dump_line
(
"micro_block_endkey_offset"
,
meta
->
micro_block_endkey_offset_
);
PrintHelper
::
print_dump_line
(
"schema_rowkey_col_cnt"
,
meta
->
schema_rowkey_col_cnt_
);
PrintHelper
::
print_dump_line
(
"compressor"
,
meta
->
compressor_
);
PrintHelper
::
print_dump_line
(
"row_count_delta"
,
meta
->
row_count_delta_
);
PrintHelper
::
print_dump_line
(
"table_id"
,
meta
->
table_id_
);
PrintHelper
::
print_dump_line
(
"macro_block_deletion_flag"
,
meta
->
macro_block_deletion_flag_
);
PrintHelper
::
print_dump_line
(
"data_seq"
,
meta
->
data_seq_
);
PrintHelper
::
print_dump_list_start
(
"column_id_array"
);
PrintHelper
::
print_dump_line
(
"schema_version"
,
meta
->
schema_version_
);
for
(
int64_t
i
=
0
;
i
<
meta
->
column_number_
;
++
i
)
{
PrintHelper
::
print_dump_line
(
"snapshot_version"
,
meta
->
snapshot_version_
);
PrintHelper
::
print_dump_list_value
(
meta
->
column_id_array_
[
i
],
i
==
meta
->
rowkey_column_number_
-
1
);
PrintHelper
::
print_dump_line
(
"schema_rowkey_col_cnt"
,
meta
->
schema_rowkey_col_cnt_
);
}
PrintHelper
::
print_dump_line
(
"row_count_delta"
,
meta
->
row_count_delta_
);
PrintHelper
::
print_dump_list_end
();
PrintHelper
::
print_dump_line
(
"macro_block_deletion_flag"
,
meta
->
macro_block_deletion_flag_
);
PrintHelper
::
print_dump_list_start
(
"column_type_array"
);
PrintHelper
::
print_dump_list_start
(
"column_id_array"
);
for
(
int64_t
i
=
0
;
i
<
meta
->
column_number_
;
++
i
)
{
for
(
int64_t
i
=
0
;
i
<
meta
->
column_number_
;
++
i
)
{
PrintHelper
::
print_dump_list_value
(
to_cstring
(
meta
->
column_type_array_
[
i
]),
i
==
meta
->
rowkey_column_number_
-
1
);
PrintHelper
::
print_dump_list_value
(
meta
->
column_id_array_
[
i
],
i
==
meta
->
rowkey_column_number_
-
1
);
}
}
PrintHelper
::
print_dump_list_end
();
PrintHelper
::
print_dump_list_end
();
PrintHelper
::
print_dump_list_start
(
"column_checksum"
);
PrintHelper
::
print_dump_list_start
(
"column_type_array"
);
for
(
int64_t
i
=
0
;
i
<
meta
->
column_number_
;
++
i
)
{
for
(
int64_t
i
=
0
;
i
<
meta
->
column_number_
;
++
i
)
{
PrintHelper
::
print_dump_list_value
(
meta
->
column_checksum_
[
i
],
i
==
meta
->
rowkey_column_number_
-
1
);
PrintHelper
::
print_dump_list_value
(
to_cstring
(
meta
->
column_type_array_
[
i
]),
i
==
meta
->
rowkey_column_number_
-
1
);
}
}
PrintHelper
::
print_dump_list_end
();
PrintHelper
::
print_dump_list_end
();
PrintHelper
::
print_dump_list_start
(
"end_key"
);
PrintHelper
::
print_dump_list_start
(
"column_checksum"
);
for
(
int64_t
i
=
0
;
i
<
meta
->
rowkey_column_number_
;
++
i
)
{
for
(
int64_t
i
=
0
;
i
<
meta
->
column_number_
;
++
i
)
{
PrintHelper
::
print_cell
(
meta
->
endkey_
[
i
],
in_csv_
);
PrintHelper
::
print_dump_list_value
(
meta
->
column_checksum_
[
i
],
i
==
meta
->
rowkey_column_number_
-
1
);
}
}
PrintHelper
::
print_dump_list_end
();
PrintHelper
::
print_dump_list_end
();
PrintHelper
::
print_dump_list_start
(
"column_order"
);
PrintHelper
::
print_dump_list_start
(
"end_key"
);
for
(
int64_t
i
=
0
;
i
<
meta
->
column_number_
;
++
i
)
{
for
(
int64_t
i
=
0
;
i
<
meta
->
rowkey_column_number_
;
++
i
)
{
PrintHelper
::
print_dump_list_value
(
meta
->
column_order_array_
[
i
],
i
==
meta
->
column_number_
-
1
);
PrintHelper
::
print_cell
(
meta
->
endkey_
[
i
],
in_csv_
);
}
}
PrintHelper
::
print_dump_list_end
();
PrintHelper
::
print_dump_list_end
();
PrintHelper
::
print_end_line
();
PrintHelper
::
print_dump_list_start
(
"column_order"
);
for
(
int64_t
i
=
0
;
i
<
meta
->
column_number_
;
++
i
)
{
PrintHelper
::
print_dump_list_value
(
meta
->
column_order_array_
[
i
],
i
==
meta
->
column_number_
-
1
);
}
PrintHelper
::
print_dump_list_end
();
PrintHelper
::
print_end_line
();
//}
}
}
void
ObAdminDumpsstExecutor
::
dump_sstable
()
void
ObAdminDumpsstExecutor
::
dump_sstable
()
...
@@ -456,12 +446,9 @@ void ObAdminDumpsstExecutor::dump_sstable()
...
@@ -456,12 +446,9 @@ void ObAdminDumpsstExecutor::dump_sstable()
void
ObAdminDumpsstExecutor
::
dump_sstable_meta
()
void
ObAdminDumpsstExecutor
::
dump_sstable_meta
()
{
{
int
ret
=
OB_SUCCESS
;
int
ret
=
OB_SUCCESS
;
ObTableHandle
handle
;
ObSSTable
*
sstable
=
NULL
;
ObSSTable
*
sstable
=
NULL
;
if
(
OB_FAIL
(
ObPartitionService
::
get_instance
().
acquire_sstable
(
table_key_
,
hand
le
)))
{
if
(
OB_FAIL
(
replay_slog_to_get_sstable
(
sstab
le
)))
{
STORAGE_LOG
(
ERROR
,
"fail to acquire table"
,
K
(
ret
),
K
(
table_key_
));
STORAGE_LOG
(
ERROR
,
"fail to acquire table"
,
K
(
ret
),
K
(
table_key_
));
}
else
if
(
OB_FAIL
(
handle
.
get_sstable
(
sstable
)))
{
STORAGE_LOG
(
ERROR
,
"fail to get sstable"
,
K
(
ret
));
}
else
if
(
OB_ISNULL
(
sstable
))
{
}
else
if
(
OB_ISNULL
(
sstable
))
{
ret
=
OB_ERR_UNEXPECTED
;
ret
=
OB_ERR_UNEXPECTED
;
STORAGE_LOG
(
WARN
,
"error unexpected, sstable must not be NULL"
,
K
(
ret
));
STORAGE_LOG
(
WARN
,
"error unexpected, sstable must not be NULL"
,
K
(
ret
));
...
...
tools/ob_admin/dumpsst/ob_admin_dumpsst_executor.h
浏览文件 @
fd0fb243
...
@@ -16,7 +16,6 @@
...
@@ -16,7 +16,6 @@
#include "lib/container/ob_array.h"
#include "lib/container/ob_array.h"
#include "share/config/ob_config_manager.h"
#include "share/config/ob_config_manager.h"
#include "storage/blocksstable/ob_block_sstable_struct.h"
#include "storage/blocksstable/ob_block_sstable_struct.h"
#include "storage/blocksstable/ob_macro_block_meta_mgr.h"
#include "storage/blocksstable/ob_store_file.h"
#include "storage/blocksstable/ob_store_file.h"
#include "storage/ob_i_table.h"
#include "storage/ob_i_table.h"
#include "observer/ob_server_struct.h"
#include "observer/ob_server_struct.h"
...
...
tools/ob_admin/slog_tool/ob_admin_slog_executor.cpp
浏览文件 @
fd0fb243
...
@@ -13,7 +13,6 @@
...
@@ -13,7 +13,6 @@
#define USING_LOG_PREFIX COMMON
#define USING_LOG_PREFIX COMMON
#include "ob_admin_slog_executor.h"
#include "ob_admin_slog_executor.h"
#include "storage/blocksstable/slog/ob_base_storage_logger.h"
#include "storage/blocksstable/slog/ob_base_storage_logger.h"
#include "storage/blocksstable/ob_macro_block_meta_mgr.h"
#include "storage/ob_partition_service.h"
#include "storage/ob_partition_service.h"
#include "storage/ob_table_mgr.h"
#include "storage/ob_table_mgr.h"
#include "storage/ob_tenant_config_mgr.h"
#include "storage/ob_tenant_config_mgr.h"
...
@@ -49,9 +48,6 @@ int ObAdminSlogExecutor::execute(int argc, char *argv[])
...
@@ -49,9 +48,6 @@ int ObAdminSlogExecutor::execute(int argc, char *argv[])
if
(
NULL
!=
log_dir_
&&
log_file_id_
>
0
)
{
if
(
NULL
!=
log_dir_
&&
log_file_id_
>
0
)
{
if
(
OB_FAIL
(
SLOGGER
.
register_redo_module
(
OB_REDO_LOG_PARTITION
,
&
partition_module
)))
{
if
(
OB_FAIL
(
SLOGGER
.
register_redo_module
(
OB_REDO_LOG_PARTITION
,
&
partition_module
)))
{
LOG_WARN
(
"fail to register partition module"
,
K
(
ret
));
LOG_WARN
(
"fail to register partition module"
,
K
(
ret
));
}
else
if
(
OB_FAIL
(
SLOGGER
.
register_redo_module
(
OB_REDO_LOG_MACROBLOCK
,
&
ObMacroBlockMetaMgr
::
get_instance
())))
{
LOG_WARN
(
"fail to register macro module"
,
K
(
ret
));
}
else
if
(
OB_FAIL
(
SLOGGER
.
register_redo_module
(
OB_REDO_LOG_TABLE_MGR
,
}
else
if
(
OB_FAIL
(
SLOGGER
.
register_redo_module
(
OB_REDO_LOG_TABLE_MGR
,
&
ObTableMgr
::
get_instance
())))
{
&
ObTableMgr
::
get_instance
())))
{
LOG_WARN
(
"fail to register table module"
,
K
(
ret
));
LOG_WARN
(
"fail to register table module"
,
K
(
ret
));
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录