[
https://issues.apache.org/jira/browse/CARBONDATA-202?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15458346#comment-15458346
]
ASF GitHub Bot commented on CARBONDATA-202:
-------------------------------------------
Github user sujith71955 commented on a diff in the pull request:
https://github.com/apache/incubator-carbondata/pull/122#discussion_r77335816
--- 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 --
i think content term will be too generic, we can say dictionary values,
Whats your opinion? better to use more meaningful term which is related to that
particular file, like Dictionary values
> 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)