You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by yj...@apache.org on 2015/12/12 06:05:23 UTC
[1/2] hadoop git commit: HDFS-9519. Some coding improvement in
SecondaryNameNode#main. (Xiao Chen via Yongjun Zhang)
Repository: hadoop
Updated Branches:
refs/heads/trunk f5a911452 -> bf5295b11
HDFS-9519. Some coding improvement in SecondaryNameNode#main. (Xiao Chen via Yongjun Zhang)
Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/2a4c7d4f
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/2a4c7d4f
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/2a4c7d4f
Branch: refs/heads/trunk
Commit: 2a4c7d4facabb8b99d6dcbf4ccfe2afedf4fd445
Parents: f5a9114
Author: Yongjun Zhang <yz...@cloudera.com>
Authored: Fri Dec 11 18:44:01 2015 -0800
Committer: Yongjun Zhang <yz...@cloudera.com>
Committed: Fri Dec 11 18:44:01 2015 -0800
----------------------------------------------------------------------
hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt | 3 +++
.../hdfs/server/namenode/SecondaryNameNode.java | 14 ++++++--------
2 files changed, 9 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hadoop/blob/2a4c7d4f/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 1fda1d78..767bbcb 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
+++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
@@ -1742,6 +1742,9 @@ Release 2.8.0 - UNRELEASED
HDFS-9532. Detailed exception info is lost in reportTo methods of
ErrorReportAction and ReportBadBlockAction. (Yongjun Zhang)
+ HDFS-9519. Some coding improvement in SecondaryNameNode#main.
+ (Xiao Chen via Yongjun Zhang)
+
OPTIMIZATIONS
HDFS-8026. Trace FSOutputSummer#writeChecksumChunks rather than
http://git-wip-us.apache.org/repos/asf/hadoop/blob/2a4c7d4f/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/SecondaryNameNode.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/SecondaryNameNode.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/SecondaryNameNode.java
index 9909d4a..acb2c8a 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/SecondaryNameNode.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/SecondaryNameNode.java
@@ -679,18 +679,16 @@ public class SecondaryNameNode implements Runnable,
SecondaryNameNode secondary = null;
secondary = new SecondaryNameNode(tconf, opts);
+ // SecondaryNameNode can be started in 2 modes:
+ // 1. run a command (i.e. checkpoint or geteditsize) then terminate
+ // 2. run as a daemon when {@link #parseArgs} yields no commands
if (opts != null && opts.getCommand() != null) {
+ // mode 1
int ret = secondary.processStartupCommand(opts);
terminate(ret);
- }
-
- if (secondary != null) {
- // The web server is only needed when starting SNN as a daemon,
- // and not needed if called from shell command. Starting the web server
- // from shell may fail when getting credentials, if the environment
- // is not set up for it, which is most of the case.
+ } else {
+ // mode 2
secondary.startInfoServer();
-
secondary.startCheckpointThread();
secondary.join();
}
[2/2] hadoop git commit: HDFS-9514.
TestDistributedFileSystem.testDFSClientPeerWriteTimeout failing;
exception being swallowed. (Wei-Chiu Chuang via Yongjun Zhang)
Posted by yj...@apache.org.
HDFS-9514. TestDistributedFileSystem.testDFSClientPeerWriteTimeout failing; exception being swallowed. (Wei-Chiu Chuang via Yongjun Zhang)
Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/bf5295b1
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/bf5295b1
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/bf5295b1
Branch: refs/heads/trunk
Commit: bf5295b118a24e762f21bb2b9054e5e0c1d1d14a
Parents: 2a4c7d4
Author: Yongjun Zhang <yz...@cloudera.com>
Authored: Fri Dec 11 19:52:38 2015 -0800
Committer: Yongjun Zhang <yz...@cloudera.com>
Committed: Fri Dec 11 19:52:38 2015 -0800
----------------------------------------------------------------------
hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt | 3 +++
.../hadoop/hdfs/TestDistributedFileSystem.java | 27 ++++++++++++--------
2 files changed, 20 insertions(+), 10 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hadoop/blob/bf5295b1/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 767bbcb..4c1287c 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
+++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
@@ -1745,6 +1745,9 @@ Release 2.8.0 - UNRELEASED
HDFS-9519. Some coding improvement in SecondaryNameNode#main.
(Xiao Chen via Yongjun Zhang)
+ HDFS-9514. TestDistributedFileSystem.testDFSClientPeerWriteTimeout failing;
+ exception being swallowed. (Wei-Chiu Chuang via Yongjun Zhang)
+
OPTIMIZATIONS
HDFS-8026. Trace FSOutputSummer#writeChecksumChunks rather than
http://git-wip-us.apache.org/repos/asf/hadoop/blob/bf5295b1/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDistributedFileSystem.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDistributedFileSystem.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDistributedFileSystem.java
index 0543e9d..e628752 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDistributedFileSystem.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDistributedFileSystem.java
@@ -990,10 +990,14 @@ public class TestDistributedFileSystem {
Assert.fail("read should timeout");
} catch (SocketTimeoutException ste) {
long delta = Time.now() - start;
- Assert.assertTrue("read timedout too soon", delta >= timeout*0.9);
- Assert.assertTrue("read timedout too late", delta <= timeout*1.1);
- } catch (Throwable t) {
- Assert.fail("wrong exception:"+t);
+ if (delta < timeout*0.9) {
+ throw new IOException("read timedout too soon in " + delta + " ms.",
+ ste);
+ }
+ if (delta > timeout*1.1) {
+ throw new IOException("read timedout too late in " + delta + " ms.",
+ ste);
+ }
}
} finally {
cluster.shutdown();
@@ -1037,12 +1041,15 @@ public class TestDistributedFileSystem {
Assert.fail("write finish in " + delta + " ms" + "but should timedout");
} catch (SocketTimeoutException ste) {
long delta = Time.now() - start;
- Assert.assertTrue("write timedout too soon in " + delta + " ms",
- delta >= timeout * 0.9);
- Assert.assertTrue("write timedout too late in " + delta + " ms",
- delta <= timeout * 1.2);
- } catch (Throwable t) {
- Assert.fail("wrong exception:" + t);
+
+ if (delta < timeout * 0.9) {
+ throw new IOException("write timedout too soon in " + delta + " ms.",
+ ste);
+ }
+ if (delta > timeout * 1.2) {
+ throw new IOException("write timedout too late in " + delta + " ms.",
+ ste);
+ }
}
} finally {
cluster.shutdown();