[22/35] phoenix git commit: PHOENIX-4415 Ignore CURRENT_SCN property if set in Pig Storer

2018-01-31 Thread pboado
PHOENIX-4415 Ignore CURRENT_SCN property if set in Pig Storer


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

Branch: refs/heads/4.x-cdh5.11.2
Commit: 2c4ca6900ae1c4f43e293aa0096393356dd3bbfa
Parents: cc44562
Author: James Taylor 
Authored: Wed Nov 8 03:13:53 2017 +
Committer: Pedro Boado 
Committed: Wed Jan 31 22:24:48 2018 +

--
 .../phoenix/mapreduce/PhoenixOutputFormat.java  | 13 ++-
 .../phoenix/mapreduce/PhoenixRecordWriter.java  |  8 ++-
 .../phoenix/mapreduce/util/ConnectionUtil.java  | 23 
 .../org/apache/phoenix/util/PropertiesUtil.java |  9 +++-
 .../java/org/apache/phoenix/pig/BasePigIT.java  |  4 
 .../apache/phoenix/pig/PhoenixHBaseStorage.java | 12 ++
 6 files changed, 58 insertions(+), 11 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/2c4ca690/phoenix-core/src/main/java/org/apache/phoenix/mapreduce/PhoenixOutputFormat.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/mapreduce/PhoenixOutputFormat.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/mapreduce/PhoenixOutputFormat.java
index e55b977..4217e40 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/mapreduce/PhoenixOutputFormat.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/mapreduce/PhoenixOutputFormat.java
@@ -19,6 +19,8 @@ package org.apache.phoenix.mapreduce;
 
 import java.io.IOException;
 import java.sql.SQLException;
+import java.util.Collections;
+import java.util.Set;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
@@ -36,6 +38,15 @@ import org.apache.hadoop.mapreduce.lib.db.DBWritable;
  */
 public class PhoenixOutputFormat  extends 
OutputFormat {
 private static final Log LOG = 
LogFactory.getLog(PhoenixOutputFormat.class);
+private final Set propsToIgnore;
+
+public PhoenixOutputFormat() {
+this(Collections.emptySet());
+}
+
+public PhoenixOutputFormat(Set propsToIgnore) {
+this.propsToIgnore = propsToIgnore;
+}
 
 @Override
 public void checkOutputSpecs(JobContext jobContext) throws IOException, 
InterruptedException {  
@@ -52,7 +63,7 @@ public class PhoenixOutputFormat  
extends OutputFormat getRecordWriter(TaskAttemptContext 
context) throws IOException, InterruptedException {
 try {
-return new PhoenixRecordWriter(context.getConfiguration());
+return new PhoenixRecordWriter(context.getConfiguration(), 
propsToIgnore);
 } catch (SQLException e) {
 LOG.error("Error calling PhoenixRecordWriter "  + e.getMessage());
 throw new RuntimeException(e);

http://git-wip-us.apache.org/repos/asf/phoenix/blob/2c4ca690/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 70ee3f5..52f2fe3 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
@@ -21,6 +21,8 @@ import java.io.IOException;
 import java.sql.Connection;
 import java.sql.PreparedStatement;
 import java.sql.SQLException;
+import java.util.Collections;
+import java.util.Set;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
@@ -46,7 +48,11 @@ public class PhoenixRecordWriter  
extends RecordWriteremptySet());
+}
+
+public PhoenixRecordWriter(final Configuration configuration, Set 
propsToIgnore) throws SQLException {
+this.conn = 
ConnectionUtil.getOutputConnectionWithoutTheseProps(configuration, 
propsToIgnore);
 this.batchSize = PhoenixConfigurationUtil.getBatchSize(configuration);
 final String upsertQuery = 
PhoenixConfigurationUtil.getUpsertStatement(configuration);
 this.statement = this.conn.prepareStatement(upsertQuery);

http://git-wip-us.apache.org/repos/asf/phoenix/blob/2c4ca690/phoenix-core/src/main/java/org/apache/phoenix/mapreduce/util/ConnectionUtil.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/mapreduce/util/ConnectionUtil.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/mapreduce/util/ConnectionUtil.java
index 

[27/50] [abbrv] phoenix git commit: PHOENIX-4415 Ignore CURRENT_SCN property if set in Pig Storer

2018-01-19 Thread tdsilva
PHOENIX-4415 Ignore CURRENT_SCN property if set in Pig Storer


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

Branch: refs/heads/system-catalog
Commit: d6e61af807f7a4e605c61217bac556ffe00ea237
Parents: 1c3387d
Author: James Taylor 
Authored: Thu Dec 7 19:13:25 2017 -0800
Committer: James Taylor 
Committed: Thu Dec 7 19:13:25 2017 -0800

--
 .../phoenix/mapreduce/PhoenixOutputFormat.java  | 13 ++-
 .../phoenix/mapreduce/PhoenixRecordWriter.java  |  8 ++-
 .../phoenix/mapreduce/util/ConnectionUtil.java  | 23 
 .../org/apache/phoenix/util/PropertiesUtil.java |  9 +++-
 .../java/org/apache/phoenix/pig/BasePigIT.java  |  4 
 .../apache/phoenix/pig/PhoenixHBaseStorage.java | 12 ++
 6 files changed, 58 insertions(+), 11 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/d6e61af8/phoenix-core/src/main/java/org/apache/phoenix/mapreduce/PhoenixOutputFormat.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/mapreduce/PhoenixOutputFormat.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/mapreduce/PhoenixOutputFormat.java
index e55b977..4217e40 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/mapreduce/PhoenixOutputFormat.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/mapreduce/PhoenixOutputFormat.java
@@ -19,6 +19,8 @@ package org.apache.phoenix.mapreduce;
 
 import java.io.IOException;
 import java.sql.SQLException;
+import java.util.Collections;
+import java.util.Set;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
@@ -36,6 +38,15 @@ import org.apache.hadoop.mapreduce.lib.db.DBWritable;
  */
 public class PhoenixOutputFormat  extends 
OutputFormat {
 private static final Log LOG = 
LogFactory.getLog(PhoenixOutputFormat.class);
+private final Set propsToIgnore;
+
+public PhoenixOutputFormat() {
+this(Collections.emptySet());
+}
+
+public PhoenixOutputFormat(Set propsToIgnore) {
+this.propsToIgnore = propsToIgnore;
+}
 
 @Override
 public void checkOutputSpecs(JobContext jobContext) throws IOException, 
InterruptedException {  
@@ -52,7 +63,7 @@ public class PhoenixOutputFormat  
extends OutputFormat getRecordWriter(TaskAttemptContext 
context) throws IOException, InterruptedException {
 try {
-return new PhoenixRecordWriter(context.getConfiguration());
+return new PhoenixRecordWriter(context.getConfiguration(), 
propsToIgnore);
 } catch (SQLException e) {
 LOG.error("Error calling PhoenixRecordWriter "  + e.getMessage());
 throw new RuntimeException(e);

http://git-wip-us.apache.org/repos/asf/phoenix/blob/d6e61af8/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 70ee3f5..52f2fe3 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
@@ -21,6 +21,8 @@ import java.io.IOException;
 import java.sql.Connection;
 import java.sql.PreparedStatement;
 import java.sql.SQLException;
+import java.util.Collections;
+import java.util.Set;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
@@ -46,7 +48,11 @@ public class PhoenixRecordWriter  
extends RecordWriteremptySet());
+}
+
+public PhoenixRecordWriter(final Configuration configuration, Set 
propsToIgnore) throws SQLException {
+this.conn = 
ConnectionUtil.getOutputConnectionWithoutTheseProps(configuration, 
propsToIgnore);
 this.batchSize = PhoenixConfigurationUtil.getBatchSize(configuration);
 final String upsertQuery = 
PhoenixConfigurationUtil.getUpsertStatement(configuration);
 this.statement = this.conn.prepareStatement(upsertQuery);

http://git-wip-us.apache.org/repos/asf/phoenix/blob/d6e61af8/phoenix-core/src/main/java/org/apache/phoenix/mapreduce/util/ConnectionUtil.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/mapreduce/util/ConnectionUtil.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/mapreduce/util/ConnectionUtil.java
index 

[15/16] phoenix git commit: PHOENIX-4415 Ignore CURRENT_SCN property if set in Pig Storer

2017-12-16 Thread jamestaylor
PHOENIX-4415 Ignore CURRENT_SCN property if set in Pig Storer


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

Branch: refs/heads/4.x-HBase-1.2
Commit: a3db33567b4eb91f9c7b41d0232331da1f7873bb
Parents: ef174bb
Author: James Taylor 
Authored: Wed Nov 8 03:13:53 2017 +
Committer: James Taylor 
Committed: Sat Dec 16 16:42:54 2017 -0800

--
 .../phoenix/mapreduce/PhoenixOutputFormat.java  | 13 ++-
 .../phoenix/mapreduce/PhoenixRecordWriter.java  |  8 ++-
 .../phoenix/mapreduce/util/ConnectionUtil.java  | 23 
 .../org/apache/phoenix/util/PropertiesUtil.java |  9 +++-
 .../java/org/apache/phoenix/pig/BasePigIT.java  |  4 
 .../apache/phoenix/pig/PhoenixHBaseStorage.java | 12 ++
 6 files changed, 58 insertions(+), 11 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/a3db3356/phoenix-core/src/main/java/org/apache/phoenix/mapreduce/PhoenixOutputFormat.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/mapreduce/PhoenixOutputFormat.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/mapreduce/PhoenixOutputFormat.java
index e55b977..4217e40 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/mapreduce/PhoenixOutputFormat.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/mapreduce/PhoenixOutputFormat.java
@@ -19,6 +19,8 @@ package org.apache.phoenix.mapreduce;
 
 import java.io.IOException;
 import java.sql.SQLException;
+import java.util.Collections;
+import java.util.Set;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
@@ -36,6 +38,15 @@ import org.apache.hadoop.mapreduce.lib.db.DBWritable;
  */
 public class PhoenixOutputFormat  extends 
OutputFormat {
 private static final Log LOG = 
LogFactory.getLog(PhoenixOutputFormat.class);
+private final Set propsToIgnore;
+
+public PhoenixOutputFormat() {
+this(Collections.emptySet());
+}
+
+public PhoenixOutputFormat(Set propsToIgnore) {
+this.propsToIgnore = propsToIgnore;
+}
 
 @Override
 public void checkOutputSpecs(JobContext jobContext) throws IOException, 
InterruptedException {  
@@ -52,7 +63,7 @@ public class PhoenixOutputFormat  
extends OutputFormat getRecordWriter(TaskAttemptContext 
context) throws IOException, InterruptedException {
 try {
-return new PhoenixRecordWriter(context.getConfiguration());
+return new PhoenixRecordWriter(context.getConfiguration(), 
propsToIgnore);
 } catch (SQLException e) {
 LOG.error("Error calling PhoenixRecordWriter "  + e.getMessage());
 throw new RuntimeException(e);

http://git-wip-us.apache.org/repos/asf/phoenix/blob/a3db3356/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 70ee3f5..52f2fe3 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
@@ -21,6 +21,8 @@ import java.io.IOException;
 import java.sql.Connection;
 import java.sql.PreparedStatement;
 import java.sql.SQLException;
+import java.util.Collections;
+import java.util.Set;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
@@ -46,7 +48,11 @@ public class PhoenixRecordWriter  
extends RecordWriteremptySet());
+}
+
+public PhoenixRecordWriter(final Configuration configuration, Set 
propsToIgnore) throws SQLException {
+this.conn = 
ConnectionUtil.getOutputConnectionWithoutTheseProps(configuration, 
propsToIgnore);
 this.batchSize = PhoenixConfigurationUtil.getBatchSize(configuration);
 final String upsertQuery = 
PhoenixConfigurationUtil.getUpsertStatement(configuration);
 this.statement = this.conn.prepareStatement(upsertQuery);

http://git-wip-us.apache.org/repos/asf/phoenix/blob/a3db3356/phoenix-core/src/main/java/org/apache/phoenix/mapreduce/util/ConnectionUtil.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/mapreduce/util/ConnectionUtil.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/mapreduce/util/ConnectionUtil.java
index 

phoenix git commit: PHOENIX-4415 Ignore CURRENT_SCN property if set in Pig Storer

2017-12-07 Thread jamestaylor
Repository: phoenix
Updated Branches:
  refs/heads/5.x-HBase-2.0 04b27d542 -> 385c42372


PHOENIX-4415 Ignore CURRENT_SCN property if set in Pig Storer


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

Branch: refs/heads/5.x-HBase-2.0
Commit: 385c42372030b84e11e1b66efd0c5083ee2ff0bf
Parents: 04b27d5
Author: James Taylor 
Authored: Thu Dec 7 19:13:25 2017 -0800
Committer: James Taylor 
Committed: Thu Dec 7 19:16:01 2017 -0800

--
 .../phoenix/mapreduce/PhoenixOutputFormat.java  | 13 ++-
 .../phoenix/mapreduce/PhoenixRecordWriter.java  |  8 ++-
 .../phoenix/mapreduce/util/ConnectionUtil.java  | 23 
 .../org/apache/phoenix/util/PropertiesUtil.java |  9 +++-
 .../java/org/apache/phoenix/pig/BasePigIT.java  |  4 
 .../apache/phoenix/pig/PhoenixHBaseStorage.java | 12 ++
 6 files changed, 58 insertions(+), 11 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/385c4237/phoenix-core/src/main/java/org/apache/phoenix/mapreduce/PhoenixOutputFormat.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/mapreduce/PhoenixOutputFormat.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/mapreduce/PhoenixOutputFormat.java
index e55b977..4217e40 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/mapreduce/PhoenixOutputFormat.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/mapreduce/PhoenixOutputFormat.java
@@ -19,6 +19,8 @@ package org.apache.phoenix.mapreduce;
 
 import java.io.IOException;
 import java.sql.SQLException;
+import java.util.Collections;
+import java.util.Set;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
@@ -36,6 +38,15 @@ import org.apache.hadoop.mapreduce.lib.db.DBWritable;
  */
 public class PhoenixOutputFormat  extends 
OutputFormat {
 private static final Log LOG = 
LogFactory.getLog(PhoenixOutputFormat.class);
+private final Set propsToIgnore;
+
+public PhoenixOutputFormat() {
+this(Collections.emptySet());
+}
+
+public PhoenixOutputFormat(Set propsToIgnore) {
+this.propsToIgnore = propsToIgnore;
+}
 
 @Override
 public void checkOutputSpecs(JobContext jobContext) throws IOException, 
InterruptedException {  
@@ -52,7 +63,7 @@ public class PhoenixOutputFormat  
extends OutputFormat getRecordWriter(TaskAttemptContext 
context) throws IOException, InterruptedException {
 try {
-return new PhoenixRecordWriter(context.getConfiguration());
+return new PhoenixRecordWriter(context.getConfiguration(), 
propsToIgnore);
 } catch (SQLException e) {
 LOG.error("Error calling PhoenixRecordWriter "  + e.getMessage());
 throw new RuntimeException(e);

http://git-wip-us.apache.org/repos/asf/phoenix/blob/385c4237/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 70ee3f5..52f2fe3 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
@@ -21,6 +21,8 @@ import java.io.IOException;
 import java.sql.Connection;
 import java.sql.PreparedStatement;
 import java.sql.SQLException;
+import java.util.Collections;
+import java.util.Set;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
@@ -46,7 +48,11 @@ public class PhoenixRecordWriter  
extends RecordWriteremptySet());
+}
+
+public PhoenixRecordWriter(final Configuration configuration, Set 
propsToIgnore) throws SQLException {
+this.conn = 
ConnectionUtil.getOutputConnectionWithoutTheseProps(configuration, 
propsToIgnore);
 this.batchSize = PhoenixConfigurationUtil.getBatchSize(configuration);
 final String upsertQuery = 
PhoenixConfigurationUtil.getUpsertStatement(configuration);
 this.statement = this.conn.prepareStatement(upsertQuery);

http://git-wip-us.apache.org/repos/asf/phoenix/blob/385c4237/phoenix-core/src/main/java/org/apache/phoenix/mapreduce/util/ConnectionUtil.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/mapreduce/util/ConnectionUtil.java
 

phoenix git commit: PHOENIX-4415 Ignore CURRENT_SCN property if set in Pig Storer

2017-12-07 Thread jamestaylor
Repository: phoenix
Updated Branches:
  refs/heads/4.x-HBase-0.98 794d42833 -> 65263e479


PHOENIX-4415 Ignore CURRENT_SCN property if set in Pig Storer


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

Branch: refs/heads/4.x-HBase-0.98
Commit: 65263e47993d4f6211c0522dd33494adeb94d506
Parents: 794d428
Author: James Taylor 
Authored: Thu Dec 7 19:13:25 2017 -0800
Committer: James Taylor 
Committed: Thu Dec 7 19:14:16 2017 -0800

--
 .../phoenix/mapreduce/PhoenixOutputFormat.java  | 13 ++-
 .../phoenix/mapreduce/PhoenixRecordWriter.java  |  8 ++-
 .../phoenix/mapreduce/util/ConnectionUtil.java  | 23 
 .../org/apache/phoenix/util/PropertiesUtil.java |  9 +++-
 .../java/org/apache/phoenix/pig/BasePigIT.java  |  4 
 .../apache/phoenix/pig/PhoenixHBaseStorage.java | 12 ++
 6 files changed, 58 insertions(+), 11 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/65263e47/phoenix-core/src/main/java/org/apache/phoenix/mapreduce/PhoenixOutputFormat.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/mapreduce/PhoenixOutputFormat.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/mapreduce/PhoenixOutputFormat.java
index e55b977..4217e40 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/mapreduce/PhoenixOutputFormat.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/mapreduce/PhoenixOutputFormat.java
@@ -19,6 +19,8 @@ package org.apache.phoenix.mapreduce;
 
 import java.io.IOException;
 import java.sql.SQLException;
+import java.util.Collections;
+import java.util.Set;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
@@ -36,6 +38,15 @@ import org.apache.hadoop.mapreduce.lib.db.DBWritable;
  */
 public class PhoenixOutputFormat  extends 
OutputFormat {
 private static final Log LOG = 
LogFactory.getLog(PhoenixOutputFormat.class);
+private final Set propsToIgnore;
+
+public PhoenixOutputFormat() {
+this(Collections.emptySet());
+}
+
+public PhoenixOutputFormat(Set propsToIgnore) {
+this.propsToIgnore = propsToIgnore;
+}
 
 @Override
 public void checkOutputSpecs(JobContext jobContext) throws IOException, 
InterruptedException {  
@@ -52,7 +63,7 @@ public class PhoenixOutputFormat  
extends OutputFormat getRecordWriter(TaskAttemptContext 
context) throws IOException, InterruptedException {
 try {
-return new PhoenixRecordWriter(context.getConfiguration());
+return new PhoenixRecordWriter(context.getConfiguration(), 
propsToIgnore);
 } catch (SQLException e) {
 LOG.error("Error calling PhoenixRecordWriter "  + e.getMessage());
 throw new RuntimeException(e);

http://git-wip-us.apache.org/repos/asf/phoenix/blob/65263e47/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 70ee3f5..52f2fe3 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
@@ -21,6 +21,8 @@ import java.io.IOException;
 import java.sql.Connection;
 import java.sql.PreparedStatement;
 import java.sql.SQLException;
+import java.util.Collections;
+import java.util.Set;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
@@ -46,7 +48,11 @@ public class PhoenixRecordWriter  
extends RecordWriteremptySet());
+}
+
+public PhoenixRecordWriter(final Configuration configuration, Set 
propsToIgnore) throws SQLException {
+this.conn = 
ConnectionUtil.getOutputConnectionWithoutTheseProps(configuration, 
propsToIgnore);
 this.batchSize = PhoenixConfigurationUtil.getBatchSize(configuration);
 final String upsertQuery = 
PhoenixConfigurationUtil.getUpsertStatement(configuration);
 this.statement = this.conn.prepareStatement(upsertQuery);

http://git-wip-us.apache.org/repos/asf/phoenix/blob/65263e47/phoenix-core/src/main/java/org/apache/phoenix/mapreduce/util/ConnectionUtil.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/mapreduce/util/ConnectionUtil.java
 

phoenix git commit: PHOENIX-4415 Ignore CURRENT_SCN property if set in Pig Storer

2017-12-07 Thread jamestaylor
Repository: phoenix
Updated Branches:
  refs/heads/master 1c3387d0e -> d6e61af80


PHOENIX-4415 Ignore CURRENT_SCN property if set in Pig Storer


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

Branch: refs/heads/master
Commit: d6e61af807f7a4e605c61217bac556ffe00ea237
Parents: 1c3387d
Author: James Taylor 
Authored: Thu Dec 7 19:13:25 2017 -0800
Committer: James Taylor 
Committed: Thu Dec 7 19:13:25 2017 -0800

--
 .../phoenix/mapreduce/PhoenixOutputFormat.java  | 13 ++-
 .../phoenix/mapreduce/PhoenixRecordWriter.java  |  8 ++-
 .../phoenix/mapreduce/util/ConnectionUtil.java  | 23 
 .../org/apache/phoenix/util/PropertiesUtil.java |  9 +++-
 .../java/org/apache/phoenix/pig/BasePigIT.java  |  4 
 .../apache/phoenix/pig/PhoenixHBaseStorage.java | 12 ++
 6 files changed, 58 insertions(+), 11 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/d6e61af8/phoenix-core/src/main/java/org/apache/phoenix/mapreduce/PhoenixOutputFormat.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/mapreduce/PhoenixOutputFormat.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/mapreduce/PhoenixOutputFormat.java
index e55b977..4217e40 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/mapreduce/PhoenixOutputFormat.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/mapreduce/PhoenixOutputFormat.java
@@ -19,6 +19,8 @@ package org.apache.phoenix.mapreduce;
 
 import java.io.IOException;
 import java.sql.SQLException;
+import java.util.Collections;
+import java.util.Set;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
@@ -36,6 +38,15 @@ import org.apache.hadoop.mapreduce.lib.db.DBWritable;
  */
 public class PhoenixOutputFormat  extends 
OutputFormat {
 private static final Log LOG = 
LogFactory.getLog(PhoenixOutputFormat.class);
+private final Set propsToIgnore;
+
+public PhoenixOutputFormat() {
+this(Collections.emptySet());
+}
+
+public PhoenixOutputFormat(Set propsToIgnore) {
+this.propsToIgnore = propsToIgnore;
+}
 
 @Override
 public void checkOutputSpecs(JobContext jobContext) throws IOException, 
InterruptedException {  
@@ -52,7 +63,7 @@ public class PhoenixOutputFormat  
extends OutputFormat getRecordWriter(TaskAttemptContext 
context) throws IOException, InterruptedException {
 try {
-return new PhoenixRecordWriter(context.getConfiguration());
+return new PhoenixRecordWriter(context.getConfiguration(), 
propsToIgnore);
 } catch (SQLException e) {
 LOG.error("Error calling PhoenixRecordWriter "  + e.getMessage());
 throw new RuntimeException(e);

http://git-wip-us.apache.org/repos/asf/phoenix/blob/d6e61af8/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 70ee3f5..52f2fe3 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
@@ -21,6 +21,8 @@ import java.io.IOException;
 import java.sql.Connection;
 import java.sql.PreparedStatement;
 import java.sql.SQLException;
+import java.util.Collections;
+import java.util.Set;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
@@ -46,7 +48,11 @@ public class PhoenixRecordWriter  
extends RecordWriteremptySet());
+}
+
+public PhoenixRecordWriter(final Configuration configuration, Set 
propsToIgnore) throws SQLException {
+this.conn = 
ConnectionUtil.getOutputConnectionWithoutTheseProps(configuration, 
propsToIgnore);
 this.batchSize = PhoenixConfigurationUtil.getBatchSize(configuration);
 final String upsertQuery = 
PhoenixConfigurationUtil.getUpsertStatement(configuration);
 this.statement = this.conn.prepareStatement(upsertQuery);

http://git-wip-us.apache.org/repos/asf/phoenix/blob/d6e61af8/phoenix-core/src/main/java/org/apache/phoenix/mapreduce/util/ConnectionUtil.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/mapreduce/util/ConnectionUtil.java