@Override
public boolean next( final NullWritable key, final VectorizedRowBatch outputBatch ) throws IOException {
outputBatch.reset();
setting.setPartitionValues( outputBatch );
if( indexSize <= currentIndex ){
if( ! currentReader.hasNext() ){
updateCounter( currentReader.getReadStats() );
outputBatch.endOfFile = true;
isEnd = true;
return false;
}
while( ! setSpread() ){
if( ! currentReader.hasNext() ){
updateCounter( currentReader.getReadStats() );
outputBatch.endOfFile = true;
isEnd = true;
return false;
}
}
}
int maxSize = outputBatch.getMaxSize();
if( indexSize < currentIndex + maxSize ){
maxSize = indexSize - currentIndex;
}
for( int colIndex : needColumnIds ){
assignors[colIndex].setColumnVector( outputBatch.cols[colIndex] , currentIndexList , currentIndex , maxSize );
}
outputBatch.size = maxSize;
currentIndex += maxSize;
if( indexSize <= currentIndex && ! currentReader.hasNext() ){
outputBatch.endOfFile = true;
}
return outputBatch.size > 0;
}
MDSHiveDirectVectorizedReader.java 文件源码
java
阅读 24
收藏 0
点赞 0
评论 0
项目:multiple-dimension-spread
作者:
评论列表
文章目录