wordpress统计查看深圳防疫措施优化调整
wordpress统计查看,深圳防疫措施优化调整,网络营销的主要内容有哪些,网站如何做三端适配DATAX简介#xff1a;
项目地址#xff1a;
https://github.com/alibaba/DataX?tabreadme-ov-file
DataX概述#xff1a;
DataX 是阿里云 DataWorks数据集成 的开源版本#xff0c;在阿里巴巴集团内被广泛使用的离线数据同步工具/平台。DataX 实现了包括 MySQL、Ora…DATAX简介项目地址https://github.com/alibaba/DataX?tabreadme-ov-fileDataX概述DataX 是阿里云 DataWorks数据集成 的开源版本在阿里巴巴集团内被广泛使用的离线数据同步工具/平台。DataX 实现了包括 MySQL、Oracle、OceanBase、SqlServer、Postgre、HDFS、Hive、ADS、HBase、TableStore(OTS)、MaxCompute(ODPS)、Hologres、DRDS, databend 等各种异构数据源之间高效的数据同步功能。DataX本身作为数据同步框架将不同数据源的同步抽象为从源头数据源读取数据的Reader插件以及向目标端写入数据的Writer插件理论上DataX框架可以支持任意数据源类型的数据同步工作。同时DataX插件体系作为一套生态系统, 每接入一套新数据源该新加入的数据源即可实现和现有的数据源互通。环境序号主机名IP地址操作系统数据库用户软件备注1oradb1192.192.103.123VIPCentos7.9oradbhrOracle11gRAC数据源2opengaussdb192.192.103.134Centos7.9testdbhrDatax、opengauss6.0.3 LTS、Python3目标库、datax服务器1.DataX安装部署软件下载可在上述github项目地址内下载。# 上传安装包[rootopengaussdb ~]# cd /soft[rootopengaussdb soft]# ls -ltr-rw-r--r-- 1 root root 1649070902 Mar 11 17:31 datax.tar.gz# 解压安装包[rootopengaussdb soft]# tar -xxf datax.tar.gz[rootopengaussdb soft]# ls -ltrtotal 1610424-rw-r--r-- 1 root root 1649070902 Mar 11 17:31 datax.tar.gzdrwxrwxr-x 11 omm dbgrp 117 Mar 11 17:33 datax[rootopengaussdb soft]# cd datax/[rootopengaussdb datax]# lsbin conf job lib log log_perf plugin script tmp# DataX自检任务[rootopengaussdb datax]# python bin/datax.py job/job.jsonosInfo: Linux amd64 3.10.0-957.el7.x86_64 jvmInfo: Oracle Corporation 1.8 25.181-b13 cpu num: 8 totalPhysicalMemory: -0.00G freePhysicalMemory: -0.00G maxFileDescriptorCount: -1 currentOpenFileDescriptorCount: -1 GC Names [PS MarkSweep, PS Scavenge] MEMORY_NAME | allocation_size | init_size PS Eden Space | 256.00MB | 256.00MB Code Cache | 240.00MB | 2.44MB Compressed Class Space | 1,024.00MB | 0.00MB PS Survivor Space | 42.50MB | 42.50MB PS Old Gen | 683.00MB | 683.00MB Metaspace | -0.00MB | 0.00MB……………………………………2026-03-11 17:33:59.546 [job-0] INFO JobContainer -任 务 启 动 时 刻 : 2026-03-11 17:33:49任 务 结 束 时 刻 : 2026-03-11 17:33:59任 务 总 计 耗 时 : 10s任 务 平 均 流 量 : 253.91KB/s记 录 写 入 速 度 : 10000rec/s读 出 记 录 总 数 : 100000读 写 失 败 总 数 : 0# 成功执行自检任务2.DataX使用同步oracle数据到opengauss1. 确定oracle、opengauss连接是否正常检查对象。--oracle[oratest1:oracle]:/home/oraclesqlplus hr/hr192.192.103.123:1521/oradbSQL*Plus: Release 11.2.0.4.0 Production on Thu Mar 12 11:12:42 2026Copyright (c) 1982, 2013, Oracle. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,Data Mining and Real Application Testing optionsSQL select * from tab;TNAME TABTYPE CLUSTERID------------------------------ ------- ----------COUNTRIES TABLEDEPARTMENTS TABLEEMPLOYEES TABLEEMP_DETAILS_VIEW VIEWEMP_SALARY_LOG TABLEJOBS TABLEJOB_HISTORY TABLELOCATIONS TABLEREGIONS TABLET1 TABLET_HOT TABLETNAME TABTYPE CLUSTERID------------------------------ ------- ----------T_SEQ TABLE12 rows selected.--openGauss[ommopengaussdb openGauss]$ gsql -h 192.192.103.134 -p 15400 -Uhr -d testdb -rPassword for user hr:gsql ((openGauss 6.0.3 build 4e5c48e7) compiled at 2025-12-23 21:03:10 commit 0 last mr 8753 )SSL connection (cipher: ECDHE-RSA-AES128-GCM-SHA256, bits: 128)Type help for help.testdb\d List of relations Schema | Name | Type | Owner | Storage-------------------------------------------------------------------hr | employees | table | hr | {orientationrow,compressionno}public | t1 | table | | {orientationrow,compressionno}public | t2 | table | | {orientationrow,compressionno}public | t3 | table | | {orientationrow,compressionno}(4 rows)testdb select count(*) from employees;count-------0(1 row)2. 确定reader和writer源库reader为oraclereader目标库writer为postgresqlwriter。查看reader和writer模板的方式-r 读模板 -w 写模板[rootopengaussdb datax]# python bin/datax.py -r oraclereader -w postgresqlwriter{job: {content: [{reader: {name: oraclereader,parameter: {column: [],connection: [{jdbcUrl: [],table: [] } ],password: ,username: } },writer: {name: postgresqlwriter,parameter: {column: [],connection: [{jdbcUrl: ,table: []}], password: ,postSql: [],preSql: [],username: } } } ],setting: { speed: {channel: }}}}3. 编写同步JSON脚本[rootopengaussdb job]# vi ora2gsdb.json{job: {content: [{reader: {name: oraclereader,parameter: {username: hr,password: hr,column: [*],connection: [{table: [EMPLOYEES],jdbcUrl: [jdbc:oracle:thin://192.192.103.123:1521/oradb]}]}},writer: {name: postgresqlwriter,parameter: {username: hr,password: Huawei_1234,column: [*],connection: [{jdbcUrl: jdbc:postgresql://192.192.103.134:15400/testdb,table: [employees]}]}}}],setting: {speed: {channel: 2}}}}4. 通过datax.py指定json任务运行同步数据注意datax不支持client SCRAM mechanisms验证机制所以需要修改opengauss认证方式。--修改验证方式#查看opengauss默认验证机制openGauss# show password_encryption_type;password_encryption_type--------------------------2 (1 row)0 表示MD51表示MD5和sha2562表示sha256.#同时修改数据库参数和pg_hba.conf文件1修改password_encryption_type[ommopengaussdb ~]$ gs_guc reload -N all -I all -c password_encryption_type02编辑pg_hba.conf文件修改sha为MD5host all all 0.0.0.0/0 md5[ommopengaussdb dn]$ gs_ctl reload3查看修改结果openGauss# show password_encryption_type;password_encryption_type--------------------------0(1 row)4修改数据库用户密码openGauss# alter user hr password Huawei_1234;openGauss# select usename,usesysid,usecreatedb,usesuper,passwd from pg_shadow where usenamehr;usename | usesysid | usecreatedb | usesuper | passwd-------------------------------------------------------------------------------hr | 38057 | f | f | md5eeee246dbfc9b65cf35a6ab1fd4e51cf(1 row)执行同步任务[rootopengaussdb datax]# python bin/datax.py job/ora2gsdb.jsonosInfo: Linux amd64 3.10.0-957.el7.x86_64jvmInfo: Oracle Corporation 1.8 25.181-b13cpu num: 8totalPhysicalMemory: -0.00GfreePhysicalMemory: -0.00G maxFileDescriptorCount:-1 currentOpenFileDescriptorCount:-1GC Names [PS MarkSweep,PSScavenge] MEMORY_NAME | allocation_size | init_sizePS Eden Space | 256.00MB | 256.00MBCode Cache | 240.00MB | 2.44MBCompressed Class Space | 1,024.00MB | 0.00MB PS Survivor Space | 42.50MB | 42.50MBPS Old Gen | 683.00MB | 683.00MB Metaspace | -0.00MB | 0.00MB………………….…………………………………….[total cpu info] averageCpu | maxDeltaCpu | minDeltaCpu-1.00% | -1.00% | -1.00%[total gc info] NAME | totalGCCount | maxDeltaGCCount | minDeltaGCCount | totalGCTime | maxDeltaGCTime | minDeltaGCTimePS MarkSweep | 1 | 1 | 1 | 0.045s | 0.045s | 0.045sPS Scavenge | 1 | 1 | 1 | 0.025s | 0.025s | 0.025s2026-03-12 10:58:15.777 [job-0] INFO JobContainer - PerfTrace not enable!2026-03-12 10:58:15.777 [job-0] INFO StandAloneJobContainerCommunicator - Total 107 records, 6484 bytes | Speed 648B/s, 10 records/s | Error 0 records, 0 bytes | All Task WaitWriterTime 0.001s | All Task WaitReaderTime 0.000s | Percentage 100.00%2026-03-12 10:58:15.778 [job-0] INFO JobContainer -任 务 启 动 时 刻 : 2026-03-12 10:58:04任 务 结 束 时 刻 : 2026-03-12 10:58:15任 务 总 计 耗 时 : 11s任 务 平 均 流 量 : 648B/s记 录 写 入 速 度 : 10rec/s读 出 记 录 总 数 : 107读 写 失 败 总 数 : 05. 验证登录opengauss数据库查看testdb \dList of relationsSchema | Name | Type | Owner | Storage-------------------------------------------------------------------hr | employees | table | hr | {orientationrow,compressionno}public | t1 | table | | {orientationrow,compressionno}public | t2 | table | | {orientationrow,compressionno}public | t3 | table | | {orientationrow,compressionno}(4 rows)testdb select count(*) from employees;count-------107(1row)