@@ -409,7 +409,7 @@ private List<InputSplit> getSplitsInternal(JobContext job) throws IOException {
409
409
if (segmentId .equals (CarbonCommonConstants .INVALID_SEGMENT_ID )) {
410
410
continue ;
411
411
}
412
- carbonSplits .add (CarbonInputSplit .from (segmentId , fileSplit ,
412
+ carbonSplits .add (CarbonInputSplit .from (segmentId , "0" , fileSplit ,
413
413
ColumnarFormatVersion .valueOf (
414
414
CarbonCommonConstants .CARBON_DATA_FILE_DEFAULT_VERSION )));
415
415
}
@@ -452,9 +452,9 @@ private List<InputSplit> getSplits(JobContext job, FilterResolverIntf filterReso
452
452
Boolean isIUDTable = false ;
453
453
454
454
AbsoluteTableIdentifier absoluteTableIdentifier =
455
- getOrCreateCarbonTable (job .getConfiguration ()).getAbsoluteTableIdentifier ();
455
+ getOrCreateCarbonTable (job .getConfiguration ()).getAbsoluteTableIdentifier ();
456
456
SegmentUpdateStatusManager updateStatusManager =
457
- new SegmentUpdateStatusManager (absoluteTableIdentifier );
457
+ new SegmentUpdateStatusManager (absoluteTableIdentifier );
458
458
459
459
isIUDTable = (updateStatusManager .getUpdateStatusDetails ().length != 0 );
460
460
@@ -476,22 +476,23 @@ private List<InputSplit> getSplits(JobContext job, FilterResolverIntf filterReso
476
476
// In case IUD is not performed in this table avoid searching for
477
477
// invalidated blocks.
478
478
if (CarbonUtil
479
- .isInvalidTableBlock (tableBlockInfo .getSegmentId (), tableBlockInfo .getFilePath (),
480
- invalidBlockVOForSegmentId , updateStatusManager )) {
479
+ .isInvalidTableBlock (tableBlockInfo .getSegmentId (), tableBlockInfo .getFilePath (),
480
+ invalidBlockVOForSegmentId , updateStatusManager )) {
481
481
continue ;
482
482
}
483
483
// When iud is done then only get delete delta files for a block
484
484
try {
485
485
deleteDeltaFilePath =
486
- updateStatusManager .getDeleteDeltaFilePath (tableBlockInfo .getFilePath ());
486
+ updateStatusManager .getDeleteDeltaFilePath (tableBlockInfo .getFilePath ());
487
487
} catch (Exception e ) {
488
488
throw new IOException (e );
489
489
}
490
490
}
491
- result .add (new CarbonInputSplit (segmentNo , new Path (tableBlockInfo .getFilePath ()),
492
- tableBlockInfo .getBlockOffset (), tableBlockInfo .getBlockLength (),
493
- tableBlockInfo .getLocations (), tableBlockInfo .getBlockletInfos ().getNoOfBlockLets (),
494
- tableBlockInfo .getVersion (), deleteDeltaFilePath ));
491
+ result .add (new CarbonInputSplit (segmentNo , tableBlockInfo .getBlockletId (),
492
+ new Path (tableBlockInfo .getFilePath ()), tableBlockInfo .getBlockOffset (),
493
+ tableBlockInfo .getBlockLength (), tableBlockInfo .getLocations (),
494
+ tableBlockInfo .getBlockletInfos ().getNoOfBlockLets (), tableBlockInfo .getVersion (),
495
+ deleteDeltaFilePath ));
495
496
}
496
497
}
497
498
return result ;
@@ -583,7 +584,7 @@ private List<TableBlockInfo> getTableBlockInfo(JobContext job,
583
584
Set <SegmentTaskIndexStore .TaskBucketHolder > taskKeys , UpdateVO updateDetails ,
584
585
SegmentUpdateStatusManager updateStatusManager ,
585
586
String segmentId , Set <SegmentTaskIndexStore .TaskBucketHolder > validTaskKeys )
586
- throws IOException {
587
+ throws IOException {
587
588
List <TableBlockInfo > tableBlockInfoList = new ArrayList <TableBlockInfo >();
588
589
589
590
// get file location of all files of given segment
@@ -603,7 +604,8 @@ private List<TableBlockInfo> getTableBlockInfo(JobContext job,
603
604
BlockletInfos blockletInfos = new BlockletInfos (carbonInputSplit .getNumberOfBlocklets (), 0 ,
604
605
carbonInputSplit .getNumberOfBlocklets ());
605
606
tableBlockInfoList .add (
606
- new TableBlockInfo (carbonInputSplit .getPath ().toString (), carbonInputSplit .getStart (),
607
+ new TableBlockInfo (carbonInputSplit .getPath ().toString (),
608
+ carbonInputSplit .getBlockletId (), carbonInputSplit .getStart (),
607
609
tableSegmentUniqueIdentifier .getSegmentId (), carbonInputSplit .getLocations (),
608
610
carbonInputSplit .getLength (), blockletInfos , carbonInputSplit .getVersion (),
609
611
carbonInputSplit .getBlockStorageIdMap (), carbonInputSplit .getDeleteDeltaFiles ()));
@@ -613,9 +615,9 @@ private List<TableBlockInfo> getTableBlockInfo(JobContext job,
613
615
}
614
616
615
617
private boolean isValidBlockBasedOnUpdateDetails (
616
- Set <SegmentTaskIndexStore .TaskBucketHolder > taskKeys , CarbonInputSplit carbonInputSplit ,
617
- UpdateVO updateDetails , SegmentUpdateStatusManager updateStatusManager , String segmentId ,
618
- Set <SegmentTaskIndexStore .TaskBucketHolder > validTaskKeys ) {
618
+ Set <SegmentTaskIndexStore .TaskBucketHolder > taskKeys , CarbonInputSplit carbonInputSplit ,
619
+ UpdateVO updateDetails , SegmentUpdateStatusManager updateStatusManager , String segmentId ,
620
+ Set <SegmentTaskIndexStore .TaskBucketHolder > validTaskKeys ) {
619
621
String taskID = null ;
620
622
if (null != carbonInputSplit ) {
621
623
if (!updateStatusManager .isBlockValid (segmentId , carbonInputSplit .getPath ().getName ())) {
@@ -741,7 +743,7 @@ public BlockMappingVO getBlockRowCount(JobContext job,
741
743
updateStatusManager );
742
744
for (Map .Entry <SegmentTaskIndexStore .TaskBucketHolder , AbstractIndex > taskMap :
743
745
taskAbstractIndexMap
744
- .entrySet ()) {
746
+ .entrySet ()) {
745
747
AbstractIndex taskAbstractIndex = taskMap .getValue ();
746
748
countOfBlocksInSeg += new BlockLevelTraverser ()
747
749
.getBlockRowMapping (taskAbstractIndex , blockRowCountMapping , eachValidSeg ,
0 commit comments