You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by Chaoyu Tang <ct...@gmail.com> on 2016/03/16 13:46:32 UTC
Review Request 44910: HIVE-13294: AvroSerde leaks the connection in a
case when reading schema from a url
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/44910/
-----------------------------------------------------------
Review request for hive, Aihua Xu, Szehon Ho, and Yongzhi Chen.
Bugs: HIVE-13294
https://issues.apache.org/jira/browse/HIVE-13294
Repository: hive-git
Description
-------
AvroSerde leaks the connection in a case when reading schema from url:
In
public static Schema determineSchemaOrThrowException
{ ... return AvroSerdeUtils.getSchemaFor(new URL(schemaString).openStream()); ... }
The opened inputStream is never closed.
The patch is to close the inputStream (thus the connection) in finally block
Diffs
-----
serde/src/java/org/apache/hadoop/hive/serde2/avro/AvroSerdeUtils.java 08ae6ef
Diff: https://reviews.apache.org/r/44910/diff/
Testing
-------
precommit test
Thanks,
Chaoyu Tang
Re: Review Request 44910: HIVE-13294: AvroSerde leaks the connection
in a case when reading schema from a url
Posted by Aihua Xu <ax...@cloudera.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/44910/#review123868
-----------------------------------------------------------
serde/src/java/org/apache/hadoop/hive/serde2/avro/AvroSerdeUtils.java (line 276)
<https://reviews.apache.org/r/44910/#comment186156>
nit: typo "//Ignore"
serde/src/java/org/apache/hadoop/hive/serde2/avro/AvroSerdeUtils.java (line 280)
<https://reviews.apache.org/r/44910/#comment186157>
nit: remove the empty space here
- Aihua Xu
On March 16, 2016, 12:46 p.m., Chaoyu Tang wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/44910/
> -----------------------------------------------------------
>
> (Updated March 16, 2016, 12:46 p.m.)
>
>
> Review request for hive, Aihua Xu, Szehon Ho, and Yongzhi Chen.
>
>
> Bugs: HIVE-13294
> https://issues.apache.org/jira/browse/HIVE-13294
>
>
> Repository: hive-git
>
>
> Description
> -------
>
> AvroSerde leaks the connection in a case when reading schema from url:
> In
> public static Schema determineSchemaOrThrowException
> { ... return AvroSerdeUtils.getSchemaFor(new URL(schemaString).openStream()); ... }
>
> The opened inputStream is never closed.
>
> The patch is to close the inputStream (thus the connection) in finally block
>
>
> Diffs
> -----
>
> serde/src/java/org/apache/hadoop/hive/serde2/avro/AvroSerdeUtils.java 08ae6ef
>
> Diff: https://reviews.apache.org/r/44910/diff/
>
>
> Testing
> -------
>
> precommit test
>
>
> Thanks,
>
> Chaoyu Tang
>
>
Re: Review Request 44910: HIVE-13294: AvroSerde leaks the connection
in a case when reading schema from a url
Posted by Chaoyu Tang <ct...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/44910/
-----------------------------------------------------------
(Updated March 16, 2016, 5:14 p.m.)
Review request for hive, Aihua Xu, Szehon Ho, and Yongzhi Chen.
Changes
-------
uploaded a new patch with fix to the typo and empty space. Thanks
Bugs: HIVE-13294
https://issues.apache.org/jira/browse/HIVE-13294
Repository: hive-git
Description
-------
AvroSerde leaks the connection in a case when reading schema from url:
In
public static Schema determineSchemaOrThrowException
{ ... return AvroSerdeUtils.getSchemaFor(new URL(schemaString).openStream()); ... }
The opened inputStream is never closed.
The patch is to close the inputStream (thus the connection) in finally block
Diffs (updated)
-----
serde/src/java/org/apache/hadoop/hive/serde2/avro/AvroSerdeUtils.java 08ae6ef
Diff: https://reviews.apache.org/r/44910/diff/
Testing
-------
precommit test
Thanks,
Chaoyu Tang