@Override // NameNodeMXBean public long getNumberOfMissingBlocks() { return getMissingBlocksCount(); }
/** @see ClientProtocol#getStats() */ long[] getStats() { final long[] stats = datanodeStatistics.getStats(); stats[ClientProtocol.GET_STATS_LOW_REDUNDANCY_IDX] = getLowRedundancyBlocks(); stats[ClientProtocol.GET_STATS_CORRUPT_BLOCKS_IDX] = getCorruptReplicaBlocks(); stats[ClientProtocol.GET_STATS_MISSING_BLOCKS_IDX] = getMissingBlocksCount(); stats[ClientProtocol.GET_STATS_MISSING_REPL_ONE_BLOCKS_IDX] = getMissingReplOneBlocksCount(); stats[ClientProtocol.GET_STATS_BYTES_IN_FUTURE_BLOCKS_IDX] = blockManager.getBytesInFuture(); stats[ClientProtocol.GET_STATS_PENDING_DELETION_BLOCKS_IDX] = blockManager.getPendingDeletionBlocksCount(); return stats; }
@Override // NameNodeMXBean public long getNumberOfMissingBlocks() { return getMissingBlocksCount(); }
@Override // NameNodeMXBean public long getNumberOfMissingBlocks() { return getMissingBlocksCount(); }
@Override // NameNodeMXBean public long getNumberOfMissingBlocks() { return getMissingBlocksCount(); }
long[] getStats() throws IOException { checkSuperuserPrivilege(); synchronized (heartbeats) { return new long[]{this.capacityTotal, this.capacityUsed, this.capacityRemaining, this.underReplicatedBlocksCount, this.corruptReplicaBlocksCount, getMissingBlocksCount(), this.capacityNamespaceUsed}; } }
public static void generateWarningText(JspWriter out, FSNamesystem fsn) { // Ideally this should be displayed in RED try { Long missingBlocks = fsn.getMissingBlocksCount(); if (missingBlocks > 0) { out.print("<b>"); String raidHttpUrl = fsn.getRaidHttpUrl(); if (raidHttpUrl != null) { try { HttpServer.LOG.info("Raidnode http address:" + raidHttpUrl); out.print(fsn.getCorruptFileHTMLInfo(raidHttpUrl)); } catch (IOException e) { HttpServer.LOG.error(e); } } out.print("<br></b>"); } out.println(); } catch (IOException ioe) { HttpServer.LOG.error(ioe); } }
/** @see ClientProtocol#getStats() */ long[] getStats() { final long[] stats = datanodeStatistics.getStats(); stats[ClientProtocol.GET_STATS_UNDER_REPLICATED_IDX] = getUnderReplicatedBlocks(); stats[ClientProtocol.GET_STATS_CORRUPT_BLOCKS_IDX] = getCorruptReplicaBlocks(); stats[ClientProtocol.GET_STATS_MISSING_BLOCKS_IDX] = getMissingBlocksCount(); stats[ClientProtocol.GET_STATS_MISSING_REPL_ONE_BLOCKS_IDX] = getMissingReplOneBlocksCount(); return stats; }
/** @see ClientProtocol#getStats() */ long[] getStats() { final long[] stats = datanodeStatistics.getStats(); stats[ClientProtocol.GET_STATS_UNDER_REPLICATED_IDX] = getUnderReplicatedBlocks(); stats[ClientProtocol.GET_STATS_CORRUPT_BLOCKS_IDX] = getCorruptReplicaBlocks(); stats[ClientProtocol.GET_STATS_MISSING_BLOCKS_IDX] = getMissingBlocksCount(); stats[ClientProtocol.GET_STATS_MISSING_REPL_ONE_BLOCKS_IDX] = getMissingReplOneBlocksCount(); return stats; }
private void printStats() { NameNodeAdapter.refreshBlockCounts(cluster.getNameNode()); if(LOG.isDebugEnabled()) { LOG.debug("Missing " + cluster.getNamesystem().getMissingBlocksCount()); LOG.debug("Corrupted " + cluster.getNamesystem().getCorruptReplicaBlocks()); LOG.debug("Under-replicated " + cluster.getNamesystem(). getUnderReplicatedBlocks()); LOG.debug("Pending delete " + cluster.getNamesystem(). getPendingDeletionBlocks()); LOG.debug("Pending replications " + cluster.getNamesystem(). getPendingReplicationBlocks()); LOG.debug("Excess " + cluster.getNamesystem().getExcessBlocks()); LOG.debug("Total " + cluster.getNamesystem().getBlocksTotal()); } }
blocks2Remove.size(), cluster.getNamesystem().getMissingBlocksCount()); assertEquals("Wrong number of UnderReplicatedBlocks is found", blocks2Remove.size(), cluster.getNamesystem().getUnderReplicatedBlocks());
private void printStats() { BlockManagerTestUtil.updateState(cluster.getNamesystem().getBlockManager()); if(LOG.isDebugEnabled()) { LOG.debug("Missing " + cluster.getNamesystem().getMissingBlocksCount()); LOG.debug("Corrupted " + cluster.getNamesystem().getCorruptReplicaBlocks()); LOG.debug("Under-replicated " + cluster.getNamesystem(). getUnderReplicatedBlocks()); LOG.debug("Pending delete " + cluster.getNamesystem(). getPendingDeletionBlocks()); LOG.debug("Pending replications " + cluster.getNamesystem(). getPendingReplicationBlocks()); LOG.debug("Excess " + cluster.getNamesystem().getExcessBlocks()); LOG.debug("Total " + cluster.getNamesystem().getBlocksTotal()); } }
blocks2Remove.size(), cluster.getNamesystem().getMissingBlocksCount()); assertEquals("Wrong number of UnderReplicatedBlocks is found", blocks2Remove.size(), cluster.getNamesystem().getUnderReplicatedBlocks());
assertEquals(0, ns.getPendingReplicationBlocks()); assertEquals(0, ns.getCorruptReplicaBlocks()); assertEquals(0, ns.getMissingBlocksCount());
/** * Make sure that when we transition to active in safe mode that we don't * prematurely consider blocks missing just because not all DNs have reported * yet. * * This is a regression test for HDFS-3921. */ @Test public void testNoPopulatingReplQueuesWhenStartingActiveInSafeMode() throws IOException { DFSTestUtil.createFile(fs, new Path("/test"), 15*BLOCK_SIZE, (short)3, 1L); // Stop the DN so that when the NN restarts not all blocks wil be reported // and the NN won't leave safe mode. cluster.stopDataNode(1); // Restart the namenode but don't wait for it to hear from all DNs (since // one DN is deliberately shut down.) cluster.restartNameNode(0, false); cluster.transitionToActive(0); assertTrue(cluster.getNameNode(0).isInSafeMode()); // We shouldn't yet consider any blocks "missing" since we're in startup // safemode, i.e. not all DNs may have reported. assertEquals(0, cluster.getNamesystem(0).getMissingBlocksCount()); }
assertEquals(0, ns1.getPendingReplicationBlocks()); assertEquals(0, ns1.getCorruptReplicaBlocks()); assertEquals(0, ns1.getMissingBlocksCount());
assertThat(cluster.getNamesystem().getMissingBlocksCount(), is((long) reports.length));
scheduledReplicationBlocks.set((int)fsNameSystem. getScheduledReplicationBlocks()); missingBlocks.set((int)fsNameSystem.getMissingBlocksCount()); blockCapacity.set(fsNameSystem.getBlockCapacity()); numLeases.set(fsNameSystem.leaseManager.countLease());