• 首页
  • css3教程
  • html5教程
  • jQuery手册
  • vue手册
  • php手册
  • MySQL手册
  • apache手册
  • redis手册
  • ndbinfo config_values表

    config_values表提供有关节点配置参数值的当前状态的信息。表中的每一行对应于给定节点上参数的当前值。

    config_params表的列

    栏名类型描述
    node_id整数集群中节点的ID
    config_param整数参数的内部ID号
    config_valuestring参数的当前值

    该表的config_param列和该config_params表的param_number列使用相同的参数标识符。通过将这些列上的两个表连接起来,可以获得有关所需节点配置参数的详细信息。此处显示的查询提供了集群中每个数据节点上所有参数的当前值,按节点ID和参数名称排序:

    SELECT    v.node_id AS 'Node Id',
              p.param_name AS 'Parameter',
              v.config_value AS 'Value'
    FROM      config_values v
    JOIN      config_params p
    ON        v.config_param=p.param_number
    WHERE     p.param_name NOT LIKE '\_\_%'
    ORDER BY  v.node_id, p.param_name;
    

    在用于简单测试的小型示例集群上运行时,上一个查询的部分输出:

    +---------	+------------------------------------------	+----------------	+
    | Node Id	| Parameter	| Value	|
    +---------	+------------------------------------------	+----------------	+
    |       2	| Arbitration	| 1	|
    |       2	| ArbitrationTimeout	| 7500	|
    |       2	| BackupDataBufferSize	| 16777216	|
    |       2	| BackupDataDir	| /home/jon/data	|
    |       2	| BackupDiskWriteSpeedPct	| 50	|
    |       2	| BackupLogBufferSize	| 16777216	|
    
    ...
    
    |       3	| TotalSendBufferMemory	| 0	|
    |       3	| TransactionBufferMemory	| 1048576	|
    |       3	| TransactionDeadlockDetectionTimeout	| 1200	|
    |       3	| TransactionInactiveTimeout	| 4294967039	|
    |       3	| TwoPassInitialNodeRestartCopy	| 0	|
    |       3	| UndoDataBuffer	| 16777216	|
    |       3	| UndoIndexBuffer	| 2097152	|
    +---------	+------------------------------------------	+----------------	+
    248 rows in set (0.02 sec)
    

    WHERE子句过滤掉名称以双下划线(__)开头的参数;这些参数保留给NDB开发人员用于测试和其他内部使用,并不打算在生产NDB群集中使用。

    您可以通过发出适当的查询来获得更具体,更详细的输出,或两者兼而有之。本实施例提供的所有类型的有关可用信息NodeIdNoOfReplicasHostNameDataMemoryIndexMemory,和TotalSendBufferMemory参数作为目前对于集群中的所有数据节点设置:

    SELECT  p.param_name AS Name,
            v.node_id AS Node,
            p.param_type AS Type,
            p.param_default AS 'Default',
            p.param_min AS Minimum,
            p.param_max AS Maximum,
            CASE p.param_mandatory WHEN 1 THEN 'Y' ELSE 'N' END AS 'Required',
            v.config_value AS Current
    FROM    config_params p
    JOIN    config_values v
    ON      p.param_number = v.config_param
    WHERE   p. param_name
      IN ('NodeId', 'NoOfReplicas', 'HostName',
          'DataMemory', 'IndexMemory', 'TotalSendBufferMemory')\G
    

    在具有两个用于简单测试的数据节点的小型NDB群集上运行时,此查询的输出如下所示(NDB 8.0.18及更高版本):

    *************************** 1. row***************************
        Name: NodeId
        Node: 2
        Type: unsigned
     Default:
     Minimum: 1
     Maximum: 144
    Required: Y
     Current: 2
    *************************** 2. row***************************
        Name: HostName
        Node: 2
        Type: string
     Default: localhost
     Minimum:
     Maximum:
    Required: N
     Current: 127.0.0.1
    *************************** 3. row***************************
        Name: TotalSendBufferMemory
        Node: 2
        Type: unsigned
     Default: 0
     Minimum: 262144
     Maximum: 4294967039
    Required: N
     Current: 0
    *************************** 4. row***************************
        Name: NoOfReplicas
        Node: 2
        Type: unsigned
     Default: 2
     Minimum: 1
     Maximum: 4
    Required: N
     Current: 2
    *************************** 5. row***************************
        Name: DataMemory
        Node: 2
        Type: unsigned
     Default: 102760448
     Minimum: 1048576
     Maximum: 1099511627776
    Required: N
     Current: 524288000
    *************************** 6. row***************************
        Name: NodeId
        Node: 3
        Type: unsigned
     Default:
     Minimum: 1
     Maximum: 144
    Required: Y
     Current: 3
    *************************** 7. row***************************
        Name: HostName
        Node: 3
        Type: string
     Default: localhost
     Minimum:
     Maximum:
    Required: N
     Current: 127.0.0.1
    *************************** 8. row***************************
        Name: TotalSendBufferMemory
        Node: 3
        Type: unsigned
     Default: 0
     Minimum: 262144
     Maximum: 4294967039
    Required: N
     Current: 0
    *************************** 9. row***************************
        Name: NoOfReplicas
        Node: 3
        Type: unsigned
     Default: 2
     Minimum: 1
     Maximum: 4
    Required: N
     Current: 2
    *************************** 10. row***************************
        Name: DataMemory
        Node: 3
        Type: unsigned
     Default: 102760448
     Minimum: 1048576
     Maximum: 1099511627776
    Required: N
     Current: 524288000
    10 rows in set (0.01 sec)