Oushu Database 5.1.0.0 新特性 (发布日期:2023年3月31日)
本页目录
Oushu Database 5.1.0.0 新特性 (发布日期:2023年3月31日)#
Oushu Database 5.1.0.0 相比 Oushu Database 5.0.0.0 有如下新特性增强:
共享Hive元数据,作为计算引擎原生使用Hive存储在HDFS上的orc/parquet数据
完整支持Copy to/from HDFS协议url,支持text/csv格式,支持gz压缩类型
分布式表存储Magma稳定性和性能进一步增强
操作系统 |
版本 |
---|---|
Redhat/Centos |
7.0 |
Redhat/Centos |
7.1 |
Redhat/Centos |
7.2 |
Redhat/Centos |
7.3 |
Redhat/Centos |
7.4 |
从 5.0.0.0 升级到 5.1.0.0#
元数据备份
在升级之前,需要进行数据库的元数据备份。详细描述参见元数据备份
magma backup --catalog-only --backup-dir=hdfs://localhost:8020/magma-backup--$(date
+%Y%m%d-%H%M%S)
记录旧的OushuDB版本号
请将 ${all_host_file} 替换为保存集群节点 hostname 的文件名称。
oushudb ssh -f ${all_host_file} -e "source $OUSHUDB_HOME/oushudb_path.sh; oushudb --version" > old_version
记录旧的OushuDB rpm build号
oushudb ssh -f ${all_host_file} -e "source $OUSHUDB_HOME/oushudb_path.sh; rpm -q oushudb" > rpm_old
修改
pg_hba.conf
禁掉所有的外部应用链接停止OushuDB集群(连同magma,lava一起)
source $OUSHUDB_CONF/oushudb_path.sh
oushudb stop cluster -a --with_magma
检查集群中的postgres和magma进程,确认输出文件无内容
oushudb ssh -f ${all_host_file} -e "source $OUSHUDB_HOME/oushudb_path.sh; oushudb ps" > oushudb_process
备份 main 节点的 masterdd 和 segment 节点的 segmentdd
请将 ${main_host_file}/${segment_hosts_file} 替换为保存集群 main/segment 节点 hostname 的文件名称。
oushudb config -s hawq_master_directoty
oushudb config -s hawq_segment_directory
oushudb ssh -f ${main_hosts_file} -e "cp -rf ${hawq-master-directory} ${hawq-master-directoy}.bak"
oushudb ssh -f ${segment_hosts_file} -e "cp -rf ${hawq-segment-directory} ${hawq-segment-directoy}.bak"
OushuDB 新版本 binary 替换
请将 ${newest_oushudb_rpm} 替换为获取的 rpm 包名称
ouhsudb ssh -f ${all_host_file}
rpm -e oushudb
rpm -ivh ${newest_oushudb_rpm}
记录新的 OushuDB 版本号,并确认输出为
OushuDB version 5.1.0.0
oushudb ssh -f ${all_host_file} -e "source $OUSHUDB_HOME/oushudb_path.sh; oushudb --version" > new_version
记录新的OushuDB rpm build号并确认输出最新的 oushdb rpm build 号
oushudb ssh -f ${all_host_file} -e "source $OUSHUDB_HOME/oushudb_path.sh; rpm -q oushudb" > rpm_new
修改 oushudb 配置文件
集群将使用一份 oushudb-site.xml,magma-site.xml, 差异化的 VC 属性配置需要填入 oushudb-topology.yaml,差异化的 magma 配置需要填入 magma-topology.yaml 备注:如果集群中只有一份 ouhsudb-site.xml 和 magma-site.xml,并且这两份配置文件均在 $OUSHUDB_CONF目录下,那么只需删掉 oushudb-topology.yaml 和 magma-topology.yaml 中的 conf_path,跳过本节即可
10.1 备份原配置文件
oushudb-topology.yaml
oushudb-site.xml(可能有多份)
magma-topology.yaml
magma-site.xml(可能有多份)
10.2 配置参数
oushudb-topology(删除 conf_path)
oushudb-site.xml(在 $OUSHUDB_CONF 维护一份)
magma-topology.yaml(将多份 magma-site.xml 中 vsc 差异化的配置写在 magma-topology.yaml 中,并删除 conf_path)
例如:
nodes: - id: n9 addr: 10.0.201.71 label: { region: "regionB", zone: "zoneC"} - id: n8 addr: 10.0.197.131 label: { region: "regionB", zone: "zoneC"} - id: n7 addr: 10.0.196.31 label: { region: "regionB", zone: "zoneC"} - id: n6 addr: 10.0.196.157 label: { region: "regionB", zone: "zoneC"} - id: n5 addr: 10.0.192.200 label: { region: "regionB", zone: "zoneC"} - id: n4 addr: 10.0.194.227 label: { region: "regionB", zone: "zoneC"} vsc: - name: vsc_catalog nodes: n6,n5,n4 port: 6666 num_ranges: 3 num_replicas: 3 data_dir: /data1/oushudb/magma_vsc_catalog_segment,/data2/oushudb/magma_vsc_catalog_segment replica_locations: "regionB.zoneC:3" leader_preferences: "regionB.zoneC" nbuffers: 10240 follower_nbuffers: 10240 btree_page_size: 16384 shared_buffer_size_per_table_per_range: 4194304 shared_buffer_size_max_per_table_per_range: 8388608 shared_buffer_min_tuples: 5000 shared_buffer_fixed_pool_size: 512 shared_buffer_fixed_page_size: 131072 compact_trigger_ap_ratio_limit: 0.1 compact_trigger_tp_ratio_limit: 0.5 compact_data_worker_limit_perrg: 2 compact_cleanup_worker_limit_perrg: 4 txn_local_file_size: 8192 create_index_sort_work_dir: /data1/oushudb/magmatmp,/data2/oushudb/magmatmp - name: vsc_default nodes: n9,n8,n7 port: 6676 num_ranges: 24 num_replicas: 3 data_dir: /data1/oushudb/magma_vsc_data_segment,/data2/oushudb/magma_vsc_data_segment replica_locations: "regionB.zoneC:3" leader_preferences: "regionB.zoneC" nbuffers: 10240 follower_nbuffers: 10240 btree_page_size: 16384 shared_buffer_size_per_table_per_range: 8388608 shared_buffer_size_max_per_table_per_range: 33554432 shared_buffer_min_tuples: 10000 shared_buffer_fixed_pool_size: 512 shared_buffer_fixed_page_size: 131072 compact_trigger_ap_ratio_limit: 0.1 compact_trigger_tp_ratio_limit: 0.5 compact_data_worker_limit_perrg: 2 compact_cleanup_worker_limit_perrg: 4 compactlog_checkflush_num: 10240 raftlog_fsync: false raftlog_checkflush_num: 300000 txn_local_file_size: 8192 tid_index_nbuffers: 512 create_index_sort_work_dir: /data1/oushudb/magmatmp,/data2/oushudb/magmatmp
magma-site.xml(在 $OUSHUDB_CONF 维护一份)
执行升级脚本
ssh ${oushudb_master_host}
ls ${OUSHUDB_HOME}/bin/oushudbupgrade_new
ls ${OUSHUDB_HOME}/bin/share/postgresql/5.1.0.0_unshared_install.sql
cd ${OUSHUDB_HOME}/bin
./oushudbupgrade_new --help
./oushudbupgrade_new -s 5.0.0.0
从备份文件中恢复 pg_hba.conf
oushudb config -s hawq_master_directoty
oushudb config -s hawq_segment_directory
oushudb ssh -f ${main_hosts_file} -e "cp ${hawq-master-directory}.bak/pg_hba.conf ${hawq-master-directoy}/pg_hba.conf"
oushudb ssh -f ${segment_hosts_file} -e "cp ${hawq-segment-directory}.bak/pg_hba.conf ${hawq-segment-directoy}/pg_hba.conf"
修改
pg_hba.conf
恢复之前禁掉的外部连接重启集群
oushudb restart cluster -a --with_magma