phoenix git commit: PHOENIX-4472 Altering properties in the table descriptor is not working properly.

2017-12-21 Thread ankit
Repository: phoenix
Updated Branches:
  refs/heads/5.x-HBase-2.0 d081adced -> 0fcd9de8b


PHOENIX-4472 Altering properties in the table descriptor is not working 
properly.


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

Branch: refs/heads/5.x-HBase-2.0
Commit: 0fcd9de8b69e9d996af1f4420c247615bc1767d9
Parents: d081adc
Author: Ankit Singhal 
Authored: Fri Dec 22 13:17:25 2017 +0530
Committer: Ankit Singhal 
Committed: Fri Dec 22 13:17:25 2017 +0530

--
 .../java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java | 2 ++
 1 file changed, 2 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/0fcd9de8/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 c273bd4..5c5a42e 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
@@ -1923,6 +1923,7 @@ public class ConnectionQueryServicesImpl extends 
DelegateQueryServices implement
 ColumnFamilyDescriptor tableColDescriptor = 
tableDescriptor.getColumnFamily(familyName);
 
indexColDescriptorBuilder.setMaxVersions(tableColDescriptor.getMaxVersions());
 indexColDescriptorBuilder.setValue( 
Bytes.toBytes(PhoenixTransactionContext.PROPERTY_TTL),tableColDescriptor.getValue(Bytes.toBytes(PhoenixTransactionContext.PROPERTY_TTL)));
+indexDescriptorBuilder.removeColumnFamily(familyName);
 
indexDescriptorBuilder.addColumnFamily(indexColDescriptorBuilder.build());
 } else {
 for (PColumnFamily family : table.getColumnFamilies()) {
@@ -1933,6 +1934,7 @@ public class ConnectionQueryServicesImpl extends 
DelegateQueryServices implement
 ColumnFamilyDescriptorBuilder indexColDescriptorBuilder = 
ColumnFamilyDescriptorBuilder.newBuilder(indexColDescriptor);
 
indexColDescriptorBuilder.setMaxVersions(tableColDescriptor.getMaxVersions());
 indexColDescriptorBuilder.setValue( 
Bytes.toBytes(PhoenixTransactionContext.PROPERTY_TTL),tableColDescriptor.getValue(Bytes.toBytes(PhoenixTransactionContext.PROPERTY_TTL)));
+indexDescriptorBuilder.removeColumnFamily(familyName);
 
indexDescriptorBuilder.addColumnFamily(indexColDescriptorBuilder.build());
 }
 }



phoenix git commit: PHOENIX-4437 Make QueryPlan.getEstimatedBytesToScan() independent of getExplainPlan() and pull optimize() out of getExplainPlan()

2017-12-21 Thread maryannxue
Repository: phoenix
Updated Branches:
  refs/heads/master 9355a4d26 -> 412329a74


PHOENIX-4437 Make QueryPlan.getEstimatedBytesToScan() independent of 
getExplainPlan() and pull optimize() out of getExplainPlan()


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

Branch: refs/heads/master
Commit: 412329a7415302831954891285d291055328c28b
Parents: 9355a4d
Author: maryannxue 
Authored: Thu Dec 21 10:31:04 2017 -0800
Committer: maryannxue 
Committed: Thu Dec 21 10:31:04 2017 -0800

--
 .../end2end/ExplainPlanWithStatsEnabledIT.java  |  2 +-
 .../apache/phoenix/execute/BaseQueryPlan.java   | 45 ++
 .../apache/phoenix/execute/HashJoinPlan.java| 59 +-
 .../phoenix/execute/SortMergeJoinPlan.java  | 63 ++--
 .../org/apache/phoenix/execute/UnionPlan.java   | 53 
 .../apache/phoenix/jdbc/PhoenixStatement.java   |  9 ++-
 6 files changed, 119 insertions(+), 112 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/412329a7/phoenix-core/src/it/java/org/apache/phoenix/end2end/ExplainPlanWithStatsEnabledIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ExplainPlanWithStatsEnabledIT.java
 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ExplainPlanWithStatsEnabledIT.java
index 49efa97..f13510b 100644
--- 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ExplainPlanWithStatsEnabledIT.java
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ExplainPlanWithStatsEnabledIT.java
@@ -298,7 +298,7 @@ public class ExplainPlanWithStatsEnabledIT extends 
ParallelStatsEnabledIT {
 try (Connection conn = DriverManager.getConnection(getUrl())) {
 conn.setAutoCommit(false);
 Estimate info = getByteRowEstimates(conn, sql, binds);
-assertEquals((Long) 200l, info.estimatedBytes);
+assertEquals((Long) 176l, info.estimatedBytes);
 assertEquals((Long) 2l, info.estimatedRows);
 assertTrue(info.estimateInfoTs > 0);
 }

http://git-wip-us.apache.org/repos/asf/phoenix/blob/412329a7/phoenix-core/src/main/java/org/apache/phoenix/execute/BaseQueryPlan.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/execute/BaseQueryPlan.java 
b/phoenix-core/src/main/java/org/apache/phoenix/execute/BaseQueryPlan.java
index 31f67b7..380037f 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/execute/BaseQueryPlan.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/execute/BaseQueryPlan.java
@@ -117,7 +117,7 @@ public abstract class BaseQueryPlan implements QueryPlan {
 protected Long estimatedRows;
 protected Long estimatedSize;
 protected Long estimateInfoTimestamp;
-private boolean explainPlanCalled;
+private boolean getEstimatesCalled;
 
 
 protected BaseQueryPlan(
@@ -498,32 +498,17 @@ public abstract class BaseQueryPlan implements QueryPlan {
 
 @Override
 public ExplainPlan getExplainPlan() throws SQLException {
-explainPlanCalled = true;
 if (context.getScanRanges() == ScanRanges.NOTHING) {
 return new ExplainPlan(Collections.singletonList("DEGENERATE SCAN 
OVER " + getTableRef().getTable().getName().getString()));
 }
 
-// If cost-based optimizer is enabled, we need to initialize a dummy 
iterator to
-// get the stats for computing costs.
-boolean costBased =
-
context.getConnection().getQueryServices().getConfiguration().getBoolean(
-QueryServices.COST_BASED_OPTIMIZER_ENABLED, 
QueryServicesOptions.DEFAULT_COST_BASED_OPTIMIZER_ENABLED);
-if (costBased) {
-ResultIterator iterator = iterator();
-iterator.close();
-}
-// Optimize here when getting explain plan, as queries don't get 
optimized until after compilation
-QueryPlan plan = 
context.getConnection().getQueryServices().getOptimizer().optimize(context.getStatement(),
 this);
-ExplainPlan exp = plan instanceof BaseQueryPlan ? new 
ExplainPlan(getPlanSteps(plan.iterator())) : plan.getExplainPlan();
-if (!costBased) { // do not override estimates if they are used for 
cost calculation.
-this.estimatedRows = plan.getEstimatedRowsToScan();
-this.estimatedSize = plan.getEstimatedBytesToScan();
-this.estimateInfoTimestamp = plan.getEstimateInfoTimestamp();
-}
-return exp;
+

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

2017-12-21 Thread Apache Jenkins Server
See 


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

[Phoenix_Compile_Compat_wHBase] $ /bin/bash /tmp/jenkins8770679541142200105.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) 386417
max locked memory   (kbytes, -l) 64
max memory size (kbytes, -m) unlimited
open files  (-n) 6
pipe size(512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority  (-r) 0
stack size  (kbytes, -s) 8192
cpu time   (seconds, -t) unlimited
max user processes  (-u) 10240
virtual memory  (kbytes, -v) unlimited
file locks  (-x) unlimited
core id : 0
core id : 1
core id : 2
core id : 3
core id : 4
core id : 5
physical id : 0
physical id : 1
MemTotal:   98958120 kB
MemFree:28629716 kB
Filesystem  Size  Used Avail Use% Mounted on
udev 48G 0   48G   0% /dev
tmpfs   9.5G  970M  8.5G  11% /run
/dev/sda1   364G  185G  161G  54% /
tmpfs48G  1.1M   48G   1% /dev/shm
tmpfs   5.0M 0  5.0M   0% /run/lock
tmpfs48G 0   48G   0% /sys/fs/cgroup
tmpfs   9.5G 0  9.5G   0% /run/user/910
apache-maven-2.2.1
apache-maven-3.0.4
apache-maven-3.0.5
apache-maven-3.2.1
apache-maven-3.2.5
apache-maven-3.3.3
apache-maven-3.3.9
apache-maven-3.5.0
apache-maven-3.5.2
latest
latest2
latest3


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

Cloning into 'hbase'...
Switched to a new branch '0.98'
Branch 0.98 set up to track remote branch 0.98 from origin.

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

main:
[mkdir] Created dir: 

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

main:
[mkdir] Created dir: 

 [copy] Copying 20 files to 

[mkdir] Created dir: 

[mkdir] Created dir: 


main:
[mkdir] Created dir: 

 [copy] Copying 17 files to 

[mkdir] Created dir: 


main:
[mkdir] Created dir: 

 [copy] Copying 1 file to 

[mkdir] Created dir: 


HBase pom.xml:

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

 does not exist: must build 

PhoenixSQL.g


===
Verifying compile level compatibility with HBase branch-1.3 with Phoenix master