Github user chenghao-intel commented on a diff in the pull request:
https://github.com/apache/spark/pull/6882#discussion_r33108891
--- Diff: core/src/main/scala/org/apache/spark/util/Utils.scala ---
@@ -2333,3 +2333,36 @@ private[spark] class RedirectThread(
}
}
}
+
+/**
+ * An [[OutputStream]] that will store the last 10 kilobytes (by default)
written to it
+ * in a circular buffer. The current contents of the buffer can be
accessed using
+ * the toString method.
+ */
+private[spark] class CircularBuffer(sizeInByte: Int = 10240) extends
java.io.OutputStream {
+ var pos: Int = 0
+ var buffer = new Array[Int](sizeInByte / 4)
--- End diff --
The `buffer` actually the Array of Int, not array of Byte, that's why I did
this.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]