Java Code Examples for org.apache.hive.hcatalog.data.transfer.HCatReader#read()
The following examples show how to use
org.apache.hive.hcatalog.data.transfer.HCatReader#read() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: PartitionReaderFn.java From beam with Apache License 2.0 | 5 votes |
@ProcessElement public void processElement(ProcessContext c) throws Exception { final Read readRequest = c.element().getKey(); final Integer partitionIndexToRead = c.element().getValue(); ReaderContext readerContext = getReaderContext(readRequest, partitionIndexToRead); for (int i = 0; i < readerContext.numSplits(); i++) { HCatReader reader = DataTransferFactory.getHCatReader(readerContext, i); Iterator<HCatRecord> hcatIterator = reader.read(); while (hcatIterator.hasNext()) { final HCatRecord record = hcatIterator.next(); c.output(record); } } }
Example 2
Source File: HCatalogIO.java From beam with Apache License 2.0 | 5 votes |
@Override public boolean start() throws HCatException { HCatReader reader = DataTransferFactory.getHCatReader(source.spec.getContext(), source.spec.getSplitId()); hcatIterator = reader.read(); return advance(); }
Example 3
Source File: HiveTableReader.java From kylin-on-parquet-v2 with Apache License 2.0 | 4 votes |
private static Iterator<HCatRecord> loadHCatRecordItr(ReaderContext readCntxt, int dataSplit) throws HCatException { HCatReader currentHCatReader = DataTransferFactory.getHCatReader(readCntxt, dataSplit); return currentHCatReader.read(); }
Example 4
Source File: HiveTableReader.java From kylin with Apache License 2.0 | 4 votes |
private static Iterator<HCatRecord> loadHCatRecordItr(ReaderContext readCntxt, int dataSplit) throws HCatException { HCatReader currentHCatReader = DataTransferFactory.getHCatReader(readCntxt, dataSplit); return currentHCatReader.read(); }
Example 5
Source File: HiveTableReader.java From Kylin with Apache License 2.0 | 4 votes |
private static Iterator<HCatRecord> loadHCatRecordItr(ReaderContext readCntxt, int dataSplit) throws HCatException { HCatReader currentHCatReader = DataTransferFactory.getHCatReader(readCntxt, dataSplit); return currentHCatReader.read(); }