作业:实践练习四(必选):迁移 MySQL 数据到 OceanBase 集群

练习内容

请记录并分享下列内容:

  • (必选)使用 mysqldump 将 mysql的表结构和数据同步到 OceanBase 的MySQL 租户中。
  • (必选)使用 datax 配置至少一个表的 MySQL 到 OceanBase 的 MySQL 租户的离线同步。
  • (可选)使用 datax 配置至少一个表的 OceanBase 到 CSV 以及 CSV 到 OceanBase 的离线同步。
  • (可选)使用 canal 配置 MySQL 的增量同步到 OceanBase 的 MySQL 租户。

用mysqldump从mysql库导出一张表

[fenglei@qa-fenglei-01 ~]$ mysqldump -uroot -p tpcc district >tpcc_district.sql
Enter password:
[fenglei@qa-fenglei-01 ~]$

拷贝到ob服务器

[fenglei@qa-fenglei-01 ~]$ scp tpcc_district.sql root@10.18.74.172:~/
root@10.18.74.172's password:
tpcc_district.sql                                                 100% 6617     6.5KB/s   00:00
[fenglei@qa-fenglei-01 ~]$

导入到ob数据库中

[root@cui-work0 ~]# 
[root@cui-work0 ~]# ll
total 1435104
-rw-r--r--   1 root root       1027 Mar 21 08:56 aa.yaml
-rw-------.  1 root root       1419 Oct 27  2020 anaconda-ks.cfg
drwxr-xr-x   9 root root        143 Mar 21 14:28 benchmarksql-5.0
drwxr-xr-x   9 root root         90 Mar 21 16:37 datax
-rw-r--r--   1 root root 1469508872 Oct 27 14:35 datax.tar.gz
-rw-r--r--   1 root root          0 Mar 21 09:47 exit
-rw-r--r--   1 root root       2063 Mar 21 09:36 local-example.yaml
drwxr-xr-x   3 root root        126 Mar 20 15:22 ob
drwxr-xr-x  13 root root        137 Mar 21 09:43 observer
-rw-r--r--   1 root root      12486 Mar 21 09:47 show
-rw-r--r--   1 root root       6617 Mar 22 09:09 tpcc_district.sql
[root@cui-work0 ~]# 
[root@cui-work0 ~]# obclient -h127.0.0.1 -P2881 -utestuser@testtenant -p
Enter password: 
Welcome to the OceanBase.  Commands end with ; or \g.
Your OceanBase connection id is 3221487659
Server version: OceanBase_CE 4.0.0.0 (r103000022023011215-05bbad0279302d7274e1b5ab79323a2c915c1981) (Built Jan 12 2023 15:28:27)

Copyright (c) 2000, 2018, OceanBase and/or its affiliates. All rights reserved.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

obclient [(none)]> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| testtest           |
+--------------------+
2 rows in set (0.044 sec)

obclient [(none)]> use testtest;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
obclient [testtest]> show tables;
+--------------------+
| Tables_in_testtest |
+--------------------+
| testt              |
+--------------------+
1 row in set (0.004 sec)

obclient [testtest]> source tpcc_district.sql
Query OK, 0 rows affected (0.001 sec)

Query OK, 0 rows affected (0.001 sec)

Query OK, 0 rows affected (0.000 sec)

Query OK, 0 rows affected (0.000 sec)

Query OK, 0 rows affected (0.000 sec)

Query OK, 0 rows affected (0.001 sec)

Query OK, 0 rows affected (0.001 sec)

Query OK, 0 rows affected (0.000 sec)

Query OK, 0 rows affected (0.001 sec)

Query OK, 0 rows affected (0.000 sec)

Query OK, 0 rows affected, 1 warning (0.124 sec)

Query OK, 0 rows affected (0.001 sec)

Query OK, 0 rows affected (0.000 sec)

Query OK, 0 rows affected, 1 warning (0.397 sec)

Query OK, 0 rows affected (0.001 sec)

Query OK, 0 rows affected (0.000 sec)

Query OK, 0 rows affected (0.000 sec)

Query OK, 40 rows affected (0.097 sec)
 Records: 40  Duplicates: 0  Warnings: 0

Query OK, 0 rows affected (0.001 sec)

Query OK, 0 rows affected (0.000 sec)

Query OK, 0 rows affected (0.000 sec)

Query OK, 0 rows affected (0.000 sec)

Query OK, 0 rows affected (0.000 sec)

Query OK, 0 rows affected (0.000 sec)

Query OK, 0 rows affected (0.000 sec)

Query OK, 0 rows affected (0.000 sec)

Query OK, 0 rows affected (0.001 sec)

Query OK, 0 rows affected (0.000 sec)

obclient [testtest]> 
obclient [testtest]> show tables;
+--------------------+
| Tables_in_testtest |
+--------------------+
| district           |
| testt              |
+--------------------+
2 rows in set (0.003 sec)

obclient [testtest]> select count(1) from district;
+----------+
| count(1) |
+----------+
|       40 |
+----------+
1 row in set (0.084 sec)

obclient [testtest]> exit
Bye
[root@cui-work0 ~]# 

下载安装DataX

下载地址:https://github.com/alibaba/DataX
oracle官网自行下载jdk1.8,并安装,不是重点,就不写这部分了
解压下载的DataX即可

编辑job文件

[root@cui-work0 datax]# more job/mysql2ob.json
{
    "job": {
        "setting": {
            "speed": {
                "channel": 4 
            },
            "errorLimit": {
                "record": 0,
                "percentage": 0.1
            }
        },
        "content": [
            {
                "reader": {
                    "name": "mysqlreader",
                    "parameter": {
                        "username": "tpcc",
                        "password": "tpcc",
                        "column": [
                            "*"
                        ],
                        "connection": [
                            {
                                "table": [
                                    "warehouse"
                                ],
                                "jdbcUrl": ["jdbc:mysql://10.18.13.224:3306/tpcc?useUnicode=true&characterEncoding=utf8"]
                            }
                        ]
                    }
                },

                "writer": {
                    "name": "oceanbasev10writer",
                    "parameter": {
                        "obWriteMode": "insert",
                        "column": [
                            "*"
                        ],
                        "connection": [
                            {
                                "jdbcUrl": [
                                    "||_dsc_ob10_dsc_||obcluster:testtenant||_dsc_ob10_dsc_||jdbc:oceanbase://127.0.0.1:2883/testtest"
                                ],
                                "table": [
                                    "warehouse"
                                ]
                            }
                        ],
                        "username": "testuser",
                        "password":"000000",
                        "writerThreadCount":1,
                        "batchSize": 100,
                        "memstoreThreshold": "0.9"
                    }
                }
            }
        ]
    }
}
[root@cui-work0 datax]# 

执行导入

[root@cui-work0 datax]# 
[root@cui-work0 datax]# ./datax.py ../job/mysql2ob.json
-bash: ./datax.py: No such file or directory
[root@cui-work0 datax]# python ./bin/datax.py job/mysql2ob.json

DataX (DATAX-OPENSOURCE-3.0), From Alibaba !
Copyright (C) 2010-2017, Alibaba Group. All Rights Reserved.


2023-03-22 21:23:43.754 [main] INFO  MessageSource - JVM TimeZone: GMT+08:00, Locale: zh_CN
2023-03-22 21:23:43.757 [main] INFO  MessageSource - use Locale: zh_CN timeZone: sun.util.calendar.ZoneInfo[id="GMT+08:00",offset=28800000,dstSavings=0,useDaylight=false,transitions=0,lastRule=null]
2023-03-22 21:23:43.773 [main] INFO  VMInfo - VMInfo# operatingSystem class => sun.management.OperatingSystemImpl
2023-03-22 21:23:43.779 [main] INFO  Engine - the machine info  => 

        osInfo: Oracle Corporation 1.8 25.202-b08
        jvmInfo:        Linux amd64 3.10.0-1127.el7.x86_64
        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                         


2023-03-22 21:23:43.809 [main] INFO  Engine - 
{
        "content":[
                {
                        "reader":{
                                "name":"mysqlreader",
                                "parameter":{
                                        "column":[
                                                "*"
                                        ],
                                        "connection":[
                                                {
                                                        "jdbcUrl":[
                                                                "jdbc:mysql://10.18.13.224:3306/tpcc?useUnicode=true&characterEncoding=utf8"
                                                        ],
                                                        "table":[
                                                                "warehouse"
                                                        ]
                                                }
                                        ],
                                        "password":"****",
                                        "username":"tpcc"
                                }
                        },
                        "writer":{
                                "name":"oceanbasev10writer",
                                "parameter":{
                                        "batchSize":100,
                                        "column":[
                                                "*"
                                        ],
                                        "connection":[
                                                {
                                                        "jdbcUrl":[
                                                                "||_dsc_ob10_dsc_||obcluster:testtenant||_dsc_ob10_dsc_||jdbc:oceanbase://127.0.0.1:2883/testtest"
                                                        ],
                                                        "table":[
                                                                "warehouse"
                                                        ]
                                                }
                                        ],
                                        "memstoreThreshold":"0.9",
                                        "obWriteMode":"insert",
                                        "password":"******",
                                        "username":"testuser",
                                        "writerThreadCount":1
                                }
                        }
                }
        ],
        "setting":{
                "errorLimit":{
                        "percentage":0.1,
                        "record":0
                },
                "speed":{
                        "channel":4
                }
        }
}

2023-03-22 21:23:43.836 [main] WARN  Engine - prioriy set to 0, because NumberFormatException, the value is: null
2023-03-22 21:23:43.838 [main] INFO  PerfTrace - PerfTrace traceId=job_-1, isEnable=false, priority=0
2023-03-22 21:23:43.838 [main] INFO  JobContainer - DataX jobContainer starts job.
2023-03-22 21:23:43.841 [main] INFO  JobContainer - Set jobId = 0
2023-03-22 21:23:44.252 [job-0] INFO  OriginalConfPretreatmentUtil - Available jdbcUrl:jdbc:mysql://10.18.13.224:3306/tpcc?useUnicode=true&characterEncoding=utf8&yearIsDateType=false&zeroDateTimeBehavior=convertToNull&tinyInt1isBit=false&rewriteBatchedStatements=true.
2023-03-22 21:23:44.253 [job-0] WARN  OriginalConfPretreatmentUtil - 您的配置文件中的列配置存在一定的风险. 因为您未配置读取数据库表的列,当您的表字段个数、类型有变动时,可能影响任务正确性甚至会运行出错。请检查您的配置并作出修改.
2023-03-22 21:23:44.303 [job-0] ERROR RetryUtil - Exception when calling callable, 异常Msg:Code:[DBUtilErrorCode-10], Description:[连接数据库失败. 请检查您的 账号、密码、数据库名称、IP、Port或者向 DBA 寻求帮助(注意网络环境).].  -  具体错误信息为:java.sql.SQLException: No suitable driver found for ["||_dsc_ob10_dsc_||obcluster:testtenant||_dsc_ob10_dsc_||jdbc:oceanbase://127.0.0.1:2883/testtest"]
com.alibaba.datax.common.exception.DataXException: Code:[DBUtilErrorCode-10], Description:[连接数据库失败. 请检查您的 账号、密码、数据库名称、IP、Port或者向 DBA 寻求帮助(注意网络环境).].  -  具体错误信息为:java.sql.SQLException: No suitable driver found for ["||_dsc_ob10_dsc_||obcluster:testtenant||_dsc_ob10_dsc_||jdbc:oceanbase://127.0.0.1:2883/testtest"]
        at com.alibaba.datax.common.exception.DataXException.asDataXException(DataXException.java:30) ~[datax-common-0.0.1-SNAPSHOT.jar:na]
        at com.alibaba.datax.plugin.rdbms.util.RdbmsException.asConnException(RdbmsException.java:36) ~[plugin-rdbms-util-0.0.1-SNAPSHOT.jar:na]
        at com.alibaba.datax.plugin.rdbms.util.DBUtil.connect(DBUtil.java:397) [plugin-rdbms-util-0.0.1-SNAPSHOT.jar:na]
        at com.alibaba.datax.plugin.rdbms.util.DBUtil.connect(DBUtil.java:387) [plugin-rdbms-util-0.0.1-SNAPSHOT.jar:na]
        at com.alibaba.datax.plugin.rdbms.util.DBUtil.access$000(DBUtil.java:22) [plugin-rdbms-util-0.0.1-SNAPSHOT.jar:na]
        at com.alibaba.datax.plugin.rdbms.util.DBUtil$3.call(DBUtil.java:322) ~[plugin-rdbms-util-0.0.1-SNAPSHOT.jar:na]
        at com.alibaba.datax.plugin.rdbms.util.DBUtil$3.call(DBUtil.java:319) ~[plugin-rdbms-util-0.0.1-SNAPSHOT.jar:na]
        at com.alibaba.datax.common.util.RetryUtil$Retry.call(RetryUtil.java:164) ~[datax-common-0.0.1-SNAPSHOT.jar:na]
        at com.alibaba.datax.common.util.RetryUtil$Retry.doRetry(RetryUtil.java:111) ~[datax-common-0.0.1-SNAPSHOT.jar:na]
        at com.alibaba.datax.common.util.RetryUtil.executeWithRetry(RetryUtil.java:30) [datax-common-0.0.1-SNAPSHOT.jar:na]
        at com.alibaba.datax.plugin.rdbms.util.DBUtil.getConnection(DBUtil.java:319) [plugin-rdbms-util-0.0.1-SNAPSHOT.jar:na]
        at com.alibaba.datax.plugin.rdbms.util.DBUtil.getConnection(DBUtil.java:303) [plugin-rdbms-util-0.0.1-SNAPSHOT.jar:na]
        at com.alibaba.datax.plugin.writer.oceanbasev10writer.util.DbUtils.fetchSingleValueWithRetry(DbUtils.java:50) [oceanbasev10writer-0.0.1-SNAPSHOT.jar:na]
        at com.alibaba.datax.plugin.writer.oceanbasev10writer.OceanBaseV10Writer$Job.checkCompatibleMode(OceanBaseV10Writer.java:196) [oceanbasev10writer-0.0.1-SNAPSHOT.jar:na]
        at com.alibaba.datax.plugin.writer.oceanbasev10writer.OceanBaseV10Writer$Job.init(OceanBaseV10Writer.java:61) [oceanbasev10writer-0.0.1-SNAPSHOT.jar:na]
        at com.alibaba.datax.core.job.JobContainer.initJobWriter(JobContainer.java:704) [datax-core-0.0.1-SNAPSHOT.jar:na]
        at com.alibaba.datax.core.job.JobContainer.init(JobContainer.java:304) [datax-core-0.0.1-SNAPSHOT.jar:na]
        at com.alibaba.datax.core.job.JobContainer.start(JobContainer.java:113) [datax-core-0.0.1-SNAPSHOT.jar:na]
        at com.alibaba.datax.core.Engine.start(Engine.java:93) [datax-core-0.0.1-SNAPSHOT.jar:na]
        at com.alibaba.datax.core.Engine.entry(Engine.java:175) [datax-core-0.0.1-SNAPSHOT.jar:na]
        at com.alibaba.datax.core.Engine.main(Engine.java:208) [datax-core-0.0.1-SNAPSHOT.jar:na]
2023-03-22 21:23:45.307 [job-0] ERROR RetryUtil - Exception when calling callable, 即将尝试执行第1次重试.本次重试计划等待[1000]ms,实际等待[1003]ms, 异常Msg:[Code:[DBUtilErrorCode-10], Description:[连接数据库失败. 请检查您的 账号、密码、数据库名称、IP、Port或者向 DBA 寻求帮助(注意网络环境).].  -  具体错误信息为:java.sql.SQLException: No suitable driver found for ["||_dsc_ob10_dsc_||obcluster:testtenant||_dsc_ob10_dsc_||jdbc:oceanbase://127.0.0.1:2883/testtest"]]
2023-03-22 21:23:47.308 [job-0] ERROR RetryUtil - Exception when calling callable, 即将尝试执行第2次重试.本次重试计划等待[2000]ms,实际等待[2000]ms, 异常Msg:[Code:[DBUtilErrorCode-10], Description:[连接数据库失败. 请检查您的 账号、密码、数据库名称、IP、Port或者向 DBA 寻求帮助(注意网络环境).].  -  具体错误信息为:java.sql.SQLException: No suitable driver found for ["||_dsc_ob10_dsc_||obcluster:testtenant||_dsc_ob10_dsc_||jdbc:oceanbase://127.0.0.1:2883/testtest"]]
^C[Error] DataX receive unexpected signal 2, starts to suicide.
2023-03-23 09:23:49
Full thread dump Java HotSpot(TM) 64-Bit Server VM (25.202-b08 mixed mode):

"SIGINT handler" #12 daemon prio=9 os_prio=0 tid=0x00007f7830001000 nid=0x5d26 runnable [0x00007f783d718000]
   java.lang.Thread.State: RUNNABLE
        at java.lang.Thread.run(Thread.java:747)

"Abandoned connection cleanup thread" #11 daemon prio=5 os_prio=0 tid=0x00007f78847d0800 nid=0x5d04 in Object.wait() [0x00007f783d819000]
   java.lang.Thread.State: TIMED_WAITING (on object monitor)
        at java.lang.Object.wait(Native Method)
        - waiting on <0x00000000ed8c3a48> (a java.lang.ref.ReferenceQueue$Lock)
        at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:144)
        - locked <0x00000000ed8c3a48> (a java.lang.ref.ReferenceQueue$Lock)
        at com.alipay.oceanbase.jdbc.AbandonedConnectionCleanupThread.run(AbandonedConnectionCleanupThread.java:43)

"Abandoned connection cleanup thread" #10 daemon prio=5 os_prio=0 tid=0x00007f78845ed000 nid=0x5d03 in Object.wait() [0x00007f7868168000]
   java.lang.Thread.State: TIMED_WAITING (on object monitor)
        at java.lang.Object.wait(Native Method)
        - waiting on <0x00000000ecade178> (a java.lang.ref.ReferenceQueue$Lock)
        at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:144)
        - locked <0x00000000ecade178> (a java.lang.ref.ReferenceQueue$Lock)
        at com.mysql.jdbc.AbandonedConnectionCleanupThread.run(AbandonedConnectionCleanupThread.java:64)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)

"Service Thread" #9 daemon prio=9 os_prio=0 tid=0x00007f78840de000 nid=0x5cfd runnable [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"C1 CompilerThread3" #8 daemon prio=9 os_prio=0 tid=0x00007f78840c9000 nid=0x5cfc waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"C2 CompilerThread2" #7 daemon prio=9 os_prio=0 tid=0x00007f78840c6800 nid=0x5cfb waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"C2 CompilerThread1" #6 daemon prio=9 os_prio=0 tid=0x00007f78840c4800 nid=0x5cfa waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"C2 CompilerThread0" #5 daemon prio=9 os_prio=0 tid=0x00007f78840c1800 nid=0x5cf9 waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"Signal Dispatcher" #4 daemon prio=9 os_prio=0 tid=0x00007f78840c0000 nid=0x5cf8 waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"Finalizer" #3 daemon prio=8 os_prio=0 tid=0x00007f788408d000 nid=0x5cf7 in Object.wait() [0x00007f786afee000]
   java.lang.Thread.State: WAITING (on object monitor)
        at java.lang.Object.wait(Native Method)
        - waiting on <0x00000000eab08ed0> (a java.lang.ref.ReferenceQueue$Lock)
        at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:144)
        - locked <0x00000000eab08ed0> (a java.lang.ref.ReferenceQueue$Lock)
        at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:165)
        at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:216)

"Reference Handler" #2 daemon prio=10 os_prio=0 tid=0x00007f788408a800 nid=0x5cf6 in Object.wait() [0x00007f786b0ef000]
   java.lang.Thread.State: WAITING (on object monitor)
        at java.lang.Object.wait(Native Method)
        - waiting on <0x00000000eab06bf8> (a java.lang.ref.Reference$Lock)
        at java.lang.Object.wait(Object.java:502)
        at java.lang.ref.Reference.tryHandlePending(Reference.java:191)
        - locked <0x00000000eab06bf8> (a java.lang.ref.Reference$Lock)
        at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:153)

"job-0" #1 prio=5 os_prio=0 tid=0x00007f788400a800 nid=0x5cec waiting on condition [0x00007f788a37b000]
   java.lang.Thread.State: TIMED_WAITING (sleeping)
        at java.lang.Thread.sleep(Native Method)
        at com.alibaba.datax.common.util.RetryUtil$Retry.doRetry(RetryUtil.java:148)
        at com.alibaba.datax.common.util.RetryUtil.executeWithRetry(RetryUtil.java:30)
        at com.alibaba.datax.plugin.rdbms.util.DBUtil.getConnection(DBUtil.java:319)
        at com.alibaba.datax.plugin.rdbms.util.DBUtil.getConnection(DBUtil.java:303)
        at com.alibaba.datax.plugin.writer.oceanbasev10writer.util.DbUtils.fetchSingleValueWithRetry(DbUtils.java:50)
        at com.alibaba.datax.plugin.writer.oceanbasev10writer.OceanBaseV10Writer$Job.checkCompatibleMode(OceanBaseV10Writer.java:196)
        at com.alibaba.datax.plugin.writer.oceanbasev10writer.OceanBaseV10Writer$Job.init(OceanBaseV10Writer.java:61)
        at com.alibaba.datax.core.job.JobContainer.initJobWriter(JobContainer.java:704)
        at com.alibaba.datax.core.job.JobContainer.init(JobContainer.java:304)
        at com.alibaba.datax.core.job.JobContainer.start(JobContainer.java:113)
        at com.alibaba.datax.core.Engine.start(Engine.java:93)
        at com.alibaba.datax.core.Engine.entry(Engine.java:175)
        at com.alibaba.datax.core.Engine.main(Engine.java:208)

"VM Thread" os_prio=0 tid=0x00007f7884081000 nid=0x5cf5 runnable 

"GC task thread#0 (ParallelGC)" os_prio=0 tid=0x00007f788401f800 nid=0x5ced runnable 

"GC task thread#1 (ParallelGC)" os_prio=0 tid=0x00007f7884021800 nid=0x5cee runnable 

"GC task thread#2 (ParallelGC)" os_prio=0 tid=0x00007f7884023000 nid=0x5cef runnable 

"GC task thread#3 (ParallelGC)" os_prio=0 tid=0x00007f7884025000 nid=0x5cf0 runnable 

"GC task thread#4 (ParallelGC)" os_prio=0 tid=0x00007f7884027000 nid=0x5cf1 runnable 

"GC task thread#5 (ParallelGC)" os_prio=0 tid=0x00007f7884028800 nid=0x5cf2 runnable 

"GC task thread#6 (ParallelGC)" os_prio=0 tid=0x00007f788402a800 nid=0x5cf3 runnable 

"GC task thread#7 (ParallelGC)" os_prio=0 tid=0x00007f788402c800 nid=0x5cf4 runnable 

"VM Periodic Task Thread" os_prio=0 tid=0x00007f78840e1000 nid=0x5cfe waiting on condition 

JNI global references: 314

Heap
 PSYoungGen      total 305664K, used 62962K [0x00000000eab00000, 0x0000000100000000, 0x0000000100000000)
  eden space 262144K, 24% used [0x00000000eab00000,0x00000000ee87c8b0,0x00000000fab00000)
  from space 43520K, 0% used [0x00000000fd580000,0x00000000fd580000,0x0000000100000000)
  to   space 43520K, 0% used [0x00000000fab00000,0x00000000fab00000,0x00000000fd580000)
 ParOldGen       total 699392K, used 0K [0x00000000c0000000, 0x00000000eab00000, 0x00000000eab00000)
  object space 699392K, 0% used [0x00000000c0000000,0x00000000c0000000,0x00000000eab00000)
 Metaspace       used 13521K, capacity 13852K, committed 13952K, reserved 1060864K
  class space    used 1485K, capacity 1612K, committed 1664K, reserved 1048576K

DataX Process was killed ! you did ?
[root@cui-work0 datax]# 

查看导入结果

导入失败,报错没有合适的驱动

总结

用DataX迁移数据时,报错没有合适的驱动,这个到目前为止,还没有找到正确的解决方案,社区帖子也没有结果。

把2883端口换成2881端口试下,两个端口返回的版本号不一样的。

学习

2 个赞