-
Notifications
You must be signed in to change notification settings - Fork 174
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
[DTS-2474] Introduce Timestamp and UUID as suffix to table path in RemoteDeltaLog #441
Conversation
val dateFormat = new SimpleDateFormat("yyyyMMdd_HHmmss") | ||
dateFormat.setTimeZone(TimeZone.getTimeZone("UTC")) | ||
val formattedDateTime = dateFormat.format(System.currentTimeMillis()) | ||
val uuid = UUID.randomUUID().toString().split('-').head |
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.
Isn't random uuid sufficient?
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.
uuid is sufficient, I feel datetime is easier for debugging.
@@ -171,7 +184,8 @@ private[sharing] object RemoteDeltaLog { | |||
java.lang.Boolean.valueOf(sslTrustAll), | |||
java.lang.Boolean.valueOf(forStreaming)) | |||
.asInstanceOf[DeltaSharingClient] | |||
new RemoteDeltaLog(deltaSharingTable, new Path(path), client) | |||
|
|||
new RemoteDeltaLog(deltaSharingTable, new Path(path + getFormattedTimestampWithUUID), client) |
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 we need a unit test?
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.
let me see if I can add one. unit test should be just for the suffix, the functionality of e2e query is covered by existing tests.
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.
added
Introduce Timestamp and UUID as suffix to table path in RemoteDeltaLog, to avoid two queries on the same table override the CachedTableManager entry for each other.