Details
Description
There are no option to turning batching off with this storage.
Some JDBC driver doesn't provide Batch Statement implementation.
org.apache.pig.piggybank.storage.DBStorage.java:157
this.ps.addBatch(); this.count += 1; if (this.count > this.batchSize) { this.count = 0; this.ps.executeBatch(); this.ps.clearBatch(); this.ps.clearParameters(); }
An easy fix is to use DatabaseMetaData.supportsBatchUpdates() in JDBC.
And to use only ps.execute() if the JDBC driver doesn't support Batch Statement.
Attachments
Issue Links
- is related to
-
PIG-3770 Enhance DBStorage to make it more flexible (should batch statements?, rollback on job failure, support command line arguments etc.)
- Open