[
https://issues.apache.org/jira/browse/HDFS-15515?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17173155#comment-17173155
]
Steve Loughran commented on HDFS-15515:
---------------------------------------
+1. mkdirs isn't as ambiguous as rename. You MUST only return 'false' if the
dir wasn't created because it exists,
i.e : exceptions can be raised for any issue
true; we just created a directory
false: we didnt' create a dir but we consider that to not matter
> mkdirs on fallback should throw IOE out instead of suppressing and returning
> false
> ----------------------------------------------------------------------------------
>
> Key: HDFS-15515
> URL: https://issues.apache.org/jira/browse/HDFS-15515
> Project: Hadoop HDFS
> Issue Type: Sub-task
> Reporter: Uma Maheswara Rao G
> Assignee: Uma Maheswara Rao G
> Priority: Major
>
> Currently when doing mkdirs on fallback dir, we catching IOE and returning
> false.
> I think we should just throw IOE out as the fs#mkdirs throws IOE out.
> I noticed a case when we attempt to create .reserved dirs, NN throws
> HadoopIAE.
> But we will catch and return false. Here exception should be thrown out.
> {code:java}
> try {
> return linkedFallbackFs.mkdirs(dirToCreate, permission);
> } catch (IOException e) {
> if (LOG.isDebugEnabled()) {
> StringBuilder msg =
> new StringBuilder("Failed to create ").append(dirToCreate)
> .append(" at fallback : ")
> .append(linkedFallbackFs.getUri());
> LOG.debug(msg.toString(), e);
> }
> return false;
> }
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]