public static class FileInputFormat.FileBaseStatistics extends Object implements BaseStatistics
Modifier and Type | Field and Description |
---|---|
protected float |
avgBytesPerRecord |
protected long |
fileModTime |
protected long |
fileSize |
AVG_RECORD_BYTES_UNKNOWN, NUM_RECORDS_UNKNOWN, SIZE_UNKNOWN
Constructor and Description |
---|
FileBaseStatistics(long fileModTime,
long fileSize,
float avgBytesPerRecord)
Creates a new statistics object.
|
Modifier and Type | Method and Description |
---|---|
float |
getAverageRecordWidth()
Gets the estimated average number of bytes per record.
|
long |
getLastModificationTime()
Gets the timestamp of the last modification.
|
long |
getNumberOfRecords()
Gets the estimates number of records in the file, computed as the file size divided by
the average record width, rounded up.
|
long |
getTotalInputSize()
Gets the file size.
|
String |
toString() |
protected final long fileModTime
protected final long fileSize
protected final float avgBytesPerRecord
public FileBaseStatistics(long fileModTime, long fileSize, float avgBytesPerRecord)
fileModTime
- The timestamp of the latest modification of any of the involved files.fileSize
- The size of the file, in bytes. -1
, if unknown.avgBytesPerRecord
- The average number of byte in a record, or -1.0f
,
if unknown.public long getLastModificationTime()
public long getTotalInputSize()
getTotalInputSize
in interface BaseStatistics
BaseStatistics.getTotalInputSize()
public long getNumberOfRecords()
getNumberOfRecords
in interface BaseStatistics
BaseStatistics.getNumberOfRecords()
public float getAverageRecordWidth()
getAverageRecordWidth
in interface BaseStatistics
BaseStatistics.getAverageRecordWidth()
Copyright © 2014–2023 The Apache Software Foundation. All rights reserved.