Github user gvramana commented on a diff in the pull request:

    https://github.com/apache/incubator-carbondata/pull/168#discussion_r79287134
  
    --- Diff: 
integration/spark/src/main/scala/org/apache/carbondata/spark/rdd/CarbonDataRDDFactory.scala
 ---
    @@ -1030,28 +1021,36 @@ object CarbonDataRDDFactory extends Logging {
             logWarning("Cannot write load metadata file as data load failed")
             throw new Exception(errorMessage)
           } else {
    -        val metadataDetails = status(0)._2
    -        if (!isAgg) {
    -          val status = CarbonLoaderUtil
    -            .recordLoadMetadata(currentLoadCount,
    -              metadataDetails,
    -              carbonLoadModel,
    -              loadStatus,
    -              loadStartTime
    -            )
    -          if (!status) {
    -            val errorMessage = "Dataload failed due to failure in table 
status updation."
    -            logger.audit("Data load is failed for " +
    -              
s"${carbonLoadModel.getDatabaseName}.${carbonLoadModel.getTableName}")
    -            logger.error("Dataload failed due to failure in table status 
updation.")
    -            throw new Exception(errorMessage)
    +          val metadataDetails = status(0)._2
    +          if (!isAgg) {
    +            val status = CarbonLoaderUtil
    +              .recordLoadMetadata(currentLoadCount,
    +                metadataDetails,
    +                carbonLoadModel,
    +                loadStatus,
    +                loadStartTime
    +              )
    +            if (!status) {
    +              val errorMessage = "Dataload failed due to failure in table 
status updation."
    +              logger.audit("Data load is failed for " +
    +                           
s"${carbonLoadModel.getDatabaseName}.${carbonLoadModel.getTableName}")
    +              logger.error("Dataload failed due to failure in table status 
updation.")
    +              throw new Exception(errorMessage)
    +            }
    +          } else if (!carbonLoadModel.isRetentionRequest) {
    +            // TODO : Handle it
    +            logInfo("********Database updated**********")
               }
    -        } else if (!carbonLoadModel.isRetentionRequest) {
    -          // TODO : Handle it
    -          logInfo("********Database updated**********")
    +          logger.audit("Data load is successful for " +
    +                       
s"${carbonLoadModel.getDatabaseName}.${carbonLoadModel.getTableName}")
    +        try {
    +          // compaction handling
    +          handleSegmentMerging(tableCreationTime)
    +        }
    +        catch {
    +          case e: Exception =>
    +            throw new Exception("Dataload is success. Compaction is 
failed. Please check logs.")
    --- End diff --
    
    Add Auto compaction into error message.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to