HDFS-9024. Deprecate the TotalFiles metric. Contributed by Akira Ahisaka.
This commit is contained in:
parent
5ce7e72145
commit
c07fab5f6f
|
@ -231,7 +231,7 @@ Each metrics record contains tags such as HAState and Hostname as additional inf
|
||||||
| `MillisSinceLastLoadedEdits` | (HA-only) Time in milliseconds since the last time standby NameNode load edit log. In active NameNode, set to 0 |
|
| `MillisSinceLastLoadedEdits` | (HA-only) Time in milliseconds since the last time standby NameNode load edit log. In active NameNode, set to 0 |
|
||||||
| `BlockCapacity` | Current number of block capacity |
|
| `BlockCapacity` | Current number of block capacity |
|
||||||
| `StaleDataNodes` | Current number of DataNodes marked stale due to delayed heartbeat |
|
| `StaleDataNodes` | Current number of DataNodes marked stale due to delayed heartbeat |
|
||||||
| `TotalFiles` | Current number of files and directories (same as FilesTotal) |
|
| `TotalFiles` | Deprecated: Use FilesTotal instead |
|
||||||
| `MissingReplOneBlocks` | Current number of missing blocks with replication factor 1 |
|
| `MissingReplOneBlocks` | Current number of missing blocks with replication factor 1 |
|
||||||
| `NumFilesUnderConstruction` | Current number of files under construction |
|
| `NumFilesUnderConstruction` | Current number of files under construction |
|
||||||
| `NumActiveClients` | Current number of active clients holding lease |
|
| `NumActiveClients` | Current number of active clients holding lease |
|
||||||
|
|
|
@ -1496,6 +1496,8 @@ Release 2.8.0 - UNRELEASED
|
||||||
HDFS-9356. Decommissioning node does not have Last Contact value in the UI.
|
HDFS-9356. Decommissioning node does not have Last Contact value in the UI.
|
||||||
(Surendra Singh Lilhore via wheat9)
|
(Surendra Singh Lilhore via wheat9)
|
||||||
|
|
||||||
|
HDFS-9024. Deprecate the TotalFiles metric. (Akira Ajisaka via wheat9)
|
||||||
|
|
||||||
Release 2.7.3 - UNRELEASED
|
Release 2.7.3 - UNRELEASED
|
||||||
|
|
||||||
INCOMPATIBLE CHANGES
|
INCOMPATIBLE CHANGES
|
||||||
|
|
|
@ -145,7 +145,7 @@ public class FSImage implements Closeable {
|
||||||
}
|
}
|
||||||
|
|
||||||
void format(FSNamesystem fsn, String clusterId) throws IOException {
|
void format(FSNamesystem fsn, String clusterId) throws IOException {
|
||||||
long fileCount = fsn.getTotalFiles();
|
long fileCount = fsn.getFilesTotal();
|
||||||
// Expect 1 file, which is the root inode
|
// Expect 1 file, which is the root inode
|
||||||
Preconditions.checkState(fileCount == 1,
|
Preconditions.checkState(fileCount == 1,
|
||||||
"FSImage.format should be called with an uninitialized namesystem, has " +
|
"FSImage.format should be called with an uninitialized namesystem, has " +
|
||||||
|
|
|
@ -5927,6 +5927,8 @@ public class FSNamesystem implements Namesystem, FSNamesystemMBean,
|
||||||
return getBlocksTotal();
|
return getBlocksTotal();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** @deprecated Use {@link #getFilesTotal()} instead. */
|
||||||
|
@Deprecated
|
||||||
@Override // NameNodeMXBean
|
@Override // NameNodeMXBean
|
||||||
@Metric
|
@Metric
|
||||||
public long getTotalFiles() {
|
public long getTotalFiles() {
|
||||||
|
|
|
@ -142,7 +142,10 @@ public interface NameNodeMXBean {
|
||||||
* Gets the total number of files on the cluster
|
* Gets the total number of files on the cluster
|
||||||
*
|
*
|
||||||
* @return the total number of files on the cluster
|
* @return the total number of files on the cluster
|
||||||
|
* @deprecated Use
|
||||||
|
* {@link org.apache.hadoop.hdfs.server.namenode.metrics.FSNamesystemMBean#getFilesTotal()} instead.
|
||||||
*/
|
*/
|
||||||
|
@Deprecated
|
||||||
public long getTotalFiles();
|
public long getTotalFiles();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue