26
26
import com .google .common .collect .ImmutableList ;
27
27
import com .google .common .collect .ImmutableSet ;
28
28
import com .google .common .util .concurrent .ListenableFuture ;
29
- import io .airlift .units .DataSize ;
30
29
import io .airlift .units .Duration ;
31
30
import org .joda .time .DateTime ;
32
31
43
42
import static com .google .common .collect .Iterables .getFirst ;
44
43
import static com .google .common .collect .Iterables .getLast ;
45
44
import static com .google .common .collect .Iterables .transform ;
46
- import static io .airlift .units .DataSize .Unit .BYTE ;
47
- import static io .airlift .units .DataSize .succinctBytes ;
48
45
import static io .airlift .units .Duration .succinctNanos ;
49
46
import static java .lang .Math .max ;
50
47
import static java .util .Objects .requireNonNull ;
@@ -344,41 +341,41 @@ public DriverStats getDriverStats()
344
341
345
342
List <OperatorStats > operators = ImmutableList .copyOf (transform (operatorContexts , OperatorContext ::getOperatorStats ));
346
343
OperatorStats inputOperator = getFirst (operators , null );
347
- DataSize rawInputDataSize ;
344
+ long rawInputDataSize ;
348
345
long rawInputPositions ;
349
346
Duration rawInputReadTime ;
350
- DataSize processedInputDataSize ;
347
+ long processedInputDataSize ;
351
348
long processedInputPositions ;
352
- DataSize outputDataSize ;
349
+ long outputDataSize ;
353
350
long outputPositions ;
354
351
if (inputOperator != null ) {
355
- rawInputDataSize = inputOperator .getRawInputDataSize ();
352
+ rawInputDataSize = inputOperator .getRawInputDataSizeInBytes ();
356
353
rawInputPositions = inputOperator .getRawInputPositions ();
357
354
rawInputReadTime = inputOperator .getAddInputWall ();
358
355
359
- processedInputDataSize = inputOperator .getInputDataSize ();
356
+ processedInputDataSize = inputOperator .getInputDataSizeInBytes ();
360
357
processedInputPositions = inputOperator .getInputPositions ();
361
358
362
359
OperatorStats outputOperator = requireNonNull (getLast (operators , null ));
363
- outputDataSize = outputOperator .getOutputDataSize ();
360
+ outputDataSize = outputOperator .getOutputDataSizeInBytes ();
364
361
outputPositions = outputOperator .getOutputPositions ();
365
362
}
366
363
else {
367
- rawInputDataSize = new DataSize ( 0 , BYTE ) ;
364
+ rawInputDataSize = 0L ;
368
365
rawInputPositions = 0 ;
369
366
rawInputReadTime = new Duration (0 , MILLISECONDS );
370
367
371
- processedInputDataSize = new DataSize ( 0 , BYTE ) ;
368
+ processedInputDataSize = 0L ;
372
369
processedInputPositions = 0 ;
373
370
374
- outputDataSize = new DataSize ( 0 , BYTE ) ;
371
+ outputDataSize = 0L ;
375
372
outputPositions = 0 ;
376
373
}
377
374
378
375
ImmutableSet .Builder <BlockedReason > builder = ImmutableSet .builder ();
379
376
long physicalWrittenDataSize = 0 ;
380
377
for (OperatorStats operator : operators ) {
381
- physicalWrittenDataSize += operator .getPhysicalWrittenDataSize (). toBytes ();
378
+ physicalWrittenDataSize += operator .getPhysicalWrittenDataSizeInBytes ();
382
379
if (operator .getBlockedReason ().isPresent ()) {
383
380
builder .add (operator .getBlockedReason ().get ());
384
381
}
@@ -392,23 +389,23 @@ public DriverStats getDriverStats()
392
389
executionEndTime ,
393
390
queuedTime .convertToMostSuccinctTimeUnit (),
394
391
elapsedTime .convertToMostSuccinctTimeUnit (),
395
- succinctBytes ( driverMemoryContext .getUserMemory () ),
396
- succinctBytes ( driverMemoryContext .getRevocableMemory () ),
397
- succinctBytes ( driverMemoryContext .getSystemMemory () ),
392
+ driverMemoryContext .getUserMemory (),
393
+ driverMemoryContext .getRevocableMemory (),
394
+ driverMemoryContext .getSystemMemory (),
398
395
succinctNanos (totalScheduledTime ),
399
396
succinctNanos (totalCpuTime ),
400
397
succinctNanos (totalBlockedTime ),
401
398
blockedMonitor != null ,
402
399
builder .build (),
403
- succinctBytes ( totalAllocation ) ,
404
- rawInputDataSize . convertToMostSuccinctDataSize () ,
400
+ totalAllocation ,
401
+ rawInputDataSize ,
405
402
rawInputPositions ,
406
403
rawInputReadTime ,
407
- processedInputDataSize . convertToMostSuccinctDataSize () ,
404
+ processedInputDataSize ,
408
405
processedInputPositions ,
409
- outputDataSize . convertToMostSuccinctDataSize () ,
406
+ outputDataSize ,
410
407
outputPositions ,
411
- succinctBytes ( physicalWrittenDataSize ) ,
408
+ physicalWrittenDataSize ,
412
409
operators );
413
410
}
414
411
0 commit comments