phoenix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gr...@apache.org
Subject phoenix git commit: PHOENIX-2748 Disable auto-commit during bulk load
Date Fri, 11 Mar 2016 19:46:57 GMT
Repository: phoenix
Updated Branches:
  refs/heads/4.x-HBase-0.98 611412166 -> 6c4c13b01


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/6c4c13b0
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/6c4c13b0
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/6c4c13b0

Branch: refs/heads/4.x-HBase-0.98
Commit: 6c4c13b01883ea2fcbe10a7fe62260d3250b147e
Parents: 6114121
Author: Gabriel Reid <gabrielr@ngdata.com>
Authored: Fri Mar 11 15:13:58 2016 +0100
Committer: Gabriel Reid <gabrielr@ngdata.com>
Committed: Fri Mar 11 20:46:21 2016 +0100

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


http://git-wip-us.apache.org/repos/asf/phoenix/blob/6c4c13b0/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);


Mime
View raw message