carbondata-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CARBONDATA-202) Exception thrown in Beeline for data loading when dictionary file content is not in correct format
Date Fri, 02 Sep 2016 12:13:20 GMT

    [ https://issues.apache.org/jira/browse/CARBONDATA-202?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15458354#comment-15458354
] 

ASF GitHub Bot commented on CARBONDATA-202:
-------------------------------------------

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

    https://github.com/apache/incubator-carbondata/pull/122#discussion_r77336083
  
    --- Diff: integration/spark/src/main/scala/org/apache/carbondata/spark/util/GlobalDictionaryUtil.scala
---
    @@ -791,16 +819,23 @@ object GlobalDictionaryUtil extends Logging {
               if (requireDimension.nonEmpty) {
                 val model = createDictionaryLoadModel(carbonLoadModel, table, requireDimension,
                   hdfsLocation, dictfolderPath, false)
    +            // check if dictionary files contains bad record
    +            val accumulator = sqlContext.sparkContext.accumulator(0)
                 // read local dictionary file, and group by key
                 val allDictionaryRdd = readAllDictionaryFiles(sqlContext, headers,
    -              requireColumnNames, allDictionaryPath)
    +              requireColumnNames, allDictionaryPath, accumulator)
                 // read exist dictionary and combine
                 val inputRDD = new CarbonAllDictionaryCombineRDD(allDictionaryRdd, model)
                   .partitionBy(new ColumnPartitioner(model.primDimensions.length))
                 // generate global dictionary files
                 val statusList = new CarbonGlobalDictionaryGenerateRDD(inputRDD, model).collect()
                 // check result status
                 checkStatus(carbonLoadModel, sqlContext, model, statusList)
    +            // if the dictionary contains wrong format record, throw ex
    +            if (accumulator.value > 0) {
    +              throw new DataLoadingException("Data Loading failure, the dictionary file
" +
    --- End diff --
    
    u r right. handled


> Exception thrown in Beeline for data loading when dictionary file content is not in correct
format
> --------------------------------------------------------------------------------------------------
>
>                 Key: CARBONDATA-202
>                 URL: https://issues.apache.org/jira/browse/CARBONDATA-202
>             Project: CarbonData
>          Issue Type: Bug
>            Reporter: Gin-zhj
>            Assignee: Gin-zhj
>            Priority: Minor
>
> Exception thrown in Beeline for data loading when dictionary file content is not in correct
format



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message