Build failed in Jenkins: Phoenix | 4.x-HBase-0.98 #1874

2018-04-27 Thread Apache Jenkins Server
See 

--
[...truncated 131.78 KB...]
[INFO] Running org.apache.phoenix.end2end.index.IndexUsageIT
[INFO] Tests run: 40, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 156.178 
s - in org.apache.phoenix.end2end.index.GlobalMutableTxIndexIT
[INFO] Tests run: 16, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 302.492 
s - in org.apache.phoenix.end2end.index.DropColumnIT
[INFO] Running org.apache.phoenix.end2end.index.IndexWithTableSchemaChangeIT
[INFO] Tests run: 14, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 75.559 
s - in org.apache.phoenix.end2end.index.IndexMaintenanceIT
[INFO] Running org.apache.phoenix.end2end.index.LocalImmutableTxIndexIT
[INFO] Tests run: 16, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 70.347 
s - in org.apache.phoenix.end2end.index.IndexMetadataIT
[INFO] Running org.apache.phoenix.end2end.index.LocalMutableNonTxIndexIT
[INFO] Running org.apache.phoenix.end2end.index.LocalImmutableNonTxIndexIT
[INFO] Tests run: 37, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 195.254 
s - in org.apache.phoenix.end2end.index.IndexUsageIT
[INFO] Tests run: 18, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 145.39 
s - in org.apache.phoenix.end2end.index.IndexWithTableSchemaChangeIT
[INFO] Running org.apache.phoenix.end2end.index.LocalMutableTxIndexIT
[INFO] Running org.apache.phoenix.end2end.index.MutableIndexIT
[INFO] Tests run: 40, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 309.899 
s - in org.apache.phoenix.end2end.index.LocalMutableNonTxIndexIT
[INFO] Tests run: 40, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 311.606 
s - in org.apache.phoenix.end2end.index.LocalImmutableNonTxIndexIT
[INFO] Tests run: 40, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 326.851 
s - in org.apache.phoenix.end2end.index.LocalImmutableTxIndexIT
[INFO] Running org.apache.phoenix.end2end.index.SaltedIndexIT
[INFO] Running org.apache.phoenix.end2end.index.ViewIndexIT
[INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 14.744 s 
- in org.apache.phoenix.end2end.index.SaltedIndexIT
[INFO] Running org.apache.phoenix.end2end.index.txn.RollbackIT
[INFO] Running org.apache.phoenix.end2end.index.txn.MutableRollbackIT
[INFO] Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 49.398 s 
- in org.apache.phoenix.end2end.index.txn.RollbackIT
[INFO] Running org.apache.phoenix.end2end.join.HashJoinCacheIT
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 9.59 s - 
in org.apache.phoenix.end2end.join.HashJoinCacheIT
[INFO] Running org.apache.phoenix.end2end.join.HashJoinGlobalIndexIT
[INFO] Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 65.668 s 
- in org.apache.phoenix.end2end.index.txn.MutableRollbackIT
[INFO] Running org.apache.phoenix.end2end.join.HashJoinLocalIndexIT
[WARNING] Tests run: 14, Failures: 0, Errors: 0, Skipped: 2, Time elapsed: 
93.329 s - in org.apache.phoenix.end2end.index.ViewIndexIT
[INFO] Running org.apache.phoenix.end2end.join.HashJoinMoreIT
[INFO] Tests run: 40, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 332.999 
s - in org.apache.phoenix.end2end.index.LocalMutableTxIndexIT
[INFO] Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 41.491 s 
- in org.apache.phoenix.end2end.join.HashJoinMoreIT
[INFO] Running org.apache.phoenix.end2end.join.SortMergeJoinGlobalIndexIT
[INFO] Running org.apache.phoenix.end2end.join.HashJoinNoIndexIT
[INFO] Tests run: 33, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 134.462 
s - in org.apache.phoenix.end2end.join.HashJoinNoIndexIT
[INFO] Tests run: 33, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 248.007 
s - in org.apache.phoenix.end2end.join.HashJoinGlobalIndexIT
[INFO] Running org.apache.phoenix.end2end.join.SortMergeJoinLocalIndexIT
[INFO] Running org.apache.phoenix.end2end.join.SortMergeJoinNoIndexIT
[INFO] Tests run: 34, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 255.345 
s - in org.apache.phoenix.end2end.join.SortMergeJoinGlobalIndexIT
[INFO] Tests run: 80, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 607.674 
s - in org.apache.phoenix.end2end.index.MutableIndexIT
[INFO] Running org.apache.phoenix.end2end.join.SubqueryIT
[INFO] Running org.apache.phoenix.end2end.join.SubqueryUsingSortMergeJoinIT
[INFO] Tests run: 34, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 165.104 
s - in org.apache.phoenix.end2end.join.SortMergeJoinNoIndexIT
[INFO] Running org.apache.phoenix.end2end.salted.SaltedTableIT
[INFO] Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 15.661 s 
- in org.apache.phoenix.end2end.salted.SaltedTableIT
[INFO] Running org.apache.phoenix.end2end.salted.SaltedTableUpsertSelectIT
[INFO] Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 30.198 s 
- in org.apache.phoenix.end2end.salted.SaltedTableUpsertSelectIT
[INFO] Running 

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

2018-04-27 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
[jtaylor] PHOENIX-4716 ParameterizedTransactionIT is failing in 0.98 branch



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-4.x-HBase-1.3 #110

2018-04-27 Thread Apache Jenkins Server
See 


Changes:

[jtaylor] PHOENIX-4716 ParameterizedTransactionIT is failing in 0.98 branch

--
[...truncated 283.98 KB...]
[INFO] 
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ phoenix-pherf ---
[INFO] Building jar: 

[INFO] 
[INFO] --- maven-site-plugin:3.2:attach-descriptor (attach-descriptor) @ 
phoenix-pherf ---
[INFO] 
[INFO] --- maven-shade-plugin:2.4.3:shade (default) @ phoenix-pherf ---
[INFO] Excluding org.apache.phoenix:phoenix-core:jar:4.14.0-HBase-1.3-SNAPSHOT 
from the shaded jar.
[INFO] Excluding org.apache.tephra:tephra-api:jar:0.13.0-incubating from the 
shaded jar.
[INFO] Excluding org.apache.tephra:tephra-core:jar:0.13.0-incubating from the 
shaded jar.
[INFO] Excluding 
org.apache.tephra:tephra-hbase-compat-1.3:jar:0.13.0-incubating from the shaded 
jar.
[INFO] Excluding org.antlr:antlr-runtime:jar:3.5.2 from the shaded jar.
[INFO] Excluding jline:jline:jar:2.11 from the shaded jar.
[INFO] Excluding sqlline:sqlline:jar:1.2.0 from the shaded jar.
[INFO] Excluding com.google.guava:guava:jar:13.0.1 from the shaded jar.
[INFO] Including joda-time:joda-time:jar:1.6 in the shaded jar.
[INFO] Excluding com.github.stephenc.findbugs:findbugs-annotations:jar:1.3.9-1 
from the shaded jar.
[INFO] Excluding com.github.stephenc.jcip:jcip-annotations:jar:1.0-1 from the 
shaded jar.
[INFO] Excluding org.codehaus.jackson:jackson-core-asl:jar:1.9.2 from the 
shaded jar.
[INFO] Excluding org.codehaus.jackson:jackson-mapper-asl:jar:1.9.2 from the 
shaded jar.
[INFO] Excluding com.google.protobuf:protobuf-java:jar:2.5.0 from the shaded 
jar.
[INFO] Excluding org.apache.httpcomponents:httpclient:jar:4.0.1 from the shaded 
jar.
[INFO] Excluding org.apache.httpcomponents:httpcore:jar:4.0.1 from the shaded 
jar.
[INFO] Excluding log4j:log4j:jar:1.2.17 from the shaded jar.
[INFO] Excluding org.slf4j:slf4j-api:jar:1.6.4 from the shaded jar.
[INFO] Excluding org.iq80.snappy:snappy:jar:0.3 from the shaded jar.
[INFO] Excluding org.apache.htrace:htrace-core:jar:3.1.0-incubating from the 
shaded jar.
[INFO] Excluding commons-codec:commons-codec:jar:1.7 from the shaded jar.
[INFO] Excluding commons-collections:commons-collections:jar:3.2.2 from the 
shaded jar.
[INFO] Including org.apache.commons:commons-csv:jar:1.0 in the shaded jar.
[INFO] Excluding com.google.code.findbugs:jsr305:jar:2.0.1 from the shaded jar.
[INFO] Excluding org.apache.hbase:hbase-annotations:jar:1.3.1 from the shaded 
jar.
[INFO] Excluding org.apache.hbase:hbase-common:jar:1.3.1 from the shaded jar.
[INFO] Excluding org.mortbay.jetty:jetty-util:jar:6.1.26 from the shaded jar.
[INFO] Excluding org.apache.hbase:hbase-protocol:jar:1.3.1 from the shaded jar.
[INFO] Excluding org.apache.hbase:hbase-client:jar:1.3.1 from the shaded jar.
[INFO] Excluding io.netty:netty-all:jar:4.0.23.Final from the shaded jar.
[INFO] Excluding org.apache.zookeeper:zookeeper:jar:3.4.6 from the shaded jar.
[INFO] Excluding org.jruby.jcodings:jcodings:jar:1.0.8 from the shaded jar.
[INFO] Excluding org.apache.hbase:hbase-server:jar:1.3.1 from the shaded jar.
[INFO] Excluding org.apache.hbase:hbase-procedure:jar:1.3.1 from the shaded jar.
[INFO] Excluding org.apache.hbase:hbase-prefix-tree:jar:1.3.1 from the shaded 
jar.
[INFO] Excluding commons-httpclient:commons-httpclient:jar:3.1 from the shaded 
jar.
[INFO] Excluding com.sun.jersey:jersey-core:jar:1.9 from the shaded jar.
[INFO] Excluding com.sun.jersey:jersey-server:jar:1.9 from the shaded jar.
[INFO] Excluding asm:asm:jar:3.1 from the shaded jar.
[INFO] Excluding org.mortbay.jetty:jetty:jar:6.1.26 from the shaded jar.
[INFO] Excluding org.mortbay.jetty:jetty-sslengine:jar:6.1.26 from the shaded 
jar.
[INFO] Excluding org.mortbay.jetty:jsp-2.1:jar:6.1.14 from the shaded jar.
[INFO] Excluding org.mortbay.jetty:jsp-api-2.1:jar:6.1.14 from the shaded jar.
[INFO] Excluding org.mortbay.jetty:servlet-api-2.5:jar:6.1.14 from the shaded 
jar.
[INFO] Excluding tomcat:jasper-compiler:jar:5.5.23 from the shaded jar.
[INFO] Excluding tomcat:jasper-runtime:jar:5.5.23 from the shaded jar.
[INFO] Excluding commons-el:commons-el:jar:1.0 from the shaded jar.
[INFO] Excluding org.jamon:jamon-runtime:jar:2.4.1 from the shaded jar.
[INFO] Excluding org.apache.hbase:hbase-hadoop-compat:jar:1.3.1 from the shaded 
jar.
[INFO] Excluding org.apache.hbase:hbase-hadoop2-compat:jar:1.3.1 from the 
shaded jar.
[INFO] Excluding org.apache.hadoop:hadoop-common:jar:2.7.1 from the shaded jar.
[INFO] Excluding xmlenc:xmlenc:jar:0.52 from the shaded jar.
[INFO] Excluding commons-net:commons-net:jar:3.1 from the shaded jar.
[INFO] Excluding javax.servlet:servlet-api:jar:2.5 from the shaded jar.
[INFO] Excluding javax.servlet.jsp:jsp-api:jar:2.1 from the shaded jar.
[INFO] Excluding 

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

2018-04-27 Thread Apache Jenkins Server
See 


Changes:

[jtaylor] PHOENIX-4716 ParameterizedTransactionIT is failing in 0.98 branch

--
[...truncated 791.15 KB...]
[INFO] 
[INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
[INFO] 
[INFO] 
[INFO] --- maven-failsafe-plugin:2.20:integration-test 
(NeedTheirOwnClusterTests) @ phoenix-hive ---
[INFO] 
[INFO] ---
[INFO]  T E S T S
[INFO] ---
[INFO] Running org.apache.phoenix.hive.HivePhoenixStoreIT
[WARNING] Tests run: 1, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 0.005 
s - in org.apache.phoenix.hive.HivePhoenixStoreIT
[INFO] Running org.apache.phoenix.hive.HiveTezIT
[INFO] Running org.apache.phoenix.hive.HiveMapReduceIT
[ERROR] Tests run: 7, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 322.339 
s <<< FAILURE! - in org.apache.phoenix.hive.HiveTezIT
[ERROR] testTimestampPredicate(org.apache.phoenix.hive.HiveTezIT)  Time 
elapsed: 29.619 s  <<< FAILURE!
junit.framework.AssertionFailedError: 
Unexpected exception junit.framework.AssertionFailedError: Client Execution 
results failed with error code = 1
at junit.framework.Assert.fail(Assert.java:57)
at 
org.apache.phoenix.hive.HiveTestUtil.failedDiff(HiveTestUtil.java:1230)
at 
org.apache.phoenix.hive.BaseHivePhoenixStoreIT.runTest(BaseHivePhoenixStoreIT.java:127)
at 
org.apache.phoenix.hive.HivePhoenixStoreIT.testTimestampPredicate(HivePhoenixStoreIT.java:339)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at 
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at 
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at 
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at 
org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at 
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at 
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at 
org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
at 
org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.junit.runners.Suite.runChild(Suite.java:128)
at org.junit.runners.Suite.runChild(Suite.java:27)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.apache.maven.surefire.junitcore.JUnitCore.run(JUnitCore.java:55)
at 
org.apache.maven.surefire.junitcore.JUnitCoreWrapper.createRequestAndRun(JUnitCoreWrapper.java:137)
at 
org.apache.maven.surefire.junitcore.JUnitCoreWrapper.executeEager(JUnitCoreWrapper.java:107)
at 
org.apache.maven.surefire.junitcore.JUnitCoreWrapper.execute(JUnitCoreWrapper.java:83)
at 
org.apache.maven.surefire.junitcore.JUnitCoreWrapper.execute(JUnitCoreWrapper.java:75)
at 
org.apache.maven.surefire.junitcore.JUnitCoreProvider.invoke(JUnitCoreProvider.java:157)
at 
org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:386)
at 
org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:323)
at 
org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:143)

 running 
SELECT * from timeStampTable WHERE ts between '2013-01-02 01:01:01.123455' and  
'2013-01-02 12:01:02.123457789' AND id = 10

[ERROR] Tests run: 7, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 424.735 
s <<< FAILURE! - in org.apache.phoenix.hive.HiveMapReduceIT
[ERROR] 

Build failed in Jenkins: Phoenix | Master #2010

2018-04-27 Thread Apache Jenkins Server
See 


Changes:

[jtaylor] PHOENIX-4716 ParameterizedTransactionIT is failing in 0.98 branch

--
[...truncated 109.49 KB...]
[INFO] Tests run: 40, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 483.557 
s - in org.apache.phoenix.end2end.index.LocalMutableTxIndexIT
[INFO] Running org.apache.phoenix.end2end.join.SortMergeJoinLocalIndexIT
[INFO] Running org.apache.phoenix.end2end.join.SortMergeJoinNoIndexIT
[INFO] Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 102.781 
s - in org.apache.phoenix.end2end.join.HashJoinMoreIT
[INFO] Running org.apache.phoenix.end2end.join.SubqueryIT
[INFO] Tests run: 33, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 361.203 
s - in org.apache.phoenix.end2end.join.HashJoinNoIndexIT
[INFO] Running org.apache.phoenix.end2end.join.SubqueryUsingSortMergeJoinIT
[INFO] Tests run: 34, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 369.009 
s - in org.apache.phoenix.end2end.join.SortMergeJoinNoIndexIT
[INFO] Tests run: 33, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 612.822 
s - in org.apache.phoenix.end2end.join.HashJoinGlobalIndexIT
[INFO] Running org.apache.phoenix.end2end.salted.SaltedTableIT
[INFO] Tests run: 24, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 394.551 
s - in org.apache.phoenix.end2end.join.SubqueryIT
[INFO] Running org.apache.phoenix.end2end.salted.SaltedTableUpsertSelectIT
[INFO] Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 27.18 s 
- in org.apache.phoenix.end2end.salted.SaltedTableIT
[INFO] Running org.apache.phoenix.iterate.PhoenixQueryTimeoutIT
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 9.156 s 
- in org.apache.phoenix.iterate.PhoenixQueryTimeoutIT
[INFO] Running org.apache.phoenix.iterate.RoundRobinResultIteratorIT
[INFO] Tests run: 80, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 876.626 
s - in org.apache.phoenix.end2end.index.MutableIndexIT
[INFO] Running org.apache.phoenix.end2end.salted.SaltedTableVarLengthRowKeyIT
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 4.345 s 
- in org.apache.phoenix.end2end.salted.SaltedTableVarLengthRowKeyIT
[INFO] Running org.apache.phoenix.rpc.UpdateCacheIT
[INFO] Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 51.443 s 
- in org.apache.phoenix.end2end.salted.SaltedTableUpsertSelectIT
[INFO] Running org.apache.phoenix.trace.PhoenixTableMetricsWriterIT
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 14.5 s - 
in org.apache.phoenix.trace.PhoenixTableMetricsWriterIT
[INFO] Running org.apache.phoenix.trace.PhoenixTracingEndToEndIT
[INFO] Running org.apache.phoenix.replication.SystemCatalogWALEntryFilterIT
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.286 s 
- in org.apache.phoenix.replication.SystemCatalogWALEntryFilterIT
[INFO] Running org.apache.phoenix.tx.FlappingTransactionIT
[INFO] Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 43.974 s 
- in org.apache.phoenix.rpc.UpdateCacheIT
[INFO] Running org.apache.phoenix.tx.ParameterizedTransactionIT
[INFO] Tests run: 9, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 75.51 s 
- in org.apache.phoenix.iterate.RoundRobinResultIteratorIT
[INFO] Running org.apache.phoenix.tx.TransactionIT
[INFO] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 18.932 s 
- in org.apache.phoenix.tx.FlappingTransactionIT
[INFO] Running org.apache.phoenix.tx.TxCheckpointIT
[INFO] Tests run: 34, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 643.239 
s - in org.apache.phoenix.end2end.join.SortMergeJoinGlobalIndexIT
[INFO] Running org.apache.phoenix.util.IndexScrutinyIT
[INFO] Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 104.68 s 
- in org.apache.phoenix.trace.PhoenixTracingEndToEndIT
[INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 29.669 s 
- in org.apache.phoenix.util.IndexScrutinyIT
[INFO] Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 96.955 s 
- in org.apache.phoenix.tx.TransactionIT
[INFO] Tests run: 15, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 279.173 
s - in org.apache.phoenix.end2end.join.SubqueryUsingSortMergeJoinIT
[INFO] Tests run: 34, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 807.856 
s - in org.apache.phoenix.end2end.join.HashJoinLocalIndexIT
[INFO] Tests run: 34, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 809.726 
s - in org.apache.phoenix.end2end.join.SortMergeJoinLocalIndexIT
[WARNING] Tests run: 52, Failures: 0, Errors: 0, Skipped: 4, Time elapsed: 
351.499 s - in org.apache.phoenix.tx.ParameterizedTransactionIT
[INFO] Tests run: 40, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 424.61 
s - in org.apache.phoenix.tx.TxCheckpointIT
[INFO] 
[INFO] Results:
[INFO] 
[ERROR] Failures: 
[ERROR]   ConcurrentMutationsIT.testConcurrentDeletesAndUpsertValues:214 
Expected to find PK in 

Build failed in Jenkins: Phoenix | 4.x-HBase-0.98 #1873

2018-04-27 Thread Apache Jenkins Server
See 


Changes:

[jtaylor] PHOENIX-4716 ParameterizedTransactionIT is failing in 0.98 branch

--
[...truncated 103.01 KB...]
[INFO] Running org.apache.phoenix.end2end.index.GlobalMutableTxIndexIT
[INFO] 
[INFO] Results:
[INFO] 
[WARNING] Tests run: 2498, Failures: 0, Errors: 0, Skipped: 1
[INFO] 
[INFO] 
[INFO] --- maven-failsafe-plugin:2.20:integration-test (HBaseManagedTimeTests) 
@ phoenix-core ---
[INFO] 
[INFO] ---
[INFO]  T E S T S
[INFO] ---
[INFO] 
[INFO] Results:
[INFO] 
[INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
[INFO] 
[INFO] 
[INFO] --- maven-failsafe-plugin:2.20:integration-test 
(NeedTheirOwnClusterTests) @ phoenix-core ---
[INFO] 
[INFO] ---
[INFO]  T E S T S
[INFO] ---
[INFO] Running 
org.apache.hadoop.hbase.regionserver.wal.WALReplayWithIndexWritesAndCompressedWALIT
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 47.239 s 
- in 
org.apache.hadoop.hbase.regionserver.wal.WALReplayWithIndexWritesAndCompressedWALIT
[INFO] Running 
org.apache.hadoop.hbase.regionserver.wal.WALRecoveryRegionPostOpenIT
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 8.975 s 
- in org.apache.hadoop.hbase.regionserver.wal.WALRecoveryRegionPostOpenIT
[INFO] Running 
org.apache.phoenix.end2end.ColumnEncodedImmutableTxStatsCollectorIT
[INFO] Running 
org.apache.phoenix.end2end.ColumnEncodedMutableNonTxStatsCollectorIT
[INFO] Running 
org.apache.phoenix.end2end.ColumnEncodedImmutableNonTxStatsCollectorIT
[INFO] Running org.apache.phoenix.end2end.ColumnEncodedMutableTxStatsCollectorIT
[INFO] Running org.apache.phoenix.end2end.ConnectionUtilIT
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 17.119 s 
- in org.apache.phoenix.end2end.ConnectionUtilIT
[WARNING] Tests run: 26, Failures: 0, Errors: 0, Skipped: 4, Time elapsed: 
81.139 s - in 
org.apache.phoenix.end2end.ColumnEncodedImmutableTxStatsCollectorIT
[WARNING] Tests run: 26, Failures: 0, Errors: 0, Skipped: 4, Time elapsed: 
82.554 s - in 
org.apache.phoenix.end2end.ColumnEncodedImmutableNonTxStatsCollectorIT
[WARNING] Tests run: 26, Failures: 0, Errors: 0, Skipped: 4, Time elapsed: 
86.669 s - in 
org.apache.phoenix.end2end.ColumnEncodedMutableNonTxStatsCollectorIT
[INFO] Running org.apache.phoenix.end2end.ContextClassloaderIT
[INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 3.129 s 
- in org.apache.phoenix.end2end.ContextClassloaderIT
[WARNING] Tests run: 26, Failures: 0, Errors: 0, Skipped: 4, Time elapsed: 
85.444 s - in org.apache.phoenix.end2end.ColumnEncodedMutableTxStatsCollectorIT
[INFO] Running org.apache.phoenix.end2end.CountDistinctCompressionIT
[INFO] Running org.apache.phoenix.end2end.CostBasedDecisionIT
[INFO] Running org.apache.phoenix.end2end.CsvBulkLoadToolIT
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 3.01 s - 
in org.apache.phoenix.end2end.CountDistinctCompressionIT
[INFO] Running org.apache.phoenix.end2end.DropSchemaIT
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 9.652 s 
- in org.apache.phoenix.end2end.DropSchemaIT
[INFO] Running org.apache.phoenix.end2end.FlappingLocalIndexIT
[INFO] Running org.apache.phoenix.end2end.IndexExtendedIT
[INFO] Running org.apache.phoenix.end2end.IndexScrutinyToolIT
[INFO] Tests run: 12, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 126.354 
s - in org.apache.phoenix.end2end.CsvBulkLoadToolIT
[INFO] Running org.apache.phoenix.end2end.IndexToolForPartialBuildIT
[INFO] Tests run: 12, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 122.56 
s - in org.apache.phoenix.end2end.FlappingLocalIndexIT
[INFO] Tests run: 32, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 111.139 
s - in org.apache.phoenix.end2end.IndexExtendedIT
[INFO] Running 
org.apache.phoenix.end2end.IndexToolForPartialBuildWithNamespaceEnabledIT
[INFO] Running org.apache.phoenix.end2end.IndexToolIT
[INFO] Tests run: 20, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 446.857 
s - in org.apache.phoenix.end2end.CostBasedDecisionIT
[INFO] Tests run: 33, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 392.767 
s - in org.apache.phoenix.end2end.IndexScrutinyToolIT
[INFO] Running org.apache.phoenix.end2end.MigrateSystemTablesToSystemNamespaceIT
[INFO] Running org.apache.phoenix.end2end.LocalIndexSplitMergeIT
[INFO] Tests run: 32, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 317.884 
s - in org.apache.phoenix.end2end.IndexToolIT
[INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 64.671 s 
- in org.apache.phoenix.end2end.LocalIndexSplitMergeIT
[INFO] Running 
org.apache.phoenix.end2end.NonColumnEncodedImmutableNonTxStatsCollectorIT
[INFO] 

phoenix git commit: PHOENIX-4716 ParameterizedTransactionIT is failing in 0.98 branch

2018-04-27 Thread jamestaylor
Repository: phoenix
Updated Branches:
  refs/heads/5.x-HBase-2.0 27b3ac348 -> 8e2a64e22


PHOENIX-4716 ParameterizedTransactionIT is failing in 0.98 branch


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

Branch: refs/heads/5.x-HBase-2.0
Commit: 8e2a64e22e360ec9f4090154ed8f989b18ad0a43
Parents: 27b3ac3
Author: James Taylor 
Authored: Fri Apr 27 18:25:56 2018 -0700
Committer: James Taylor 
Committed: Fri Apr 27 18:37:46 2018 -0700

--
 .../phoenix/tx/ParameterizedTransactionIT.java  | 37 +++-
 1 file changed, 20 insertions(+), 17 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/8e2a64e2/phoenix-core/src/it/java/org/apache/phoenix/tx/ParameterizedTransactionIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/tx/ParameterizedTransactionIT.java
 
b/phoenix-core/src/it/java/org/apache/phoenix/tx/ParameterizedTransactionIT.java
index 1f02386..ee3a600 100644
--- 
a/phoenix-core/src/it/java/org/apache/phoenix/tx/ParameterizedTransactionIT.java
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/tx/ParameterizedTransactionIT.java
@@ -73,12 +73,15 @@ public class ParameterizedTransactionIT extends 
ParallelStatsDisabledIT {
 private final String tableDDLOptions;
 
 public ParameterizedTransactionIT(boolean mutable, boolean columnEncoded) {
-StringBuilder optionBuilder = new StringBuilder("TRANSACTIONAL=true");
+StringBuilder optionBuilder = new StringBuilder();
 if (!columnEncoded) {
-optionBuilder.append(",COLUMN_ENCODED_BYTES=0");
+optionBuilder.append("COLUMN_ENCODED_BYTES=0");
 }
 if (!mutable) {
-optionBuilder.append(",IMMUTABLE_ROWS=true");
+if (optionBuilder.length() > 0) {
+optionBuilder.append(",");
+}
+optionBuilder.append("IMMUTABLE_ROWS=true");
 if (!columnEncoded) {
 
optionBuilder.append(",IMMUTABLE_STORAGE_SCHEME="+PTableImpl.ImmutableStorageScheme.ONE_CELL_PER_COLUMN);
 }
@@ -99,7 +102,7 @@ public class ParameterizedTransactionIT extends 
ParallelStatsDisabledIT {
 String fullTableName = INDEX_DATA_SCHEMA + 
QueryConstants.NAME_SEPARATOR + transTableName;
 String selectSql = "SELECT * FROM "+ fullTableName;
 try (Connection conn = DriverManager.getConnection(getUrl())) {
-conn.createStatement().execute("create table " + fullTableName + 
TestUtil.TEST_TABLE_SCHEMA + tableDDLOptions);
+conn.createStatement().execute("create table " + fullTableName + 
TestUtil.TEST_TABLE_SCHEMA + tableDDLOptions + (tableDDLOptions.length() > 0 ? 
"," : "") + "TRANSACTIONAL=true");
 conn.setAutoCommit(false);
 ResultSet rs = conn.createStatement().executeQuery(selectSql);
 assertFalse(rs.next());
@@ -134,7 +137,7 @@ public class ParameterizedTransactionIT extends 
ParallelStatsDisabledIT {
 String fullTableName = INDEX_DATA_SCHEMA + 
QueryConstants.NAME_SEPARATOR + transTableName;
 String selectSql = "SELECT * FROM "+fullTableName;
 try (Connection conn = DriverManager.getConnection(getUrl())) {
-conn.createStatement().execute("create table " + fullTableName + 
TestUtil.TEST_TABLE_SCHEMA + tableDDLOptions);
+conn.createStatement().execute("create table " + fullTableName + 
TestUtil.TEST_TABLE_SCHEMA + tableDDLOptions + (tableDDLOptions.length() > 0 ? 
"," : "") + "TRANSACTIONAL=true");
 conn.setAutoCommit(false);
 ResultSet rs = conn.createStatement().executeQuery(selectSql);
 assertFalse(rs.next());
@@ -167,7 +170,7 @@ public class ParameterizedTransactionIT extends 
ParallelStatsDisabledIT {
 String transTableName = generateUniqueName();
 String fullTableName = INDEX_DATA_SCHEMA + 
QueryConstants.NAME_SEPARATOR + transTableName;
 try (Connection conn = DriverManager.getConnection(getUrl())) {
-conn.createStatement().execute("create table " + fullTableName + 
TestUtil.TEST_TABLE_SCHEMA + tableDDLOptions);
+conn.createStatement().execute("create table " + fullTableName + 
TestUtil.TEST_TABLE_SCHEMA + tableDDLOptions + (tableDDLOptions.length() > 0 ? 
"," : "") + "TRANSACTIONAL=true");
 conn.setAutoCommit(true);
 // verify no rows returned
 ResultSet rs = conn.createStatement().executeQuery("SELECT * FROM 
" + fullTableName);
@@ -180,7 +183,7 @@ public class ParameterizedTransactionIT 

phoenix git commit: PHOENIX-4716 ParameterizedTransactionIT is failing in 0.98 branch

2018-04-27 Thread jamestaylor
Repository: phoenix
Updated Branches:
  refs/heads/master fc194c568 -> d10151e33


PHOENIX-4716 ParameterizedTransactionIT is failing in 0.98 branch


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

Branch: refs/heads/master
Commit: d10151e33615cacd01e634fef896e8644fced890
Parents: fc194c5
Author: James Taylor 
Authored: Fri Apr 27 18:25:56 2018 -0700
Committer: James Taylor 
Committed: Fri Apr 27 18:37:16 2018 -0700

--
 .../phoenix/tx/ParameterizedTransactionIT.java  | 37 +++-
 1 file changed, 20 insertions(+), 17 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/d10151e3/phoenix-core/src/it/java/org/apache/phoenix/tx/ParameterizedTransactionIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/tx/ParameterizedTransactionIT.java
 
b/phoenix-core/src/it/java/org/apache/phoenix/tx/ParameterizedTransactionIT.java
index ce01e2b..580f055 100644
--- 
a/phoenix-core/src/it/java/org/apache/phoenix/tx/ParameterizedTransactionIT.java
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/tx/ParameterizedTransactionIT.java
@@ -71,12 +71,15 @@ public class ParameterizedTransactionIT extends 
ParallelStatsDisabledIT {
 private final String tableDDLOptions;
 
 public ParameterizedTransactionIT(boolean mutable, boolean columnEncoded) {
-StringBuilder optionBuilder = new StringBuilder("TRANSACTIONAL=true");
+StringBuilder optionBuilder = new StringBuilder();
 if (!columnEncoded) {
-optionBuilder.append(",COLUMN_ENCODED_BYTES=0");
+optionBuilder.append("COLUMN_ENCODED_BYTES=0");
 }
 if (!mutable) {
-optionBuilder.append(",IMMUTABLE_ROWS=true");
+if (optionBuilder.length() > 0) {
+optionBuilder.append(",");
+}
+optionBuilder.append("IMMUTABLE_ROWS=true");
 if (!columnEncoded) {
 
optionBuilder.append(",IMMUTABLE_STORAGE_SCHEME="+PTableImpl.ImmutableStorageScheme.ONE_CELL_PER_COLUMN);
 }
@@ -97,7 +100,7 @@ public class ParameterizedTransactionIT extends 
ParallelStatsDisabledIT {
 String fullTableName = INDEX_DATA_SCHEMA + 
QueryConstants.NAME_SEPARATOR + transTableName;
 String selectSql = "SELECT * FROM "+ fullTableName;
 try (Connection conn = DriverManager.getConnection(getUrl())) {
-conn.createStatement().execute("create table " + fullTableName + 
TestUtil.TEST_TABLE_SCHEMA + tableDDLOptions);
+conn.createStatement().execute("create table " + fullTableName + 
TestUtil.TEST_TABLE_SCHEMA + tableDDLOptions + (tableDDLOptions.length() > 0 ? 
"," : "") + "TRANSACTIONAL=true");
 conn.setAutoCommit(false);
 ResultSet rs = conn.createStatement().executeQuery(selectSql);
 assertFalse(rs.next());
@@ -132,7 +135,7 @@ public class ParameterizedTransactionIT extends 
ParallelStatsDisabledIT {
 String fullTableName = INDEX_DATA_SCHEMA + 
QueryConstants.NAME_SEPARATOR + transTableName;
 String selectSql = "SELECT * FROM "+fullTableName;
 try (Connection conn = DriverManager.getConnection(getUrl())) {
-conn.createStatement().execute("create table " + fullTableName + 
TestUtil.TEST_TABLE_SCHEMA + tableDDLOptions);
+conn.createStatement().execute("create table " + fullTableName + 
TestUtil.TEST_TABLE_SCHEMA + tableDDLOptions + (tableDDLOptions.length() > 0 ? 
"," : "") + "TRANSACTIONAL=true");
 conn.setAutoCommit(false);
 ResultSet rs = conn.createStatement().executeQuery(selectSql);
 assertFalse(rs.next());
@@ -165,7 +168,7 @@ public class ParameterizedTransactionIT extends 
ParallelStatsDisabledIT {
 String transTableName = generateUniqueName();
 String fullTableName = INDEX_DATA_SCHEMA + 
QueryConstants.NAME_SEPARATOR + transTableName;
 try (Connection conn = DriverManager.getConnection(getUrl())) {
-conn.createStatement().execute("create table " + fullTableName + 
TestUtil.TEST_TABLE_SCHEMA + tableDDLOptions);
+conn.createStatement().execute("create table " + fullTableName + 
TestUtil.TEST_TABLE_SCHEMA + tableDDLOptions + (tableDDLOptions.length() > 0 ? 
"," : "") + "TRANSACTIONAL=true");
 conn.setAutoCommit(true);
 // verify no rows returned
 ResultSet rs = conn.createStatement().executeQuery("SELECT * FROM 
" + fullTableName);
@@ -178,7 +181,7 @@ public class ParameterizedTransactionIT extends 

phoenix git commit: PHOENIX-4716 ParameterizedTransactionIT is failing in 0.98 branch

2018-04-27 Thread jamestaylor
Repository: phoenix
Updated Branches:
  refs/heads/4.x-HBase-1.3 59d704e4d -> c08d8e6b7


PHOENIX-4716 ParameterizedTransactionIT is failing in 0.98 branch


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

Branch: refs/heads/4.x-HBase-1.3
Commit: c08d8e6b74d8ee2a5006e05296e301587b3900de
Parents: 59d704e
Author: James Taylor 
Authored: Fri Apr 27 18:25:56 2018 -0700
Committer: James Taylor 
Committed: Fri Apr 27 18:36:56 2018 -0700

--
 .../phoenix/tx/ParameterizedTransactionIT.java  | 37 +++-
 1 file changed, 20 insertions(+), 17 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/c08d8e6b/phoenix-core/src/it/java/org/apache/phoenix/tx/ParameterizedTransactionIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/tx/ParameterizedTransactionIT.java
 
b/phoenix-core/src/it/java/org/apache/phoenix/tx/ParameterizedTransactionIT.java
index ce01e2b..580f055 100644
--- 
a/phoenix-core/src/it/java/org/apache/phoenix/tx/ParameterizedTransactionIT.java
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/tx/ParameterizedTransactionIT.java
@@ -71,12 +71,15 @@ public class ParameterizedTransactionIT extends 
ParallelStatsDisabledIT {
 private final String tableDDLOptions;
 
 public ParameterizedTransactionIT(boolean mutable, boolean columnEncoded) {
-StringBuilder optionBuilder = new StringBuilder("TRANSACTIONAL=true");
+StringBuilder optionBuilder = new StringBuilder();
 if (!columnEncoded) {
-optionBuilder.append(",COLUMN_ENCODED_BYTES=0");
+optionBuilder.append("COLUMN_ENCODED_BYTES=0");
 }
 if (!mutable) {
-optionBuilder.append(",IMMUTABLE_ROWS=true");
+if (optionBuilder.length() > 0) {
+optionBuilder.append(",");
+}
+optionBuilder.append("IMMUTABLE_ROWS=true");
 if (!columnEncoded) {
 
optionBuilder.append(",IMMUTABLE_STORAGE_SCHEME="+PTableImpl.ImmutableStorageScheme.ONE_CELL_PER_COLUMN);
 }
@@ -97,7 +100,7 @@ public class ParameterizedTransactionIT extends 
ParallelStatsDisabledIT {
 String fullTableName = INDEX_DATA_SCHEMA + 
QueryConstants.NAME_SEPARATOR + transTableName;
 String selectSql = "SELECT * FROM "+ fullTableName;
 try (Connection conn = DriverManager.getConnection(getUrl())) {
-conn.createStatement().execute("create table " + fullTableName + 
TestUtil.TEST_TABLE_SCHEMA + tableDDLOptions);
+conn.createStatement().execute("create table " + fullTableName + 
TestUtil.TEST_TABLE_SCHEMA + tableDDLOptions + (tableDDLOptions.length() > 0 ? 
"," : "") + "TRANSACTIONAL=true");
 conn.setAutoCommit(false);
 ResultSet rs = conn.createStatement().executeQuery(selectSql);
 assertFalse(rs.next());
@@ -132,7 +135,7 @@ public class ParameterizedTransactionIT extends 
ParallelStatsDisabledIT {
 String fullTableName = INDEX_DATA_SCHEMA + 
QueryConstants.NAME_SEPARATOR + transTableName;
 String selectSql = "SELECT * FROM "+fullTableName;
 try (Connection conn = DriverManager.getConnection(getUrl())) {
-conn.createStatement().execute("create table " + fullTableName + 
TestUtil.TEST_TABLE_SCHEMA + tableDDLOptions);
+conn.createStatement().execute("create table " + fullTableName + 
TestUtil.TEST_TABLE_SCHEMA + tableDDLOptions + (tableDDLOptions.length() > 0 ? 
"," : "") + "TRANSACTIONAL=true");
 conn.setAutoCommit(false);
 ResultSet rs = conn.createStatement().executeQuery(selectSql);
 assertFalse(rs.next());
@@ -165,7 +168,7 @@ public class ParameterizedTransactionIT extends 
ParallelStatsDisabledIT {
 String transTableName = generateUniqueName();
 String fullTableName = INDEX_DATA_SCHEMA + 
QueryConstants.NAME_SEPARATOR + transTableName;
 try (Connection conn = DriverManager.getConnection(getUrl())) {
-conn.createStatement().execute("create table " + fullTableName + 
TestUtil.TEST_TABLE_SCHEMA + tableDDLOptions);
+conn.createStatement().execute("create table " + fullTableName + 
TestUtil.TEST_TABLE_SCHEMA + tableDDLOptions + (tableDDLOptions.length() > 0 ? 
"," : "") + "TRANSACTIONAL=true");
 conn.setAutoCommit(true);
 // verify no rows returned
 ResultSet rs = conn.createStatement().executeQuery("SELECT * FROM 
" + fullTableName);
@@ -178,7 +181,7 @@ public class ParameterizedTransactionIT 

phoenix git commit: PHOENIX-4716 ParameterizedTransactionIT is failing in 0.98 branch

2018-04-27 Thread jamestaylor
Repository: phoenix
Updated Branches:
  refs/heads/4.x-cdh5.11 352903b88 -> fa0fb9e6c


PHOENIX-4716 ParameterizedTransactionIT is failing in 0.98 branch


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

Branch: refs/heads/4.x-cdh5.11
Commit: fa0fb9e6c022fc9560495797bab062fa5d2426e9
Parents: 352903b
Author: James Taylor 
Authored: Fri Apr 27 18:25:56 2018 -0700
Committer: James Taylor 
Committed: Fri Apr 27 18:36:31 2018 -0700

--
 .../phoenix/tx/ParameterizedTransactionIT.java  | 37 +++-
 1 file changed, 20 insertions(+), 17 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/fa0fb9e6/phoenix-core/src/it/java/org/apache/phoenix/tx/ParameterizedTransactionIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/tx/ParameterizedTransactionIT.java
 
b/phoenix-core/src/it/java/org/apache/phoenix/tx/ParameterizedTransactionIT.java
index ce01e2b..580f055 100644
--- 
a/phoenix-core/src/it/java/org/apache/phoenix/tx/ParameterizedTransactionIT.java
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/tx/ParameterizedTransactionIT.java
@@ -71,12 +71,15 @@ public class ParameterizedTransactionIT extends 
ParallelStatsDisabledIT {
 private final String tableDDLOptions;
 
 public ParameterizedTransactionIT(boolean mutable, boolean columnEncoded) {
-StringBuilder optionBuilder = new StringBuilder("TRANSACTIONAL=true");
+StringBuilder optionBuilder = new StringBuilder();
 if (!columnEncoded) {
-optionBuilder.append(",COLUMN_ENCODED_BYTES=0");
+optionBuilder.append("COLUMN_ENCODED_BYTES=0");
 }
 if (!mutable) {
-optionBuilder.append(",IMMUTABLE_ROWS=true");
+if (optionBuilder.length() > 0) {
+optionBuilder.append(",");
+}
+optionBuilder.append("IMMUTABLE_ROWS=true");
 if (!columnEncoded) {
 
optionBuilder.append(",IMMUTABLE_STORAGE_SCHEME="+PTableImpl.ImmutableStorageScheme.ONE_CELL_PER_COLUMN);
 }
@@ -97,7 +100,7 @@ public class ParameterizedTransactionIT extends 
ParallelStatsDisabledIT {
 String fullTableName = INDEX_DATA_SCHEMA + 
QueryConstants.NAME_SEPARATOR + transTableName;
 String selectSql = "SELECT * FROM "+ fullTableName;
 try (Connection conn = DriverManager.getConnection(getUrl())) {
-conn.createStatement().execute("create table " + fullTableName + 
TestUtil.TEST_TABLE_SCHEMA + tableDDLOptions);
+conn.createStatement().execute("create table " + fullTableName + 
TestUtil.TEST_TABLE_SCHEMA + tableDDLOptions + (tableDDLOptions.length() > 0 ? 
"," : "") + "TRANSACTIONAL=true");
 conn.setAutoCommit(false);
 ResultSet rs = conn.createStatement().executeQuery(selectSql);
 assertFalse(rs.next());
@@ -132,7 +135,7 @@ public class ParameterizedTransactionIT extends 
ParallelStatsDisabledIT {
 String fullTableName = INDEX_DATA_SCHEMA + 
QueryConstants.NAME_SEPARATOR + transTableName;
 String selectSql = "SELECT * FROM "+fullTableName;
 try (Connection conn = DriverManager.getConnection(getUrl())) {
-conn.createStatement().execute("create table " + fullTableName + 
TestUtil.TEST_TABLE_SCHEMA + tableDDLOptions);
+conn.createStatement().execute("create table " + fullTableName + 
TestUtil.TEST_TABLE_SCHEMA + tableDDLOptions + (tableDDLOptions.length() > 0 ? 
"," : "") + "TRANSACTIONAL=true");
 conn.setAutoCommit(false);
 ResultSet rs = conn.createStatement().executeQuery(selectSql);
 assertFalse(rs.next());
@@ -165,7 +168,7 @@ public class ParameterizedTransactionIT extends 
ParallelStatsDisabledIT {
 String transTableName = generateUniqueName();
 String fullTableName = INDEX_DATA_SCHEMA + 
QueryConstants.NAME_SEPARATOR + transTableName;
 try (Connection conn = DriverManager.getConnection(getUrl())) {
-conn.createStatement().execute("create table " + fullTableName + 
TestUtil.TEST_TABLE_SCHEMA + tableDDLOptions);
+conn.createStatement().execute("create table " + fullTableName + 
TestUtil.TEST_TABLE_SCHEMA + tableDDLOptions + (tableDDLOptions.length() > 0 ? 
"," : "") + "TRANSACTIONAL=true");
 conn.setAutoCommit(true);
 // verify no rows returned
 ResultSet rs = conn.createStatement().executeQuery("SELECT * FROM 
" + fullTableName);
@@ -178,7 +181,7 @@ public class ParameterizedTransactionIT 

phoenix git commit: PHOENIX-4716 ParameterizedTransactionIT is failing in 0.98 branch

2018-04-27 Thread jamestaylor
Repository: phoenix
Updated Branches:
  refs/heads/4.x-HBase-1.2 5d1d80fd7 -> 7f5d8d371


PHOENIX-4716 ParameterizedTransactionIT is failing in 0.98 branch


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

Branch: refs/heads/4.x-HBase-1.2
Commit: 7f5d8d37144e364503fba1f8e7d47c6f848dbedc
Parents: 5d1d80f
Author: James Taylor 
Authored: Fri Apr 27 18:25:56 2018 -0700
Committer: James Taylor 
Committed: Fri Apr 27 18:35:47 2018 -0700

--
 .../phoenix/tx/ParameterizedTransactionIT.java  | 37 +++-
 1 file changed, 20 insertions(+), 17 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/7f5d8d37/phoenix-core/src/it/java/org/apache/phoenix/tx/ParameterizedTransactionIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/tx/ParameterizedTransactionIT.java
 
b/phoenix-core/src/it/java/org/apache/phoenix/tx/ParameterizedTransactionIT.java
index ce01e2b..580f055 100644
--- 
a/phoenix-core/src/it/java/org/apache/phoenix/tx/ParameterizedTransactionIT.java
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/tx/ParameterizedTransactionIT.java
@@ -71,12 +71,15 @@ public class ParameterizedTransactionIT extends 
ParallelStatsDisabledIT {
 private final String tableDDLOptions;
 
 public ParameterizedTransactionIT(boolean mutable, boolean columnEncoded) {
-StringBuilder optionBuilder = new StringBuilder("TRANSACTIONAL=true");
+StringBuilder optionBuilder = new StringBuilder();
 if (!columnEncoded) {
-optionBuilder.append(",COLUMN_ENCODED_BYTES=0");
+optionBuilder.append("COLUMN_ENCODED_BYTES=0");
 }
 if (!mutable) {
-optionBuilder.append(",IMMUTABLE_ROWS=true");
+if (optionBuilder.length() > 0) {
+optionBuilder.append(",");
+}
+optionBuilder.append("IMMUTABLE_ROWS=true");
 if (!columnEncoded) {
 
optionBuilder.append(",IMMUTABLE_STORAGE_SCHEME="+PTableImpl.ImmutableStorageScheme.ONE_CELL_PER_COLUMN);
 }
@@ -97,7 +100,7 @@ public class ParameterizedTransactionIT extends 
ParallelStatsDisabledIT {
 String fullTableName = INDEX_DATA_SCHEMA + 
QueryConstants.NAME_SEPARATOR + transTableName;
 String selectSql = "SELECT * FROM "+ fullTableName;
 try (Connection conn = DriverManager.getConnection(getUrl())) {
-conn.createStatement().execute("create table " + fullTableName + 
TestUtil.TEST_TABLE_SCHEMA + tableDDLOptions);
+conn.createStatement().execute("create table " + fullTableName + 
TestUtil.TEST_TABLE_SCHEMA + tableDDLOptions + (tableDDLOptions.length() > 0 ? 
"," : "") + "TRANSACTIONAL=true");
 conn.setAutoCommit(false);
 ResultSet rs = conn.createStatement().executeQuery(selectSql);
 assertFalse(rs.next());
@@ -132,7 +135,7 @@ public class ParameterizedTransactionIT extends 
ParallelStatsDisabledIT {
 String fullTableName = INDEX_DATA_SCHEMA + 
QueryConstants.NAME_SEPARATOR + transTableName;
 String selectSql = "SELECT * FROM "+fullTableName;
 try (Connection conn = DriverManager.getConnection(getUrl())) {
-conn.createStatement().execute("create table " + fullTableName + 
TestUtil.TEST_TABLE_SCHEMA + tableDDLOptions);
+conn.createStatement().execute("create table " + fullTableName + 
TestUtil.TEST_TABLE_SCHEMA + tableDDLOptions + (tableDDLOptions.length() > 0 ? 
"," : "") + "TRANSACTIONAL=true");
 conn.setAutoCommit(false);
 ResultSet rs = conn.createStatement().executeQuery(selectSql);
 assertFalse(rs.next());
@@ -165,7 +168,7 @@ public class ParameterizedTransactionIT extends 
ParallelStatsDisabledIT {
 String transTableName = generateUniqueName();
 String fullTableName = INDEX_DATA_SCHEMA + 
QueryConstants.NAME_SEPARATOR + transTableName;
 try (Connection conn = DriverManager.getConnection(getUrl())) {
-conn.createStatement().execute("create table " + fullTableName + 
TestUtil.TEST_TABLE_SCHEMA + tableDDLOptions);
+conn.createStatement().execute("create table " + fullTableName + 
TestUtil.TEST_TABLE_SCHEMA + tableDDLOptions + (tableDDLOptions.length() > 0 ? 
"," : "") + "TRANSACTIONAL=true");
 conn.setAutoCommit(true);
 // verify no rows returned
 ResultSet rs = conn.createStatement().executeQuery("SELECT * FROM 
" + fullTableName);
@@ -178,7 +181,7 @@ public class ParameterizedTransactionIT 

phoenix git commit: PHOENIX-4716 ParameterizedTransactionIT is failing in 0.98 branch

2018-04-27 Thread jamestaylor
Repository: phoenix
Updated Branches:
  refs/heads/4.x-HBase-0.98 e2ebbf936 -> 6a893aeb9


PHOENIX-4716 ParameterizedTransactionIT is failing in 0.98 branch


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

Branch: refs/heads/4.x-HBase-0.98
Commit: 6a893aeb9bdfe7b355a3ab3b6e7ac17c9e1ce082
Parents: e2ebbf9
Author: James Taylor 
Authored: Fri Apr 27 18:25:56 2018 -0700
Committer: James Taylor 
Committed: Fri Apr 27 18:25:56 2018 -0700

--
 .../phoenix/tx/ParameterizedTransactionIT.java  | 38 +++-
 1 file changed, 21 insertions(+), 17 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/6a893aeb/phoenix-core/src/it/java/org/apache/phoenix/tx/ParameterizedTransactionIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/tx/ParameterizedTransactionIT.java
 
b/phoenix-core/src/it/java/org/apache/phoenix/tx/ParameterizedTransactionIT.java
index 5421801..7b513b9 100644
--- 
a/phoenix-core/src/it/java/org/apache/phoenix/tx/ParameterizedTransactionIT.java
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/tx/ParameterizedTransactionIT.java
@@ -71,12 +71,15 @@ public class ParameterizedTransactionIT extends 
ParallelStatsDisabledIT {
 private final String tableDDLOptions;
 
 public ParameterizedTransactionIT(boolean mutable, boolean columnEncoded) {
-StringBuilder optionBuilder = new StringBuilder("TRANSACTIONAL=true");
+StringBuilder optionBuilder = new StringBuilder();
 if (!columnEncoded) {
-optionBuilder.append(",COLUMN_ENCODED_BYTES=0");
+optionBuilder.append("COLUMN_ENCODED_BYTES=0");
 }
 if (!mutable) {
-optionBuilder.append(",IMMUTABLE_ROWS=true");
+if (optionBuilder.length() > 0) {
+optionBuilder.append(",");
+}
+optionBuilder.append("IMMUTABLE_ROWS=true");
 if (!columnEncoded) {
 
optionBuilder.append(",IMMUTABLE_STORAGE_SCHEME="+PTableImpl.ImmutableStorageScheme.ONE_CELL_PER_COLUMN);
 }
@@ -97,7 +100,7 @@ public class ParameterizedTransactionIT extends 
ParallelStatsDisabledIT {
 String fullTableName = INDEX_DATA_SCHEMA + 
QueryConstants.NAME_SEPARATOR + transTableName;
 String selectSql = "SELECT * FROM "+ fullTableName;
 try (Connection conn = DriverManager.getConnection(getUrl())) {
-conn.createStatement().execute("create table " + fullTableName + 
TestUtil.TEST_TABLE_SCHEMA + tableDDLOptions);
+conn.createStatement().execute("create table " + fullTableName + 
TestUtil.TEST_TABLE_SCHEMA + tableDDLOptions + (tableDDLOptions.length() > 0 ? 
"," : "") + "TRANSACTIONAL=true");
 conn.setAutoCommit(false);
 ResultSet rs = conn.createStatement().executeQuery(selectSql);
 assertFalse(rs.next());
@@ -132,7 +135,7 @@ public class ParameterizedTransactionIT extends 
ParallelStatsDisabledIT {
 String fullTableName = INDEX_DATA_SCHEMA + 
QueryConstants.NAME_SEPARATOR + transTableName;
 String selectSql = "SELECT * FROM "+fullTableName;
 try (Connection conn = DriverManager.getConnection(getUrl())) {
-conn.createStatement().execute("create table " + fullTableName + 
TestUtil.TEST_TABLE_SCHEMA + tableDDLOptions);
+conn.createStatement().execute("create table " + fullTableName + 
TestUtil.TEST_TABLE_SCHEMA + tableDDLOptions + (tableDDLOptions.length() > 0 ? 
"," : "") + "TRANSACTIONAL=true");
 conn.setAutoCommit(false);
 ResultSet rs = conn.createStatement().executeQuery(selectSql);
 assertFalse(rs.next());
@@ -165,7 +168,7 @@ public class ParameterizedTransactionIT extends 
ParallelStatsDisabledIT {
 String transTableName = generateUniqueName();
 String fullTableName = INDEX_DATA_SCHEMA + 
QueryConstants.NAME_SEPARATOR + transTableName;
 try (Connection conn = DriverManager.getConnection(getUrl())) {
-conn.createStatement().execute("create table " + fullTableName + 
TestUtil.TEST_TABLE_SCHEMA + tableDDLOptions);
+conn.createStatement().execute("create table " + fullTableName + 
TestUtil.TEST_TABLE_SCHEMA + tableDDLOptions + (tableDDLOptions.length() > 0 ? 
"," : "") + "TRANSACTIONAL=true");
 conn.setAutoCommit(true);
 // verify no rows returned
 ResultSet rs = conn.createStatement().executeQuery("SELECT * FROM 
" + fullTableName);
@@ -178,7 +181,7 @@ public class ParameterizedTransactionIT 

Jenkins build is back to normal : Phoenix-4.x-HBase-1.3 #109

2018-04-27 Thread Apache Jenkins Server
See 



Build failed in Jenkins: Phoenix | 4.x-HBase-0.98 #1872

2018-04-27 Thread Apache Jenkins Server
See 

--
[...truncated 111.03 KB...]
[INFO] Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 88.069 s 
- in org.apache.phoenix.trace.PhoenixTracingEndToEndIT
[INFO] Running org.apache.phoenix.util.IndexScrutinyIT
[INFO] Tests run: 34, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 381.289 
s - in org.apache.phoenix.end2end.join.HashJoinLocalIndexIT
[INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 8.003 s 
- in org.apache.phoenix.util.IndexScrutinyIT
[ERROR] Tests run: 52, Failures: 0, Errors: 2, Skipped: 4, Time elapsed: 95.146 
s <<< FAILURE! - in org.apache.phoenix.tx.ParameterizedTransactionIT
[ERROR] 
testNonTxToTxTable[TransactionIT_mutable=true,columnEncoded=false](org.apache.phoenix.tx.ParameterizedTransactionIT)
  Time elapsed: 1.213 s  <<< ERROR!
org.apache.phoenix.schema.IllegalDataException: 
java.net.SocketTimeoutException: callTimeout=120, callDuration=9000102: row 
'�  ' on table 'T001407' at 
region=T001407,,1524869717439.1054042b8222fc284e2ef093923fbdfb., 
hostname=jenkins-ubuntu3.apache.org,33782,1524869634753, seqNum=1
at 
org.apache.phoenix.tx.ParameterizedTransactionIT.testNonTxToTxTable(ParameterizedTransactionIT.java:288)
Caused by: java.net.SocketTimeoutException: callTimeout=120, 
callDuration=9000102: row '�  ' on table 'T001407' at 
region=T001407,,1524869717439.1054042b8222fc284e2ef093923fbdfb., 
hostname=jenkins-ubuntu3.apache.org,33782,1524869634753, seqNum=1
at 
org.apache.phoenix.tx.ParameterizedTransactionIT.testNonTxToTxTable(ParameterizedTransactionIT.java:288)
Caused by: org.apache.hadoop.hbase.exceptions.RegionOpeningException: 
org.apache.hadoop.hbase.exceptions.RegionOpeningException: Region 
T001407,,1524869717439.1054042b8222fc284e2ef093923fbdfb. is opening on 
jenkins-ubuntu3.apache.org,33782,1524869634753
at 
org.apache.hadoop.hbase.regionserver.HRegionServer.getRegionByEncodedName(HRegionServer.java:2857)
at 
org.apache.hadoop.hbase.regionserver.HRegionServer.getRegion(HRegionServer.java:4528)
at 
org.apache.hadoop.hbase.regionserver.HRegionServer.scan(HRegionServer.java:3246)
at 
org.apache.hadoop.hbase.protobuf.generated.ClientProtos$ClientService$2.callBlockingMethod(ClientProtos.java:32492)
at org.apache.hadoop.hbase.ipc.RpcServer.call(RpcServer.java:2195)
at org.apache.hadoop.hbase.ipc.CallRunner.run(CallRunner.java:104)
at 
org.apache.hadoop.hbase.ipc.RpcExecutor.consumerLoop(RpcExecutor.java:133)
at org.apache.hadoop.hbase.ipc.RpcExecutor$1.run(RpcExecutor.java:108)
at java.lang.Thread.run(Thread.java:745)

at 
org.apache.phoenix.tx.ParameterizedTransactionIT.testNonTxToTxTable(ParameterizedTransactionIT.java:288)
Caused by: org.apache.hadoop.hbase.ipc.RemoteWithExtrasException: 
org.apache.hadoop.hbase.exceptions.RegionOpeningException: Region 
T001407,,1524869717439.1054042b8222fc284e2ef093923fbdfb. is opening on 
jenkins-ubuntu3.apache.org,33782,1524869634753
at 
org.apache.hadoop.hbase.regionserver.HRegionServer.getRegionByEncodedName(HRegionServer.java:2857)
at 
org.apache.hadoop.hbase.regionserver.HRegionServer.getRegion(HRegionServer.java:4528)
at 
org.apache.hadoop.hbase.regionserver.HRegionServer.scan(HRegionServer.java:3246)
at 
org.apache.hadoop.hbase.protobuf.generated.ClientProtos$ClientService$2.callBlockingMethod(ClientProtos.java:32492)
at org.apache.hadoop.hbase.ipc.RpcServer.call(RpcServer.java:2195)
at org.apache.hadoop.hbase.ipc.CallRunner.run(CallRunner.java:104)
at 
org.apache.hadoop.hbase.ipc.RpcExecutor.consumerLoop(RpcExecutor.java:133)
at org.apache.hadoop.hbase.ipc.RpcExecutor$1.run(RpcExecutor.java:108)
at java.lang.Thread.run(Thread.java:745)

at 
org.apache.phoenix.tx.ParameterizedTransactionIT.testNonTxToTxTable(ParameterizedTransactionIT.java:288)

[ERROR] 
testNonTxToTxTable[TransactionIT_mutable=true,columnEncoded=true](org.apache.phoenix.tx.ParameterizedTransactionIT)
  Time elapsed: 1.505 s  <<< ERROR!
org.apache.phoenix.schema.IllegalDataException: 
java.net.SocketTimeoutException: callTimeout=120, callDuration=9000101: row 
'�  ' on table 'T001424' at 
region=T001424,,1524869738427.a0a37c3fa61b8e1d50d123193659032f., 
hostname=jenkins-ubuntu3.apache.org,33782,1524869634753, seqNum=1
at 
org.apache.phoenix.tx.ParameterizedTransactionIT.testNonTxToTxTable(ParameterizedTransactionIT.java:288)
Caused by: java.net.SocketTimeoutException: callTimeout=120, 
callDuration=9000101: row '�  ' on table 'T001424' at 
region=T001424,,1524869738427.a0a37c3fa61b8e1d50d123193659032f., 
hostname=jenkins-ubuntu3.apache.org,33782,1524869634753, seqNum=1
at 
org.apache.phoenix.tx.ParameterizedTransactionIT.testNonTxToTxTable(ParameterizedTransactionIT.java:288)
Caused by: 

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

2018-04-27 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
[jtaylor] PHOENIX-4705 Use XMLInputFactory.newInstance() instead of

[jtaylor] PHOENIX-4710 Don't set KEEP_DELETED_CELLS or VERSIONS for SYSTEM.LOG

[jtaylor] PHOENIX-4711 Unable to set property on table with VARBINARY as last

[jtaylor] PHOENIX-4709 Alter split policy in upgrade path for system tables



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.2 #344

2018-04-27 Thread Apache Jenkins Server
See 




Build failed in Jenkins: Phoenix | Master #2009

2018-04-27 Thread Apache Jenkins Server
See 


Changes:

[jtaylor] PHOENIX-4705 Use XMLInputFactory.newInstance() instead of

[jtaylor] PHOENIX-4710 Don't set KEEP_DELETED_CELLS or VERSIONS for SYSTEM.LOG

[jtaylor] PHOENIX-4711 Unable to set property on table with VARBINARY as last

[jtaylor] PHOENIX-4709 Alter split policy in upgrade path for system tables

--
[...truncated 109.41 KB...]
[INFO] Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 111.381 
s - in org.apache.phoenix.end2end.join.HashJoinMoreIT
[INFO] Running org.apache.phoenix.end2end.join.SortMergeJoinNoIndexIT
[INFO] Running org.apache.phoenix.end2end.join.SortMergeJoinLocalIndexIT
[INFO] Tests run: 40, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 554.232 
s - in org.apache.phoenix.end2end.index.LocalMutableTxIndexIT
[INFO] Running org.apache.phoenix.end2end.join.SubqueryIT
[INFO] Tests run: 33, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 390.536 
s - in org.apache.phoenix.end2end.join.HashJoinNoIndexIT
[INFO] Tests run: 34, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 398.025 
s - in org.apache.phoenix.end2end.join.SortMergeJoinNoIndexIT
[INFO] Running org.apache.phoenix.end2end.join.SubqueryUsingSortMergeJoinIT
[INFO] Tests run: 80, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 963.64 
s - in org.apache.phoenix.end2end.index.MutableIndexIT
[INFO] Running org.apache.phoenix.end2end.salted.SaltedTableIT
[INFO] Running org.apache.phoenix.end2end.salted.SaltedTableUpsertSelectIT
[INFO] Tests run: 33, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 672.938 
s - in org.apache.phoenix.end2end.join.HashJoinGlobalIndexIT
[INFO] Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 42.688 s 
- in org.apache.phoenix.end2end.salted.SaltedTableIT
[INFO] Running org.apache.phoenix.iterate.PhoenixQueryTimeoutIT
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 9.013 s 
- in org.apache.phoenix.iterate.PhoenixQueryTimeoutIT
[INFO] Running org.apache.phoenix.iterate.RoundRobinResultIteratorIT
[INFO] Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 68.171 s 
- in org.apache.phoenix.end2end.salted.SaltedTableUpsertSelectIT
[INFO] Running org.apache.phoenix.replication.SystemCatalogWALEntryFilterIT
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.653 s 
- in org.apache.phoenix.replication.SystemCatalogWALEntryFilterIT
[INFO] Running org.apache.phoenix.rpc.UpdateCacheIT
[INFO] Running org.apache.phoenix.end2end.salted.SaltedTableVarLengthRowKeyIT
[INFO] Tests run: 24, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 445.392 
s - in org.apache.phoenix.end2end.join.SubqueryIT
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 8.507 s 
- in org.apache.phoenix.end2end.salted.SaltedTableVarLengthRowKeyIT
[INFO] Running org.apache.phoenix.trace.PhoenixTracingEndToEndIT
[INFO] Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 44.066 s 
- in org.apache.phoenix.rpc.UpdateCacheIT
[INFO] Running org.apache.phoenix.tx.FlappingTransactionIT
[INFO] Tests run: 9, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 87.983 s 
- in org.apache.phoenix.iterate.RoundRobinResultIteratorIT
[INFO] Running org.apache.phoenix.tx.ParameterizedTransactionIT
[INFO] Running org.apache.phoenix.trace.PhoenixTableMetricsWriterIT
[INFO] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 18.073 s 
- in org.apache.phoenix.tx.FlappingTransactionIT
[INFO] Running org.apache.phoenix.tx.TransactionIT
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 14.566 s 
- in org.apache.phoenix.trace.PhoenixTableMetricsWriterIT
[INFO] Running org.apache.phoenix.tx.TxCheckpointIT
[INFO] Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 105.325 
s - in org.apache.phoenix.trace.PhoenixTracingEndToEndIT
[INFO] Running org.apache.phoenix.util.IndexScrutinyIT
[INFO] Tests run: 34, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 679.123 
s - in org.apache.phoenix.end2end.join.SortMergeJoinGlobalIndexIT
[INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 34.978 s 
- in org.apache.phoenix.util.IndexScrutinyIT
[INFO] Tests run: 15, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 292.774 
s - in org.apache.phoenix.end2end.join.SubqueryUsingSortMergeJoinIT
[INFO] Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 106.193 
s - in org.apache.phoenix.tx.TransactionIT
[INFO] Tests run: 34, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 878.959 
s - in org.apache.phoenix.end2end.join.HashJoinLocalIndexIT
[INFO] Tests run: 34, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 873.867 
s - in org.apache.phoenix.end2end.join.SortMergeJoinLocalIndexIT
[WARNING] Tests run: 52, Failures: 0, Errors: 0, Skipped: 4, Time elapsed: 
388.827 s - in org.apache.phoenix.tx.ParameterizedTransactionIT
[INFO] Tests run: 40, Failures: 0, 

Build failed in Jenkins: Phoenix-4.x-HBase-1.3 #108

2018-04-27 Thread Apache Jenkins Server
See 


Changes:

[jtaylor] PHOENIX-4705 Use XMLInputFactory.newInstance() instead of

[jtaylor] PHOENIX-4710 Don't set KEEP_DELETED_CELLS or VERSIONS for SYSTEM.LOG

[jtaylor] PHOENIX-4711 Unable to set property on table with VARBINARY as last

[jtaylor] PHOENIX-4709 Alter split policy in upgrade path for system tables

--
[...truncated 113.61 KB...]
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 6.209 s 
- in org.apache.hadoop.hbase.regionserver.wal.WALRecoveryRegionPostOpenIT
[INFO] Running 
org.apache.phoenix.end2end.ColumnEncodedImmutableNonTxStatsCollectorIT
[INFO] Running 
org.apache.phoenix.end2end.ColumnEncodedImmutableTxStatsCollectorIT
[INFO] Running 
org.apache.phoenix.end2end.ColumnEncodedMutableNonTxStatsCollectorIT
[INFO] Running org.apache.phoenix.end2end.ColumnEncodedMutableTxStatsCollectorIT
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 21.676 s 
- in org.apache.phoenix.end2end.ConnectionUtilIT
[INFO] Running org.apache.phoenix.end2end.ContextClassloaderIT
[INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.504 s 
- in org.apache.phoenix.end2end.ContextClassloaderIT
[INFO] Running org.apache.phoenix.end2end.CountDistinctCompressionIT
[INFO] Running org.apache.phoenix.end2end.CostBasedDecisionIT
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.523 s 
- in org.apache.phoenix.end2end.CountDistinctCompressionIT
[INFO] Running org.apache.phoenix.end2end.CsvBulkLoadToolIT
[ERROR] Tests run: 26, Failures: 0, Errors: 18, Skipped: 4, Time elapsed: 
69.075 s <<< FAILURE! - in 
org.apache.phoenix.end2end.ColumnEncodedMutableTxStatsCollectorIT
[ERROR] testRowCountAndByteCounts[mutable = true, transactional = true, 
isUserTableNamespaceMapped = false, columnEncoded = 
true](org.apache.phoenix.end2end.ColumnEncodedMutableTxStatsCollectorIT)  Time 
elapsed: 2.113 s  <<< ERROR!
java.lang.RuntimeException: org.apache.thrift.TException: Unable to discover 
transaction service.
Caused by: org.apache.thrift.TException: Unable to discover transaction service.

[ERROR] testSomeUpdateEmptyStats[mutable = true, transactional = true, 
isUserTableNamespaceMapped = false, columnEncoded = 
true](org.apache.phoenix.end2end.ColumnEncodedMutableTxStatsCollectorIT)  Time 
elapsed: 2.004 s  <<< ERROR!
java.lang.RuntimeException: org.apache.thrift.TException: Unable to discover 
transaction service.
Caused by: org.apache.thrift.TException: Unable to discover transaction service.

[ERROR] testUpdateStatsWithMultipleTables[mutable = true, transactional = true, 
isUserTableNamespaceMapped = false, columnEncoded = 
true](org.apache.phoenix.end2end.ColumnEncodedMutableTxStatsCollectorIT)  Time 
elapsed: 2.004 s  <<< ERROR!
java.lang.RuntimeException: org.apache.thrift.TException: Unable to discover 
transaction service.
Caused by: org.apache.thrift.TException: Unable to discover transaction service.

[ERROR] testUpdateStats[mutable = true, transactional = true, 
isUserTableNamespaceMapped = false, columnEncoded = 
true](org.apache.phoenix.end2end.ColumnEncodedMutableTxStatsCollectorIT)  Time 
elapsed: 2.005 s  <<< ERROR!
java.lang.RuntimeException: org.apache.thrift.TException: Unable to discover 
transaction service.
Caused by: org.apache.thrift.TException: Unable to discover transaction service.

[ERROR] testGuidePostWidthUsedInDefaultStatsCollector[mutable = true, 
transactional = true, isUserTableNamespaceMapped = false, columnEncoded = 
true](org.apache.phoenix.end2end.ColumnEncodedMutableTxStatsCollectorIT)  Time 
elapsed: 2.005 s  <<< ERROR!
java.lang.RuntimeException: org.apache.thrift.TException: Unable to discover 
transaction service.
Caused by: org.apache.thrift.TException: Unable to discover transaction service.

[ERROR] testNoDuplicatesAfterUpdateStatsWithDesc[mutable = true, transactional 
= true, isUserTableNamespaceMapped = false, columnEncoded = 
true](org.apache.phoenix.end2end.ColumnEncodedMutableTxStatsCollectorIT)  Time 
elapsed: 2.006 s  <<< ERROR!
java.lang.RuntimeException: org.apache.thrift.TException: Unable to discover 
transaction service.
Caused by: org.apache.thrift.TException: Unable to discover transaction service.

[ERROR] testNoDuplicatesAfterUpdateStatsWithSplits[mutable = true, 
transactional = true, isUserTableNamespaceMapped = false, columnEncoded = 
true](org.apache.phoenix.end2end.ColumnEncodedMutableTxStatsCollectorIT)  Time 
elapsed: 2.006 s  <<< ERROR!
java.lang.RuntimeException: org.apache.thrift.TException: Unable to discover 
transaction service.
Caused by: org.apache.thrift.TException: Unable to discover transaction service.

[ERROR] testUpdateEmptyStats[mutable = true, transactional = true, 
isUserTableNamespaceMapped = false, columnEncoded = 
true](org.apache.phoenix.end2end.ColumnEncodedMutableTxStatsCollectorIT)  Time 
elapsed: 2.005 s  <<< ERROR!

Build failed in Jenkins: Phoenix | 4.x-HBase-0.98 #1870

2018-04-27 Thread Apache Jenkins Server
See 


Changes:

[vincentpoon] Fix WALReplayWithIndexWritesAndCompressedWALIT failure in 
4.x-HBase-0.98

--
[...truncated 107.54 KB...]
[INFO] Running org.apache.phoenix.end2end.join.SortMergeJoinLocalIndexIT
[INFO] Tests run: 33, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 233.848 
s - in org.apache.phoenix.end2end.join.HashJoinGlobalIndexIT
[INFO] Running org.apache.phoenix.end2end.join.SortMergeJoinNoIndexIT
[INFO] Tests run: 34, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 241.412 
s - in org.apache.phoenix.end2end.join.SortMergeJoinGlobalIndexIT
[INFO] Running org.apache.phoenix.end2end.join.SubqueryIT
[INFO] Tests run: 80, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 567.667 
s - in org.apache.phoenix.end2end.index.MutableIndexIT
[INFO] Running org.apache.phoenix.end2end.join.SubqueryUsingSortMergeJoinIT
[INFO] Tests run: 34, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 141.155 
s - in org.apache.phoenix.end2end.join.SortMergeJoinNoIndexIT
[INFO] Running org.apache.phoenix.end2end.salted.SaltedTableIT
[INFO] Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 14.634 s 
- in org.apache.phoenix.end2end.salted.SaltedTableIT
[INFO] Running org.apache.phoenix.end2end.salted.SaltedTableUpsertSelectIT
[INFO] Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 25.5 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.344 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: 2.839 s 
- in org.apache.phoenix.iterate.PhoenixQueryTimeoutIT
[INFO] Running org.apache.phoenix.iterate.RoundRobinResultIteratorIT
[INFO] Tests run: 15, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 134.288 
s - in org.apache.phoenix.end2end.join.SubqueryUsingSortMergeJoinIT
[INFO] Tests run: 24, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 186.837 
s - in org.apache.phoenix.end2end.join.SubqueryIT
[INFO] Tests run: 34, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 483.952 
s - in org.apache.phoenix.end2end.join.HashJoinLocalIndexIT
[INFO] Running org.apache.phoenix.rpc.UpdateCacheIT
[INFO] Running org.apache.phoenix.trace.PhoenixTableMetricsWriterIT
[INFO] Tests run: 9, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 57.027 s 
- in org.apache.phoenix.iterate.RoundRobinResultIteratorIT
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 3.809 s 
- in org.apache.phoenix.trace.PhoenixTableMetricsWriterIT
[INFO] Running org.apache.phoenix.tx.FlappingTransactionIT
[INFO] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 6.081 s 
- in org.apache.phoenix.tx.FlappingTransactionIT
[INFO] Running org.apache.phoenix.tx.ParameterizedTransactionIT
[INFO] Running org.apache.phoenix.trace.PhoenixTraceReaderIT
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.962 s 
- in org.apache.phoenix.trace.PhoenixTraceReaderIT
[INFO] Running org.apache.phoenix.tx.TransactionIT
[INFO] Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 21.935 s 
- in org.apache.phoenix.rpc.UpdateCacheIT
[INFO] Running org.apache.phoenix.tx.TxCheckpointIT
[INFO] Running org.apache.phoenix.trace.PhoenixTracingEndToEndIT
[INFO] Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 36.844 s 
- in org.apache.phoenix.tx.TransactionIT
[INFO] Running org.apache.phoenix.util.IndexScrutinyIT
[INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 13.694 s 
- in org.apache.phoenix.util.IndexScrutinyIT
[INFO] Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 84.876 s 
- in org.apache.phoenix.trace.PhoenixTracingEndToEndIT
[ERROR] Tests run: 52, Failures: 0, Errors: 1, Skipped: 4, Time elapsed: 
161.189 s <<< FAILURE! - in org.apache.phoenix.tx.ParameterizedTransactionIT
[ERROR] 
testNonTxToTxTable[TransactionIT_mutable=true,columnEncoded=true](org.apache.phoenix.tx.ParameterizedTransactionIT)
  Time elapsed: 3.755 s  <<< ERROR!
org.apache.phoenix.schema.IllegalDataException: 
java.net.SocketTimeoutException: callTimeout=120, callDuration=9000102: row 
'?  ' on table 'T001207' at 
region=T001207,,1524857568754.52ecd1e5ceef62bd681256ecc799cdc1., 
hostname=asf935.gq1.ygridcore.net,38929,1524857405800, seqNum=1
at 
org.apache.phoenix.tx.ParameterizedTransactionIT.testNonTxToTxTable(ParameterizedTransactionIT.java:288)
Caused by: java.net.SocketTimeoutException: callTimeout=120, 
callDuration=9000102: row '?  ' on table 'T001207' at 
region=T001207,,1524857568754.52ecd1e5ceef62bd681256ecc799cdc1., 
hostname=asf935.gq1.ygridcore.net,38929,1524857405800, seqNum=1
at 

[1/5] phoenix git commit: PHOENIX-4709 Alter split policy in upgrade path for system tables [Forced Update!]

2018-04-27 Thread pboado
Repository: phoenix
Updated Branches:
  refs/heads/4.x-cdh5.14 c2fab7e9b -> 0f85035c0 (forced update)


PHOENIX-4709 Alter split policy in upgrade path for system tables


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

Branch: refs/heads/4.x-cdh5.14
Commit: 352903b88384191114d07d534122f28a090da528
Parents: ae8a6e8
Author: James Taylor 
Authored: Thu Apr 26 13:38:05 2018 -0700
Committer: James Taylor 
Committed: Fri Apr 27 11:45:39 2018 -0700

--
 .../phoenix/jdbc/PhoenixDatabaseMetaData.java   |   1 +
 .../query/ConnectionQueryServicesImpl.java  |  17 +++
 .../apache/phoenix/query/QueryConstants.java| 109 ++-
 3 files changed, 124 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/352903b8/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 d56628a..320c6e7 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
@@ -217,6 +217,7 @@ public class PhoenixDatabaseMetaData implements 
DatabaseMetaData {
 
 public static final String TYPE_SEQUENCE = "SEQUENCE";
 public static final String SYSTEM_FUNCTION_TABLE = "FUNCTION";
+public static final String SYSTEM_FUNCTION = SYSTEM_CATALOG_SCHEMA + 
QueryConstants.NAME_SEPARATOR + "\"FUNCTION\"";
 public static final String SYSTEM_FUNCTION_NAME = 
SchemaUtil.getTableName(SYSTEM_CATALOG_SCHEMA, SYSTEM_FUNCTION_TABLE);
 public static final byte[] SYSTEM_FUNCTION_NAME_BYTES = 
Bytes.toBytes(SYSTEM_FUNCTION_NAME);
 public static final TableName SYSTEM_FUNCTION_HBASE_TABLE_NAME = 
TableName.valueOf(SYSTEM_FUNCTION_NAME);

http://git-wip-us.apache.org/repos/asf/phoenix/blob/352903b8/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
index 860540d..d55ced4 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
@@ -214,6 +214,8 @@ import org.apache.phoenix.schema.Sequence;
 import org.apache.phoenix.schema.SequenceAllocation;
 import org.apache.phoenix.schema.SequenceKey;
 import org.apache.phoenix.schema.SortOrder;
+import org.apache.phoenix.schema.SystemFunctionSplitPolicy;
+import org.apache.phoenix.schema.SystemStatsSplitPolicy;
 import org.apache.phoenix.schema.TableAlreadyExistsException;
 import org.apache.phoenix.schema.TableNotFoundException;
 import org.apache.phoenix.schema.TableProperty;
@@ -2949,6 +2951,21 @@ public class ConnectionQueryServicesImpl extends 
DelegateQueryServices implement
   MetaDataProtocol.MIN_SYSTEM_TABLE_TIMESTAMP_4_14_0,
   PhoenixDatabaseMetaData.TRANSACTION_PROVIDER + " "
 + PTinyint.INSTANCE.getSqlTypeName());
+metaConnection.createStatement().executeUpdate("ALTER TABLE " + 
+PhoenixDatabaseMetaData.SYSTEM_CATALOG + " SET " + 
+HConstants.VERSIONS + "= " + 
props.getInt(DEFAULT_SYSTEM_MAX_VERSIONS_ATTRIB, 
QueryServicesOptions.DEFAULT_SYSTEM_MAX_VERSIONS) + ",\n" +
+HColumnDescriptor.KEEP_DELETED_CELLS + "=" + 
props.getBoolean(DEFAULT_SYSTEM_KEEP_DELETED_CELLS_ATTRIB, 
QueryServicesOptions.DEFAULT_SYSTEM_KEEP_DELETED_CELLS)
+);
+metaConnection.createStatement().executeUpdate("ALTER TABLE " + 
+PhoenixDatabaseMetaData.SYSTEM_FUNCTION + " SET " + 
+HTableDescriptor.SPLIT_POLICY + "='" + 
SystemFunctionSplitPolicy.class.getName() + "',\n" +
+HConstants.VERSIONS + "= " + 
props.getInt(DEFAULT_SYSTEM_MAX_VERSIONS_ATTRIB, 
QueryServicesOptions.DEFAULT_SYSTEM_MAX_VERSIONS) + ",\n" +
+HColumnDescriptor.KEEP_DELETED_CELLS + "=" + 
props.getBoolean(DEFAULT_SYSTEM_KEEP_DELETED_CELLS_ATTRIB, 
QueryServicesOptions.DEFAULT_SYSTEM_KEEP_DELETED_CELLS)
+);
+

[4/5] phoenix git commit: PHOENIX-4710 Don't set KEEP_DELETED_CELLS or VERSIONS for SYSTEM.LOG

2018-04-27 Thread pboado
PHOENIX-4710 Don't set KEEP_DELETED_CELLS or VERSIONS for SYSTEM.LOG


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

Branch: refs/heads/4.x-cdh5.14
Commit: 82ad13712060d049485adc096aef6fdbae4e03b0
Parents: 5f6d1a9
Author: James Taylor 
Authored: Thu Apr 26 12:48:14 2018 -0700
Committer: James Taylor 
Committed: Fri Apr 27 11:45:39 2018 -0700

--
 .../org/apache/phoenix/coprocessor/MetaDataProtocol.java| 1 -
 .../apache/phoenix/query/ConnectionQueryServicesImpl.java   | 9 ++---
 .../phoenix/query/ConnectionlessQueryServicesImpl.java  | 7 +--
 3 files changed, 3 insertions(+), 14 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/82ad1371/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataProtocol.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataProtocol.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataProtocol.java
index 36d6f0d..62b701d 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataProtocol.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataProtocol.java
@@ -72,7 +72,6 @@ public abstract class MetaDataProtocol extends 
MetaDataService {
 public static final long MIN_SYSTEM_TABLE_MIGRATION_TIMESTAMP = 0;
 public static final String MIGRATION_IN_PROGRESS = "MigrationInProgress";
 
-public static final int DEFAULT_LOG_VERSIONS = 10;
 public static final int DEFAULT_LOG_TTL = 7 * 24 * 60 * 60; // 7 days 
 
 // Min system table timestamps for every release.

http://git-wip-us.apache.org/repos/asf/phoenix/blob/82ad1371/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
index 92eca64..860540d 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
@@ -170,8 +170,8 @@ import 
org.apache.phoenix.exception.RetriableUpgradeException;
 import org.apache.phoenix.exception.SQLExceptionCode;
 import org.apache.phoenix.exception.SQLExceptionInfo;
 import org.apache.phoenix.exception.UpgradeInProgressException;
-import org.apache.phoenix.exception.UpgradeRequiredException;
 import org.apache.phoenix.exception.UpgradeNotRequiredException;
+import org.apache.phoenix.exception.UpgradeRequiredException;
 import org.apache.phoenix.execute.MutationState;
 import org.apache.phoenix.hbase.index.IndexRegionSplitPolicy;
 import org.apache.phoenix.hbase.index.Indexer;
@@ -2469,7 +2469,7 @@ public class ConnectionQueryServicesImpl extends 
DelegateQueryServices implement
 
 // Available for testing
 protected String getLogTableDDL() {
-return setSystemLogDDLProperties(QueryConstants.CREATE_LOG_METADATA);
+return QueryConstants.CREATE_LOG_METADATA;
 }
 
 private String setSystemDDLProperties(String ddl) {
@@ -2478,11 +2478,6 @@ public class ConnectionQueryServicesImpl extends 
DelegateQueryServices implement
   props.getBoolean(DEFAULT_SYSTEM_KEEP_DELETED_CELLS_ATTRIB, 
QueryServicesOptions.DEFAULT_SYSTEM_KEEP_DELETED_CELLS));
 }
 
-private String setSystemLogDDLProperties(String ddl) {
-return String.format(ddl,
-  props.getBoolean(DEFAULT_SYSTEM_KEEP_DELETED_CELLS_ATTRIB, 
QueryServicesOptions.DEFAULT_SYSTEM_KEEP_DELETED_CELLS));
-}
-
 @Override
 public void init(final String url, final Properties props) throws 
SQLException {
 try {

http://git-wip-us.apache.org/repos/asf/phoenix/blob/82ad1371/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionlessQueryServicesImpl.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionlessQueryServicesImpl.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionlessQueryServicesImpl.java
index c6c2617..1f2e3ac 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionlessQueryServicesImpl.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionlessQueryServicesImpl.java
@@ -164,7 +164,7 @@ public class ConnectionlessQueryServicesImpl extends 
DelegateQueryServices imple
 }
 
 

[3/5] phoenix git commit: PHOENIX-4705 Use XMLInputFactory.newInstance() instead of XMLInputFactory.newFactory()

2018-04-27 Thread pboado
PHOENIX-4705 Use XMLInputFactory.newInstance() instead of 
XMLInputFactory.newFactory()


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

Branch: refs/heads/4.x-cdh5.14
Commit: 5f6d1a9cef5859f9b77e2d9bb268a7ee82d2bb5d
Parents: 33d3382
Author: James Taylor 
Authored: Thu Apr 26 12:37:26 2018 -0700
Committer: James Taylor 
Committed: Fri Apr 27 11:45:39 2018 -0700

--
 .../pherf/configuration/XMLConfigParser.java  |  2 +-
 .../pherf/result/impl/XMLResultHandler.java   | 18 ++
 2 files changed, 11 insertions(+), 9 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/5f6d1a9c/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/configuration/XMLConfigParser.java
--
diff --git 
a/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/configuration/XMLConfigParser.java
 
b/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/configuration/XMLConfigParser.java
index f3ec12f..a0ee471 100644
--- 
a/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/configuration/XMLConfigParser.java
+++ 
b/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/configuration/XMLConfigParser.java
@@ -115,7 +115,7 @@ public class XMLConfigParser {
  */
 // TODO Remove static calls
 public static DataModel readDataModel(Path file) throws JAXBException, 
XMLStreamException {
-XMLInputFactory xif = XMLInputFactory.newFactory();
+XMLInputFactory xif = XMLInputFactory.newInstance();
 xif.setProperty(XMLInputFactory.IS_SUPPORTING_EXTERNAL_ENTITIES, 
false);
 xif.setProperty(XMLInputFactory.SUPPORT_DTD, false);
 JAXBContext jaxbContext = JAXBContext.newInstance(DataModel.class);

http://git-wip-us.apache.org/repos/asf/phoenix/blob/5f6d1a9c/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/result/impl/XMLResultHandler.java
--
diff --git 
a/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/result/impl/XMLResultHandler.java
 
b/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/result/impl/XMLResultHandler.java
index 05b5a2b..87d6806 100644
--- 
a/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/result/impl/XMLResultHandler.java
+++ 
b/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/result/impl/XMLResultHandler.java
@@ -18,8 +18,11 @@
 
 package org.apache.phoenix.pherf.result.impl;
 
-import org.apache.phoenix.pherf.result.*;
-import org.apache.phoenix.pherf.result.file.ResultFileDetails;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
 
 import javax.xml.bind.JAXBContext;
 import javax.xml.bind.Marshaller;
@@ -28,11 +31,10 @@ import javax.xml.stream.XMLInputFactory;
 import javax.xml.stream.XMLStreamReader;
 import javax.xml.transform.stream.StreamSource;
 
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
+import org.apache.phoenix.pherf.result.DataModelResult;
+import org.apache.phoenix.pherf.result.Result;
+import org.apache.phoenix.pherf.result.ResultValue;
+import org.apache.phoenix.pherf.result.file.ResultFileDetails;
 
 public class XMLResultHandler extends DefaultResultHandler{
 
@@ -74,7 +76,7 @@ public class XMLResultHandler extends DefaultResultHandler{
 }
 
 List readFromResultFile(File resultsFile) throws Exception {
-XMLInputFactory xif = XMLInputFactory.newFactory();
+XMLInputFactory xif = XMLInputFactory.newInstance();
 xif.setProperty(XMLInputFactory.IS_SUPPORTING_EXTERNAL_ENTITIES, 
false);
 xif.setProperty(XMLInputFactory.SUPPORT_DTD, false);
 JAXBContext jaxbContext = 
JAXBContext.newInstance(DataModelResult.class);



[5/5] phoenix git commit: Changes for CDH 5.14.x

2018-04-27 Thread pboado
Changes for CDH 5.14.x


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

Branch: refs/heads/4.x-cdh5.14
Commit: 0f85035c0a585c97d90b0d2e9f181dbdce2c65c5
Parents: 352903b
Author: Pedro Boado 
Authored: Sat Mar 10 17:54:04 2018 +
Committer: Pedro Boado 
Committed: Fri Apr 27 19:54:54 2018 +0100

--
 phoenix-assembly/pom.xml|  2 +-
 phoenix-client/pom.xml  |  2 +-
 phoenix-core/pom.xml|  2 +-
 .../hadoop/hbase/ipc/PhoenixRpcScheduler.java   | 34 ++--
 phoenix-flume/pom.xml   |  2 +-
 phoenix-hive/pom.xml|  2 +-
 phoenix-kafka/pom.xml   |  2 +-
 phoenix-load-balancer/pom.xml   |  2 +-
 phoenix-parcel/pom.xml  |  2 +-
 phoenix-pherf/pom.xml   |  2 +-
 phoenix-pig/pom.xml |  2 +-
 phoenix-queryserver-client/pom.xml  |  2 +-
 phoenix-queryserver/pom.xml |  2 +-
 phoenix-server/pom.xml  |  2 +-
 phoenix-spark/pom.xml   |  2 +-
 phoenix-tracing-webapp/pom.xml  |  2 +-
 pom.xml |  4 +--
 17 files changed, 49 insertions(+), 19 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/0f85035c/phoenix-assembly/pom.xml
--
diff --git a/phoenix-assembly/pom.xml b/phoenix-assembly/pom.xml
index 55a9a6e..c013cf0 100644
--- a/phoenix-assembly/pom.xml
+++ b/phoenix-assembly/pom.xml
@@ -27,7 +27,7 @@
   
 org.apache.phoenix
 phoenix
-4.14.0-cdh5.11.2-SNAPSHOT
+4.14.0-cdh5.14.2-SNAPSHOT
   
   phoenix-assembly
   Phoenix Assembly

http://git-wip-us.apache.org/repos/asf/phoenix/blob/0f85035c/phoenix-client/pom.xml
--
diff --git a/phoenix-client/pom.xml b/phoenix-client/pom.xml
index 2454de6..6de0f65 100644
--- a/phoenix-client/pom.xml
+++ b/phoenix-client/pom.xml
@@ -27,7 +27,7 @@
   
 org.apache.phoenix
 phoenix
-4.14.0-cdh5.11.2-SNAPSHOT
+4.14.0-cdh5.14.2-SNAPSHOT
   
   phoenix-client
   Phoenix Client

http://git-wip-us.apache.org/repos/asf/phoenix/blob/0f85035c/phoenix-core/pom.xml
--
diff --git a/phoenix-core/pom.xml b/phoenix-core/pom.xml
index e1f8e2a..d17facf 100644
--- a/phoenix-core/pom.xml
+++ b/phoenix-core/pom.xml
@@ -4,7 +4,7 @@
   
 org.apache.phoenix
 phoenix
-4.14.0-cdh5.11.2-SNAPSHOT
+4.14.0-cdh5.14.2-SNAPSHOT
   
   phoenix-core
   Phoenix Core

http://git-wip-us.apache.org/repos/asf/phoenix/blob/0f85035c/phoenix-core/src/main/java/org/apache/hadoop/hbase/ipc/PhoenixRpcScheduler.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/hadoop/hbase/ipc/PhoenixRpcScheduler.java
 
b/phoenix-core/src/main/java/org/apache/hadoop/hbase/ipc/PhoenixRpcScheduler.java
index 4fdddf5..d1f05f8 100644
--- 
a/phoenix-core/src/main/java/org/apache/hadoop/hbase/ipc/PhoenixRpcScheduler.java
+++ 
b/phoenix-core/src/main/java/org/apache/hadoop/hbase/ipc/PhoenixRpcScheduler.java
@@ -124,6 +124,36 @@ public class PhoenixRpcScheduler extends RpcScheduler {
 public void setMetadataExecutorForTesting(RpcExecutor executor) {
 this.metadataCallExecutor = executor;
 }
-
-
+
+@Override
+public int getReadQueueLength() {
+return delegate.getReadQueueLength();
+}
+
+@Override
+public int getWriteQueueLength() {
+return delegate.getWriteQueueLength();
+}
+
+@Override
+public int getScanQueueLength() {
+return delegate.getScanQueueLength();
+}
+
+@Override
+public int getActiveReadRpcHandlerCount() {
+return delegate.getActiveReadRpcHandlerCount();
+}
+
+@Override
+public int getActiveWriteRpcHandlerCount() {
+return delegate.getActiveWriteRpcHandlerCount();
+}
+
+@Override
+public int getActiveScanRpcHandlerCount() {
+return delegate.getActiveScanRpcHandlerCount();
+}
+
+
 }

http://git-wip-us.apache.org/repos/asf/phoenix/blob/0f85035c/phoenix-flume/pom.xml
--
diff --git a/phoenix-flume/pom.xml b/phoenix-flume/pom.xml
index d61a9aa..e0532cb 100644
--- a/phoenix-flume/pom.xml
+++ b/phoenix-flume/pom.xml
@@ -26,7 +26,7 @@
   
 

[2/5] phoenix git commit: PHOENIX-4711 Unable to set property on table with VARBINARY as last column

2018-04-27 Thread pboado
PHOENIX-4711 Unable to set property on table with VARBINARY as last column


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

Branch: refs/heads/4.x-cdh5.14
Commit: ae8a6e8e672969579908bf9ded15cbace6059048
Parents: 82ad137
Author: James Taylor 
Authored: Thu Apr 26 17:13:48 2018 -0700
Committer: James Taylor 
Committed: Fri Apr 27 11:45:39 2018 -0700

--
 .../apache/phoenix/end2end/AlterTableIT.java| 12 ++-
 .../apache/phoenix/schema/MetaDataClient.java   | 22 +++-
 2 files changed, 19 insertions(+), 15 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/ae8a6e8e/phoenix-core/src/it/java/org/apache/phoenix/end2end/AlterTableIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/AlterTableIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/AlterTableIT.java
index dd895dc..b1949ed 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/AlterTableIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/AlterTableIT.java
@@ -116,12 +116,14 @@ public class AlterTableIT extends ParallelStatsDisabledIT 
{
 Connection conn = DriverManager.getConnection(getUrl(), props);
 conn.setAutoCommit(false);
 
-try {
-String ddl = "CREATE TABLE  " + dataTableFullName +
-"  (a_string varchar not null, a_binary varbinary not 
null, col1 integer" +
-"  CONSTRAINT pk PRIMARY KEY (a_string, a_binary)) " + 
tableDDLOptions;
-createTestTable(getUrl(), ddl);
+String ddl = "CREATE TABLE  " + dataTableFullName +
+"  (a_string varchar not null, a_binary varbinary not null, 
col1 integer" +
+"  CONSTRAINT pk PRIMARY KEY (a_string, a_binary)) " + 
tableDDLOptions;
+createTestTable(getUrl(), ddl);
+
+conn.createStatement().execute("ALTER TABLE " + dataTableFullName + " 
SET DISABLE_WAL = true");
 
+try {
 ddl = "ALTER TABLE " + dataTableFullName + " ADD b_string VARCHAR 
NULL PRIMARY KEY";
 PreparedStatement stmt = conn.prepareStatement(ddl);
 stmt.execute();

http://git-wip-us.apache.org/repos/asf/phoenix/blob/ae8a6e8e/phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java 
b/phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java
index b15072a..a3d2baf 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java
@@ -3259,16 +3259,18 @@ public class MetaDataClient {
 int position = table.getColumns().size();
 
 List currentPKs = table.getPKColumns();
-PColumn lastPK = currentPKs.get(currentPKs.size()-1);
-// Disallow adding columns if the last column is VARBIANRY.
-if (lastPK.getDataType() == PVarbinary.INSTANCE || 
lastPK.getDataType().isArrayType()) {
-throw new 
SQLExceptionInfo.Builder(SQLExceptionCode.VARBINARY_LAST_PK)
-
.setColumnName(lastPK.getName().getString()).build().buildException();
-}
-// Disallow adding columns if last column is fixed width and 
nullable.
-if (lastPK.isNullable() && 
lastPK.getDataType().isFixedWidth()) {
-throw new 
SQLExceptionInfo.Builder(SQLExceptionCode.NULLABLE_FIXED_WIDTH_LAST_PK)
-
.setColumnName(lastPK.getName().getString()).build().buildException();
+if (numCols > 0) {
+PColumn lastPK = currentPKs.get(currentPKs.size()-1);
+// Disallow adding columns if the last column is VARBIANRY.
+if (lastPK.getDataType() == PVarbinary.INSTANCE || 
lastPK.getDataType().isArrayType()) {
+throw new 
SQLExceptionInfo.Builder(SQLExceptionCode.VARBINARY_LAST_PK)
+
.setColumnName(lastPK.getName().getString()).build().buildException();
+}
+// Disallow adding columns if last column is fixed width 
and nullable.
+if (lastPK.isNullable() && 
lastPK.getDataType().isFixedWidth()) {
+throw new 
SQLExceptionInfo.Builder(SQLExceptionCode.NULLABLE_FIXED_WIDTH_LAST_PK)
+

[3/5] phoenix git commit: PHOENIX-4705 Use XMLInputFactory.newInstance() instead of XMLInputFactory.newFactory()

2018-04-27 Thread pboado
PHOENIX-4705 Use XMLInputFactory.newInstance() instead of 
XMLInputFactory.newFactory()


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

Branch: refs/heads/4.x-cdh5.12
Commit: 5f6d1a9cef5859f9b77e2d9bb268a7ee82d2bb5d
Parents: 33d3382
Author: James Taylor 
Authored: Thu Apr 26 12:37:26 2018 -0700
Committer: James Taylor 
Committed: Fri Apr 27 11:45:39 2018 -0700

--
 .../pherf/configuration/XMLConfigParser.java  |  2 +-
 .../pherf/result/impl/XMLResultHandler.java   | 18 ++
 2 files changed, 11 insertions(+), 9 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/5f6d1a9c/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/configuration/XMLConfigParser.java
--
diff --git 
a/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/configuration/XMLConfigParser.java
 
b/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/configuration/XMLConfigParser.java
index f3ec12f..a0ee471 100644
--- 
a/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/configuration/XMLConfigParser.java
+++ 
b/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/configuration/XMLConfigParser.java
@@ -115,7 +115,7 @@ public class XMLConfigParser {
  */
 // TODO Remove static calls
 public static DataModel readDataModel(Path file) throws JAXBException, 
XMLStreamException {
-XMLInputFactory xif = XMLInputFactory.newFactory();
+XMLInputFactory xif = XMLInputFactory.newInstance();
 xif.setProperty(XMLInputFactory.IS_SUPPORTING_EXTERNAL_ENTITIES, 
false);
 xif.setProperty(XMLInputFactory.SUPPORT_DTD, false);
 JAXBContext jaxbContext = JAXBContext.newInstance(DataModel.class);

http://git-wip-us.apache.org/repos/asf/phoenix/blob/5f6d1a9c/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/result/impl/XMLResultHandler.java
--
diff --git 
a/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/result/impl/XMLResultHandler.java
 
b/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/result/impl/XMLResultHandler.java
index 05b5a2b..87d6806 100644
--- 
a/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/result/impl/XMLResultHandler.java
+++ 
b/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/result/impl/XMLResultHandler.java
@@ -18,8 +18,11 @@
 
 package org.apache.phoenix.pherf.result.impl;
 
-import org.apache.phoenix.pherf.result.*;
-import org.apache.phoenix.pherf.result.file.ResultFileDetails;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
 
 import javax.xml.bind.JAXBContext;
 import javax.xml.bind.Marshaller;
@@ -28,11 +31,10 @@ import javax.xml.stream.XMLInputFactory;
 import javax.xml.stream.XMLStreamReader;
 import javax.xml.transform.stream.StreamSource;
 
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
+import org.apache.phoenix.pherf.result.DataModelResult;
+import org.apache.phoenix.pherf.result.Result;
+import org.apache.phoenix.pherf.result.ResultValue;
+import org.apache.phoenix.pherf.result.file.ResultFileDetails;
 
 public class XMLResultHandler extends DefaultResultHandler{
 
@@ -74,7 +76,7 @@ public class XMLResultHandler extends DefaultResultHandler{
 }
 
 List readFromResultFile(File resultsFile) throws Exception {
-XMLInputFactory xif = XMLInputFactory.newFactory();
+XMLInputFactory xif = XMLInputFactory.newInstance();
 xif.setProperty(XMLInputFactory.IS_SUPPORTING_EXTERNAL_ENTITIES, 
false);
 xif.setProperty(XMLInputFactory.SUPPORT_DTD, false);
 JAXBContext jaxbContext = 
JAXBContext.newInstance(DataModelResult.class);



[2/5] phoenix git commit: PHOENIX-4711 Unable to set property on table with VARBINARY as last column

2018-04-27 Thread pboado
PHOENIX-4711 Unable to set property on table with VARBINARY as last column


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

Branch: refs/heads/4.x-cdh5.13
Commit: ae8a6e8e672969579908bf9ded15cbace6059048
Parents: 82ad137
Author: James Taylor 
Authored: Thu Apr 26 17:13:48 2018 -0700
Committer: James Taylor 
Committed: Fri Apr 27 11:45:39 2018 -0700

--
 .../apache/phoenix/end2end/AlterTableIT.java| 12 ++-
 .../apache/phoenix/schema/MetaDataClient.java   | 22 +++-
 2 files changed, 19 insertions(+), 15 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/ae8a6e8e/phoenix-core/src/it/java/org/apache/phoenix/end2end/AlterTableIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/AlterTableIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/AlterTableIT.java
index dd895dc..b1949ed 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/AlterTableIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/AlterTableIT.java
@@ -116,12 +116,14 @@ public class AlterTableIT extends ParallelStatsDisabledIT 
{
 Connection conn = DriverManager.getConnection(getUrl(), props);
 conn.setAutoCommit(false);
 
-try {
-String ddl = "CREATE TABLE  " + dataTableFullName +
-"  (a_string varchar not null, a_binary varbinary not 
null, col1 integer" +
-"  CONSTRAINT pk PRIMARY KEY (a_string, a_binary)) " + 
tableDDLOptions;
-createTestTable(getUrl(), ddl);
+String ddl = "CREATE TABLE  " + dataTableFullName +
+"  (a_string varchar not null, a_binary varbinary not null, 
col1 integer" +
+"  CONSTRAINT pk PRIMARY KEY (a_string, a_binary)) " + 
tableDDLOptions;
+createTestTable(getUrl(), ddl);
+
+conn.createStatement().execute("ALTER TABLE " + dataTableFullName + " 
SET DISABLE_WAL = true");
 
+try {
 ddl = "ALTER TABLE " + dataTableFullName + " ADD b_string VARCHAR 
NULL PRIMARY KEY";
 PreparedStatement stmt = conn.prepareStatement(ddl);
 stmt.execute();

http://git-wip-us.apache.org/repos/asf/phoenix/blob/ae8a6e8e/phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java 
b/phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java
index b15072a..a3d2baf 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java
@@ -3259,16 +3259,18 @@ public class MetaDataClient {
 int position = table.getColumns().size();
 
 List currentPKs = table.getPKColumns();
-PColumn lastPK = currentPKs.get(currentPKs.size()-1);
-// Disallow adding columns if the last column is VARBIANRY.
-if (lastPK.getDataType() == PVarbinary.INSTANCE || 
lastPK.getDataType().isArrayType()) {
-throw new 
SQLExceptionInfo.Builder(SQLExceptionCode.VARBINARY_LAST_PK)
-
.setColumnName(lastPK.getName().getString()).build().buildException();
-}
-// Disallow adding columns if last column is fixed width and 
nullable.
-if (lastPK.isNullable() && 
lastPK.getDataType().isFixedWidth()) {
-throw new 
SQLExceptionInfo.Builder(SQLExceptionCode.NULLABLE_FIXED_WIDTH_LAST_PK)
-
.setColumnName(lastPK.getName().getString()).build().buildException();
+if (numCols > 0) {
+PColumn lastPK = currentPKs.get(currentPKs.size()-1);
+// Disallow adding columns if the last column is VARBIANRY.
+if (lastPK.getDataType() == PVarbinary.INSTANCE || 
lastPK.getDataType().isArrayType()) {
+throw new 
SQLExceptionInfo.Builder(SQLExceptionCode.VARBINARY_LAST_PK)
+
.setColumnName(lastPK.getName().getString()).build().buildException();
+}
+// Disallow adding columns if last column is fixed width 
and nullable.
+if (lastPK.isNullable() && 
lastPK.getDataType().isFixedWidth()) {
+throw new 
SQLExceptionInfo.Builder(SQLExceptionCode.NULLABLE_FIXED_WIDTH_LAST_PK)
+

[2/5] phoenix git commit: PHOENIX-4711 Unable to set property on table with VARBINARY as last column

2018-04-27 Thread pboado
PHOENIX-4711 Unable to set property on table with VARBINARY as last column


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

Branch: refs/heads/4.x-cdh5.12
Commit: ae8a6e8e672969579908bf9ded15cbace6059048
Parents: 82ad137
Author: James Taylor 
Authored: Thu Apr 26 17:13:48 2018 -0700
Committer: James Taylor 
Committed: Fri Apr 27 11:45:39 2018 -0700

--
 .../apache/phoenix/end2end/AlterTableIT.java| 12 ++-
 .../apache/phoenix/schema/MetaDataClient.java   | 22 +++-
 2 files changed, 19 insertions(+), 15 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/ae8a6e8e/phoenix-core/src/it/java/org/apache/phoenix/end2end/AlterTableIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/AlterTableIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/AlterTableIT.java
index dd895dc..b1949ed 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/AlterTableIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/AlterTableIT.java
@@ -116,12 +116,14 @@ public class AlterTableIT extends ParallelStatsDisabledIT 
{
 Connection conn = DriverManager.getConnection(getUrl(), props);
 conn.setAutoCommit(false);
 
-try {
-String ddl = "CREATE TABLE  " + dataTableFullName +
-"  (a_string varchar not null, a_binary varbinary not 
null, col1 integer" +
-"  CONSTRAINT pk PRIMARY KEY (a_string, a_binary)) " + 
tableDDLOptions;
-createTestTable(getUrl(), ddl);
+String ddl = "CREATE TABLE  " + dataTableFullName +
+"  (a_string varchar not null, a_binary varbinary not null, 
col1 integer" +
+"  CONSTRAINT pk PRIMARY KEY (a_string, a_binary)) " + 
tableDDLOptions;
+createTestTable(getUrl(), ddl);
+
+conn.createStatement().execute("ALTER TABLE " + dataTableFullName + " 
SET DISABLE_WAL = true");
 
+try {
 ddl = "ALTER TABLE " + dataTableFullName + " ADD b_string VARCHAR 
NULL PRIMARY KEY";
 PreparedStatement stmt = conn.prepareStatement(ddl);
 stmt.execute();

http://git-wip-us.apache.org/repos/asf/phoenix/blob/ae8a6e8e/phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java 
b/phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java
index b15072a..a3d2baf 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java
@@ -3259,16 +3259,18 @@ public class MetaDataClient {
 int position = table.getColumns().size();
 
 List currentPKs = table.getPKColumns();
-PColumn lastPK = currentPKs.get(currentPKs.size()-1);
-// Disallow adding columns if the last column is VARBIANRY.
-if (lastPK.getDataType() == PVarbinary.INSTANCE || 
lastPK.getDataType().isArrayType()) {
-throw new 
SQLExceptionInfo.Builder(SQLExceptionCode.VARBINARY_LAST_PK)
-
.setColumnName(lastPK.getName().getString()).build().buildException();
-}
-// Disallow adding columns if last column is fixed width and 
nullable.
-if (lastPK.isNullable() && 
lastPK.getDataType().isFixedWidth()) {
-throw new 
SQLExceptionInfo.Builder(SQLExceptionCode.NULLABLE_FIXED_WIDTH_LAST_PK)
-
.setColumnName(lastPK.getName().getString()).build().buildException();
+if (numCols > 0) {
+PColumn lastPK = currentPKs.get(currentPKs.size()-1);
+// Disallow adding columns if the last column is VARBIANRY.
+if (lastPK.getDataType() == PVarbinary.INSTANCE || 
lastPK.getDataType().isArrayType()) {
+throw new 
SQLExceptionInfo.Builder(SQLExceptionCode.VARBINARY_LAST_PK)
+
.setColumnName(lastPK.getName().getString()).build().buildException();
+}
+// Disallow adding columns if last column is fixed width 
and nullable.
+if (lastPK.isNullable() && 
lastPK.getDataType().isFixedWidth()) {
+throw new 
SQLExceptionInfo.Builder(SQLExceptionCode.NULLABLE_FIXED_WIDTH_LAST_PK)
+

[5/5] phoenix git commit: Changes for CDH 5.13.x

2018-04-27 Thread pboado
Changes for CDH 5.13.x


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

Branch: refs/heads/4.x-cdh5.13
Commit: 88d413693b36820cc9aea7e92372da39722773af
Parents: 352903b
Author: Pedro Boado 
Authored: Sat Mar 10 17:54:04 2018 +
Committer: Pedro Boado 
Committed: Fri Apr 27 19:54:38 2018 +0100

--
 phoenix-assembly/pom.xml|  2 +-
 phoenix-client/pom.xml  |  2 +-
 phoenix-core/pom.xml|  2 +-
 .../hadoop/hbase/ipc/PhoenixRpcScheduler.java   | 34 ++--
 phoenix-flume/pom.xml   |  2 +-
 phoenix-hive/pom.xml|  2 +-
 phoenix-kafka/pom.xml   |  2 +-
 phoenix-load-balancer/pom.xml   |  2 +-
 phoenix-parcel/pom.xml  |  2 +-
 phoenix-pherf/pom.xml   |  2 +-
 phoenix-pig/pom.xml |  2 +-
 phoenix-queryserver-client/pom.xml  |  2 +-
 phoenix-queryserver/pom.xml |  2 +-
 phoenix-server/pom.xml  |  2 +-
 phoenix-spark/pom.xml   |  2 +-
 phoenix-tracing-webapp/pom.xml  |  2 +-
 pom.xml |  4 +--
 17 files changed, 49 insertions(+), 19 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/88d41369/phoenix-assembly/pom.xml
--
diff --git a/phoenix-assembly/pom.xml b/phoenix-assembly/pom.xml
index 55a9a6e..f0cd238 100644
--- a/phoenix-assembly/pom.xml
+++ b/phoenix-assembly/pom.xml
@@ -27,7 +27,7 @@
   
 org.apache.phoenix
 phoenix
-4.14.0-cdh5.11.2-SNAPSHOT
+4.14.0-cdh5.13.2-SNAPSHOT
   
   phoenix-assembly
   Phoenix Assembly

http://git-wip-us.apache.org/repos/asf/phoenix/blob/88d41369/phoenix-client/pom.xml
--
diff --git a/phoenix-client/pom.xml b/phoenix-client/pom.xml
index 2454de6..b4da311 100644
--- a/phoenix-client/pom.xml
+++ b/phoenix-client/pom.xml
@@ -27,7 +27,7 @@
   
 org.apache.phoenix
 phoenix
-4.14.0-cdh5.11.2-SNAPSHOT
+4.14.0-cdh5.13.2-SNAPSHOT
   
   phoenix-client
   Phoenix Client

http://git-wip-us.apache.org/repos/asf/phoenix/blob/88d41369/phoenix-core/pom.xml
--
diff --git a/phoenix-core/pom.xml b/phoenix-core/pom.xml
index e1f8e2a..19ddeb5 100644
--- a/phoenix-core/pom.xml
+++ b/phoenix-core/pom.xml
@@ -4,7 +4,7 @@
   
 org.apache.phoenix
 phoenix
-4.14.0-cdh5.11.2-SNAPSHOT
+4.14.0-cdh5.13.2-SNAPSHOT
   
   phoenix-core
   Phoenix Core

http://git-wip-us.apache.org/repos/asf/phoenix/blob/88d41369/phoenix-core/src/main/java/org/apache/hadoop/hbase/ipc/PhoenixRpcScheduler.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/hadoop/hbase/ipc/PhoenixRpcScheduler.java
 
b/phoenix-core/src/main/java/org/apache/hadoop/hbase/ipc/PhoenixRpcScheduler.java
index 4fdddf5..d1f05f8 100644
--- 
a/phoenix-core/src/main/java/org/apache/hadoop/hbase/ipc/PhoenixRpcScheduler.java
+++ 
b/phoenix-core/src/main/java/org/apache/hadoop/hbase/ipc/PhoenixRpcScheduler.java
@@ -124,6 +124,36 @@ public class PhoenixRpcScheduler extends RpcScheduler {
 public void setMetadataExecutorForTesting(RpcExecutor executor) {
 this.metadataCallExecutor = executor;
 }
-
-
+
+@Override
+public int getReadQueueLength() {
+return delegate.getReadQueueLength();
+}
+
+@Override
+public int getWriteQueueLength() {
+return delegate.getWriteQueueLength();
+}
+
+@Override
+public int getScanQueueLength() {
+return delegate.getScanQueueLength();
+}
+
+@Override
+public int getActiveReadRpcHandlerCount() {
+return delegate.getActiveReadRpcHandlerCount();
+}
+
+@Override
+public int getActiveWriteRpcHandlerCount() {
+return delegate.getActiveWriteRpcHandlerCount();
+}
+
+@Override
+public int getActiveScanRpcHandlerCount() {
+return delegate.getActiveScanRpcHandlerCount();
+}
+
+
 }

http://git-wip-us.apache.org/repos/asf/phoenix/blob/88d41369/phoenix-flume/pom.xml
--
diff --git a/phoenix-flume/pom.xml b/phoenix-flume/pom.xml
index d61a9aa..bcc037c 100644
--- a/phoenix-flume/pom.xml
+++ b/phoenix-flume/pom.xml
@@ -26,7 +26,7 @@
   
 

[1/5] phoenix git commit: PHOENIX-4709 Alter split policy in upgrade path for system tables [Forced Update!]

2018-04-27 Thread pboado
Repository: phoenix
Updated Branches:
  refs/heads/4.x-cdh5.13 b5d0e72a3 -> 88d413693 (forced update)


PHOENIX-4709 Alter split policy in upgrade path for system tables


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

Branch: refs/heads/4.x-cdh5.13
Commit: 352903b88384191114d07d534122f28a090da528
Parents: ae8a6e8
Author: James Taylor 
Authored: Thu Apr 26 13:38:05 2018 -0700
Committer: James Taylor 
Committed: Fri Apr 27 11:45:39 2018 -0700

--
 .../phoenix/jdbc/PhoenixDatabaseMetaData.java   |   1 +
 .../query/ConnectionQueryServicesImpl.java  |  17 +++
 .../apache/phoenix/query/QueryConstants.java| 109 ++-
 3 files changed, 124 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/352903b8/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 d56628a..320c6e7 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
@@ -217,6 +217,7 @@ public class PhoenixDatabaseMetaData implements 
DatabaseMetaData {
 
 public static final String TYPE_SEQUENCE = "SEQUENCE";
 public static final String SYSTEM_FUNCTION_TABLE = "FUNCTION";
+public static final String SYSTEM_FUNCTION = SYSTEM_CATALOG_SCHEMA + 
QueryConstants.NAME_SEPARATOR + "\"FUNCTION\"";
 public static final String SYSTEM_FUNCTION_NAME = 
SchemaUtil.getTableName(SYSTEM_CATALOG_SCHEMA, SYSTEM_FUNCTION_TABLE);
 public static final byte[] SYSTEM_FUNCTION_NAME_BYTES = 
Bytes.toBytes(SYSTEM_FUNCTION_NAME);
 public static final TableName SYSTEM_FUNCTION_HBASE_TABLE_NAME = 
TableName.valueOf(SYSTEM_FUNCTION_NAME);

http://git-wip-us.apache.org/repos/asf/phoenix/blob/352903b8/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
index 860540d..d55ced4 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
@@ -214,6 +214,8 @@ import org.apache.phoenix.schema.Sequence;
 import org.apache.phoenix.schema.SequenceAllocation;
 import org.apache.phoenix.schema.SequenceKey;
 import org.apache.phoenix.schema.SortOrder;
+import org.apache.phoenix.schema.SystemFunctionSplitPolicy;
+import org.apache.phoenix.schema.SystemStatsSplitPolicy;
 import org.apache.phoenix.schema.TableAlreadyExistsException;
 import org.apache.phoenix.schema.TableNotFoundException;
 import org.apache.phoenix.schema.TableProperty;
@@ -2949,6 +2951,21 @@ public class ConnectionQueryServicesImpl extends 
DelegateQueryServices implement
   MetaDataProtocol.MIN_SYSTEM_TABLE_TIMESTAMP_4_14_0,
   PhoenixDatabaseMetaData.TRANSACTION_PROVIDER + " "
 + PTinyint.INSTANCE.getSqlTypeName());
+metaConnection.createStatement().executeUpdate("ALTER TABLE " + 
+PhoenixDatabaseMetaData.SYSTEM_CATALOG + " SET " + 
+HConstants.VERSIONS + "= " + 
props.getInt(DEFAULT_SYSTEM_MAX_VERSIONS_ATTRIB, 
QueryServicesOptions.DEFAULT_SYSTEM_MAX_VERSIONS) + ",\n" +
+HColumnDescriptor.KEEP_DELETED_CELLS + "=" + 
props.getBoolean(DEFAULT_SYSTEM_KEEP_DELETED_CELLS_ATTRIB, 
QueryServicesOptions.DEFAULT_SYSTEM_KEEP_DELETED_CELLS)
+);
+metaConnection.createStatement().executeUpdate("ALTER TABLE " + 
+PhoenixDatabaseMetaData.SYSTEM_FUNCTION + " SET " + 
+HTableDescriptor.SPLIT_POLICY + "='" + 
SystemFunctionSplitPolicy.class.getName() + "',\n" +
+HConstants.VERSIONS + "= " + 
props.getInt(DEFAULT_SYSTEM_MAX_VERSIONS_ATTRIB, 
QueryServicesOptions.DEFAULT_SYSTEM_MAX_VERSIONS) + ",\n" +
+HColumnDescriptor.KEEP_DELETED_CELLS + "=" + 
props.getBoolean(DEFAULT_SYSTEM_KEEP_DELETED_CELLS_ATTRIB, 
QueryServicesOptions.DEFAULT_SYSTEM_KEEP_DELETED_CELLS)
+);
+

[4/5] phoenix git commit: PHOENIX-4710 Don't set KEEP_DELETED_CELLS or VERSIONS for SYSTEM.LOG

2018-04-27 Thread pboado
PHOENIX-4710 Don't set KEEP_DELETED_CELLS or VERSIONS for SYSTEM.LOG


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

Branch: refs/heads/4.x-cdh5.13
Commit: 82ad13712060d049485adc096aef6fdbae4e03b0
Parents: 5f6d1a9
Author: James Taylor 
Authored: Thu Apr 26 12:48:14 2018 -0700
Committer: James Taylor 
Committed: Fri Apr 27 11:45:39 2018 -0700

--
 .../org/apache/phoenix/coprocessor/MetaDataProtocol.java| 1 -
 .../apache/phoenix/query/ConnectionQueryServicesImpl.java   | 9 ++---
 .../phoenix/query/ConnectionlessQueryServicesImpl.java  | 7 +--
 3 files changed, 3 insertions(+), 14 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/82ad1371/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataProtocol.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataProtocol.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataProtocol.java
index 36d6f0d..62b701d 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataProtocol.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataProtocol.java
@@ -72,7 +72,6 @@ public abstract class MetaDataProtocol extends 
MetaDataService {
 public static final long MIN_SYSTEM_TABLE_MIGRATION_TIMESTAMP = 0;
 public static final String MIGRATION_IN_PROGRESS = "MigrationInProgress";
 
-public static final int DEFAULT_LOG_VERSIONS = 10;
 public static final int DEFAULT_LOG_TTL = 7 * 24 * 60 * 60; // 7 days 
 
 // Min system table timestamps for every release.

http://git-wip-us.apache.org/repos/asf/phoenix/blob/82ad1371/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
index 92eca64..860540d 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
@@ -170,8 +170,8 @@ import 
org.apache.phoenix.exception.RetriableUpgradeException;
 import org.apache.phoenix.exception.SQLExceptionCode;
 import org.apache.phoenix.exception.SQLExceptionInfo;
 import org.apache.phoenix.exception.UpgradeInProgressException;
-import org.apache.phoenix.exception.UpgradeRequiredException;
 import org.apache.phoenix.exception.UpgradeNotRequiredException;
+import org.apache.phoenix.exception.UpgradeRequiredException;
 import org.apache.phoenix.execute.MutationState;
 import org.apache.phoenix.hbase.index.IndexRegionSplitPolicy;
 import org.apache.phoenix.hbase.index.Indexer;
@@ -2469,7 +2469,7 @@ public class ConnectionQueryServicesImpl extends 
DelegateQueryServices implement
 
 // Available for testing
 protected String getLogTableDDL() {
-return setSystemLogDDLProperties(QueryConstants.CREATE_LOG_METADATA);
+return QueryConstants.CREATE_LOG_METADATA;
 }
 
 private String setSystemDDLProperties(String ddl) {
@@ -2478,11 +2478,6 @@ public class ConnectionQueryServicesImpl extends 
DelegateQueryServices implement
   props.getBoolean(DEFAULT_SYSTEM_KEEP_DELETED_CELLS_ATTRIB, 
QueryServicesOptions.DEFAULT_SYSTEM_KEEP_DELETED_CELLS));
 }
 
-private String setSystemLogDDLProperties(String ddl) {
-return String.format(ddl,
-  props.getBoolean(DEFAULT_SYSTEM_KEEP_DELETED_CELLS_ATTRIB, 
QueryServicesOptions.DEFAULT_SYSTEM_KEEP_DELETED_CELLS));
-}
-
 @Override
 public void init(final String url, final Properties props) throws 
SQLException {
 try {

http://git-wip-us.apache.org/repos/asf/phoenix/blob/82ad1371/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionlessQueryServicesImpl.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionlessQueryServicesImpl.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionlessQueryServicesImpl.java
index c6c2617..1f2e3ac 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionlessQueryServicesImpl.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionlessQueryServicesImpl.java
@@ -164,7 +164,7 @@ public class ConnectionlessQueryServicesImpl extends 
DelegateQueryServices imple
 }
 
 

[3/5] phoenix git commit: PHOENIX-4705 Use XMLInputFactory.newInstance() instead of XMLInputFactory.newFactory()

2018-04-27 Thread pboado
PHOENIX-4705 Use XMLInputFactory.newInstance() instead of 
XMLInputFactory.newFactory()


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

Branch: refs/heads/4.x-cdh5.13
Commit: 5f6d1a9cef5859f9b77e2d9bb268a7ee82d2bb5d
Parents: 33d3382
Author: James Taylor 
Authored: Thu Apr 26 12:37:26 2018 -0700
Committer: James Taylor 
Committed: Fri Apr 27 11:45:39 2018 -0700

--
 .../pherf/configuration/XMLConfigParser.java  |  2 +-
 .../pherf/result/impl/XMLResultHandler.java   | 18 ++
 2 files changed, 11 insertions(+), 9 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/5f6d1a9c/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/configuration/XMLConfigParser.java
--
diff --git 
a/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/configuration/XMLConfigParser.java
 
b/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/configuration/XMLConfigParser.java
index f3ec12f..a0ee471 100644
--- 
a/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/configuration/XMLConfigParser.java
+++ 
b/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/configuration/XMLConfigParser.java
@@ -115,7 +115,7 @@ public class XMLConfigParser {
  */
 // TODO Remove static calls
 public static DataModel readDataModel(Path file) throws JAXBException, 
XMLStreamException {
-XMLInputFactory xif = XMLInputFactory.newFactory();
+XMLInputFactory xif = XMLInputFactory.newInstance();
 xif.setProperty(XMLInputFactory.IS_SUPPORTING_EXTERNAL_ENTITIES, 
false);
 xif.setProperty(XMLInputFactory.SUPPORT_DTD, false);
 JAXBContext jaxbContext = JAXBContext.newInstance(DataModel.class);

http://git-wip-us.apache.org/repos/asf/phoenix/blob/5f6d1a9c/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/result/impl/XMLResultHandler.java
--
diff --git 
a/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/result/impl/XMLResultHandler.java
 
b/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/result/impl/XMLResultHandler.java
index 05b5a2b..87d6806 100644
--- 
a/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/result/impl/XMLResultHandler.java
+++ 
b/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/result/impl/XMLResultHandler.java
@@ -18,8 +18,11 @@
 
 package org.apache.phoenix.pherf.result.impl;
 
-import org.apache.phoenix.pherf.result.*;
-import org.apache.phoenix.pherf.result.file.ResultFileDetails;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
 
 import javax.xml.bind.JAXBContext;
 import javax.xml.bind.Marshaller;
@@ -28,11 +31,10 @@ import javax.xml.stream.XMLInputFactory;
 import javax.xml.stream.XMLStreamReader;
 import javax.xml.transform.stream.StreamSource;
 
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
+import org.apache.phoenix.pherf.result.DataModelResult;
+import org.apache.phoenix.pherf.result.Result;
+import org.apache.phoenix.pherf.result.ResultValue;
+import org.apache.phoenix.pherf.result.file.ResultFileDetails;
 
 public class XMLResultHandler extends DefaultResultHandler{
 
@@ -74,7 +76,7 @@ public class XMLResultHandler extends DefaultResultHandler{
 }
 
 List readFromResultFile(File resultsFile) throws Exception {
-XMLInputFactory xif = XMLInputFactory.newFactory();
+XMLInputFactory xif = XMLInputFactory.newInstance();
 xif.setProperty(XMLInputFactory.IS_SUPPORTING_EXTERNAL_ENTITIES, 
false);
 xif.setProperty(XMLInputFactory.SUPPORT_DTD, false);
 JAXBContext jaxbContext = 
JAXBContext.newInstance(DataModelResult.class);



[4/5] phoenix git commit: PHOENIX-4710 Don't set KEEP_DELETED_CELLS or VERSIONS for SYSTEM.LOG

2018-04-27 Thread pboado
PHOENIX-4710 Don't set KEEP_DELETED_CELLS or VERSIONS for SYSTEM.LOG


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

Branch: refs/heads/4.x-cdh5.12
Commit: 82ad13712060d049485adc096aef6fdbae4e03b0
Parents: 5f6d1a9
Author: James Taylor 
Authored: Thu Apr 26 12:48:14 2018 -0700
Committer: James Taylor 
Committed: Fri Apr 27 11:45:39 2018 -0700

--
 .../org/apache/phoenix/coprocessor/MetaDataProtocol.java| 1 -
 .../apache/phoenix/query/ConnectionQueryServicesImpl.java   | 9 ++---
 .../phoenix/query/ConnectionlessQueryServicesImpl.java  | 7 +--
 3 files changed, 3 insertions(+), 14 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/82ad1371/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataProtocol.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataProtocol.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataProtocol.java
index 36d6f0d..62b701d 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataProtocol.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataProtocol.java
@@ -72,7 +72,6 @@ public abstract class MetaDataProtocol extends 
MetaDataService {
 public static final long MIN_SYSTEM_TABLE_MIGRATION_TIMESTAMP = 0;
 public static final String MIGRATION_IN_PROGRESS = "MigrationInProgress";
 
-public static final int DEFAULT_LOG_VERSIONS = 10;
 public static final int DEFAULT_LOG_TTL = 7 * 24 * 60 * 60; // 7 days 
 
 // Min system table timestamps for every release.

http://git-wip-us.apache.org/repos/asf/phoenix/blob/82ad1371/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
index 92eca64..860540d 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
@@ -170,8 +170,8 @@ import 
org.apache.phoenix.exception.RetriableUpgradeException;
 import org.apache.phoenix.exception.SQLExceptionCode;
 import org.apache.phoenix.exception.SQLExceptionInfo;
 import org.apache.phoenix.exception.UpgradeInProgressException;
-import org.apache.phoenix.exception.UpgradeRequiredException;
 import org.apache.phoenix.exception.UpgradeNotRequiredException;
+import org.apache.phoenix.exception.UpgradeRequiredException;
 import org.apache.phoenix.execute.MutationState;
 import org.apache.phoenix.hbase.index.IndexRegionSplitPolicy;
 import org.apache.phoenix.hbase.index.Indexer;
@@ -2469,7 +2469,7 @@ public class ConnectionQueryServicesImpl extends 
DelegateQueryServices implement
 
 // Available for testing
 protected String getLogTableDDL() {
-return setSystemLogDDLProperties(QueryConstants.CREATE_LOG_METADATA);
+return QueryConstants.CREATE_LOG_METADATA;
 }
 
 private String setSystemDDLProperties(String ddl) {
@@ -2478,11 +2478,6 @@ public class ConnectionQueryServicesImpl extends 
DelegateQueryServices implement
   props.getBoolean(DEFAULT_SYSTEM_KEEP_DELETED_CELLS_ATTRIB, 
QueryServicesOptions.DEFAULT_SYSTEM_KEEP_DELETED_CELLS));
 }
 
-private String setSystemLogDDLProperties(String ddl) {
-return String.format(ddl,
-  props.getBoolean(DEFAULT_SYSTEM_KEEP_DELETED_CELLS_ATTRIB, 
QueryServicesOptions.DEFAULT_SYSTEM_KEEP_DELETED_CELLS));
-}
-
 @Override
 public void init(final String url, final Properties props) throws 
SQLException {
 try {

http://git-wip-us.apache.org/repos/asf/phoenix/blob/82ad1371/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionlessQueryServicesImpl.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionlessQueryServicesImpl.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionlessQueryServicesImpl.java
index c6c2617..1f2e3ac 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionlessQueryServicesImpl.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionlessQueryServicesImpl.java
@@ -164,7 +164,7 @@ public class ConnectionlessQueryServicesImpl extends 
DelegateQueryServices imple
 }
 
 

[5/5] phoenix git commit: Changes for CDH 5.12.x

2018-04-27 Thread pboado
Changes for CDH 5.12.x


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

Branch: refs/heads/4.x-cdh5.12
Commit: eaab6fced1515b2404994d7f65545e8a7769795d
Parents: 352903b
Author: Pedro Boado 
Authored: Sat Mar 10 17:54:04 2018 +
Committer: Pedro Boado 
Committed: Fri Apr 27 19:54:05 2018 +0100

--
 phoenix-assembly/pom.xml|  2 +-
 phoenix-client/pom.xml  |  2 +-
 phoenix-core/pom.xml|  2 +-
 .../hadoop/hbase/ipc/PhoenixRpcScheduler.java   | 34 ++--
 phoenix-flume/pom.xml   |  2 +-
 phoenix-hive/pom.xml|  2 +-
 phoenix-kafka/pom.xml   |  2 +-
 phoenix-load-balancer/pom.xml   |  2 +-
 phoenix-parcel/pom.xml  |  2 +-
 phoenix-pherf/pom.xml   |  2 +-
 phoenix-pig/pom.xml |  2 +-
 phoenix-queryserver-client/pom.xml  |  2 +-
 phoenix-queryserver/pom.xml |  2 +-
 phoenix-server/pom.xml  |  2 +-
 phoenix-spark/pom.xml   |  2 +-
 phoenix-tracing-webapp/pom.xml  |  2 +-
 pom.xml |  4 +--
 17 files changed, 49 insertions(+), 19 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/eaab6fce/phoenix-assembly/pom.xml
--
diff --git a/phoenix-assembly/pom.xml b/phoenix-assembly/pom.xml
index 55a9a6e..14225ee 100644
--- a/phoenix-assembly/pom.xml
+++ b/phoenix-assembly/pom.xml
@@ -27,7 +27,7 @@
   
 org.apache.phoenix
 phoenix
-4.14.0-cdh5.11.2-SNAPSHOT
+4.14.0-cdh5.12.2-SNAPSHOT
   
   phoenix-assembly
   Phoenix Assembly

http://git-wip-us.apache.org/repos/asf/phoenix/blob/eaab6fce/phoenix-client/pom.xml
--
diff --git a/phoenix-client/pom.xml b/phoenix-client/pom.xml
index 2454de6..e211008 100644
--- a/phoenix-client/pom.xml
+++ b/phoenix-client/pom.xml
@@ -27,7 +27,7 @@
   
 org.apache.phoenix
 phoenix
-4.14.0-cdh5.11.2-SNAPSHOT
+4.14.0-cdh5.12.2-SNAPSHOT
   
   phoenix-client
   Phoenix Client

http://git-wip-us.apache.org/repos/asf/phoenix/blob/eaab6fce/phoenix-core/pom.xml
--
diff --git a/phoenix-core/pom.xml b/phoenix-core/pom.xml
index e1f8e2a..2d837a2 100644
--- a/phoenix-core/pom.xml
+++ b/phoenix-core/pom.xml
@@ -4,7 +4,7 @@
   
 org.apache.phoenix
 phoenix
-4.14.0-cdh5.11.2-SNAPSHOT
+4.14.0-cdh5.12.2-SNAPSHOT
   
   phoenix-core
   Phoenix Core

http://git-wip-us.apache.org/repos/asf/phoenix/blob/eaab6fce/phoenix-core/src/main/java/org/apache/hadoop/hbase/ipc/PhoenixRpcScheduler.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/hadoop/hbase/ipc/PhoenixRpcScheduler.java
 
b/phoenix-core/src/main/java/org/apache/hadoop/hbase/ipc/PhoenixRpcScheduler.java
index 4fdddf5..d1f05f8 100644
--- 
a/phoenix-core/src/main/java/org/apache/hadoop/hbase/ipc/PhoenixRpcScheduler.java
+++ 
b/phoenix-core/src/main/java/org/apache/hadoop/hbase/ipc/PhoenixRpcScheduler.java
@@ -124,6 +124,36 @@ public class PhoenixRpcScheduler extends RpcScheduler {
 public void setMetadataExecutorForTesting(RpcExecutor executor) {
 this.metadataCallExecutor = executor;
 }
-
-
+
+@Override
+public int getReadQueueLength() {
+return delegate.getReadQueueLength();
+}
+
+@Override
+public int getWriteQueueLength() {
+return delegate.getWriteQueueLength();
+}
+
+@Override
+public int getScanQueueLength() {
+return delegate.getScanQueueLength();
+}
+
+@Override
+public int getActiveReadRpcHandlerCount() {
+return delegate.getActiveReadRpcHandlerCount();
+}
+
+@Override
+public int getActiveWriteRpcHandlerCount() {
+return delegate.getActiveWriteRpcHandlerCount();
+}
+
+@Override
+public int getActiveScanRpcHandlerCount() {
+return delegate.getActiveScanRpcHandlerCount();
+}
+
+
 }

http://git-wip-us.apache.org/repos/asf/phoenix/blob/eaab6fce/phoenix-flume/pom.xml
--
diff --git a/phoenix-flume/pom.xml b/phoenix-flume/pom.xml
index d61a9aa..8a78010 100644
--- a/phoenix-flume/pom.xml
+++ b/phoenix-flume/pom.xml
@@ -26,7 +26,7 @@
   
 

[1/5] phoenix git commit: PHOENIX-4709 Alter split policy in upgrade path for system tables [Forced Update!]

2018-04-27 Thread pboado
Repository: phoenix
Updated Branches:
  refs/heads/4.x-cdh5.12 aa88d5e4a -> eaab6fced (forced update)


PHOENIX-4709 Alter split policy in upgrade path for system tables


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

Branch: refs/heads/4.x-cdh5.12
Commit: 352903b88384191114d07d534122f28a090da528
Parents: ae8a6e8
Author: James Taylor 
Authored: Thu Apr 26 13:38:05 2018 -0700
Committer: James Taylor 
Committed: Fri Apr 27 11:45:39 2018 -0700

--
 .../phoenix/jdbc/PhoenixDatabaseMetaData.java   |   1 +
 .../query/ConnectionQueryServicesImpl.java  |  17 +++
 .../apache/phoenix/query/QueryConstants.java| 109 ++-
 3 files changed, 124 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/352903b8/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 d56628a..320c6e7 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
@@ -217,6 +217,7 @@ public class PhoenixDatabaseMetaData implements 
DatabaseMetaData {
 
 public static final String TYPE_SEQUENCE = "SEQUENCE";
 public static final String SYSTEM_FUNCTION_TABLE = "FUNCTION";
+public static final String SYSTEM_FUNCTION = SYSTEM_CATALOG_SCHEMA + 
QueryConstants.NAME_SEPARATOR + "\"FUNCTION\"";
 public static final String SYSTEM_FUNCTION_NAME = 
SchemaUtil.getTableName(SYSTEM_CATALOG_SCHEMA, SYSTEM_FUNCTION_TABLE);
 public static final byte[] SYSTEM_FUNCTION_NAME_BYTES = 
Bytes.toBytes(SYSTEM_FUNCTION_NAME);
 public static final TableName SYSTEM_FUNCTION_HBASE_TABLE_NAME = 
TableName.valueOf(SYSTEM_FUNCTION_NAME);

http://git-wip-us.apache.org/repos/asf/phoenix/blob/352903b8/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
index 860540d..d55ced4 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
@@ -214,6 +214,8 @@ import org.apache.phoenix.schema.Sequence;
 import org.apache.phoenix.schema.SequenceAllocation;
 import org.apache.phoenix.schema.SequenceKey;
 import org.apache.phoenix.schema.SortOrder;
+import org.apache.phoenix.schema.SystemFunctionSplitPolicy;
+import org.apache.phoenix.schema.SystemStatsSplitPolicy;
 import org.apache.phoenix.schema.TableAlreadyExistsException;
 import org.apache.phoenix.schema.TableNotFoundException;
 import org.apache.phoenix.schema.TableProperty;
@@ -2949,6 +2951,21 @@ public class ConnectionQueryServicesImpl extends 
DelegateQueryServices implement
   MetaDataProtocol.MIN_SYSTEM_TABLE_TIMESTAMP_4_14_0,
   PhoenixDatabaseMetaData.TRANSACTION_PROVIDER + " "
 + PTinyint.INSTANCE.getSqlTypeName());
+metaConnection.createStatement().executeUpdate("ALTER TABLE " + 
+PhoenixDatabaseMetaData.SYSTEM_CATALOG + " SET " + 
+HConstants.VERSIONS + "= " + 
props.getInt(DEFAULT_SYSTEM_MAX_VERSIONS_ATTRIB, 
QueryServicesOptions.DEFAULT_SYSTEM_MAX_VERSIONS) + ",\n" +
+HColumnDescriptor.KEEP_DELETED_CELLS + "=" + 
props.getBoolean(DEFAULT_SYSTEM_KEEP_DELETED_CELLS_ATTRIB, 
QueryServicesOptions.DEFAULT_SYSTEM_KEEP_DELETED_CELLS)
+);
+metaConnection.createStatement().executeUpdate("ALTER TABLE " + 
+PhoenixDatabaseMetaData.SYSTEM_FUNCTION + " SET " + 
+HTableDescriptor.SPLIT_POLICY + "='" + 
SystemFunctionSplitPolicy.class.getName() + "',\n" +
+HConstants.VERSIONS + "= " + 
props.getInt(DEFAULT_SYSTEM_MAX_VERSIONS_ATTRIB, 
QueryServicesOptions.DEFAULT_SYSTEM_MAX_VERSIONS) + ",\n" +
+HColumnDescriptor.KEEP_DELETED_CELLS + "=" + 
props.getBoolean(DEFAULT_SYSTEM_KEEP_DELETED_CELLS_ATTRIB, 
QueryServicesOptions.DEFAULT_SYSTEM_KEEP_DELETED_CELLS)
+);
+

[2/4] phoenix git commit: PHOENIX-4710 Don't set KEEP_DELETED_CELLS or VERSIONS for SYSTEM.LOG

2018-04-27 Thread jamestaylor
PHOENIX-4710 Don't set KEEP_DELETED_CELLS or VERSIONS for SYSTEM.LOG


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

Branch: refs/heads/5.x-HBase-2.0
Commit: 987ac8c4ea8a907ac9a0a526b1a80e3d33787ecc
Parents: b722c5c
Author: James Taylor 
Authored: Thu Apr 26 12:48:14 2018 -0700
Committer: James Taylor 
Committed: Fri Apr 27 11:46:14 2018 -0700

--
 .../java/org/apache/phoenix/coprocessor/MetaDataProtocol.java | 1 -
 .../org/apache/phoenix/query/ConnectionQueryServicesImpl.java | 7 +--
 .../apache/phoenix/query/ConnectionlessQueryServicesImpl.java | 7 +--
 3 files changed, 2 insertions(+), 13 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/987ac8c4/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataProtocol.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataProtocol.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataProtocol.java
index 8f33d41..2a1c3a5 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataProtocol.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataProtocol.java
@@ -72,7 +72,6 @@ public abstract class MetaDataProtocol extends 
MetaDataService {
 public static final long MIN_SYSTEM_TABLE_MIGRATION_TIMESTAMP = 0;
 public static final String MIGRATION_IN_PROGRESS = "MigrationInProgress";
 
-public static final int DEFAULT_LOG_VERSIONS = 10;
 public static final int DEFAULT_LOG_TTL = 7 * 24 * 60 * 60; // 7 days 
 
 // Min system table timestamps for every release.

http://git-wip-us.apache.org/repos/asf/phoenix/blob/987ac8c4/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
index 44dce3f..e3a8826 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
@@ -2502,7 +2502,7 @@ public class ConnectionQueryServicesImpl extends 
DelegateQueryServices implement
 
 // Available for testing
 protected String getLogTableDDL() {
-return setSystemLogDDLProperties(QueryConstants.CREATE_LOG_METADATA);
+return QueryConstants.CREATE_LOG_METADATA;
 }
 
 private String setSystemDDLProperties(String ddl) {
@@ -2511,11 +2511,6 @@ public class ConnectionQueryServicesImpl extends 
DelegateQueryServices implement
   props.getBoolean(DEFAULT_SYSTEM_KEEP_DELETED_CELLS_ATTRIB, 
QueryServicesOptions.DEFAULT_SYSTEM_KEEP_DELETED_CELLS));
 }
 
-private String setSystemLogDDLProperties(String ddl) {
-return String.format(ddl,
-  props.getBoolean(DEFAULT_SYSTEM_KEEP_DELETED_CELLS_ATTRIB, 
QueryServicesOptions.DEFAULT_SYSTEM_KEEP_DELETED_CELLS));
-}
-
 @Override
 public void init(final String url, final Properties props) throws 
SQLException {
 try {

http://git-wip-us.apache.org/repos/asf/phoenix/blob/987ac8c4/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionlessQueryServicesImpl.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionlessQueryServicesImpl.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionlessQueryServicesImpl.java
index 580da68..ead66d6 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionlessQueryServicesImpl.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionlessQueryServicesImpl.java
@@ -166,7 +166,7 @@ public class ConnectionlessQueryServicesImpl extends 
DelegateQueryServices imple
 }
 
 protected String getLogTableDDL() {
-return setSystemLogDDLProperties(QueryConstants.CREATE_LOG_METADATA);
+return QueryConstants.CREATE_LOG_METADATA;
 }
 
 private String setSystemDDLProperties(String ddl) {
@@ -175,11 +175,6 @@ public class ConnectionlessQueryServicesImpl extends 
DelegateQueryServices imple
   props.getBoolean(DEFAULT_SYSTEM_KEEP_DELETED_CELLS_ATTRIB, 
QueryServicesOptions.DEFAULT_SYSTEM_KEEP_DELETED_CELLS));
 }
 
-private String setSystemLogDDLProperties(String ddl) {
-return String.format(ddl,
-  

[1/4] phoenix git commit: PHOENIX-4705 Use XMLInputFactory.newInstance() instead of XMLInputFactory.newFactory()

2018-04-27 Thread jamestaylor
Repository: phoenix
Updated Branches:
  refs/heads/5.x-HBase-2.0 fcd94ba42 -> 27b3ac348


PHOENIX-4705 Use XMLInputFactory.newInstance() instead of 
XMLInputFactory.newFactory()


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

Branch: refs/heads/5.x-HBase-2.0
Commit: b722c5c27cabfb6009a01e06559c293bda594e6e
Parents: fcd94ba
Author: James Taylor 
Authored: Thu Apr 26 12:37:26 2018 -0700
Committer: James Taylor 
Committed: Fri Apr 27 11:46:13 2018 -0700

--
 .../pherf/configuration/XMLConfigParser.java  |  2 +-
 .../pherf/result/impl/XMLResultHandler.java   | 18 ++
 2 files changed, 11 insertions(+), 9 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/b722c5c2/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/configuration/XMLConfigParser.java
--
diff --git 
a/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/configuration/XMLConfigParser.java
 
b/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/configuration/XMLConfigParser.java
index f3ec12f..a0ee471 100644
--- 
a/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/configuration/XMLConfigParser.java
+++ 
b/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/configuration/XMLConfigParser.java
@@ -115,7 +115,7 @@ public class XMLConfigParser {
  */
 // TODO Remove static calls
 public static DataModel readDataModel(Path file) throws JAXBException, 
XMLStreamException {
-XMLInputFactory xif = XMLInputFactory.newFactory();
+XMLInputFactory xif = XMLInputFactory.newInstance();
 xif.setProperty(XMLInputFactory.IS_SUPPORTING_EXTERNAL_ENTITIES, 
false);
 xif.setProperty(XMLInputFactory.SUPPORT_DTD, false);
 JAXBContext jaxbContext = JAXBContext.newInstance(DataModel.class);

http://git-wip-us.apache.org/repos/asf/phoenix/blob/b722c5c2/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/result/impl/XMLResultHandler.java
--
diff --git 
a/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/result/impl/XMLResultHandler.java
 
b/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/result/impl/XMLResultHandler.java
index 05b5a2b..87d6806 100644
--- 
a/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/result/impl/XMLResultHandler.java
+++ 
b/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/result/impl/XMLResultHandler.java
@@ -18,8 +18,11 @@
 
 package org.apache.phoenix.pherf.result.impl;
 
-import org.apache.phoenix.pherf.result.*;
-import org.apache.phoenix.pherf.result.file.ResultFileDetails;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
 
 import javax.xml.bind.JAXBContext;
 import javax.xml.bind.Marshaller;
@@ -28,11 +31,10 @@ import javax.xml.stream.XMLInputFactory;
 import javax.xml.stream.XMLStreamReader;
 import javax.xml.transform.stream.StreamSource;
 
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
+import org.apache.phoenix.pherf.result.DataModelResult;
+import org.apache.phoenix.pherf.result.Result;
+import org.apache.phoenix.pherf.result.ResultValue;
+import org.apache.phoenix.pherf.result.file.ResultFileDetails;
 
 public class XMLResultHandler extends DefaultResultHandler{
 
@@ -74,7 +76,7 @@ public class XMLResultHandler extends DefaultResultHandler{
 }
 
 List readFromResultFile(File resultsFile) throws Exception {
-XMLInputFactory xif = XMLInputFactory.newFactory();
+XMLInputFactory xif = XMLInputFactory.newInstance();
 xif.setProperty(XMLInputFactory.IS_SUPPORTING_EXTERNAL_ENTITIES, 
false);
 xif.setProperty(XMLInputFactory.SUPPORT_DTD, false);
 JAXBContext jaxbContext = 
JAXBContext.newInstance(DataModelResult.class);



[3/4] phoenix git commit: PHOENIX-4711 Unable to set property on table with VARBINARY as last column

2018-04-27 Thread jamestaylor
PHOENIX-4711 Unable to set property on table with VARBINARY as last column


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

Branch: refs/heads/5.x-HBase-2.0
Commit: 2649410f51e4076dcf0d95b546c2ccc260dccbb1
Parents: 987ac8c
Author: James Taylor 
Authored: Thu Apr 26 17:13:48 2018 -0700
Committer: James Taylor 
Committed: Fri Apr 27 11:46:14 2018 -0700

--
 .../apache/phoenix/end2end/AlterTableIT.java| 12 ++-
 .../apache/phoenix/schema/MetaDataClient.java   | 22 +++-
 2 files changed, 19 insertions(+), 15 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/2649410f/phoenix-core/src/it/java/org/apache/phoenix/end2end/AlterTableIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/AlterTableIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/AlterTableIT.java
index 4e731c1..db46663 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/AlterTableIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/AlterTableIT.java
@@ -117,12 +117,14 @@ public class AlterTableIT extends ParallelStatsDisabledIT 
{
 Connection conn = DriverManager.getConnection(getUrl(), props);
 conn.setAutoCommit(false);
 
-try {
-String ddl = "CREATE TABLE  " + dataTableFullName +
-"  (a_string varchar not null, a_binary varbinary not 
null, col1 integer" +
-"  CONSTRAINT pk PRIMARY KEY (a_string, a_binary)) " + 
tableDDLOptions;
-createTestTable(getUrl(), ddl);
+String ddl = "CREATE TABLE  " + dataTableFullName +
+"  (a_string varchar not null, a_binary varbinary not null, 
col1 integer" +
+"  CONSTRAINT pk PRIMARY KEY (a_string, a_binary)) " + 
tableDDLOptions;
+createTestTable(getUrl(), ddl);
+
+conn.createStatement().execute("ALTER TABLE " + dataTableFullName + " 
SET DISABLE_WAL = true");
 
+try {
 ddl = "ALTER TABLE " + dataTableFullName + " ADD b_string VARCHAR 
NULL PRIMARY KEY";
 PreparedStatement stmt = conn.prepareStatement(ddl);
 stmt.execute();

http://git-wip-us.apache.org/repos/asf/phoenix/blob/2649410f/phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java 
b/phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java
index bdb9236..60a7ca9 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java
@@ -3261,16 +3261,18 @@ public class MetaDataClient {
 int position = table.getColumns().size();
 
 List currentPKs = table.getPKColumns();
-PColumn lastPK = currentPKs.get(currentPKs.size()-1);
-// Disallow adding columns if the last column is VARBIANRY.
-if (lastPK.getDataType() == PVarbinary.INSTANCE || 
lastPK.getDataType().isArrayType()) {
-throw new 
SQLExceptionInfo.Builder(SQLExceptionCode.VARBINARY_LAST_PK)
-
.setColumnName(lastPK.getName().getString()).build().buildException();
-}
-// Disallow adding columns if last column is fixed width and 
nullable.
-if (lastPK.isNullable() && 
lastPK.getDataType().isFixedWidth()) {
-throw new 
SQLExceptionInfo.Builder(SQLExceptionCode.NULLABLE_FIXED_WIDTH_LAST_PK)
-
.setColumnName(lastPK.getName().getString()).build().buildException();
+if (numCols > 0) {
+PColumn lastPK = currentPKs.get(currentPKs.size()-1);
+// Disallow adding columns if the last column is VARBIANRY.
+if (lastPK.getDataType() == PVarbinary.INSTANCE || 
lastPK.getDataType().isArrayType()) {
+throw new 
SQLExceptionInfo.Builder(SQLExceptionCode.VARBINARY_LAST_PK)
+
.setColumnName(lastPK.getName().getString()).build().buildException();
+}
+// Disallow adding columns if last column is fixed width 
and nullable.
+if (lastPK.isNullable() && 
lastPK.getDataType().isFixedWidth()) {
+throw new 
SQLExceptionInfo.Builder(SQLExceptionCode.NULLABLE_FIXED_WIDTH_LAST_PK)
+  

[4/4] phoenix git commit: PHOENIX-4709 Alter split policy in upgrade path for system tables

2018-04-27 Thread jamestaylor
PHOENIX-4709 Alter split policy in upgrade path for system tables


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

Branch: refs/heads/5.x-HBase-2.0
Commit: 27b3ac348e4f6ebe61acb195420356e44e243783
Parents: 2649410
Author: James Taylor 
Authored: Thu Apr 26 13:38:05 2018 -0700
Committer: James Taylor 
Committed: Fri Apr 27 11:53:33 2018 -0700

--
 .../phoenix/jdbc/PhoenixDatabaseMetaData.java   |   1 +
 .../query/ConnectionQueryServicesImpl.java  |  17 +++
 .../apache/phoenix/query/QueryConstants.java| 111 ++-
 3 files changed, 125 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/27b3ac34/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 409c0bc..415f748 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
@@ -218,6 +218,7 @@ public class PhoenixDatabaseMetaData implements 
DatabaseMetaData {
 
 public static final String TYPE_SEQUENCE = "SEQUENCE";
 public static final String SYSTEM_FUNCTION_TABLE = "FUNCTION";
+public static final String SYSTEM_FUNCTION = SYSTEM_CATALOG_SCHEMA + 
QueryConstants.NAME_SEPARATOR + "\"FUNCTION\"";
 public static final String SYSTEM_FUNCTION_NAME = 
SchemaUtil.getTableName(SYSTEM_CATALOG_SCHEMA, SYSTEM_FUNCTION_TABLE);
 public static final byte[] SYSTEM_FUNCTION_NAME_BYTES = 
Bytes.toBytes(SYSTEM_FUNCTION_NAME);
 public static final TableName SYSTEM_FUNCTION_HBASE_TABLE_NAME = 
TableName.valueOf(SYSTEM_FUNCTION_NAME);

http://git-wip-us.apache.org/repos/asf/phoenix/blob/27b3ac34/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
index e3a8826..272f6c6 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
@@ -219,6 +219,8 @@ import org.apache.phoenix.schema.Sequence;
 import org.apache.phoenix.schema.SequenceAllocation;
 import org.apache.phoenix.schema.SequenceKey;
 import org.apache.phoenix.schema.SortOrder;
+import org.apache.phoenix.schema.SystemFunctionSplitPolicy;
+import org.apache.phoenix.schema.SystemStatsSplitPolicy;
 import org.apache.phoenix.schema.TableAlreadyExistsException;
 import org.apache.phoenix.schema.TableNotFoundException;
 import org.apache.phoenix.schema.TableProperty;
@@ -2979,6 +2981,21 @@ public class ConnectionQueryServicesImpl extends 
DelegateQueryServices implement
   MetaDataProtocol.MIN_SYSTEM_TABLE_TIMESTAMP_4_14_0,
   PhoenixDatabaseMetaData.TRANSACTION_PROVIDER + " "
 + PTinyint.INSTANCE.getSqlTypeName());
+metaConnection.createStatement().executeUpdate("ALTER TABLE " + 
+PhoenixDatabaseMetaData.SYSTEM_CATALOG + " SET " + 
+HConstants.VERSIONS + "= " + 
props.getInt(DEFAULT_SYSTEM_MAX_VERSIONS_ATTRIB, 
QueryServicesOptions.DEFAULT_SYSTEM_MAX_VERSIONS) + ",\n" +
+ColumnFamilyDescriptorBuilder.KEEP_DELETED_CELLS + "=" + 
props.getBoolean(DEFAULT_SYSTEM_KEEP_DELETED_CELLS_ATTRIB, 
QueryServicesOptions.DEFAULT_SYSTEM_KEEP_DELETED_CELLS)
+);
+metaConnection.createStatement().executeUpdate("ALTER TABLE " + 
+PhoenixDatabaseMetaData.SYSTEM_FUNCTION + " SET " + 
+TableDescriptorBuilder.SPLIT_POLICY + "='" + 
SystemFunctionSplitPolicy.class.getName() + "',\n" +
+HConstants.VERSIONS + "= " + 
props.getInt(DEFAULT_SYSTEM_MAX_VERSIONS_ATTRIB, 
QueryServicesOptions.DEFAULT_SYSTEM_MAX_VERSIONS) + ",\n" +
+ColumnFamilyDescriptorBuilder.KEEP_DELETED_CELLS + "=" + 
props.getBoolean(DEFAULT_SYSTEM_KEEP_DELETED_CELLS_ATTRIB, 
QueryServicesOptions.DEFAULT_SYSTEM_KEEP_DELETED_CELLS)
+);
+metaConnection.createStatement().executeUpdate("ALTER TABLE " + 
+

[3/4] phoenix git commit: PHOENIX-4711 Unable to set property on table with VARBINARY as last column

2018-04-27 Thread jamestaylor
PHOENIX-4711 Unable to set property on table with VARBINARY as last column


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

Branch: refs/heads/4.x-cdh5.11
Commit: ae8a6e8e672969579908bf9ded15cbace6059048
Parents: 82ad137
Author: James Taylor 
Authored: Thu Apr 26 17:13:48 2018 -0700
Committer: James Taylor 
Committed: Fri Apr 27 11:45:39 2018 -0700

--
 .../apache/phoenix/end2end/AlterTableIT.java| 12 ++-
 .../apache/phoenix/schema/MetaDataClient.java   | 22 +++-
 2 files changed, 19 insertions(+), 15 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/ae8a6e8e/phoenix-core/src/it/java/org/apache/phoenix/end2end/AlterTableIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/AlterTableIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/AlterTableIT.java
index dd895dc..b1949ed 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/AlterTableIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/AlterTableIT.java
@@ -116,12 +116,14 @@ public class AlterTableIT extends ParallelStatsDisabledIT 
{
 Connection conn = DriverManager.getConnection(getUrl(), props);
 conn.setAutoCommit(false);
 
-try {
-String ddl = "CREATE TABLE  " + dataTableFullName +
-"  (a_string varchar not null, a_binary varbinary not 
null, col1 integer" +
-"  CONSTRAINT pk PRIMARY KEY (a_string, a_binary)) " + 
tableDDLOptions;
-createTestTable(getUrl(), ddl);
+String ddl = "CREATE TABLE  " + dataTableFullName +
+"  (a_string varchar not null, a_binary varbinary not null, 
col1 integer" +
+"  CONSTRAINT pk PRIMARY KEY (a_string, a_binary)) " + 
tableDDLOptions;
+createTestTable(getUrl(), ddl);
+
+conn.createStatement().execute("ALTER TABLE " + dataTableFullName + " 
SET DISABLE_WAL = true");
 
+try {
 ddl = "ALTER TABLE " + dataTableFullName + " ADD b_string VARCHAR 
NULL PRIMARY KEY";
 PreparedStatement stmt = conn.prepareStatement(ddl);
 stmt.execute();

http://git-wip-us.apache.org/repos/asf/phoenix/blob/ae8a6e8e/phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java 
b/phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java
index b15072a..a3d2baf 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java
@@ -3259,16 +3259,18 @@ public class MetaDataClient {
 int position = table.getColumns().size();
 
 List currentPKs = table.getPKColumns();
-PColumn lastPK = currentPKs.get(currentPKs.size()-1);
-// Disallow adding columns if the last column is VARBIANRY.
-if (lastPK.getDataType() == PVarbinary.INSTANCE || 
lastPK.getDataType().isArrayType()) {
-throw new 
SQLExceptionInfo.Builder(SQLExceptionCode.VARBINARY_LAST_PK)
-
.setColumnName(lastPK.getName().getString()).build().buildException();
-}
-// Disallow adding columns if last column is fixed width and 
nullable.
-if (lastPK.isNullable() && 
lastPK.getDataType().isFixedWidth()) {
-throw new 
SQLExceptionInfo.Builder(SQLExceptionCode.NULLABLE_FIXED_WIDTH_LAST_PK)
-
.setColumnName(lastPK.getName().getString()).build().buildException();
+if (numCols > 0) {
+PColumn lastPK = currentPKs.get(currentPKs.size()-1);
+// Disallow adding columns if the last column is VARBIANRY.
+if (lastPK.getDataType() == PVarbinary.INSTANCE || 
lastPK.getDataType().isArrayType()) {
+throw new 
SQLExceptionInfo.Builder(SQLExceptionCode.VARBINARY_LAST_PK)
+
.setColumnName(lastPK.getName().getString()).build().buildException();
+}
+// Disallow adding columns if last column is fixed width 
and nullable.
+if (lastPK.isNullable() && 
lastPK.getDataType().isFixedWidth()) {
+throw new 
SQLExceptionInfo.Builder(SQLExceptionCode.NULLABLE_FIXED_WIDTH_LAST_PK)
+

[2/4] phoenix git commit: PHOENIX-4710 Don't set KEEP_DELETED_CELLS or VERSIONS for SYSTEM.LOG

2018-04-27 Thread jamestaylor
PHOENIX-4710 Don't set KEEP_DELETED_CELLS or VERSIONS for SYSTEM.LOG


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

Branch: refs/heads/4.x-cdh5.11
Commit: 82ad13712060d049485adc096aef6fdbae4e03b0
Parents: 5f6d1a9
Author: James Taylor 
Authored: Thu Apr 26 12:48:14 2018 -0700
Committer: James Taylor 
Committed: Fri Apr 27 11:45:39 2018 -0700

--
 .../org/apache/phoenix/coprocessor/MetaDataProtocol.java| 1 -
 .../apache/phoenix/query/ConnectionQueryServicesImpl.java   | 9 ++---
 .../phoenix/query/ConnectionlessQueryServicesImpl.java  | 7 +--
 3 files changed, 3 insertions(+), 14 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/82ad1371/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataProtocol.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataProtocol.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataProtocol.java
index 36d6f0d..62b701d 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataProtocol.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataProtocol.java
@@ -72,7 +72,6 @@ public abstract class MetaDataProtocol extends 
MetaDataService {
 public static final long MIN_SYSTEM_TABLE_MIGRATION_TIMESTAMP = 0;
 public static final String MIGRATION_IN_PROGRESS = "MigrationInProgress";
 
-public static final int DEFAULT_LOG_VERSIONS = 10;
 public static final int DEFAULT_LOG_TTL = 7 * 24 * 60 * 60; // 7 days 
 
 // Min system table timestamps for every release.

http://git-wip-us.apache.org/repos/asf/phoenix/blob/82ad1371/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
index 92eca64..860540d 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
@@ -170,8 +170,8 @@ import 
org.apache.phoenix.exception.RetriableUpgradeException;
 import org.apache.phoenix.exception.SQLExceptionCode;
 import org.apache.phoenix.exception.SQLExceptionInfo;
 import org.apache.phoenix.exception.UpgradeInProgressException;
-import org.apache.phoenix.exception.UpgradeRequiredException;
 import org.apache.phoenix.exception.UpgradeNotRequiredException;
+import org.apache.phoenix.exception.UpgradeRequiredException;
 import org.apache.phoenix.execute.MutationState;
 import org.apache.phoenix.hbase.index.IndexRegionSplitPolicy;
 import org.apache.phoenix.hbase.index.Indexer;
@@ -2469,7 +2469,7 @@ public class ConnectionQueryServicesImpl extends 
DelegateQueryServices implement
 
 // Available for testing
 protected String getLogTableDDL() {
-return setSystemLogDDLProperties(QueryConstants.CREATE_LOG_METADATA);
+return QueryConstants.CREATE_LOG_METADATA;
 }
 
 private String setSystemDDLProperties(String ddl) {
@@ -2478,11 +2478,6 @@ public class ConnectionQueryServicesImpl extends 
DelegateQueryServices implement
   props.getBoolean(DEFAULT_SYSTEM_KEEP_DELETED_CELLS_ATTRIB, 
QueryServicesOptions.DEFAULT_SYSTEM_KEEP_DELETED_CELLS));
 }
 
-private String setSystemLogDDLProperties(String ddl) {
-return String.format(ddl,
-  props.getBoolean(DEFAULT_SYSTEM_KEEP_DELETED_CELLS_ATTRIB, 
QueryServicesOptions.DEFAULT_SYSTEM_KEEP_DELETED_CELLS));
-}
-
 @Override
 public void init(final String url, final Properties props) throws 
SQLException {
 try {

http://git-wip-us.apache.org/repos/asf/phoenix/blob/82ad1371/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionlessQueryServicesImpl.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionlessQueryServicesImpl.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionlessQueryServicesImpl.java
index c6c2617..1f2e3ac 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionlessQueryServicesImpl.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionlessQueryServicesImpl.java
@@ -164,7 +164,7 @@ public class ConnectionlessQueryServicesImpl extends 
DelegateQueryServices imple
 }
 
 

[4/4] phoenix git commit: PHOENIX-4705 Use XMLInputFactory.newInstance() instead of XMLInputFactory.newFactory()

2018-04-27 Thread jamestaylor
PHOENIX-4705 Use XMLInputFactory.newInstance() instead of 
XMLInputFactory.newFactory()


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

Branch: refs/heads/4.x-cdh5.11
Commit: 5f6d1a9cef5859f9b77e2d9bb268a7ee82d2bb5d
Parents: 33d3382
Author: James Taylor 
Authored: Thu Apr 26 12:37:26 2018 -0700
Committer: James Taylor 
Committed: Fri Apr 27 11:45:39 2018 -0700

--
 .../pherf/configuration/XMLConfigParser.java  |  2 +-
 .../pherf/result/impl/XMLResultHandler.java   | 18 ++
 2 files changed, 11 insertions(+), 9 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/5f6d1a9c/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/configuration/XMLConfigParser.java
--
diff --git 
a/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/configuration/XMLConfigParser.java
 
b/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/configuration/XMLConfigParser.java
index f3ec12f..a0ee471 100644
--- 
a/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/configuration/XMLConfigParser.java
+++ 
b/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/configuration/XMLConfigParser.java
@@ -115,7 +115,7 @@ public class XMLConfigParser {
  */
 // TODO Remove static calls
 public static DataModel readDataModel(Path file) throws JAXBException, 
XMLStreamException {
-XMLInputFactory xif = XMLInputFactory.newFactory();
+XMLInputFactory xif = XMLInputFactory.newInstance();
 xif.setProperty(XMLInputFactory.IS_SUPPORTING_EXTERNAL_ENTITIES, 
false);
 xif.setProperty(XMLInputFactory.SUPPORT_DTD, false);
 JAXBContext jaxbContext = JAXBContext.newInstance(DataModel.class);

http://git-wip-us.apache.org/repos/asf/phoenix/blob/5f6d1a9c/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/result/impl/XMLResultHandler.java
--
diff --git 
a/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/result/impl/XMLResultHandler.java
 
b/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/result/impl/XMLResultHandler.java
index 05b5a2b..87d6806 100644
--- 
a/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/result/impl/XMLResultHandler.java
+++ 
b/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/result/impl/XMLResultHandler.java
@@ -18,8 +18,11 @@
 
 package org.apache.phoenix.pherf.result.impl;
 
-import org.apache.phoenix.pherf.result.*;
-import org.apache.phoenix.pherf.result.file.ResultFileDetails;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
 
 import javax.xml.bind.JAXBContext;
 import javax.xml.bind.Marshaller;
@@ -28,11 +31,10 @@ import javax.xml.stream.XMLInputFactory;
 import javax.xml.stream.XMLStreamReader;
 import javax.xml.transform.stream.StreamSource;
 
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
+import org.apache.phoenix.pherf.result.DataModelResult;
+import org.apache.phoenix.pherf.result.Result;
+import org.apache.phoenix.pherf.result.ResultValue;
+import org.apache.phoenix.pherf.result.file.ResultFileDetails;
 
 public class XMLResultHandler extends DefaultResultHandler{
 
@@ -74,7 +76,7 @@ public class XMLResultHandler extends DefaultResultHandler{
 }
 
 List readFromResultFile(File resultsFile) throws Exception {
-XMLInputFactory xif = XMLInputFactory.newFactory();
+XMLInputFactory xif = XMLInputFactory.newInstance();
 xif.setProperty(XMLInputFactory.IS_SUPPORTING_EXTERNAL_ENTITIES, 
false);
 xif.setProperty(XMLInputFactory.SUPPORT_DTD, false);
 JAXBContext jaxbContext = 
JAXBContext.newInstance(DataModelResult.class);



[1/4] phoenix git commit: PHOENIX-4709 Alter split policy in upgrade path for system tables

2018-04-27 Thread jamestaylor
Repository: phoenix
Updated Branches:
  refs/heads/4.x-cdh5.11 33d338262 -> 352903b88


PHOENIX-4709 Alter split policy in upgrade path for system tables


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

Branch: refs/heads/4.x-cdh5.11
Commit: 352903b88384191114d07d534122f28a090da528
Parents: ae8a6e8
Author: James Taylor 
Authored: Thu Apr 26 13:38:05 2018 -0700
Committer: James Taylor 
Committed: Fri Apr 27 11:45:39 2018 -0700

--
 .../phoenix/jdbc/PhoenixDatabaseMetaData.java   |   1 +
 .../query/ConnectionQueryServicesImpl.java  |  17 +++
 .../apache/phoenix/query/QueryConstants.java| 109 ++-
 3 files changed, 124 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/352903b8/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 d56628a..320c6e7 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
@@ -217,6 +217,7 @@ public class PhoenixDatabaseMetaData implements 
DatabaseMetaData {
 
 public static final String TYPE_SEQUENCE = "SEQUENCE";
 public static final String SYSTEM_FUNCTION_TABLE = "FUNCTION";
+public static final String SYSTEM_FUNCTION = SYSTEM_CATALOG_SCHEMA + 
QueryConstants.NAME_SEPARATOR + "\"FUNCTION\"";
 public static final String SYSTEM_FUNCTION_NAME = 
SchemaUtil.getTableName(SYSTEM_CATALOG_SCHEMA, SYSTEM_FUNCTION_TABLE);
 public static final byte[] SYSTEM_FUNCTION_NAME_BYTES = 
Bytes.toBytes(SYSTEM_FUNCTION_NAME);
 public static final TableName SYSTEM_FUNCTION_HBASE_TABLE_NAME = 
TableName.valueOf(SYSTEM_FUNCTION_NAME);

http://git-wip-us.apache.org/repos/asf/phoenix/blob/352903b8/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
index 860540d..d55ced4 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
@@ -214,6 +214,8 @@ import org.apache.phoenix.schema.Sequence;
 import org.apache.phoenix.schema.SequenceAllocation;
 import org.apache.phoenix.schema.SequenceKey;
 import org.apache.phoenix.schema.SortOrder;
+import org.apache.phoenix.schema.SystemFunctionSplitPolicy;
+import org.apache.phoenix.schema.SystemStatsSplitPolicy;
 import org.apache.phoenix.schema.TableAlreadyExistsException;
 import org.apache.phoenix.schema.TableNotFoundException;
 import org.apache.phoenix.schema.TableProperty;
@@ -2949,6 +2951,21 @@ public class ConnectionQueryServicesImpl extends 
DelegateQueryServices implement
   MetaDataProtocol.MIN_SYSTEM_TABLE_TIMESTAMP_4_14_0,
   PhoenixDatabaseMetaData.TRANSACTION_PROVIDER + " "
 + PTinyint.INSTANCE.getSqlTypeName());
+metaConnection.createStatement().executeUpdate("ALTER TABLE " + 
+PhoenixDatabaseMetaData.SYSTEM_CATALOG + " SET " + 
+HConstants.VERSIONS + "= " + 
props.getInt(DEFAULT_SYSTEM_MAX_VERSIONS_ATTRIB, 
QueryServicesOptions.DEFAULT_SYSTEM_MAX_VERSIONS) + ",\n" +
+HColumnDescriptor.KEEP_DELETED_CELLS + "=" + 
props.getBoolean(DEFAULT_SYSTEM_KEEP_DELETED_CELLS_ATTRIB, 
QueryServicesOptions.DEFAULT_SYSTEM_KEEP_DELETED_CELLS)
+);
+metaConnection.createStatement().executeUpdate("ALTER TABLE " + 
+PhoenixDatabaseMetaData.SYSTEM_FUNCTION + " SET " + 
+HTableDescriptor.SPLIT_POLICY + "='" + 
SystemFunctionSplitPolicy.class.getName() + "',\n" +
+HConstants.VERSIONS + "= " + 
props.getInt(DEFAULT_SYSTEM_MAX_VERSIONS_ATTRIB, 
QueryServicesOptions.DEFAULT_SYSTEM_MAX_VERSIONS) + ",\n" +
+HColumnDescriptor.KEEP_DELETED_CELLS + "=" + 
props.getBoolean(DEFAULT_SYSTEM_KEEP_DELETED_CELLS_ATTRIB, 
QueryServicesOptions.DEFAULT_SYSTEM_KEEP_DELETED_CELLS)
+);
+metaConnection.createStatement().executeUpdate("ALTER TABLE " + 

[2/4] phoenix git commit: PHOENIX-4710 Don't set KEEP_DELETED_CELLS or VERSIONS for SYSTEM.LOG

2018-04-27 Thread jamestaylor
PHOENIX-4710 Don't set KEEP_DELETED_CELLS or VERSIONS for SYSTEM.LOG


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

Branch: refs/heads/4.x-HBase-0.98
Commit: d6d4d7b07f1ca012a5fbe7378e8eaf6b66603923
Parents: f5f81fc
Author: James Taylor 
Authored: Thu Apr 26 12:48:14 2018 -0700
Committer: James Taylor 
Committed: Fri Apr 27 11:44:08 2018 -0700

--
 .../java/org/apache/phoenix/coprocessor/MetaDataProtocol.java | 3 ---
 .../org/apache/phoenix/query/ConnectionQueryServicesImpl.java | 7 +--
 .../apache/phoenix/query/ConnectionlessQueryServicesImpl.java | 7 +--
 3 files changed, 2 insertions(+), 15 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/d6d4d7b0/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataProtocol.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataProtocol.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataProtocol.java
index 8a47d12..4b3f34d 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataProtocol.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataProtocol.java
@@ -72,9 +72,6 @@ public abstract class MetaDataProtocol extends 
MetaDataService {
 public static final long MIN_SYSTEM_TABLE_MIGRATION_TIMESTAMP = 0;
 public static final String MIGRATION_IN_PROGRESS = "MigrationInProgress";
 
-public static final int DEFAULT_MAX_STAT_DATA_VERSIONS = 1;
-public static final boolean DEFAULT_STATS_KEEP_DELETED_CELLS = false;
-public static final int DEFAULT_LOG_VERSIONS = 10;
 public static final int DEFAULT_LOG_TTL = 7 * 24 * 60 * 60; // 7 days 
 
 // Min system table timestamps for every release.

http://git-wip-us.apache.org/repos/asf/phoenix/blob/d6d4d7b0/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
index 3d22f5b..30bc450 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
@@ -2464,7 +2464,7 @@ public class ConnectionQueryServicesImpl extends 
DelegateQueryServices implement
 
 // Available for testing
 protected String getLogTableDDL() {
-return setSystemLogDDLProperties(QueryConstants.CREATE_LOG_METADATA);
+return QueryConstants.CREATE_LOG_METADATA;
 }
 
 private String setSystemDDLProperties(String ddl) {
@@ -2473,11 +2473,6 @@ public class ConnectionQueryServicesImpl extends 
DelegateQueryServices implement
   props.getBoolean(DEFAULT_SYSTEM_KEEP_DELETED_CELLS_ATTRIB, 
QueryServicesOptions.DEFAULT_SYSTEM_KEEP_DELETED_CELLS));
 }
 
-private String setSystemLogDDLProperties(String ddl) {
-return String.format(ddl,
-  props.getBoolean(DEFAULT_SYSTEM_KEEP_DELETED_CELLS_ATTRIB, 
QueryServicesOptions.DEFAULT_SYSTEM_KEEP_DELETED_CELLS));
-}
-
 @Override
 public void init(final String url, final Properties props) throws 
SQLException {
 try {

http://git-wip-us.apache.org/repos/asf/phoenix/blob/d6d4d7b0/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionlessQueryServicesImpl.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionlessQueryServicesImpl.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionlessQueryServicesImpl.java
index 1a772f7..0c81bb6 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionlessQueryServicesImpl.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionlessQueryServicesImpl.java
@@ -164,7 +164,7 @@ public class ConnectionlessQueryServicesImpl extends 
DelegateQueryServices imple
 }
 
 protected String getLogTableDDL() {
-return setSystemLogDDLProperties(QueryConstants.CREATE_LOG_METADATA);
+return QueryConstants.CREATE_LOG_METADATA;
 }
 
 private String setSystemDDLProperties(String ddl) {
@@ -173,11 +173,6 @@ public class ConnectionlessQueryServicesImpl extends 
DelegateQueryServices imple
   props.getBoolean(DEFAULT_SYSTEM_KEEP_DELETED_CELLS_ATTRIB, 

[1/4] phoenix git commit: PHOENIX-4705 Use XMLInputFactory.newInstance() instead of XMLInputFactory.newFactory()

2018-04-27 Thread jamestaylor
Repository: phoenix
Updated Branches:
  refs/heads/4.x-HBase-0.98 8134d2824 -> e2ebbf936


PHOENIX-4705 Use XMLInputFactory.newInstance() instead of 
XMLInputFactory.newFactory()


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

Branch: refs/heads/4.x-HBase-0.98
Commit: f5f81fc761423d1a3d4b2d43834622c1c6709cad
Parents: 8134d28
Author: James Taylor 
Authored: Thu Apr 26 12:37:26 2018 -0700
Committer: James Taylor 
Committed: Fri Apr 27 11:43:24 2018 -0700

--
 .../pherf/configuration/XMLConfigParser.java  |  2 +-
 .../pherf/result/impl/XMLResultHandler.java   | 18 ++
 2 files changed, 11 insertions(+), 9 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/f5f81fc7/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/configuration/XMLConfigParser.java
--
diff --git 
a/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/configuration/XMLConfigParser.java
 
b/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/configuration/XMLConfigParser.java
index f3ec12f..a0ee471 100644
--- 
a/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/configuration/XMLConfigParser.java
+++ 
b/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/configuration/XMLConfigParser.java
@@ -115,7 +115,7 @@ public class XMLConfigParser {
  */
 // TODO Remove static calls
 public static DataModel readDataModel(Path file) throws JAXBException, 
XMLStreamException {
-XMLInputFactory xif = XMLInputFactory.newFactory();
+XMLInputFactory xif = XMLInputFactory.newInstance();
 xif.setProperty(XMLInputFactory.IS_SUPPORTING_EXTERNAL_ENTITIES, 
false);
 xif.setProperty(XMLInputFactory.SUPPORT_DTD, false);
 JAXBContext jaxbContext = JAXBContext.newInstance(DataModel.class);

http://git-wip-us.apache.org/repos/asf/phoenix/blob/f5f81fc7/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/result/impl/XMLResultHandler.java
--
diff --git 
a/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/result/impl/XMLResultHandler.java
 
b/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/result/impl/XMLResultHandler.java
index 05b5a2b..87d6806 100644
--- 
a/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/result/impl/XMLResultHandler.java
+++ 
b/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/result/impl/XMLResultHandler.java
@@ -18,8 +18,11 @@
 
 package org.apache.phoenix.pherf.result.impl;
 
-import org.apache.phoenix.pherf.result.*;
-import org.apache.phoenix.pherf.result.file.ResultFileDetails;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
 
 import javax.xml.bind.JAXBContext;
 import javax.xml.bind.Marshaller;
@@ -28,11 +31,10 @@ import javax.xml.stream.XMLInputFactory;
 import javax.xml.stream.XMLStreamReader;
 import javax.xml.transform.stream.StreamSource;
 
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
+import org.apache.phoenix.pherf.result.DataModelResult;
+import org.apache.phoenix.pherf.result.Result;
+import org.apache.phoenix.pherf.result.ResultValue;
+import org.apache.phoenix.pherf.result.file.ResultFileDetails;
 
 public class XMLResultHandler extends DefaultResultHandler{
 
@@ -74,7 +76,7 @@ public class XMLResultHandler extends DefaultResultHandler{
 }
 
 List readFromResultFile(File resultsFile) throws Exception {
-XMLInputFactory xif = XMLInputFactory.newFactory();
+XMLInputFactory xif = XMLInputFactory.newInstance();
 xif.setProperty(XMLInputFactory.IS_SUPPORTING_EXTERNAL_ENTITIES, 
false);
 xif.setProperty(XMLInputFactory.SUPPORT_DTD, false);
 JAXBContext jaxbContext = 
JAXBContext.newInstance(DataModelResult.class);



[4/4] phoenix git commit: PHOENIX-4709 Alter split policy in upgrade path for system tables

2018-04-27 Thread jamestaylor
PHOENIX-4709 Alter split policy in upgrade path for system tables


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

Branch: refs/heads/4.x-HBase-0.98
Commit: e2ebbf9365d126da8d4ab5968c33b7c09014b74a
Parents: 15ba73c
Author: James Taylor 
Authored: Thu Apr 26 13:38:05 2018 -0700
Committer: James Taylor 
Committed: Fri Apr 27 11:44:10 2018 -0700

--
 .../phoenix/jdbc/PhoenixDatabaseMetaData.java   |   1 +
 .../query/ConnectionQueryServicesImpl.java  |  17 +++
 .../apache/phoenix/query/QueryConstants.java| 109 ++-
 3 files changed, 124 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/e2ebbf93/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 272df72..0e7f05e 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
@@ -217,6 +217,7 @@ public class PhoenixDatabaseMetaData implements 
DatabaseMetaData {
 
 public static final String TYPE_SEQUENCE = "SEQUENCE";
 public static final String SYSTEM_FUNCTION_TABLE = "FUNCTION";
+public static final String SYSTEM_FUNCTION = SYSTEM_CATALOG_SCHEMA + 
QueryConstants.NAME_SEPARATOR + "\"FUNCTION\"";
 public static final String SYSTEM_FUNCTION_NAME = 
SchemaUtil.getTableName(SYSTEM_CATALOG_SCHEMA, SYSTEM_FUNCTION_TABLE);
 public static final byte[] SYSTEM_FUNCTION_NAME_BYTES = 
Bytes.toBytes(SYSTEM_FUNCTION_NAME);
 public static final TableName SYSTEM_FUNCTION_HBASE_TABLE_NAME = 
TableName.valueOf(SYSTEM_FUNCTION_NAME);

http://git-wip-us.apache.org/repos/asf/phoenix/blob/e2ebbf93/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
index 30bc450..26e22a5 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
@@ -214,6 +214,8 @@ import org.apache.phoenix.schema.Sequence;
 import org.apache.phoenix.schema.SequenceAllocation;
 import org.apache.phoenix.schema.SequenceKey;
 import org.apache.phoenix.schema.SortOrder;
+import org.apache.phoenix.schema.SystemFunctionSplitPolicy;
+import org.apache.phoenix.schema.SystemStatsSplitPolicy;
 import org.apache.phoenix.schema.TableAlreadyExistsException;
 import org.apache.phoenix.schema.TableNotFoundException;
 import org.apache.phoenix.schema.TableProperty;
@@ -2944,6 +2946,21 @@ public class ConnectionQueryServicesImpl extends 
DelegateQueryServices implement
   MetaDataProtocol.MIN_SYSTEM_TABLE_TIMESTAMP_4_14_0,
   PhoenixDatabaseMetaData.TRANSACTION_PROVIDER + " "
 + PTinyint.INSTANCE.getSqlTypeName());
+metaConnection.createStatement().executeUpdate("ALTER TABLE " + 
+PhoenixDatabaseMetaData.SYSTEM_CATALOG + " SET " + 
+HConstants.VERSIONS + "= " + 
props.getInt(DEFAULT_SYSTEM_MAX_VERSIONS_ATTRIB, 
QueryServicesOptions.DEFAULT_SYSTEM_MAX_VERSIONS) + ",\n" +
+HColumnDescriptor.KEEP_DELETED_CELLS + "=" + 
props.getBoolean(DEFAULT_SYSTEM_KEEP_DELETED_CELLS_ATTRIB, 
QueryServicesOptions.DEFAULT_SYSTEM_KEEP_DELETED_CELLS)
+);
+metaConnection.createStatement().executeUpdate("ALTER TABLE " + 
+PhoenixDatabaseMetaData.SYSTEM_FUNCTION + " SET " + 
+HTableDescriptor.SPLIT_POLICY + "='" + 
SystemFunctionSplitPolicy.class.getName() + "',\n" +
+HConstants.VERSIONS + "= " + 
props.getInt(DEFAULT_SYSTEM_MAX_VERSIONS_ATTRIB, 
QueryServicesOptions.DEFAULT_SYSTEM_MAX_VERSIONS) + ",\n" +
+HColumnDescriptor.KEEP_DELETED_CELLS + "=" + 
props.getBoolean(DEFAULT_SYSTEM_KEEP_DELETED_CELLS_ATTRIB, 
QueryServicesOptions.DEFAULT_SYSTEM_KEEP_DELETED_CELLS)
+);
+metaConnection.createStatement().executeUpdate("ALTER TABLE " + 
+PhoenixDatabaseMetaData.SYSTEM_STATS_NAME + " SET " + 
+ 

[4/4] phoenix git commit: PHOENIX-4709 Alter split policy in upgrade path for system tables

2018-04-27 Thread jamestaylor
PHOENIX-4709 Alter split policy in upgrade path for system tables


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

Branch: refs/heads/4.x-HBase-1.1
Commit: d674f7e761f4e3bab184019334d8ceb5fea3dcd6
Parents: f7a1576
Author: James Taylor 
Authored: Thu Apr 26 13:38:05 2018 -0700
Committer: James Taylor 
Committed: Fri Apr 27 11:42:55 2018 -0700

--
 .../phoenix/jdbc/PhoenixDatabaseMetaData.java   |   1 +
 .../query/ConnectionQueryServicesImpl.java  |  17 +++
 .../apache/phoenix/query/QueryConstants.java| 109 ++-
 3 files changed, 124 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/d674f7e7/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 d56628a..320c6e7 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
@@ -217,6 +217,7 @@ public class PhoenixDatabaseMetaData implements 
DatabaseMetaData {
 
 public static final String TYPE_SEQUENCE = "SEQUENCE";
 public static final String SYSTEM_FUNCTION_TABLE = "FUNCTION";
+public static final String SYSTEM_FUNCTION = SYSTEM_CATALOG_SCHEMA + 
QueryConstants.NAME_SEPARATOR + "\"FUNCTION\"";
 public static final String SYSTEM_FUNCTION_NAME = 
SchemaUtil.getTableName(SYSTEM_CATALOG_SCHEMA, SYSTEM_FUNCTION_TABLE);
 public static final byte[] SYSTEM_FUNCTION_NAME_BYTES = 
Bytes.toBytes(SYSTEM_FUNCTION_NAME);
 public static final TableName SYSTEM_FUNCTION_HBASE_TABLE_NAME = 
TableName.valueOf(SYSTEM_FUNCTION_NAME);

http://git-wip-us.apache.org/repos/asf/phoenix/blob/d674f7e7/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
index d6c8ab9..081c84b 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
@@ -213,6 +213,8 @@ import org.apache.phoenix.schema.Sequence;
 import org.apache.phoenix.schema.SequenceAllocation;
 import org.apache.phoenix.schema.SequenceKey;
 import org.apache.phoenix.schema.SortOrder;
+import org.apache.phoenix.schema.SystemFunctionSplitPolicy;
+import org.apache.phoenix.schema.SystemStatsSplitPolicy;
 import org.apache.phoenix.schema.TableAlreadyExistsException;
 import org.apache.phoenix.schema.TableNotFoundException;
 import org.apache.phoenix.schema.TableProperty;
@@ -2936,6 +2938,21 @@ public class ConnectionQueryServicesImpl extends 
DelegateQueryServices implement
   MetaDataProtocol.MIN_SYSTEM_TABLE_TIMESTAMP_4_14_0,
   PhoenixDatabaseMetaData.TRANSACTION_PROVIDER + " "
 + PTinyint.INSTANCE.getSqlTypeName());
+metaConnection.createStatement().executeUpdate("ALTER TABLE " + 
+PhoenixDatabaseMetaData.SYSTEM_CATALOG + " SET " + 
+HConstants.VERSIONS + "= " + 
props.getInt(DEFAULT_SYSTEM_MAX_VERSIONS_ATTRIB, 
QueryServicesOptions.DEFAULT_SYSTEM_MAX_VERSIONS) + ",\n" +
+HColumnDescriptor.KEEP_DELETED_CELLS + "=" + 
props.getBoolean(DEFAULT_SYSTEM_KEEP_DELETED_CELLS_ATTRIB, 
QueryServicesOptions.DEFAULT_SYSTEM_KEEP_DELETED_CELLS)
+);
+metaConnection.createStatement().executeUpdate("ALTER TABLE " + 
+PhoenixDatabaseMetaData.SYSTEM_FUNCTION + " SET " + 
+HTableDescriptor.SPLIT_POLICY + "='" + 
SystemFunctionSplitPolicy.class.getName() + "',\n" +
+HConstants.VERSIONS + "= " + 
props.getInt(DEFAULT_SYSTEM_MAX_VERSIONS_ATTRIB, 
QueryServicesOptions.DEFAULT_SYSTEM_MAX_VERSIONS) + ",\n" +
+HColumnDescriptor.KEEP_DELETED_CELLS + "=" + 
props.getBoolean(DEFAULT_SYSTEM_KEEP_DELETED_CELLS_ATTRIB, 
QueryServicesOptions.DEFAULT_SYSTEM_KEEP_DELETED_CELLS)
+);
+metaConnection.createStatement().executeUpdate("ALTER TABLE " + 
+PhoenixDatabaseMetaData.SYSTEM_STATS_NAME + " SET " + 
+  

[1/4] phoenix git commit: PHOENIX-4710 Don't set KEEP_DELETED_CELLS or VERSIONS for SYSTEM.LOG

2018-04-27 Thread jamestaylor
Repository: phoenix
Updated Branches:
  refs/heads/4.x-HBase-1.1 00de48a52 -> d674f7e76


PHOENIX-4710 Don't set KEEP_DELETED_CELLS or VERSIONS for SYSTEM.LOG


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

Branch: refs/heads/4.x-HBase-1.1
Commit: 0b34ab37c6eeff8526c101b5e219ea5cade01657
Parents: df85cc5
Author: James Taylor 
Authored: Thu Apr 26 12:48:14 2018 -0700
Committer: James Taylor 
Committed: Fri Apr 27 11:42:54 2018 -0700

--
 .../org/apache/phoenix/coprocessor/MetaDataProtocol.java| 1 -
 .../apache/phoenix/query/ConnectionQueryServicesImpl.java   | 9 ++---
 .../phoenix/query/ConnectionlessQueryServicesImpl.java  | 7 +--
 3 files changed, 3 insertions(+), 14 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/0b34ab37/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataProtocol.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataProtocol.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataProtocol.java
index 36d6f0d..62b701d 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataProtocol.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataProtocol.java
@@ -72,7 +72,6 @@ public abstract class MetaDataProtocol extends 
MetaDataService {
 public static final long MIN_SYSTEM_TABLE_MIGRATION_TIMESTAMP = 0;
 public static final String MIGRATION_IN_PROGRESS = "MigrationInProgress";
 
-public static final int DEFAULT_LOG_VERSIONS = 10;
 public static final int DEFAULT_LOG_TTL = 7 * 24 * 60 * 60; // 7 days 
 
 // Min system table timestamps for every release.

http://git-wip-us.apache.org/repos/asf/phoenix/blob/0b34ab37/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
index a7c3c41..d6c8ab9 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
@@ -169,8 +169,8 @@ import 
org.apache.phoenix.exception.RetriableUpgradeException;
 import org.apache.phoenix.exception.SQLExceptionCode;
 import org.apache.phoenix.exception.SQLExceptionInfo;
 import org.apache.phoenix.exception.UpgradeInProgressException;
-import org.apache.phoenix.exception.UpgradeRequiredException;
 import org.apache.phoenix.exception.UpgradeNotRequiredException;
+import org.apache.phoenix.exception.UpgradeRequiredException;
 import org.apache.phoenix.execute.MutationState;
 import org.apache.phoenix.hbase.index.IndexRegionSplitPolicy;
 import org.apache.phoenix.hbase.index.Indexer;
@@ -2466,7 +2466,7 @@ public class ConnectionQueryServicesImpl extends 
DelegateQueryServices implement
 
 // Available for testing
 protected String getLogTableDDL() {
-return setSystemLogDDLProperties(QueryConstants.CREATE_LOG_METADATA);
+return QueryConstants.CREATE_LOG_METADATA;
 }
 
 private String setSystemDDLProperties(String ddl) {
@@ -2475,11 +2475,6 @@ public class ConnectionQueryServicesImpl extends 
DelegateQueryServices implement
   props.getBoolean(DEFAULT_SYSTEM_KEEP_DELETED_CELLS_ATTRIB, 
QueryServicesOptions.DEFAULT_SYSTEM_KEEP_DELETED_CELLS));
 }
 
-private String setSystemLogDDLProperties(String ddl) {
-return String.format(ddl,
-  props.getBoolean(DEFAULT_SYSTEM_KEEP_DELETED_CELLS_ATTRIB, 
QueryServicesOptions.DEFAULT_SYSTEM_KEEP_DELETED_CELLS));
-}
-
 @Override
 public void init(final String url, final Properties props) throws 
SQLException {
 try {

http://git-wip-us.apache.org/repos/asf/phoenix/blob/0b34ab37/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionlessQueryServicesImpl.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionlessQueryServicesImpl.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionlessQueryServicesImpl.java
index aba9600..3531a87 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionlessQueryServicesImpl.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionlessQueryServicesImpl.java
@@ -164,7 +164,7 @@ 

[3/4] phoenix git commit: PHOENIX-4711 Unable to set property on table with VARBINARY as last column

2018-04-27 Thread jamestaylor
PHOENIX-4711 Unable to set property on table with VARBINARY as last column


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

Branch: refs/heads/4.x-HBase-1.1
Commit: f7a15761249f0e46f03fc6019a4bfd78727bdb41
Parents: 0b34ab3
Author: James Taylor 
Authored: Thu Apr 26 17:13:48 2018 -0700
Committer: James Taylor 
Committed: Fri Apr 27 11:42:55 2018 -0700

--
 .../apache/phoenix/end2end/AlterTableIT.java| 12 ++-
 .../apache/phoenix/schema/MetaDataClient.java   | 22 +++-
 2 files changed, 19 insertions(+), 15 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/f7a15761/phoenix-core/src/it/java/org/apache/phoenix/end2end/AlterTableIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/AlterTableIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/AlterTableIT.java
index dd895dc..b1949ed 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/AlterTableIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/AlterTableIT.java
@@ -116,12 +116,14 @@ public class AlterTableIT extends ParallelStatsDisabledIT 
{
 Connection conn = DriverManager.getConnection(getUrl(), props);
 conn.setAutoCommit(false);
 
-try {
-String ddl = "CREATE TABLE  " + dataTableFullName +
-"  (a_string varchar not null, a_binary varbinary not 
null, col1 integer" +
-"  CONSTRAINT pk PRIMARY KEY (a_string, a_binary)) " + 
tableDDLOptions;
-createTestTable(getUrl(), ddl);
+String ddl = "CREATE TABLE  " + dataTableFullName +
+"  (a_string varchar not null, a_binary varbinary not null, 
col1 integer" +
+"  CONSTRAINT pk PRIMARY KEY (a_string, a_binary)) " + 
tableDDLOptions;
+createTestTable(getUrl(), ddl);
+
+conn.createStatement().execute("ALTER TABLE " + dataTableFullName + " 
SET DISABLE_WAL = true");
 
+try {
 ddl = "ALTER TABLE " + dataTableFullName + " ADD b_string VARCHAR 
NULL PRIMARY KEY";
 PreparedStatement stmt = conn.prepareStatement(ddl);
 stmt.execute();

http://git-wip-us.apache.org/repos/asf/phoenix/blob/f7a15761/phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java 
b/phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java
index 782f556..dcbe7e6 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java
@@ -3251,16 +3251,18 @@ public class MetaDataClient {
 int position = table.getColumns().size();
 
 List currentPKs = table.getPKColumns();
-PColumn lastPK = currentPKs.get(currentPKs.size()-1);
-// Disallow adding columns if the last column is VARBIANRY.
-if (lastPK.getDataType() == PVarbinary.INSTANCE || 
lastPK.getDataType().isArrayType()) {
-throw new 
SQLExceptionInfo.Builder(SQLExceptionCode.VARBINARY_LAST_PK)
-
.setColumnName(lastPK.getName().getString()).build().buildException();
-}
-// Disallow adding columns if last column is fixed width and 
nullable.
-if (lastPK.isNullable() && 
lastPK.getDataType().isFixedWidth()) {
-throw new 
SQLExceptionInfo.Builder(SQLExceptionCode.NULLABLE_FIXED_WIDTH_LAST_PK)
-
.setColumnName(lastPK.getName().getString()).build().buildException();
+if (numCols > 0) {
+PColumn lastPK = currentPKs.get(currentPKs.size()-1);
+// Disallow adding columns if the last column is VARBIANRY.
+if (lastPK.getDataType() == PVarbinary.INSTANCE || 
lastPK.getDataType().isArrayType()) {
+throw new 
SQLExceptionInfo.Builder(SQLExceptionCode.VARBINARY_LAST_PK)
+
.setColumnName(lastPK.getName().getString()).build().buildException();
+}
+// Disallow adding columns if last column is fixed width 
and nullable.
+if (lastPK.isNullable() && 
lastPK.getDataType().isFixedWidth()) {
+throw new 
SQLExceptionInfo.Builder(SQLExceptionCode.NULLABLE_FIXED_WIDTH_LAST_PK)
+  

[2/4] phoenix git commit: PHOENIX-4705 Use XMLInputFactory.newInstance() instead of XMLInputFactory.newFactory()

2018-04-27 Thread jamestaylor
PHOENIX-4705 Use XMLInputFactory.newInstance() instead of 
XMLInputFactory.newFactory()


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

Branch: refs/heads/4.x-HBase-1.1
Commit: df85cc5930a1d341e4ac993a9200cdeb5e3538d2
Parents: 00de48a
Author: James Taylor 
Authored: Thu Apr 26 12:37:26 2018 -0700
Committer: James Taylor 
Committed: Fri Apr 27 11:42:54 2018 -0700

--
 .../pherf/configuration/XMLConfigParser.java  |  2 +-
 .../pherf/result/impl/XMLResultHandler.java   | 18 ++
 2 files changed, 11 insertions(+), 9 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/df85cc59/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/configuration/XMLConfigParser.java
--
diff --git 
a/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/configuration/XMLConfigParser.java
 
b/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/configuration/XMLConfigParser.java
index f3ec12f..a0ee471 100644
--- 
a/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/configuration/XMLConfigParser.java
+++ 
b/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/configuration/XMLConfigParser.java
@@ -115,7 +115,7 @@ public class XMLConfigParser {
  */
 // TODO Remove static calls
 public static DataModel readDataModel(Path file) throws JAXBException, 
XMLStreamException {
-XMLInputFactory xif = XMLInputFactory.newFactory();
+XMLInputFactory xif = XMLInputFactory.newInstance();
 xif.setProperty(XMLInputFactory.IS_SUPPORTING_EXTERNAL_ENTITIES, 
false);
 xif.setProperty(XMLInputFactory.SUPPORT_DTD, false);
 JAXBContext jaxbContext = JAXBContext.newInstance(DataModel.class);

http://git-wip-us.apache.org/repos/asf/phoenix/blob/df85cc59/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/result/impl/XMLResultHandler.java
--
diff --git 
a/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/result/impl/XMLResultHandler.java
 
b/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/result/impl/XMLResultHandler.java
index 05b5a2b..87d6806 100644
--- 
a/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/result/impl/XMLResultHandler.java
+++ 
b/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/result/impl/XMLResultHandler.java
@@ -18,8 +18,11 @@
 
 package org.apache.phoenix.pherf.result.impl;
 
-import org.apache.phoenix.pherf.result.*;
-import org.apache.phoenix.pherf.result.file.ResultFileDetails;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
 
 import javax.xml.bind.JAXBContext;
 import javax.xml.bind.Marshaller;
@@ -28,11 +31,10 @@ import javax.xml.stream.XMLInputFactory;
 import javax.xml.stream.XMLStreamReader;
 import javax.xml.transform.stream.StreamSource;
 
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
+import org.apache.phoenix.pherf.result.DataModelResult;
+import org.apache.phoenix.pherf.result.Result;
+import org.apache.phoenix.pherf.result.ResultValue;
+import org.apache.phoenix.pherf.result.file.ResultFileDetails;
 
 public class XMLResultHandler extends DefaultResultHandler{
 
@@ -74,7 +76,7 @@ public class XMLResultHandler extends DefaultResultHandler{
 }
 
 List readFromResultFile(File resultsFile) throws Exception {
-XMLInputFactory xif = XMLInputFactory.newFactory();
+XMLInputFactory xif = XMLInputFactory.newInstance();
 xif.setProperty(XMLInputFactory.IS_SUPPORTING_EXTERNAL_ENTITIES, 
false);
 xif.setProperty(XMLInputFactory.SUPPORT_DTD, false);
 JAXBContext jaxbContext = 
JAXBContext.newInstance(DataModelResult.class);



[1/4] phoenix git commit: PHOENIX-4709 Alter split policy in upgrade path for system tables

2018-04-27 Thread jamestaylor
Repository: phoenix
Updated Branches:
  refs/heads/4.x-HBase-1.2 fbdf52ef0 -> 5d1d80fd7


PHOENIX-4709 Alter split policy in upgrade path for system tables


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

Branch: refs/heads/4.x-HBase-1.2
Commit: 5d1d80fd7d90476a87a784e8325f5c425afe3933
Parents: c77a150
Author: James Taylor 
Authored: Thu Apr 26 13:38:05 2018 -0700
Committer: James Taylor 
Committed: Fri Apr 27 11:42:27 2018 -0700

--
 .../phoenix/jdbc/PhoenixDatabaseMetaData.java   |   1 +
 .../query/ConnectionQueryServicesImpl.java  |  17 +++
 .../apache/phoenix/query/QueryConstants.java| 109 ++-
 3 files changed, 124 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/5d1d80fd/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 d56628a..320c6e7 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
@@ -217,6 +217,7 @@ public class PhoenixDatabaseMetaData implements 
DatabaseMetaData {
 
 public static final String TYPE_SEQUENCE = "SEQUENCE";
 public static final String SYSTEM_FUNCTION_TABLE = "FUNCTION";
+public static final String SYSTEM_FUNCTION = SYSTEM_CATALOG_SCHEMA + 
QueryConstants.NAME_SEPARATOR + "\"FUNCTION\"";
 public static final String SYSTEM_FUNCTION_NAME = 
SchemaUtil.getTableName(SYSTEM_CATALOG_SCHEMA, SYSTEM_FUNCTION_TABLE);
 public static final byte[] SYSTEM_FUNCTION_NAME_BYTES = 
Bytes.toBytes(SYSTEM_FUNCTION_NAME);
 public static final TableName SYSTEM_FUNCTION_HBASE_TABLE_NAME = 
TableName.valueOf(SYSTEM_FUNCTION_NAME);

http://git-wip-us.apache.org/repos/asf/phoenix/blob/5d1d80fd/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
index d841f0b..1d3feed 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
@@ -214,6 +214,8 @@ import org.apache.phoenix.schema.Sequence;
 import org.apache.phoenix.schema.SequenceAllocation;
 import org.apache.phoenix.schema.SequenceKey;
 import org.apache.phoenix.schema.SortOrder;
+import org.apache.phoenix.schema.SystemFunctionSplitPolicy;
+import org.apache.phoenix.schema.SystemStatsSplitPolicy;
 import org.apache.phoenix.schema.TableAlreadyExistsException;
 import org.apache.phoenix.schema.TableNotFoundException;
 import org.apache.phoenix.schema.TableProperty;
@@ -2949,6 +2951,21 @@ public class ConnectionQueryServicesImpl extends 
DelegateQueryServices implement
   MetaDataProtocol.MIN_SYSTEM_TABLE_TIMESTAMP_4_14_0,
   PhoenixDatabaseMetaData.TRANSACTION_PROVIDER + " "
 + PTinyint.INSTANCE.getSqlTypeName());
+metaConnection.createStatement().executeUpdate("ALTER TABLE " + 
+PhoenixDatabaseMetaData.SYSTEM_CATALOG + " SET " + 
+HConstants.VERSIONS + "= " + 
props.getInt(DEFAULT_SYSTEM_MAX_VERSIONS_ATTRIB, 
QueryServicesOptions.DEFAULT_SYSTEM_MAX_VERSIONS) + ",\n" +
+HColumnDescriptor.KEEP_DELETED_CELLS + "=" + 
props.getBoolean(DEFAULT_SYSTEM_KEEP_DELETED_CELLS_ATTRIB, 
QueryServicesOptions.DEFAULT_SYSTEM_KEEP_DELETED_CELLS)
+);
+metaConnection.createStatement().executeUpdate("ALTER TABLE " + 
+PhoenixDatabaseMetaData.SYSTEM_FUNCTION + " SET " + 
+HTableDescriptor.SPLIT_POLICY + "='" + 
SystemFunctionSplitPolicy.class.getName() + "',\n" +
+HConstants.VERSIONS + "= " + 
props.getInt(DEFAULT_SYSTEM_MAX_VERSIONS_ATTRIB, 
QueryServicesOptions.DEFAULT_SYSTEM_MAX_VERSIONS) + ",\n" +
+HColumnDescriptor.KEEP_DELETED_CELLS + "=" + 
props.getBoolean(DEFAULT_SYSTEM_KEEP_DELETED_CELLS_ATTRIB, 
QueryServicesOptions.DEFAULT_SYSTEM_KEEP_DELETED_CELLS)
+);
+metaConnection.createStatement().executeUpdate("ALTER TABLE " 

[3/4] phoenix git commit: PHOENIX-4711 Unable to set property on table with VARBINARY as last column

2018-04-27 Thread jamestaylor
PHOENIX-4711 Unable to set property on table with VARBINARY as last column


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

Branch: refs/heads/4.x-HBase-1.2
Commit: c77a1508d0ee6eff9fb15b5c065c470e74597d8b
Parents: 616abb5
Author: James Taylor 
Authored: Thu Apr 26 17:13:48 2018 -0700
Committer: James Taylor 
Committed: Fri Apr 27 11:42:27 2018 -0700

--
 .../apache/phoenix/end2end/AlterTableIT.java| 12 ++-
 .../apache/phoenix/schema/MetaDataClient.java   | 22 +++-
 2 files changed, 19 insertions(+), 15 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/c77a1508/phoenix-core/src/it/java/org/apache/phoenix/end2end/AlterTableIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/AlterTableIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/AlterTableIT.java
index dd895dc..b1949ed 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/AlterTableIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/AlterTableIT.java
@@ -116,12 +116,14 @@ public class AlterTableIT extends ParallelStatsDisabledIT 
{
 Connection conn = DriverManager.getConnection(getUrl(), props);
 conn.setAutoCommit(false);
 
-try {
-String ddl = "CREATE TABLE  " + dataTableFullName +
-"  (a_string varchar not null, a_binary varbinary not 
null, col1 integer" +
-"  CONSTRAINT pk PRIMARY KEY (a_string, a_binary)) " + 
tableDDLOptions;
-createTestTable(getUrl(), ddl);
+String ddl = "CREATE TABLE  " + dataTableFullName +
+"  (a_string varchar not null, a_binary varbinary not null, 
col1 integer" +
+"  CONSTRAINT pk PRIMARY KEY (a_string, a_binary)) " + 
tableDDLOptions;
+createTestTable(getUrl(), ddl);
+
+conn.createStatement().execute("ALTER TABLE " + dataTableFullName + " 
SET DISABLE_WAL = true");
 
+try {
 ddl = "ALTER TABLE " + dataTableFullName + " ADD b_string VARCHAR 
NULL PRIMARY KEY";
 PreparedStatement stmt = conn.prepareStatement(ddl);
 stmt.execute();

http://git-wip-us.apache.org/repos/asf/phoenix/blob/c77a1508/phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java 
b/phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java
index b15072a..a3d2baf 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java
@@ -3259,16 +3259,18 @@ public class MetaDataClient {
 int position = table.getColumns().size();
 
 List currentPKs = table.getPKColumns();
-PColumn lastPK = currentPKs.get(currentPKs.size()-1);
-// Disallow adding columns if the last column is VARBIANRY.
-if (lastPK.getDataType() == PVarbinary.INSTANCE || 
lastPK.getDataType().isArrayType()) {
-throw new 
SQLExceptionInfo.Builder(SQLExceptionCode.VARBINARY_LAST_PK)
-
.setColumnName(lastPK.getName().getString()).build().buildException();
-}
-// Disallow adding columns if last column is fixed width and 
nullable.
-if (lastPK.isNullable() && 
lastPK.getDataType().isFixedWidth()) {
-throw new 
SQLExceptionInfo.Builder(SQLExceptionCode.NULLABLE_FIXED_WIDTH_LAST_PK)
-
.setColumnName(lastPK.getName().getString()).build().buildException();
+if (numCols > 0) {
+PColumn lastPK = currentPKs.get(currentPKs.size()-1);
+// Disallow adding columns if the last column is VARBIANRY.
+if (lastPK.getDataType() == PVarbinary.INSTANCE || 
lastPK.getDataType().isArrayType()) {
+throw new 
SQLExceptionInfo.Builder(SQLExceptionCode.VARBINARY_LAST_PK)
+
.setColumnName(lastPK.getName().getString()).build().buildException();
+}
+// Disallow adding columns if last column is fixed width 
and nullable.
+if (lastPK.isNullable() && 
lastPK.getDataType().isFixedWidth()) {
+throw new 
SQLExceptionInfo.Builder(SQLExceptionCode.NULLABLE_FIXED_WIDTH_LAST_PK)
+  

[2/4] phoenix git commit: PHOENIX-4710 Don't set KEEP_DELETED_CELLS or VERSIONS for SYSTEM.LOG

2018-04-27 Thread jamestaylor
PHOENIX-4710 Don't set KEEP_DELETED_CELLS or VERSIONS for SYSTEM.LOG


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

Branch: refs/heads/4.x-HBase-1.2
Commit: 616abb5fc47a8e0e204d226669270ebfa2de3fd7
Parents: 3c75e3d
Author: James Taylor 
Authored: Thu Apr 26 12:48:14 2018 -0700
Committer: James Taylor 
Committed: Fri Apr 27 11:42:27 2018 -0700

--
 .../org/apache/phoenix/coprocessor/MetaDataProtocol.java| 1 -
 .../apache/phoenix/query/ConnectionQueryServicesImpl.java   | 9 ++---
 .../phoenix/query/ConnectionlessQueryServicesImpl.java  | 7 +--
 3 files changed, 3 insertions(+), 14 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/616abb5f/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataProtocol.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataProtocol.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataProtocol.java
index 36d6f0d..62b701d 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataProtocol.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataProtocol.java
@@ -72,7 +72,6 @@ public abstract class MetaDataProtocol extends 
MetaDataService {
 public static final long MIN_SYSTEM_TABLE_MIGRATION_TIMESTAMP = 0;
 public static final String MIGRATION_IN_PROGRESS = "MigrationInProgress";
 
-public static final int DEFAULT_LOG_VERSIONS = 10;
 public static final int DEFAULT_LOG_TTL = 7 * 24 * 60 * 60; // 7 days 
 
 // Min system table timestamps for every release.

http://git-wip-us.apache.org/repos/asf/phoenix/blob/616abb5f/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
index 8866ced..d841f0b 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
@@ -170,8 +170,8 @@ import 
org.apache.phoenix.exception.RetriableUpgradeException;
 import org.apache.phoenix.exception.SQLExceptionCode;
 import org.apache.phoenix.exception.SQLExceptionInfo;
 import org.apache.phoenix.exception.UpgradeInProgressException;
-import org.apache.phoenix.exception.UpgradeRequiredException;
 import org.apache.phoenix.exception.UpgradeNotRequiredException;
+import org.apache.phoenix.exception.UpgradeRequiredException;
 import org.apache.phoenix.execute.MutationState;
 import org.apache.phoenix.hbase.index.IndexRegionSplitPolicy;
 import org.apache.phoenix.hbase.index.Indexer;
@@ -2469,7 +2469,7 @@ public class ConnectionQueryServicesImpl extends 
DelegateQueryServices implement
 
 // Available for testing
 protected String getLogTableDDL() {
-return setSystemLogDDLProperties(QueryConstants.CREATE_LOG_METADATA);
+return QueryConstants.CREATE_LOG_METADATA;
 }
 
 private String setSystemDDLProperties(String ddl) {
@@ -2478,11 +2478,6 @@ public class ConnectionQueryServicesImpl extends 
DelegateQueryServices implement
   props.getBoolean(DEFAULT_SYSTEM_KEEP_DELETED_CELLS_ATTRIB, 
QueryServicesOptions.DEFAULT_SYSTEM_KEEP_DELETED_CELLS));
 }
 
-private String setSystemLogDDLProperties(String ddl) {
-return String.format(ddl,
-  props.getBoolean(DEFAULT_SYSTEM_KEEP_DELETED_CELLS_ATTRIB, 
QueryServicesOptions.DEFAULT_SYSTEM_KEEP_DELETED_CELLS));
-}
-
 @Override
 public void init(final String url, final Properties props) throws 
SQLException {
 try {

http://git-wip-us.apache.org/repos/asf/phoenix/blob/616abb5f/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionlessQueryServicesImpl.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionlessQueryServicesImpl.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionlessQueryServicesImpl.java
index aba9600..3531a87 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionlessQueryServicesImpl.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionlessQueryServicesImpl.java
@@ -164,7 +164,7 @@ public class ConnectionlessQueryServicesImpl extends 
DelegateQueryServices imple
 }
 

[2/4] phoenix git commit: PHOENIX-4710 Don't set KEEP_DELETED_CELLS or VERSIONS for SYSTEM.LOG

2018-04-27 Thread jamestaylor
PHOENIX-4710 Don't set KEEP_DELETED_CELLS or VERSIONS for SYSTEM.LOG


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

Branch: refs/heads/master
Commit: 49c02328a0627939838b51b4440abe9427244820
Parents: 6c1a624
Author: James Taylor 
Authored: Thu Apr 26 12:48:14 2018 -0700
Committer: James Taylor 
Committed: Fri Apr 27 11:41:56 2018 -0700

--
 .../org/apache/phoenix/coprocessor/MetaDataProtocol.java| 1 -
 .../apache/phoenix/query/ConnectionQueryServicesImpl.java   | 9 ++---
 .../phoenix/query/ConnectionlessQueryServicesImpl.java  | 7 +--
 3 files changed, 3 insertions(+), 14 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/49c02328/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataProtocol.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataProtocol.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataProtocol.java
index 36d6f0d..62b701d 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataProtocol.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataProtocol.java
@@ -72,7 +72,6 @@ public abstract class MetaDataProtocol extends 
MetaDataService {
 public static final long MIN_SYSTEM_TABLE_MIGRATION_TIMESTAMP = 0;
 public static final String MIGRATION_IN_PROGRESS = "MigrationInProgress";
 
-public static final int DEFAULT_LOG_VERSIONS = 10;
 public static final int DEFAULT_LOG_TTL = 7 * 24 * 60 * 60; // 7 days 
 
 // Min system table timestamps for every release.

http://git-wip-us.apache.org/repos/asf/phoenix/blob/49c02328/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
index 8866ced..d841f0b 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
@@ -170,8 +170,8 @@ import 
org.apache.phoenix.exception.RetriableUpgradeException;
 import org.apache.phoenix.exception.SQLExceptionCode;
 import org.apache.phoenix.exception.SQLExceptionInfo;
 import org.apache.phoenix.exception.UpgradeInProgressException;
-import org.apache.phoenix.exception.UpgradeRequiredException;
 import org.apache.phoenix.exception.UpgradeNotRequiredException;
+import org.apache.phoenix.exception.UpgradeRequiredException;
 import org.apache.phoenix.execute.MutationState;
 import org.apache.phoenix.hbase.index.IndexRegionSplitPolicy;
 import org.apache.phoenix.hbase.index.Indexer;
@@ -2469,7 +2469,7 @@ public class ConnectionQueryServicesImpl extends 
DelegateQueryServices implement
 
 // Available for testing
 protected String getLogTableDDL() {
-return setSystemLogDDLProperties(QueryConstants.CREATE_LOG_METADATA);
+return QueryConstants.CREATE_LOG_METADATA;
 }
 
 private String setSystemDDLProperties(String ddl) {
@@ -2478,11 +2478,6 @@ public class ConnectionQueryServicesImpl extends 
DelegateQueryServices implement
   props.getBoolean(DEFAULT_SYSTEM_KEEP_DELETED_CELLS_ATTRIB, 
QueryServicesOptions.DEFAULT_SYSTEM_KEEP_DELETED_CELLS));
 }
 
-private String setSystemLogDDLProperties(String ddl) {
-return String.format(ddl,
-  props.getBoolean(DEFAULT_SYSTEM_KEEP_DELETED_CELLS_ATTRIB, 
QueryServicesOptions.DEFAULT_SYSTEM_KEEP_DELETED_CELLS));
-}
-
 @Override
 public void init(final String url, final Properties props) throws 
SQLException {
 try {

http://git-wip-us.apache.org/repos/asf/phoenix/blob/49c02328/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionlessQueryServicesImpl.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionlessQueryServicesImpl.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionlessQueryServicesImpl.java
index aba9600..3531a87 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionlessQueryServicesImpl.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionlessQueryServicesImpl.java
@@ -164,7 +164,7 @@ public class ConnectionlessQueryServicesImpl extends 
DelegateQueryServices imple
 }
 
 

[4/4] phoenix git commit: PHOENIX-4705 Use XMLInputFactory.newInstance() instead of XMLInputFactory.newFactory()

2018-04-27 Thread jamestaylor
PHOENIX-4705 Use XMLInputFactory.newInstance() instead of 
XMLInputFactory.newFactory()


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

Branch: refs/heads/master
Commit: 6c1a624f351926c6b122c722cf4f9c3418a222ae
Parents: 4b84199
Author: James Taylor 
Authored: Thu Apr 26 12:37:26 2018 -0700
Committer: James Taylor 
Committed: Fri Apr 27 11:41:56 2018 -0700

--
 .../pherf/configuration/XMLConfigParser.java  |  2 +-
 .../pherf/result/impl/XMLResultHandler.java   | 18 ++
 2 files changed, 11 insertions(+), 9 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/6c1a624f/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/configuration/XMLConfigParser.java
--
diff --git 
a/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/configuration/XMLConfigParser.java
 
b/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/configuration/XMLConfigParser.java
index f3ec12f..a0ee471 100644
--- 
a/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/configuration/XMLConfigParser.java
+++ 
b/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/configuration/XMLConfigParser.java
@@ -115,7 +115,7 @@ public class XMLConfigParser {
  */
 // TODO Remove static calls
 public static DataModel readDataModel(Path file) throws JAXBException, 
XMLStreamException {
-XMLInputFactory xif = XMLInputFactory.newFactory();
+XMLInputFactory xif = XMLInputFactory.newInstance();
 xif.setProperty(XMLInputFactory.IS_SUPPORTING_EXTERNAL_ENTITIES, 
false);
 xif.setProperty(XMLInputFactory.SUPPORT_DTD, false);
 JAXBContext jaxbContext = JAXBContext.newInstance(DataModel.class);

http://git-wip-us.apache.org/repos/asf/phoenix/blob/6c1a624f/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/result/impl/XMLResultHandler.java
--
diff --git 
a/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/result/impl/XMLResultHandler.java
 
b/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/result/impl/XMLResultHandler.java
index 05b5a2b..87d6806 100644
--- 
a/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/result/impl/XMLResultHandler.java
+++ 
b/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/result/impl/XMLResultHandler.java
@@ -18,8 +18,11 @@
 
 package org.apache.phoenix.pherf.result.impl;
 
-import org.apache.phoenix.pherf.result.*;
-import org.apache.phoenix.pherf.result.file.ResultFileDetails;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
 
 import javax.xml.bind.JAXBContext;
 import javax.xml.bind.Marshaller;
@@ -28,11 +31,10 @@ import javax.xml.stream.XMLInputFactory;
 import javax.xml.stream.XMLStreamReader;
 import javax.xml.transform.stream.StreamSource;
 
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
+import org.apache.phoenix.pherf.result.DataModelResult;
+import org.apache.phoenix.pherf.result.Result;
+import org.apache.phoenix.pherf.result.ResultValue;
+import org.apache.phoenix.pherf.result.file.ResultFileDetails;
 
 public class XMLResultHandler extends DefaultResultHandler{
 
@@ -74,7 +76,7 @@ public class XMLResultHandler extends DefaultResultHandler{
 }
 
 List readFromResultFile(File resultsFile) throws Exception {
-XMLInputFactory xif = XMLInputFactory.newFactory();
+XMLInputFactory xif = XMLInputFactory.newInstance();
 xif.setProperty(XMLInputFactory.IS_SUPPORTING_EXTERNAL_ENTITIES, 
false);
 xif.setProperty(XMLInputFactory.SUPPORT_DTD, false);
 JAXBContext jaxbContext = 
JAXBContext.newInstance(DataModelResult.class);



[4/4] phoenix git commit: PHOENIX-4705 Use XMLInputFactory.newInstance() instead of XMLInputFactory.newFactory()

2018-04-27 Thread jamestaylor
PHOENIX-4705 Use XMLInputFactory.newInstance() instead of 
XMLInputFactory.newFactory()


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

Branch: refs/heads/4.x-HBase-1.2
Commit: 3c75e3d1269a2ff8c9d2455acf35645b556c4857
Parents: fbdf52e
Author: James Taylor 
Authored: Thu Apr 26 12:37:26 2018 -0700
Committer: James Taylor 
Committed: Fri Apr 27 11:42:27 2018 -0700

--
 .../pherf/configuration/XMLConfigParser.java  |  2 +-
 .../pherf/result/impl/XMLResultHandler.java   | 18 ++
 2 files changed, 11 insertions(+), 9 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/3c75e3d1/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/configuration/XMLConfigParser.java
--
diff --git 
a/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/configuration/XMLConfigParser.java
 
b/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/configuration/XMLConfigParser.java
index f3ec12f..a0ee471 100644
--- 
a/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/configuration/XMLConfigParser.java
+++ 
b/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/configuration/XMLConfigParser.java
@@ -115,7 +115,7 @@ public class XMLConfigParser {
  */
 // TODO Remove static calls
 public static DataModel readDataModel(Path file) throws JAXBException, 
XMLStreamException {
-XMLInputFactory xif = XMLInputFactory.newFactory();
+XMLInputFactory xif = XMLInputFactory.newInstance();
 xif.setProperty(XMLInputFactory.IS_SUPPORTING_EXTERNAL_ENTITIES, 
false);
 xif.setProperty(XMLInputFactory.SUPPORT_DTD, false);
 JAXBContext jaxbContext = JAXBContext.newInstance(DataModel.class);

http://git-wip-us.apache.org/repos/asf/phoenix/blob/3c75e3d1/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/result/impl/XMLResultHandler.java
--
diff --git 
a/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/result/impl/XMLResultHandler.java
 
b/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/result/impl/XMLResultHandler.java
index 05b5a2b..87d6806 100644
--- 
a/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/result/impl/XMLResultHandler.java
+++ 
b/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/result/impl/XMLResultHandler.java
@@ -18,8 +18,11 @@
 
 package org.apache.phoenix.pherf.result.impl;
 
-import org.apache.phoenix.pherf.result.*;
-import org.apache.phoenix.pherf.result.file.ResultFileDetails;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
 
 import javax.xml.bind.JAXBContext;
 import javax.xml.bind.Marshaller;
@@ -28,11 +31,10 @@ import javax.xml.stream.XMLInputFactory;
 import javax.xml.stream.XMLStreamReader;
 import javax.xml.transform.stream.StreamSource;
 
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
+import org.apache.phoenix.pherf.result.DataModelResult;
+import org.apache.phoenix.pherf.result.Result;
+import org.apache.phoenix.pherf.result.ResultValue;
+import org.apache.phoenix.pherf.result.file.ResultFileDetails;
 
 public class XMLResultHandler extends DefaultResultHandler{
 
@@ -74,7 +76,7 @@ public class XMLResultHandler extends DefaultResultHandler{
 }
 
 List readFromResultFile(File resultsFile) throws Exception {
-XMLInputFactory xif = XMLInputFactory.newFactory();
+XMLInputFactory xif = XMLInputFactory.newInstance();
 xif.setProperty(XMLInputFactory.IS_SUPPORTING_EXTERNAL_ENTITIES, 
false);
 xif.setProperty(XMLInputFactory.SUPPORT_DTD, false);
 JAXBContext jaxbContext = 
JAXBContext.newInstance(DataModelResult.class);



[1/4] phoenix git commit: PHOENIX-4709 Alter split policy in upgrade path for system tables

2018-04-27 Thread jamestaylor
Repository: phoenix
Updated Branches:
  refs/heads/master 4b8419968 -> fc194c568


PHOENIX-4709 Alter split policy in upgrade path for system tables


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

Branch: refs/heads/master
Commit: fc194c568ee5a4a7ba0e92b64ae24f7cf4b224e5
Parents: a18fd1e
Author: James Taylor 
Authored: Thu Apr 26 13:38:05 2018 -0700
Committer: James Taylor 
Committed: Fri Apr 27 11:41:56 2018 -0700

--
 .../phoenix/jdbc/PhoenixDatabaseMetaData.java   |   1 +
 .../query/ConnectionQueryServicesImpl.java  |  17 +++
 .../apache/phoenix/query/QueryConstants.java| 109 ++-
 3 files changed, 124 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/fc194c56/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 d56628a..320c6e7 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
@@ -217,6 +217,7 @@ public class PhoenixDatabaseMetaData implements 
DatabaseMetaData {
 
 public static final String TYPE_SEQUENCE = "SEQUENCE";
 public static final String SYSTEM_FUNCTION_TABLE = "FUNCTION";
+public static final String SYSTEM_FUNCTION = SYSTEM_CATALOG_SCHEMA + 
QueryConstants.NAME_SEPARATOR + "\"FUNCTION\"";
 public static final String SYSTEM_FUNCTION_NAME = 
SchemaUtil.getTableName(SYSTEM_CATALOG_SCHEMA, SYSTEM_FUNCTION_TABLE);
 public static final byte[] SYSTEM_FUNCTION_NAME_BYTES = 
Bytes.toBytes(SYSTEM_FUNCTION_NAME);
 public static final TableName SYSTEM_FUNCTION_HBASE_TABLE_NAME = 
TableName.valueOf(SYSTEM_FUNCTION_NAME);

http://git-wip-us.apache.org/repos/asf/phoenix/blob/fc194c56/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
index d841f0b..1d3feed 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
@@ -214,6 +214,8 @@ import org.apache.phoenix.schema.Sequence;
 import org.apache.phoenix.schema.SequenceAllocation;
 import org.apache.phoenix.schema.SequenceKey;
 import org.apache.phoenix.schema.SortOrder;
+import org.apache.phoenix.schema.SystemFunctionSplitPolicy;
+import org.apache.phoenix.schema.SystemStatsSplitPolicy;
 import org.apache.phoenix.schema.TableAlreadyExistsException;
 import org.apache.phoenix.schema.TableNotFoundException;
 import org.apache.phoenix.schema.TableProperty;
@@ -2949,6 +2951,21 @@ public class ConnectionQueryServicesImpl extends 
DelegateQueryServices implement
   MetaDataProtocol.MIN_SYSTEM_TABLE_TIMESTAMP_4_14_0,
   PhoenixDatabaseMetaData.TRANSACTION_PROVIDER + " "
 + PTinyint.INSTANCE.getSqlTypeName());
+metaConnection.createStatement().executeUpdate("ALTER TABLE " + 
+PhoenixDatabaseMetaData.SYSTEM_CATALOG + " SET " + 
+HConstants.VERSIONS + "= " + 
props.getInt(DEFAULT_SYSTEM_MAX_VERSIONS_ATTRIB, 
QueryServicesOptions.DEFAULT_SYSTEM_MAX_VERSIONS) + ",\n" +
+HColumnDescriptor.KEEP_DELETED_CELLS + "=" + 
props.getBoolean(DEFAULT_SYSTEM_KEEP_DELETED_CELLS_ATTRIB, 
QueryServicesOptions.DEFAULT_SYSTEM_KEEP_DELETED_CELLS)
+);
+metaConnection.createStatement().executeUpdate("ALTER TABLE " + 
+PhoenixDatabaseMetaData.SYSTEM_FUNCTION + " SET " + 
+HTableDescriptor.SPLIT_POLICY + "='" + 
SystemFunctionSplitPolicy.class.getName() + "',\n" +
+HConstants.VERSIONS + "= " + 
props.getInt(DEFAULT_SYSTEM_MAX_VERSIONS_ATTRIB, 
QueryServicesOptions.DEFAULT_SYSTEM_MAX_VERSIONS) + ",\n" +
+HColumnDescriptor.KEEP_DELETED_CELLS + "=" + 
props.getBoolean(DEFAULT_SYSTEM_KEEP_DELETED_CELLS_ATTRIB, 
QueryServicesOptions.DEFAULT_SYSTEM_KEEP_DELETED_CELLS)
+);
+metaConnection.createStatement().executeUpdate("ALTER TABLE " + 
+  

[3/4] phoenix git commit: PHOENIX-4711 Unable to set property on table with VARBINARY as last column

2018-04-27 Thread jamestaylor
PHOENIX-4711 Unable to set property on table with VARBINARY as last column


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

Branch: refs/heads/master
Commit: a18fd1e133f5a2785e0ade236d72028b3d6854da
Parents: 49c0232
Author: James Taylor 
Authored: Thu Apr 26 17:13:48 2018 -0700
Committer: James Taylor 
Committed: Fri Apr 27 11:41:56 2018 -0700

--
 .../apache/phoenix/end2end/AlterTableIT.java| 12 ++-
 .../apache/phoenix/schema/MetaDataClient.java   | 22 +++-
 2 files changed, 19 insertions(+), 15 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/a18fd1e1/phoenix-core/src/it/java/org/apache/phoenix/end2end/AlterTableIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/AlterTableIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/AlterTableIT.java
index dd895dc..b1949ed 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/AlterTableIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/AlterTableIT.java
@@ -116,12 +116,14 @@ public class AlterTableIT extends ParallelStatsDisabledIT 
{
 Connection conn = DriverManager.getConnection(getUrl(), props);
 conn.setAutoCommit(false);
 
-try {
-String ddl = "CREATE TABLE  " + dataTableFullName +
-"  (a_string varchar not null, a_binary varbinary not 
null, col1 integer" +
-"  CONSTRAINT pk PRIMARY KEY (a_string, a_binary)) " + 
tableDDLOptions;
-createTestTable(getUrl(), ddl);
+String ddl = "CREATE TABLE  " + dataTableFullName +
+"  (a_string varchar not null, a_binary varbinary not null, 
col1 integer" +
+"  CONSTRAINT pk PRIMARY KEY (a_string, a_binary)) " + 
tableDDLOptions;
+createTestTable(getUrl(), ddl);
+
+conn.createStatement().execute("ALTER TABLE " + dataTableFullName + " 
SET DISABLE_WAL = true");
 
+try {
 ddl = "ALTER TABLE " + dataTableFullName + " ADD b_string VARCHAR 
NULL PRIMARY KEY";
 PreparedStatement stmt = conn.prepareStatement(ddl);
 stmt.execute();

http://git-wip-us.apache.org/repos/asf/phoenix/blob/a18fd1e1/phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java 
b/phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java
index b15072a..a3d2baf 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java
@@ -3259,16 +3259,18 @@ public class MetaDataClient {
 int position = table.getColumns().size();
 
 List currentPKs = table.getPKColumns();
-PColumn lastPK = currentPKs.get(currentPKs.size()-1);
-// Disallow adding columns if the last column is VARBIANRY.
-if (lastPK.getDataType() == PVarbinary.INSTANCE || 
lastPK.getDataType().isArrayType()) {
-throw new 
SQLExceptionInfo.Builder(SQLExceptionCode.VARBINARY_LAST_PK)
-
.setColumnName(lastPK.getName().getString()).build().buildException();
-}
-// Disallow adding columns if last column is fixed width and 
nullable.
-if (lastPK.isNullable() && 
lastPK.getDataType().isFixedWidth()) {
-throw new 
SQLExceptionInfo.Builder(SQLExceptionCode.NULLABLE_FIXED_WIDTH_LAST_PK)
-
.setColumnName(lastPK.getName().getString()).build().buildException();
+if (numCols > 0) {
+PColumn lastPK = currentPKs.get(currentPKs.size()-1);
+// Disallow adding columns if the last column is VARBIANRY.
+if (lastPK.getDataType() == PVarbinary.INSTANCE || 
lastPK.getDataType().isArrayType()) {
+throw new 
SQLExceptionInfo.Builder(SQLExceptionCode.VARBINARY_LAST_PK)
+
.setColumnName(lastPK.getName().getString()).build().buildException();
+}
+// Disallow adding columns if last column is fixed width 
and nullable.
+if (lastPK.isNullable() && 
lastPK.getDataType().isFixedWidth()) {
+throw new 
SQLExceptionInfo.Builder(SQLExceptionCode.NULLABLE_FIXED_WIDTH_LAST_PK)
+ 

[2/4] phoenix git commit: PHOENIX-4710 Don't set KEEP_DELETED_CELLS or VERSIONS for SYSTEM.LOG

2018-04-27 Thread jamestaylor
PHOENIX-4710 Don't set KEEP_DELETED_CELLS or VERSIONS for SYSTEM.LOG


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

Branch: refs/heads/4.x-HBase-1.3
Commit: 45ace77b2fe989be10121f6f0607f361a8d037b4
Parents: dad8019
Author: James Taylor 
Authored: Thu Apr 26 12:48:14 2018 -0700
Committer: James Taylor 
Committed: Fri Apr 27 11:41:05 2018 -0700

--
 .../org/apache/phoenix/coprocessor/MetaDataProtocol.java| 1 -
 .../apache/phoenix/query/ConnectionQueryServicesImpl.java   | 9 ++---
 .../phoenix/query/ConnectionlessQueryServicesImpl.java  | 7 +--
 3 files changed, 3 insertions(+), 14 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/45ace77b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataProtocol.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataProtocol.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataProtocol.java
index 36d6f0d..62b701d 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataProtocol.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataProtocol.java
@@ -72,7 +72,6 @@ public abstract class MetaDataProtocol extends 
MetaDataService {
 public static final long MIN_SYSTEM_TABLE_MIGRATION_TIMESTAMP = 0;
 public static final String MIGRATION_IN_PROGRESS = "MigrationInProgress";
 
-public static final int DEFAULT_LOG_VERSIONS = 10;
 public static final int DEFAULT_LOG_TTL = 7 * 24 * 60 * 60; // 7 days 
 
 // Min system table timestamps for every release.

http://git-wip-us.apache.org/repos/asf/phoenix/blob/45ace77b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
index 8866ced..d841f0b 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
@@ -170,8 +170,8 @@ import 
org.apache.phoenix.exception.RetriableUpgradeException;
 import org.apache.phoenix.exception.SQLExceptionCode;
 import org.apache.phoenix.exception.SQLExceptionInfo;
 import org.apache.phoenix.exception.UpgradeInProgressException;
-import org.apache.phoenix.exception.UpgradeRequiredException;
 import org.apache.phoenix.exception.UpgradeNotRequiredException;
+import org.apache.phoenix.exception.UpgradeRequiredException;
 import org.apache.phoenix.execute.MutationState;
 import org.apache.phoenix.hbase.index.IndexRegionSplitPolicy;
 import org.apache.phoenix.hbase.index.Indexer;
@@ -2469,7 +2469,7 @@ public class ConnectionQueryServicesImpl extends 
DelegateQueryServices implement
 
 // Available for testing
 protected String getLogTableDDL() {
-return setSystemLogDDLProperties(QueryConstants.CREATE_LOG_METADATA);
+return QueryConstants.CREATE_LOG_METADATA;
 }
 
 private String setSystemDDLProperties(String ddl) {
@@ -2478,11 +2478,6 @@ public class ConnectionQueryServicesImpl extends 
DelegateQueryServices implement
   props.getBoolean(DEFAULT_SYSTEM_KEEP_DELETED_CELLS_ATTRIB, 
QueryServicesOptions.DEFAULT_SYSTEM_KEEP_DELETED_CELLS));
 }
 
-private String setSystemLogDDLProperties(String ddl) {
-return String.format(ddl,
-  props.getBoolean(DEFAULT_SYSTEM_KEEP_DELETED_CELLS_ATTRIB, 
QueryServicesOptions.DEFAULT_SYSTEM_KEEP_DELETED_CELLS));
-}
-
 @Override
 public void init(final String url, final Properties props) throws 
SQLException {
 try {

http://git-wip-us.apache.org/repos/asf/phoenix/blob/45ace77b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionlessQueryServicesImpl.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionlessQueryServicesImpl.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionlessQueryServicesImpl.java
index aba9600..3531a87 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionlessQueryServicesImpl.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionlessQueryServicesImpl.java
@@ -164,7 +164,7 @@ public class ConnectionlessQueryServicesImpl extends 
DelegateQueryServices imple
 }
 

[4/4] phoenix git commit: PHOENIX-4705 Use XMLInputFactory.newInstance() instead of XMLInputFactory.newFactory()

2018-04-27 Thread jamestaylor
PHOENIX-4705 Use XMLInputFactory.newInstance() instead of 
XMLInputFactory.newFactory()


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

Branch: refs/heads/4.x-HBase-1.3
Commit: dad8019e49b2f946b234e2242875800910bd4723
Parents: a82f3da
Author: James Taylor 
Authored: Thu Apr 26 12:37:26 2018 -0700
Committer: James Taylor 
Committed: Fri Apr 27 11:41:05 2018 -0700

--
 .../pherf/configuration/XMLConfigParser.java  |  2 +-
 .../pherf/result/impl/XMLResultHandler.java   | 18 ++
 2 files changed, 11 insertions(+), 9 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/dad8019e/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/configuration/XMLConfigParser.java
--
diff --git 
a/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/configuration/XMLConfigParser.java
 
b/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/configuration/XMLConfigParser.java
index f3ec12f..a0ee471 100644
--- 
a/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/configuration/XMLConfigParser.java
+++ 
b/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/configuration/XMLConfigParser.java
@@ -115,7 +115,7 @@ public class XMLConfigParser {
  */
 // TODO Remove static calls
 public static DataModel readDataModel(Path file) throws JAXBException, 
XMLStreamException {
-XMLInputFactory xif = XMLInputFactory.newFactory();
+XMLInputFactory xif = XMLInputFactory.newInstance();
 xif.setProperty(XMLInputFactory.IS_SUPPORTING_EXTERNAL_ENTITIES, 
false);
 xif.setProperty(XMLInputFactory.SUPPORT_DTD, false);
 JAXBContext jaxbContext = JAXBContext.newInstance(DataModel.class);

http://git-wip-us.apache.org/repos/asf/phoenix/blob/dad8019e/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/result/impl/XMLResultHandler.java
--
diff --git 
a/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/result/impl/XMLResultHandler.java
 
b/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/result/impl/XMLResultHandler.java
index 05b5a2b..87d6806 100644
--- 
a/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/result/impl/XMLResultHandler.java
+++ 
b/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/result/impl/XMLResultHandler.java
@@ -18,8 +18,11 @@
 
 package org.apache.phoenix.pherf.result.impl;
 
-import org.apache.phoenix.pherf.result.*;
-import org.apache.phoenix.pherf.result.file.ResultFileDetails;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
 
 import javax.xml.bind.JAXBContext;
 import javax.xml.bind.Marshaller;
@@ -28,11 +31,10 @@ import javax.xml.stream.XMLInputFactory;
 import javax.xml.stream.XMLStreamReader;
 import javax.xml.transform.stream.StreamSource;
 
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
+import org.apache.phoenix.pherf.result.DataModelResult;
+import org.apache.phoenix.pherf.result.Result;
+import org.apache.phoenix.pherf.result.ResultValue;
+import org.apache.phoenix.pherf.result.file.ResultFileDetails;
 
 public class XMLResultHandler extends DefaultResultHandler{
 
@@ -74,7 +76,7 @@ public class XMLResultHandler extends DefaultResultHandler{
 }
 
 List readFromResultFile(File resultsFile) throws Exception {
-XMLInputFactory xif = XMLInputFactory.newFactory();
+XMLInputFactory xif = XMLInputFactory.newInstance();
 xif.setProperty(XMLInputFactory.IS_SUPPORTING_EXTERNAL_ENTITIES, 
false);
 xif.setProperty(XMLInputFactory.SUPPORT_DTD, false);
 JAXBContext jaxbContext = 
JAXBContext.newInstance(DataModelResult.class);



[3/4] phoenix git commit: PHOENIX-4711 Unable to set property on table with VARBINARY as last column

2018-04-27 Thread jamestaylor
PHOENIX-4711 Unable to set property on table with VARBINARY as last column


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

Branch: refs/heads/4.x-HBase-1.3
Commit: 4b0feaee2deb3c90c58a4e5a7a726bfbf72466fa
Parents: 45ace77
Author: James Taylor 
Authored: Thu Apr 26 17:13:48 2018 -0700
Committer: James Taylor 
Committed: Fri Apr 27 11:41:05 2018 -0700

--
 .../apache/phoenix/end2end/AlterTableIT.java| 12 ++-
 .../apache/phoenix/schema/MetaDataClient.java   | 22 +++-
 2 files changed, 19 insertions(+), 15 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/4b0feaee/phoenix-core/src/it/java/org/apache/phoenix/end2end/AlterTableIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/AlterTableIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/AlterTableIT.java
index dd895dc..b1949ed 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/AlterTableIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/AlterTableIT.java
@@ -116,12 +116,14 @@ public class AlterTableIT extends ParallelStatsDisabledIT 
{
 Connection conn = DriverManager.getConnection(getUrl(), props);
 conn.setAutoCommit(false);
 
-try {
-String ddl = "CREATE TABLE  " + dataTableFullName +
-"  (a_string varchar not null, a_binary varbinary not 
null, col1 integer" +
-"  CONSTRAINT pk PRIMARY KEY (a_string, a_binary)) " + 
tableDDLOptions;
-createTestTable(getUrl(), ddl);
+String ddl = "CREATE TABLE  " + dataTableFullName +
+"  (a_string varchar not null, a_binary varbinary not null, 
col1 integer" +
+"  CONSTRAINT pk PRIMARY KEY (a_string, a_binary)) " + 
tableDDLOptions;
+createTestTable(getUrl(), ddl);
+
+conn.createStatement().execute("ALTER TABLE " + dataTableFullName + " 
SET DISABLE_WAL = true");
 
+try {
 ddl = "ALTER TABLE " + dataTableFullName + " ADD b_string VARCHAR 
NULL PRIMARY KEY";
 PreparedStatement stmt = conn.prepareStatement(ddl);
 stmt.execute();

http://git-wip-us.apache.org/repos/asf/phoenix/blob/4b0feaee/phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java 
b/phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java
index b15072a..a3d2baf 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java
@@ -3259,16 +3259,18 @@ public class MetaDataClient {
 int position = table.getColumns().size();
 
 List currentPKs = table.getPKColumns();
-PColumn lastPK = currentPKs.get(currentPKs.size()-1);
-// Disallow adding columns if the last column is VARBIANRY.
-if (lastPK.getDataType() == PVarbinary.INSTANCE || 
lastPK.getDataType().isArrayType()) {
-throw new 
SQLExceptionInfo.Builder(SQLExceptionCode.VARBINARY_LAST_PK)
-
.setColumnName(lastPK.getName().getString()).build().buildException();
-}
-// Disallow adding columns if last column is fixed width and 
nullable.
-if (lastPK.isNullable() && 
lastPK.getDataType().isFixedWidth()) {
-throw new 
SQLExceptionInfo.Builder(SQLExceptionCode.NULLABLE_FIXED_WIDTH_LAST_PK)
-
.setColumnName(lastPK.getName().getString()).build().buildException();
+if (numCols > 0) {
+PColumn lastPK = currentPKs.get(currentPKs.size()-1);
+// Disallow adding columns if the last column is VARBIANRY.
+if (lastPK.getDataType() == PVarbinary.INSTANCE || 
lastPK.getDataType().isArrayType()) {
+throw new 
SQLExceptionInfo.Builder(SQLExceptionCode.VARBINARY_LAST_PK)
+
.setColumnName(lastPK.getName().getString()).build().buildException();
+}
+// Disallow adding columns if last column is fixed width 
and nullable.
+if (lastPK.isNullable() && 
lastPK.getDataType().isFixedWidth()) {
+throw new 
SQLExceptionInfo.Builder(SQLExceptionCode.NULLABLE_FIXED_WIDTH_LAST_PK)
+  

[1/4] phoenix git commit: PHOENIX-4709 Alter split policy in upgrade path for system tables

2018-04-27 Thread jamestaylor
Repository: phoenix
Updated Branches:
  refs/heads/4.x-HBase-1.3 a82f3daf1 -> 59d704e4d


PHOENIX-4709 Alter split policy in upgrade path for system tables


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

Branch: refs/heads/4.x-HBase-1.3
Commit: 59d704e4d884e8c38168b3a0c19a9620f5f32ce6
Parents: 4b0feae
Author: James Taylor 
Authored: Thu Apr 26 13:38:05 2018 -0700
Committer: James Taylor 
Committed: Fri Apr 27 11:41:05 2018 -0700

--
 .../phoenix/jdbc/PhoenixDatabaseMetaData.java   |   1 +
 .../query/ConnectionQueryServicesImpl.java  |  17 +++
 .../apache/phoenix/query/QueryConstants.java| 109 ++-
 3 files changed, 124 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/59d704e4/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 d56628a..320c6e7 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
@@ -217,6 +217,7 @@ public class PhoenixDatabaseMetaData implements 
DatabaseMetaData {
 
 public static final String TYPE_SEQUENCE = "SEQUENCE";
 public static final String SYSTEM_FUNCTION_TABLE = "FUNCTION";
+public static final String SYSTEM_FUNCTION = SYSTEM_CATALOG_SCHEMA + 
QueryConstants.NAME_SEPARATOR + "\"FUNCTION\"";
 public static final String SYSTEM_FUNCTION_NAME = 
SchemaUtil.getTableName(SYSTEM_CATALOG_SCHEMA, SYSTEM_FUNCTION_TABLE);
 public static final byte[] SYSTEM_FUNCTION_NAME_BYTES = 
Bytes.toBytes(SYSTEM_FUNCTION_NAME);
 public static final TableName SYSTEM_FUNCTION_HBASE_TABLE_NAME = 
TableName.valueOf(SYSTEM_FUNCTION_NAME);

http://git-wip-us.apache.org/repos/asf/phoenix/blob/59d704e4/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
index d841f0b..1d3feed 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
@@ -214,6 +214,8 @@ import org.apache.phoenix.schema.Sequence;
 import org.apache.phoenix.schema.SequenceAllocation;
 import org.apache.phoenix.schema.SequenceKey;
 import org.apache.phoenix.schema.SortOrder;
+import org.apache.phoenix.schema.SystemFunctionSplitPolicy;
+import org.apache.phoenix.schema.SystemStatsSplitPolicy;
 import org.apache.phoenix.schema.TableAlreadyExistsException;
 import org.apache.phoenix.schema.TableNotFoundException;
 import org.apache.phoenix.schema.TableProperty;
@@ -2949,6 +2951,21 @@ public class ConnectionQueryServicesImpl extends 
DelegateQueryServices implement
   MetaDataProtocol.MIN_SYSTEM_TABLE_TIMESTAMP_4_14_0,
   PhoenixDatabaseMetaData.TRANSACTION_PROVIDER + " "
 + PTinyint.INSTANCE.getSqlTypeName());
+metaConnection.createStatement().executeUpdate("ALTER TABLE " + 
+PhoenixDatabaseMetaData.SYSTEM_CATALOG + " SET " + 
+HConstants.VERSIONS + "= " + 
props.getInt(DEFAULT_SYSTEM_MAX_VERSIONS_ATTRIB, 
QueryServicesOptions.DEFAULT_SYSTEM_MAX_VERSIONS) + ",\n" +
+HColumnDescriptor.KEEP_DELETED_CELLS + "=" + 
props.getBoolean(DEFAULT_SYSTEM_KEEP_DELETED_CELLS_ATTRIB, 
QueryServicesOptions.DEFAULT_SYSTEM_KEEP_DELETED_CELLS)
+);
+metaConnection.createStatement().executeUpdate("ALTER TABLE " + 
+PhoenixDatabaseMetaData.SYSTEM_FUNCTION + " SET " + 
+HTableDescriptor.SPLIT_POLICY + "='" + 
SystemFunctionSplitPolicy.class.getName() + "',\n" +
+HConstants.VERSIONS + "= " + 
props.getInt(DEFAULT_SYSTEM_MAX_VERSIONS_ATTRIB, 
QueryServicesOptions.DEFAULT_SYSTEM_MAX_VERSIONS) + ",\n" +
+HColumnDescriptor.KEEP_DELETED_CELLS + "=" + 
props.getBoolean(DEFAULT_SYSTEM_KEEP_DELETED_CELLS_ATTRIB, 
QueryServicesOptions.DEFAULT_SYSTEM_KEEP_DELETED_CELLS)
+);
+metaConnection.createStatement().executeUpdate("ALTER TABLE " 

phoenix git commit: Fix WALReplayWithIndexWritesAndCompressedWALIT failure in 4.x-HBase-0.98 branch

2018-04-27 Thread vincentpoon
Repository: phoenix
Updated Branches:
  refs/heads/4.x-HBase-0.98 07fb31ef2 -> 8134d2824


Fix WALReplayWithIndexWritesAndCompressedWALIT failure in 4.x-HBase-0.98 branch


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

Branch: refs/heads/4.x-HBase-0.98
Commit: 8134d28243af1c48f419aa416ac4feebfbe18b33
Parents: 07fb31e
Author: Vincent Poon 
Authored: Fri Apr 27 10:26:38 2018 -0700
Committer: Vincent Poon 
Committed: Fri Apr 27 11:24:45 2018 -0700

--
 .../wal/WALReplayWithIndexWritesAndCompressedWALIT.java   | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/8134d282/phoenix-core/src/it/java/org/apache/hadoop/hbase/regionserver/wal/WALReplayWithIndexWritesAndCompressedWALIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/hadoop/hbase/regionserver/wal/WALReplayWithIndexWritesAndCompressedWALIT.java
 
b/phoenix-core/src/it/java/org/apache/hadoop/hbase/regionserver/wal/WALReplayWithIndexWritesAndCompressedWALIT.java
index 06b7f6c..bfa8b57 100644
--- 
a/phoenix-core/src/it/java/org/apache/hadoop/hbase/regionserver/wal/WALReplayWithIndexWritesAndCompressedWALIT.java
+++ 
b/phoenix-core/src/it/java/org/apache/hadoop/hbase/regionserver/wal/WALReplayWithIndexWritesAndCompressedWALIT.java
@@ -44,6 +44,7 @@ import org.apache.hadoop.hbase.client.Result;
 import org.apache.hadoop.hbase.client.ResultScanner;
 import org.apache.hadoop.hbase.client.Scan;
 import org.apache.hadoop.hbase.regionserver.HRegion;
+import org.apache.hadoop.hbase.regionserver.HRegionServer;
 import org.apache.hadoop.hbase.regionserver.RegionServerAccounting;
 import org.apache.hadoop.hbase.regionserver.RegionServerServices;
 import org.apache.hadoop.hbase.util.Bytes;
@@ -187,7 +188,7 @@ public class WALReplayWithIndexWritesAndCompressedWALIT {
 region0.close();
 region0.getLog().closeAndDelete();
 HLog wal = createWAL(this.conf);
-RegionServerServices mockRS = Mockito.mock(RegionServerServices.class);
+RegionServerServices mockRS = Mockito.mock(HRegionServer.class);
 // mock out some of the internals of the RSS, so we can run CPs
 Mockito.when(mockRS.getWAL(null)).thenReturn(wal);
 RegionServerAccounting rsa = Mockito.mock(RegionServerAccounting.class);



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

2018-04-27 Thread Apache Jenkins Server
See 




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

2018-04-27 Thread Apache Jenkins Server
See 


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

[Phoenix_Compile_Compat_wHBase] $ /bin/bash /tmp/jenkins5613482871360149472.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) 386524
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
/tmp/jenkins5613482871360149472.sh: fork: retry: No child processes
/tmp/jenkins5613482871360149472.sh: fork: retry: No child processes
/tmp/jenkins5613482871360149472.sh: fork: retry: No child processes
/tmp/jenkins5613482871360149472.sh: fork: retry: No child processes
/tmp/jenkins5613482871360149472.sh: fork: Resource temporarily unavailable
Build step 'Execute shell' marked build as failure


phoenix git commit: PHOENIX-4551 Possible ColumnAlreadyExistsException is thrown from delete when autocommit off (Rajeshbabu)

2018-04-27 Thread jamestaylor
Repository: phoenix
Updated Branches:
  refs/heads/4.x-HBase-1.1 b3653cc1c -> 00de48a52


PHOENIX-4551 Possible ColumnAlreadyExistsException is thrown from delete when 
autocommit off (Rajeshbabu)


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

Branch: refs/heads/4.x-HBase-1.1
Commit: 00de48a5297e4ab40ab6013a35d81da2570f4258
Parents: b3653cc
Author: James Taylor 
Authored: Fri Apr 27 00:09:13 2018 -0700
Committer: James Taylor 
Committed: Fri Apr 27 00:09:42 2018 -0700

--
 .../org/apache/phoenix/end2end/DeleteIT.java| 30 +++-
 .../apache/phoenix/compile/DeleteCompiler.java  | 17 +++
 2 files changed, 40 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/00de48a5/phoenix-core/src/it/java/org/apache/phoenix/end2end/DeleteIT.java
--
diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/DeleteIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/DeleteIT.java
index c31fdd9..689bf20 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/DeleteIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/DeleteIT.java
@@ -774,6 +774,35 @@ public class DeleteIT extends ParallelStatsDisabledIT {
 }
 
 }
+
+
+@Test
+public void 
testClientSideDeleteShouldNotFailWhenSameColumnPresentInMultipleIndexes()
+throws Exception {
+String tableName = generateUniqueName();
+String indexName1 = generateUniqueName();
+String indexName2 = generateUniqueName();
+String ddl =
+"CREATE TABLE IF NOT EXISTS "
++ tableName
++ " (pk1 DECIMAL NOT NULL, v1 VARCHAR, v2 VARCHAR 
CONSTRAINT PK PRIMARY KEY (pk1))";
+String idx1 = "CREATE INDEX " + indexName1 + " ON " + tableName + 
"(v1)";
+String idx2 = "CREATE INDEX " + indexName2 + " ON " + tableName + 
"(v1, v2)";
+try (Connection conn = DriverManager.getConnection(getUrl())) {
+conn.createStatement().execute(ddl);
+conn.createStatement().execute(idx1);
+conn.createStatement().execute(idx2);
+Statement stmt = conn.createStatement();
+stmt.executeUpdate("UPSERT INTO " + tableName + " VALUES 
(1,'value', 'value2')");
+conn.commit();
+conn.setAutoCommit(false);
+try {
+conn.createStatement().execute("DELETE FROM " + tableName + " 
WHERE pk1 > 0");
+} catch (Exception e) {
+fail("Should not throw any exception");
+}
+}
+}
 
 @Test
 public void testDeleteShouldNotFailWhenTheRowsMoreThanMaxMutationSize() 
throws Exception {
@@ -808,4 +837,3 @@ public class DeleteIT extends ParallelStatsDisabledIT {
 }
 }
 
-

http://git-wip-us.apache.org/repos/asf/phoenix/blob/00de48a5/phoenix-core/src/main/java/org/apache/phoenix/compile/DeleteCompiler.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/compile/DeleteCompiler.java 
b/phoenix-core/src/main/java/org/apache/phoenix/compile/DeleteCompiler.java
index b35135f..5f9c76c 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/compile/DeleteCompiler.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/compile/DeleteCompiler.java
@@ -25,6 +25,7 @@ import java.sql.SQLException;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.Iterator;
+import java.util.LinkedHashSet;
 import java.util.List;
 import java.util.Set;
 
@@ -469,7 +470,7 @@ public class DeleteCompiler {
 for (PTable index : clientSideIndexes) {
 selectColumnCount += index.getPKColumns().size() - pkColumnCount;
 }
-List projectedColumns = 
Lists.newArrayListWithExpectedSize(selectColumnCount + pkColumnOffset);
+Set projectedColumns = new 
LinkedHashSet(selectColumnCount + pkColumnOffset);
 List aliasedNodes = 
Lists.newArrayListWithExpectedSize(selectColumnCount);
 for (int i = isSalted ? 1 : 0; i < pkColumnOffset; i++) {
 PColumn column = table.getPKColumns().get(i);
@@ -490,8 +491,10 @@ public class DeleteCompiler {
 String columnName = columnInfo.getSecond();
 boolean hasNoColumnFamilies = 
table.getColumnFamilies().isEmpty();
 PColumn column = hasNoColumnFamilies ? 
table.getColumnForColumnName(columnName) :