-
Notifications
You must be signed in to change notification settings - Fork 702
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-1900][Core,processing] Modify loadmetadata to store timestamp long value(in ms) instead of formatted date string for fields "loadStartTime" and "timestamp" #1666
Conversation
Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/2005/ |
Build Success with Spark 2.2.0, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/779/ |
dbfd0db
to
b73a6df
Compare
SDV Build Success , Please check CI http://144.76.159.231:8080/job/ApacheSDVTests/2325/ |
This PR is ok, no code change after first push only pushed the commit message change |
Build Success with Spark 2.2.0, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/796/ |
SDV Build Fail , Please check CI http://144.76.159.231:8080/job/ApacheSDVTests/2338/ |
Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/2029/ |
Failed Test in SDV build is unrelated, its randomly failing with other PR also, |
retest this please |
Build Success with Spark 2.2.0, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/801/ |
Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/2032/ |
} catch (ParseException e) { | ||
LOGGER.error("Cannot convert" + loadStartTime + " to Time/Long type value" + e.getMessage()); | ||
return null; | ||
// for new loads the factTimeStamp will be long string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In future for maintenance it is not easy to understand what new load is, can you add more background information for better maintenance. You can tell what is stored before Carbon 1.3 and what is changed since 1.3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed Added the detailed comment at class level
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do not mention "new loads" in line 275. Add comment in line 279, mentioning it is the processing for existing table before carbon 1.3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
c15fc73
to
a2687b1
Compare
Build Success with Spark 2.2.0, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/860/ |
Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/2085/ |
SDV Build Success , Please check CI http://144.76.159.231:8080/job/ApacheSDVTests/2382/ |
} catch (ParseException e) { | ||
LOGGER.error("Cannot convert" + factTimeStamp + " to Time/Long type value" + e.getMessage()); | ||
parser = new SimpleDateFormat(CarbonCommonConstants.CARBON_TIMESTAMP); | ||
// for new loads the factTimeStamp will be long string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do not mention "new loads" in line 275. Add comment in line 279, mentioning it is the processing for existing table before carbon 1.3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
@@ -211,25 +234,32 @@ public long getLoadStartTimeAsLong() { | |||
* @return | |||
*/ | |||
private long convertTimeStampToLong(String factTimeStamp) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the difference between this function and getTimeStamp, seems they are doing the same thing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function getTimeStamp returns value in nano second and returns in mili second
SDV Build Success , Please check CI http://144.76.159.231:8080/job/ApacheSDVTests/2383/ |
…tamp long value(in ms) instead of formated date string for fields "loadStartTime" and "timestamp"
a2687b1
to
2e66a7a
Compare
Build Success with Spark 2.2.0, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/864/ |
Build Failed with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/2089/ |
SDV Build Success , Please check CI http://144.76.159.231:8080/job/ApacheSDVTests/2387/ |
retest this please |
Build Failed with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/2117/ |
Build Success with Spark 2.2.0, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/893/ |
LGTM |
1 similar comment
LGTM |
…tamp long value(in ms) instead of formatted date string for fields "loadStartTime" and "timestamp" If the table is moved to environment having different timezone or we change the system current timezone, after IUD operation some of the blocks are not treated as valid blocks. We should stop writing the loadStartTime and timestamp in dd-MM-yyyy HH:mm:ss:SSS format. We should write the long value of the timestamp This closes apache#1666
…tamp long value(in ms) instead of formatted date string for fields "loadStartTime" and "timestamp" If the table is moved to environment having different timezone or we change the system current timezone, after IUD operation some of the blocks are not treated as valid blocks. We should stop writing the loadStartTime and timestamp in dd-MM-yyyy HH:mm:ss:SSS format. We should write the long value of the timestamp This closes apache#1666
Problem:
If the table is moved to environment having different timezone or we change the system current timezone, after IUD operation some of the blocks are not treated as valid blocks.
[{"timestamp":"15-12-2017 16:50:31:703","loadStatus":"Success","loadName":"0","partitionCount":"0","isDeleted":"FALSE","dataSize":"912","indexSize":"700","updateDeltaEndTimestamp":"","updateDeltaStartTimestamp":"","updateStatusFileName":"","**loadStartTime**":"15-12-2017 16:50:27:493","visibility":"true","fileFormat":"COLUMNAR_V3"}]
part-0-0_batchno0-0-1513336827493.carbondata
If timezone is different than at the time load was done, the value calculated from loadStartTime "15-12-2017 16:50:27:493" will not match to the time stamp extracted from block file name.
Solution:
We should stop writing the loadStartTime and timestamp in "dd-MM-yyyy HH:mm:ss:SSS" format.
We should write the long value of the timestamp as given below.
[{"timestamp":"1513336827593","loadStatus":"Success","loadName":"0","partitionCount":"0","isDeleted":"FALSE","dataSize":"912","indexSize":"700","updateDeltaEndTimestamp":"","updateDeltaStartTimestamp":"","updateStatusFileName":"","loadStartTime":"1513336827493", "visibility":"true","fileFormat":"COLUMNAR_V3"}]
Any interfaces changed?
Any backward compatibility impacted?
For old loaded if string to Long parse fail, will fall back for date parsing.
Document update required?
For old loaded table we can add limitation that the table movement should be done
across the same timezone environment.
Testing done
Please provide details on
- Whether new unit test cases have been added or why no new tests are required?
- How it is tested? Please attach test report.
- Is it a performance related change? Please attach the performance test report.
- Any additional information to help reviewers in testing this change.
Manually tested
For large changes, please consider breaking it into sub-tasks under an umbrella JIRA.
NA