Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CARBONDATA-3980] Load fails with aborted exception when Bad records action is unspecified #3919

Closed
wants to merge 1 commit into from

Conversation

ShreelekhyaG
Copy link
Contributor

Why is this PR needed?

Load fails with aborted exception when Bad records action is unspecified.

When the partition column is loaded with a bad record value, load fails with 'Job aborted' message in cluster. However in complete stack trace we can see the actual error message. (Like, 'Data load failed due to bad record: The value with column name projectjoindate and column data type TIMESTAMP is not a valid TIMESTAMP type')

What changes were proposed in this PR?

Fix bad record error message for the partition column. Added the error message to operationContext map and if its not null throwing exception with errorMessage from CarbonLoadDataCommand.

Does this PR introduce any user interface change?

  • No

Is any new testcase added?

  • No, tested in cluster.

@CarbonDataQA1
Copy link

Build Failed with Spark 2.4.5, Please check CI http://121.244.95.60:12545/job/ApacheCarbon_PR_Builder_2.4.5/2298/

@CarbonDataQA1
Copy link

Build Failed with Spark 2.3.4, Please check CI http://121.244.95.60:12545/job/ApacheCarbonPRBuilder2.3/4037/

@ShreelekhyaG ShreelekhyaG changed the title [CARBONDATA-3980] Load fails with aborted exception when Bad records action is unspecified [WIP] Load fails with aborted exception when Bad records action is unspecified Sep 11, 2020
@CarbonDataQA1
Copy link

Build Success with Spark 2.4.5, Please check CI http://121.244.95.60:12545/job/ApacheCarbon_PR_Builder_2.4.5/2306/

@CarbonDataQA1
Copy link

Build Success with Spark 2.3.4, Please check CI http://121.244.95.60:12545/job/ApacheCarbonPRBuilder2.3/4044/

@ShreelekhyaG ShreelekhyaG changed the title [WIP] Load fails with aborted exception when Bad records action is unspecified [CARBONDATA-3980] Load fails with aborted exception when Bad records action is unspecified Sep 11, 2020
"DataLoad failure: Data load failed due to bad record: The value with column name " +
"projectjoindate and column data type TIMESTAMP is not a valid TIMESTAMP type.Please " +
"enable bad record logger to know the detail reason."))
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please drop the table here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok

"Timestamp, projectenddate Date,attendance int,utilization int,salary int) PARTITIONED BY " +
"(deptname String,doj Timestamp,projectcode int) STORED AS carbondata ")
val csvFilePath = s"$resourcesPath/data.csv"
val ex = intercept[Exception] {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please intercept RuntimeException only

@CarbonDataQA1
Copy link

Build Success with Spark 2.4.5, Please check CI http://121.244.95.60:12545/job/ApacheCarbon_PR_Builder_2.4.5/2334/

@CarbonDataQA1
Copy link

Build Success with Spark 2.3.4, Please check CI http://121.244.95.60:12545/job/ApacheCarbonPRBuilder2.3/4073/

@CarbonDataQA1
Copy link

Build Success with Spark 2.3.4, Please check CI http://121.244.95.60:12545/job/ApacheCarbonPRBuilder2.3/4080/

@CarbonDataQA1
Copy link

Build Success with Spark 2.4.5, Please check CI http://121.244.95.60:12545/job/ApacheCarbon_PR_Builder_2.4.5/2340/

@ajantha-bhat
Copy link
Member

LGTM

@asfgit asfgit closed this in b121ac6 Sep 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants