use of org.apache.drill.exec.store.hive.DrillHiveMetaStoreClient in project drill by apache.
the class HiveSchemaFactory method registerSchemas.
@Override
public void registerSchemas(SchemaConfig schemaConfig, SchemaPlus parent) throws IOException {
DrillHiveMetaStoreClient mClientForSchemaTree = processUserMetastoreClient;
if (isDrillImpersonationEnabled) {
try {
mClientForSchemaTree = metaStoreClientLoadingCache.get(schemaConfig.getUserName());
} catch (final ExecutionException e) {
throw new IOException("Failure setting up Hive metastore client.", e);
}
}
HiveSchema schema = new HiveSchema(schemaConfig, mClientForSchemaTree, schemaName);
SchemaPlus hPlus = parent.add(schemaName, schema);
schema.setHolder(hPlus);
}
Aggregations