[jira] [Commented] (HDFS-4160) libhdfs / fuse-dfs should implement O_CREAT | O_EXCL
[ https://issues.apache.org/jira/browse/HDFS-4160?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14524706#comment-14524706 ] Hadoop QA commented on HDFS-4160: - \\ \\ | (x) *{color:red}-1 overall{color}* | \\ \\ || Vote || Subsystem || Runtime || Comment || | {color:red}-1{color} | patch | 0m 0s | The patch command could not apply the patch during dryrun. | \\ \\ || Subsystem || Report/Notes || | Patch URL | http://issues.apache.org/jira/secure/attachment/12585242/HDFS-4160.001.patch | | Optional Tests | javac unit | | git revision | trunk / f1a152c | | Console output | https://builds.apache.org/job/PreCommit-HDFS-Build/10566/console | This message was automatically generated. libhdfs / fuse-dfs should implement O_CREAT | O_EXCL Key: HDFS-4160 URL: https://issues.apache.org/jira/browse/HDFS-4160 Project: Hadoop HDFS Issue Type: Improvement Components: libhdfs Affects Versions: 2.0.3-alpha Reporter: Colin Patrick McCabe Assignee: Colin Patrick McCabe Priority: Minor Attachments: HDFS-4160.001.patch {{hdfsOpenFile}} contains this code: {code} if ((flags O_CREAT) (flags O_EXCL)) { fprintf(stderr, WARN: hdfs does not truly support O_CREATE O_EXCL\n); } {code} But {{hdfsOpenFile}} could easily support *O_CREAT* | *O_EXCL* by calling {{FileSystem#create}} with {{overwrite = false}}. We should do this. It would also benefit {{fuse-dfs}}. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (HDFS-4160) libhdfs / fuse-dfs should implement O_CREAT | O_EXCL
[ https://issues.apache.org/jira/browse/HDFS-4160?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14524632#comment-14524632 ] Hadoop QA commented on HDFS-4160: - \\ \\ | (x) *{color:red}-1 overall{color}* | \\ \\ || Vote || Subsystem || Runtime || Comment || | {color:red}-1{color} | patch | 0m 0s | The patch command could not apply the patch during dryrun. | \\ \\ || Subsystem || Report/Notes || | Patch URL | http://issues.apache.org/jira/secure/attachment/12585242/HDFS-4160.001.patch | | Optional Tests | javac unit | | git revision | trunk / f1a152c | | Console output | https://builds.apache.org/job/PreCommit-HDFS-Build/10541/console | This message was automatically generated. libhdfs / fuse-dfs should implement O_CREAT | O_EXCL Key: HDFS-4160 URL: https://issues.apache.org/jira/browse/HDFS-4160 Project: Hadoop HDFS Issue Type: Improvement Components: libhdfs Affects Versions: 2.0.3-alpha Reporter: Colin Patrick McCabe Assignee: Colin Patrick McCabe Priority: Minor Attachments: HDFS-4160.001.patch {{hdfsOpenFile}} contains this code: {code} if ((flags O_CREAT) (flags O_EXCL)) { fprintf(stderr, WARN: hdfs does not truly support O_CREATE O_EXCL\n); } {code} But {{hdfsOpenFile}} could easily support *O_CREAT* | *O_EXCL* by calling {{FileSystem#create}} with {{overwrite = false}}. We should do this. It would also benefit {{fuse-dfs}}. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (HDFS-4160) libhdfs / fuse-dfs should implement O_CREAT | O_EXCL
[ https://issues.apache.org/jira/browse/HDFS-4160?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13669447#comment-13669447 ] Colin Patrick McCabe commented on HDFS-4160: This patch implements passing {{overwrite = false}} when we're creating a file with {{O_EXCL}}. I also took the liberty of cleaning up a few other things. The exception matching logic was busted, since it was looking for class names with slashes in them, whereas {{classNameOfObject}} returns class names with dots (ultimately this comes from {{GetMethodID}}). I wrote this logic originally, and I don't know what I was thinking. Fixing this also lets us get rid of the hack in {{hdfs_json_parser.c}} where we convert dots to slashes. {{EIO}} is also a better error code to return if we don't know the exception we were given than {{EINTERNAL}}. The latter should be reserved for things like JNI internal errors, not exceptions. I added {{FileAlreadyExistsException}} to the list of exceptions we're catching and translating. It translates to EEXIST. I added a unit test for {{O_EXCL}} in {{test_libhdfs_threaded}}. I fixed a few cases where we were printing out test errors without prefixing them with {{TEST_ERROR}} (if we don't do this, they get lost in the noise). libhdfs / fuse-dfs should implement O_CREAT | O_EXCL Key: HDFS-4160 URL: https://issues.apache.org/jira/browse/HDFS-4160 Project: Hadoop HDFS Issue Type: Improvement Components: libhdfs Affects Versions: 2.0.3-alpha Reporter: Colin Patrick McCabe Assignee: Colin Patrick McCabe Priority: Minor Attachments: HDFS-4160.001.patch {{hdfsOpenFile}} contains this code: {code} if ((flags O_CREAT) (flags O_EXCL)) { fprintf(stderr, WARN: hdfs does not truly support O_CREATE O_EXCL\n); } {code} But {{hdfsOpenFile}} could easily support *O_CREAT* | *O_EXCL* by calling {{FileSystem#create}} with {{overwrite = false}}. We should do this. It would also benefit {{fuse-dfs}}. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HDFS-4160) libhdfs / fuse-dfs should implement O_CREAT | O_EXCL
[ https://issues.apache.org/jira/browse/HDFS-4160?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13669558#comment-13669558 ] Hadoop QA commented on HDFS-4160: - {color:green}+1 overall{color}. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12585242/HDFS-4160.001.patch against trunk revision . {color:green}+1 @author{color}. The patch does not contain any @author tags. {color:green}+1 tests included{color}. The patch appears to include 1 new or modified test files. {color:green}+1 javac{color}. The applied patch does not increase the total number of javac compiler warnings. {color:green}+1 javadoc{color}. The javadoc tool did not generate any warning messages. {color:green}+1 eclipse:eclipse{color}. The patch built with eclipse:eclipse. {color:green}+1 findbugs{color}. The patch does not introduce any new Findbugs (version 1.3.9) warnings. {color:green}+1 release audit{color}. The applied patch does not increase the total number of release audit warnings. {color:green}+1 core tests{color}. The patch passed unit tests in hadoop-hdfs-project/hadoop-hdfs. {color:green}+1 contrib tests{color}. The patch passed contrib unit tests. Test results: https://builds.apache.org/job/PreCommit-HDFS-Build/4451//testReport/ Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/4451//console This message is automatically generated. libhdfs / fuse-dfs should implement O_CREAT | O_EXCL Key: HDFS-4160 URL: https://issues.apache.org/jira/browse/HDFS-4160 Project: Hadoop HDFS Issue Type: Improvement Components: libhdfs Affects Versions: 2.0.3-alpha Reporter: Colin Patrick McCabe Assignee: Colin Patrick McCabe Priority: Minor Attachments: HDFS-4160.001.patch {{hdfsOpenFile}} contains this code: {code} if ((flags O_CREAT) (flags O_EXCL)) { fprintf(stderr, WARN: hdfs does not truly support O_CREATE O_EXCL\n); } {code} But {{hdfsOpenFile}} could easily support *O_CREAT* | *O_EXCL* by calling {{FileSystem#create}} with {{overwrite = false}}. We should do this. It would also benefit {{fuse-dfs}}. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira