gjacoby126 commented on a change in pull request #457: PHOENIX-5190 Implement
TaskRegionObserver for Index rebuild
URL: https://github.com/apache/phoenix/pull/457#discussion_r265718262
##########
File path:
phoenix-core/src/main/java/org/apache/phoenix/coprocessor/TaskRegionObserver.java
##########
@@ -298,4 +493,132 @@ public void run() {
}
}
}
+
+ /**
+ * Task runs periodically to rebuild indexes for System.Task entries.
+ *
+ */
+ public static class IndexRebuildTask extends SelfHealingTask {
+
+ public IndexRebuildTask(RegionCoprocessorEnvironment env, long
timeMaxInterval) {
+ super.init(env, timeMaxInterval);
+ }
+
+ public static String[] getArgValues(boolean directApi, boolean
useSnapshot, String schemaName,
+ String dataTable, String indxTable, String tenantId) {
+ final List<String> args = Lists.newArrayList();
Review comment:
This is leaking IndexTool internals into this task. Would be better to
provide an abstraction so you can call the IndexTool directly.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services