hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aaron T. Myers (JIRA)" <j...@apache.org>
Subject [jira] [Assigned] (HDFS-4492) NameNodeConnector should prevent other balancers to run while the one is running
Date Fri, 15 Feb 2013 21:25:13 GMT

     [ https://issues.apache.org/jira/browse/HDFS-4492?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Aaron T. Myers reassigned HDFS-4492:
------------------------------------

    Assignee: Chu Tong

Hi Chu, the patch looks pretty good to me. Would you mind writing a little test for this,
so as to ensure that the issue never regresses? We generally prefer that all bug fixes have
a test associated with them, hence why the pre-commit test run mentioned that no tests were
included.
                
> NameNodeConnector should prevent other balancers to run while the one is running
> --------------------------------------------------------------------------------
>
>                 Key: HDFS-4492
>                 URL: https://issues.apache.org/jira/browse/HDFS-4492
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: balancer
>    Affects Versions: 2.0.2-alpha
>            Reporter: Chu Tong
>            Assignee: Chu Tong
>            Priority: Blocker
>         Attachments: HDFS-4492.patch
>
>
> In hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/balancer/NameNodeConnector.java:
> private OutputStream checkAndMarkRunningBalancer() throws IOException {
>     try {
>       final DataOutputStream out = fs.create(BALANCER_ID_PATH);
>       out.writeBytes(InetAddress.getLocalHost().getHostName());
>       out.flush();
>       return out;
>     } catch(RemoteException e) {
> ...
> In the code, fs.create should set overwrite bit to false so that other balancer can't
run while one is running.

--
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

Mime
View raw message