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-3928] Removed records from exception message. #3921

Closed
wants to merge 1 commit into from

Conversation

nihal0107
Copy link
Contributor

@nihal0107 nihal0107 commented Sep 11, 2020

Why is this PR needed?

Currently, when the string length exceeds 32000 and bad record action as fail then
records are thrown in exception message which violates security concern.

What changes were proposed in this PR?

Removed the records from the exception message and only printed in logger file and redirected csv file.

Does this PR introduce any user interface change?

  • No

Is any new testcase added?

  • Yes

    Why is this PR needed?
    Currently, when the string length exceeds 32000 and bad record action as default then
    records are thrown in exception message which violates security concern.

    What changes were proposed in this PR?
    Removed the records from exception message and only printed in logger file and redirected csv file.

    Does this PR introduce any user interface change?
    No

    Is any new testcase added?
    Yes
@CarbonDataQA1
Copy link

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

@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/2308/

@@ -119,10 +118,6 @@ public CarbonRow convert(CarbonRow row) throws CarbonDataLoadingException {
.getTableProperties();
String spatialProperty = properties.get(CarbonCommonConstants.SPATIAL_INDEX);
boolean isSpatialColumn = false;
Object[] rawData = row.getRawData();
if (rawData == null) {
rawData = row.getData() == null ? null : row.getData().clone();
Copy link
Member

Choose a reason for hiding this comment

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

Please revert back this change, somecases rawData will not be set, hence they are setting here before converting the row.
Now your current code will use null instead of row.getData().clone() in this scenario.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I had only added this scenario last time because at that time we wanted rawdata for every bad record action. But now we need this only in case of bad record logger is enable or action is redirect. And in this case, rawdata will be always available.

Copy link
Member

Choose a reason for hiding this comment

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

Ok then.

@ajantha-bhat
Copy link
Member

LGTM

@asfgit asfgit closed this in 7caa530 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