[jira] [Commented] (HADOOP-12604) Exception may be swallowed in KMSClientProvider

2016-01-05 Thread Hudson (JIRA)

[ 
https://issues.apache.org/jira/browse/HADOOP-12604?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15083607#comment-15083607
 ] 

Hudson commented on HADOOP-12604:
-

FAILURE: Integrated in Hadoop-trunk-Commit #9050 (See 
[https://builds.apache.org/job/Hadoop-trunk-Commit/9050/])
HADOOP-12604. Exception may be swallowed in KMSClientProvider. (Yongjun 
(yzhang: rev 28bd138018bea6fc9c3bfb94c7a4143420f02ced)
* 
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/key/kms/KMSClientProvider.java
* hadoop-common-project/hadoop-common/CHANGES.txt


> Exception may be swallowed in KMSClientProvider
> ---
>
> Key: HADOOP-12604
> URL: https://issues.apache.org/jira/browse/HADOOP-12604
> Project: Hadoop Common
>  Issue Type: Bug
>  Components: kms
>Reporter: Yongjun Zhang
>Assignee: Yongjun Zhang
>  Labels: supportability
> Attachments: HADOOP-12604.001.patch, HADOOP-12604.002.patch
>
>
> In KMSClientProvider# createConnection
> {code}
>   try {
> is = conn.getInputStream();
> ret = mapper.readValue(is, klass);
>   } catch (IOException ex) {
> if (is != null) {
>   is.close(); <== close may throw exception
> }
> throw ex;
>   } finally {
> if (is != null) {
>   is.close();
> }
>   }
> }
> {code}
> {{ex}} may be swallowed when {{close}} highlighted in the code throws 
> exception.  Thanks [~qwertymaniac] for pointing this out.
> BTW, I think we should be able to consolidate the two {{is.close()}} in the 
> above code, so we don't close the same stream twice. The one in the {{finally 
> block}} may be called after an exception is thrown or not, and it may throw 
> exception too, we need to be careful not to swallow exception here too.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HADOOP-12604) Exception may be swallowed in KMSClientProvider

2015-12-16 Thread Zhe Zhang (JIRA)

[ 
https://issues.apache.org/jira/browse/HADOOP-12604?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15060634#comment-15060634
 ] 

Zhe Zhang commented on HADOOP-12604:


Thanks Yongjun for the work and Steve for the review.

The latest patch LGTM. +1.

> Exception may be swallowed in KMSClientProvider
> ---
>
> Key: HADOOP-12604
> URL: https://issues.apache.org/jira/browse/HADOOP-12604
> Project: Hadoop Common
>  Issue Type: Bug
>  Components: kms
>Reporter: Yongjun Zhang
>Assignee: Yongjun Zhang
>  Labels: supportability
> Attachments: HADOOP-12604.001.patch, HADOOP-12604.002.patch
>
>
> In KMSClientProvider# createConnection
> {code}
>   try {
> is = conn.getInputStream();
> ret = mapper.readValue(is, klass);
>   } catch (IOException ex) {
> if (is != null) {
>   is.close(); <== close may throw exception
> }
> throw ex;
>   } finally {
> if (is != null) {
>   is.close();
> }
>   }
> }
> {code}
> {{ex}} may be swallowed when {{close}} highlighted in the code throws 
> exception.  Thanks [~qwertymaniac] for pointing this out.
> BTW, I think we should be able to consolidate the two {{is.close()}} in the 
> above code, so we don't close the same stream twice. The one in the {{finally 
> block}} may be called after an exception is thrown or not, and it may throw 
> exception too, we need to be careful not to swallow exception here too.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HADOOP-12604) Exception may be swallowed in KMSClientProvider

2015-12-14 Thread Yongjun Zhang (JIRA)

[ 
https://issues.apache.org/jira/browse/HADOOP-12604?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15057099#comment-15057099
 ] 

Yongjun Zhang commented on HADOOP-12604:


Hi [~steve_l], would you please help taking a look at the latest patch? Thanks 
much.


> Exception may be swallowed in KMSClientProvider
> ---
>
> Key: HADOOP-12604
> URL: https://issues.apache.org/jira/browse/HADOOP-12604
> Project: Hadoop Common
>  Issue Type: Bug
>  Components: kms
>Reporter: Yongjun Zhang
>Assignee: Yongjun Zhang
>  Labels: supportability
> Attachments: HADOOP-12604.001.patch, HADOOP-12604.002.patch
>
>
> In KMSClientProvider# createConnection
> {code}
>   try {
> is = conn.getInputStream();
> ret = mapper.readValue(is, klass);
>   } catch (IOException ex) {
> if (is != null) {
>   is.close(); <== close may throw exception
> }
> throw ex;
>   } finally {
> if (is != null) {
>   is.close();
> }
>   }
> }
> {code}
> {{ex}} may be swallowed when {{close}} highlighted in the code throws 
> exception.  Thanks [~qwertymaniac] for pointing this out.
> BTW, I think we should be able to consolidate the two {{is.close()}} in the 
> above code, so we don't close the same stream twice. The one in the {{finally 
> block}} may be called after an exception is thrown or not, and it may throw 
> exception too, we need to be careful not to swallow exception here too.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HADOOP-12604) Exception may be swallowed in KMSClientProvider

2015-12-08 Thread Yongjun Zhang (JIRA)

[ 
https://issues.apache.org/jira/browse/HADOOP-12604?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15047399#comment-15047399
 ] 

Yongjun Zhang commented on HADOOP-12604:


The failed tests appear irrelevant. Hi [~ste...@apache.org], would you please 
look at the new rev to see if it's good for you? thanks.


> Exception may be swallowed in KMSClientProvider
> ---
>
> Key: HADOOP-12604
> URL: https://issues.apache.org/jira/browse/HADOOP-12604
> Project: Hadoop Common
>  Issue Type: Bug
>  Components: kms
>Reporter: Yongjun Zhang
>Assignee: Yongjun Zhang
>  Labels: supportability
> Attachments: HADOOP-12604.001.patch, HADOOP-12604.002.patch
>
>
> In KMSClientProvider# createConnection
> {code}
>   try {
> is = conn.getInputStream();
> ret = mapper.readValue(is, klass);
>   } catch (IOException ex) {
> if (is != null) {
>   is.close(); <== close may throw exception
> }
> throw ex;
>   } finally {
> if (is != null) {
>   is.close();
> }
>   }
> }
> {code}
> {{ex}} may be swallowed when {{close}} highlighted in the code throws 
> exception.  Thanks [~qwertymaniac] for pointing this out.
> BTW, I think we should be able to consolidate the two {{is.close()}} in the 
> above code, so we don't close the same stream twice. The one in the {{finally 
> block}} may be called after an exception is thrown or not, and it may throw 
> exception too, we need to be careful not to swallow exception here too.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HADOOP-12604) Exception may be swallowed in KMSClientProvider

2015-12-07 Thread Hadoop QA (JIRA)

[ 
https://issues.apache.org/jira/browse/HADOOP-12604?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15046184#comment-15046184
 ] 

Hadoop QA commented on HADOOP-12604:


| (x) *{color:red}-1 overall{color}* |
\\
\\
|| Vote || Subsystem || Runtime || Comment ||
| {color:blue}0{color} | {color:blue} reexec {color} | {color:blue} 0m 0s 
{color} | {color:blue} Docker mode activated. {color} |
| {color:green}+1{color} | {color:green} @author {color} | {color:green} 0m 0s 
{color} | {color:green} The patch does not contain any @author tags. {color} |
| {color:red}-1{color} | {color:red} test4tests {color} | {color:red} 0m 0s 
{color} | {color:red} The patch doesn't appear to include any new or modified 
tests. Please justify why no new tests are needed for this patch. Also please 
list what manual steps were performed to verify this patch. {color} |
| {color:green}+1{color} | {color:green} mvninstall {color} | {color:green} 10m 
53s {color} | {color:green} trunk passed {color} |
| {color:green}+1{color} | {color:green} compile {color} | {color:green} 16m 
15s {color} | {color:green} trunk passed with JDK v1.8.0_66 {color} |
| {color:green}+1{color} | {color:green} compile {color} | {color:green} 13m 
41s {color} | {color:green} trunk passed with JDK v1.7.0_91 {color} |
| {color:green}+1{color} | {color:green} checkstyle {color} | {color:green} 0m 
21s {color} | {color:green} trunk passed {color} |
| {color:green}+1{color} | {color:green} mvnsite {color} | {color:green} 1m 28s 
{color} | {color:green} trunk passed {color} |
| {color:green}+1{color} | {color:green} mvneclipse {color} | {color:green} 0m 
18s {color} | {color:green} trunk passed {color} |
| {color:green}+1{color} | {color:green} findbugs {color} | {color:green} 2m 
31s {color} | {color:green} trunk passed {color} |
| {color:green}+1{color} | {color:green} javadoc {color} | {color:green} 1m 22s 
{color} | {color:green} trunk passed with JDK v1.8.0_66 {color} |
| {color:green}+1{color} | {color:green} javadoc {color} | {color:green} 1m 28s 
{color} | {color:green} trunk passed with JDK v1.7.0_91 {color} |
| {color:green}+1{color} | {color:green} mvninstall {color} | {color:green} 2m 
2s {color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} compile {color} | {color:green} 14m 
25s {color} | {color:green} the patch passed with JDK v1.8.0_66 {color} |
| {color:green}+1{color} | {color:green} javac {color} | {color:green} 14m 25s 
{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} compile {color} | {color:green} 13m 
41s {color} | {color:green} the patch passed with JDK v1.7.0_91 {color} |
| {color:red}-1{color} | {color:red} javac {color} | {color:red} 35m 30s 
{color} | {color:red} root-jdk1.7.0_91 with JDK v1.7.0_91 generated 1 new 
issues (was 746, now 746). {color} |
| {color:green}+1{color} | {color:green} javac {color} | {color:green} 13m 41s 
{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} checkstyle {color} | {color:green} 0m 
26s {color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} mvnsite {color} | {color:green} 1m 38s 
{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} mvneclipse {color} | {color:green} 0m 
24s {color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} whitespace {color} | {color:green} 0m 
0s {color} | {color:green} Patch has no whitespace issues. {color} |
| {color:green}+1{color} | {color:green} findbugs {color} | {color:green} 3m 
11s {color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} javadoc {color} | {color:green} 1m 46s 
{color} | {color:green} the patch passed with JDK v1.8.0_66 {color} |
| {color:green}+1{color} | {color:green} javadoc {color} | {color:green} 1m 40s 
{color} | {color:green} the patch passed with JDK v1.7.0_91 {color} |
| {color:red}-1{color} | {color:red} unit {color} | {color:red} 11m 7s {color} 
| {color:red} hadoop-common in the patch failed with JDK v1.8.0_66. {color} |
| {color:red}-1{color} | {color:red} unit {color} | {color:red} 10m 19s {color} 
| {color:red} hadoop-common in the patch failed with JDK v1.7.0_91. {color} |
| {color:red}-1{color} | {color:red} asflicense {color} | {color:red} 0m 27s 
{color} | {color:red} Patch generated 3 ASF License warnings. {color} |
| {color:black}{color} | {color:black} {color} | {color:black} 111m 33s {color} 
| {color:black} {color} |
\\
\\
|| Reason || Tests ||
| JDK v1.8.0_66 Failed junit tests | hadoop.fs.TestLocalFsFCStatistics |
|   | hadoop.fs.TestSymlinkLocalFSFileSystem |
|   | hadoop.fs.shell.find.TestPrint0 |
|   | hadoop.test.TestTimedOutTestsListener |
|   | hadoop.fs.shell.find.TestFind |
| JDK v1.7.0_91 Failed junit tests | hadoop.fs.TestLocalFsFCStatistics |
|   | hadoop.fs.shell.find.Te

[jira] [Commented] (HADOOP-12604) Exception may be swallowed in KMSClientProvider

2015-12-07 Thread Steve Loughran (JIRA)

[ 
https://issues.apache.org/jira/browse/HADOOP-12604?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15044801#comment-15044801
 ] 

Steve Loughran commented on HADOOP-12604:
-

* license failure is unrelated
* the javac warning is in KMSClientProvider, but its some existing code 
elsewhere
* can you cut out the {{catch (IOException ex)}} clause entirely, now that all 
it does is rethrow ex?

> Exception may be swallowed in KMSClientProvider
> ---
>
> Key: HADOOP-12604
> URL: https://issues.apache.org/jira/browse/HADOOP-12604
> Project: Hadoop Common
>  Issue Type: Bug
>  Components: kms
>Reporter: Yongjun Zhang
>Assignee: Yongjun Zhang
>  Labels: supportability
> Attachments: HADOOP-12604.001.patch
>
>
> In KMSClientProvider# createConnection
> {code}
>   try {
> is = conn.getInputStream();
> ret = mapper.readValue(is, klass);
>   } catch (IOException ex) {
> if (is != null) {
>   is.close(); <== close may throw exception
> }
> throw ex;
>   } finally {
> if (is != null) {
>   is.close();
> }
>   }
> }
> {code}
> {{ex}} may be swallowed when {{close}} highlighted in the code throws 
> exception.  Thanks [~qwertymaniac] for pointing this out.
> BTW, I think we should be able to consolidate the two {{is.close()}} in the 
> above code, so we don't close the same stream twice. The one in the {{finally 
> block}} may be called after an exception is thrown or not, and it may throw 
> exception too, we need to be careful not to swallow exception here too.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HADOOP-12604) Exception may be swallowed in KMSClientProvider

2015-12-05 Thread Hadoop QA (JIRA)

[ 
https://issues.apache.org/jira/browse/HADOOP-12604?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15042767#comment-15042767
 ] 

Hadoop QA commented on HADOOP-12604:


| (x) *{color:red}-1 overall{color}* |
\\
\\
|| Vote || Subsystem || Runtime || Comment ||
| {color:blue}0{color} | {color:blue} reexec {color} | {color:blue} 0m 0s 
{color} | {color:blue} Docker mode activated. {color} |
| {color:green}+1{color} | {color:green} @author {color} | {color:green} 0m 0s 
{color} | {color:green} The patch does not contain any @author tags. {color} |
| {color:red}-1{color} | {color:red} test4tests {color} | {color:red} 0m 0s 
{color} | {color:red} The patch doesn't appear to include any new or modified 
tests. Please justify why no new tests are needed for this patch. Also please 
list what manual steps were performed to verify this patch. {color} |
| {color:green}+1{color} | {color:green} mvninstall {color} | {color:green} 8m 
26s {color} | {color:green} trunk passed {color} |
| {color:green}+1{color} | {color:green} compile {color} | {color:green} 9m 2s 
{color} | {color:green} trunk passed with JDK v1.8.0_66 {color} |
| {color:green}+1{color} | {color:green} compile {color} | {color:green} 9m 35s 
{color} | {color:green} trunk passed with JDK v1.7.0_85 {color} |
| {color:green}+1{color} | {color:green} checkstyle {color} | {color:green} 0m 
17s {color} | {color:green} trunk passed {color} |
| {color:green}+1{color} | {color:green} mvnsite {color} | {color:green} 1m 7s 
{color} | {color:green} trunk passed {color} |
| {color:green}+1{color} | {color:green} mvneclipse {color} | {color:green} 0m 
15s {color} | {color:green} trunk passed {color} |
| {color:green}+1{color} | {color:green} findbugs {color} | {color:green} 1m 
57s {color} | {color:green} trunk passed {color} |
| {color:green}+1{color} | {color:green} javadoc {color} | {color:green} 1m 0s 
{color} | {color:green} trunk passed with JDK v1.8.0_66 {color} |
| {color:green}+1{color} | {color:green} javadoc {color} | {color:green} 1m 10s 
{color} | {color:green} trunk passed with JDK v1.7.0_85 {color} |
| {color:green}+1{color} | {color:green} mvninstall {color} | {color:green} 1m 
42s {color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} compile {color} | {color:green} 8m 54s 
{color} | {color:green} the patch passed with JDK v1.8.0_66 {color} |
| {color:green}+1{color} | {color:green} javac {color} | {color:green} 8m 54s 
{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} compile {color} | {color:green} 9m 35s 
{color} | {color:green} the patch passed with JDK v1.7.0_85 {color} |
| {color:red}-1{color} | {color:red} javac {color} | {color:red} 24m 18s 
{color} | {color:red} root-jdk1.7.0_85 with JDK v1.7.0_85 generated 1 new 
issues (was 746, now 746). {color} |
| {color:green}+1{color} | {color:green} javac {color} | {color:green} 9m 35s 
{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} checkstyle {color} | {color:green} 0m 
16s {color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} mvnsite {color} | {color:green} 1m 6s 
{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} mvneclipse {color} | {color:green} 0m 
15s {color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} whitespace {color} | {color:green} 0m 
0s {color} | {color:green} Patch has no whitespace issues. {color} |
| {color:green}+1{color} | {color:green} findbugs {color} | {color:green} 2m 
11s {color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} javadoc {color} | {color:green} 0m 59s 
{color} | {color:green} the patch passed with JDK v1.8.0_66 {color} |
| {color:green}+1{color} | {color:green} javadoc {color} | {color:green} 1m 11s 
{color} | {color:green} the patch passed with JDK v1.7.0_85 {color} |
| {color:green}+1{color} | {color:green} unit {color} | {color:green} 7m 42s 
{color} | {color:green} hadoop-common in the patch passed with JDK v1.8.0_66. 
{color} |
| {color:green}+1{color} | {color:green} unit {color} | {color:green} 7m 51s 
{color} | {color:green} hadoop-common in the patch passed with JDK v1.7.0_85. 
{color} |
| {color:red}-1{color} | {color:red} asflicense {color} | {color:red} 0m 16s 
{color} | {color:red} Patch generated 1 ASF License warnings. {color} |
| {color:black}{color} | {color:black} {color} | {color:black} 76m 3s {color} | 
{color:black} {color} |
\\
\\
|| Subsystem || Report/Notes ||
| Docker |  Image:yetus/hadoop:0ca8df7 |
| JIRA Patch URL | 
https://issues.apache.org/jira/secure/attachment/12775926/HADOOP-12604.001.patch
 |
| JIRA Issue | HADOOP-12604 |
| Optional Tests |  asflicense  compile  javac  javadoc  mvninstall  mvnsite  
unit  findbugs  checkstyle  |
| uname | Linux cf9767fbd17f 3.13.0-36-lowlaten

[jira] [Commented] (HADOOP-12604) Exception may be swallowed in KMSClientProvider

2015-11-26 Thread Steve Loughran (JIRA)

[ 
https://issues.apache.org/jira/browse/HADOOP-12604?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15029134#comment-15029134
 ] 

Steve Loughran commented on HADOOP-12604:
-

.. and they should use {{IOUtils.closeStream()}}

> Exception may be swallowed in KMSClientProvider
> ---
>
> Key: HADOOP-12604
> URL: https://issues.apache.org/jira/browse/HADOOP-12604
> Project: Hadoop Common
>  Issue Type: Bug
>  Components: kms
>Reporter: Yongjun Zhang
>Assignee: Yongjun Zhang
>  Labels: supportability
>
> In KMSClientProvider# createConnection
> {code}
>   try {
> is = conn.getInputStream();
> ret = mapper.readValue(is, klass);
>   } catch (IOException ex) {
> if (is != null) {
>   is.close(); <== close may throw exception
> }
> throw ex;
>   } finally {
> if (is != null) {
>   is.close();
> }
>   }
> }
> {code}
> {{ex}} may be swallowed when {{close}} highlighted in the code throws 
> exception.  Thanks [~qwertymaniac] for pointing this out.
> BTW, I think we should be able to consolidate the two {{is.close()}} in the 
> above code, so we don't close the same stream twice. The one in the {{finally 
> block}} may be called after an exception is thrown or not, and it may throw 
> exception too, we need to be careful not to swallow exception here too.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)