-
Notifications
You must be signed in to change notification settings - Fork 1k
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
[spark] Enable TagCreationMode#batch for spark writer #5185
Conversation
private def preFinish(commitMessages: Seq[CommitMessage]): Unit = { | ||
val coreOptions = table.coreOptions(); | ||
if (coreOptions.tagCreationMode() == TagCreationMode.BATCH) { | ||
val tagCreation = new TagBatchCreation(table) |
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.
Maybe a little more concise : if (table.coreOptions().tagCreationMode() == TagCreationMode.BATCH)
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
} | ||
markDoneIfNeeded(commitMessages) | ||
} | ||
|
||
private def markDoneIfNeeded(commitMessages: Seq[CommitMessage]): Unit = { | ||
val coreOptions = table.coreOptions() | ||
if (coreOptions.toConfiguration.get(CoreOptions.PARTITION_MARK_DONE_WHEN_END_INPUT)) { |
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.
ditto
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 option is used several times, I think it's ok here
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.
My mistake.
if (tagManager.tagExists(tagName)) { | ||
tagManager.deleteTag( | ||
tagName, tagDeletion, snapshotManager, table.store().createTagCallbacks()); | ||
} |
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.
Waring-Logs should be printed here.
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
table.store().createTagCallbacks(), | ||
false); | ||
} catch (Exception e) { | ||
LOG.warn("Failed to create tag", e); |
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.
Suggestion : Failed to create tag '${tagname}' from '${snapshot}', you can create this tag manually.
+1 |
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.
+1
Purpose
Linked issue: close #5181
Tests
API and Format
Documentation