Github user JamesRTaylor commented on a diff in the pull request:
https://github.com/apache/phoenix/pull/12#discussion_r17405931
--- Diff:
phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
---
@@ -1874,6 +1867,95 @@ private void
incrementSequenceValues(List<SequenceKey> keys, long timestamp, lon
}
}
+ @Override
+ public long updateStatistics(final byte[] tenantId, final byte[]
schemaName, final byte[] tableName, final String url)
+ throws SQLException {
+ HTableInterface ht = null;
+ try {
+ ht = this.getTable(tableName);
+ Batch.Call<StatCollectService, StatCollectResponse> callable =
new Batch.Call<StatCollectService, StatCollectResponse>() {
+ ServerRpcController controller = new ServerRpcController();
+ BlockingRpcCallback<StatCollectResponse> rpcCallback = new
BlockingRpcCallback<StatCollectResponse>();
+
+ @Override
+ public StatCollectResponse call(StatCollectService
service) throws IOException {
+ StatCollectRequest.Builder builder =
StatCollectRequest.newBuilder();
+
builder.setTableNameBytes(HBaseZeroCopyByteString.wrap(tableName));
+
builder.setTenantIdBytes(HBaseZeroCopyByteString.wrap(tenantId));
+
builder.setSchemaNameBytes(HBaseZeroCopyByteString.wrap(schemaName));
+ builder.setUrl(url);
--- End diff --
Add TODO here to set the start/stop range for the analyze call based on
tenantId (if not null).
---
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.
---