[jira] [Updated] (HIVE-7862) close of InputStream in Utils#copyToZipStream() should be placed in finally block

2016-02-02 Thread Ted Yu (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-7862?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ted Yu updated HIVE-7862:
-
Attachment: HIVE-7862.1.patch

> close of InputStream in Utils#copyToZipStream() should be placed in finally 
> block
> -
>
> Key: HIVE-7862
> URL: https://issues.apache.org/jira/browse/HIVE-7862
> Project: Hive
>  Issue Type: Bug
>Affects Versions: 0.13.0
>Reporter: Ted Yu
>Assignee: skrho
>Priority: Minor
>  Labels: patch
> Attachments: HIVE-7862.1.patch, HIVE-7862.1.patch, HIVE-7862_001.txt
>
>
> In accumulo-handler/src/java/org/apache/hadoop/hive/accumulo/Utils.java , 
> line 278 :
> {code}
>   private static void copyToZipStream(InputStream is, ZipEntry entry, 
> ZipOutputStream zos)
>   throws IOException {
> zos.putNextEntry(entry);
> byte[] arr = new byte[4096];
> int read = is.read(arr);
> while (read > -1) {
>   zos.write(arr, 0, read);
>   read = is.read(arr);
> }
> is.close();
> {code}
> If read() throws IOException, is would be left unclosed.



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


[jira] [Updated] (HIVE-7862) close of InputStream in Utils#copyToZipStream() should be placed in finally block

2015-12-15 Thread Ted Yu (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-7862?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ted Yu updated HIVE-7862:
-
Attachment: HIVE-7862.1.patch

> close of InputStream in Utils#copyToZipStream() should be placed in finally 
> block
> -
>
> Key: HIVE-7862
> URL: https://issues.apache.org/jira/browse/HIVE-7862
> Project: Hive
>  Issue Type: Bug
>Affects Versions: 0.13.0
>Reporter: Ted Yu
>Assignee: skrho
>Priority: Minor
>  Labels: patch
> Attachments: HIVE-7862.1.patch, HIVE-7862_001.txt
>
>
> In accumulo-handler/src/java/org/apache/hadoop/hive/accumulo/Utils.java , 
> line 278 :
> {code}
>   private static void copyToZipStream(InputStream is, ZipEntry entry, 
> ZipOutputStream zos)
>   throws IOException {
> zos.putNextEntry(entry);
> byte[] arr = new byte[4096];
> int read = is.read(arr);
> while (read > -1) {
>   zos.write(arr, 0, read);
>   read = is.read(arr);
> }
> is.close();
> {code}
> If read() throws IOException, is would be left unclosed.



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


[jira] [Updated] (HIVE-7862) close of InputStream in Utils#copyToZipStream() should be placed in finally block

2015-10-25 Thread Ted Yu (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-7862?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ted Yu updated HIVE-7862:
-
Description: 
In accumulo-handler/src/java/org/apache/hadoop/hive/accumulo/Utils.java , line 
278 :
{code}
  private static void copyToZipStream(InputStream is, ZipEntry entry, 
ZipOutputStream zos)
  throws IOException {
zos.putNextEntry(entry);
byte[] arr = new byte[4096];
int read = is.read(arr);
while (read > -1) {
  zos.write(arr, 0, read);
  read = is.read(arr);
}
is.close();
{code}
If read() throws IOException, is would be left unclosed.

  was:
In accumulo-handler/src/java/org/apache/hadoop/hive/accumulo/Utils.java , line 
278 :
{code}
  private static void copyToZipStream(InputStream is, ZipEntry entry, 
ZipOutputStream zos)
  throws IOException {
zos.putNextEntry(entry);
byte[] arr = new byte[4096];
int read = is.read(arr);
while (read > -1) {
  zos.write(arr, 0, read);
  read = is.read(arr);
}
is.close();
{code}

If read() throws IOException, is would be left unclosed.


> close of InputStream in Utils#copyToZipStream() should be placed in finally 
> block
> -
>
> Key: HIVE-7862
> URL: https://issues.apache.org/jira/browse/HIVE-7862
> Project: Hive
>  Issue Type: Bug
>Affects Versions: 0.13.0
>Reporter: Ted Yu
>Assignee: skrho
>Priority: Minor
>  Labels: patch
> Attachments: HIVE-7862_001.txt
>
>
> In accumulo-handler/src/java/org/apache/hadoop/hive/accumulo/Utils.java , 
> line 278 :
> {code}
>   private static void copyToZipStream(InputStream is, ZipEntry entry, 
> ZipOutputStream zos)
>   throws IOException {
> zos.putNextEntry(entry);
> byte[] arr = new byte[4096];
> int read = is.read(arr);
> while (read > -1) {
>   zos.write(arr, 0, read);
>   read = is.read(arr);
> }
> is.close();
> {code}
> If read() throws IOException, is would be left unclosed.



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


[jira] [Updated] (HIVE-7862) close of InputStream in Utils#copyToZipStream() should be placed in finally block

2015-10-18 Thread Ted Yu (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-7862?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ted Yu updated HIVE-7862:
-
Description: 
In accumulo-handler/src/java/org/apache/hadoop/hive/accumulo/Utils.java , line 
278 :
{code}
  private static void copyToZipStream(InputStream is, ZipEntry entry, 
ZipOutputStream zos)
  throws IOException {
zos.putNextEntry(entry);
byte[] arr = new byte[4096];
int read = is.read(arr);
while (read > -1) {
  zos.write(arr, 0, read);
  read = is.read(arr);
}
is.close();
{code}

If read() throws IOException, is would be left unclosed.

  was:
In accumulo-handler/src/java/org/apache/hadoop/hive/accumulo/Utils.java , line 
278 :
{code}
  private static void copyToZipStream(InputStream is, ZipEntry entry, 
ZipOutputStream zos)
  throws IOException {
zos.putNextEntry(entry);
byte[] arr = new byte[4096];
int read = is.read(arr);
while (read > -1) {
  zos.write(arr, 0, read);
  read = is.read(arr);
}
is.close();
{code}
If read() throws IOException, is would be left unclosed.


> close of InputStream in Utils#copyToZipStream() should be placed in finally 
> block
> -
>
> Key: HIVE-7862
> URL: https://issues.apache.org/jira/browse/HIVE-7862
> Project: Hive
>  Issue Type: Bug
>Affects Versions: 0.13.0
>Reporter: Ted Yu
>Assignee: skrho
>Priority: Minor
>  Labels: patch
> Attachments: HIVE-7862_001.txt
>
>
> In accumulo-handler/src/java/org/apache/hadoop/hive/accumulo/Utils.java , 
> line 278 :
> {code}
>   private static void copyToZipStream(InputStream is, ZipEntry entry, 
> ZipOutputStream zos)
>   throws IOException {
> zos.putNextEntry(entry);
> byte[] arr = new byte[4096];
> int read = is.read(arr);
> while (read > -1) {
>   zos.write(arr, 0, read);
>   read = is.read(arr);
> }
> is.close();
> {code}
> If read() throws IOException, is would be left unclosed.



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