[phoenix-connectors] branch 4.14-HBase-1.4 updated: Add hadoop-hdfs tests jar

2019-01-17 Thread vincentpoon
This is an automated email from the ASF dual-hosted git repository.

vincentpoon pushed a commit to branch 4.14-HBase-1.4
in repository https://gitbox.apache.org/repos/asf/phoenix-connectors.git


The following commit(s) were added to refs/heads/4.14-HBase-1.4 by this push:
 new 83ce33f  Add hadoop-hdfs tests jar
83ce33f is described below

commit 83ce33f09c1b8bc2d597e6ae88ffd2291e3ca8cf
Author: Vincent Poon 
AuthorDate: Thu Jan 17 17:59:40 2019 -0800

Add hadoop-hdfs tests jar
---
 presto-phoenix-shaded/pom.xml |  3 ++-
 .../presto-hbase-testing-util-shaded/pom.xml  | 15 ++-
 .../presto-phoenix-client-shaded/pom.xml  |  4 ++--
 3 files changed, 18 insertions(+), 4 deletions(-)

diff --git a/presto-phoenix-shaded/pom.xml b/presto-phoenix-shaded/pom.xml
index 895b172..7f33fb4 100644
--- a/presto-phoenix-shaded/pom.xml
+++ b/presto-phoenix-shaded/pom.xml
@@ -12,7 +12,7 @@
 Presto Apache Phoenix Shaded
 Shaded version of Apache Phoenix for Presto
 presto-phoenix-shaded
-4.14.1-HBase-1.4-PPS-0.1
+4.14.1-HBase-1.4-PPS-0.2
 pom
 
 
@@ -24,6 +24,7 @@
 
 
 
+4.14.1-HBase-1.4
 
 true
 org.apache.phoenix.shaded
diff --git a/presto-phoenix-shaded/presto-hbase-testing-util-shaded/pom.xml 
b/presto-phoenix-shaded/presto-hbase-testing-util-shaded/pom.xml
index 998fcaf..097efc7 100644
--- a/presto-phoenix-shaded/presto-hbase-testing-util-shaded/pom.xml
+++ b/presto-phoenix-shaded/presto-hbase-testing-util-shaded/pom.xml
@@ -5,7 +5,7 @@
 
 org.apache.phoenix
 presto-phoenix-shaded
-4.14.1-HBase-1.4-PPS-0.1
+4.14.1-HBase-1.4-PPS-0.2
 ..
 
 
@@ -101,6 +101,19 @@
 
 
 
+
+
+org.apache.hadoop
+hadoop-hdfs
+compile
+test-jar
+
+
+*
+*
+
+
+
 
 
 
diff --git a/presto-phoenix-shaded/presto-phoenix-client-shaded/pom.xml 
b/presto-phoenix-shaded/presto-phoenix-client-shaded/pom.xml
index 5a20f0f..7270a45 100644
--- a/presto-phoenix-shaded/presto-phoenix-client-shaded/pom.xml
+++ b/presto-phoenix-shaded/presto-phoenix-client-shaded/pom.xml
@@ -5,7 +5,7 @@
 
 org.apache.phoenix
 presto-phoenix-shaded
-4.14.1-HBase-1.4-PPS-0.1
+4.14.1-HBase-1.4-PPS-0.2
 ..
 
 
@@ -27,7 +27,7 @@
 
 org.apache.phoenix
 phoenix-core
-${project.version}
+${phoenix.version}
 
 



[phoenix-connectors] branch master created (now 786e7e4)

2019-01-17 Thread tdsilva
This is an automated email from the ASF dual-hosted git repository.

tdsilva pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/phoenix-connectors.git.


  at 786e7e4  Add README

This branch includes the following new commits:

 new 786e7e4  Add README

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.




[phoenix-connectors] 01/01: Add README

2019-01-17 Thread tdsilva
This is an automated email from the ASF dual-hosted git repository.

tdsilva pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/phoenix-connectors.git

commit 786e7e42014d36039938492980534c6f8c435ef2
Author: Thomas D'Silva 
AuthorDate: Thu Jan 17 15:44:02 2019 -0800

Add README
---
 README.md | 22 ++
 1 file changed, 22 insertions(+)

diff --git a/README.md b/README.md
new file mode 100644
index 000..b012021
--- /dev/null
+++ b/README.md
@@ -0,0 +1,22 @@
+
+
+![logo](https://phoenix.apache.org/images/phoenix-logo-small.png)
+
+[Apache Phoenix](http://phoenix.apache.org/) enables OLTP and 
operational analytics in Hadoop for low latency applications. Visit the Apache 
Phoenix website [here](http://phoenix.apache.org/). This repo contains 
connectors for third party libraries to access data stored in Phoenix/HBase. 
+
+Copyright ©2019 [Apache Software Foundation](http://www.apache.org/). All 
Rights Reserved. 



[phoenix] branch 4.x-HBase-1.4 updated: PHOENIX-4009 Run UPDATE STATISTICS command by using MR integration on snapshots

2019-01-17 Thread karanmehta93
This is an automated email from the ASF dual-hosted git repository.

karanmehta93 pushed a commit to branch 4.x-HBase-1.4
in repository https://gitbox.apache.org/repos/asf/phoenix.git


The following commit(s) were added to refs/heads/4.x-HBase-1.4 by this push:
 new e3280f6  PHOENIX-4009 Run UPDATE STATISTICS command by using MR 
integration on snapshots
e3280f6 is described below

commit e3280f6e8738b78fe865e4a717ef96c66a31b03f
Author: karanmehta93 
AuthorDate: Thu Jan 17 15:03:50 2019 -0800

PHOENIX-4009 Run UPDATE STATISTICS command by using MR integration on 
snapshots
---
 phoenix-core/pom.xml   |   8 +
 ...olumnEncodedImmutableNonTxStatsCollectorIT.java |  39 ---
 .../ColumnEncodedImmutableTxStatsCollectorIT.java  |  42 ---
 .../ColumnEncodedMutableTxStatsCollectorIT.java|  41 ---
 ...java => NamespaceDisabledStatsCollectorIT.java} |  27 +-
 java => NamespaceEnabledStatsCollectorIT.java} |  46 ++-
 ...onColumnEncodedImmutableTxStatsCollectorIT.java |  42 ---
 ...CollectorIT.java => NonTxStatsCollectorIT.java} |  25 +-
 .../apache/phoenix/end2end/TxStatsCollectorIT.java |  52 
 ...sCollectorIT.java => BaseStatsCollectorIT.java} | 228 +++---
 .../UngroupedAggregateRegionObserver.java  |  19 +-
 .../apache/phoenix/iterate/SnapshotScanner.java|  67 +++-
 .../iterate/TableSnapshotResultIterator.java   |  13 +
 .../phoenix/mapreduce/PhoenixInputFormat.java  |  32 +-
 .../phoenix/mapreduce/PhoenixRecordReader.java |   5 +-
 .../mapreduce/util/PhoenixConfigurationUtil.java   |  40 ++-
 .../mapreduce/util/PhoenixMapReduceUtil.java   |  13 +-
 .../org/apache/phoenix/schema/MetaDataClient.java  |  16 +-
 .../schema/stats/DefaultStatisticsCollector.java   | 344 ++---
 .../schema/stats/NoOpStatisticsCollector.java  |  21 +-
 .../phoenix/schema/stats/StatisticsCollector.java  |  21 +-
 .../schema/stats/StatisticsCollectorFactory.java   |  11 +-
 .../phoenix/schema/stats/StatisticsScanner.java|   3 +-
 .../phoenix/schema/stats/StatisticsUtil.java   |  23 +-
 .../phoenix/schema/stats/StatisticsWriter.java |  65 +++-
 .../phoenix/schema/stats/UpdateStatisticsTool.java | 223 +
 .../java/org/apache/phoenix/util/ServerUtil.java   |   6 +-
 .../util/PhoenixConfigurationUtilTest.java |  17 +
 .../phoenix/pig/util/PhoenixPigSchemaUtil.java |   4 +-
 pom.xml|  10 +
 30 files changed, 919 insertions(+), 584 deletions(-)

diff --git a/phoenix-core/pom.xml b/phoenix-core/pom.xml
index 018d054..3007d3b 100644
--- a/phoenix-core/pom.xml
+++ b/phoenix-core/pom.xml
@@ -399,6 +399,14 @@
 
 
   org.apache.hbase
+  hbase-metrics-api
+
+
+  org.apache.hbase
+  hbase-metrics
+
+
+  org.apache.hbase
   hbase-common
   test
   test-jar
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ColumnEncodedImmutableNonTxStatsCollectorIT.java
 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ColumnEncodedImmutableNonTxStatsCollectorIT.java
deleted file mode 100644
index 0481ba5..000
--- 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ColumnEncodedImmutableNonTxStatsCollectorIT.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.phoenix.end2end;
-
-import java.util.Arrays;
-import java.util.Collection;
-
-import org.apache.phoenix.schema.stats.StatsCollectorIT;
-import org.junit.runners.Parameterized.Parameters;
-
-public class ColumnEncodedImmutableNonTxStatsCollectorIT extends 
StatsCollectorIT {
-
-public ColumnEncodedImmutableNonTxStatsCollectorIT(boolean mutable, String 
transactionProvider,
-boolean userTableNamespaceMapped, boolean columnEncoded) {
-super(mutable, transactionProvider, userTableNamespaceMapped, 
columnEncoded);
-}
-
-@Parameters(name = 
"mutable={0},transactionProvider={1},isUserTableNamespaceMapped={2},columnEncoded={3}")
-public static Collection data() {
-return Arrays.asList(new Object[][] { 
-{ false, null, false, true }, { false, null, true, true }
-});
-}
-}
diff -

Build failed in Jenkins: Phoenix | Master #2280

2019-01-17 Thread Apache Jenkins Server
See 


Changes:

[tdsilva] PHOENIX-3623 Integrate Omid with Phoenix (addendum)

--
[...truncated 123.51 KB...]
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.185 s 
- in org.apache.phoenix.replication.SystemCatalogWALEntryFilterIT
[INFO] Running org.apache.phoenix.trace.PhoenixTracingEndToEndIT
[WARNING] Tests run: 1, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 0 s - 
in org.apache.phoenix.trace.PhoenixTracingEndToEndIT
[INFO] Running org.apache.phoenix.tx.FlappingTransactionIT
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 14.572 s 
- in org.apache.phoenix.trace.PhoenixTableMetricsWriterIT
[INFO] Running org.apache.phoenix.tx.ParameterizedTransactionIT
[INFO] Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 64.519 s 
- in org.apache.phoenix.rpc.UpdateCacheIT
[INFO] Running org.apache.phoenix.tx.TransactionIT
[INFO] Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 33.622 s 
- in org.apache.phoenix.tx.FlappingTransactionIT
[INFO] Running org.apache.phoenix.tx.TxCheckpointIT
[INFO] Tests run: 15, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 282.949 
s - in org.apache.phoenix.end2end.join.SubqueryUsingSortMergeJoinIT
[INFO] Tests run: 24, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 399.735 
s - in org.apache.phoenix.end2end.join.SubqueryIT
[INFO] Running org.apache.phoenix.util.IndexScrutinyIT
[INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 28.972 s 
- in org.apache.phoenix.util.IndexScrutinyIT
[INFO] Tests run: 34, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 897.863 
s - in org.apache.phoenix.end2end.join.HashJoinLocalIndexIT
[INFO] Tests run: 24, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 196.752 
s - in org.apache.phoenix.tx.TransactionIT
[INFO] Tests run: 34, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 861.086 
s - in org.apache.phoenix.end2end.join.SortMergeJoinLocalIndexIT
[INFO] Tests run: 50, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 440.309 
s - in org.apache.phoenix.tx.TxCheckpointIT
[INFO] Tests run: 78, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 767.198 
s - in org.apache.phoenix.tx.ParameterizedTransactionIT
[INFO] 
[INFO] Results:
[INFO] 
[ERROR] Failures: 
[ERROR]   ConcurrentMutationsIT.testLockUntilMVCCAdvanced:385 Expected data 
table row count to match expected:<1> but was:<0>
[ERROR]   ConcurrentMutationsIT.testRowLockDuringPreBatchMutateWhenIndexed:329 
Expected data table row count to match expected:<1> but was:<0>
[ERROR] Errors: 
[ERROR]   
MutableIndexSplitForwardScanIT.testSplitDuringIndexScan:30->MutableIndexSplitIT.testSplitDuringIndexScan:87->MutableIndexSplitIT.splitDuringScan:152
 » StaleRegionBoundaryCache
[ERROR]   
MutableIndexSplitForwardScanIT.testSplitDuringIndexScan:30->MutableIndexSplitIT.testSplitDuringIndexScan:87->MutableIndexSplitIT.splitDuringScan:152
 » StaleRegionBoundaryCache
[ERROR]   
MutableIndexSplitReverseScanIT.testSplitDuringIndexScan:30->MutableIndexSplitIT.testSplitDuringIndexScan:87->MutableIndexSplitIT.splitDuringScan:152
 » StaleRegionBoundaryCache
[ERROR]   
MutableIndexSplitReverseScanIT.testSplitDuringIndexScan:30->MutableIndexSplitIT.testSplitDuringIndexScan:87->MutableIndexSplitIT.splitDuringScan:152
 » StaleRegionBoundaryCache
[INFO] 
[ERROR] Tests run: 3615, Failures: 2, Errors: 4, Skipped: 11
[INFO] 
[INFO] 
[INFO] --- maven-failsafe-plugin:2.20:integration-test (HBaseManagedTimeTests) 
@ phoenix-core ---
[INFO] 
[INFO] ---
[INFO]  T E S T S
[INFO] ---
[INFO] 
[INFO] Results:
[INFO] 
[INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
[INFO] 
[INFO] 
[INFO] --- maven-failsafe-plugin:2.20:integration-test 
(NeedTheirOwnClusterTests) @ phoenix-core ---
[INFO] 
[INFO] ---
[INFO]  T E S T S
[INFO] ---
[INFO] Running 
org.apache.hadoop.hbase.regionserver.wal.WALReplayWithIndexWritesAndCompressedWALIT
[WARNING] Tests run: 1, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 0.003 
s - in 
org.apache.hadoop.hbase.regionserver.wal.WALReplayWithIndexWritesAndCompressedWALIT
[INFO] Running org.apache.phoenix.end2end.ChangePermissionsIT
[INFO] Running org.apache.phoenix.end2end.ConnectionUtilIT
[INFO] Running 
org.apache.hadoop.hbase.regionserver.wal.WALRecoveryRegionPostOpenIT
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 11.219 s 
- in org.apache.hadoop.hbase.regionserver.wal.WALRecoveryRegionPostOpenIT
[INFO] Running 
org.apache.phoenix.end2end.ColumnEncodedImmutableNonTxStatsCollectorIT
[INFO] Running 
org.apache.phoenix.end2end.ColumnEncodedImmutableTxStatsCollectorIT
[INFO] Running org.apache.phoenix.end2end.ColumnEncodedMutableTxStatsCollectorIT

[phoenix] branch 4.14-HBase-1.3 updated: modify index state based on client version to support old clients

2019-01-17 Thread tdsilva
This is an automated email from the ASF dual-hosted git repository.

tdsilva pushed a commit to branch 4.14-HBase-1.3
in repository https://gitbox.apache.org/repos/asf/phoenix.git


The following commit(s) were added to refs/heads/4.14-HBase-1.3 by this push:
 new ff1876a  modify index state based on client version to support old 
clients
ff1876a is described below

commit ff1876a05462f1c8326315a183200b7a688292c9
Author: Kiran Kumar Maturi 
AuthorDate: Wed Jan 16 16:04:31 2019 +0530

modify index state based on client version to support old clients
---
 .../index/InvalidIndexStateClientSideIT.java   | 143 +
 .../phoenix/coprocessor/MetaDataEndpointImpl.java  |  36 --
 2 files changed, 168 insertions(+), 11 deletions(-)

diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/InvalidIndexStateClientSideIT.java
 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/InvalidIndexStateClientSideIT.java
new file mode 100644
index 000..aee9d5b
--- /dev/null
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/InvalidIndexStateClientSideIT.java
@@ -0,0 +1,143 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.phoenix.end2end.index;
+
+import static 
org.apache.phoenix.coprocessor.MetaDataProtocol.PHOENIX_MAJOR_VERSION;
+import static 
org.apache.phoenix.coprocessor.MetaDataProtocol.PHOENIX_PATCH_NUMBER;
+import static org.junit.Assert.assertEquals;
+
+import java.io.IOException;
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.util.Map;
+
+import org.apache.hadoop.hbase.HConstants;
+import org.apache.hadoop.hbase.client.HTableInterface;
+import org.apache.hadoop.hbase.client.coprocessor.Batch;
+import org.apache.hadoop.hbase.ipc.BlockingRpcCallback;
+import org.apache.hadoop.hbase.ipc.ServerRpcController;
+import org.apache.hadoop.hbase.util.ByteStringer;
+import org.apache.phoenix.coprocessor.MetaDataProtocol.MutationCode;
+import org.apache.phoenix.coprocessor.generated.MetaDataProtos.GetTableRequest;
+import 
org.apache.phoenix.coprocessor.generated.MetaDataProtos.MetaDataResponse;
+import org.apache.phoenix.coprocessor.generated.MetaDataProtos.MetaDataService;
+import org.apache.phoenix.end2end.ParallelStatsDisabledIT;
+import org.apache.phoenix.hbase.index.util.VersionUtil;
+import org.apache.phoenix.jdbc.PhoenixConnection;
+import org.apache.phoenix.jdbc.PhoenixDatabaseMetaData;
+import org.apache.phoenix.query.ConnectionQueryServices;
+import org.apache.phoenix.schema.PIndexState;
+import org.apache.phoenix.schema.PName;
+import org.apache.phoenix.schema.types.PVarchar;
+import org.apache.phoenix.util.ByteUtil;
+import org.apache.phoenix.util.Closeables;
+import org.apache.phoenix.util.EnvironmentEdgeManager;
+import org.apache.phoenix.util.IndexUtil;
+import org.apache.phoenix.util.SchemaUtil;
+import org.junit.Test;
+
+import com.sun.org.apache.commons.logging.Log;
+import com.sun.org.apache.commons.logging.LogFactory;
+
+public class InvalidIndexStateClientSideIT extends ParallelStatsDisabledIT {
+private static final Log LOG = 
LogFactory.getLog(InvalidIndexStateClientSideIT.class);
+
+@Test
+public void testCachedConnections() throws Throwable {
+final String schemaName = generateUniqueName();
+final String tableName = generateUniqueName();
+final String fullTableName = SchemaUtil.getTableName(schemaName, 
tableName);
+final String indexName = generateUniqueName();
+final String fullIndexName = SchemaUtil.getTableName(schemaName, 
indexName);
+final Connection conn = DriverManager.getConnection(getUrl());
+
+// create table and indices
+String createTableSql =
+"CREATE TABLE " + fullTableName
++ "(org_id VARCHAR NOT NULL PRIMARY KEY, v1 INTEGER, 
v2 INTEGER, v3 INTEGER)";
+conn.createStatement().execute(createTableSql);
+conn.createStatement()
+.execute("CREATE INDEX " + indexName + " ON " + fullTableName 
+ "(v1)");
+conn.commit();
+PhoenixConnection phoenixConn = conn.unwrap(PhoenixConnection.class);
+ConnectionQueryServices queryServices = phoenixConn.getQu

[phoenix] branch 4.14-HBase-1.4 updated: modify index state based on client version to support old clients

2019-01-17 Thread tdsilva
This is an automated email from the ASF dual-hosted git repository.

tdsilva pushed a commit to branch 4.14-HBase-1.4
in repository https://gitbox.apache.org/repos/asf/phoenix.git


The following commit(s) were added to refs/heads/4.14-HBase-1.4 by this push:
 new 4c107e0  modify index state based on client version to support old 
clients
4c107e0 is described below

commit 4c107e0ece8e873f058107bd7a5dcd79ffa5d8fd
Author: Kiran Kumar Maturi 
AuthorDate: Wed Jan 16 16:04:31 2019 +0530

modify index state based on client version to support old clients
---
 .../index/InvalidIndexStateClientSideIT.java   | 143 +
 .../phoenix/coprocessor/MetaDataEndpointImpl.java  |  36 --
 2 files changed, 168 insertions(+), 11 deletions(-)

diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/InvalidIndexStateClientSideIT.java
 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/InvalidIndexStateClientSideIT.java
new file mode 100644
index 000..aee9d5b
--- /dev/null
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/InvalidIndexStateClientSideIT.java
@@ -0,0 +1,143 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.phoenix.end2end.index;
+
+import static 
org.apache.phoenix.coprocessor.MetaDataProtocol.PHOENIX_MAJOR_VERSION;
+import static 
org.apache.phoenix.coprocessor.MetaDataProtocol.PHOENIX_PATCH_NUMBER;
+import static org.junit.Assert.assertEquals;
+
+import java.io.IOException;
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.util.Map;
+
+import org.apache.hadoop.hbase.HConstants;
+import org.apache.hadoop.hbase.client.HTableInterface;
+import org.apache.hadoop.hbase.client.coprocessor.Batch;
+import org.apache.hadoop.hbase.ipc.BlockingRpcCallback;
+import org.apache.hadoop.hbase.ipc.ServerRpcController;
+import org.apache.hadoop.hbase.util.ByteStringer;
+import org.apache.phoenix.coprocessor.MetaDataProtocol.MutationCode;
+import org.apache.phoenix.coprocessor.generated.MetaDataProtos.GetTableRequest;
+import 
org.apache.phoenix.coprocessor.generated.MetaDataProtos.MetaDataResponse;
+import org.apache.phoenix.coprocessor.generated.MetaDataProtos.MetaDataService;
+import org.apache.phoenix.end2end.ParallelStatsDisabledIT;
+import org.apache.phoenix.hbase.index.util.VersionUtil;
+import org.apache.phoenix.jdbc.PhoenixConnection;
+import org.apache.phoenix.jdbc.PhoenixDatabaseMetaData;
+import org.apache.phoenix.query.ConnectionQueryServices;
+import org.apache.phoenix.schema.PIndexState;
+import org.apache.phoenix.schema.PName;
+import org.apache.phoenix.schema.types.PVarchar;
+import org.apache.phoenix.util.ByteUtil;
+import org.apache.phoenix.util.Closeables;
+import org.apache.phoenix.util.EnvironmentEdgeManager;
+import org.apache.phoenix.util.IndexUtil;
+import org.apache.phoenix.util.SchemaUtil;
+import org.junit.Test;
+
+import com.sun.org.apache.commons.logging.Log;
+import com.sun.org.apache.commons.logging.LogFactory;
+
+public class InvalidIndexStateClientSideIT extends ParallelStatsDisabledIT {
+private static final Log LOG = 
LogFactory.getLog(InvalidIndexStateClientSideIT.class);
+
+@Test
+public void testCachedConnections() throws Throwable {
+final String schemaName = generateUniqueName();
+final String tableName = generateUniqueName();
+final String fullTableName = SchemaUtil.getTableName(schemaName, 
tableName);
+final String indexName = generateUniqueName();
+final String fullIndexName = SchemaUtil.getTableName(schemaName, 
indexName);
+final Connection conn = DriverManager.getConnection(getUrl());
+
+// create table and indices
+String createTableSql =
+"CREATE TABLE " + fullTableName
++ "(org_id VARCHAR NOT NULL PRIMARY KEY, v1 INTEGER, 
v2 INTEGER, v3 INTEGER)";
+conn.createStatement().execute(createTableSql);
+conn.createStatement()
+.execute("CREATE INDEX " + indexName + " ON " + fullTableName 
+ "(v1)");
+conn.commit();
+PhoenixConnection phoenixConn = conn.unwrap(PhoenixConnection.class);
+ConnectionQueryServices queryServices = phoenixConn.getQu

[phoenix] branch 4.14-HBase-1.2 updated: modify index state based on client version to support old clients

2019-01-17 Thread tdsilva
This is an automated email from the ASF dual-hosted git repository.

tdsilva pushed a commit to branch 4.14-HBase-1.2
in repository https://gitbox.apache.org/repos/asf/phoenix.git


The following commit(s) were added to refs/heads/4.14-HBase-1.2 by this push:
 new b6222cb  modify index state based on client version to support old 
clients
b6222cb is described below

commit b6222cbd8850e737c11a685688df4d03a6f573bd
Author: Kiran Kumar Maturi 
AuthorDate: Wed Jan 16 16:04:31 2019 +0530

modify index state based on client version to support old clients
---
 .../index/InvalidIndexStateClientSideIT.java   | 143 +
 .../phoenix/coprocessor/MetaDataEndpointImpl.java  |  36 --
 2 files changed, 168 insertions(+), 11 deletions(-)

diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/InvalidIndexStateClientSideIT.java
 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/InvalidIndexStateClientSideIT.java
new file mode 100644
index 000..aee9d5b
--- /dev/null
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/InvalidIndexStateClientSideIT.java
@@ -0,0 +1,143 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.phoenix.end2end.index;
+
+import static 
org.apache.phoenix.coprocessor.MetaDataProtocol.PHOENIX_MAJOR_VERSION;
+import static 
org.apache.phoenix.coprocessor.MetaDataProtocol.PHOENIX_PATCH_NUMBER;
+import static org.junit.Assert.assertEquals;
+
+import java.io.IOException;
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.util.Map;
+
+import org.apache.hadoop.hbase.HConstants;
+import org.apache.hadoop.hbase.client.HTableInterface;
+import org.apache.hadoop.hbase.client.coprocessor.Batch;
+import org.apache.hadoop.hbase.ipc.BlockingRpcCallback;
+import org.apache.hadoop.hbase.ipc.ServerRpcController;
+import org.apache.hadoop.hbase.util.ByteStringer;
+import org.apache.phoenix.coprocessor.MetaDataProtocol.MutationCode;
+import org.apache.phoenix.coprocessor.generated.MetaDataProtos.GetTableRequest;
+import 
org.apache.phoenix.coprocessor.generated.MetaDataProtos.MetaDataResponse;
+import org.apache.phoenix.coprocessor.generated.MetaDataProtos.MetaDataService;
+import org.apache.phoenix.end2end.ParallelStatsDisabledIT;
+import org.apache.phoenix.hbase.index.util.VersionUtil;
+import org.apache.phoenix.jdbc.PhoenixConnection;
+import org.apache.phoenix.jdbc.PhoenixDatabaseMetaData;
+import org.apache.phoenix.query.ConnectionQueryServices;
+import org.apache.phoenix.schema.PIndexState;
+import org.apache.phoenix.schema.PName;
+import org.apache.phoenix.schema.types.PVarchar;
+import org.apache.phoenix.util.ByteUtil;
+import org.apache.phoenix.util.Closeables;
+import org.apache.phoenix.util.EnvironmentEdgeManager;
+import org.apache.phoenix.util.IndexUtil;
+import org.apache.phoenix.util.SchemaUtil;
+import org.junit.Test;
+
+import com.sun.org.apache.commons.logging.Log;
+import com.sun.org.apache.commons.logging.LogFactory;
+
+public class InvalidIndexStateClientSideIT extends ParallelStatsDisabledIT {
+private static final Log LOG = 
LogFactory.getLog(InvalidIndexStateClientSideIT.class);
+
+@Test
+public void testCachedConnections() throws Throwable {
+final String schemaName = generateUniqueName();
+final String tableName = generateUniqueName();
+final String fullTableName = SchemaUtil.getTableName(schemaName, 
tableName);
+final String indexName = generateUniqueName();
+final String fullIndexName = SchemaUtil.getTableName(schemaName, 
indexName);
+final Connection conn = DriverManager.getConnection(getUrl());
+
+// create table and indices
+String createTableSql =
+"CREATE TABLE " + fullTableName
++ "(org_id VARCHAR NOT NULL PRIMARY KEY, v1 INTEGER, 
v2 INTEGER, v3 INTEGER)";
+conn.createStatement().execute(createTableSql);
+conn.createStatement()
+.execute("CREATE INDEX " + indexName + " ON " + fullTableName 
+ "(v1)");
+conn.commit();
+PhoenixConnection phoenixConn = conn.unwrap(PhoenixConnection.class);
+ConnectionQueryServices queryServices = phoenixConn.getQu

[phoenix] branch master updated: PHOENIX-3623 Integrate Omid with Phoenix (addendum)

2019-01-17 Thread tdsilva
This is an automated email from the ASF dual-hosted git repository.

tdsilva pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/phoenix.git


The following commit(s) were added to refs/heads/master by this push:
 new c8686ce  PHOENIX-3623 Integrate Omid with Phoenix (addendum)
c8686ce is described below

commit c8686ce73093b879bbda5f08f3e7933a9708e110
Author: Yonatan Gottesman 
AuthorDate: Sun Jan 13 13:52:18 2019 +0200

PHOENIX-3623 Integrate Omid with Phoenix (addendum)
---
 phoenix-core/pom.xml   | 11 +++
 .../hbase/coprocessor/BaseRegionObserver.java  | 22 --
 .../coprocessor/OmidTransactionalProcessor.java| 11 ++-
 .../phoenix/transaction/OmidTransactionTable.java  |  4 +++-
 4 files changed, 24 insertions(+), 24 deletions(-)

diff --git a/phoenix-core/pom.xml b/phoenix-core/pom.xml
index 8056ff2..db5b909 100644
--- a/phoenix-core/pom.xml
+++ b/phoenix-core/pom.xml
@@ -217,6 +217,17 @@
   
 
   
+
+  org.apache.omid
+  omid-hbase-shims-hbase2.x
+  ${omid.version}
+  
+
+  org.testng
+  testng
+
+  
+
   
 org.apache.omid
 omid-tso-server-hbase2.x
diff --git 
a/phoenix-core/src/main/java/org/apache/hadoop/hbase/coprocessor/BaseRegionObserver.java
 
b/phoenix-core/src/main/java/org/apache/hadoop/hbase/coprocessor/BaseRegionObserver.java
deleted file mode 100644
index fa206bb..000
--- 
a/phoenix-core/src/main/java/org/apache/hadoop/hbase/coprocessor/BaseRegionObserver.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.hadoop.hbase.coprocessor;
-
-public class BaseRegionObserver implements RegionObserver{
-
-}
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/OmidTransactionalProcessor.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/OmidTransactionalProcessor.java
index b84b5ae..afcfea8 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/OmidTransactionalProcessor.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/OmidTransactionalProcessor.java
@@ -17,11 +17,20 @@
  */
 package org.apache.phoenix.coprocessor;
 
+import org.apache.hadoop.hbase.coprocessor.RegionCoprocessor;
+import org.apache.hadoop.hbase.coprocessor.RegionObserver;
 import org.apache.omid.transaction.OmidSnapshotFilter;
 import org.apache.phoenix.transaction.OmidTransactionProvider;
 
+import java.util.Optional;
 
-public class OmidTransactionalProcessor extends DelegateRegionObserver {
+
+public class OmidTransactionalProcessor extends DelegateRegionObserver 
implements RegionCoprocessor {
+
+@Override
+public Optional getRegionObserver() {
+return Optional.of(this);
+}
 
 public OmidTransactionalProcessor() {
 // Hack for testing - retrieves the commit table client from the 
singleton OmidTransactionProvider
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/transaction/OmidTransactionTable.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/transaction/OmidTransactionTable.java
index d27348d..5749d83 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/transaction/OmidTransactionTable.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/transaction/OmidTransactionTable.java
@@ -176,7 +176,9 @@ public class OmidTransactionTable implements Table {
 public void batch(List actions, Object[] results)
 throws IOException, InterruptedException {
 tTable.batch(tx, actions, addShadowCells);
-Arrays.fill(results, EMPTY_RESULT_EXISTS_TRUE);
+if (results != null) {
+Arrays.fill(results, EMPTY_RESULT_EXISTS_TRUE);
+}
 }
 
 @Override



Build failed in Jenkins: Phoenix Compile Compatibility with HBase #880

2019-01-17 Thread Apache Jenkins Server
See 


--
Started by timer
[EnvInject] - Loading node environment variables.
Building remotely on H35 (ubuntu xenial) in workspace 

[Phoenix_Compile_Compat_wHBase] $ /bin/bash /tmp/jenkins593414661673763113.sh
core file size  (blocks, -c) 0
data seg size   (kbytes, -d) unlimited
scheduling priority (-e) 0
file size   (blocks, -f) unlimited
pending signals (-i) 386517
max locked memory   (kbytes, -l) 64
max memory size (kbytes, -m) unlimited
open files  (-n) 6
pipe size(512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority  (-r) 0
stack size  (kbytes, -s) 8192
cpu time   (seconds, -t) unlimited
max user processes  (-u) 10240
virtual memory  (kbytes, -v) unlimited
file locks  (-x) unlimited
core id : 0
core id : 1
core id : 2
core id : 3
core id : 4
core id : 5
physical id : 0
physical id : 1
MemTotal:   98985820 kB
MemFree:49520924 kB
Filesystem  Size  Used Avail Use% Mounted on
udev 48G 0   48G   0% /dev
tmpfs   9.5G  482M  9.0G   5% /run
/dev/sda3   3.6T  194G  3.3T   6% /
tmpfs48G 0   48G   0% /dev/shm
tmpfs   5.0M 0  5.0M   0% /run/lock
tmpfs48G 0   48G   0% /sys/fs/cgroup
/dev/sda2   473M  191M  258M  43% /boot
/dev/loop1   28M   28M 0 100% /snap/snapcraft/1871
tmpfs   9.5G 0  9.5G   0% /run/user/910
/dev/loop5   89M   89M 0 100% /snap/core/5897
tmpfs   9.5G 0  9.5G   0% /run/user/1000
/dev/loop2   28M   28M 0 100% /snap/snapcraft/2374
/dev/loop8   90M   90M 0 100% /snap/core/6034
/dev/loop9   52M   52M 0 100% /snap/lxd/9795
/dev/loop6   90M   90M 0 100% /snap/core/6130
/dev/loop10  52M   52M 0 100% /snap/lxd/9874
/dev/loop4   52M   52M 0 100% /snap/lxd/9886
apache-maven-2.2.1
apache-maven-3.0.4
apache-maven-3.0.5
apache-maven-3.1.1
apache-maven-3.2.1
apache-maven-3.2.5
apache-maven-3.3.3
apache-maven-3.3.9
apache-maven-3.5.0
apache-maven-3.5.2
apache-maven-3.5.4
apache-maven-3.6.0
latest
latest2
latest3


===
Verifying compile level compatibility with HBase 0.98 with Phoenix 
4.x-HBase-0.98
===

Cloning into 'hbase'...
Switched to a new branch '0.98'
Branch 0.98 set up to track remote branch 0.98 from origin.
[ERROR] Plugin org.codehaus.mojo:findbugs-maven-plugin:2.5.2 or one of its 
dependencies could not be resolved: Failed to read artifact descriptor for 
org.codehaus.mojo:findbugs-maven-plugin:jar:2.5.2: Could not transfer artifact 
org.codehaus.mojo:findbugs-maven-plugin:pom:2.5.2 from/to central 
(https://repo.maven.apache.org/maven2): Received fatal alert: protocol_version 
-> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e 
switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please 
read the following articles:
[ERROR] [Help 1] 
http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException
Build step 'Execute shell' marked build as failure