[ https://issues.apache.org/jira/browse/HADOOP-15625?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16777445#comment-16777445 ]
Steve Loughran edited comment on HADOOP-15625 at 2/26/19 12:55 AM: ------------------------------------------------------------------- Ben: I've done an iteration on this; handing back to you. The key change is (apart from moving the classes into a new package), pulling the change logic out of S3AInputStream and into a self contained change tracker class, whose logic we can test in a unit test. Testing: unit tests done, did a test of the input stream but not rerun it since my last set of changes. It's late. Sorry. Handing it back to you for some of the todo list, especially: should we have an option to require version checking? Other than that * Style checking. Javadocs are critical as java 8 needs the "." at the end. Line length-wise, we like to keep down to nearly 80, due to the goal of side-by-side diff checking. I know, it'd be good to move on a some point, but until then... * Docs. Something to discuss the option. * core-site.xml: Add the default options there (etag @ warn?) alongside the other fs.s3a options. I've pushed up to github a branch which first applied your patch 005, then added the new code. If you cherry pick the head of that branch, your local branch will catch up https://github.com/steveloughran/hadoop/tree/s3/HADOOP-15625-streamchanged was (Author: ste...@apache.org): Ben: I've done an interation on this; handing back to you. The key change is (apart from moving the classes into a new package), pulling the change logic out of S3AInputStream and into a self contained change tracker class, whose logic we can test in a unit test. Testing: unit tests done, did a test of the input stream but not rerun it since my last set of changes. It's late. Sorry. Handing it back to you for some of the todo list, especially: should we have an option to require version checking? Other than that * Style checking. Javadocs are critical as java 8 needs the "." at the end. Line length-wise, we like to keep down to nearly 80, due to the goal of side-by-side diff checking. I know, it'd be good to move on a some point, but until then... * Docs. Something to discuss the option. * core-site.xml: Add the default options there (etag @ warn?) alongside the other fs.s3a options. I've pushed up to github a branch which first applied your patch 005, then added the new code. If you cherry pick the head of that branch, your local branch will catch up https://github.com/steveloughran/hadoop/tree/s3/HADOOP-15625-streamchanged > S3A input stream to use etags to detect changed source files > ------------------------------------------------------------ > > Key: HADOOP-15625 > URL: https://issues.apache.org/jira/browse/HADOOP-15625 > Project: Hadoop Common > Issue Type: Sub-task > Components: fs/s3 > Affects Versions: 3.2.0 > Reporter: Brahma Reddy Battula > Assignee: Brahma Reddy Battula > Priority: Major > Attachments: HADOOP--15625-006.patch, HADOOP-15625-001.patch, > HADOOP-15625-002.patch, HADOOP-15625-003.patch, HADOOP-15625-004.patch, > HADOOP-15625-005.patch, HADOOP-15625-006.patch > > > S3A input stream doesn't handle changing source files any better than the > other cloud store connectors. Specifically: it doesn't noticed it has > changed, caches the length from startup, and whenever a seek triggers a new > GET, you may get one of: old data, new data, and even perhaps go from new > data to old data due to eventual consistency. > We can't do anything to stop this, but we could detect changes by > # caching the etag of the first HEAD/GET (we don't get that HEAD on open with > S3Guard, BTW) > # on future GET requests, verify the etag of the response > # raise an IOE if the remote file changed during the read. > It's a more dramatic failure, but it stops changes silently corrupting things. -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-issues-h...@hadoop.apache.org