File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
core/src/main/scala/org/apache/spark/executor Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -248,23 +248,23 @@ case class InputMetrics(readMethod: DataReadMethod.Value) {
248
248
/**
249
249
* Total bytes read.
250
250
*/
251
- private val _bytesRead : AtomicLong = new AtomicLong ()
252
- def bytesRead : Long = _bytesRead.get()
253
- def incBytesRead (bytes : Long ) = _bytesRead.addAndGet( bytes)
251
+ private var _bytesRead : Long = _
252
+ def bytesRead : Long = _bytesRead
253
+ def incBytesRead (bytes : Long ) = _bytesRead += bytes
254
254
255
255
/**
256
256
* Total records read.
257
257
*/
258
- def recordsRead : Long = _recordsRead.get()
259
- private val _recordsRead : AtomicLong = new AtomicLong ()
260
- def incRecordsRead (records : Long ) = _recordsRead.addAndGet( records)
258
+ private var _recordsRead : Long = _
259
+ def recordsRead : Long = _recordsRead
260
+ def incRecordsRead (records : Long ) = _recordsRead += records
261
261
262
262
/**
263
263
* Invoke the bytesReadCallback and mutate bytesRead.
264
264
*/
265
265
def updateBytesRead () {
266
266
bytesReadCallback.foreach { c =>
267
- _bytesRead.set(c() )
267
+ _bytesRead = c( )
268
268
}
269
269
}
270
270
You can’t perform that action at this time.
0 commit comments