Merge r1595413 from trunk: Wrong field is referenced in GetApplicationsRequestPBImpl#mergeLocalToBuilder (Contributed by Hong Zhiguo)
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1595416 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
9c5a2f812e
commit
644743599c
|
@ -216,6 +216,9 @@ Release 2.4.1 - UNRELEASED
|
|||
YARN-2053. Fixed a bug in AMS to not add null NMToken into NMTokens list from
|
||||
previous attempts for work-preserving AM restart. (Wangda Tan via jianhe)
|
||||
|
||||
YARN-2066. Wrong field is referenced in GetApplicationsRequestPBImpl#mergeLocalToBuilder()
|
||||
(Hong Zhiguo via junping_du)
|
||||
|
||||
Release 2.4.0 - 2014-04-07
|
||||
|
||||
INCOMPATIBLE CHANGES
|
||||
|
|
|
@ -127,8 +127,8 @@ public class GetApplicationsRequestPBImpl extends GetApplicationsRequest {
|
|||
}
|
||||
|
||||
if (this.finish != null) {
|
||||
builder.setFinishBegin(start.getMinimumLong());
|
||||
builder.setFinishEnd(start.getMaximumLong());
|
||||
builder.setFinishBegin(finish.getMinimumLong());
|
||||
builder.setFinishEnd(finish.getMaximumLong());
|
||||
}
|
||||
|
||||
builder.setLimit(limit);
|
||||
|
|
|
@ -47,10 +47,12 @@ public class TestGetApplicationsRequest {
|
|||
types.add("type1");
|
||||
request.setApplicationTypes(types);
|
||||
|
||||
long begin = System.currentTimeMillis();
|
||||
long end = System.currentTimeMillis() + 1;
|
||||
request.setStartRange(begin, end);
|
||||
request.setFinishRange(begin, end);
|
||||
long startBegin = System.currentTimeMillis();
|
||||
long startEnd = System.currentTimeMillis() + 1;
|
||||
request.setStartRange(startBegin, startEnd);
|
||||
long finishBegin = System.currentTimeMillis() + 2;
|
||||
long finishEnd = System.currentTimeMillis() + 3;
|
||||
request.setFinishRange(finishBegin, finishEnd);
|
||||
|
||||
long limit = 100L;
|
||||
request.setLimit(limit);
|
||||
|
@ -85,11 +87,11 @@ public class TestGetApplicationsRequest {
|
|||
|
||||
Assert.assertEquals(
|
||||
"StartRange from proto is not the same with original request",
|
||||
requestFromProto.getStartRange(), new LongRange(begin, end));
|
||||
requestFromProto.getStartRange(), new LongRange(startBegin, startEnd));
|
||||
|
||||
Assert.assertEquals(
|
||||
"FinishRange from proto is not the same with original request",
|
||||
requestFromProto.getFinishRange(), new LongRange(begin, end));
|
||||
requestFromProto.getFinishRange(), new LongRange(finishBegin, finishEnd));
|
||||
|
||||
Assert.assertEquals(
|
||||
"Limit from proto is not the same with original request",
|
||||
|
|
Loading…
Reference in New Issue