processing/src/main/java/org/apache/carbondata/processing/util/CarbonLoaderUtil.java
/**
   * This method will update the load failure entry in the table status file
   */
This method will update the load failure entry in the table status file
This method will update the load failure entry in the table status file
public static void updateTableStatusForFailure(CarbonLoadModel model, String uuid)
      throws IOException {
    SegmentStatus loadStatus = SegmentStatus.MARKED_FOR_DELETE;
    LoadMetadataDetails loadMetaEntry = model.getCurrentLoadMetadataDetail();
    if (loadMetaEntry == null) {
      return;
    }
    CarbonLoaderUtil
        .populateNewLoadMetaEntry(loadMetaEntry, loadStatus, model.getFactTimeStamp(), true);
    boolean entryAdded = CarbonLoaderUtil.recordNewLoadMetadata(
        loadMetaEntry, model, false, false, uuid);
    if (!entryAdded) {
      throw new IOException(
          "Failed to update failure entry in table status for " + model.getTableName());
    }
  }
public static void updateTableStatusForFailure ( CarbonLoadModel model , String uuid ) throws IOException { SegmentStatus loadStatus = SegmentStatus . MARKED_FOR_DELETE ; LoadMetadataDetails loadMetaEntry = model . getCurrentLoadMetadataDetail ( ) ; if ( loadMetaEntry == null ) { return ; } CarbonLoaderUtil . populateNewLoadMetaEntry ( loadMetaEntry , loadStatus , model . getFactTimeStamp ( ) , true ) ; boolean entryAdded = CarbonLoaderUtil . recordNewLoadMetadata ( loadMetaEntry , model , false , false , uuid ) ; if ( ! entryAdded ) { throw new IOException ( "Failed to update failure entry in table status for " + model . getTableName ( ) ) ; } }
This method will update the load failure entry in the table status file
This method will update the load failure entry in the table status file
// in case if failure the load status should be "Marked for delete" so that it will be taken // care during clean up // always the last entry in the load metadata details will be the current load entry