• 配置快照
    • 描述
    • 标示
      • 字段信息
    • 快照参数
    • 示例

    配置快照

    描述

    配置快照 SDB_SNAP_CONFIGS 列出数据库中指定节点的配置信息。

    每一个节点上的配置信息为一条记录。

    标示

    SDB_SNAP_CONFIGS

    字段信息

    字段信息详见数据库配置一节。

    快照参数

    参数名参数类型描述是否必填
    ModeString指定返回配置的模式。在 run 模式下,显示当前运行时配置信息,在 local 模式下,显示配置文件中配置信息。如 { "Mode": "local" }。默认为 run。
    ExpandBool/String是否扩展显示用户未配置的配置项。如 { "Expand": false }。默认为 true。

    Note:

    在查询快照时指定快照参数,请参考 SdbSnapshotOption。

    示例

    查看数据组 db1 中数据节点 20000 上的配置信息

    1. > db.snapshot( SDB_SNAP_CONFIGS, { GroupName:'db1', ServiceName:'20000' } )
    2. {
    3. "NodeName": "ubuntu-zwb:20000"
    4. "confpath": "/home/sequoiadb/conf/local/20000/",
    5. "dbpath": "/home/sequoiadb/20000/",
    6. "indexpath": "/home/sequoiadb/20000/",
    7. "diagpath": "/home/sequoiadb/20000/diaglog/",
    8. "auditpath": "/home/sequoiadb/20000/diaglog/",
    9. "logpath": "/home/sequoiadb/20000/replicalog/",
    10. "bkuppath": "/home/sequoiadb/20000/bakfile/",
    11. "wwwpath": "/home/sequoiadb/web/",
    12. "lobpath": "/home/sequoiadb/20000/",
    13. "lobmetapath": "/home/sequoiadb/20000/",
    14. "maxpool": 50,
    15. "diagnum": 20,
    16. "auditnum": 20,
    17. "auditmask": "SYSTEM|DDL|DCL",
    18. "ServiceName": "20000",
    19. "replname": "20001",
    20. "catalogname": "20003",
    21. "shardname": "20002",
    22. "httpname": "20004",
    23. "omname": "20005",
    24. "diaglevel": 3,
    25. "role": "data",
    26. "logfilesz": 64,
    27. "logfilenum": 20,
    28. "logbuffsize": 1024,
    29. "numpreload": 0,
    30. "maxprefpool": 0,
    31. "maxsubquery": 0,
    32. "maxreplsync": 10,
    33. "replbucketsize": 32,
    34. "syncstrategy": "KeepNormal",
    35. "preferedinstance": "M",
    36. "preferedinstancemode": "random",
    37. "instanceid": 0,
    38. "dataerrorop": 1,
    39. "memdebug": "FALSE",
    40. "memdebugsize": 0,
    41. "indexscanstep": 100,
    42. "dpslocal": "FALSE",
    43. "traceon": "FALSE",
    44. "tracebufsz": 256,
    45. "transactionon": "FALSE",
    46. "transactiontimeout": 60,
    47. "sharingbreak": 7000,
    48. "startshifttime": 600,
    49. "catalogaddr": "ubuntu-zwb:30003,ubuntu-zwb:30013,ubuntu-zwb:30023",
    50. "tmppath": "/home/sequoiadb/20000/tmp/",
    51. "sortbuf": 256,
    52. "hjbuf": 128,
    53. "directioinlob": "FALSE",
    54. "sparsefile": "FALSE",
    55. "weight": 10,
    56. "auth": "TRUE",
    57. "planbuckets": 500,
    58. "optimeout": 300000,
    59. "overflowratio": 12,
    60. "extendthreshold": 32,
    61. "signalinterval": 0,
    62. "maxcachesize": 0,
    63. "maxcachejob": 10,
    64. "maxsyncjob": 10,
    65. "syncinterval": 10000,
    66. "syncrecordnum": 0,
    67. "syncdeep": "FALSE",
    68. "archiveon": "FALSE",
    69. "archivecompresson": "TRUE",
    70. "archivepath": "/home/sequoiadb/20000/archivelog/",
    71. "archivetimeout": 600,
    72. "archiveexpired": 240,
    73. "archivequota": 10,
    74. "omaddr": "",
    75. "dmschkinterval": 0,
    76. "cachemergesz": 0,
    77. "pagealloctimeout": 0,
    78. "perfstat": "FALSE",
    79. "optcostthreshold": 20,
    80. "enablemixcmp": "FALSE",
    81. "plancachelevel": 3,
    82. "maxconn": 0
    83. }
    84. Return 1 row(s).

    查看数据组 db1 中数据节点 20000 上配置文件中的配置信息

    1. > var option = new SdbSnapshotOption().cond( { GroupName:'db1', ServiceName:'20000' } ).options( { "Mode": "local", "Expand": false } )
    2. > db.snapshot( SDB_SNAP_CONFIGS, option )
    3. {
    4. "NodeName": "ubuntu-zwb:20000",
    5. "dbpath": "/home/sequoiadb/20000/",
    6. "ServiceName": "20000",
    7. "diaglevel": 3,
    8. "role": "data",
    9. "catalogaddr": "ubuntu-zwb:30003,ubuntu-zwb:30013,ubuntu-zwb:30023",
    10. "perfstat": "FALSE",
    11. "businessname": "yyy",
    12. "clustername": "xxx"
    13. }
    14. Return 1 row(s).