public static class FsVolumeSpi.ScanInfo extends Object implements Comparable<FsVolumeSpi.ScanInfo>
Constructor and Description |
---|
ScanInfo(long blockId,
File basePath,
String blockFile,
String metaFile,
FsVolumeSpi vol)
Create a ScanInfo object for a block.
|
ScanInfo(long blockId,
FsVolumeSpi vol,
FileRegion fileRegion,
long length)
Create a ScanInfo object for a block.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(FsVolumeSpi.ScanInfo b) |
boolean |
equals(Object o) |
File |
getBlockFile()
Returns the block data file.
|
long |
getBlockId()
Returns the block ID.
|
long |
getBlockLength()
Return the length of the data block.
|
FileRegion |
getFileRegion() |
long |
getGenStamp() |
File |
getMetaFile()
Returns the block meta data file or null if there isn't one.
|
FsVolumeSpi |
getVolume()
Returns the volume that contains the block that this object describes.
|
int |
hashCode() |
public ScanInfo(long blockId, File basePath, String blockFile, String metaFile, FsVolumeSpi vol)
blockId
- the block IDbasePath
- The full path to the directory the block is stored inblockFile
- The block filename, with no pathmetaFile
- The meta filename, with no path. If blockFile is not null
then the metaFile and blockFile should have the same
prefix, with the meta file having a suffix like
"_1234.meta". To save memory, if the blockFile is present
we store only the meta file suffix in the objectvol
- the volume that contains the blockpublic ScanInfo(long blockId, FsVolumeSpi vol, FileRegion fileRegion, long length)
blockId
- the block IDvol
- the volume that contains the blockfileRegion
- the file region (for provided blocks)length
- the length of the block datapublic File getBlockFile()
public long getBlockLength()
public File getMetaFile()
public long getBlockId()
public FsVolumeSpi getVolume()
public int compareTo(FsVolumeSpi.ScanInfo b)
compareTo
in interface Comparable<FsVolumeSpi.ScanInfo>
public long getGenStamp()
public FileRegion getFileRegion()
Copyright © 2008–2022 Apache Software Foundation. All rights reserved.