You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mapreduce-issues@hadoop.apache.org by "Akira Ajisaka (JIRA)" <ji...@apache.org> on 2017/10/18 02:20:02 UTC

[jira] [Updated] (MAPREDUCE-6972) Enable try-with-resources for RecordReader

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

Akira Ajisaka updated MAPREDUCE-6972:
-------------------------------------
    Hadoop Flags: Reviewed
         Summary: Enable try-with-resources for RecordReader  (was: enable try-with-resources for RecordReader)
     Description: 
{{org.apache.hadoop.mapred.RecordReader}} has a close method; but doesn't implement closeable; it would be nice to add that - it would enable to use:

{code}
try( org.apache.hadoop.mapred.RecordReader<?, ?> recordReader = inputFormat.getRecordReader(... )   ){
 [...]
}
{code}

...supporting t-w-r makes it easier to throw exceptions more safely

  was:

{{org.apache.hadoop.mapred.RecordReader}} has a close method; but doesn't implement closeable; it would be nice to add that - it would enable to use:

{code}
try( org.apache.hadoop.mapred.RecordReader<?, ?> recordReader = inputFormat.getRecordReader(... )   ){
 [...]
}
{code}

...supporting t-w-r makes it easier to throw exceptions more safely


> Enable try-with-resources for RecordReader
> ------------------------------------------
>
>                 Key: MAPREDUCE-6972
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-6972
>             Project: Hadoop Map/Reduce
>          Issue Type: Improvement
>            Reporter: Zoltan Haindrich
>         Attachments: MAPREDUCE-6972.01.patch, MAPREDUCE-6972.02.patch
>
>
> {{org.apache.hadoop.mapred.RecordReader}} has a close method; but doesn't implement closeable; it would be nice to add that - it would enable to use:
> {code}
> try( org.apache.hadoop.mapred.RecordReader<?, ?> recordReader = inputFormat.getRecordReader(... )   ){
>  [...]
> }
> {code}
> ...supporting t-w-r makes it easier to throw exceptions more safely



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: mapreduce-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: mapreduce-issues-help@hadoop.apache.org