Package org.apache.hadoop.hdfs.server.namenode

Examples of org.apache.hadoop.hdfs.server.namenode.FSNamesystem.writeUnlock()


      ns.writeLock();
      try {
        cluster.getNamesystem().getBlockManager().findAndMarkBlockAsCorrupt(
            blk, new DatanodeInfo(dnR), "TEST");
      } finally {
        ns.writeUnlock();
      }
     
      // open the file
      fs.open(FILE_PATH);
     
View Full Code Here


        synchronized (hm) {
          datanode.setLastUpdate(0); // mark it dead
          hm.heartbeatCheck();
        }
      } finally {
        namesystem.writeUnlock();
      }
     
      // the block will be replicated
      DFSTestUtil.waitReplication(fs, FILE_PATH, REPLICATION_FACTOR);
View Full Code Here

        synchronized(hm) {
          nonExcessDN.setLastUpdate(0); // mark it dead
          hm.heartbeatCheck();
        }
      } finally {
        namesystem.writeUnlock();
      }

      // The block should be replicated
      initializeTimeout(TIMEOUT);
      while (countNodes(block.getLocalBlock(), namesystem).liveReplicas() != REPLICATION_FACTOR) {
View Full Code Here

        } else {
          assertEquals(workCount, blockInvalidateLimit);
          assertEquals(2, bm.computeInvalidateWork(2));
        }
      } finally {
        namesystem.writeUnlock();
      }
    } finally {
      cluster.shutdown();
    }
  }
View Full Code Here

          cmds = NameNodeAdapter.sendHeartBeat(nodeReg, dd, namesystem);
          assertEquals(null, cmds);
        }
      } finally {
        namesystem.writeUnlock();
      }
    } finally {
      cluster.shutdown();
    }
  }
View Full Code Here

          // corrupt one won't be chosen to be excess one
          // without 4910 the number of live replicas would be 0: block gets lost
          assertEquals(1, bm.countNodes(block.getLocalBlock()).liveReplicas());
        }
      } finally {
        namesystem.writeUnlock();
      }
     
    } finally {
      cluster.shutdown();
    }
View Full Code Here

          // corrupt one won't be chosen to be excess one
          // without 4910 the number of live replicas would be 0: block gets lost
          assertEquals(1, bm.countNodes(block.getLocalBlock()).liveReplicas());
        }
      } finally {
        namesystem.writeUnlock();
      }
     
    } finally {
      cluster.shutdown();
    }
View Full Code Here

      ns.writeLock();
      try {
        cluster.getNamesystem().getBlockManager().findAndMarkBlockAsCorrupt(
            blk, new DatanodeInfo(dnR), "TEST", "STORAGE_ID");
      } finally {
        ns.writeUnlock();
      }
     
      // open the file
      fs.open(FILE_PATH);
     
View Full Code Here

      namesystem.writeLock();
      namesystem.clusterMap.remove(dnDs);
      namesystem.resolveNetworkLocation(newDS);
      namesystem.unprotectedAddDatanode(newDS);
      namesystem.clusterMap.add(newDS);
      namesystem.writeUnlock();
      // Overwrite DN map with new registration.
      node.setRegistrationName(node.getMachineName());
    }
  }
View Full Code Here

      ns.writeLock();
      try {
        cluster.getNamesystem().getBlockManager().findAndMarkBlockAsCorrupt(
            blk, new DatanodeInfo(dnR), "TEST");
      } finally {
        ns.writeUnlock();
      }
     
      // open the file
      fs.open(FILE_PATH);
     
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.