hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vinayakum...@apache.org
Subject [2/2] hadoop git commit: HDFS-9013. Deprecate NameNodeMXBean#getNNStarted in branch2 and remove from trunk (Contributed by Surendra Singh Lilhore)
Date Wed, 23 Sep 2015 10:16:37 GMT
HDFS-9013. Deprecate NameNodeMXBean#getNNStarted in branch2 and remove from trunk (Contributed
by Surendra Singh Lilhore)

(cherry picked from commit a2c76e5f26301d4b01e56b347442f3dec171591d)


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/017dff98
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/017dff98
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/017dff98

Branch: refs/heads/branch-2
Commit: 017dff9877a4ade3a5f664f1dafe7102a72c8f96
Parents: 090b1f6
Author: Vinayakumar B <vinayakumarb@apache.org>
Authored: Wed Sep 23 15:45:21 2015 +0530
Committer: Vinayakumar B <vinayakumarb@apache.org>
Committed: Wed Sep 23 15:45:21 2015 +0530

----------------------------------------------------------------------
 .../hadoop-common/src/site/markdown/Metrics.md              | 2 +-
 hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt                 | 5 ++++-
 .../apache/hadoop/hdfs/server/namenode/FSNamesystem.java    | 2 ++
 .../apache/hadoop/hdfs/server/namenode/NameNodeMXBean.java  | 4 +++-
 .../server/blockmanagement/TestPendingInvalidateBlock.java  | 9 +++------
 .../hadoop/hdfs/server/namenode/TestNameNodeMXBean.java     | 3 ---
 6 files changed, 13 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/017dff98/hadoop-common-project/hadoop-common/src/site/markdown/Metrics.md
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/src/site/markdown/Metrics.md b/hadoop-common-project/hadoop-common/src/site/markdown/Metrics.md
index d594e77..c0849e6 100644
--- a/hadoop-common-project/hadoop-common/src/site/markdown/Metrics.md
+++ b/hadoop-common-project/hadoop-common/src/site/markdown/Metrics.md
@@ -191,7 +191,7 @@ Each metrics record contains tags such as ProcessName, SessionId, and
Hostname a
 | `GetImageAvgTime` | Average fsimage download time in milliseconds |
 | `PutImageNumOps` | Total number of fsimage uploads to SecondaryNameNode |
 | `PutImageAvgTime` | Average fsimage upload time in milliseconds |
-| `NNStarted`| NameNode start time |
+| `NNStarted`| Deprecated: Use NNStartedTimeInMillis instead  |
 | `NNStartedTimeInMillis`| NameNode start time in milliseconds |
 
 FSNamesystem

http://git-wip-us.apache.org/repos/asf/hadoop/blob/017dff98/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
index 56733f9..fbde535 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
+++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
@@ -1038,7 +1038,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
 

http://git-wip-us.apache.org/repos/asf/hadoop/blob/017dff98/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java
index 211e9a3..f3c0e94 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java
@@ -6105,7 +6105,9 @@ public class FSNamesystem implements Namesystem, FSNamesystemMBean,
     return JSON.toString(txnIdMap);
   }
   
+  /** @deprecated Use {@link #getNNStartedTimeInMillis()} instead. */
   @Override  // NameNodeMXBean
+  @Deprecated
   public String getNNStarted() {
     return getStartTime().toString();
   }

http://git-wip-us.apache.org/repos/asf/hadoop/blob/017dff98/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNodeMXBean.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNodeMXBean.java
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNodeMXBean.java
index 00c1abe..33ba6a2 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNodeMXBean.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNodeMXBean.java
@@ -233,9 +233,11 @@ public interface NameNodeMXBean {
 
   /**
    * Gets the NN start time
-   *
+   * @deprecated Use
+   * {@link #getNNStartedTimeInMillis()} instead.
    * @return the NN start time
    */
+  @Deprecated
   public String getNNStarted();
 
   /**

http://git-wip-us.apache.org/repos/asf/hadoop/blob/017dff98/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestPendingInvalidateBlock.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestPendingInvalidateBlock.java
b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestPendingInvalidateBlock.java
index 84ae771..60e0f7c 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestPendingInvalidateBlock.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestPendingInvalidateBlock.java
@@ -90,15 +90,12 @@ public class TestPendingInvalidateBlock {
     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);
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/hadoop/blob/017dff98/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestNameNodeMXBean.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestNameNodeMXBean.java
b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestNameNodeMXBean.java
index f10d57e..559aae6 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestNameNodeMXBean.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestNameNodeMXBean.java
@@ -164,9 +164,6 @@ public class TestNameNodeMXBean {
           "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);


Mime
View raw message