Skip to content

[WIP] [HUDI-1029] Use FastDateFormat for parsing and formating in Timestamp…#1748

Closed
yui2010 wants to merge 1 commit intoapache:masterfrom
yui2010:hudi-fix
Closed

[WIP] [HUDI-1029] Use FastDateFormat for parsing and formating in Timestamp…#1748
yui2010 wants to merge 1 commit intoapache:masterfrom
yui2010:hudi-fix

Conversation

@yui2010
Copy link
Contributor

@yui2010 yui2010 commented Jun 18, 2020

…BasedKeyGenerator

Tips

What is the purpose of the pull request

(For example: This pull request adds quick-start document.)

Brief change log

(for example:)

  • Modify AnnotationLocation checkstyle rule in checkstyle.xml

Verify this pull request

(Please pick either of the following options)

This pull request is a trivial rework / code cleanup without any test coverage.

(or)

This pull request is already covered by existing tests, such as (please describe tests).

(or)

This change added tests and can be verified as follows:

(example:)

  • Added integration tests for end-to-end.
  • Added HoodieClientWriteTest to verify the change.
  • Manually verified the change by running a job locally.

Committer checklist

  • Has a corresponding JIRA in PR title & commit

  • Commit message is descriptive of the change

  • CI is green

  • Necessary doc changes done or have another open PR

  • For large changes, please consider breaking it into sub-tasks under an umbrella JIRA.

@yui2010
Copy link
Contributor Author

yui2010 commented Jun 18, 2020

  1. in TimestampBasedKeyGenerator#getKey method, generate a HoodieKey will create a new SimpleDateFormat Object,the dateformat object can be reused as Class variable
  2. SimpleDateFormat is not thread safe,there is always potential thread safe problem

@leesf
Copy link
Contributor

leesf commented Jun 18, 2020

@yui2010 Thanks for your contributing, would you please check the travis error?

@wangxianghu
Copy link
Contributor

@yui2010 checkstyle issue, you can setup your IDE with style files from here : https://hudi.apache.org/contributing#ide-setup

Copy link
Member

@vinothchandar vinothchandar left a comment

Choose a reason for hiding this comment

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

This is bringing back commons Lang:(

import org.apache.hudi.utilities.exception.HoodieDeltaStreamerException;

import org.apache.avro.generic.GenericRecord;
import org.apache.commons.lang3.time.FastDateFormat;
Copy link
Member

Choose a reason for hiding this comment

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

We solved a ton of bundle conflicts for commons lang and no longer use it in the project. Please rework or without requiring it

@vinothchandar vinothchandar added the status:in-progress Work in progress label Jun 22, 2020
@vinothchandar vinothchandar changed the title [HUDI-1029] Use FastDateFormat for parsing and formating in Timestamp… [WIP] [HUDI-1029] Use FastDateFormat for parsing and formating in Timestamp… Jun 22, 2020
@pratyakshsharma
Copy link
Contributor

@leesf we no longer use SimpleDateFormat in TimestampBasedKeyGenerator. So the issues linked with usage of SimpleDateFormat are also no longer there. Guess we can close this?

@leesf
Copy link
Contributor

leesf commented Sep 11, 2020

@leesf we no longer use SimpleDateFormat in TimestampBasedKeyGenerator. So the issues linked with usage of SimpleDateFormat are also no longer there. Guess we can close this?

sure, @yui2010 please reopen if you have the issue again.

@leesf leesf closed this Sep 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status:in-progress Work in progress

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants