for (TableEntity table : schemaEntity.getTables().values()) {
LOG.info("Adding table '{}' to schema '{}'", new Object[]{table.getTableName(), schemaEntity.getName()});
try {
Preconditions.checkNotNull(table.getStorageType());
TableDataResourceFactory tableDataResourceFactory = tableDataResourceFactories.get(table.getStorageType());
if (tableDataResourceFactory == null) {
throw new NotFoundException(TableDataResourceFactory.class, table.getStorageType());
}
builder.put(table.getTableName(), tableDataResourceFactory.getTableDataResource(table));
}
catch (Exception e) {
LOG.error("Failed to create storage for table '{}' in schema '{}", new Object[]{table.getTableName(), schemaEntity.getName(), e});
}
}