HDFS-9013. Deprecate NameNodeMXBean#getNNStarted in branch2 and remove from trunk (Contributed by Surendra Singh Lilhore)

This commit is contained in:
Vinayakumar B 2015-09-23 15:28:41 +05:30
parent 7c5c099324
commit a2c76e5f26
6 changed files with 7 additions and 23 deletions

View File

@ -192,7 +192,6 @@ Each metrics record contains tags such as ProcessName, SessionId, and Hostname a
| `PutImageNumOps` | Total number of fsimage uploads to SecondaryNameNode |
| `PutImageAvgTime` | Average fsimage upload time in milliseconds |
| `TotalFileOps`| Total number of file operations performed |
| `NNStarted`| NameNode start time |
| `NNStartedTimeInMillis`| NameNode start time in milliseconds |
FSNamesystem

View File

@ -1385,7 +1385,10 @@ Release 2.8.0 - UNRELEASED
HDFS-9063. Correctly handle snapshot path for getContentSummary. (jing9)
HDFS-8780. Fetching live/dead datanode list with arg true for remove-
DecommissionNode,returns list with decom node. (J.Andreina via vinayakumab)
DecommissionNode,returns list with decom node. (J.Andreina via vinayakumarb)
HDFS-9013. Deprecate NameNodeMXBean#getNNStarted in branch2 and remove from
trunk (Surendra Singh Lilhore via vinayakumarb)
Release 2.7.2 - UNRELEASED

View File

@ -6110,11 +6110,6 @@ public String getJournalTransactionInfo() {
return JSON.toString(txnIdMap);
}
@Override // NameNodeMXBean
public String getNNStarted() {
return getStartTime().toString();
}
@Override // NameNodeMXBean
public long getNNStartedTimeInMillis() {
return startTime;

View File

@ -231,13 +231,6 @@ public interface NameNodeMXBean {
*/
public String getJournalTransactionInfo();
/**
* Gets the NN start time
*
* @return the NN start time
*/
public String getNNStarted();
/**
* Gets the NN start time in milliseconds.
* @return the NN start time in msec

View File

@ -90,15 +90,12 @@ public void testPendingDeletion() throws Exception {
Thread.sleep(6000);
Assert.assertEquals(0, cluster.getNamesystem().getBlocksTotal());
Assert.assertEquals(0, cluster.getNamesystem().getPendingDeletionBlocks());
String nnStartedStr = cluster.getNamesystem().getNNStarted();
long nnStarted = new SimpleDateFormat("EEE MMM dd HH:mm:ss zzz yyyy")
.parse(nnStartedStr).getTime();
long nnStarted = cluster.getNamesystem().getNNStartedTimeInMillis();
long blockDeletionStartTime = cluster.getNamesystem()
.getBlockDeletionStartTime();
Assert.assertTrue(String.format(
"Expect blockDeletionStartTime = %d > nnStarted = %d/nnStartedStr = %s.",
blockDeletionStartTime, nnStarted, nnStartedStr),
blockDeletionStartTime > nnStarted);
"Expect blockDeletionStartTime = %d > nnStarted = %d.",
blockDeletionStartTime, nnStarted), blockDeletionStartTime > nnStarted);
}
/**

View File

@ -164,9 +164,6 @@ public void testNameNodeMXBeanInfo() throws Exception {
"JournalTransactionInfo");
assertEquals("Bad value for NameTxnIds", fsn.getJournalTransactionInfo(),
journalTxnInfo);
// get attribute "NNStarted"
String nnStarted = (String) mbs.getAttribute(mxbeanName, "NNStarted");
assertEquals("Bad value for NNStarted", fsn.getNNStarted(), nnStarted);
// get attribute "CompileInfo"
String compileInfo = (String) mbs.getAttribute(mxbeanName, "CompileInfo");
assertEquals("Bad value for CompileInfo", fsn.getCompileInfo(), compileInfo);