Github user JamesRTaylor commented on a diff in the pull request:
https://github.com/apache/phoenix/pull/147#discussion_r50166028
--- Diff:
phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataRegionObserver.java
---
@@ -96,10 +111,109 @@ public void start(CoprocessorEnvironment env) throws
IOException {
rebuildIndexTimeInterval =
env.getConfiguration().getLong(QueryServices.INDEX_FAILURE_HANDLING_REBUILD_INTERVAL_ATTRIB,
QueryServicesOptions.DEFAULT_INDEX_FAILURE_HANDLING_REBUILD_INTERVAL);
}
-
+
+ private static String getJdbcUrl(RegionCoprocessorEnvironment env) {
+ String zkQuorum =
env.getConfiguration().get(HConstants.ZOOKEEPER_QUORUM);
+ String zkClientPort =
env.getConfiguration().get(HConstants.ZOOKEEPER_CLIENT_PORT,
+ Integer.toString(HConstants.DEFAULT_ZOOKEPER_CLIENT_PORT));
+ String zkParentNode =
env.getConfiguration().get(HConstants.ZOOKEEPER_ZNODE_PARENT,
+ HConstants.DEFAULT_ZOOKEEPER_ZNODE_PARENT);
+ return PhoenixRuntime.JDBC_PROTOCOL +
PhoenixRuntime.JDBC_PROTOCOL_SEPARATOR + zkQuorum
+ + PhoenixRuntime.JDBC_PROTOCOL_SEPARATOR + zkClientPort
+ + PhoenixRuntime.JDBC_PROTOCOL_SEPARATOR + zkParentNode;
+ }
@Override
public void postOpen(ObserverContext<RegionCoprocessorEnvironment> e) {
+ final RegionCoprocessorEnvironment env = e.getEnvironment();
+
+ Runnable r = new Runnable() {
+ @Override
+ public void run() {
+ HTableInterface metaTable = null;
--- End diff --
Move the Thread.sleep(1000) outside here and move this logic into new
UpgradeUtil.truncateStats(HTableInterface metaTable, HTableInterface
statsTable) method.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---