hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gustavo Anatoly (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-11045) Replace deprecated method FileSystem#createNonRecursive
Date Tue, 22 Apr 2014 14:40:15 GMT

    [ https://issues.apache.org/jira/browse/HBASE-11045?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13976843#comment-13976843

Gustavo Anatoly commented on HBASE-11045:

Hi, Steve. Sorry for delay.

About your question:

bq. Is there any barrier to using a check for the parent dir existing before calling create?

I think there are no problem, but the validations to check if the parent path doesn't exist
more is responsibility of Hadoop. So your idea is good if encapsulated into HFileSystem#createNonRecursive():

if (!fs.exists(f.getParent())) {
      String exceptionMsg = "Path doesn't exist: " + f.getParent().toString();
      throw new IOException(exceptionMsg);
    return fs.create(f, overwrite, bufferSize, replication, blockSize, progress);

And following the adjustments, ProtobufLogWriter#init() line 79:
HFileSystem hFS = new HFileSystem(fs);
output = hFS.createNonRecursive(path, overwritable, bufferSize, replication, blockSize, null);

But I prefer put this validations on Hadoop :) But what do you think? [~stevel@apache.org]
[~tedyu] [~enis-2]

> Replace deprecated method FileSystem#createNonRecursive
> -------------------------------------------------------
>                 Key: HBASE-11045
>                 URL: https://issues.apache.org/jira/browse/HBASE-11045
>             Project: HBase
>          Issue Type: Task
>            Reporter: Gustavo Anatoly
>            Assignee: Gustavo Anatoly
>            Priority: Minor
>             Fix For: 0.99.0
> This change affect directly ProtobufLogWriter#init() associated to TestHLog#testFailedToCreateHLogIfParentRenamed.

This message was sent by Atlassian JIRA

View raw message