当MYSQL具有这样的记录时,SQOOP如何决定数据拆分?

时间:2018-09-11 16:10:14

标签: mysql hadoop hdfs sqoop

select * from EMP_TEST order by EMPNO asc;
+------------+-------+----------+------+-------------+------+------+--------+
| EMPNO      | ENAME | JOB      | MGR  | HIREDATE    | SAL  | COMM | DEPTNO |
+------------+-------+----------+------+-------------+------+------+--------+
| 6765423233 | WARD  | SALESMAN | 7698 | 22-FEB-1981 | 1250 |  500 |     30 |
| 6767891234 | WARD  | SALESMAN | 7698 | 22-FEB-1981 | 1250 |  500 |     30 |
| 6767891236 | WARD  | SALESMAN | 7698 | 22-FEB-1981 | 1250 |  500 |     30 |
| 7767891234 | WARD  | SALESMAN | 7698 | 22-FEB-1981 | 1250 |  500 |     30 |
| 8767891230 | WARD  | SALESMAN | 7698 | 22-FEB-1981 | 1250 |  500 |     30 |
| 8767891233 | WARD  | SALESMAN | 7698 | 22-FEB-1981 | 1250 |  500 |     30 |
| 9765423233 | WARD  | SALESMAN | 7698 | 22-FEB-1981 | 1250 |  500 |     30 |
| 9767891234 | WARD  | SALESMAN | 7698 | 22-FEB-1981 | 1250 |  500 |     30 |
  • 如果我参考以下示例,如何计算拆分?*

例如: 假设:最小值= 0,最大值= 400,no_of_mappers = 4 split_size =(400 – 0)/ 4 = 100

因此,拆分:[0,100),[100,200),[200,300),[300,400]

0 个答案:

没有答案