FSNamesystem implements Namesystem, FSClusterStats,
    FSNamesystemMBean, NameNodeMXBean { public static List<URI> getNamespaceEditsDirs(Configuration conf) throws IOException { return getNamespaceEditsDirs(conf, true); } FSNamesystem(Configuration conf, FSImage fsImage);   FSNamesystem(Configuration conf, FSImage fsImage, boolean ignoreRetryCache); @VisibleForTesting boolean isAuditEnabled(); void resetLastInodeId(long newValue); long getLastInodeId(); long allocateNewInodeId(); @VisibleForTesting RetryCache getRetryCache(); @VisibleForTesting KeyProviderCryptoExtension getProvider(); boolean inTransitionToActive(); @Override void checkOperation(OperationCategory op); static Collection<URI> getNamespaceDirs(Configuration conf); static Collection<URI> getRequiredNamespaceEditsDirs(Configuration conf); static List<URI> getNamespaceEditsDirs(Configuration conf); static List<URI> getNamespaceEditsDirs(Configuration conf,
      boolean includeShared); static List<URI> getSharedEditsDirs(Configuration conf); @Override void readLock(); @Override void longReadLockInterruptibly(); @Override void longReadUnlock(); @Override void readUnlock(); @Override void writeLock(); @Override void writeLockInterruptibly(); @Override void writeUnlock(); @Override boolean hasWriteLock(); @Override boolean hasReadLock(); int getReadHoldCount(); int getWriteHoldCount(); @Override boolean isRunning(); @Override boolean isInStandbyState(); @Override boolean isInSnapshot(BlockInfoUnderConstruction blockUC); FSImage getFSImage(); FSEditLog getEditLog(); @Metric({"MissingBlocks", "Number of missing blocks"}) long getMissingBlocksCount(); @Metric({"ExpiredHeartbeats", "Number of expired heartbeats"}) int getExpiredHeartbeats(); @Metric({"TransactionsSinceLastCheckpoint", "Number of transactions since last checkpoint"}) long getTransactionsSinceLastCheckpoint(); @Metric({"TransactionsSinceLastLogRoll", "Number of transactions since last edit log roll"}) long getTransactionsSinceLastLogRoll(); @Metric({"LastWrittenTransactionId", "Transaction ID written to the edit log"}) long getLastWrittenTransactionId(); @Metric({"LastCheckpointTime", "Time in milliseconds since the epoch of the last checkpoint"}) long getLastCheckpointTime(); @Override // FSNamesystemMBean @Metric({"CapacityTotal", "Total raw capacity of data nodes in bytes"}) long getCapacityTotal(); @Metric({"CapacityTotalGB", "Total raw capacity of data nodes in GB"}) float getCapacityTotalGB(); @Override // FSNamesystemMBean @Metric({"CapacityUsed", "Total used capacity across all data nodes in bytes"}) long getCapacityUsed(); @Metric({"CapacityUsedGB", "Total used capacity across all data nodes in GB"}) float getCapacityUsedGB(); @Override // FSNamesystemMBean @Metric({"CapacityRemaining", "Remaining capacity in bytes"}) long getCapacityRemaining(); @Metric({"CapacityRemainingGB", "Remaining capacity in GB"}) float getCapacityRemainingGB(); @Metric({"CapacityUsedNonDFS", "Total space used by data nodes for non DFS purposes in bytes"}) long getCapacityUsedNonDFS(); @Override // FSNamesystemMBean @Metric int getTotalLoad(); @Metric({ "SnapshottableDirectories", "Number of snapshottable directories" }) int getNumSnapshottableDirs(); @Metric({ "Snapshots", "The number of snapshots" }) int getNumSnapshots(); @Override String getSnapshotStats(); @Override void checkSafeMode(); @Override boolean isInSafeMode(); @Override boolean isInStartupSafeMode(); @Override boolean isPopulatingReplQueues(); @Override void incrementSafeBlockCount(int replication); @Override void decrementSafeBlockCount(Block b); @Override void adjustSafeModeBlockTotals(int deltaSafe, int deltaTotal); void setBlockTotal(); @Override // FSNamesystemMBean @Metric long getBlocksTotal(); void processIncrementalBlockReport(final DatanodeID nodeID,
      final StorageReceivedDeletedBlocks srdb); @Override void checkSuperuserPrivilege(); @Override // FSNamesystemMBean long getMaxObjects(); @Override // FSNamesystemMBean @Metric long getFilesTotal(); @Override // FSNamesystemMBean @Metric long getPendingReplicationBlocks(); @Override // FSNamesystemMBean @Metric long getUnderReplicatedBlocks(); @Metric({"CorruptBlocks", "Number of blocks with corrupt replicas"}) long getCorruptReplicaBlocks(); @Override // FSNamesystemMBean @Metric long getScheduledReplicationBlocks(); @Override @Metric long getPendingDeletionBlocks(); @Override long getBlockDeletionStartTime(); @Metric long getExcessBlocks(); @Metric long getPostponedMisreplicatedBlocks(); @Metric int getPendingDataNodeMessageCount(); @Metric String getHAState(); @Metric long getMillisSinceLastLoadedEdits(); @Metric int getBlockCapacity(); @Override // FSNamesystemMBean String getFSState(); @Override // FSNamesystemMBean int getNumLiveDataNodes(); @Override // FSNamesystemMBean int getNumDeadDataNodes(); @Override // FSNamesystemMBean int getNumDecomLiveDataNodes(); @Override // FSNamesystemMBean int getNumDecomDeadDataNodes(); @Override // FSNamesystemMBean int getNumDecommissioningDataNodes(); @Override // FSNamesystemMBean @Metric({"StaleDataNodes", "Number of datanodes marked stale due to delayed heartbeat"}) int getNumStaleDataNodes(); @Override // FSNamesystemMBean int getNumStaleStorages(); void logUpdateMasterKey(DelegationKey key); void logExpireDelegationToken(DelegationTokenIdentifier id); @Override // NameNodeMXBean String getVersion(); @Override // NameNodeMXBean long getUsed(); @Override // NameNodeMXBean long getFree(); @Override // NameNodeMXBean long getTotal(); @Override // NameNodeMXBean String getSafemode(); @Override // NameNodeMXBean boolean isUpgradeFinalized(); @Override // NameNodeMXBean long getNonDfsUsedSpace(); @Override // NameNodeMXBean float getPercentUsed(); @Override // NameNodeMXBean long getBlockPoolUsedSpace(); @Override // NameNodeMXBean float getPercentBlockPoolUsed(); @Override // NameNodeMXBean float getPercentRemaining(); @Override // NameNodeMXBean long getCacheCapacity(); @Override // NameNodeMXBean long getCacheUsed(); @Override // NameNodeMXBean long getTotalBlocks(); @Override // NameNodeMXBean @Metric long getTotalFiles(); @Override // NameNodeMXBean long getNumberOfMissingBlocks(); @Override // NameNodeMXBean int getThreads(); @Override // NameNodeMXBean String getLiveNodes(); @Override // NameNodeMXBean String getDeadNodes(); @Override // NameNodeMXBean String getDecomNodes(); @Override // NameNodeMXBean String getClusterId(); @Override // NameNodeMXBean String getBlockPoolId(); @Override // NameNodeMXBean String getNameDirStatuses(); @Override // NameNodeMXBean String getNodeUsage(); @Override // NameNodeMXBean String getNameJournalStatus(); @Override // NameNodeMxBean String getJournalTransactionInfo(); @Override // NameNodeMXBean String getNNStarted(); @Override // NameNodeMXBean String getCompileInfo(); BlockManager getBlockManager(); FSDirectory getFSDirectory(); @VisibleForTesting void setFSDirectory(FSDirectory dir); CacheManager getCacheManager(); @Override // NameNodeMXBean String getCorruptFiles(); @Override //NameNodeMXBean int getDistinctVersionCount(); @Override //NameNodeMXBean Map<String, Integer> getDistinctVersions(); @Override //NameNodeMXBean String getSoftwareVersion(); synchronized void verifyToken(DelegationTokenIdentifier identifier,
      byte[] password); @Override boolean isGenStampInFuture(Block block); @VisibleForTesting EditLogTailer getEditLogTailer(); @VisibleForTesting void setEditLogTailerForTests(EditLogTailer tailer); @VisibleForTesting ReentrantReadWriteLock getFsLockForTests(); @VisibleForTesting ReentrantLock getLongReadLockForTests(); @VisibleForTesting SafeModeInfo getSafeModeInfoForTests(); @VisibleForTesting void setNNResourceChecker(NameNodeResourceChecker nnResourceChecker); @Override boolean isAvoidingStaleDataNodesForWrite(); @Override // FSClusterStats int getNumDatanodesInService(); @Override // for block placement strategy double getInServiceXceiverAverage(); SnapshotManager getSnapshotManager(); SnapshottableDirectoryStatus[] getSnapshottableDirListing(); void setCreatedRollbackImages(boolean created); RollingUpgradeInfo getRollingUpgradeInfo(); boolean isNeedRollbackFsImage(); void setNeedRollbackFsImage(boolean needRollbackFsImage); @Override // NameNodeMXBean RollingUpgradeInfo.Bean getRollingUpgradeStatus(); boolean isRollingUpgrade(); void addCachePool(CachePoolInfo req); void modifyCachePool(CachePoolInfo req); void removeCachePool(String cachePoolName); BatchedListEntries<CachePoolEntry> listCachePools(String prevKey); static final Log LOG; static final Log auditLog; }
@Test public void testUniqueEditDirs() throws IOException { Configuration config = new Configuration(); config.set(DFS_NAMENODE_EDITS_DIR_KEY, "file: + "file: Collection<URI> editsDirs = FSNamesystem.getNamespaceEditsDirs(config); assertEquals(2, editsDirs.size()); }