读取重做日志文件,检查其中的错误,以人类可读的格式打印其内容,或者同时执行两者。ndb_redo_log_reader 主要供 NDB Cluster 开发人员和支持人员在调试和诊断问题时使用。Reads a redo log file, checking it for errors, printing its contents in a human-readable format, or both. ndb_redo_log_reader is intended for use primarily by NDB Cluster developers and Support personnel in debugging and diagnosing problems.
该工具仍在开发中,其语法和行为在未来的 NDB Cluster 版本中可能会发生变化。This utility remains under development, and its syntax and behavior are subject to change in future NDB Cluster releases.
ndb_redo_log_reader 的 C 源文件可以在目录 /storage/ndb/src/kernel/blocks/dblqh/redoLogReader 找到。The C++ source files for ndb_redo_log_reader
can be found in the directory
/storage/ndb/src/kernel/blocks/dblqh/redoLogReader.
可以与 ndb_redo_log_reader 一起使用的选项显示在下表中。表格后面有额外描述。Options that can be used with ndb_redo_log_reader are shown in the following table. Additional descriptions follow the table.
用法Usage
ndb_redo_log_readerfile_name[options]
file_name 是集群重做日志文件的名称。重做日志文件位于数据节点数据目录下编号的子目录中(DataDir);该目录下到重做日志文件的路径符合模式 ndb_。nodeid_fs/D#/DBLQH/S#.FragLognodeid 是数据节点的节点 ID。两个 # 实例表示数字(不一定相同);D 后的数字范围是 8-39;S 后的数字范围根据 NoOfFragmentLogFiles 配置参数的值而变化,该参数默认值为 16;因此,文件名中数字的默认范围是 0-15。更多信息,请参阅 NDB Cluster 数据节点文件系统目录。file_name is the name of a cluster
redo log file. redo log files are located in the numbered
directories under the data node's data directory
(DataDir); the path
under this directory to the redo log files matches the pattern
ndb_.
nodeid_fs/D#/DBLQH/S#.FragLognodeid is the data node's node
ID. The two instances of # each
represent a number (not necessarily the same number); the number
following D is in the range 8-39 inclusive;
the range of the number following S varies
according to the value of the
NoOfFragmentLogFiles
configuration parameter, whose default value is 16; thus, the
default range of the number in the file name is 0-15 inclusive.
For more information, see
NDB Cluster Data Node File System Directory.
要读取的文件名后面可以跟随下列一个或多个选项:The name of the file to be read may be followed by one or more of the options listed here:
命令行格式Command-Line Format -dump打印转储信息。Print dump info.
--file-key,-K命令行格式Command-Line Format --file-key=key通过
stdin、tty或my.cnf文件提供文件解密密钥。Supply file decryption key usingstdin,tty, or amy.cnffile.命令行格式Command-Line Format --file-key-from-stdin通过
stdin提供文件解密密钥。Supply file decryption key usingstdin.命令行格式Command-Line Format -filedescriptors-filedescriptors:仅打印文件描述符。-filedescriptors: Print file descriptors only.命令行格式Command-Line Format --help--help命令行格式Command-Line Format -lap提供 LAP 信息,包括启动和完成的最大 GCI。Provide lap info, with max GCI started and completed.
命令行格式Command-Line Format -mbyte #类型Type 数字Numeric 默认值Default Value 0最小值Minimum Value 0最大值Maximum Value 15-mbyte #:起始兆字节。-mbyte: Starting megabyte.##是 0 到 15 范围内的整数,包括 0 和 15。#is an integer in the range 0 to 15, inclusive.命令行格式Command-Line Format -mbyteheaders-mbyteheaders:仅显示文件中每个兆字节的第一页头信息。-mbyteheaders: Show only the first page header of every megabyte in the file.命令行格式Command-Line Format -noprint-noprint:不打印日志文件的内容。-noprint: Do not print the contents of the log file.命令行格式Command-Line Format -nocheck-nocheck:不检查日志文件中的错误。-nocheck: Do not check the log file for errors.命令行格式Command-Line Format -page #类型Type 整数Integer 默认值Default Value 0最小值Minimum Value 0最大值Maximum Value 31-page #:从此页开始。-page: Start at this page.##是范围在 0 到 31 的整数(含)。#is an integer in the range 0 to 31, inclusive.命令行格式Command-Line Format -pageheaders-pageheaders:仅显示页面头。-pageheaders: Show page headers only.命令行格式Command-Line Format -pageindex #类型Type 整数Integer 默认值Default Value 12最小值Minimum Value 12最大值Maximum Value 8191-pageindex #:从此页面索引开始。-pageindex: Start at this page index.##是一个介于 12 和 8191 之间的整数(包括端点)。#is an integer between 12 and 8191, inclusive.命令行格式Command-Line Format -twiddle位移转储。Bit-shifted dump.
像 ndb_print_backup_file 和 ndb_print_schema_file(不同于大多数需要在管理服务器主机上运行或连接到管理服务器的 NDB 工具),ndb_redo_log_reader 必须在集群数据节点上运行,因为它直接访问数据节点文件系统。由于它不使用管理服务器,因此在管理服务器未运行时,甚至在集群完全关闭时,也可以使用该工具。Like ndb_print_backup_file and
ndb_print_schema_file (and unlike most of the
NDB utilities that are intended to
be run on a management server host or to connect to a management
server) ndb_redo_log_reader must be run on a
cluster data node, since it accesses the data node file system
directly. Because it does not make use of the management server,
this utility can be used when the management server is not
running, and even when the cluster has been completely shut
down.