Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-4492

NameNodeConnector should prevent other balancers to run while the one is running

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Blocker
    • Resolution: Duplicate
    • 2.0.2-alpha
    • None
    • balancer & mover
    • None

    Description

      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.

      Attachments

        1. HDFS-4492.patch
          0.9 kB
          Chu Tong

        Issue Links

          Activity

            People

              stayhf Chu Tong
              stayhf Chu Tong
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: