You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@phoenix.apache.org by gr...@apache.org on 2016/03/11 20:46:44 UTC

phoenix git commit: PHOENIX-2748 Disable auto-commit during bulk load

Repository: phoenix
Updated Branches:
  refs/heads/4.x-HBase-1.0 2788dae03 -> aa411ccd5


PHOENIX-2748 Disable auto-commit during bulk load


Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/aa411ccd
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/aa411ccd
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/aa411ccd

Branch: refs/heads/4.x-HBase-1.0
Commit: aa411ccd59e3b19acc5c6866b6511163ee37adc4
Parents: 2788dae
Author: Gabriel Reid <ga...@ngdata.com>
Authored: Fri Mar 11 15:13:58 2016 +0100
Committer: Gabriel Reid <ga...@ngdata.com>
Committed: Fri Mar 11 20:46:34 2016 +0100

----------------------------------------------------------------------
 .../org/apache/phoenix/mapreduce/FormatToBytesWritableMapper.java | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/phoenix/blob/aa411ccd/phoenix-core/src/main/java/org/apache/phoenix/mapreduce/FormatToBytesWritableMapper.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/main/java/org/apache/phoenix/mapreduce/FormatToBytesWritableMapper.java b/phoenix-core/src/main/java/org/apache/phoenix/mapreduce/FormatToBytesWritableMapper.java
index 2c9b6d9..1211b83 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/mapreduce/FormatToBytesWritableMapper.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/mapreduce/FormatToBytesWritableMapper.java
@@ -126,6 +126,9 @@ public abstract class FormatToBytesWritableMapper<RECORD> extends Mapper<LongWri
 
         try {
             conn = (PhoenixConnection) QueryUtil.getConnection(clientInfos, conf);
+            // We are dependent on rolling back before performing commits, so we need to be sure
+            // that auto-commit is not turned on
+            conn.setAutoCommit(false);
 
             final String tableNamesConf = conf.get(TABLE_NAMES_CONFKEY);
             final String logicalNamesConf = conf.get(LOGICAL_NAMES_CONFKEY);