#配置文件示例

本文以3MN 2CN 3DN组的配置为例,展示分布式高可用的配置文件内容,其中所有的IP/PORT、名称和data_path均为举例,用户需替换为实际值方可使用。

cluster = "yashandb" #安装后不可修改,除非重新安装
deploy_mode = "NORMAL" #安装后不可修改,除非重新安装
sys_password = "Cod-2022" #后续修改无效,如需修改请使用yasboot工具进行修改
uuid = "64181bf0006959d68e2fe1c6de6d1144" #系统自动生成,不可修改

[[group]]
  group_type = "mn" #安装后不可修改,除非重新安装
  name = "mng1" #安装后不可修改,除非重新安装
  [group.config] #可配置所有建库参数,不配置时采用默认值
    ISARCHIVELOG = true #安装后不可修改,除非重新建库

  [[group.node]]
    data_path = "/home/yashan/yasdb_data" #为DATA目录,安装后不可修改,除非重新安装
    hostid = "host0001" #安装后不可修改,除非重新安装
    role = 1 #初始主备角色,通过主备切换操作修改
    [group.node.config]  #可配置所有数据库参数,不配置时采用默认值,且可在安装后修改配置(只读参数不可修改)
      DDL_LOCK_TIMEOUT = 60
      DEFAULT_TABLE_TYPE = "LSC"
      DICTIONARY_CACHE_SIZE = 20
      DIN_ADDR = "192.168.1.2:1679"
      DSTB_POOL_SIZE = 10
      LISTEN_ADDR = "192.168.1.2:1678"
      REPLICATION_ADDR = "192.168.1.2:1680"
      RUN_LOG_FILE_PATH = "/home/yashan/yasdb_home/yashandb/22.2.2.0/log/yashandb/mn-1-1/run"
      RUN_LOG_LEVEL = "INFO"
      SLOW_LOG_FILE_PATH = "/home/yashan/yasdb_home/yashandb/22.2.2.0/log/yashandb/mn-1-1/slow"
      SQL_POOL_SIZE = 45
      TRANSACTION_LOCK_TIMEOUT = 300 #分布式事务的死锁超时时间由此参数控制
#其他节点的修改情况均和mng1节点描述一致
  [[group.node]]
    data_path = "/home/yashan/yasdb_data"
    hostid = "host0002"
    role = 2
    [group.node.config]
      DDL_LOCK_TIMEOUT = 60
      DEFAULT_TABLE_TYPE = "LSC"
      DICTIONARY_CACHE_SIZE = 20
      DIN_ADDR = "192.168.1.3:1679"
      DSTB_POOL_SIZE = 10
      LISTEN_ADDR = "192.168.1.3:1678"
      REPLICATION_ADDR = "192.168.1.3:1680"
      RUN_LOG_FILE_PATH = "/home/yashan/yasdb_home/yashandb/22.2.2.0/log/yashandb/mn-1-2/run"
      RUN_LOG_LEVEL = "INFO"
      SLOW_LOG_FILE_PATH = "/home/yashan/yasdb_home/yashandb/22.2.2.0/log/yashandb/mn-1-2/slow"
      SQL_POOL_SIZE = 45
      TRANSACTION_LOCK_TIMEOUT = 300

  [[group.node]]
    data_path = "/home/yashan/yasdb_data"
    hostid = "host0003"
    role = 2
    [group.node.config]
      DDL_LOCK_TIMEOUT = 60
      DEFAULT_TABLE_TYPE = "LSC"
      DICTIONARY_CACHE_SIZE = 20
      DIN_ADDR = "192.168.1.4:1679"
      DSTB_POOL_SIZE = 10
      LISTEN_ADDR = "192.168.1.4:1678"
      REPLICATION_ADDR = "192.168.1.4:1680"
      RUN_LOG_FILE_PATH = "/home/yashan/yasdb_home/yashandb/22.2.2.0/log/yashandb/mn-1-3/run"
      RUN_LOG_LEVEL = "INFO"
      SLOW_LOG_FILE_PATH = "/home/yashan/yasdb_home/yashandb/22.2.2.0/log/yashandb/mn-1-3/slow"
      SQL_POOL_SIZE = 45
      TRANSACTION_LOCK_TIMEOUT = 300

[[group]]
  group_type = "cn"
  name = "cng1"
  [group.config]
    ISARCHIVELOG = true

  [[group.node]]
    data_path = "/home/yashan/yasdb_data"
    hostid = "host0002"
    role = 1
    [group.node.config]
      DDL_LOCK_TIMEOUT = 60
      DEFAULT_TABLE_TYPE = "LSC"
      DICTIONARY_CACHE_SIZE = 20
      DIN_ADDR = "192.168.1.3:1689"
      DSTB_POOL_SIZE = 10
      LISTEN_ADDR = "192.168.1.3:1688"
      MAX_PARALLEL_WORKERS = 128
      REPLICATION_ADDR = "192.168.1.3:1690"
      RUN_LOG_FILE_PATH = "/home/yashan/yasdb_home/yashandb/22.2.2.0/log/yashandb/cn-2-1/run"
      RUN_LOG_LEVEL = "INFO"
      SLOW_LOG_FILE_PATH = "/home/yashan/yasdb_home/yashandb/22.2.2.0/log/yashandb/cn-2-1/slow"
      SQL_POOL_SIZE = 45
      WORK_AREA_HEAP_SIZE = "2M"
      WORK_AREA_POOL_SIZE = "128M"
      TRANSACTION_LOCK_TIMEOUT = 300

  [[group.node]]
    data_path = "/home/yashan/yasdb_data"
    hostid = "host0003"
    role = 1
    [group.node.config]
      DDL_LOCK_TIMEOUT = 60
      DEFAULT_TABLE_TYPE = "LSC"
      DICTIONARY_CACHE_SIZE = 20
      DIN_ADDR = "192.168.1.4:1689"
      DSTB_POOL_SIZE = 10
      LISTEN_ADDR = "192.168.1.4:1688"
      MAX_PARALLEL_WORKERS = 128
      REPLICATION_ADDR = "192.168.1.4:1690"
      RUN_LOG_FILE_PATH = "/home/yashan/yasdb_home/yashandb/22.2.2.0/log/yashandb/cn-2-2/run"
      RUN_LOG_LEVEL = "INFO"
      SLOW_LOG_FILE_PATH = "/home/yashan/yasdb_home/yashandb/22.2.2.0/log/yashandb/cn-2-2/slow"
      SQL_POOL_SIZE = 45
      WORK_AREA_HEAP_SIZE = "2M"
      WORK_AREA_POOL_SIZE = "128M"
      TRANSACTION_LOCK_TIMEOUT = 300

[[group]]
  group_type = "dn"
  name = "dng1"
  [group.config]
    ISARCHIVELOG = true

  [[group.node]]
    data_path = "/home/yashan/yasdb_data"
    hostid = "host0010"
    role = 1
    [group.node.config]
      DDL_LOCK_TIMEOUT = 60
      DEFAULT_TABLE_TYPE = "LSC"
      DICTIONARY_CACHE_SIZE = 20
      DIN_ADDR = "192.168.1.11:1699"
      DSTB_POOL_SIZE = 10
      LISTEN_ADDR = "192.168.1.11:1698"
      MAX_PARALLEL_WORKERS = 512
      REPLICATION_ADDR = "192.168.1.11:1700"
      RUN_LOG_FILE_PATH = "/home/yashan/yasdb_home/yashandb/22.2.2.0/log/yashandb/dn-3-1/run"
      RUN_LOG_LEVEL = "INFO"
      SLOW_LOG_FILE_PATH = "/home/yashan/yasdb_home/yashandb/22.2.2.0/log/yashandb/dn-3-1/slow"
      SQL_POOL_SIZE = 45
      WORK_AREA_HEAP_SIZE = "2M"
      WORK_AREA_POOL_SIZE = "128M"
      TRANSACTION_LOCK_TIMEOUT = 300

  [[group.node]]
    data_path = "/home/yashan/yasdb_data"
    hostid = "host0001"
    role = 2
    [group.node.config]
      DDL_LOCK_TIMEOUT = 60
      DEFAULT_TABLE_TYPE = "LSC"
      DICTIONARY_CACHE_SIZE = 20
      DIN_ADDR = "192.168.1.2:1699"
      DSTB_POOL_SIZE = 10
      LISTEN_ADDR = "192.168.1.2:1698"
      MAX_PARALLEL_WORKERS = 512
      REPLICATION_ADDR = "192.168.1.2:1700"
      RUN_LOG_FILE_PATH = "/home/yashan/yasdb_home/yashandb/22.2.2.0/log/yashandb/dn-3-2/run"
      RUN_LOG_LEVEL = "INFO"
      SLOW_LOG_FILE_PATH = "/home/yashan/yasdb_home/yashandb/22.2.2.0/log/yashandb/dn-3-2/slow"
      SQL_POOL_SIZE = 45
      WORK_AREA_HEAP_SIZE = "2M"
      WORK_AREA_POOL_SIZE = "128M"
      TRANSACTION_LOCK_TIMEOUT = 300

  [[group.node]]
    data_path = "/home/yashan/yasdb_data"
    hostid = "host0002"
    role = 2
    [group.node.config]
      DDL_LOCK_TIMEOUT = 60
      DEFAULT_TABLE_TYPE = "LSC"
      DICTIONARY_CACHE_SIZE = 20
      DIN_ADDR = "192.168.1.3:1699"
      DSTB_POOL_SIZE = 10
      LISTEN_ADDR = "192.168.1.3:1698"
      MAX_PARALLEL_WORKERS = 512
      REPLICATION_ADDR = "192.168.1.3:1700"
      RUN_LOG_FILE_PATH = "/home/yashan/yasdb_home/yashandb/22.2.2.0/log/yashandb/dn-3-3/run"
      RUN_LOG_LEVEL = "INFO"
      SLOW_LOG_FILE_PATH = "/home/yashan/yasdb_home/yashandb/22.2.2.0/log/yashandb/dn-3-3/slow"
      SQL_POOL_SIZE = 45
      WORK_AREA_HEAP_SIZE = "2M"
      WORK_AREA_POOL_SIZE = "128M"
      TRANSACTION_LOCK_TIMEOUT = 300

[[group]]
  group_type = "dn"
  name = "dng2"
  [group.config]
    ISARCHIVELOG = true

  [[group.node]]
    data_path = "/home/yashan/yasdb_data"
    hostid = "host0003"
    role = 1
    [group.node.config]
      DDL_LOCK_TIMEOUT = 60
      DEFAULT_TABLE_TYPE = "LSC"
      DICTIONARY_CACHE_SIZE = 20
      DIN_ADDR = "192.168.1.4:1699"
      DSTB_POOL_SIZE = 10
      LISTEN_ADDR = "192.168.1.4:1698"
      MAX_PARALLEL_WORKERS = 512
      REPLICATION_ADDR = "192.168.1.4:1700"
      RUN_LOG_FILE_PATH = "/home/yashan/yasdb_home/yashandb/22.2.2.0/log/yashandb/dn-4-1/run"
      RUN_LOG_LEVEL = "INFO"
      SLOW_LOG_FILE_PATH = "/home/yashan/yasdb_home/yashandb/22.2.2.0/log/yashandb/dn-4-1/slow"
      SQL_POOL_SIZE = 45
      WORK_AREA_HEAP_SIZE = "2M"
      WORK_AREA_POOL_SIZE = "128M"
      TRANSACTION_LOCK_TIMEOUT = 300

  [[group.node]]
    data_path = "/home/yashan/yasdb_data"
    hostid = "host0004"
    role = 2
    [group.node.config]
      DDL_LOCK_TIMEOUT = 60
      DEFAULT_TABLE_TYPE = "LSC"
      DICTIONARY_CACHE_SIZE = 20
      DIN_ADDR = "192.168.1.5:1699"
      DSTB_POOL_SIZE = 10
      LISTEN_ADDR = "192.168.1.5:1698"
      MAX_PARALLEL_WORKERS = 512
      REPLICATION_ADDR = "192.168.1.5:1700"
      RUN_LOG_FILE_PATH = "/home/yashan/yasdb_home/yashandb/22.2.2.0/log/yashandb/dn-4-2/run"
      RUN_LOG_LEVEL = "INFO"
      SLOW_LOG_FILE_PATH = "/home/yashan/yasdb_home/yashandb/22.2.2.0/log/yashandb/dn-4-2/slow"
      SQL_POOL_SIZE = 45
      WORK_AREA_HEAP_SIZE = "2M"
      WORK_AREA_POOL_SIZE = "128M"
      TRANSACTION_LOCK_TIMEOUT = 300

  [[group.node]]
    data_path = "/home/yashan/yasdb_data"
    hostid = "host0005"
    role = 2
    [group.node.config]
      DDL_LOCK_TIMEOUT = 60
      DEFAULT_TABLE_TYPE = "LSC"
      DICTIONARY_CACHE_SIZE = 20
      DIN_ADDR = "192.168.1.6:1699"
      DSTB_POOL_SIZE = 10
      LISTEN_ADDR = "192.168.1.6:1698"
      MAX_PARALLEL_WORKERS = 512
      REPLICATION_ADDR = "192.168.1.6:1700"
      RUN_LOG_FILE_PATH = "/home/yashan/yasdb_home/yashandb/22.2.2.0/log/yashandb/dn-4-3/run"
      RUN_LOG_LEVEL = "INFO"
      SLOW_LOG_FILE_PATH = "/home/yashan/yasdb_home/yashandb/22.2.2.0/log/yashandb/dn-4-3/slow"
      SQL_POOL_SIZE = 45
      WORK_AREA_HEAP_SIZE = "2M"
      WORK_AREA_POOL_SIZE = "128M"
      TRANSACTION_LOCK_TIMEOUT = 300
pdf-btn 下载文档
copy-btn 复制链接