Apache-Phoenix | 4.x-HBase-1.2 | Build Successful

2017-09-11 Thread Apache Jenkins Server
4.x-HBase-1.2 branch build status Successful

Source repository https://git-wip-us.apache.org/repos/asf?p=phoenix.git;a=shortlog;h=refs/heads/4.x-HBase-1.2

Compiled Artifacts https://builds.apache.org/job/Phoenix-4.x-HBase-1.2/lastSuccessfulBuild/artifact/

Test Report https://builds.apache.org/job/Phoenix-4.x-HBase-1.2/lastCompletedBuild/testReport/

Changes
[samarth] PHOENIX-4196 Remove SCN usage from ToNumberFunctionIT,



Build times for last couple of runsLatest build time is the right most | Legend blue: normal, red: test failure, gray: timeout


Apache-Phoenix | 4.x-HBase-1.1 | Build Successful

2017-09-11 Thread Apache Jenkins Server
4.x-HBase-1.1 branch build status Successful

Source repository https://git-wip-us.apache.org/repos/asf?p=phoenix.git;a=shortlog;h=refs/heads/4.x-HBase-1.1

Compiled Artifacts https://builds.apache.org/job/Phoenix-4.x-HBase-1.1/lastSuccessfulBuild/artifact/

Test Report https://builds.apache.org/job/Phoenix-4.x-HBase-1.1/lastCompletedBuild/testReport/

Changes
[samarth] PHOENIX-4196 Remove SCN usage from ToNumberFunctionIT,



Build times for last couple of runsLatest build time is the right most | Legend blue: normal, red: test failure, gray: timeout


Build failed in Jenkins: Phoenix | Master #1788

2017-09-11 Thread Apache Jenkins Server
See 


Changes:

[samarth] PHOENIX-4196 Remove SCN usage from ToNumberFunctionIT,

--
[...truncated 99.29 KB...]
[INFO] Running org.apache.phoenix.end2end.index.ChildViewsUseParentViewIndexIT
[INFO] Tests run: 245, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
1,608.567 s - in org.apache.phoenix.end2end.ClientTimeArithmeticQueryIT
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 7.446 s 
- in org.apache.phoenix.end2end.index.ChildViewsUseParentViewIndexIT
[INFO] Running org.apache.phoenix.end2end.index.GlobalIndexOptimizationIT
[INFO] Tests run: 112, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
673.085 s - in org.apache.phoenix.end2end.QueryIT
[INFO] Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 32.895 s 
- in org.apache.phoenix.end2end.index.GlobalIndexOptimizationIT
[INFO] Running org.apache.phoenix.end2end.index.IndexIT
[INFO] Tests run: 24, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 103.571 
s - in org.apache.phoenix.end2end.UpsertSelectIT
[INFO] Running org.apache.phoenix.end2end.index.IndexExpressionIT
[INFO] Running org.apache.phoenix.end2end.index.DropMetadataIT
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 9.343 s 
- in org.apache.phoenix.end2end.index.DropMetadataIT
[INFO] Running org.apache.phoenix.end2end.index.MutableIndexIT
[INFO] Running org.apache.phoenix.end2end.index.IndexMetadataIT
[INFO] Tests run: 112, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
673.451 s - in org.apache.phoenix.end2end.ScanQueryIT
[INFO] Tests run: 10, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 48.662 
s - in org.apache.phoenix.end2end.index.IndexMetadataIT
[INFO] Running org.apache.phoenix.end2end.index.MutableIndexSplitReverseScanIT
[INFO] Running org.apache.phoenix.end2end.index.MutableIndexSplitForwardScanIT
[INFO] Tests run: 12, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 242.713 
s - in org.apache.phoenix.end2end.UpgradeIT
[INFO] Running org.apache.phoenix.end2end.index.SaltedIndexIT
[INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 13.769 s 
- in org.apache.phoenix.end2end.index.SaltedIndexIT
[INFO] Running org.apache.phoenix.end2end.index.ViewIndexIT
[INFO] Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 47.146 s 
- in org.apache.phoenix.end2end.index.ViewIndexIT
[INFO] Running org.apache.phoenix.end2end.index.txn.MutableRollbackIT
[INFO] Tests run: 16, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 310.159 
s - in org.apache.phoenix.end2end.index.DropColumnIT
[INFO] Running org.apache.phoenix.end2end.index.txn.RollbackIT
[INFO] Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 69.17 s 
- in org.apache.phoenix.end2end.index.txn.MutableRollbackIT
[INFO] Running org.apache.phoenix.end2end.salted.SaltedTableUpsertSelectIT
[INFO] Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 27.943 s 
- in org.apache.phoenix.end2end.salted.SaltedTableUpsertSelectIT
[INFO] Running org.apache.phoenix.end2end.salted.SaltedTableVarLengthRowKeyIT
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.358 s 
- in org.apache.phoenix.end2end.salted.SaltedTableVarLengthRowKeyIT
[INFO] Running org.apache.phoenix.iterate.PhoenixQueryTimeoutIT
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 5.189 s 
- in org.apache.phoenix.iterate.PhoenixQueryTimeoutIT
[INFO] Running org.apache.phoenix.iterate.RoundRobinResultIteratorIT
[INFO] Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 50.385 s 
- in org.apache.phoenix.end2end.index.txn.RollbackIT
[INFO] Running org.apache.phoenix.replication.SystemCatalogWALEntryFilterIT
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.101 s 
- in org.apache.phoenix.replication.SystemCatalogWALEntryFilterIT
[INFO] Running org.apache.phoenix.rpc.UpdateCacheIT
[INFO] Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 25.742 s 
- in org.apache.phoenix.rpc.UpdateCacheIT
[INFO] Running org.apache.phoenix.trace.PhoenixTableMetricsWriterIT
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 11.389 s 
- in org.apache.phoenix.trace.PhoenixTableMetricsWriterIT
[INFO] Running org.apache.phoenix.trace.PhoenixTracingEndToEndIT
[INFO] Tests run: 9, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 51.963 s 
- in org.apache.phoenix.iterate.RoundRobinResultIteratorIT
[INFO] Running org.apache.phoenix.tx.FlappingTransactionIT
[INFO] Tests run: 67, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 411.016 
s - in org.apache.phoenix.end2end.index.IndexExpressionIT
[INFO] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 9.468 s 
- in org.apache.phoenix.tx.FlappingTransactionIT
[INFO] Running org.apache.phoenix.tx.TransactionIT
[INFO] Running org.apache.phoenix.tx.ParameterizedTransactionIT
[INFO] Tests run: 102, Failures: 

Apache-Phoenix | 4.x-HBase-1.2 | Build Successful

2017-09-11 Thread Apache Jenkins Server
4.x-HBase-1.2 branch build status Successful

Source repository https://git-wip-us.apache.org/repos/asf?p=phoenix.git;a=shortlog;h=refs/heads/4.x-HBase-1.2

Compiled Artifacts https://builds.apache.org/job/Phoenix-4.x-HBase-1.2/lastSuccessfulBuild/artifact/

Test Report https://builds.apache.org/job/Phoenix-4.x-HBase-1.2/lastCompletedBuild/testReport/

Changes
[tdsilva] PHOENIX-4186 Modify NativeHBaseTypesIT to not use CurrentSCN

[jtaylor] PHOENIX-4190 Salted local index failure is causing region server to

[jtaylor] PHOENIX-4182 DatabaseMetaData.getTables throws exception when getting



Build times for last couple of runsLatest build time is the right most | Legend blue: normal, red: test failure, gray: timeout


Jenkins build is back to normal : Phoenix-4.x-HBase-1.1 #574

2017-09-11 Thread Apache Jenkins Server
See 




Jenkins build is back to normal : Phoenix | Master #1787

2017-09-11 Thread Apache Jenkins Server
See 




phoenix git commit: PHOENIX-4196 Remove SCN usage from ToNumberFunctionIT, TruncateFunctionIT and UpdateCacheAcrossDifferentClientsIT

2017-09-11 Thread samarth
Repository: phoenix
Updated Branches:
  refs/heads/4.x-HBase-0.98 9d066eb6c -> 3aec050f7


PHOENIX-4196 Remove SCN usage from ToNumberFunctionIT, TruncateFunctionIT and 
UpdateCacheAcrossDifferentClientsIT


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

Branch: refs/heads/4.x-HBase-0.98
Commit: 3aec050f74438db87acc43b661059d217c916748
Parents: 9d066eb
Author: Samarth Jain 
Authored: Mon Sep 11 16:54:24 2017 -0700
Committer: Samarth Jain 
Committed: Mon Sep 11 16:54:24 2017 -0700

--
 .../phoenix/end2end/ToNumberFunctionIT.java | 273 +--
 .../phoenix/end2end/TruncateFunctionIT.java |  26 +-
 .../UpdateCacheAcrossDifferentClientsIT.java|  69 -
 3 files changed, 144 insertions(+), 224 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/3aec050f/phoenix-core/src/it/java/org/apache/phoenix/end2end/ToNumberFunctionIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ToNumberFunctionIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ToNumberFunctionIT.java
index 90b860b..3d025b6 100644
--- 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ToNumberFunctionIT.java
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ToNumberFunctionIT.java
@@ -17,7 +17,6 @@
  */
 package org.apache.phoenix.end2end;
 
-import static org.apache.phoenix.util.TestUtil.TEST_PROPERTIES;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
@@ -31,14 +30,10 @@ import java.sql.ResultSet;
 import java.sql.Time;
 import java.sql.Timestamp;
 import java.util.Locale;
-import java.util.Properties;
 
 import org.apache.phoenix.expression.function.ToNumberFunction;
 import org.apache.phoenix.schema.types.PDecimal;
-import org.apache.phoenix.util.PhoenixRuntime;
-import org.apache.phoenix.util.PropertiesUtil;
 import org.junit.AfterClass;
-import org.junit.Before;
 import org.junit.BeforeClass;
 import org.junit.Test;
 
@@ -50,36 +45,34 @@ import org.junit.Test;
  * @since 0.1
  */
 
-public class ToNumberFunctionIT extends BaseClientManagedTimeIT {
+public class ToNumberFunctionIT extends ParallelStatsDisabledIT {
 
 // This test changes to locale to en_US, and saves the previous locale here
 private static Locale saveLocale;
 
-public static final String TO_NUMBER_TABLE_NAME = "TO_NUMBER_TABLE";
-
-public static final String TO_NUMBER_TABLE_DDL = "create table " + 
TO_NUMBER_TABLE_NAME +
-"(a_id integer not null, \n" + 
-"a_string char(4) not null, \n" +
-"b_string char(4), \n" + 
-"a_date date, \n" + 
-"a_time date, \n" + 
-"a_timestamp timestamp \n" + 
-"CONSTRAINT my_pk PRIMARY KEY (a_id, a_string))";
-
-private Date row1Date;
-private Date row2Date;
-private Date row3Date;
-private Time row1Time;
-private Time row2Time;
-private Time row3Time;
-private Timestamp row1Timestamp;
-private Timestamp row2Timestamp;
-private Timestamp row3Timestamp;
+public static final String TO_NUMBER_TABLE_NAME = generateUniqueName();
+
+public static final String TO_NUMBER_TABLE_DDL =
+"create table " + TO_NUMBER_TABLE_NAME + "(a_id integer not null, 
\n"
++ "a_string char(4) not null, \n" + "b_string char(4), \n" 
+ "a_date date, \n"
++ "a_time date, \n" + "a_timestamp timestamp \n"
++ "CONSTRAINT my_pk PRIMARY KEY (a_id, a_string))";
+
+private static Date row1Date;
+private static Date row2Date;
+private static Date row3Date;
+private static Time row1Time;
+private static Time row2Time;
+private static Time row3Time;
+private static Timestamp row1Timestamp;
+private static Timestamp row2Timestamp;
+private static Timestamp row3Timestamp;
 
 @BeforeClass
-public static void setUpBeforeClass() {
+public static void setUpBeforeClass() throws Exception {
 saveLocale = Locale.getDefault();
 Locale.setDefault(Locale.US);
+initTable();
 }
 
 @AfterClass
@@ -87,218 +80,224 @@ public class ToNumberFunctionIT extends 
BaseClientManagedTimeIT {
 Locale.setDefault(saveLocale);
 }
 
-@Before
-public void initTable() throws Exception {
-long ts = nextTimestamp();
-createTestTable(getUrl(), TO_NUMBER_TABLE_DDL, null, ts-2);
-String url = getUrl() + ";" + PhoenixRuntime.CURRENT_SCN_ATTRIB + "=" 
+ ts;
-Properties props 

phoenix git commit: PHOENIX-4196 Remove SCN usage from ToNumberFunctionIT, TruncateFunctionIT and UpdateCacheAcrossDifferentClientsIT

2017-09-11 Thread samarth
Repository: phoenix
Updated Branches:
  refs/heads/4.x-HBase-1.1 2b78e48f4 -> ef6e5366d


PHOENIX-4196 Remove SCN usage from ToNumberFunctionIT, TruncateFunctionIT and 
UpdateCacheAcrossDifferentClientsIT


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

Branch: refs/heads/4.x-HBase-1.1
Commit: ef6e5366dc8b51135d5cacdfde119f3902246fc4
Parents: 2b78e48
Author: Samarth Jain 
Authored: Mon Sep 11 16:54:03 2017 -0700
Committer: Samarth Jain 
Committed: Mon Sep 11 16:54:03 2017 -0700

--
 .../phoenix/end2end/ToNumberFunctionIT.java | 273 +--
 .../phoenix/end2end/TruncateFunctionIT.java |  26 +-
 .../UpdateCacheAcrossDifferentClientsIT.java|  69 -
 3 files changed, 144 insertions(+), 224 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/ef6e5366/phoenix-core/src/it/java/org/apache/phoenix/end2end/ToNumberFunctionIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ToNumberFunctionIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ToNumberFunctionIT.java
index 90b860b..3d025b6 100644
--- 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ToNumberFunctionIT.java
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ToNumberFunctionIT.java
@@ -17,7 +17,6 @@
  */
 package org.apache.phoenix.end2end;
 
-import static org.apache.phoenix.util.TestUtil.TEST_PROPERTIES;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
@@ -31,14 +30,10 @@ import java.sql.ResultSet;
 import java.sql.Time;
 import java.sql.Timestamp;
 import java.util.Locale;
-import java.util.Properties;
 
 import org.apache.phoenix.expression.function.ToNumberFunction;
 import org.apache.phoenix.schema.types.PDecimal;
-import org.apache.phoenix.util.PhoenixRuntime;
-import org.apache.phoenix.util.PropertiesUtil;
 import org.junit.AfterClass;
-import org.junit.Before;
 import org.junit.BeforeClass;
 import org.junit.Test;
 
@@ -50,36 +45,34 @@ import org.junit.Test;
  * @since 0.1
  */
 
-public class ToNumberFunctionIT extends BaseClientManagedTimeIT {
+public class ToNumberFunctionIT extends ParallelStatsDisabledIT {
 
 // This test changes to locale to en_US, and saves the previous locale here
 private static Locale saveLocale;
 
-public static final String TO_NUMBER_TABLE_NAME = "TO_NUMBER_TABLE";
-
-public static final String TO_NUMBER_TABLE_DDL = "create table " + 
TO_NUMBER_TABLE_NAME +
-"(a_id integer not null, \n" + 
-"a_string char(4) not null, \n" +
-"b_string char(4), \n" + 
-"a_date date, \n" + 
-"a_time date, \n" + 
-"a_timestamp timestamp \n" + 
-"CONSTRAINT my_pk PRIMARY KEY (a_id, a_string))";
-
-private Date row1Date;
-private Date row2Date;
-private Date row3Date;
-private Time row1Time;
-private Time row2Time;
-private Time row3Time;
-private Timestamp row1Timestamp;
-private Timestamp row2Timestamp;
-private Timestamp row3Timestamp;
+public static final String TO_NUMBER_TABLE_NAME = generateUniqueName();
+
+public static final String TO_NUMBER_TABLE_DDL =
+"create table " + TO_NUMBER_TABLE_NAME + "(a_id integer not null, 
\n"
++ "a_string char(4) not null, \n" + "b_string char(4), \n" 
+ "a_date date, \n"
++ "a_time date, \n" + "a_timestamp timestamp \n"
++ "CONSTRAINT my_pk PRIMARY KEY (a_id, a_string))";
+
+private static Date row1Date;
+private static Date row2Date;
+private static Date row3Date;
+private static Time row1Time;
+private static Time row2Time;
+private static Time row3Time;
+private static Timestamp row1Timestamp;
+private static Timestamp row2Timestamp;
+private static Timestamp row3Timestamp;
 
 @BeforeClass
-public static void setUpBeforeClass() {
+public static void setUpBeforeClass() throws Exception {
 saveLocale = Locale.getDefault();
 Locale.setDefault(Locale.US);
+initTable();
 }
 
 @AfterClass
@@ -87,218 +80,224 @@ public class ToNumberFunctionIT extends 
BaseClientManagedTimeIT {
 Locale.setDefault(saveLocale);
 }
 
-@Before
-public void initTable() throws Exception {
-long ts = nextTimestamp();
-createTestTable(getUrl(), TO_NUMBER_TABLE_DDL, null, ts-2);
-String url = getUrl() + ";" + PhoenixRuntime.CURRENT_SCN_ATTRIB + "=" 
+ ts;
-Properties props = 

phoenix git commit: PHOENIX-4196 Remove SCN usage from ToNumberFunctionIT, TruncateFunctionIT and UpdateCacheAcrossDifferentClientsIT

2017-09-11 Thread samarth
Repository: phoenix
Updated Branches:
  refs/heads/4.x-HBase-1.2 a6f1b6369 -> 149eddcdc


PHOENIX-4196 Remove SCN usage from ToNumberFunctionIT, TruncateFunctionIT and 
UpdateCacheAcrossDifferentClientsIT


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

Branch: refs/heads/4.x-HBase-1.2
Commit: 149eddcdcbfa9661fe0e67ecb30486f23d9ea771
Parents: a6f1b63
Author: Samarth Jain 
Authored: Mon Sep 11 16:53:42 2017 -0700
Committer: Samarth Jain 
Committed: Mon Sep 11 16:53:42 2017 -0700

--
 .../phoenix/end2end/ToNumberFunctionIT.java | 273 +--
 .../phoenix/end2end/TruncateFunctionIT.java |  26 +-
 .../UpdateCacheAcrossDifferentClientsIT.java|  69 -
 3 files changed, 144 insertions(+), 224 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/149eddcd/phoenix-core/src/it/java/org/apache/phoenix/end2end/ToNumberFunctionIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ToNumberFunctionIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ToNumberFunctionIT.java
index 90b860b..3d025b6 100644
--- 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ToNumberFunctionIT.java
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ToNumberFunctionIT.java
@@ -17,7 +17,6 @@
  */
 package org.apache.phoenix.end2end;
 
-import static org.apache.phoenix.util.TestUtil.TEST_PROPERTIES;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
@@ -31,14 +30,10 @@ import java.sql.ResultSet;
 import java.sql.Time;
 import java.sql.Timestamp;
 import java.util.Locale;
-import java.util.Properties;
 
 import org.apache.phoenix.expression.function.ToNumberFunction;
 import org.apache.phoenix.schema.types.PDecimal;
-import org.apache.phoenix.util.PhoenixRuntime;
-import org.apache.phoenix.util.PropertiesUtil;
 import org.junit.AfterClass;
-import org.junit.Before;
 import org.junit.BeforeClass;
 import org.junit.Test;
 
@@ -50,36 +45,34 @@ import org.junit.Test;
  * @since 0.1
  */
 
-public class ToNumberFunctionIT extends BaseClientManagedTimeIT {
+public class ToNumberFunctionIT extends ParallelStatsDisabledIT {
 
 // This test changes to locale to en_US, and saves the previous locale here
 private static Locale saveLocale;
 
-public static final String TO_NUMBER_TABLE_NAME = "TO_NUMBER_TABLE";
-
-public static final String TO_NUMBER_TABLE_DDL = "create table " + 
TO_NUMBER_TABLE_NAME +
-"(a_id integer not null, \n" + 
-"a_string char(4) not null, \n" +
-"b_string char(4), \n" + 
-"a_date date, \n" + 
-"a_time date, \n" + 
-"a_timestamp timestamp \n" + 
-"CONSTRAINT my_pk PRIMARY KEY (a_id, a_string))";
-
-private Date row1Date;
-private Date row2Date;
-private Date row3Date;
-private Time row1Time;
-private Time row2Time;
-private Time row3Time;
-private Timestamp row1Timestamp;
-private Timestamp row2Timestamp;
-private Timestamp row3Timestamp;
+public static final String TO_NUMBER_TABLE_NAME = generateUniqueName();
+
+public static final String TO_NUMBER_TABLE_DDL =
+"create table " + TO_NUMBER_TABLE_NAME + "(a_id integer not null, 
\n"
++ "a_string char(4) not null, \n" + "b_string char(4), \n" 
+ "a_date date, \n"
++ "a_time date, \n" + "a_timestamp timestamp \n"
++ "CONSTRAINT my_pk PRIMARY KEY (a_id, a_string))";
+
+private static Date row1Date;
+private static Date row2Date;
+private static Date row3Date;
+private static Time row1Time;
+private static Time row2Time;
+private static Time row3Time;
+private static Timestamp row1Timestamp;
+private static Timestamp row2Timestamp;
+private static Timestamp row3Timestamp;
 
 @BeforeClass
-public static void setUpBeforeClass() {
+public static void setUpBeforeClass() throws Exception {
 saveLocale = Locale.getDefault();
 Locale.setDefault(Locale.US);
+initTable();
 }
 
 @AfterClass
@@ -87,218 +80,224 @@ public class ToNumberFunctionIT extends 
BaseClientManagedTimeIT {
 Locale.setDefault(saveLocale);
 }
 
-@Before
-public void initTable() throws Exception {
-long ts = nextTimestamp();
-createTestTable(getUrl(), TO_NUMBER_TABLE_DDL, null, ts-2);
-String url = getUrl() + ";" + PhoenixRuntime.CURRENT_SCN_ATTRIB + "=" 
+ ts;
-Properties props = 

phoenix git commit: PHOENIX-4196 Remove SCN usage from ToNumberFunctionIT, TruncateFunctionIT and UpdateCacheAcrossDifferentClientsIT

2017-09-11 Thread samarth
Repository: phoenix
Updated Branches:
  refs/heads/master 9e5cd3ffe -> 1d4025a57


PHOENIX-4196 Remove SCN usage from ToNumberFunctionIT, TruncateFunctionIT and 
UpdateCacheAcrossDifferentClientsIT


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

Branch: refs/heads/master
Commit: 1d4025a57daedeebb64ef735b1055ebc9c6b2131
Parents: 9e5cd3f
Author: Samarth Jain 
Authored: Mon Sep 11 16:53:16 2017 -0700
Committer: Samarth Jain 
Committed: Mon Sep 11 16:53:16 2017 -0700

--
 .../phoenix/end2end/ToNumberFunctionIT.java | 273 +--
 .../phoenix/end2end/TruncateFunctionIT.java |  26 +-
 .../UpdateCacheAcrossDifferentClientsIT.java|  69 -
 3 files changed, 144 insertions(+), 224 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/1d4025a5/phoenix-core/src/it/java/org/apache/phoenix/end2end/ToNumberFunctionIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ToNumberFunctionIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ToNumberFunctionIT.java
index 90b860b..3d025b6 100644
--- 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ToNumberFunctionIT.java
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ToNumberFunctionIT.java
@@ -17,7 +17,6 @@
  */
 package org.apache.phoenix.end2end;
 
-import static org.apache.phoenix.util.TestUtil.TEST_PROPERTIES;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
@@ -31,14 +30,10 @@ import java.sql.ResultSet;
 import java.sql.Time;
 import java.sql.Timestamp;
 import java.util.Locale;
-import java.util.Properties;
 
 import org.apache.phoenix.expression.function.ToNumberFunction;
 import org.apache.phoenix.schema.types.PDecimal;
-import org.apache.phoenix.util.PhoenixRuntime;
-import org.apache.phoenix.util.PropertiesUtil;
 import org.junit.AfterClass;
-import org.junit.Before;
 import org.junit.BeforeClass;
 import org.junit.Test;
 
@@ -50,36 +45,34 @@ import org.junit.Test;
  * @since 0.1
  */
 
-public class ToNumberFunctionIT extends BaseClientManagedTimeIT {
+public class ToNumberFunctionIT extends ParallelStatsDisabledIT {
 
 // This test changes to locale to en_US, and saves the previous locale here
 private static Locale saveLocale;
 
-public static final String TO_NUMBER_TABLE_NAME = "TO_NUMBER_TABLE";
-
-public static final String TO_NUMBER_TABLE_DDL = "create table " + 
TO_NUMBER_TABLE_NAME +
-"(a_id integer not null, \n" + 
-"a_string char(4) not null, \n" +
-"b_string char(4), \n" + 
-"a_date date, \n" + 
-"a_time date, \n" + 
-"a_timestamp timestamp \n" + 
-"CONSTRAINT my_pk PRIMARY KEY (a_id, a_string))";
-
-private Date row1Date;
-private Date row2Date;
-private Date row3Date;
-private Time row1Time;
-private Time row2Time;
-private Time row3Time;
-private Timestamp row1Timestamp;
-private Timestamp row2Timestamp;
-private Timestamp row3Timestamp;
+public static final String TO_NUMBER_TABLE_NAME = generateUniqueName();
+
+public static final String TO_NUMBER_TABLE_DDL =
+"create table " + TO_NUMBER_TABLE_NAME + "(a_id integer not null, 
\n"
++ "a_string char(4) not null, \n" + "b_string char(4), \n" 
+ "a_date date, \n"
++ "a_time date, \n" + "a_timestamp timestamp \n"
++ "CONSTRAINT my_pk PRIMARY KEY (a_id, a_string))";
+
+private static Date row1Date;
+private static Date row2Date;
+private static Date row3Date;
+private static Time row1Time;
+private static Time row2Time;
+private static Time row3Time;
+private static Timestamp row1Timestamp;
+private static Timestamp row2Timestamp;
+private static Timestamp row3Timestamp;
 
 @BeforeClass
-public static void setUpBeforeClass() {
+public static void setUpBeforeClass() throws Exception {
 saveLocale = Locale.getDefault();
 Locale.setDefault(Locale.US);
+initTable();
 }
 
 @AfterClass
@@ -87,218 +80,224 @@ public class ToNumberFunctionIT extends 
BaseClientManagedTimeIT {
 Locale.setDefault(saveLocale);
 }
 
-@Before
-public void initTable() throws Exception {
-long ts = nextTimestamp();
-createTestTable(getUrl(), TO_NUMBER_TABLE_DDL, null, ts-2);
-String url = getUrl() + ";" + PhoenixRuntime.CURRENT_SCN_ATTRIB + "=" 
+ ts;
-Properties props = 

Build failed in Jenkins: Phoenix-4.x-HBase-1.1 #573

2017-09-11 Thread Apache Jenkins Server
See 


Changes:

[tdsilva] PHOENIX-4186 Modify NativeHBaseTypesIT to not use CurrentSCN

--
[...truncated 106.38 KB...]
[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
[INFO] Running org.apache.phoenix.end2end.ConnectionUtilIT
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 37.786 s 
- in 
org.apache.hadoop.hbase.regionserver.wal.WALReplayWithIndexWritesAndCompressedWALIT
[INFO] Running 
org.apache.hadoop.hbase.regionserver.wal.WALRecoveryRegionPostOpenIT
[INFO] Running org.apache.phoenix.end2end.ArrayIT
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 6.437 s 
- in org.apache.hadoop.hbase.regionserver.wal.WALRecoveryRegionPostOpenIT
[INFO] Running org.apache.phoenix.end2end.CountDistinctCompressionIT
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 22.851 s 
- in org.apache.phoenix.end2end.ConnectionUtilIT
[INFO] Running org.apache.phoenix.end2end.ContextClassloaderIT
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.562 s 
- in org.apache.phoenix.end2end.CountDistinctCompressionIT
[INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.577 s 
- in org.apache.phoenix.end2end.ContextClassloaderIT
[INFO] Running org.apache.phoenix.end2end.CsvBulkLoadToolIT
[INFO] Running org.apache.phoenix.end2end.FlappingLocalIndexIT
[INFO] Running org.apache.phoenix.end2end.IndexExtendedIT
[INFO] Running 
org.apache.phoenix.end2end.IndexToolForPartialBuildWithNamespaceEnabledIT
[INFO] Running org.apache.phoenix.end2end.IndexToolForPartialBuildIT
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 23.587 s 
- in org.apache.phoenix.end2end.IndexToolForPartialBuildWithNamespaceEnabledIT
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 23.103 s 
- in org.apache.phoenix.end2end.IndexToolForPartialBuildIT
[INFO] Tests run: 12, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 70.646 
s - in org.apache.phoenix.end2end.CsvBulkLoadToolIT
[INFO] Running org.apache.phoenix.end2end.QueryTimeoutIT
[INFO] Running org.apache.phoenix.end2end.QueryWithLimitIT
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 3.107 s 
- in org.apache.phoenix.end2end.QueryWithLimitIT
[INFO] Running org.apache.phoenix.end2end.RebuildIndexConnectionPropsIT
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.469 s 
- in org.apache.phoenix.end2end.RebuildIndexConnectionPropsIT
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 16.905 s 
- in org.apache.phoenix.end2end.QueryTimeoutIT
[INFO] Tests run: 80, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 154.16 
s - in org.apache.phoenix.end2end.ArrayIT
[INFO] Running org.apache.phoenix.end2end.RegexBulkLoadToolIT
[INFO] Tests run: 12, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 129.154 
s - in org.apache.phoenix.end2end.FlappingLocalIndexIT
[INFO] Running org.apache.phoenix.end2end.RenewLeaseIT
[INFO] Running org.apache.phoenix.end2end.StatsCollectorIT
[INFO] Running org.apache.phoenix.end2end.SpillableGroupByIT
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 6.824 s 
- in org.apache.phoenix.end2end.SpillableGroupByIT
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 25.408 s 
- in org.apache.phoenix.end2end.RenewLeaseIT
[INFO] Running 
org.apache.phoenix.end2end.SysTableNamespaceMappedStatsCollectorIT
[INFO] Tests run: 10, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 65.317 
s - in org.apache.phoenix.end2end.RegexBulkLoadToolIT
[INFO] Running org.apache.phoenix.end2end.TableSnapshotReadsMapReduceIT
[INFO] Running org.apache.phoenix.end2end.UpdateCacheAcrossDifferentClientsIT
[INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 15.189 s 
- in org.apache.phoenix.end2end.TableSnapshotReadsMapReduceIT
[INFO] Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 26.769 s 
- in org.apache.phoenix.end2end.UpdateCacheAcrossDifferentClientsIT
[INFO] Running org.apache.phoenix.end2end.UserDefinedFunctionsIT
[INFO] Running org.apache.phoenix.end2end.index.ImmutableIndexIT
[INFO] Running org.apache.phoenix.end2end.index.LocalIndexIT
[INFO] Tests run: 14, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 39.269 
s - in org.apache.phoenix.end2end.UserDefinedFunctionsIT
[INFO] Running org.apache.phoenix.end2end.index.MutableIndexFailureIT
[WARNING] 

[1/3] phoenix git commit: PHOENIX-4192 Remove unnecessary cast in TestPropertyPolicy

2017-09-11 Thread jamestaylor
Repository: phoenix
Updated Branches:
  refs/heads/master 7e45e9ea1 -> 9e5cd3ffe


PHOENIX-4192 Remove unnecessary cast in TestPropertyPolicy


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

Branch: refs/heads/master
Commit: 63b71caadaeb7bebf66c20fb3a1ddc7c3adbff13
Parents: 7e45e9e
Author: James Taylor 
Authored: Mon Sep 11 11:53:36 2017 -0700
Committer: James Taylor 
Committed: Mon Sep 11 14:53:25 2017 -0700

--
 .../test/java/org/apache/phoenix/query/TestPropertyPolicy.java | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/63b71caa/phoenix-core/src/test/java/org/apache/phoenix/query/TestPropertyPolicy.java
--
diff --git 
a/phoenix-core/src/test/java/org/apache/phoenix/query/TestPropertyPolicy.java 
b/phoenix-core/src/test/java/org/apache/phoenix/query/TestPropertyPolicy.java
index 8573bff..1835437 100644
--- 
a/phoenix-core/src/test/java/org/apache/phoenix/query/TestPropertyPolicy.java
+++ 
b/phoenix-core/src/test/java/org/apache/phoenix/query/TestPropertyPolicy.java
@@ -17,14 +17,14 @@
  */
 package org.apache.phoenix.query;
 
-import org.apache.hadoop.conf.Configuration;
+import static java.util.Arrays.asList;
 
 import java.util.Collections;
 import java.util.HashSet;
 import java.util.Properties;
 import java.util.Set;
 
-import static java.util.Arrays.asList;
+import org.apache.hadoop.conf.Configuration;
 
 /**
  * Configuration factory that populates an {@link Configuration} with static 
and runtime
@@ -39,7 +39,7 @@ public class TestPropertyPolicy implements PropertyPolicy {
 
 for (Object k : properties.keySet()) {
   if (propertiesKeyDisAllowed.contains(k))
-offendingProperties.put((String) k, properties.getProperty((String) 
k));
+offendingProperties.put(k, properties.getProperty((String) k));
 }
 
 if (offendingProperties.size() > 0) throw new 
PropertyNotAllowedException(offendingProperties);



[3/3] phoenix git commit: PHOENIX-4190 Salted local index failure is causing region server to abort

2017-09-11 Thread jamestaylor
PHOENIX-4190 Salted local index failure is causing region server to abort


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

Branch: refs/heads/master
Commit: 9e5cd3ffe20779be9b1f3a8a5d28a0b05d664236
Parents: 3392fa6
Author: James Taylor 
Authored: Mon Sep 11 12:21:50 2017 -0700
Committer: James Taylor 
Committed: Mon Sep 11 14:53:55 2017 -0700

--
 .../main/java/org/apache/phoenix/index/IndexMaintainer.java   | 2 +-
 .../org/apache/phoenix/index/PhoenixIndexFailurePolicy.java   | 7 ++-
 2 files changed, 7 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/9e5cd3ff/phoenix-core/src/main/java/org/apache/phoenix/index/IndexMaintainer.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/index/IndexMaintainer.java 
b/phoenix-core/src/main/java/org/apache/phoenix/index/IndexMaintainer.java
index 840d535..c5c3dda 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/index/IndexMaintainer.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/index/IndexMaintainer.java
@@ -784,7 +784,7 @@ public class IndexMaintainer implements Writable, 
Iterable {
 assert (isLocalIndex);
 ImmutableBytesPtr ptr =
 new ImmutableBytesPtr(indexRowKeyPtr.get(),( 
indexRowKeyPtr.getOffset()
-+ (nIndexSaltBuckets > 0 ? 1 : 0)), 
viewIndexId.length);
++ (!isLocalIndex && nIndexSaltBuckets > 0 ? 1 : 0)), 
viewIndexId.length);
 return ptr.copyBytesIfNecessary();
 }
 

http://git-wip-us.apache.org/repos/asf/phoenix/blob/9e5cd3ff/phoenix-core/src/main/java/org/apache/phoenix/index/PhoenixIndexFailurePolicy.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/index/PhoenixIndexFailurePolicy.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/index/PhoenixIndexFailurePolicy.java
index c91e36e..671e3ef 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/index/PhoenixIndexFailurePolicy.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/index/PhoenixIndexFailurePolicy.java
@@ -39,6 +39,7 @@ import org.apache.hadoop.hbase.client.HTableInterface;
 import org.apache.hadoop.hbase.client.Mutation;
 import org.apache.hadoop.hbase.coprocessor.RegionCoprocessorEnvironment;
 import org.apache.hadoop.hbase.io.ImmutableBytesWritable;
+import org.apache.hadoop.hbase.util.Bytes;
 import org.apache.phoenix.coprocessor.MetaDataProtocol.MetaDataMutationResult;
 import org.apache.phoenix.coprocessor.MetaDataProtocol.MutationCode;
 import org.apache.phoenix.hbase.index.table.HTableInterfaceReference;
@@ -288,7 +289,11 @@ public class PhoenixIndexFailurePolicy extends 
DelegateIndexFailurePolicy {
 new ImmutableBytesWritable(mutation.getRow(), 
offset,
 mutation.getRow().length - offset));
 String indexTableName = localIndexNames.get(new 
ImmutableBytesWritable(viewId));
-indexTableNames.add(indexTableName);
+if (indexTableName == null) {
+LOG.error("Unable to find local index on " + 
ref.getTableName() + " with viewID of " + Bytes.toStringBinary(viewId));
+} else {
+indexTableNames.add(indexTableName);
+}
 }
 } catch (ClassNotFoundException e) {
 throw new IOException(e);



[2/3] phoenix git commit: PHOENIX-4182 DatabaseMetaData.getTables throws exception when getting SEQUENCE information

2017-09-11 Thread jamestaylor
PHOENIX-4182 DatabaseMetaData.getTables throws exception when getting SEQUENCE 
information


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

Branch: refs/heads/master
Commit: 3392fa6fc2b8b0eb5ce683fb8bad4a421110b817
Parents: 63b71ca
Author: James Taylor 
Authored: Mon Sep 11 13:06:17 2017 -0700
Committer: James Taylor 
Committed: Mon Sep 11 14:53:36 2017 -0700

--
 .../phoenix/end2end/QueryDatabaseMetaDataIT.java  | 13 +
 .../apache/phoenix/jdbc/PhoenixDatabaseMetaData.java  | 14 --
 2 files changed, 21 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/3392fa6f/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryDatabaseMetaDataIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryDatabaseMetaDataIT.java
 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryDatabaseMetaDataIT.java
index 44012b9..12c0bd3 100644
--- 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryDatabaseMetaDataIT.java
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryDatabaseMetaDataIT.java
@@ -275,6 +275,19 @@ public class QueryDatabaseMetaDataIT extends 
BaseClientManagedTimeIT {
 assertEquals("BAS", rs.getString("TABLE_NAME"));
 assertEquals(PTableType.TABLE.toString(), rs.getString("TABLE_TYPE"));
 assertFalse(rs.next());
+
+rs = dbmd.getTables(null, "B", null, new String[] 
{PhoenixDatabaseMetaData.SEQUENCE_TABLE_TYPE});
+assertTrue(rs.next());
+assertNull(rs.getString("TABLE_CAT"));
+assertEquals("B", rs.getString("TABLE_SCHEM"));
+assertEquals("S1", rs.getString("TABLE_NAME"));
+assertEquals(PhoenixDatabaseMetaData.SEQUENCE_TABLE_TYPE, 
rs.getString("TABLE_TYPE"));
+assertTrue(rs.next());
+assertNull(rs.getString("TABLE_CAT"));
+assertEquals("B", rs.getString("TABLE_SCHEM"));
+assertEquals("S3", rs.getString("TABLE_NAME"));
+assertEquals(PhoenixDatabaseMetaData.SEQUENCE_TABLE_TYPE, 
rs.getString("TABLE_TYPE"));
+assertFalse(rs.next());
 }
 
 @Test

http://git-wip-us.apache.org/repos/asf/phoenix/blob/3392fa6f/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixDatabaseMetaData.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixDatabaseMetaData.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixDatabaseMetaData.java
index 24bfde7..ac7f3ef 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixDatabaseMetaData.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixDatabaseMetaData.java
@@ -1031,10 +1031,10 @@ public class PhoenixDatabaseMetaData implements 
DatabaseMetaData {
 public Integer getScale() {
 return null;
 }
-   @Override
-   public SortOrder getSortOrder() {
-   return SortOrder.getDefault();
-   }
+@Override
+public SortOrder getSortOrder() {
+return SortOrder.getDefault();
+}
 };
 private static final RowProjector TABLE_TYPE_ROW_PROJECTOR = new 
RowProjector(Arrays.asList(
 new ExpressionProjector(TABLE_TYPE, SYSTEM_CATALOG,
@@ -1160,10 +1160,12 @@ public class PhoenixDatabaseMetaData implements 
DatabaseMetaData {
 StringBuilder whereClause = new StringBuilder();
 addTenantIdFilter(whereClause, catalog);
 if (schemaPattern != null) {
-whereClause.append(" and " + SEQUENCE_SCHEMA + 
(schemaPattern.length() == 0 ? " is null" : " like '" + 
StringUtil.escapeStringConstant(schemaPattern) + "'\n" ));
+appendConjunction(whereClause);
+whereClause.append(SEQUENCE_SCHEMA + (schemaPattern.length() 
== 0 ? " is null" : " like '" + StringUtil.escapeStringConstant(schemaPattern) 
+ "'\n" ));
 }
 if (tableNamePattern != null) {
-whereClause.append(" and " + SEQUENCE_NAME + " like '" + 
StringUtil.escapeStringConstant(tableNamePattern) + "'\n" );
+appendConjunction(whereClause);
+whereClause.append(SEQUENCE_NAME + " like '" + 
StringUtil.escapeStringConstant(tableNamePattern) + "'\n" );
 }
 if (whereClause.length() > 0) {
 buf.append(" where\n");



[2/3] phoenix git commit: PHOENIX-4190 Salted local index failure is causing region server to abort

2017-09-11 Thread jamestaylor
PHOENIX-4190 Salted local index failure is causing region server to abort


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

Branch: refs/heads/4.x-HBase-0.98
Commit: 78031ba4b5fe3585dd6c2dfc936a1917b757662f
Parents: d0f4904
Author: James Taylor 
Authored: Mon Sep 11 12:21:50 2017 -0700
Committer: James Taylor 
Committed: Mon Sep 11 14:51:36 2017 -0700

--
 .../main/java/org/apache/phoenix/index/IndexMaintainer.java   | 2 +-
 .../org/apache/phoenix/index/PhoenixIndexFailurePolicy.java   | 7 ++-
 2 files changed, 7 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/78031ba4/phoenix-core/src/main/java/org/apache/phoenix/index/IndexMaintainer.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/index/IndexMaintainer.java 
b/phoenix-core/src/main/java/org/apache/phoenix/index/IndexMaintainer.java
index 840d535..c5c3dda 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/index/IndexMaintainer.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/index/IndexMaintainer.java
@@ -784,7 +784,7 @@ public class IndexMaintainer implements Writable, 
Iterable {
 assert (isLocalIndex);
 ImmutableBytesPtr ptr =
 new ImmutableBytesPtr(indexRowKeyPtr.get(),( 
indexRowKeyPtr.getOffset()
-+ (nIndexSaltBuckets > 0 ? 1 : 0)), 
viewIndexId.length);
++ (!isLocalIndex && nIndexSaltBuckets > 0 ? 1 : 0)), 
viewIndexId.length);
 return ptr.copyBytesIfNecessary();
 }
 

http://git-wip-us.apache.org/repos/asf/phoenix/blob/78031ba4/phoenix-core/src/main/java/org/apache/phoenix/index/PhoenixIndexFailurePolicy.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/index/PhoenixIndexFailurePolicy.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/index/PhoenixIndexFailurePolicy.java
index c91e36e..671e3ef 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/index/PhoenixIndexFailurePolicy.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/index/PhoenixIndexFailurePolicy.java
@@ -39,6 +39,7 @@ import org.apache.hadoop.hbase.client.HTableInterface;
 import org.apache.hadoop.hbase.client.Mutation;
 import org.apache.hadoop.hbase.coprocessor.RegionCoprocessorEnvironment;
 import org.apache.hadoop.hbase.io.ImmutableBytesWritable;
+import org.apache.hadoop.hbase.util.Bytes;
 import org.apache.phoenix.coprocessor.MetaDataProtocol.MetaDataMutationResult;
 import org.apache.phoenix.coprocessor.MetaDataProtocol.MutationCode;
 import org.apache.phoenix.hbase.index.table.HTableInterfaceReference;
@@ -288,7 +289,11 @@ public class PhoenixIndexFailurePolicy extends 
DelegateIndexFailurePolicy {
 new ImmutableBytesWritable(mutation.getRow(), 
offset,
 mutation.getRow().length - offset));
 String indexTableName = localIndexNames.get(new 
ImmutableBytesWritable(viewId));
-indexTableNames.add(indexTableName);
+if (indexTableName == null) {
+LOG.error("Unable to find local index on " + 
ref.getTableName() + " with viewID of " + Bytes.toStringBinary(viewId));
+} else {
+indexTableNames.add(indexTableName);
+}
 }
 } catch (ClassNotFoundException e) {
 throw new IOException(e);



[3/3] phoenix git commit: PHOENIX-4182 DatabaseMetaData.getTables throws exception when getting SEQUENCE information

2017-09-11 Thread jamestaylor
PHOENIX-4182 DatabaseMetaData.getTables throws exception when getting SEQUENCE 
information


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

Branch: refs/heads/4.x-HBase-0.98
Commit: 9d066eb6c56bbd075d8e8287fe2cf10a3334b00e
Parents: 78031ba
Author: James Taylor 
Authored: Mon Sep 11 13:06:17 2017 -0700
Committer: James Taylor 
Committed: Mon Sep 11 14:51:40 2017 -0700

--
 .../phoenix/end2end/QueryDatabaseMetaDataIT.java  | 13 +
 .../apache/phoenix/jdbc/PhoenixDatabaseMetaData.java  | 14 --
 2 files changed, 21 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/9d066eb6/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryDatabaseMetaDataIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryDatabaseMetaDataIT.java
 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryDatabaseMetaDataIT.java
index 44012b9..12c0bd3 100644
--- 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryDatabaseMetaDataIT.java
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryDatabaseMetaDataIT.java
@@ -275,6 +275,19 @@ public class QueryDatabaseMetaDataIT extends 
BaseClientManagedTimeIT {
 assertEquals("BAS", rs.getString("TABLE_NAME"));
 assertEquals(PTableType.TABLE.toString(), rs.getString("TABLE_TYPE"));
 assertFalse(rs.next());
+
+rs = dbmd.getTables(null, "B", null, new String[] 
{PhoenixDatabaseMetaData.SEQUENCE_TABLE_TYPE});
+assertTrue(rs.next());
+assertNull(rs.getString("TABLE_CAT"));
+assertEquals("B", rs.getString("TABLE_SCHEM"));
+assertEquals("S1", rs.getString("TABLE_NAME"));
+assertEquals(PhoenixDatabaseMetaData.SEQUENCE_TABLE_TYPE, 
rs.getString("TABLE_TYPE"));
+assertTrue(rs.next());
+assertNull(rs.getString("TABLE_CAT"));
+assertEquals("B", rs.getString("TABLE_SCHEM"));
+assertEquals("S3", rs.getString("TABLE_NAME"));
+assertEquals(PhoenixDatabaseMetaData.SEQUENCE_TABLE_TYPE, 
rs.getString("TABLE_TYPE"));
+assertFalse(rs.next());
 }
 
 @Test

http://git-wip-us.apache.org/repos/asf/phoenix/blob/9d066eb6/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixDatabaseMetaData.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixDatabaseMetaData.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixDatabaseMetaData.java
index 9acec96..9e218d6 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixDatabaseMetaData.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixDatabaseMetaData.java
@@ -1031,10 +1031,10 @@ public class PhoenixDatabaseMetaData implements 
DatabaseMetaData {
 public Integer getScale() {
 return null;
 }
-   @Override
-   public SortOrder getSortOrder() {
-   return SortOrder.getDefault();
-   }
+@Override
+public SortOrder getSortOrder() {
+return SortOrder.getDefault();
+}
 };
 private static final RowProjector TABLE_TYPE_ROW_PROJECTOR = new 
RowProjector(Arrays.asList(
 new ExpressionProjector(TABLE_TYPE, SYSTEM_CATALOG,
@@ -1161,10 +1161,12 @@ public class PhoenixDatabaseMetaData implements 
DatabaseMetaData {
 StringBuilder whereClause = new StringBuilder();
 addTenantIdFilter(whereClause, catalog);
 if (schemaPattern != null) {
-whereClause.append(" and " + SEQUENCE_SCHEMA + 
(schemaPattern.length() == 0 ? " is null" : " like '" + 
StringUtil.escapeStringConstant(schemaPattern) + "'\n" ));
+appendConjunction(whereClause);
+whereClause.append(SEQUENCE_SCHEMA + (schemaPattern.length() 
== 0 ? " is null" : " like '" + StringUtil.escapeStringConstant(schemaPattern) 
+ "'\n" ));
 }
 if (tableNamePattern != null) {
-whereClause.append(" and " + SEQUENCE_NAME + " like '" + 
StringUtil.escapeStringConstant(tableNamePattern) + "'\n" );
+appendConjunction(whereClause);
+whereClause.append(SEQUENCE_NAME + " like '" + 
StringUtil.escapeStringConstant(tableNamePattern) + "'\n" );
 }
 if (whereClause.length() > 0) {
 buf.append(" where\n");



[3/3] phoenix git commit: PHOENIX-4182 DatabaseMetaData.getTables throws exception when getting SEQUENCE information

2017-09-11 Thread jamestaylor
PHOENIX-4182 DatabaseMetaData.getTables throws exception when getting SEQUENCE 
information


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

Branch: refs/heads/4.x-HBase-1.1
Commit: 2b78e48f41f82971af5a8934073b111eb7dde1d4
Parents: 1c4e09f
Author: James Taylor 
Authored: Mon Sep 11 13:06:17 2017 -0700
Committer: James Taylor 
Committed: Mon Sep 11 14:49:57 2017 -0700

--
 .../phoenix/end2end/QueryDatabaseMetaDataIT.java  | 13 +
 .../apache/phoenix/jdbc/PhoenixDatabaseMetaData.java  | 14 --
 2 files changed, 21 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/2b78e48f/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryDatabaseMetaDataIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryDatabaseMetaDataIT.java
 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryDatabaseMetaDataIT.java
index 44012b9..12c0bd3 100644
--- 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryDatabaseMetaDataIT.java
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryDatabaseMetaDataIT.java
@@ -275,6 +275,19 @@ public class QueryDatabaseMetaDataIT extends 
BaseClientManagedTimeIT {
 assertEquals("BAS", rs.getString("TABLE_NAME"));
 assertEquals(PTableType.TABLE.toString(), rs.getString("TABLE_TYPE"));
 assertFalse(rs.next());
+
+rs = dbmd.getTables(null, "B", null, new String[] 
{PhoenixDatabaseMetaData.SEQUENCE_TABLE_TYPE});
+assertTrue(rs.next());
+assertNull(rs.getString("TABLE_CAT"));
+assertEquals("B", rs.getString("TABLE_SCHEM"));
+assertEquals("S1", rs.getString("TABLE_NAME"));
+assertEquals(PhoenixDatabaseMetaData.SEQUENCE_TABLE_TYPE, 
rs.getString("TABLE_TYPE"));
+assertTrue(rs.next());
+assertNull(rs.getString("TABLE_CAT"));
+assertEquals("B", rs.getString("TABLE_SCHEM"));
+assertEquals("S3", rs.getString("TABLE_NAME"));
+assertEquals(PhoenixDatabaseMetaData.SEQUENCE_TABLE_TYPE, 
rs.getString("TABLE_TYPE"));
+assertFalse(rs.next());
 }
 
 @Test

http://git-wip-us.apache.org/repos/asf/phoenix/blob/2b78e48f/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixDatabaseMetaData.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixDatabaseMetaData.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixDatabaseMetaData.java
index 24bfde7..ac7f3ef 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixDatabaseMetaData.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixDatabaseMetaData.java
@@ -1031,10 +1031,10 @@ public class PhoenixDatabaseMetaData implements 
DatabaseMetaData {
 public Integer getScale() {
 return null;
 }
-   @Override
-   public SortOrder getSortOrder() {
-   return SortOrder.getDefault();
-   }
+@Override
+public SortOrder getSortOrder() {
+return SortOrder.getDefault();
+}
 };
 private static final RowProjector TABLE_TYPE_ROW_PROJECTOR = new 
RowProjector(Arrays.asList(
 new ExpressionProjector(TABLE_TYPE, SYSTEM_CATALOG,
@@ -1160,10 +1160,12 @@ public class PhoenixDatabaseMetaData implements 
DatabaseMetaData {
 StringBuilder whereClause = new StringBuilder();
 addTenantIdFilter(whereClause, catalog);
 if (schemaPattern != null) {
-whereClause.append(" and " + SEQUENCE_SCHEMA + 
(schemaPattern.length() == 0 ? " is null" : " like '" + 
StringUtil.escapeStringConstant(schemaPattern) + "'\n" ));
+appendConjunction(whereClause);
+whereClause.append(SEQUENCE_SCHEMA + (schemaPattern.length() 
== 0 ? " is null" : " like '" + StringUtil.escapeStringConstant(schemaPattern) 
+ "'\n" ));
 }
 if (tableNamePattern != null) {
-whereClause.append(" and " + SEQUENCE_NAME + " like '" + 
StringUtil.escapeStringConstant(tableNamePattern) + "'\n" );
+appendConjunction(whereClause);
+whereClause.append(SEQUENCE_NAME + " like '" + 
StringUtil.escapeStringConstant(tableNamePattern) + "'\n" );
 }
 if (whereClause.length() > 0) {
 buf.append(" where\n");



[2/3] phoenix git commit: PHOENIX-4190 Salted local index failure is causing region server to abort

2017-09-11 Thread jamestaylor
PHOENIX-4190 Salted local index failure is causing region server to abort


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

Branch: refs/heads/4.x-HBase-1.1
Commit: 1c4e09f3b5baa24d250b9c44b076b816bef8b6e5
Parents: 23bb1c6
Author: James Taylor 
Authored: Mon Sep 11 12:21:50 2017 -0700
Committer: James Taylor 
Committed: Mon Sep 11 14:49:43 2017 -0700

--
 .../main/java/org/apache/phoenix/index/IndexMaintainer.java   | 2 +-
 .../org/apache/phoenix/index/PhoenixIndexFailurePolicy.java   | 7 ++-
 2 files changed, 7 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/1c4e09f3/phoenix-core/src/main/java/org/apache/phoenix/index/IndexMaintainer.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/index/IndexMaintainer.java 
b/phoenix-core/src/main/java/org/apache/phoenix/index/IndexMaintainer.java
index 840d535..c5c3dda 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/index/IndexMaintainer.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/index/IndexMaintainer.java
@@ -784,7 +784,7 @@ public class IndexMaintainer implements Writable, 
Iterable {
 assert (isLocalIndex);
 ImmutableBytesPtr ptr =
 new ImmutableBytesPtr(indexRowKeyPtr.get(),( 
indexRowKeyPtr.getOffset()
-+ (nIndexSaltBuckets > 0 ? 1 : 0)), 
viewIndexId.length);
++ (!isLocalIndex && nIndexSaltBuckets > 0 ? 1 : 0)), 
viewIndexId.length);
 return ptr.copyBytesIfNecessary();
 }
 

http://git-wip-us.apache.org/repos/asf/phoenix/blob/1c4e09f3/phoenix-core/src/main/java/org/apache/phoenix/index/PhoenixIndexFailurePolicy.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/index/PhoenixIndexFailurePolicy.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/index/PhoenixIndexFailurePolicy.java
index c91e36e..671e3ef 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/index/PhoenixIndexFailurePolicy.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/index/PhoenixIndexFailurePolicy.java
@@ -39,6 +39,7 @@ import org.apache.hadoop.hbase.client.HTableInterface;
 import org.apache.hadoop.hbase.client.Mutation;
 import org.apache.hadoop.hbase.coprocessor.RegionCoprocessorEnvironment;
 import org.apache.hadoop.hbase.io.ImmutableBytesWritable;
+import org.apache.hadoop.hbase.util.Bytes;
 import org.apache.phoenix.coprocessor.MetaDataProtocol.MetaDataMutationResult;
 import org.apache.phoenix.coprocessor.MetaDataProtocol.MutationCode;
 import org.apache.phoenix.hbase.index.table.HTableInterfaceReference;
@@ -288,7 +289,11 @@ public class PhoenixIndexFailurePolicy extends 
DelegateIndexFailurePolicy {
 new ImmutableBytesWritable(mutation.getRow(), 
offset,
 mutation.getRow().length - offset));
 String indexTableName = localIndexNames.get(new 
ImmutableBytesWritable(viewId));
-indexTableNames.add(indexTableName);
+if (indexTableName == null) {
+LOG.error("Unable to find local index on " + 
ref.getTableName() + " with viewID of " + Bytes.toStringBinary(viewId));
+} else {
+indexTableNames.add(indexTableName);
+}
 }
 } catch (ClassNotFoundException e) {
 throw new IOException(e);



[1/3] phoenix git commit: PHOENIX-4192 Remove unnecessary cast in TestPropertyPolicy

2017-09-11 Thread jamestaylor
Repository: phoenix
Updated Branches:
  refs/heads/4.x-HBase-1.1 ee9962cd6 -> 2b78e48f4


PHOENIX-4192 Remove unnecessary cast in TestPropertyPolicy


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

Branch: refs/heads/4.x-HBase-1.1
Commit: 23bb1c6fcd20b548ebf01c0763d88e8618c09b08
Parents: ee9962c
Author: James Taylor 
Authored: Mon Sep 11 11:53:36 2017 -0700
Committer: James Taylor 
Committed: Mon Sep 11 14:49:23 2017 -0700

--
 .../test/java/org/apache/phoenix/query/TestPropertyPolicy.java | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/23bb1c6f/phoenix-core/src/test/java/org/apache/phoenix/query/TestPropertyPolicy.java
--
diff --git 
a/phoenix-core/src/test/java/org/apache/phoenix/query/TestPropertyPolicy.java 
b/phoenix-core/src/test/java/org/apache/phoenix/query/TestPropertyPolicy.java
index 8573bff..1835437 100644
--- 
a/phoenix-core/src/test/java/org/apache/phoenix/query/TestPropertyPolicy.java
+++ 
b/phoenix-core/src/test/java/org/apache/phoenix/query/TestPropertyPolicy.java
@@ -17,14 +17,14 @@
  */
 package org.apache.phoenix.query;
 
-import org.apache.hadoop.conf.Configuration;
+import static java.util.Arrays.asList;
 
 import java.util.Collections;
 import java.util.HashSet;
 import java.util.Properties;
 import java.util.Set;
 
-import static java.util.Arrays.asList;
+import org.apache.hadoop.conf.Configuration;
 
 /**
  * Configuration factory that populates an {@link Configuration} with static 
and runtime
@@ -39,7 +39,7 @@ public class TestPropertyPolicy implements PropertyPolicy {
 
 for (Object k : properties.keySet()) {
   if (propertiesKeyDisAllowed.contains(k))
-offendingProperties.put((String) k, properties.getProperty((String) 
k));
+offendingProperties.put(k, properties.getProperty((String) k));
 }
 
 if (offendingProperties.size() > 0) throw new 
PropertyNotAllowedException(offendingProperties);



[2/2] phoenix git commit: PHOENIX-4190 Salted local index failure is causing region server to abort

2017-09-11 Thread jamestaylor
PHOENIX-4190 Salted local index failure is causing region server to abort


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

Branch: refs/heads/4.x-HBase-1.2
Commit: 699253c1c4f1c03c5f4d31afc08cc400ae9b855e
Parents: 1d7c805
Author: James Taylor 
Authored: Mon Sep 11 12:21:50 2017 -0700
Committer: James Taylor 
Committed: Mon Sep 11 14:48:17 2017 -0700

--
 .../main/java/org/apache/phoenix/index/IndexMaintainer.java   | 2 +-
 .../org/apache/phoenix/index/PhoenixIndexFailurePolicy.java   | 7 ++-
 2 files changed, 7 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/699253c1/phoenix-core/src/main/java/org/apache/phoenix/index/IndexMaintainer.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/index/IndexMaintainer.java 
b/phoenix-core/src/main/java/org/apache/phoenix/index/IndexMaintainer.java
index 840d535..c5c3dda 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/index/IndexMaintainer.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/index/IndexMaintainer.java
@@ -784,7 +784,7 @@ public class IndexMaintainer implements Writable, 
Iterable {
 assert (isLocalIndex);
 ImmutableBytesPtr ptr =
 new ImmutableBytesPtr(indexRowKeyPtr.get(),( 
indexRowKeyPtr.getOffset()
-+ (nIndexSaltBuckets > 0 ? 1 : 0)), 
viewIndexId.length);
++ (!isLocalIndex && nIndexSaltBuckets > 0 ? 1 : 0)), 
viewIndexId.length);
 return ptr.copyBytesIfNecessary();
 }
 

http://git-wip-us.apache.org/repos/asf/phoenix/blob/699253c1/phoenix-core/src/main/java/org/apache/phoenix/index/PhoenixIndexFailurePolicy.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/index/PhoenixIndexFailurePolicy.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/index/PhoenixIndexFailurePolicy.java
index c91e36e..671e3ef 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/index/PhoenixIndexFailurePolicy.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/index/PhoenixIndexFailurePolicy.java
@@ -39,6 +39,7 @@ import org.apache.hadoop.hbase.client.HTableInterface;
 import org.apache.hadoop.hbase.client.Mutation;
 import org.apache.hadoop.hbase.coprocessor.RegionCoprocessorEnvironment;
 import org.apache.hadoop.hbase.io.ImmutableBytesWritable;
+import org.apache.hadoop.hbase.util.Bytes;
 import org.apache.phoenix.coprocessor.MetaDataProtocol.MetaDataMutationResult;
 import org.apache.phoenix.coprocessor.MetaDataProtocol.MutationCode;
 import org.apache.phoenix.hbase.index.table.HTableInterfaceReference;
@@ -288,7 +289,11 @@ public class PhoenixIndexFailurePolicy extends 
DelegateIndexFailurePolicy {
 new ImmutableBytesWritable(mutation.getRow(), 
offset,
 mutation.getRow().length - offset));
 String indexTableName = localIndexNames.get(new 
ImmutableBytesWritable(viewId));
-indexTableNames.add(indexTableName);
+if (indexTableName == null) {
+LOG.error("Unable to find local index on " + 
ref.getTableName() + " with viewID of " + Bytes.toStringBinary(viewId));
+} else {
+indexTableNames.add(indexTableName);
+}
 }
 } catch (ClassNotFoundException e) {
 throw new IOException(e);



[1/2] phoenix git commit: PHOENIX-4182 DatabaseMetaData.getTables throws exception when getting SEQUENCE information

2017-09-11 Thread jamestaylor
Repository: phoenix
Updated Branches:
  refs/heads/4.x-HBase-1.2 1d7c8059a -> a6f1b6369


PHOENIX-4182 DatabaseMetaData.getTables throws exception when getting SEQUENCE 
information


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

Branch: refs/heads/4.x-HBase-1.2
Commit: a6f1b63692b3dec38aef4a9b44d28116c08344a4
Parents: 699253c
Author: James Taylor 
Authored: Mon Sep 11 13:06:17 2017 -0700
Committer: James Taylor 
Committed: Mon Sep 11 14:48:17 2017 -0700

--
 .../phoenix/end2end/QueryDatabaseMetaDataIT.java  | 13 +
 .../apache/phoenix/jdbc/PhoenixDatabaseMetaData.java  | 14 --
 2 files changed, 21 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/a6f1b636/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryDatabaseMetaDataIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryDatabaseMetaDataIT.java
 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryDatabaseMetaDataIT.java
index 44012b9..12c0bd3 100644
--- 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryDatabaseMetaDataIT.java
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryDatabaseMetaDataIT.java
@@ -275,6 +275,19 @@ public class QueryDatabaseMetaDataIT extends 
BaseClientManagedTimeIT {
 assertEquals("BAS", rs.getString("TABLE_NAME"));
 assertEquals(PTableType.TABLE.toString(), rs.getString("TABLE_TYPE"));
 assertFalse(rs.next());
+
+rs = dbmd.getTables(null, "B", null, new String[] 
{PhoenixDatabaseMetaData.SEQUENCE_TABLE_TYPE});
+assertTrue(rs.next());
+assertNull(rs.getString("TABLE_CAT"));
+assertEquals("B", rs.getString("TABLE_SCHEM"));
+assertEquals("S1", rs.getString("TABLE_NAME"));
+assertEquals(PhoenixDatabaseMetaData.SEQUENCE_TABLE_TYPE, 
rs.getString("TABLE_TYPE"));
+assertTrue(rs.next());
+assertNull(rs.getString("TABLE_CAT"));
+assertEquals("B", rs.getString("TABLE_SCHEM"));
+assertEquals("S3", rs.getString("TABLE_NAME"));
+assertEquals(PhoenixDatabaseMetaData.SEQUENCE_TABLE_TYPE, 
rs.getString("TABLE_TYPE"));
+assertFalse(rs.next());
 }
 
 @Test

http://git-wip-us.apache.org/repos/asf/phoenix/blob/a6f1b636/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixDatabaseMetaData.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixDatabaseMetaData.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixDatabaseMetaData.java
index 24bfde7..ac7f3ef 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixDatabaseMetaData.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixDatabaseMetaData.java
@@ -1031,10 +1031,10 @@ public class PhoenixDatabaseMetaData implements 
DatabaseMetaData {
 public Integer getScale() {
 return null;
 }
-   @Override
-   public SortOrder getSortOrder() {
-   return SortOrder.getDefault();
-   }
+@Override
+public SortOrder getSortOrder() {
+return SortOrder.getDefault();
+}
 };
 private static final RowProjector TABLE_TYPE_ROW_PROJECTOR = new 
RowProjector(Arrays.asList(
 new ExpressionProjector(TABLE_TYPE, SYSTEM_CATALOG,
@@ -1160,10 +1160,12 @@ public class PhoenixDatabaseMetaData implements 
DatabaseMetaData {
 StringBuilder whereClause = new StringBuilder();
 addTenantIdFilter(whereClause, catalog);
 if (schemaPattern != null) {
-whereClause.append(" and " + SEQUENCE_SCHEMA + 
(schemaPattern.length() == 0 ? " is null" : " like '" + 
StringUtil.escapeStringConstant(schemaPattern) + "'\n" ));
+appendConjunction(whereClause);
+whereClause.append(SEQUENCE_SCHEMA + (schemaPattern.length() 
== 0 ? " is null" : " like '" + StringUtil.escapeStringConstant(schemaPattern) 
+ "'\n" ));
 }
 if (tableNamePattern != null) {
-whereClause.append(" and " + SEQUENCE_NAME + " like '" + 
StringUtil.escapeStringConstant(tableNamePattern) + "'\n" );
+appendConjunction(whereClause);
+whereClause.append(SEQUENCE_NAME + " like '" + 
StringUtil.escapeStringConstant(tableNamePattern) + "'\n" );
 }
 if (whereClause.length() > 0) {
 

Build failed in Jenkins: Phoenix | Master #1786

2017-09-11 Thread Apache Jenkins Server
See 


Changes:

[tdsilva] PHOENIX-4186 Modify NativeHBaseTypesIT to not use CurrentSCN

--
[...truncated 46.60 KB...]
[INFO] Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.17 s - 
in org.apache.phoenix.execute.UnnestArrayPlanTest
[INFO] Running org.apache.phoenix.execute.CorrelatePlanTest
[INFO] Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.349 s 
- in org.apache.phoenix.execute.CorrelatePlanTest
[INFO] Running org.apache.phoenix.execute.DescVarLengthFastByteComparisonsTest
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.047 s 
- in org.apache.phoenix.execute.DescVarLengthFastByteComparisonsTest
[INFO] Running org.apache.phoenix.execute.MutationStateTest
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.19 s - 
in org.apache.phoenix.execute.MutationStateTest
[INFO] Running org.apache.phoenix.execute.LiteralResultIteratorPlanTest
[INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.061 s 
- in org.apache.phoenix.execute.LiteralResultIteratorPlanTest
[INFO] Running org.apache.phoenix.cache.TenantCacheTest
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.101 s 
- in org.apache.phoenix.cache.TenantCacheTest
[INFO] Running org.apache.phoenix.cache.JodaTimezoneCacheTest
[INFO] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.093 s 
- in org.apache.phoenix.cache.JodaTimezoneCacheTest
[INFO] Running org.apache.phoenix.hbase.index.parallel.TestThreadPoolBuilder
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.101 s 
- in org.apache.phoenix.hbase.index.parallel.TestThreadPoolBuilder
[INFO] Running org.apache.phoenix.hbase.index.parallel.TestThreadPoolManager
[INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.085 s 
- in org.apache.phoenix.hbase.index.parallel.TestThreadPoolManager
[INFO] Running 
org.apache.phoenix.hbase.index.write.TestParalleWriterIndexCommitter
[WARNING] Tests run: 45, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 6.75 
s - in org.apache.phoenix.compile.WhereCompilerTest
[INFO] Running 
org.apache.phoenix.hbase.index.write.recovery.TestPerRegionIndexWriteCache
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.669 s 
- in org.apache.phoenix.trace.TraceSpanReceiverTest
[INFO] Running org.apache.phoenix.hbase.index.write.TestParalleIndexWriter
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.81 s - 
in org.apache.phoenix.hbase.index.write.TestParalleIndexWriter
[INFO] Running org.apache.phoenix.hbase.index.write.TestIndexWriter
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.383 s 
- in org.apache.phoenix.hbase.index.write.TestParalleWriterIndexCommitter
[INFO] Running org.apache.phoenix.hbase.index.write.TestWALRecoveryCaching
[INFO] Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.514 s 
- in org.apache.phoenix.hbase.index.write.TestIndexWriter
[INFO] Running org.apache.phoenix.hbase.index.util.TestIndexManagementUtil
[WARNING] Tests run: 1, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 0.08 
s - in org.apache.phoenix.hbase.index.write.TestWALRecoveryCaching
[INFO] Running 
org.apache.phoenix.hbase.index.covered.TestCoveredColumnIndexCodec
[INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.262 s 
- in org.apache.phoenix.hbase.index.util.TestIndexManagementUtil
[INFO] Running org.apache.phoenix.hbase.index.covered.LocalTableStateTest
[INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.44 s - 
in org.apache.phoenix.hbase.index.covered.TestCoveredColumnIndexCodec
[INFO] Running 
org.apache.phoenix.hbase.index.covered.filter.TestApplyAndFilterDeletesFilter
[INFO] Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.072 s 
- in 
org.apache.phoenix.hbase.index.covered.filter.TestApplyAndFilterDeletesFilter
[INFO] Running 
org.apache.phoenix.hbase.index.covered.filter.TestNewerTimestampFilter
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.015 s 
- in org.apache.phoenix.hbase.index.covered.filter.TestNewerTimestampFilter
[INFO] Running org.apache.phoenix.hbase.index.covered.TestColumnTracker
[INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.06 s - 
in org.apache.phoenix.hbase.index.covered.TestColumnTracker
[INFO] Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.422 s 
- in org.apache.phoenix.hbase.index.covered.LocalTableStateTest
[INFO] Running org.apache.phoenix.hbase.index.covered.data.TestIndexMemStore
[INFO] Running org.apache.phoenix.hbase.index.covered.data.TestLocalTable
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.015 s 
- in org.apache.phoenix.hbase.index.covered.data.TestLocalTable
[INFO] Running 

phoenix git commit: PHOENIX-4186 Modify NativeHBaseTypesIT to not use CurrentSCN

2017-09-11 Thread tdsilva
Repository: phoenix
Updated Branches:
  refs/heads/master 7865a59b0 -> 7e45e9ea1


PHOENIX-4186 Modify NativeHBaseTypesIT to not use CurrentSCN


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

Branch: refs/heads/master
Commit: 7e45e9ea1eee5c71cb14ed1eb7d54c05dc91b46a
Parents: 7865a59
Author: Thomas D'Silva 
Authored: Fri Sep 8 15:40:45 2017 -0700
Committer: Thomas D'Silva 
Committed: Mon Sep 11 13:02:50 2017 -0700

--
 .../phoenix/end2end/NativeHBaseTypesIT.java | 151 +--
 .../java/org/apache/phoenix/query/BaseTest.java |  11 --
 2 files changed, 74 insertions(+), 88 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/7e45e9ea/phoenix-core/src/it/java/org/apache/phoenix/end2end/NativeHBaseTypesIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/NativeHBaseTypesIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/NativeHBaseTypesIT.java
index 965071f..127c25a 100644
--- 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/NativeHBaseTypesIT.java
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/NativeHBaseTypesIT.java
@@ -17,8 +17,6 @@
  */
 package org.apache.phoenix.end2end;
 
-import static org.apache.phoenix.util.TestUtil.HBASE_NATIVE;
-import static org.apache.phoenix.util.TestUtil.HBASE_NATIVE_SCHEMA_NAME;
 import static org.apache.phoenix.util.TestUtil.TEST_PROPERTIES;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
@@ -35,6 +33,7 @@ import java.util.List;
 import java.util.Properties;
 
 import org.apache.hadoop.hbase.HColumnDescriptor;
+import org.apache.hadoop.hbase.HConstants;
 import org.apache.hadoop.hbase.HTableDescriptor;
 import org.apache.hadoop.hbase.client.Delete;
 import org.apache.hadoop.hbase.client.Get;
@@ -43,15 +42,15 @@ import org.apache.hadoop.hbase.client.HTableInterface;
 import org.apache.hadoop.hbase.client.Put;
 import org.apache.hadoop.hbase.client.Result;
 import org.apache.hadoop.hbase.client.Row;
+import org.apache.hadoop.hbase.io.encoding.DataBlockEncoding;
 import org.apache.hadoop.hbase.util.Bytes;
 import org.apache.phoenix.jdbc.PhoenixConnection;
 import org.apache.phoenix.query.ConnectionQueryServices;
 import org.apache.phoenix.query.QueryConstants;
 import org.apache.phoenix.util.ByteUtil;
-import org.apache.phoenix.util.PhoenixRuntime;
+import org.apache.phoenix.util.EnvironmentEdgeManager;
 import org.apache.phoenix.util.PropertiesUtil;
 import org.apache.phoenix.util.SchemaUtil;
-import org.junit.BeforeClass;
 import org.junit.Test;
 
 
@@ -65,37 +64,27 @@ import org.junit.Test;
  * @since 0.1
  */
 
-public class NativeHBaseTypesIT extends BaseClientManagedTimeIT {
-private static final byte[] HBASE_NATIVE_BYTES = 
SchemaUtil.getTableNameAsBytes(HBASE_NATIVE_SCHEMA_NAME, HBASE_NATIVE);
-private static final byte[] FAMILY_NAME = 
Bytes.toBytes(SchemaUtil.normalizeIdentifier("1"));
-private static final byte[][] SPLITS = new byte[][] {Bytes.toBytes(20), 
Bytes.toBytes(30)};
-private static final long ts = nextTimestamp();
+public class NativeHBaseTypesIT extends ParallelStatsDisabledIT {
 
-@BeforeClass
-public static void doBeforeTestSetup() throws Exception {
+@SuppressWarnings("deprecation")
+private String initTableValues() throws Exception {
+final String tableName = SchemaUtil.getTableName(generateUniqueName(), 
generateUniqueName());
+final byte[] tableBytes = tableName.getBytes();
+final byte[] familyName = 
Bytes.toBytes(SchemaUtil.normalizeIdentifier("1"));
+final byte[][] splits = new byte[][] {Bytes.toBytes(20), 
Bytes.toBytes(30)};
 HBaseAdmin admin = driver.getConnectionQueryServices(getUrl(), 
PropertiesUtil.deepCopy(TEST_PROPERTIES)).getAdmin();
 try {
-try {
-admin.disableTable(HBASE_NATIVE_BYTES);
-admin.deleteTable(HBASE_NATIVE_BYTES);
-} catch (org.apache.hadoop.hbase.TableNotFoundException e) {
-}
-@SuppressWarnings("deprecation")
-HTableDescriptor descriptor = new 
HTableDescriptor(HBASE_NATIVE_BYTES);
-HColumnDescriptor columnDescriptor =  new 
HColumnDescriptor(FAMILY_NAME);
+HTableDescriptor descriptor = new HTableDescriptor(tableBytes);
+HColumnDescriptor columnDescriptor =  new 
HColumnDescriptor(familyName);
 columnDescriptor.setKeepDeletedCells(true);
 descriptor.addFamily(columnDescriptor);
-

phoenix git commit: PHOENIX-4186 Modify NativeHBaseTypesIT to not use CurrentSCN

2017-09-11 Thread tdsilva
Repository: phoenix
Updated Branches:
  refs/heads/4.x-HBase-0.98 6259055cc -> 362993b55


PHOENIX-4186 Modify NativeHBaseTypesIT to not use CurrentSCN


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

Branch: refs/heads/4.x-HBase-0.98
Commit: 362993b555e7e460fb04ae255009fa445f432b24
Parents: 6259055
Author: Thomas D'Silva 
Authored: Fri Sep 8 15:40:45 2017 -0700
Committer: Thomas D'Silva 
Committed: Mon Sep 11 13:02:12 2017 -0700

--
 .../phoenix/end2end/NativeHBaseTypesIT.java | 151 +--
 .../java/org/apache/phoenix/query/BaseTest.java |  11 --
 2 files changed, 74 insertions(+), 88 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/362993b5/phoenix-core/src/it/java/org/apache/phoenix/end2end/NativeHBaseTypesIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/NativeHBaseTypesIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/NativeHBaseTypesIT.java
index 965071f..127c25a 100644
--- 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/NativeHBaseTypesIT.java
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/NativeHBaseTypesIT.java
@@ -17,8 +17,6 @@
  */
 package org.apache.phoenix.end2end;
 
-import static org.apache.phoenix.util.TestUtil.HBASE_NATIVE;
-import static org.apache.phoenix.util.TestUtil.HBASE_NATIVE_SCHEMA_NAME;
 import static org.apache.phoenix.util.TestUtil.TEST_PROPERTIES;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
@@ -35,6 +33,7 @@ import java.util.List;
 import java.util.Properties;
 
 import org.apache.hadoop.hbase.HColumnDescriptor;
+import org.apache.hadoop.hbase.HConstants;
 import org.apache.hadoop.hbase.HTableDescriptor;
 import org.apache.hadoop.hbase.client.Delete;
 import org.apache.hadoop.hbase.client.Get;
@@ -43,15 +42,15 @@ import org.apache.hadoop.hbase.client.HTableInterface;
 import org.apache.hadoop.hbase.client.Put;
 import org.apache.hadoop.hbase.client.Result;
 import org.apache.hadoop.hbase.client.Row;
+import org.apache.hadoop.hbase.io.encoding.DataBlockEncoding;
 import org.apache.hadoop.hbase.util.Bytes;
 import org.apache.phoenix.jdbc.PhoenixConnection;
 import org.apache.phoenix.query.ConnectionQueryServices;
 import org.apache.phoenix.query.QueryConstants;
 import org.apache.phoenix.util.ByteUtil;
-import org.apache.phoenix.util.PhoenixRuntime;
+import org.apache.phoenix.util.EnvironmentEdgeManager;
 import org.apache.phoenix.util.PropertiesUtil;
 import org.apache.phoenix.util.SchemaUtil;
-import org.junit.BeforeClass;
 import org.junit.Test;
 
 
@@ -65,37 +64,27 @@ import org.junit.Test;
  * @since 0.1
  */
 
-public class NativeHBaseTypesIT extends BaseClientManagedTimeIT {
-private static final byte[] HBASE_NATIVE_BYTES = 
SchemaUtil.getTableNameAsBytes(HBASE_NATIVE_SCHEMA_NAME, HBASE_NATIVE);
-private static final byte[] FAMILY_NAME = 
Bytes.toBytes(SchemaUtil.normalizeIdentifier("1"));
-private static final byte[][] SPLITS = new byte[][] {Bytes.toBytes(20), 
Bytes.toBytes(30)};
-private static final long ts = nextTimestamp();
+public class NativeHBaseTypesIT extends ParallelStatsDisabledIT {
 
-@BeforeClass
-public static void doBeforeTestSetup() throws Exception {
+@SuppressWarnings("deprecation")
+private String initTableValues() throws Exception {
+final String tableName = SchemaUtil.getTableName(generateUniqueName(), 
generateUniqueName());
+final byte[] tableBytes = tableName.getBytes();
+final byte[] familyName = 
Bytes.toBytes(SchemaUtil.normalizeIdentifier("1"));
+final byte[][] splits = new byte[][] {Bytes.toBytes(20), 
Bytes.toBytes(30)};
 HBaseAdmin admin = driver.getConnectionQueryServices(getUrl(), 
PropertiesUtil.deepCopy(TEST_PROPERTIES)).getAdmin();
 try {
-try {
-admin.disableTable(HBASE_NATIVE_BYTES);
-admin.deleteTable(HBASE_NATIVE_BYTES);
-} catch (org.apache.hadoop.hbase.TableNotFoundException e) {
-}
-@SuppressWarnings("deprecation")
-HTableDescriptor descriptor = new 
HTableDescriptor(HBASE_NATIVE_BYTES);
-HColumnDescriptor columnDescriptor =  new 
HColumnDescriptor(FAMILY_NAME);
+HTableDescriptor descriptor = new HTableDescriptor(tableBytes);
+HColumnDescriptor columnDescriptor =  new 
HColumnDescriptor(familyName);
 columnDescriptor.setKeepDeletedCells(true);
 descriptor.addFamily(columnDescriptor);
-

phoenix git commit: PHOENIX-4186 Modify NativeHBaseTypesIT to not use CurrentSCN

2017-09-11 Thread tdsilva
Repository: phoenix
Updated Branches:
  refs/heads/4.x-HBase-1.1 a7a0441e6 -> ee9962cd6


PHOENIX-4186 Modify NativeHBaseTypesIT to not use CurrentSCN


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

Branch: refs/heads/4.x-HBase-1.1
Commit: ee9962cd659295db5ba96d2c7bf64bd36d667ea0
Parents: a7a0441
Author: Thomas D'Silva 
Authored: Fri Sep 8 15:40:45 2017 -0700
Committer: Thomas D'Silva 
Committed: Mon Sep 11 13:02:31 2017 -0700

--
 .../phoenix/end2end/NativeHBaseTypesIT.java | 151 +--
 .../java/org/apache/phoenix/query/BaseTest.java |  11 --
 2 files changed, 74 insertions(+), 88 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/ee9962cd/phoenix-core/src/it/java/org/apache/phoenix/end2end/NativeHBaseTypesIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/NativeHBaseTypesIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/NativeHBaseTypesIT.java
index 965071f..127c25a 100644
--- 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/NativeHBaseTypesIT.java
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/NativeHBaseTypesIT.java
@@ -17,8 +17,6 @@
  */
 package org.apache.phoenix.end2end;
 
-import static org.apache.phoenix.util.TestUtil.HBASE_NATIVE;
-import static org.apache.phoenix.util.TestUtil.HBASE_NATIVE_SCHEMA_NAME;
 import static org.apache.phoenix.util.TestUtil.TEST_PROPERTIES;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
@@ -35,6 +33,7 @@ import java.util.List;
 import java.util.Properties;
 
 import org.apache.hadoop.hbase.HColumnDescriptor;
+import org.apache.hadoop.hbase.HConstants;
 import org.apache.hadoop.hbase.HTableDescriptor;
 import org.apache.hadoop.hbase.client.Delete;
 import org.apache.hadoop.hbase.client.Get;
@@ -43,15 +42,15 @@ import org.apache.hadoop.hbase.client.HTableInterface;
 import org.apache.hadoop.hbase.client.Put;
 import org.apache.hadoop.hbase.client.Result;
 import org.apache.hadoop.hbase.client.Row;
+import org.apache.hadoop.hbase.io.encoding.DataBlockEncoding;
 import org.apache.hadoop.hbase.util.Bytes;
 import org.apache.phoenix.jdbc.PhoenixConnection;
 import org.apache.phoenix.query.ConnectionQueryServices;
 import org.apache.phoenix.query.QueryConstants;
 import org.apache.phoenix.util.ByteUtil;
-import org.apache.phoenix.util.PhoenixRuntime;
+import org.apache.phoenix.util.EnvironmentEdgeManager;
 import org.apache.phoenix.util.PropertiesUtil;
 import org.apache.phoenix.util.SchemaUtil;
-import org.junit.BeforeClass;
 import org.junit.Test;
 
 
@@ -65,37 +64,27 @@ import org.junit.Test;
  * @since 0.1
  */
 
-public class NativeHBaseTypesIT extends BaseClientManagedTimeIT {
-private static final byte[] HBASE_NATIVE_BYTES = 
SchemaUtil.getTableNameAsBytes(HBASE_NATIVE_SCHEMA_NAME, HBASE_NATIVE);
-private static final byte[] FAMILY_NAME = 
Bytes.toBytes(SchemaUtil.normalizeIdentifier("1"));
-private static final byte[][] SPLITS = new byte[][] {Bytes.toBytes(20), 
Bytes.toBytes(30)};
-private static final long ts = nextTimestamp();
+public class NativeHBaseTypesIT extends ParallelStatsDisabledIT {
 
-@BeforeClass
-public static void doBeforeTestSetup() throws Exception {
+@SuppressWarnings("deprecation")
+private String initTableValues() throws Exception {
+final String tableName = SchemaUtil.getTableName(generateUniqueName(), 
generateUniqueName());
+final byte[] tableBytes = tableName.getBytes();
+final byte[] familyName = 
Bytes.toBytes(SchemaUtil.normalizeIdentifier("1"));
+final byte[][] splits = new byte[][] {Bytes.toBytes(20), 
Bytes.toBytes(30)};
 HBaseAdmin admin = driver.getConnectionQueryServices(getUrl(), 
PropertiesUtil.deepCopy(TEST_PROPERTIES)).getAdmin();
 try {
-try {
-admin.disableTable(HBASE_NATIVE_BYTES);
-admin.deleteTable(HBASE_NATIVE_BYTES);
-} catch (org.apache.hadoop.hbase.TableNotFoundException e) {
-}
-@SuppressWarnings("deprecation")
-HTableDescriptor descriptor = new 
HTableDescriptor(HBASE_NATIVE_BYTES);
-HColumnDescriptor columnDescriptor =  new 
HColumnDescriptor(FAMILY_NAME);
+HTableDescriptor descriptor = new HTableDescriptor(tableBytes);
+HColumnDescriptor columnDescriptor =  new 
HColumnDescriptor(familyName);
 columnDescriptor.setKeepDeletedCells(true);
 descriptor.addFamily(columnDescriptor);
-

phoenix git commit: PHOENIX-4186 Modify NativeHBaseTypesIT to not use CurrentSCN

2017-09-11 Thread tdsilva
Repository: phoenix
Updated Branches:
  refs/heads/4.x-HBase-1.2 4020ef34a -> 1d7c8059a


PHOENIX-4186 Modify NativeHBaseTypesIT to not use CurrentSCN


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

Branch: refs/heads/4.x-HBase-1.2
Commit: 1d7c8059a39ffdb1223f09dd8017447e297e90cc
Parents: 4020ef3
Author: Thomas D'Silva 
Authored: Fri Sep 8 15:40:45 2017 -0700
Committer: Thomas D'Silva 
Committed: Mon Sep 11 13:01:40 2017 -0700

--
 .../phoenix/end2end/NativeHBaseTypesIT.java | 151 +--
 .../java/org/apache/phoenix/query/BaseTest.java |  11 --
 2 files changed, 74 insertions(+), 88 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/1d7c8059/phoenix-core/src/it/java/org/apache/phoenix/end2end/NativeHBaseTypesIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/NativeHBaseTypesIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/NativeHBaseTypesIT.java
index 965071f..127c25a 100644
--- 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/NativeHBaseTypesIT.java
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/NativeHBaseTypesIT.java
@@ -17,8 +17,6 @@
  */
 package org.apache.phoenix.end2end;
 
-import static org.apache.phoenix.util.TestUtil.HBASE_NATIVE;
-import static org.apache.phoenix.util.TestUtil.HBASE_NATIVE_SCHEMA_NAME;
 import static org.apache.phoenix.util.TestUtil.TEST_PROPERTIES;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
@@ -35,6 +33,7 @@ import java.util.List;
 import java.util.Properties;
 
 import org.apache.hadoop.hbase.HColumnDescriptor;
+import org.apache.hadoop.hbase.HConstants;
 import org.apache.hadoop.hbase.HTableDescriptor;
 import org.apache.hadoop.hbase.client.Delete;
 import org.apache.hadoop.hbase.client.Get;
@@ -43,15 +42,15 @@ import org.apache.hadoop.hbase.client.HTableInterface;
 import org.apache.hadoop.hbase.client.Put;
 import org.apache.hadoop.hbase.client.Result;
 import org.apache.hadoop.hbase.client.Row;
+import org.apache.hadoop.hbase.io.encoding.DataBlockEncoding;
 import org.apache.hadoop.hbase.util.Bytes;
 import org.apache.phoenix.jdbc.PhoenixConnection;
 import org.apache.phoenix.query.ConnectionQueryServices;
 import org.apache.phoenix.query.QueryConstants;
 import org.apache.phoenix.util.ByteUtil;
-import org.apache.phoenix.util.PhoenixRuntime;
+import org.apache.phoenix.util.EnvironmentEdgeManager;
 import org.apache.phoenix.util.PropertiesUtil;
 import org.apache.phoenix.util.SchemaUtil;
-import org.junit.BeforeClass;
 import org.junit.Test;
 
 
@@ -65,37 +64,27 @@ import org.junit.Test;
  * @since 0.1
  */
 
-public class NativeHBaseTypesIT extends BaseClientManagedTimeIT {
-private static final byte[] HBASE_NATIVE_BYTES = 
SchemaUtil.getTableNameAsBytes(HBASE_NATIVE_SCHEMA_NAME, HBASE_NATIVE);
-private static final byte[] FAMILY_NAME = 
Bytes.toBytes(SchemaUtil.normalizeIdentifier("1"));
-private static final byte[][] SPLITS = new byte[][] {Bytes.toBytes(20), 
Bytes.toBytes(30)};
-private static final long ts = nextTimestamp();
+public class NativeHBaseTypesIT extends ParallelStatsDisabledIT {
 
-@BeforeClass
-public static void doBeforeTestSetup() throws Exception {
+@SuppressWarnings("deprecation")
+private String initTableValues() throws Exception {
+final String tableName = SchemaUtil.getTableName(generateUniqueName(), 
generateUniqueName());
+final byte[] tableBytes = tableName.getBytes();
+final byte[] familyName = 
Bytes.toBytes(SchemaUtil.normalizeIdentifier("1"));
+final byte[][] splits = new byte[][] {Bytes.toBytes(20), 
Bytes.toBytes(30)};
 HBaseAdmin admin = driver.getConnectionQueryServices(getUrl(), 
PropertiesUtil.deepCopy(TEST_PROPERTIES)).getAdmin();
 try {
-try {
-admin.disableTable(HBASE_NATIVE_BYTES);
-admin.deleteTable(HBASE_NATIVE_BYTES);
-} catch (org.apache.hadoop.hbase.TableNotFoundException e) {
-}
-@SuppressWarnings("deprecation")
-HTableDescriptor descriptor = new 
HTableDescriptor(HBASE_NATIVE_BYTES);
-HColumnDescriptor columnDescriptor =  new 
HColumnDescriptor(FAMILY_NAME);
+HTableDescriptor descriptor = new HTableDescriptor(tableBytes);
+HColumnDescriptor columnDescriptor =  new 
HColumnDescriptor(familyName);
 columnDescriptor.setKeepDeletedCells(true);
 descriptor.addFamily(columnDescriptor);
-

phoenix git commit: PHOENIX-4192 Remove unnecessary cast in TestPropertyPolicy

2017-09-11 Thread jamestaylor
Repository: phoenix
Updated Branches:
  refs/heads/4.x-HBase-1.2 4bfb23aee -> 4020ef34a


PHOENIX-4192 Remove unnecessary cast in TestPropertyPolicy


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

Branch: refs/heads/4.x-HBase-1.2
Commit: 4020ef34ad910c9801043430e5950dfd5dfca2a0
Parents: 4bfb23a
Author: James Taylor 
Authored: Mon Sep 11 11:53:36 2017 -0700
Committer: James Taylor 
Committed: Mon Sep 11 11:53:36 2017 -0700

--
 .../test/java/org/apache/phoenix/query/TestPropertyPolicy.java | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/4020ef34/phoenix-core/src/test/java/org/apache/phoenix/query/TestPropertyPolicy.java
--
diff --git 
a/phoenix-core/src/test/java/org/apache/phoenix/query/TestPropertyPolicy.java 
b/phoenix-core/src/test/java/org/apache/phoenix/query/TestPropertyPolicy.java
index 8573bff..1835437 100644
--- 
a/phoenix-core/src/test/java/org/apache/phoenix/query/TestPropertyPolicy.java
+++ 
b/phoenix-core/src/test/java/org/apache/phoenix/query/TestPropertyPolicy.java
@@ -17,14 +17,14 @@
  */
 package org.apache.phoenix.query;
 
-import org.apache.hadoop.conf.Configuration;
+import static java.util.Arrays.asList;
 
 import java.util.Collections;
 import java.util.HashSet;
 import java.util.Properties;
 import java.util.Set;
 
-import static java.util.Arrays.asList;
+import org.apache.hadoop.conf.Configuration;
 
 /**
  * Configuration factory that populates an {@link Configuration} with static 
and runtime
@@ -39,7 +39,7 @@ public class TestPropertyPolicy implements PropertyPolicy {
 
 for (Object k : properties.keySet()) {
   if (propertiesKeyDisAllowed.contains(k))
-offendingProperties.put((String) k, properties.getProperty((String) 
k));
+offendingProperties.put(k, properties.getProperty((String) k));
 }
 
 if (offendingProperties.size() > 0) throw new 
PropertyNotAllowedException(offendingProperties);



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

2017-09-11 Thread Apache Jenkins Server
See 


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

[Phoenix_Compile_Compat_wHBase] $ /bin/bash /tmp/jenkins8028055043263005078.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) 128341
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
core id : 6
core id : 7
physical id : 0
MemTotal:   32865152 kB
MemFree: 7543332 kB
Filesystem  Size  Used Avail Use% Mounted on
none 16G 0   16G   0% /dev
tmpfs   3.2G  350M  2.8G  11% /run
/dev/nbd046G   40G  3.8G  92% /
tmpfs16G 0   16G   0% /dev/shm
tmpfs   5.0M 0  5.0M   0% /run/lock
tmpfs16G 0   16G   0% /sys/fs/cgroup
/dev/sda1   235G  142G   81G  64% /home
tmpfs   3.2G 0  3.2G   0% /run/user/9997
apache-maven-2.2.1
apache-maven-3.0.4
apache-maven-3.0.5
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
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.

main:
 [exec] 
~/jenkins-slave/workspace/Phoenix_Compile_Compat_wHBase/hbase/hbase-common 
~/jenkins-slave/workspace/Phoenix_Compile_Compat_wHBase/hbase/hbase-common
 [exec] 
~/jenkins-slave/workspace/Phoenix_Compile_Compat_wHBase/hbase/hbase-common

main:
[mkdir] Created dir: 

 [exec] tar: hadoop-snappy-nativelibs.tar: Cannot open: No such file or 
directory
 [exec] tar: Error is not recoverable: exiting now
 [exec] Result: 2

main:
[mkdir] Created dir: 

 [copy] Copying 20 files to 

[mkdir] Created dir: 

[mkdir] Created dir: 


main:
[mkdir] Created dir: 

 [copy] Copying 17 files to 

[mkdir] Created dir: 


main:
[mkdir] Created dir: 

 [copy] Copying 1 file to 

[mkdir] Created dir: 


HBase pom.xml:

Got HBase version as 0.98.25-SNAPSHOT
Cloning into 'phoenix'...
Switched to a new branch '4.x-HBase-0.98'
Branch 4.x-HBase-0.98 set up to track remote branch 4.x-HBase-0.98 from origin.
ANTLR Parser Generator  Version 3.5.2
Output file 

 does not exist: must build 

PhoenixSQL.g


===
Verifying compile level compatibility with HBase