phoenix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jferna...@apache.org
Subject phoenix git commit: PHOENIX-2367 : Change Phoenix Record Writer to use excecute instead of executeBatch()
Date Sun, 20 Dec 2015 23:03:49 GMT
Repository: phoenix
Updated Branches:
  refs/heads/4.x-HBase-0.98 8d9791742 -> aca599054


PHOENIX-2367 : Change Phoenix Record Writer to use excecute instead of executeBatch()


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

Branch: refs/heads/4.x-HBase-0.98
Commit: aca5990543c71241684c84678706669ca30a592e
Parents: 8d97917
Author: Siddhi <smehta@salesforce.com>
Authored: Tue Dec 15 16:05:11 2015 -0800
Committer: Jan <jfernando@salesforce.com>
Committed: Sun Dec 20 14:54:09 2015 -0800

----------------------------------------------------------------------
 .../java/org/apache/phoenix/mapreduce/PhoenixRecordWriter.java   | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/phoenix/blob/aca59905/phoenix-core/src/main/java/org/apache/phoenix/mapreduce/PhoenixRecordWriter.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/main/java/org/apache/phoenix/mapreduce/PhoenixRecordWriter.java
b/phoenix-core/src/main/java/org/apache/phoenix/mapreduce/PhoenixRecordWriter.java
index 5843076..70ee3f5 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/mapreduce/PhoenixRecordWriter.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/mapreduce/PhoenixRecordWriter.java
@@ -55,7 +55,6 @@ public class PhoenixRecordWriter<T extends DBWritable>  extends RecordWriter<Nul
     @Override
     public void close(TaskAttemptContext context) throws IOException, InterruptedException
{
         try {
-            statement.executeBatch();
             conn.commit();
          } catch (SQLException e) {
              LOG.error("SQLException while performing the commit for the task.");
@@ -77,10 +76,9 @@ public class PhoenixRecordWriter<T extends DBWritable>  extends RecordWriter<Nul
         try {
             record.write(statement);
             numRecords++;
-            statement.addBatch();
+            statement.execute();
             if (numRecords % batchSize == 0) {
                 LOG.debug("commit called on a batch of size : " + batchSize);
-                statement.executeBatch();
                 conn.commit();
             }
         } catch (SQLException e) {


Mime
View raw message