-
Notifications
You must be signed in to change notification settings - Fork 749
[GOBBLIN-2049] Configure Gobblin Distcp Writer to fail if setPermission fails #3929
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
[GOBBLIN-2049] Configure Gobblin Distcp Writer to fail if setPermission fails #3929
Conversation
...main/java/org/apache/gobblin/data/management/copy/writer/FileAwareInputStreamDataWriter.java
Outdated
Show resolved
Hide resolved
...ement/src/main/java/org/apache/gobblin/data/management/copy/publisher/CopyDataPublisher.java
Outdated
Show resolved
Hide resolved
| public static final String GOBBLIN_COPY_TASK_OVERWRITE_ON_COMMIT = "gobblin.copy.task.overwrite.on.commit"; | ||
| public static final boolean DEFAULT_GOBBLIN_COPY_TASK_OVERWRITE_ON_COMMIT = false; | ||
| public static final String GOBBLIN_COPY_REQUIRE_PERMISSION_SET_FOR_SUCCESS = "gobblin.copy.requirePermissionSetForSuccess"; | ||
| public static final boolean DEFAULT_COPY_REQUIRE_PERMISSION_SET_FOR_SUCCESS = false; |
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.
when wouldn't one want failure? I'd be more aggressive in choosing the default. while it does require a config change, one can always easily revert to the legacy semantics.
so while not b/w-compat, quite easily opted-into, as desired
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.
Sure, I was also debating making the default true instead. I'll change.
phet
left a comment
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.
great improvement!
| protected final boolean preserveDirModTime; | ||
| protected final boolean resyncDirOwnerAndPermission; | ||
| protected final boolean requirePermissionSetForSuccess; | ||
| protected final boolean shouldFailWhenPermissionFail; |
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.
nit: when permissions fail (preferred!) or when permission fails
Dear Gobblin maintainers,
Please accept this PR. I understand that it will not be reviewed until I have checked off all the steps below!
JIRA
Description
Tests
Gobblin
safeSetPathPermissiondoes not throw an exception when setting permissions fail on a path. We want to change this behavior especially for use cases like manifest distcp where hundreds of thousands of files are involved in a distcp job and permission settings are important to replicate correctly as they cannot be updated or verified by hand.This PR adds a new configuration to fail writing or publishing tasks when the job is configured to report success when permissions are not replicated properly. The default behavior remains the same as before to allow the job to succeed without this for backwards compatibility.
Commits