Search in sources :

Example 1 with HiveTableWrapper

use of org.apache.drill.exec.store.hive.HiveTableWrapper in project drill by apache.

the class TableEntryCacheLoader method load.

@Override
@SuppressWarnings("NullableProblems")
public HiveReadEntry load(TableName key) throws Exception {
    Table table;
    List<Partition> partitions;
    synchronized (client) {
        table = getTable(key);
        partitions = getPartitions(key);
    }
    HiveTableWithColumnCache hiveTable = new HiveTableWithColumnCache(table, new ColumnListsCache(table));
    List<HiveTableWrapper.HivePartitionWrapper> partitionWrappers = getPartitionWrappers(partitions, hiveTable);
    return new HiveReadEntry(new HiveTableWrapper(hiveTable), partitionWrappers);
}
Also used : Partition(org.apache.hadoop.hive.metastore.api.Partition) HiveReadEntry(org.apache.drill.exec.store.hive.HiveReadEntry) Table(org.apache.hadoop.hive.metastore.api.Table) ColumnListsCache(org.apache.drill.exec.store.hive.ColumnListsCache) HiveTableWithColumnCache(org.apache.drill.exec.store.hive.HiveTableWithColumnCache) HiveTableWrapper(org.apache.drill.exec.store.hive.HiveTableWrapper)

Aggregations

ColumnListsCache (org.apache.drill.exec.store.hive.ColumnListsCache)1 HiveReadEntry (org.apache.drill.exec.store.hive.HiveReadEntry)1 HiveTableWithColumnCache (org.apache.drill.exec.store.hive.HiveTableWithColumnCache)1 HiveTableWrapper (org.apache.drill.exec.store.hive.HiveTableWrapper)1 Partition (org.apache.hadoop.hive.metastore.api.Partition)1 Table (org.apache.hadoop.hive.metastore.api.Table)1