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

2016-02-14 Thread Apache Jenkins Server
See 



Build failed in Jenkins: Phoenix-4.x-HBase-1.0 #384

2016-02-14 Thread Apache Jenkins Server
See 

Changes:

[ankitsinghal59] PHOENIX-2671 System.STATS table getting truncated every time 
on new

--
Started by an SCM change
[EnvInject] - Loading node environment variables.
Building remotely on ubuntu-6 (docker Ubuntu ubuntu yahoo-not-h2) in workspace 

 > git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
 > git config remote.origin.url 
 > https://git-wip-us.apache.org/repos/asf/phoenix.git # timeout=10
Fetching upstream changes from 
https://git-wip-us.apache.org/repos/asf/phoenix.git
 > git --version # timeout=10
 > git -c core.askpass=true fetch --tags --progress 
 > https://git-wip-us.apache.org/repos/asf/phoenix.git 
 > +refs/heads/*:refs/remotes/origin/*
 > git rev-parse origin/4.x-HBase-1.0^{commit} # timeout=10
Checking out Revision 19012c0265d37cd0ae7655648810b275659b8d6e 
(origin/4.x-HBase-1.0)
 > git config core.sparsecheckout # timeout=10
 > git checkout -f 19012c0265d37cd0ae7655648810b275659b8d6e
 > git rev-list 6a6b64b23b661b7fd544c356f00c0f9ff692cd02 # timeout=10
No emails were triggered.
[EnvInject] - Executing scripts and injecting environment variables after the 
SCM step.
[EnvInject] - Injecting as environment variables the properties content 
MAVEN_OPTS=-Xmx3G

[EnvInject] - Variables injected successfully.
[Phoenix-4.x-HBase-1.0] $ /bin/bash -xe /tmp/hudson815381609919023.sh
+ echo 'DELETING ~/.m2/repository/org/apache/htrace. See 
https://issues.apache.org/jira/browse/PHOENIX-1802'
DELETING ~/.m2/repository/org/apache/htrace. See 
https://issues.apache.org/jira/browse/PHOENIX-1802
+ echo 'CURRENT CONTENT:'
CURRENT CONTENT:
+ ls /home/jenkins/.m2/repository/org/apache/htrace
htrace
htrace-core
[Phoenix-4.x-HBase-1.0] $ /home/jenkins/tools/maven/apache-maven-3.0.4/bin/mvn 
-U clean install -Dcheckstyle.skip=true
[INFO] Scanning for projects...
[INFO] 
[INFO] Reactor Build Order:
[INFO] 
[INFO] Apache Phoenix
[INFO] Phoenix Core
[INFO] Phoenix - Flume
[INFO] Phoenix - Pig
[INFO] Phoenix Query Server Client
[INFO] Phoenix Query Server
[INFO] Phoenix - Pherf
[INFO] Phoenix - Spark
[INFO] Phoenix Assembly
[INFO] Phoenix - Tracing Web Application
[INFO] 
[INFO] 
[INFO] Building Apache Phoenix 4.7.0-HBase-1.0
[INFO] 
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ phoenix ---
[INFO] Deleting 
[INFO] 
[INFO] --- maven-checkstyle-plugin:2.13:check (validate) @ phoenix ---
[INFO] 
[INFO] --- maven-remote-resources-plugin:1.5:process (default) @ phoenix ---
[INFO] 
[INFO] --- maven-source-plugin:2.2.1:jar-no-fork (attach-sources) @ phoenix ---
[INFO] 
[INFO] --- maven-jar-plugin:2.4:test-jar (default) @ phoenix ---
[WARNING] JAR will be empty - no content was marked for inclusion!
[INFO] Building jar: 

[INFO] 
[INFO] --- maven-site-plugin:3.2:attach-descriptor (attach-descriptor) @ 
phoenix ---
[INFO] 
[INFO] --- maven-install-plugin:2.5.1:install (default-install) @ phoenix ---
[INFO] Installing 
 to 
/home/jenkins/.m2/repository/org/apache/phoenix/phoenix/4.7.0-HBase-1.0/phoenix-4.7.0-HBase-1.0.pom
[INFO] Installing 

 to 
/home/jenkins/.m2/repository/org/apache/phoenix/phoenix/4.7.0-HBase-1.0/phoenix-4.7.0-HBase-1.0-tests.jar
[INFO] 
[INFO] 
[INFO] Building Phoenix Core 4.7.0-HBase-1.0
[INFO] 
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ phoenix-core ---
[INFO] Deleting 

[INFO] 
[INFO] --- maven-checkstyle-plugin:2.13:check (validate) @ phoenix-core ---
[INFO] 
[INFO] --- build-helper-maven-plugin:1.9.1:add-test-source (add-test-source) @ 
phoenix-core ---
[INFO] Test Source directory: 

 added.
[INFO] 
[INFO] --- build-helper-maven-plugin:1.9.1:add-test-resource 
(add-test-resource) @ phoenix-core ---
[INFO] 
[INFO] --- build-helper-maven-plugin:1.9.1:add-source (add-source) @ 
phoenix-core ---
[INFO] Source directory: 

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

2016-02-14 Thread Apache Jenkins Server
See 

Changes:

[ankitsinghal59] PHOENIX-2671 System.STATS table getting truncated every time 
on new

--
Started by an SCM change
[EnvInject] - Loading node environment variables.
Building remotely on ubuntu3 (Ubuntu ubuntu legacy-ubuntu) in workspace 

 > git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
 > git config remote.origin.url 
 > https://git-wip-us.apache.org/repos/asf/phoenix.git # timeout=10
Fetching upstream changes from 
https://git-wip-us.apache.org/repos/asf/phoenix.git
 > git --version # timeout=10
 > git -c core.askpass=true fetch --tags --progress 
 > https://git-wip-us.apache.org/repos/asf/phoenix.git 
 > +refs/heads/*:refs/remotes/origin/*
 > git rev-parse origin/4.x-HBase-0.98^{commit} # timeout=10
Checking out Revision a8b3a03ef8c4c0a1df459a8950686ae3f1d24789 
(origin/4.x-HBase-0.98)
 > git config core.sparsecheckout # timeout=10
 > git checkout -f a8b3a03ef8c4c0a1df459a8950686ae3f1d24789
 > git rev-list ee8a2e42359bd59f818021d4b047157c0b2d6733 # timeout=10
No emails were triggered.
[EnvInject] - Executing scripts and injecting environment variables after the 
SCM step.
[EnvInject] - Injecting as environment variables the properties content 
MAVEN_OPTS=-Xmx3G

[EnvInject] - Variables injected successfully.
[Phoenix-4.x-HBase-0.98] $ /bin/bash -xe /tmp/hudson3427710181948804682.sh
+ echo 'DELETING ~/.m2/repository/org/apache/htrace. See 
https://issues.apache.org/jira/browse/PHOENIX-1802'
DELETING ~/.m2/repository/org/apache/htrace. See 
https://issues.apache.org/jira/browse/PHOENIX-1802
+ echo 'CURRENT CONTENT:'
CURRENT CONTENT:
+ ls /home/jenkins/.m2/repository/org/apache/htrace
htrace
htrace-core
[Phoenix-4.x-HBase-0.98] $ /home/jenkins/tools/maven/apache-maven-3.0.4/bin/mvn 
-U clean install -Dcheckstyle.skip=true
[INFO] Scanning for projects...
[INFO] 
[INFO] Reactor Build Order:
[INFO] 
[INFO] Apache Phoenix
[INFO] Phoenix Core
[INFO] Phoenix - Flume
[INFO] Phoenix - Pig
[INFO] Phoenix Query Server Client
[INFO] Phoenix Query Server
[INFO] Phoenix - Pherf
[INFO] Phoenix - Spark
[INFO] Phoenix Assembly
[INFO] Phoenix - Tracing Web Application
[INFO] 
[INFO] 
[INFO] Building Apache Phoenix 4.7.0-HBase-0.98
[INFO] 
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ phoenix ---
[INFO] Deleting 
/x1/jenkins/jenkins-slave/workspace/Phoenix-4.x-HBase-0.98/target
[INFO] 
[INFO] --- maven-checkstyle-plugin:2.13:check (validate) @ phoenix ---
[INFO] 
[INFO] --- maven-remote-resources-plugin:1.5:process (default) @ phoenix ---
[INFO] 
[INFO] --- maven-source-plugin:2.2.1:jar-no-fork (attach-sources) @ phoenix ---
[INFO] 
[INFO] --- maven-jar-plugin:2.4:test-jar (default) @ phoenix ---
[WARNING] JAR will be empty - no content was marked for inclusion!
[INFO] Building jar: 
/x1/jenkins/jenkins-slave/workspace/Phoenix-4.x-HBase-0.98/target/phoenix-4.7.0-HBase-0.98-tests.jar
[INFO] 
[INFO] --- maven-site-plugin:3.2:attach-descriptor (attach-descriptor) @ 
phoenix ---
[INFO] 
[INFO] --- maven-install-plugin:2.5.1:install (default-install) @ phoenix ---
[INFO] Installing 
/x1/jenkins/jenkins-slave/workspace/Phoenix-4.x-HBase-0.98/pom.xml to 
/home/jenkins/.m2/repository/org/apache/phoenix/phoenix/4.7.0-HBase-0.98/phoenix-4.7.0-HBase-0.98.pom
[INFO] Installing 
/x1/jenkins/jenkins-slave/workspace/Phoenix-4.x-HBase-0.98/target/phoenix-4.7.0-HBase-0.98-tests.jar
 to 
/home/jenkins/.m2/repository/org/apache/phoenix/phoenix/4.7.0-HBase-0.98/phoenix-4.7.0-HBase-0.98-tests.jar
[INFO] 
[INFO] 
[INFO] Building Phoenix Core 4.7.0-HBase-0.98
[INFO] 
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ phoenix-core ---
[INFO] Deleting 
/x1/jenkins/jenkins-slave/workspace/Phoenix-4.x-HBase-0.98/phoenix-core/target
[INFO] 
[INFO] --- maven-checkstyle-plugin:2.13:check (validate) @ phoenix-core ---
[INFO] 
[INFO] --- build-helper-maven-plugin:1.9.1:add-test-source (add-test-source) @ 
phoenix-core ---
[INFO] Test Source directory: 
/x1/jenkins/jenkins-slave/workspace/Phoenix-4.x-HBase-0.98/phoenix-core/src/it/java
 added.
[INFO] 
[INFO] --- build-helper-maven-plugin:1.9.1:add-test-resource 
(add-test-resource) @ phoenix-core ---
[INFO] 
[INFO] --- build-helper-maven-plugin:1.9.1:add-source (add-source) @ 
phoenix-core ---
[INFO] Source directory: 

phoenix git commit: PHOENIX-2671 System.STATS table getting truncated every time on new client connection(Ankit Singhal)

2016-02-14 Thread ankit
Repository: phoenix
Updated Branches:
  refs/heads/master cdaca287c -> 6881aef0c


PHOENIX-2671 System.STATS table getting truncated every time on new client 
connection(Ankit Singhal)


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

Branch: refs/heads/master
Commit: 6881aef0cfaae8643303f0612a2a4b997b8a5138
Parents: cdaca28
Author: Ankit Singhal 
Authored: Mon Feb 15 12:04:20 2016 +0530
Committer: Ankit Singhal 
Committed: Mon Feb 15 12:04:20 2016 +0530

--
 .../query/ConnectionQueryServicesImpl.java  | 48 ++--
 .../org/apache/phoenix/util/UpgradeUtil.java| 16 +++
 2 files changed, 22 insertions(+), 42 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/6881aef0/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 897c207..9a385b2 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
@@ -188,11 +188,6 @@ import org.apache.twill.zookeeper.ZKClients;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import co.cask.tephra.TransactionSystemClient;
-import co.cask.tephra.TxConstants;
-import co.cask.tephra.distributed.PooledClientProvider;
-import co.cask.tephra.distributed.TransactionServiceClient;
-
 import com.google.common.annotations.VisibleForTesting;
 import com.google.common.base.Joiner;
 import com.google.common.base.Throwables;
@@ -205,6 +200,11 @@ import com.google.common.collect.Maps;
 import com.google.common.collect.Sets;
 import com.google.common.util.concurrent.ThreadFactoryBuilder;
 
+import co.cask.tephra.TransactionSystemClient;
+import co.cask.tephra.TxConstants;
+import co.cask.tephra.distributed.PooledClientProvider;
+import co.cask.tephra.distributed.TransactionServiceClient;
+
 
 public class ConnectionQueryServicesImpl extends DelegateQueryServices 
implements ConnectionQueryServices {
 private static final Logger logger = 
LoggerFactory.getLogger(ConnectionQueryServicesImpl.class);
@@ -2370,14 +2370,16 @@ public class ConnectionQueryServicesImpl extends 
DelegateQueryServices implement
 // parts we haven't yet done).
 metaConnection = 
addColumnsIfNotExists(metaConnection, PhoenixDatabaseMetaData.SYSTEM_CATALOG, 
MetaDataProtocol.MIN_SYSTEM_TABLE_TIMESTAMP_4_7_0 - 2,
 
PhoenixDatabaseMetaData.TRANSACTIONAL + " " + 
PBoolean.INSTANCE.getSqlTypeName());
-metaConnection = 
addColumnsIfNotExists(metaConnection, PhoenixDatabaseMetaData.SYSTEM_CATALOG, 
MetaDataProtocol.MIN_SYSTEM_TABLE_TIMESTAMP_4_7_0 - 1, 
-
PhoenixDatabaseMetaData.UPDATE_CACHE_FREQUENCY + " " + 
PLong.INSTANCE.getSqlTypeName());
+// Drop old stats table so that new stats 
table is created
+metaConnection = 
dropStatsTable(metaConnection,
+
MetaDataProtocol.MIN_SYSTEM_TABLE_TIMESTAMP_4_7_0 - 1);
+metaConnection = 
addColumnsIfNotExists(metaConnection,
+
PhoenixDatabaseMetaData.SYSTEM_CATALOG,
+
MetaDataProtocol.MIN_SYSTEM_TABLE_TIMESTAMP_4_7_0,
+
PhoenixDatabaseMetaData.UPDATE_CACHE_FREQUENCY + " "
++ 
PLong.INSTANCE.getSqlTypeName());
 
setImmutableTableIndexesImmutable(metaConnection);
-   // Drop 
old stats table so that new stats table is created
-   
metaConnection = dropStatsTable(metaConnection,
-   
MetaDataProtocol.MIN_SYSTEM_TABLE_TIMESTAMP_4_7_0);
-   // 
Clear the server cache so the above changes make it over to any clients
-

phoenix git commit: PHOENIX-2671 System.STATS table getting truncated every time on new client connection(Ankit Singhal)

2016-02-14 Thread ankit
Repository: phoenix
Updated Branches:
  refs/heads/4.x-HBase-1.0 6a6b64b23 -> 19012c026


PHOENIX-2671 System.STATS table getting truncated every time on new client 
connection(Ankit Singhal)


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

Branch: refs/heads/4.x-HBase-1.0
Commit: 19012c0265d37cd0ae7655648810b275659b8d6e
Parents: 6a6b64b
Author: Ankit Singhal 
Authored: Mon Feb 15 12:03:21 2016 +0530
Committer: Ankit Singhal 
Committed: Mon Feb 15 12:03:21 2016 +0530

--
 .../query/ConnectionQueryServicesImpl.java  | 48 ++--
 .../org/apache/phoenix/util/UpgradeUtil.java| 16 +++
 2 files changed, 22 insertions(+), 42 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/19012c02/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 a8d0b39..26d7a3d 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
@@ -188,11 +188,6 @@ import org.apache.twill.zookeeper.ZKClients;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import co.cask.tephra.TransactionSystemClient;
-import co.cask.tephra.TxConstants;
-import co.cask.tephra.distributed.PooledClientProvider;
-import co.cask.tephra.distributed.TransactionServiceClient;
-
 import com.google.common.annotations.VisibleForTesting;
 import com.google.common.base.Joiner;
 import com.google.common.base.Throwables;
@@ -254,6 +249,11 @@ public class ConnectionQueryServicesImpl extends 
DelegateQueryServices implement
 private ScheduledExecutorService renewLeaseExecutor;
 private final boolean renewLeaseEnabled;
 
+import co.cask.tephra.TransactionSystemClient;
+import co.cask.tephra.TxConstants;
+import co.cask.tephra.distributed.PooledClientProvider;
+import co.cask.tephra.distributed.TransactionServiceClient;
+
 
 private static interface FeatureSupported {
 boolean isSupported(ConnectionQueryServices services);
@@ -2364,14 +2364,16 @@ public class ConnectionQueryServicesImpl extends 
DelegateQueryServices implement
 // parts we haven't yet done).
 metaConnection = 
addColumnsIfNotExists(metaConnection, PhoenixDatabaseMetaData.SYSTEM_CATALOG, 
MetaDataProtocol.MIN_SYSTEM_TABLE_TIMESTAMP_4_7_0 - 2,
 
PhoenixDatabaseMetaData.TRANSACTIONAL + " " + 
PBoolean.INSTANCE.getSqlTypeName());
-metaConnection = 
addColumnsIfNotExists(metaConnection, PhoenixDatabaseMetaData.SYSTEM_CATALOG, 
MetaDataProtocol.MIN_SYSTEM_TABLE_TIMESTAMP_4_7_0 - 1, 
-
PhoenixDatabaseMetaData.UPDATE_CACHE_FREQUENCY + " " + 
PLong.INSTANCE.getSqlTypeName());
+// Drop old stats table so that new stats 
table is created
+metaConnection = 
dropStatsTable(metaConnection,
+
MetaDataProtocol.MIN_SYSTEM_TABLE_TIMESTAMP_4_7_0 - 1);
+metaConnection = 
addColumnsIfNotExists(metaConnection,
+
PhoenixDatabaseMetaData.SYSTEM_CATALOG,
+
MetaDataProtocol.MIN_SYSTEM_TABLE_TIMESTAMP_4_7_0,
+
PhoenixDatabaseMetaData.UPDATE_CACHE_FREQUENCY + " "
++ 
PLong.INSTANCE.getSqlTypeName());
 
setImmutableTableIndexesImmutable(metaConnection);
-   // Drop 
old stats table so that new stats table is created
-   
metaConnection = dropStatsTable(metaConnection,
-   
MetaDataProtocol.MIN_SYSTEM_TABLE_TIMESTAMP_4_7_0);
-   // 
Clear the server cache so the above changes make it over to any clients
-   // that 
already have cached 

phoenix git commit: PHOENIX-2671 System.STATS table getting truncated every time on new client connection(Ankit Singhal)

2016-02-14 Thread ankit
Repository: phoenix
Updated Branches:
  refs/heads/4.x-HBase-0.98 ee8a2e423 -> a8b3a03ef


PHOENIX-2671 System.STATS table getting truncated every time on new client 
connection(Ankit Singhal)


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

Branch: refs/heads/4.x-HBase-0.98
Commit: a8b3a03ef8c4c0a1df459a8950686ae3f1d24789
Parents: ee8a2e4
Author: Ankit Singhal 
Authored: Mon Feb 15 12:02:07 2016 +0530
Committer: Ankit Singhal 
Committed: Mon Feb 15 12:02:07 2016 +0530

--
 .../query/ConnectionQueryServicesImpl.java  | 48 ++--
 .../org/apache/phoenix/util/UpgradeUtil.java| 16 +++
 2 files changed, 22 insertions(+), 42 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/a8b3a03e/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 998b7f8..a9af8ea 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
@@ -189,11 +189,6 @@ import org.apache.twill.zookeeper.ZKClients;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import co.cask.tephra.TransactionSystemClient;
-import co.cask.tephra.TxConstants;
-import co.cask.tephra.distributed.PooledClientProvider;
-import co.cask.tephra.distributed.TransactionServiceClient;
-
 import com.google.common.annotations.VisibleForTesting;
 import com.google.common.base.Joiner;
 import com.google.common.base.Throwables;
@@ -673,6 +668,11 @@ public class ConnectionQueryServicesImpl extends 
DelegateQueryServices implement
 });
 }
 
+import co.cask.tephra.TransactionSystemClient;
+import co.cask.tephra.TxConstants;
+import co.cask.tephra.distributed.PooledClientProvider;
+import co.cask.tephra.distributed.TransactionServiceClient;
+
 
 @Override
 public PhoenixConnection connect(String url, Properties info) throws 
SQLException {
@@ -2364,14 +2364,16 @@ public class ConnectionQueryServicesImpl extends 
DelegateQueryServices implement
 // parts we haven't yet done).
 metaConnection = 
addColumnsIfNotExists(metaConnection, PhoenixDatabaseMetaData.SYSTEM_CATALOG, 
MetaDataProtocol.MIN_SYSTEM_TABLE_TIMESTAMP_4_7_0 - 2,
 
PhoenixDatabaseMetaData.TRANSACTIONAL + " " + 
PBoolean.INSTANCE.getSqlTypeName());
-metaConnection = 
addColumnsIfNotExists(metaConnection, PhoenixDatabaseMetaData.SYSTEM_CATALOG, 
MetaDataProtocol.MIN_SYSTEM_TABLE_TIMESTAMP_4_7_0 - 1, 
-
PhoenixDatabaseMetaData.UPDATE_CACHE_FREQUENCY + " " + 
PLong.INSTANCE.getSqlTypeName());
+// Drop old stats table so that new stats 
table is created
+metaConnection = 
dropStatsTable(metaConnection,
+
MetaDataProtocol.MIN_SYSTEM_TABLE_TIMESTAMP_4_7_0 - 1);
+metaConnection = 
addColumnsIfNotExists(metaConnection,
+
PhoenixDatabaseMetaData.SYSTEM_CATALOG,
+
MetaDataProtocol.MIN_SYSTEM_TABLE_TIMESTAMP_4_7_0,
+
PhoenixDatabaseMetaData.UPDATE_CACHE_FREQUENCY + " "
++ 
PLong.INSTANCE.getSqlTypeName());
 
setImmutableTableIndexesImmutable(metaConnection);
-   // Drop 
old stats table so that new stats table is created
-   
metaConnection = dropStatsTable(metaConnection,
-   
MetaDataProtocol.MIN_SYSTEM_TABLE_TIMESTAMP_4_7_0);
-   // 
Clear the server cache so the above changes make it over to any clients
-   // that 
already have cached data.
+// that already have cached data.