hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matt Foley (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-7377) Fix command name handling affecting DFSAdmin
Date Tue, 14 Jun 2011 19:18:47 GMT

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

Matt Foley commented on HADOOP-7377:

I'm uncomfortable using reflection with access permission override, to get a datum that seems
like it could be fetched using provided methods such as getCommandName().  However, Daryn
has convinced me that it would require a massive change of legacy code to make this better:

bq. [Daryn] The CommandFactory is supposed to call setName(...) on the instance it creates,
using the name fed to the factory (since commands can have more than one invokable name).
 setName()/getName() should be just using the instance field name.  The static NAME is legacy
and was not intended to remain. But Count and the DFSAdmin commands, unfortunately, use it.
I intend to kill both getCommandName() and NAME, if possible, after DFSAdmin is adapted to
better use the framework. Basically, the command should not know it's name, that's the factory's
job, and the factory tells the command how it was conjured up. But in the meantime, NAME is

So, +1 on this patch.

Auto-test passes except for new test, but this patch will be tested by existing DFSAdmin unit
tests starting to work.
I'll commit this in 24 hours to allow for other comments.

Daryn, please list the exact unit tests that will be fixed by this submission.  Thanks.

> Fix command name handling affecting DFSAdmin
> --------------------------------------------
>                 Key: HADOOP-7377
>                 URL: https://issues.apache.org/jira/browse/HADOOP-7377
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: fs
>    Affects Versions: 0.23.0
>            Reporter: Daryn Sharp
>            Assignee: Daryn Sharp
>         Attachments: HADOOP-7377.patch
> When an error occurs in the get/set quota commands in DFSAdmin, they are displaying the
> setQuota: failed to get SetQuotaCommand.NAME
> The {{Command}} class expects the {{NAME}} field to be accessible, but for DFSAdmin,
it's not.

This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


View raw message