[jira] [Commented] (YARN-2103) Inconsistency between viaProto flag and initial value of SerializedExceptionProto.Builder

2014-06-03 Thread Hudson (JIRA)

[ 
https://issues.apache.org/jira/browse/YARN-2103?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14016807#comment-14016807
 ] 

Hudson commented on YARN-2103:
--

FAILURE: Integrated in Hadoop-Mapreduce-trunk #1790 (See 
[https://builds.apache.org/job/Hadoop-Mapreduce-trunk/1790/])
YARN-2103. Inconsistency between viaProto flag and initial value of 
SerializedExceptionProto.Builder (Contributed by Binglin Chang) (junping_du: 
http://svn.apache.org/viewcvs.cgi/?root=Apache-SVNview=revrev=1599115)
* /hadoop/common/trunk/hadoop-yarn-project/CHANGES.txt
* 
/hadoop/common/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/SerializedExceptionPBImpl.java
* 
/hadoop/common/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/api/records/impl
* 
/hadoop/common/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/api/records/impl/pb
* 
/hadoop/common/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/api/records/impl/pb/TestSerializedExceptionPBImpl.java


 Inconsistency between viaProto flag and initial value of 
 SerializedExceptionProto.Builder
 -

 Key: YARN-2103
 URL: https://issues.apache.org/jira/browse/YARN-2103
 Project: Hadoop YARN
  Issue Type: Bug
Reporter: Binglin Chang
Assignee: Binglin Chang
 Fix For: 2.5.0

 Attachments: YARN-2103.v1.patch, YARN-2103.v2.patch, 
 YARN-2103.v3.patch


 Bug 1:
 {code}
   SerializedExceptionProto proto = SerializedExceptionProto
   .getDefaultInstance();
   SerializedExceptionProto.Builder builder = null;
   boolean viaProto = false;
 {code}
 Since viaProto is false, we should initiate build rather than proto
 Bug 2:
 the class does not provide hashcode() and equals() like other PBImpl records, 
 this class is used in other records, it may affect other records' behavior. 



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (YARN-2103) Inconsistency between viaProto flag and initial value of SerializedExceptionProto.Builder

2014-06-02 Thread Hudson (JIRA)

[ 
https://issues.apache.org/jira/browse/YARN-2103?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14015275#comment-14015275
 ] 

Hudson commented on YARN-2103:
--

SUCCESS: Integrated in Hadoop-trunk-Commit #5642 (See 
[https://builds.apache.org/job/Hadoop-trunk-Commit/5642/])
YARN-2103. Inconsistency between viaProto flag and initial value of 
SerializedExceptionProto.Builder (Contributed by Binglin Chang) (junping_du: 
http://svn.apache.org/viewcvs.cgi/?root=Apache-SVNview=revrev=1599115)
* /hadoop/common/trunk/hadoop-yarn-project/CHANGES.txt
* 
/hadoop/common/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/SerializedExceptionPBImpl.java
* 
/hadoop/common/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/api/records/impl
* 
/hadoop/common/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/api/records/impl/pb
* 
/hadoop/common/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/api/records/impl/pb/TestSerializedExceptionPBImpl.java


 Inconsistency between viaProto flag and initial value of 
 SerializedExceptionProto.Builder
 -

 Key: YARN-2103
 URL: https://issues.apache.org/jira/browse/YARN-2103
 Project: Hadoop YARN
  Issue Type: Bug
Reporter: Binglin Chang
Assignee: Binglin Chang
 Fix For: 2.5.0

 Attachments: YARN-2103.v1.patch, YARN-2103.v2.patch, 
 YARN-2103.v3.patch


 Bug 1:
 {code}
   SerializedExceptionProto proto = SerializedExceptionProto
   .getDefaultInstance();
   SerializedExceptionProto.Builder builder = null;
   boolean viaProto = false;
 {code}
 Since viaProto is false, we should initiate build rather than proto
 Bug 2:
 the class does not provide hashcode() and equals() like other PBImpl records, 
 this class is used in other records, it may affect other records' behavior. 



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (YARN-2103) Inconsistency between viaProto flag and initial value of SerializedExceptionProto.Builder

2014-06-02 Thread Hudson (JIRA)

[ 
https://issues.apache.org/jira/browse/YARN-2103?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14015334#comment-14015334
 ] 

Hudson commented on YARN-2103:
--

FAILURE: Integrated in Hadoop-Yarn-trunk #571 (See 
[https://builds.apache.org/job/Hadoop-Yarn-trunk/571/])
YARN-2103. Inconsistency between viaProto flag and initial value of 
SerializedExceptionProto.Builder (Contributed by Binglin Chang) (junping_du: 
http://svn.apache.org/viewcvs.cgi/?root=Apache-SVNview=revrev=1599115)
* /hadoop/common/trunk/hadoop-yarn-project/CHANGES.txt
* 
/hadoop/common/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/SerializedExceptionPBImpl.java
* 
/hadoop/common/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/api/records/impl
* 
/hadoop/common/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/api/records/impl/pb
* 
/hadoop/common/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/api/records/impl/pb/TestSerializedExceptionPBImpl.java


 Inconsistency between viaProto flag and initial value of 
 SerializedExceptionProto.Builder
 -

 Key: YARN-2103
 URL: https://issues.apache.org/jira/browse/YARN-2103
 Project: Hadoop YARN
  Issue Type: Bug
Reporter: Binglin Chang
Assignee: Binglin Chang
 Fix For: 2.5.0

 Attachments: YARN-2103.v1.patch, YARN-2103.v2.patch, 
 YARN-2103.v3.patch


 Bug 1:
 {code}
   SerializedExceptionProto proto = SerializedExceptionProto
   .getDefaultInstance();
   SerializedExceptionProto.Builder builder = null;
   boolean viaProto = false;
 {code}
 Since viaProto is false, we should initiate build rather than proto
 Bug 2:
 the class does not provide hashcode() and equals() like other PBImpl records, 
 this class is used in other records, it may affect other records' behavior. 



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (YARN-2103) Inconsistency between viaProto flag and initial value of SerializedExceptionProto.Builder

2014-06-02 Thread Hudson (JIRA)

[ 
https://issues.apache.org/jira/browse/YARN-2103?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14015407#comment-14015407
 ] 

Hudson commented on YARN-2103:
--

SUCCESS: Integrated in Hadoop-Hdfs-trunk #1762 (See 
[https://builds.apache.org/job/Hadoop-Hdfs-trunk/1762/])
YARN-2103. Inconsistency between viaProto flag and initial value of 
SerializedExceptionProto.Builder (Contributed by Binglin Chang) (junping_du: 
http://svn.apache.org/viewcvs.cgi/?root=Apache-SVNview=revrev=1599115)
* /hadoop/common/trunk/hadoop-yarn-project/CHANGES.txt
* 
/hadoop/common/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/SerializedExceptionPBImpl.java
* 
/hadoop/common/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/api/records/impl
* 
/hadoop/common/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/api/records/impl/pb
* 
/hadoop/common/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/api/records/impl/pb/TestSerializedExceptionPBImpl.java


 Inconsistency between viaProto flag and initial value of 
 SerializedExceptionProto.Builder
 -

 Key: YARN-2103
 URL: https://issues.apache.org/jira/browse/YARN-2103
 Project: Hadoop YARN
  Issue Type: Bug
Reporter: Binglin Chang
Assignee: Binglin Chang
 Fix For: 2.5.0

 Attachments: YARN-2103.v1.patch, YARN-2103.v2.patch, 
 YARN-2103.v3.patch


 Bug 1:
 {code}
   SerializedExceptionProto proto = SerializedExceptionProto
   .getDefaultInstance();
   SerializedExceptionProto.Builder builder = null;
   boolean viaProto = false;
 {code}
 Since viaProto is false, we should initiate build rather than proto
 Bug 2:
 the class does not provide hashcode() and equals() like other PBImpl records, 
 this class is used in other records, it may affect other records' behavior. 



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (YARN-2103) Inconsistency between viaProto flag and initial value of SerializedExceptionProto.Builder

2014-06-02 Thread Tsuyoshi OZAWA (JIRA)

[ 
https://issues.apache.org/jira/browse/YARN-2103?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14015414#comment-14015414
 ] 

Tsuyoshi OZAWA commented on YARN-2103:
--

Thanks and good job, [~decster], and thanks you for committing and review, 
[~djp]!

 Inconsistency between viaProto flag and initial value of 
 SerializedExceptionProto.Builder
 -

 Key: YARN-2103
 URL: https://issues.apache.org/jira/browse/YARN-2103
 Project: Hadoop YARN
  Issue Type: Bug
Reporter: Binglin Chang
Assignee: Binglin Chang
 Fix For: 2.5.0

 Attachments: YARN-2103.v1.patch, YARN-2103.v2.patch, 
 YARN-2103.v3.patch


 Bug 1:
 {code}
   SerializedExceptionProto proto = SerializedExceptionProto
   .getDefaultInstance();
   SerializedExceptionProto.Builder builder = null;
   boolean viaProto = false;
 {code}
 Since viaProto is false, we should initiate build rather than proto
 Bug 2:
 the class does not provide hashcode() and equals() like other PBImpl records, 
 this class is used in other records, it may affect other records' behavior. 



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (YARN-2103) Inconsistency between viaProto flag and initial value of SerializedExceptionProto.Builder

2014-06-02 Thread Hudson (JIRA)

[ 
https://issues.apache.org/jira/browse/YARN-2103?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14015456#comment-14015456
 ] 

Hudson commented on YARN-2103:
--

FAILURE: Integrated in Hadoop-Mapreduce-trunk #1789 (See 
[https://builds.apache.org/job/Hadoop-Mapreduce-trunk/1789/])
YARN-2103. Inconsistency between viaProto flag and initial value of 
SerializedExceptionProto.Builder (Contributed by Binglin Chang) (junping_du: 
http://svn.apache.org/viewcvs.cgi/?root=Apache-SVNview=revrev=1599115)
* /hadoop/common/trunk/hadoop-yarn-project/CHANGES.txt
* 
/hadoop/common/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/SerializedExceptionPBImpl.java
* 
/hadoop/common/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/api/records/impl
* 
/hadoop/common/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/api/records/impl/pb
* 
/hadoop/common/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/api/records/impl/pb/TestSerializedExceptionPBImpl.java


 Inconsistency between viaProto flag and initial value of 
 SerializedExceptionProto.Builder
 -

 Key: YARN-2103
 URL: https://issues.apache.org/jira/browse/YARN-2103
 Project: Hadoop YARN
  Issue Type: Bug
Reporter: Binglin Chang
Assignee: Binglin Chang
 Fix For: 2.5.0

 Attachments: YARN-2103.v1.patch, YARN-2103.v2.patch, 
 YARN-2103.v3.patch


 Bug 1:
 {code}
   SerializedExceptionProto proto = SerializedExceptionProto
   .getDefaultInstance();
   SerializedExceptionProto.Builder builder = null;
   boolean viaProto = false;
 {code}
 Since viaProto is false, we should initiate build rather than proto
 Bug 2:
 the class does not provide hashcode() and equals() like other PBImpl records, 
 this class is used in other records, it may affect other records' behavior. 



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (YARN-2103) Inconsistency between viaProto flag and initial value of SerializedExceptionProto.Builder

2014-06-01 Thread Binglin Chang (JIRA)

[ 
https://issues.apache.org/jira/browse/YARN-2103?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14014924#comment-14014924
 ] 

Binglin Chang commented on YARN-2103:
-

Thanks for the view and extra tests, [~ozawa]. I update the patch.

 Inconsistency between viaProto flag and initial value of 
 SerializedExceptionProto.Builder
 -

 Key: YARN-2103
 URL: https://issues.apache.org/jira/browse/YARN-2103
 Project: Hadoop YARN
  Issue Type: Bug
Reporter: Binglin Chang
Assignee: Binglin Chang
 Attachments: YARN-2103.v1.patch, YARN-2103.v2.patch, 
 YARN-2103.v3.patch


 Bug 1:
 {code}
   SerializedExceptionProto proto = SerializedExceptionProto
   .getDefaultInstance();
   SerializedExceptionProto.Builder builder = null;
   boolean viaProto = false;
 {code}
 Since viaProto is false, we should initiate build rather than proto
 Bug 2:
 the class does not provide hashcode() and equals() like other PBImpl records, 
 this class is used in other records, it may affect other records' behavior. 



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (YARN-2103) Inconsistency between viaProto flag and initial value of SerializedExceptionProto.Builder

2014-06-01 Thread Hadoop QA (JIRA)

[ 
https://issues.apache.org/jira/browse/YARN-2103?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14014934#comment-14014934
 ] 

Hadoop QA commented on YARN-2103:
-

{color:green}+1 overall{color}.  Here are the results of testing the latest 
attachment 
  http://issues.apache.org/jira/secure/attachment/12647809/YARN-2103.v3.patch
  against trunk revision .

{color:green}+1 @author{color}.  The patch does not contain any @author 
tags.

{color:green}+1 tests included{color}.  The patch appears to include 1 new 
or modified test files.

{color:green}+1 javac{color}.  The applied patch does not increase the 
total number of javac compiler warnings.

{color:green}+1 javadoc{color}.  There were no new javadoc warning messages.

{color:green}+1 eclipse:eclipse{color}.  The patch built with 
eclipse:eclipse.

{color:green}+1 findbugs{color}.  The patch does not introduce any new 
Findbugs (version 1.3.9) warnings.

{color:green}+1 release audit{color}.  The applied patch does not increase 
the total number of release audit warnings.

{color:green}+1 core tests{color}.  The patch passed unit tests in 
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common.

{color:green}+1 contrib tests{color}.  The patch passed contrib unit tests.

Test results: 
https://builds.apache.org/job/PreCommit-YARN-Build/3881//testReport/
Console output: https://builds.apache.org/job/PreCommit-YARN-Build/3881//console

This message is automatically generated.

 Inconsistency between viaProto flag and initial value of 
 SerializedExceptionProto.Builder
 -

 Key: YARN-2103
 URL: https://issues.apache.org/jira/browse/YARN-2103
 Project: Hadoop YARN
  Issue Type: Bug
Reporter: Binglin Chang
Assignee: Binglin Chang
 Attachments: YARN-2103.v1.patch, YARN-2103.v2.patch, 
 YARN-2103.v3.patch


 Bug 1:
 {code}
   SerializedExceptionProto proto = SerializedExceptionProto
   .getDefaultInstance();
   SerializedExceptionProto.Builder builder = null;
   boolean viaProto = false;
 {code}
 Since viaProto is false, we should initiate build rather than proto
 Bug 2:
 the class does not provide hashcode() and equals() like other PBImpl records, 
 this class is used in other records, it may affect other records' behavior. 



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (YARN-2103) Inconsistency between viaProto flag and initial value of SerializedExceptionProto.Builder

2014-05-30 Thread Tsuyoshi OZAWA (JIRA)

[ 
https://issues.apache.org/jira/browse/YARN-2103?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14014106#comment-14014106
 ] 

Tsuyoshi OZAWA commented on YARN-2103:
--

[~decster], thank you for the update! I think some test cases are missing like 
calling functions before {{init()}} and calling {{deSerialize()}}. Do you mind 
adding these tests to your patch? It covers overall functions in 
SerializedExceptionPBImpl.

{code}
  @Test
  public void testDeserialize() throws Exception {
SerializedExceptionProto defaultProto =
SerializedExceptionProto.newBuilder().build();
Exception ex =  new Exception(test exception);
SerializedExceptionPBImpl pb = new SerializedExceptionPBImpl();

try {
  pb.deSerialize();
  Assert.fail(deSerialze should throw YarnRuntimeException);
} catch (YarnRuntimeException e) {
  Assert.assertEquals(ClassNotFoundException.class,
  e.getCause().getClass());
}

pb.init(ex);
Assert.assertEquals(ex.toString(), pb.deSerialize().toString());
  }

  @Test
  public void testBeforeInit() throws Exception {
SerializedExceptionProto defaultProto =
SerializedExceptionProto.newBuilder().build();

SerializedExceptionPBImpl pb1 = new SerializedExceptionPBImpl();
Assert.assertNull(pb1.getCause());

SerializedExceptionPBImpl pb2 = new SerializedExceptionPBImpl();
Assert.assertEquals(defaultProto, pb2.getProto());

SerializedExceptionPBImpl pb3 = new SerializedExceptionPBImpl();
Assert.assertEquals(defaultProto.getTrace(), pb3.getRemoteTrace());
  }
{code}

 Inconsistency between viaProto flag and initial value of 
 SerializedExceptionProto.Builder
 -

 Key: YARN-2103
 URL: https://issues.apache.org/jira/browse/YARN-2103
 Project: Hadoop YARN
  Issue Type: Bug
Reporter: Binglin Chang
Assignee: Binglin Chang
 Attachments: YARN-2103.v1.patch, YARN-2103.v2.patch


 Bug 1:
 {code}
   SerializedExceptionProto proto = SerializedExceptionProto
   .getDefaultInstance();
   SerializedExceptionProto.Builder builder = null;
   boolean viaProto = false;
 {code}
 Since viaProto is false, we should initiate build rather than proto
 Bug 2:
 the class does not provide hashcode() and equals() like other PBImpl records, 
 this class is used in other records, it may affect other records' behavior. 



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (YARN-2103) Inconsistency between viaProto flag and initial value of SerializedExceptionProto.Builder

2014-05-29 Thread Junping Du (JIRA)

[ 
https://issues.apache.org/jira/browse/YARN-2103?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14012572#comment-14012572
 ] 

Junping Du commented on YARN-2103:
--

Thanks [~decster] for the patch and [~ozawa] for review.
bq. How about adding concrete tests as a first step of generic tests on 
YARN-2051? What do you think, Junping Du?
That sounds good to me. We should add some concrete tests for some highly 
suspected PBImpls as the first step and refactor to/add more generic tests 
later. In this case, the original constructor (the one without parameter) is 
wrong as the object created with viaProto=false and builder to be null at the 
same time. We should add a unit test here. 

On code format, please try to follow our code convention in hadoop wiki - 
Sun/Oracle java programming convention (only difference is using 2 indentations 
instead of 4). In this convention, we have:
{code}
Note: if statements always use braces {}. Avoid the following error-prone form:
if (condition) //AVOID! THIS OMITS THE BRACES {}!
statement;
{code}
So may be we should try to be right for all new added code instead of staying 
the same with legacy code?

 Inconsistency between viaProto flag and initial value of 
 SerializedExceptionProto.Builder
 -

 Key: YARN-2103
 URL: https://issues.apache.org/jira/browse/YARN-2103
 Project: Hadoop YARN
  Issue Type: Bug
Reporter: Binglin Chang
Assignee: Binglin Chang
 Attachments: YARN-2103.v1.patch


 Bug 1:
 {code}
   SerializedExceptionProto proto = SerializedExceptionProto
   .getDefaultInstance();
   SerializedExceptionProto.Builder builder = null;
   boolean viaProto = false;
 {code}
 Since viaProto is false, we should initiate build rather than proto
 Bug 2:
 the class does not provide hashcode() and equals() like other PBImpl records, 
 this class is used in other records, it may affect other records' behavior. 



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (YARN-2103) Inconsistency between viaProto flag and initial value of SerializedExceptionProto.Builder

2014-05-29 Thread Hadoop QA (JIRA)

[ 
https://issues.apache.org/jira/browse/YARN-2103?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14013325#comment-14013325
 ] 

Hadoop QA commented on YARN-2103:
-

{color:green}+1 overall{color}.  Here are the results of testing the latest 
attachment 
  http://issues.apache.org/jira/secure/attachment/12647536/YARN-2103.v2.patch
  against trunk revision .

{color:green}+1 @author{color}.  The patch does not contain any @author 
tags.

{color:green}+1 tests included{color}.  The patch appears to include 1 new 
or modified test files.

{color:green}+1 javac{color}.  The applied patch does not increase the 
total number of javac compiler warnings.

{color:green}+1 javadoc{color}.  There were no new javadoc warning messages.

{color:green}+1 eclipse:eclipse{color}.  The patch built with 
eclipse:eclipse.

{color:green}+1 findbugs{color}.  The patch does not introduce any new 
Findbugs (version 1.3.9) warnings.

{color:green}+1 release audit{color}.  The applied patch does not increase 
the total number of release audit warnings.

{color:green}+1 core tests{color}.  The patch passed unit tests in 
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common.

{color:green}+1 contrib tests{color}.  The patch passed contrib unit tests.

Test results: 
https://builds.apache.org/job/PreCommit-YARN-Build/3864//testReport/
Console output: https://builds.apache.org/job/PreCommit-YARN-Build/3864//console

This message is automatically generated.

 Inconsistency between viaProto flag and initial value of 
 SerializedExceptionProto.Builder
 -

 Key: YARN-2103
 URL: https://issues.apache.org/jira/browse/YARN-2103
 Project: Hadoop YARN
  Issue Type: Bug
Reporter: Binglin Chang
Assignee: Binglin Chang
 Attachments: YARN-2103.v1.patch, YARN-2103.v2.patch


 Bug 1:
 {code}
   SerializedExceptionProto proto = SerializedExceptionProto
   .getDefaultInstance();
   SerializedExceptionProto.Builder builder = null;
   boolean viaProto = false;
 {code}
 Since viaProto is false, we should initiate build rather than proto
 Bug 2:
 the class does not provide hashcode() and equals() like other PBImpl records, 
 this class is used in other records, it may affect other records' behavior. 



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (YARN-2103) Inconsistency between viaProto flag and initial value of SerializedExceptionProto.Builder

2014-05-27 Thread Tsuyoshi OZAWA (JIRA)

[ 
https://issues.apache.org/jira/browse/YARN-2103?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14010438#comment-14010438
 ] 

Tsuyoshi OZAWA commented on YARN-2103:
--

Hi [~decster], thank you for taking this JIRA. I fixed the title of this JIRA. 
Please correct me if I misunderstand what you're trying to solve. I have some 
comments(it's non-binding one):

1. Can we remove {{builder == null}} check if {{builder}} is initialized with 
{{SerializedExceptionProto.newBuilder()}}?
{code}
  private void maybeInitBuilder() {
if (viaProto || builder == null) {
  builder = SerializedExceptionProto.newBuilder(proto);
}
viaProto = false;
  }
{code}

2. Should we use {{else if}} with braces instead of using {{else}} in 
{{equals}} like this?
{code}
public boolean equals(Object other) {
  if (other == null) {
return false;
  } else if (other.getClass().isAssignableFrom(this.getClass())) {
return this.getProto().equals(this.getClass().cast(other).getProto());
  }
  return false;
}
{code}

3. How about adding concrete tests as a first step of generic tests on 
YARN-2051? What do you think, [~djp]?

 Inconsistency between viaProto flag and initial value of 
 SerializedExceptionProto.Builder
 -

 Key: YARN-2103
 URL: https://issues.apache.org/jira/browse/YARN-2103
 Project: Hadoop YARN
  Issue Type: Bug
Reporter: Binglin Chang
Assignee: Binglin Chang
 Attachments: YARN-2103.v1.patch


 {code}
   SerializedExceptionProto proto = SerializedExceptionProto
   .getDefaultInstance();
   SerializedExceptionProto.Builder builder = null;
   boolean viaProto = false;
 {code}
 Since viaProto is false, we should initiate build rather than proto



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (YARN-2103) Inconsistency between viaProto flag and initial value of SerializedExceptionProto.Builder

2014-05-27 Thread Binglin Chang (JIRA)

[ 
https://issues.apache.org/jira/browse/YARN-2103?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14010700#comment-14010700
 ] 

Binglin Chang commented on YARN-2103:
-

Hi [~ozawa], thanks for reviewing the patch and the comments. I use the 
original title because the bug isn't just about inconsistent viaProto, but also 
lack of equals and hashcode method(which will affect other records who uses 
SerializedException), I guess I should point out all bugs in the jira. 

about code format, most PBImpl classes use those common code:
{code}
  private void maybeInitBuilder() {
if (viaProto || builder == null) {
  builder = GetApplicationsRequestProto.newBuilder(proto);
}
viaProto = false;
  }

  @Override
  public int hashCode() {
return getProto().hashCode();
  }

  @Override
  public boolean equals(Object other) {
if (other == null)
  return false;
if (other.getClass().isAssignableFrom(this.getClass())) {
  return this.getProto().equals(this.getClass().cast(other).getProto());
}
return false;
  }

{code}

you can see GetApplicationsRequestPBImpl/GetApplicationsResponsePBImpl,  I just 
follow those patterns, maybe we can change them all in another JIRA, changing 
them may not fit into in this JIRA. 

bq.  How about adding concrete tests as a first step of generic tests on 
YARN-2051. 
After generic test are added, those old tests are probably redundant and can be 
removed. Guess we can discuss this in the future. I can provide a separate test 
currently.



 Inconsistency between viaProto flag and initial value of 
 SerializedExceptionProto.Builder
 -

 Key: YARN-2103
 URL: https://issues.apache.org/jira/browse/YARN-2103
 Project: Hadoop YARN
  Issue Type: Bug
Reporter: Binglin Chang
Assignee: Binglin Chang
 Attachments: YARN-2103.v1.patch


 {code}
   SerializedExceptionProto proto = SerializedExceptionProto
   .getDefaultInstance();
   SerializedExceptionProto.Builder builder = null;
   boolean viaProto = false;
 {code}
 Since viaProto is false, we should initiate build rather than proto



--
This message was sent by Atlassian JIRA
(v6.2#6252)