phoenix git commit: PHOENIX-3837 Feature enabling to set property on an index with Alter statement PHOENIX-4361 Remove redundant argument in separateAndValidateProperties in CQSI pSigned-off-by: aerto

2018-02-23 Thread ewang
Repository: phoenix
Updated Branches:
  refs/heads/5.x-HBase-2.0 6c9855139 -> beb3a7676


PHOENIX-3837 Feature enabling to set property on an index with Alter statement
PHOENIX-4361 Remove redundant argument in separateAndValidateProperties in CQSI
pSigned-off-by: aertoria 


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

Branch: refs/heads/5.x-HBase-2.0
Commit: beb3a767690f4faafb6ee08ae0b14a5a8f3133d5
Parents: 6c98551
Author: aertoria 
Authored: Mon Nov 27 11:58:01 2017 -0800
Committer: aertoria 
Committed: Fri Feb 23 13:06:50 2018 -0800

--
 .../apache/phoenix/end2end/AlterTableIT.java|   2 +-
 .../phoenix/end2end/index/IndexMetadataIT.java  |  55 ++
 phoenix-core/src/main/antlr3/PhoenixSQL.g   |   5 +-
 .../apache/phoenix/jdbc/PhoenixStatement.java   |  10 +-
 .../phoenix/parse/AddColumnStatement.java   |   2 +-
 .../phoenix/parse/AlterIndexStatement.java  |  14 +
 .../apache/phoenix/parse/ParseNodeFactory.java  |   6 +-
 .../phoenix/query/ConnectionQueryServices.java  |   2 +
 .../query/ConnectionQueryServicesImpl.java  |  25 +-
 .../query/ConnectionlessQueryServicesImpl.java  |  10 +-
 .../query/DelegateConnectionQueryServices.java  |   8 +-
 .../apache/phoenix/schema/MetaDataClient.java   | 572 +--
 12 files changed, 530 insertions(+), 181 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/beb3a767/phoenix-core/src/it/java/org/apache/phoenix/end2end/AlterTableIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/AlterTableIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/AlterTableIT.java
index cfc59bd..4e731c1 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/AlterTableIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/AlterTableIT.java
@@ -1081,7 +1081,7 @@ public class AlterTableIT extends ParallelStatsDisabledIT 
{
} catch (SQLException e) {

assertEquals(SQLExceptionCode.CANNOT_CREATE_TXN_TABLE_IF_TXNS_DISABLED.getErrorCode(),
 e.getErrorCode());
}
-   // altering a table to be transactional  should fail if 
transactions are disabled
+   // altering a table to be transactional should fail if 
transactions are disabled
conn.createStatement().execute("CREATE TABLE " + 
dataTableFullName + "(k INTEGER PRIMARY KEY, v VARCHAR)");
try {
conn.createStatement().execute("ALTER TABLE " + 
dataTableFullName + " SET TRANSACTIONAL=true");

http://git-wip-us.apache.org/repos/asf/phoenix/blob/beb3a767/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/IndexMetadataIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/IndexMetadataIT.java
 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/IndexMetadataIT.java
index 0ce36dd..986c317 100644
--- 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/IndexMetadataIT.java
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/IndexMetadataIT.java
@@ -674,4 +674,59 @@ public class IndexMetadataIT extends 
ParallelStatsDisabledIT {
 conn.close();
 }
 }
+
+
+
+@Test
+public void testIndexAlterPhoenixProperty() throws Exception {
+Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
+Connection conn = DriverManager.getConnection(getUrl(), props);
+String testTable = generateUniqueName();
+
+
+String ddl = "create table " + testTable  + " (k varchar primary key, 
v1 varchar)";
+Statement stmt = conn.createStatement();
+stmt.execute(ddl);
+String indexName = "IDX_" + generateUniqueName();
+
+ddl = "CREATE INDEX " + indexName + " ON " + testTable  + " (v1) ";
+stmt.execute(ddl);
+conn.createStatement().execute("ALTER INDEX "+indexName+" ON " + 
testTable +" ACTIVE SET GUIDE_POSTS_WIDTH = 10");
+
+ResultSet rs = conn.createStatement().executeQuery(
+"select GUIDE_POSTS_WIDTH from SYSTEM.\"CATALOG\" where 
TABLE_NAME='" + indexName + "'");assertTrue(rs.next());
+assertEquals(10,rs.getInt(1));
+
+conn.createStatement().execute("ALTER INDEX "+indexName+" ON " + 
testTable +" ACTIVE SET GUIDE_POSTS_WIDTH = 20");
+rs = conn.createStatement().executeQuery(
+"select GUIDE_POSTS_WIDTH 

phoenix git commit: PHOENIX-4488 Cache config parameters for MetaDataEndPointImpl during initialization(James Taylor)

2018-02-23 Thread rajeshbabu
Repository: phoenix
Updated Branches:
  refs/heads/5.x-HBase-2.0 1363d5fa6 -> 6c9855139


PHOENIX-4488 Cache config parameters for MetaDataEndPointImpl during 
initialization(James Taylor)


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

Branch: refs/heads/5.x-HBase-2.0
Commit: 6c9855139a954c5d9e7db6b298d1f59458a83ef8
Parents: 1363d5f
Author: Rajeshbabu Chintaguntla 
Authored: Sat Feb 24 00:03:43 2018 +0530
Committer: Rajeshbabu Chintaguntla 
Committed: Sat Feb 24 00:03:43 2018 +0530

--
 .../coprocessor/MetaDataEndpointImplTest.java   | 44 
 .../coprocessor/MetaDataEndpointImpl.java   | 26 ++--
 2 files changed, 13 insertions(+), 57 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/6c985513/phoenix-core/src/it/java/org/apache/phoenix/coprocessor/MetaDataEndpointImplTest.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/coprocessor/MetaDataEndpointImplTest.java
 
b/phoenix-core/src/it/java/org/apache/phoenix/coprocessor/MetaDataEndpointImplTest.java
deleted file mode 100644
index 2c558d8..000
--- 
a/phoenix-core/src/it/java/org/apache/phoenix/coprocessor/MetaDataEndpointImplTest.java
+++ /dev/null
@@ -1,44 +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.coprocessor;
-
-import com.google.common.collect.Lists;
-import org.apache.hadoop.conf.Configuration;
-import org.apache.phoenix.query.QueryServices;
-import org.apache.phoenix.schema.PTable;
-import org.apache.phoenix.schema.PTableType;
-import org.junit.Test;
-
-import java.util.List;
-
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.when;
-
-public class MetaDataEndpointImplTest {
-
-@Test
-public void testExceededIndexQuota() throws Exception {
-PTable parentTable = mock(PTable.class);
-List indexes = Lists.newArrayList(mock(PTable.class), 
mock(PTable.class));
-when(parentTable.getIndexes()).thenReturn(indexes);
-Configuration configuration = new Configuration();
-assertFalse(MetaDataEndpointImpl.execeededIndexQuota(PTableType.INDEX, 
parentTable, configuration));
-configuration.setInt(QueryServices.MAX_INDEXES_PER_TABLE, 1);
-assertTrue(MetaDataEndpointImpl.execeededIndexQuota(PTableType.INDEX, 
parentTable, configuration));
-}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/phoenix/blob/6c985513/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataEndpointImpl.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataEndpointImpl.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataEndpointImpl.java
index 019777e..751aea0 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataEndpointImpl.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataEndpointImpl.java
@@ -236,7 +236,6 @@ import org.apache.phoenix.util.UpgradeUtil;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import com.google.common.annotations.VisibleForTesting;
 import com.google.common.cache.Cache;
 import com.google.common.collect.Lists;
 import com.google.common.collect.Maps;
@@ -462,6 +461,9 @@ public class MetaDataEndpointImpl extends MetaDataProtocol 
implements RegionCopr
 }
 
 private RegionCoprocessorEnvironment env;
+private boolean blockWriteRebuildIndex;
+private int maxIndexesPerTable;
+private boolean isTablesMappingEnabled;
 
 /**
  * Stores a reference to the coprocessor environment provided by the
@@ -480,6 +482,13 @@ public class 

phoenix git commit: PHOENIX-4487 Missing SYSTEM.MUTEX table upgrading from 4.7 to 4.13(James Taylor)

2018-02-23 Thread rajeshbabu
Repository: phoenix
Updated Branches:
  refs/heads/5.x-HBase-2.0 1123f96cb -> 1363d5fa6


PHOENIX-4487 Missing SYSTEM.MUTEX table upgrading from 4.7 to 4.13(James Taylor)


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

Branch: refs/heads/5.x-HBase-2.0
Commit: 1363d5fa6aacdd9f4b5d37395db0fa42593f45aa
Parents: 1123f96
Author: Rajeshbabu Chintaguntla 
Authored: Fri Feb 23 23:40:26 2018 +0530
Committer: Rajeshbabu Chintaguntla 
Committed: Fri Feb 23 23:40:26 2018 +0530

--
 .../query/ConnectionQueryServicesImpl.java  | 29 
 1 file changed, 24 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/1363d5fa/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
index e17471d..981baab 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
@@ -2643,11 +2643,23 @@ public class ConnectionQueryServicesImpl extends 
DelegateQueryServices implement
 } catch (TableAlreadyExistsException e) {
 long currentServerSideTableTimeStamp = 
e.getTable().getTimeStamp();
 sysCatalogTableName = 
e.getTable().getPhysicalName().getString();
-if (currentServerSideTableTimeStamp < 
MIN_SYSTEM_TABLE_TIMESTAMP
-&& (acquiredMutexLock = 
acquireUpgradeMutex(currentServerSideTableTimeStamp, mutexRowKey))) {
-snapshotName = 
getSysCatalogSnapshotName(currentServerSideTableTimeStamp);
-createSnapshot(snapshotName, sysCatalogTableName);
-snapshotCreated = true;
+if (currentServerSideTableTimeStamp < 
MIN_SYSTEM_TABLE_TIMESTAMP) {
+// Ensure that the SYSTEM.MUTEX table has been created 
prior
+// to attempting to acquire the upgrade mutex. If namespace
+// mapping is enabled, we've already done this earlier in 
the
+// upgrade, so no need for a bunch of wasted RPCs.
+if (currentServerSideTableTimeStamp <= 
MetaDataProtocol.MIN_SYSTEM_TABLE_TIMESTAMP_4_10_0 &&
+
!SchemaUtil.isNamespaceMappingEnabled(PTableType.SYSTEM,
+
ConnectionQueryServicesImpl.this.getProps())) {
+try (Admin admin = getAdmin()) {
+createSysMutexTable(admin, this.getProps());
+}
+}
+if (acquiredMutexLock = 
acquireUpgradeMutex(currentServerSideTableTimeStamp, mutexRowKey)) {
+snapshotName = 
getSysCatalogSnapshotName(currentServerSideTableTimeStamp);
+createSnapshot(snapshotName, sysCatalogTableName);
+snapshotCreated = true;
+}
 }
 String columnsToAdd = "";
 // This will occur if we have an older SYSTEM.CATALOG and we 
need to update it to
@@ -3196,6 +3208,13 @@ public class ConnectionQueryServicesImpl extends 
DelegateQueryServices implement
 // Try acquiring a lock in SYSMUTEX table before migrating the 
tables since it involves disabling the table
 // If we cannot acquire lock, it means some old client is either 
migrating SYSCAT or trying to upgrade the
 // schema of SYSCAT table and hence it should not be interrupted
+// Create mutex if not already created
+if 
(!tableNames.contains(PhoenixDatabaseMetaData.SYSTEM_MUTEX_HBASE_TABLE_NAME)) {
+TableName mutexName = 
SchemaUtil.getPhysicalTableName(PhoenixDatabaseMetaData.SYSTEM_MUTEX_NAME, 
props);
+if 
(PhoenixDatabaseMetaData.SYSTEM_MUTEX_HBASE_TABLE_NAME.equals(mutexName) || 
!tableNames.contains(mutexName)) {
+createSysMutexTable(admin, props);
+}
+}
 acquiredMutexLock = 
acquireUpgradeMutex(MetaDataProtocol.MIN_SYSTEM_TABLE_MIGRATION_TIMESTAMP, 
mutexRowKey);
 if(acquiredMutexLock) {
 logger.debug("Acquired lock in SYSMUTEX table for migrating 
SYSTEM tables to SYSTEM namespace");



[2/2] phoenix git commit: PHOENIX-4278 Implement pure client side transactional index maintenance(Ohad Shacham)

2018-02-23 Thread rajeshbabu
PHOENIX-4278 Implement pure client side transactional index maintenance(Ohad 
Shacham)


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

Branch: refs/heads/5.x-HBase-2.0
Commit: 1123f96cb03ef15e26a4aa2bd77d9a931a33e707
Parents: 9ff02ea
Author: Rajeshbabu Chintaguntla 
Authored: Fri Feb 23 23:34:17 2018 +0530
Committer: Rajeshbabu Chintaguntla 
Committed: Fri Feb 23 23:34:17 2018 +0530

--
 .../phoenix/end2end/index/BaseIndexIT.java  |   2 +-
 .../phoenix/end2end/index/ImmutableIndexIT.java |   2 +
 .../org/apache/phoenix/cache/HashCache.java |   1 +
 .../phoenix/cache/IndexMetaDataCache.java   |   8 +
 .../apache/phoenix/cache/ServerCacheClient.java |   2 +
 .../org/apache/phoenix/cache/TenantCache.java   |   2 +-
 .../apache/phoenix/cache/TenantCacheImpl.java   |   4 +-
 .../apache/phoenix/compile/DeleteCompiler.java  |   3 +
 .../apache/phoenix/compile/UpsertCompiler.java  |   2 +
 .../coprocessor/MetaDataRegionObserver.java |   2 +
 .../coprocessor/ServerCachingEndpointImpl.java  |   4 +-
 .../coprocessor/ServerCachingProtocol.java  |   2 +-
 .../UngroupedAggregateRegionObserver.java   |  23 +-
 .../generated/ServerCachingProtos.java  | 117 -
 .../apache/phoenix/execute/MutationState.java   |  30 +-
 .../PhoenixTxnIndexMutationGenerator.java   | 519 +++
 .../hbase/index/covered/LocalTableState.java|   6 -
 .../phoenix/hbase/index/covered/TableState.java |   5 -
 .../index/IndexMetaDataCacheFactory.java|   7 +-
 .../apache/phoenix/index/PhoenixIndexCodec.java |   3 +-
 .../phoenix/index/PhoenixIndexMetaData.java |  12 +
 .../index/PhoenixTransactionalIndexer.java  |   8 +-
 .../phoenix/jdbc/PhoenixDatabaseMetaData.java   |   1 +
 .../apache/phoenix/join/HashCacheFactory.java   |  34 +-
 .../index/PhoenixIndexPartialBuildMapper.java   |   5 +
 .../query/ConnectionQueryServicesImpl.java  |   8 -
 .../org/apache/phoenix/schema/PTableImpl.java   |  22 +-
 .../apache/phoenix/cache/TenantCacheTest.java   |  14 +-
 .../src/main/ServerCachingService.proto |   1 +
 29 files changed, 757 insertions(+), 92 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/1123f96c/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/BaseIndexIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/BaseIndexIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/BaseIndexIT.java
index c2f00e7..48268dd 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/BaseIndexIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/BaseIndexIT.java
@@ -246,7 +246,7 @@ public abstract class BaseIndexIT extends 
ParallelStatsDisabledIT {
 PTable table = PhoenixRuntime.getTable(conn, 
Bytes.toString(tableName));
 assertTrue(table.getType() == PTableType.TABLE); // should be 
data table
 boolean hasIndexData = iterator.hasNext();
-assertFalse(hasIndexData); // should have no index data
+assertFalse(hasIndexData && !transactional); // should have no 
index data
 }
 }
 }

http://git-wip-us.apache.org/repos/asf/phoenix/blob/1123f96c/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/ImmutableIndexIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/ImmutableIndexIT.java
 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/ImmutableIndexIT.java
index c83ca4a..85a26f9 100644
--- 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/ImmutableIndexIT.java
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/ImmutableIndexIT.java
@@ -72,6 +72,7 @@ import com.google.common.collect.Maps;
 public class ImmutableIndexIT extends BaseUniqueNamesOwnClusterIT {
 
 private final boolean localIndex;
+private final boolean transactional;
 private final String tableDDLOptions;
 
 private volatile boolean stopThreads = false;
@@ -83,6 +84,7 @@ public class ImmutableIndexIT extends 
BaseUniqueNamesOwnClusterIT {
 public ImmutableIndexIT(boolean localIndex, boolean transactional, boolean 
columnEncoded) {
 StringBuilder optionBuilder = new StringBuilder("IMMUTABLE_ROWS=true");
 this.localIndex = localIndex;
+this.transactional = transactional;
 if (!columnEncoded) {
 if (optionBuilder.length()!=0)
 

[1/2] phoenix git commit: PHOENIX-4278 Implement pure client side transactional index maintenance(Ohad Shacham)

2018-02-23 Thread rajeshbabu
Repository: phoenix
Updated Branches:
  refs/heads/5.x-HBase-2.0 9ff02ea24 -> 1123f96cb


http://git-wip-us.apache.org/repos/asf/phoenix/blob/1123f96c/phoenix-core/src/main/java/org/apache/phoenix/mapreduce/index/PhoenixIndexPartialBuildMapper.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/mapreduce/index/PhoenixIndexPartialBuildMapper.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/mapreduce/index/PhoenixIndexPartialBuildMapper.java
index 60f07b7..1ad1ce5 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/mapreduce/index/PhoenixIndexPartialBuildMapper.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/mapreduce/index/PhoenixIndexPartialBuildMapper.java
@@ -33,9 +33,11 @@ import org.apache.hadoop.hbase.client.Put;
 import org.apache.hadoop.hbase.client.Result;
 import org.apache.hadoop.hbase.io.ImmutableBytesWritable;
 import org.apache.hadoop.hbase.mapreduce.TableMapper;
+import org.apache.hadoop.hbase.util.Bytes;
 import org.apache.hadoop.io.IntWritable;
 import org.apache.phoenix.cache.ServerCacheClient;
 import org.apache.phoenix.coprocessor.BaseScannerRegionObserver;
+import org.apache.phoenix.coprocessor.MetaDataProtocol;
 import org.apache.phoenix.hbase.index.util.ImmutableBytesPtr;
 import org.apache.phoenix.index.PhoenixIndexCodec;
 import org.apache.phoenix.jdbc.PhoenixConnection;
@@ -105,6 +107,7 @@ public class PhoenixIndexPartialBuildMapper extends 
TableMapperhttp://git-wip-us.apache.org/repos/asf/phoenix/blob/1123f96c/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
index 5c5a42e..e17471d 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
@@ -181,7 +181,6 @@ import org.apache.phoenix.hbase.index.util.KeyValueBuilder;
 import org.apache.phoenix.hbase.index.util.VersionUtil;
 import org.apache.phoenix.index.PhoenixIndexBuilder;
 import org.apache.phoenix.index.PhoenixIndexCodec;
-import org.apache.phoenix.index.PhoenixTransactionalIndexer;
 import org.apache.phoenix.iterate.TableResultIterator;
 import org.apache.phoenix.iterate.TableResultIterator.RenewLeaseStatus;
 import org.apache.phoenix.jdbc.PhoenixConnection;
@@ -858,19 +857,12 @@ public class ConnectionQueryServicesImpl extends 
DelegateQueryServices implement
 && !SchemaUtil.isMetaTable(tableName)
 && !SchemaUtil.isStatsTable(tableName)) {
 if (isTransactional) {
-
if(!newDesc.hasCoprocessor(PhoenixTransactionalIndexer.class.getName())) {
-
builder.addCoprocessor(PhoenixTransactionalIndexer.class.getName(), null, 
priority, null);
-}
 // For alter table, remove non transactional index 
coprocessor
 if(newDesc.hasCoprocessor(Indexer.class.getName())) {
 builder.removeCoprocessor(Indexer.class.getName());
 }
 } else {
 if (!newDesc.hasCoprocessor(Indexer.class.getName())) {
-// If exception on alter table to transition back to 
non transactional
-if 
(newDesc.hasCoprocessor(PhoenixTransactionalIndexer.class.getName())) {
-
builder.removeCoprocessor(PhoenixTransactionalIndexer.class.getName());
-}
 Map opts = 
Maps.newHashMapWithExpectedSize(1);
 opts.put(NonTxIndexBuilder.CODEC_CLASS_NAME_KEY, 
PhoenixIndexCodec.class.getName());
 Indexer.enableIndexing(builder, 
PhoenixIndexBuilder.class, opts, priority);

http://git-wip-us.apache.org/repos/asf/phoenix/blob/1123f96c/phoenix-core/src/main/java/org/apache/phoenix/schema/PTableImpl.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/schema/PTableImpl.java 
b/phoenix-core/src/main/java/org/apache/phoenix/schema/PTableImpl.java
index 0b48376..633595a 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/schema/PTableImpl.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/schema/PTableImpl.java
@@ -1037,27 +1037,15 @@ public class PTableImpl implements PTable {
 @Override
 public void delete() {
 newMutations();
-// we're using the Tephra column family delete marker here to 
prevent the translation 
-// of deletes to puts by the Tephra's TransactionProcessor
-if 

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

2018-02-23 Thread Apache Jenkins Server
See 


--
[...truncated 39.70 KB...]
[ERROR] 
:[364,5]
 method does not override or implement a method from a supertype
[ERROR] 
:[370,5]
 method does not override or implement a method from a supertype
[ERROR] 
:[376,5]
 method does not override or implement a method from a supertype
[ERROR] 
:[382,5]
 method does not override or implement a method from a supertype
[ERROR] Failed to execute goal 
org.apache.maven.plugins:maven-compiler-plugin:3.0:compile (default-compile) on 
project phoenix-core: Compilation failure: Compilation failure: 
[ERROR] 
:[34,39]
 cannot find symbol
[ERROR]   symbol:   class MetricRegistry
[ERROR]   location: package org.apache.hadoop.hbase.metrics
[ERROR] 
:[144,16]
 cannot find symbol
[ERROR]   symbol:   class MetricRegistry
[ERROR]   location: class 
org.apache.phoenix.coprocessor.PhoenixMetaDataCoprocessorHost.PhoenixMetaDataControllerEnvironment
[ERROR] 
:[24,35]
 cannot find symbol
[ERROR]   symbol:   class DelegatingHBaseRpcController
[ERROR]   location: package org.apache.hadoop.hbase.ipc
[ERROR] 
:[25,35]
 cannot find symbol
[ERROR]   symbol:   class HBaseRpcController
[ERROR]   location: package org.apache.hadoop.hbase.ipc
[ERROR] 
:[37,37]
 cannot find symbol
[ERROR]   symbol: class DelegatingHBaseRpcController
[ERROR] 
:[56,38]
 cannot find symbol
[ERROR]   symbol:   class HBaseRpcController
[ERROR]   location: class 
org.apache.hadoop.hbase.ipc.controller.MetadataRpcController
[ERROR] 
:[26,35]
 cannot find symbol
[ERROR]   symbol:   class HBaseRpcController
[ERROR]   location: package org.apache.hadoop.hbase.ipc
[ERROR] 
:[40,12]
 cannot find symbol
[ERROR]   symbol:   class HBaseRpcController
[ERROR]   location: class 
org.apache.hadoop.hbase.ipc.controller.InterRegionServerMetadataRpcControllerFactory
[ERROR] 
:[46,12]
 cannot find symbol
[ERROR]   symbol:   class HBaseRpcController
[ERROR]   location: class 
org.apache.hadoop.hbase.ipc.controller.InterRegionServerMetadataRpcControllerFactory
[ERROR] 
:[52,12]
 cannot find symbol
[ERROR]   symbol:   class HBaseRpcController
[ERROR]   location: class 
org.apache.hadoop.hbase.ipc.controller.InterRegionServerMetadataRpcControllerFactory
[ERROR] 
:[57,46]
 cannot