[ https://issues.apache.org/jira/browse/SPARK-35029?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Hyukjin Kwon resolved SPARK-35029. ---------------------------------- Fix Version/s: 3.2.0 Resolution: Fixed Issue resolved by pull request 32130 [https://github.com/apache/spark/pull/32130] > Extract a new method to eliminate duplicate code in > `BufferReleasingInputStream` > -------------------------------------------------------------------------------- > > Key: SPARK-35029 > URL: https://issues.apache.org/jira/browse/SPARK-35029 > Project: Spark > Issue Type: Improvement > Components: Spark Core > Affects Versions: 3.2.0 > Reporter: Yang Jie > Assignee: Yang Jie > Priority: Minor > Fix For: 3.2.0 > > > There are some duplicate code patterns in `BufferReleasingInputStream`, such > as > > {code:java} > override def read(): Int = { > try { > delegate.read() > } catch { > case e: IOException if detectCorruption => > IOUtils.closeQuietly(this) > iterator.throwFetchFailedException(blockId, mapIndex, address, e) > } > } > {code} > , > > {code:java} > override def read(b: Array[Byte]): Int = { > try { > delegate.read(b) > } catch { > case e: IOException if detectCorruption => > IOUtils.closeQuietly(this) > iterator.throwFetchFailedException(blockId, mapIndex, address, e) > } > } > {code} > > and > > {code:java} > override def read(b: Array[Byte], off: Int, len: Int): Int = { > try { > delegate.read(b, off, len) > } catch { > case e: IOException if detectCorruption => > IOUtils.closeQuietly(this) > iterator.throwFetchFailedException(blockId, mapIndex, address, e) > } > } > {code} > > -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org