Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import java.io._
import java.net.URI
import java.nio.charset.StandardCharsets

import org.apache.commons.compress.utils.CountingOutputStream
import org.apache.commons.io.output.CountingOutputStream
import org.apache.hadoop.conf.Configuration
import org.apache.hadoop.fs.{FileStatus, FileSystem, FSDataOutputStream, Path}
import org.apache.hadoop.fs.permission.FsPermission
Expand Down Expand Up @@ -330,7 +330,7 @@ class RollingEventLogFilesWriter(

override def writeEvent(eventJson: String, flushLogger: Boolean = false): Unit = {
writer.foreach { w =>
val currentLen = countingOutputStream.get.getBytesWritten
val currentLen = countingOutputStream.get.getByteCount
if (currentLen + eventJson.length > eventFileMaxLength) {
rollEventLogFile()
}
Expand Down