GA

2014/09/16

InfiniDBのERROR 122 Bulkload Read Failed.

気持ちよくLOAD DATA INFILEしてたら急に現れたこんなやつ。

mysql> LOAD DATA INFILE '/data/tmp/fifo' INTO TABLE vegelog;
ERROR 122 (HY000): PM1 : Bulkload Read (thread 0) Failed for Table d1.t1.  Terminating this job.


ちなみにError 122はHandler層でのエラーらしい。

$ /usr/local/Calpont/mysql/bin/perror 122
OS error code 122:  Disk quota exceeded
MySQL error code 122: Internal (unspecified) error in handler

結論だけ書くと、テーブルのスキーマと食わせてたtsvファイルが完全に一致していなかった。
MySQLのLOAD DATA INFILEを使ってやると勝手にtruncationされて入る…んだけど、スキーマちゃんと調整しました。


mysql> SELECT @@infinidb_use_import_for_batchinsert; -- これがONだとLOAD DATA INFILEを/usr/local/Calpont/bin/cpimportにマップしてくれるので無効にする。
+---------------------------------------+
| @@infinidb_use_import_for_batchinsert |
+---------------------------------------+
|                                     1 |
+---------------------------------------+
1 row in set (0.00 sec)

mysql> SET SESSION infinidb_use_import_for_batchinsert= 0; 
Query OK, 0 rows affected (0.00 sec)

mysql> LOAD DATA INFILE '/data/tmp/fifo' INTO TABLE vegelog;
Query OK, 17208325 rows affected, 2076 warnings (5 min 35.09 sec)
Records: 17208325  Deleted: 0  Skipped: 0  Warnings: 2050

mysql> show warnings;
+---------+------+--------------------------------------------------------------------------------+
| Level   | Code | Message                                                                        |
+---------+------+--------------------------------------------------------------------------------+
| Warning | 1262 | Row 5397 was truncated; it contained more data than there were input columns   |
| Warning | 1262 | Row 5406 was truncated; it contained more data than there were input columns   |
| Warning | 1262 | Row 59575 was truncated; it contained more data than there were input columns  |
..
| Warning | 1261 | Row 329176 doesn't contain data for all columns                                |
| Warning | 1261 | Row 329176 doesn't contain data for all columns                                |
| Warning | 1261 | Row 329176 doesn't contain data for all columns                                |
+---------+------+--------------------------------------------------------------------------------+
64 rows in set (0.00 sec)

はふん。

0 件のコメント :

コメントを投稿