[ https://issues.apache.org/jira/browse/PHOENIX-2748?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
chenglei updated PHOENIX-2748: ------------------------------ Description: CsvBulkLoadTool uses CsvToKeyValueMapper to convert csv record to KeyValues which should be inserted into target table , and CsvToKeyValueMapper gets the KeyValues by mocking upsert sql to target table,so the PhoenixConnection's autoCommit should be false,but CsvToKeyValueMapper does not set inner PhoenixConnection autoCommit to false explicitly. When we set "phoenix.connection.autoCommit" to true in hbase-site.xml,CsvToKeyValueMapper will really execute upsert sql to target table,which is not expected. So CsvToKeyValueMapper should set inner PhoenixConnection autoCommit to false explicitly,just as PhoenixIndexImportMapper does. was: CsvBulkLoadTool uses CsvToKeyValueMapper to convert csv record to KeyValues which should be inserted into target table , and CsvToKeyValueMapper gets the KeyValues by mocking upsert sql to target table,so the PhoenixConnection's autoCommit should be false,but CsvToKeyValueMapper does not set inner PhoenixConnection autoCommit to false explicitly. When we set "phoenix.connection.autoCommit" to true in hbase-site.xml,CsvToKeyValueMapper will really upsert sql to target table,which is not expected. So CsvToKeyValueMapper should set inner PhoenixConnection autoCommit to false explicitly,just as PhoenixIndexImportMapper does. > CsvToKeyValueMapper used by CsvBulkLoadTool should set inner > PhoenixConnection autoCommit to false explicitly > ------------------------------------------------------------------------------------------------------------- > > Key: PHOENIX-2748 > URL: https://issues.apache.org/jira/browse/PHOENIX-2748 > Project: Phoenix > Issue Type: Bug > Affects Versions: 4.6.0 > Environment: Phoenix 4.6.0-HBase-0.98, HBase 0.98.6-cdh5.3.2 > Reporter: chenglei > Priority: Minor > > CsvBulkLoadTool uses CsvToKeyValueMapper to convert csv record to KeyValues > which should be inserted into target table , and CsvToKeyValueMapper gets the > KeyValues by mocking upsert sql to target table,so the PhoenixConnection's > autoCommit should be false,but CsvToKeyValueMapper does not set inner > PhoenixConnection autoCommit to false explicitly. When we set > "phoenix.connection.autoCommit" to true in > hbase-site.xml,CsvToKeyValueMapper will really execute upsert sql to target > table,which is not expected. > So CsvToKeyValueMapper should set inner PhoenixConnection autoCommit to > false explicitly,just as PhoenixIndexImportMapper does. -- This message was sent by Atlassian JIRA (v6.3.4#6332)