use of com.facebook.presto.spi.connector.ConnectorMetadataUpdater in project presto by prestodb.
the class SqlTask method getMetadataUpdateRequests.
private MetadataUpdates getMetadataUpdateRequests(TaskHolder taskHolder) {
ConnectorId connectorId = null;
ImmutableList.Builder<ConnectorMetadataUpdateHandle> connectorMetadataUpdatesBuilder = ImmutableList.builder();
if (taskHolder.getTaskExecution() != null) {
TaskMetadataContext taskMetadataContext = taskHolder.getTaskExecution().getTaskContext().getTaskMetadataContext();
if (!taskMetadataContext.getMetadataUpdaters().isEmpty()) {
connectorId = taskMetadataContext.getConnectorId();
for (ConnectorMetadataUpdater metadataUpdater : taskMetadataContext.getMetadataUpdaters()) {
connectorMetadataUpdatesBuilder.addAll(metadataUpdater.getPendingMetadataUpdateRequests());
}
}
}
return new MetadataUpdates(connectorId, connectorMetadataUpdatesBuilder.build());
}
Aggregations