#分布式配置文件

分布式配置文件列示YashanDB服务端各节点上的数据库相关信息,以及由多节点所组成的逻辑集群架构信息。

其中,与参数相关的配置信息分为如下两部分:

  • 建库参数:这些参数用于控制创建数据库实例时的相关信息,在[[group]]节点组级别进行配置,即每个节点组内的多个节点创建一致的数据库实例。
  • 配置参数:每个数据库实例的配置参数信息,在[[group.node]]节点级别进行配置。

示例:(yashandb.toml)

# 以下内容以实际展示结果为准
    cluster = "yashandb"	#安装后修改也不会生效,除非重新安装
    create_simple_schema = false	#为true部署完会执行示例的sql,若改为true需要在deploy时指定sys-password参数
    deploy_mode = "MINI"	#分布式的部署模式
    uuid = "64f1568f4f6b033e58a015a833f0ad9e"	#系统自动生成,不建议修改
    yas_type = "DE"	#部署模式,安装后修改也不会生效,除非重新安装

    [[group]]
    group_type = "mn"	#节点组类型,安装后修改也不会生效,除非重新安装
    name = "mng1"	#节点组名称,安装后修改也不会生效,除非重新安装
      [group.config]	#可配置所有建库参数,不配置时采用默认值
        CHARACTER_SET = "utf8"
        ISARCHIVELOG = true
        REDO_FILE_NUM = 4
        REDO_FILE_SIZE = "128M"

      [[group.node]]	 #节点配置
        data_path = "/data/yashan/yasdb_data"	#为DATA目录,安装后修改也不会生效,除非重新安装
        hostid = "host0001" #节点所在服务器标识,安装后修改也不会生效,除非重新安装
        role = 1	#数据库主备角色,安装后修改也不会生效,除非重新安装
        [group.node.config] #可配置所有数据库参数,不配置时采用默认值,安装后修改也不会生效,除非重新安装
          DATA_BUFFER_SIZE = "256M"
          DB_BLOCK_SIZE = "8K"
          DDL_LOCK_TIMEOUT = 60
          DEFAULT_TABLE_TYPE = "LSC"
          DICTIONARY_CACHE_SIZE = 20
          DIN_ADDR = "192.168.1.2:1679"
          DSTB_POOL_SIZE = 10
          LARGE_POOL_SIZE = "32M"
          LISTEN_ADDR = "192.168.1.2:1678"
          MAX_SESSIONS = 1024
          OPEN_CURSORS = 310
          REDO_BUFFER_SIZE = "8M"
          REPLICATION_ADDR = "192.168.1.2:1680"
          RUN_LOG_FILE_PATH = "/data/yashan/yasdb_home/yashandb/23.2.1.100/log/yashandb/mn-1-1/run"
          RUN_LOG_LEVEL = "DEBUG"
          SHARE_POOL_SIZE = "256M"
          SLOW_LOG_FILE_PATH = "/data/yashan/yasdb_home/yashandb/23.2.1.100/log/yashandb/mn-1-1/slow"
          SQL_POOL_SIZE = 45
          TRANSACTION_LOCK_TIMEOUT = 300
          UNDO_RETENTION = 300

    [[group]]
    group_type = "cn"
    name = "cng1"
    [group.config]
        CHARACTER_SET = "utf8"
        ISARCHIVELOG = true
        REDO_FILE_NUM = 4
        REDO_FILE_SIZE = "128M"

    [[group.node]]
        data_path = "/data/yashan/yasdb_data"
        hostid = "host0001"
        role = 1
        [group.node.config]
          DATA_BUFFER_SIZE = "256M"
          DB_BLOCK_SIZE = "8K"
          DDL_LOCK_TIMEOUT = 60
          DEFAULT_TABLE_TYPE = "LSC"
          DICTIONARY_CACHE_SIZE = 20
          DIN_ADDR = "192.168.1.2:1689"
          DSTB_POOL_SIZE = 10
          LARGE_POOL_SIZE = "32M"
          LISTEN_ADDR = "192.168.1.2:1688"
          MAX_PARALLEL_WORKERS = 128
          MAX_REACTOR_CHANNELS = 1
          MAX_SESSIONS = 1024
          OPEN_CURSORS = 310
          REDO_BUFFER_SIZE = "8M"
          REPLICATION_ADDR = "192.168.1.2:1690"
          RUN_LOG_FILE_PATH = "/data/yashan/yasdb_home/yashandb/23.2.1.100/log/yashandb/cn-2-1/run"
          RUN_LOG_LEVEL = "DEBUG"
          SHARE_POOL_SIZE = "256M"
          SLOW_LOG_FILE_PATH = "/data/yashan/yasdb_home/yashandb/23.2.1.100/log/yashandb/cn-2-1/slow"
          SQL_POOL_SIZE = 45
          TRANSACTION_LOCK_TIMEOUT = 300
          UNDO_RETENTION = 300
          WORK_AREA_HEAP_SIZE = "2M"
          WORK_AREA_POOL_SIZE = "128M"

    [[group]]
    group_type = "dn"
    name = "dng1"
    [group.config]
        CHARACTER_SET = "utf8"
        ISARCHIVELOG = true
        REDO_FILE_NUM = 4
        REDO_FILE_SIZE = "128M"

    [[group.node]]
        data_path = "/data/yashan/yasdb_data"
        hostid = "host0001"
        role = 1
        [group.node.config]
          DATA_BUFFER_SIZE = "256M"
          DB_BLOCK_SIZE = "8K"
          DDL_LOCK_TIMEOUT = 60
          DEFAULT_TABLE_TYPE = "LSC"
          DICTIONARY_CACHE_SIZE = 20
          DIN_ADDR = "192.168.1.2:1699"
          DSTB_POOL_SIZE = 10
          LARGE_POOL_SIZE = "32M"
          LISTEN_ADDR = "192.168.1.2:1698"
          MAX_PARALLEL_WORKERS = 512
          MAX_SESSIONS = 1024
          OPEN_CURSORS = 310
          REDO_BUFFER_SIZE = "8M"
          REPLICATION_ADDR = "192.168.1.2:1700"
          RUN_LOG_FILE_PATH = "/data/yashan/yasdb_home/yashandb/23.2.1.100/log/yashandb/dn-3-1/run"
          RUN_LOG_LEVEL = "DEBUG"
          SHARE_POOL_SIZE = "256M"
          SLOW_LOG_FILE_PATH = "/data/yashan/yasdb_home/yashandb/23.2.1.100/log/yashandb/dn-3-1/slow"
          SQL_POOL_SIZE = 45
          TRANSACTION_LOCK_TIMEOUT = 300
          UNDO_RETENTION = 300
          WORK_AREA_HEAP_SIZE = "2M"
          WORK_AREA_POOL_SIZE = "128M"

    [[group]]
    group_type = "dn"
    name = "dng2"
    [group.config]
        CHARACTER_SET = "utf8"
        ISARCHIVELOG = true
        REDO_FILE_NUM = 4
        REDO_FILE_SIZE = "128M"

    [[group.node]]
        data_path = "/data/yashan/yasdb_data"
        hostid = "host0001"
        role = 1
        [group.node.config]
          DATA_BUFFER_SIZE = "256M"
          DB_BLOCK_SIZE = "8K"
          DDL_LOCK_TIMEOUT = 60
          DEFAULT_TABLE_TYPE = "LSC"
          DICTIONARY_CACHE_SIZE = 20
          DIN_ADDR = "192.168.1.2:1702"
          DSTB_POOL_SIZE = 10
          LARGE_POOL_SIZE = "32M"
          LISTEN_ADDR = "192.168.1.2:1701"
          MAX_PARALLEL_WORKERS = 512
          MAX_SESSIONS = 1024
          OPEN_CURSORS = 310
          REDO_BUFFER_SIZE = "8M"
          REPLICATION_ADDR = "192.168.1.2:1703"
          RUN_LOG_FILE_PATH = "/data/yashan/yasdb_home/yashandb/23.2.1.100/log/yashandb/dn-4-1/run"
          RUN_LOG_LEVEL = "DEBUG"
          SHARE_POOL_SIZE = "256M"
          SLOW_LOG_FILE_PATH = "/data/yashan/yasdb_home/yashandb/23.2.1.100/log/yashandb/dn-4-1/slow"
          SQL_POOL_SIZE = 45
          TRANSACTION_LOCK_TIMEOUT = 300
          UNDO_RETENTION = 300
          WORK_AREA_HEAP_SIZE = "2M"
          WORK_AREA_POOL_SIZE = "128M"

    [[group]]
    group_type = "dn"
    name = "dng3"
    [group.config]
        CHARACTER_SET = "utf8"
        ISARCHIVELOG = true
        REDO_FILE_NUM = 4
        REDO_FILE_SIZE = "128M"

    [[group.node]]
        data_path = "/data/yashan/yasdb_data"
        hostid = "host0001"
        role = 1
        [group.node.config]
          DATA_BUFFER_SIZE = "256M"
          DB_BLOCK_SIZE = "8K"
          DDL_LOCK_TIMEOUT = 60
          DEFAULT_TABLE_TYPE = "LSC"
          DICTIONARY_CACHE_SIZE = 20
          DIN_ADDR = "192.168.1.2:1705"
          DSTB_POOL_SIZE = 10
          LARGE_POOL_SIZE = "32M"
          LISTEN_ADDR = "192.168.1.2:1704"
          MAX_PARALLEL_WORKERS = 512
          MAX_SESSIONS = 1024
          OPEN_CURSORS = 310
          REDO_BUFFER_SIZE = "8M"
          REPLICATION_ADDR = "192.168.1.2:1706"
          RUN_LOG_FILE_PATH = "/data/yashan/yasdb_home/yashandb/23.2.1.100/log/yashandb/dn-5-1/run"
          RUN_LOG_LEVEL = "DEBUG"
          SHARE_POOL_SIZE = "256M"
          SLOW_LOG_FILE_PATH = "/data/yashan/yasdb_home/yashandb/23.2.1.100/log/yashandb/dn-5-1/slow"
          SQL_POOL_SIZE = 45
          TRANSACTION_LOCK_TIMEOUT = 300
          UNDO_RETENTION = 300
          WORK_AREA_HEAP_SIZE = "2M"
          WORK_AREA_POOL_SIZE = "128M"

pdf-btn 下载文档
copy-btn 复制链接