diff --git a/hadoop-yarn-project/CHANGES.txt b/hadoop-yarn-project/CHANGES.txt index aaeaf8561b2..bc2d6878e86 100644 --- a/hadoop-yarn-project/CHANGES.txt +++ b/hadoop-yarn-project/CHANGES.txt @@ -441,6 +441,8 @@ Release 2.6.0 - UNRELEASED YARN-2606. Application History Server tries to access hdfs before doing secure login (Mit Desai via jeagles) + YARN-2610. Hamlet should close table tags. (Ray Chiang via kasha) + YARN-2387. Resource Manager crashes with NPE due to lack of synchronization (Mit Desai via jlowe) diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/hamlet/Hamlet.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/hamlet/Hamlet.java index 7076c9afaca..83fa5dafa8f 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/hamlet/Hamlet.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/hamlet/Hamlet.java @@ -2423,10 +2423,10 @@ public class Hamlet extends HamletImpl implements HamletSpec._Html { } private TH th_(T e, boolean inline) { - return new TH("th", e, opt(false, inline, false)); } + return new TH("th", e, opt(true, inline, false)); } private TD td_(T e, boolean inline) { - return new TD("td", e, opt(false, inline, false)); } + return new TD("td", e, opt(true, inline, false)); } public class COL extends EImp implements HamletSpec.COL { public COL(String name, T parent, EnumSet opts) { @@ -3719,10 +3719,10 @@ public class Hamlet extends HamletImpl implements HamletSpec._Html { return new COLGROUP("colgroup", e, opt(false, inline, false)); } private THEAD thead_(T e, boolean inline) { - return new THEAD("thead", e, opt(false, inline, false)); } + return new THEAD("thead", e, opt(true, inline, false)); } private TFOOT tfoot_(T e, boolean inline) { - return new TFOOT("tfoot", e, opt(false, inline, false)); } + return new TFOOT("tfoot", e, opt(true, inline, false)); } private TBODY tbody_(T e, boolean inline) { return new TBODY("tbody", e, opt(true, inline, false)); } @@ -3731,7 +3731,7 @@ public class Hamlet extends HamletImpl implements HamletSpec._Html { return new COL("col", e, opt(false, inline, false)); } private TR tr_(T e, boolean inline) { - return new TR("tr", e, opt(false, inline, false)); } + return new TR("tr", e, opt(true, inline, false)); } public class BUTTON extends EImp implements HamletSpec.BUTTON { public BUTTON(String name, T parent, EnumSet opts) { diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/webapp/hamlet/TestHamlet.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/webapp/hamlet/TestHamlet.java index 1ea8bcf6ba6..d9eaa37b3c3 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/webapp/hamlet/TestHamlet.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/webapp/hamlet/TestHamlet.java @@ -88,8 +88,8 @@ public class TestHamlet { assertEquals(0, h.nestLevel); verify(out).print(""); - verify(out, never()).print(""); - verify(out, never()).print(""); + verify(out, atLeast(1)).print(""); + verify(out, atLeast(1)).print(""); } @Test public void testEnumAttrs() { diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/webapp/view/TestInfoBlock.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/webapp/view/TestInfoBlock.java index 4ec14348e51..da5efbb82fb 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/webapp/view/TestInfoBlock.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/webapp/view/TestInfoBlock.java @@ -68,7 +68,7 @@ public class TestInfoBlock { static { resInfo = new ResponseInfo(); - resInfo._("Single_line_value", "This is one line."); + resInfo._("Multiple_line_value", "This is one line."); resInfo._("Multiple_line_value", "This is first line.\nThis is second line."); } @@ -98,13 +98,14 @@ public class TestInfoBlock { WebAppTests.testBlock(MultilineInfoBlock.class); TestInfoBlock.pw.flush(); String output = TestInfoBlock.sw.toString().replaceAll(" +", " "); - String expectedSinglelineData = String.format("%n" - + " %n Single_line_value%n %n This is one line.%n"); - String expectedMultilineData = String.format("%n" - + " %n Multiple_line_value%n %n
%n" + String expectedMultilineData1 = String.format("%n" + + " %n Multiple_line_value%n %n" + + " %n This is one line.%n %n"); + String expectedMultilineData2 = String.format("%n" + + " %n Multiple_line_value%n %n %n
%n" + " This is first line.%n
%n
%n" + " This is second line.%n
%n"); - assertTrue(output.contains(expectedSinglelineData) && output.contains(expectedMultilineData)); + assertTrue(output.contains(expectedMultilineData1) && output.contains(expectedMultilineData2)); } @Test(timeout=60000L) @@ -115,4 +116,4 @@ public class TestInfoBlock { assertFalse(output.contains("