File tree 1 file changed +27
-2
lines changed
hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/webapp
1 file changed +27
-2
lines changed Original file line number Diff line number Diff line change 22
22
import static org .apache .hadoop .yarn .webapp .view .JQueryUI ._TH ;
23
23
24
24
import java .io .IOException ;
25
+ import java .io .UnsupportedEncodingException ;
26
+ import java .net .URLDecoder ;
25
27
26
28
import org .apache .hadoop .fs .Path ;
27
29
import org .apache .hadoop .mapreduce .v2 .api .records .JobId ;
@@ -48,6 +50,20 @@ public class ConfBlock extends HtmlBlock {
48
50
appContext = appctx ;
49
51
}
50
52
53
+ /**
54
+ * To URLDecode the string value for URLEncoded data.
55
+ * @param value string data to be decoded
56
+ * @return value data after decoded
57
+ * @throws UnsupportedEncodingException if empty string or unsupported enc parameter.
58
+ */
59
+ private String urlDecode (String value ){
60
+ try {
61
+ return URLDecoder .decode (value , "UTF-8" );
62
+ } catch (UnsupportedEncodingException e ) {
63
+ return value ;
64
+ }
65
+ }
66
+
51
67
/*
52
68
* (non-Javadoc)
53
69
* @see org.apache.hadoop.yarn.webapp.view.HtmlBlock#render(org.apache.hadoop.yarn.webapp.view.HtmlBlock.Block)
@@ -95,12 +111,21 @@ public class ConfBlock extends HtmlBlock {
95
111
first = false ;
96
112
buffer .append (sources [i ]);
97
113
}
98
- tbody .
99
- tr ().
114
+ if ( entry .getName ().equals ("hive.query.string" )){
115
+ tbody .
116
+ tr ().
117
+ td (entry .getName ()).
118
+ td (urlDecode (entry .getValue ())).
119
+ td (buffer .toString ()).
120
+ __ ();
121
+ }else {
122
+ tbody .
123
+ tr ().
100
124
td (entry .getName ()).
101
125
td (entry .getValue ()).
102
126
td (buffer .toString ()).
103
127
__ ();
128
+ }
104
129
}
105
130
tbody .__ ().
106
131
tfoot ().
You can’t perform that action at this time.
0 commit comments