Skip to content
Snippets Groups Projects
Commit 8f00d235 authored by Stephen Haberman's avatar Stephen Haberman
Browse files

Remove NextIterator.close default implementation.

parent 0cf32048
No related branches found
No related tags found
No related merge requests found
......@@ -81,5 +81,9 @@ trait DeserializationStream {
finished = true
}
}
override protected def close() {
DeserializationStream.this.close()
}
}
}
......@@ -22,8 +22,8 @@ private[spark] abstract class NextIterator[U] extends Iterator[U] {
protected def getNext(): U
/**
* Method for subclasses to optionally implement when all elements
* have been successfully iterated, and the iteration is done.
* Method for subclasses to implement when all elements have been successfully
* iterated, and the iteration is done.
*
* <b>Note:</b> `NextIterator` cannot guarantee that `close` will be
* called because it has no control over what happens when an exception
......@@ -32,8 +32,7 @@ private[spark] abstract class NextIterator[U] extends Iterator[U] {
* Ideally you should have another try/catch, as in HadoopRDD, that
* ensures any resources are closed should iteration fail.
*/
protected def close() {
}
protected def close()
override def hasNext: Boolean = {
if (!finished) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment