Search in sources :

Example 1 with ReadEntity

use of org.apache.hive.hcatalog.data.transfer.ReadEntity in project hive by apache.

the class TestReaderWriter method runsInMaster.

private ReaderContext runsInMaster(Map<String, String> config, boolean bogus) throws HCatException {
    ReadEntity entity = new ReadEntity.Builder().withTable("mytbl").build();
    HCatReader reader = DataTransferFactory.getHCatReader(entity, config);
    ReaderContext cntxt = reader.prepareRead();
    return cntxt;
}
Also used : ReadEntity(org.apache.hive.hcatalog.data.transfer.ReadEntity) ReaderContext(org.apache.hive.hcatalog.data.transfer.ReaderContext) HCatReader(org.apache.hive.hcatalog.data.transfer.HCatReader)

Example 2 with ReadEntity

use of org.apache.hive.hcatalog.data.transfer.ReadEntity in project hive by apache.

the class DataReaderMaster method runsInMaster.

private static ReaderContext runsInMaster(Map<String, String> config) throws HCatException {
    ReadEntity.Builder builder = new ReadEntity.Builder();
    ReadEntity entity = builder.withTable(config.get("table")).build();
    HCatReader reader = DataTransferFactory.getHCatReader(entity, config);
    ReaderContext cntxt = reader.prepareRead();
    return cntxt;
}
Also used : ReadEntity(org.apache.hive.hcatalog.data.transfer.ReadEntity) ReaderContext(org.apache.hive.hcatalog.data.transfer.ReaderContext) HCatReader(org.apache.hive.hcatalog.data.transfer.HCatReader)

Aggregations

HCatReader (org.apache.hive.hcatalog.data.transfer.HCatReader)2 ReadEntity (org.apache.hive.hcatalog.data.transfer.ReadEntity)2 ReaderContext (org.apache.hive.hcatalog.data.transfer.ReaderContext)2