java.lang.Comparable<FsVolumeSpi.ScanInfo>public static class FsVolumeSpi.ScanInfo extends java.lang.Object implements java.lang.Comparable<FsVolumeSpi.ScanInfo>
| Constructor | Description |
|---|---|
ScanInfo(long blockId,
java.io.File basePath,
java.lang.String blockFile,
java.lang.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 | Description |
|---|---|---|
int |
compareTo(FsVolumeSpi.ScanInfo b) |
|
boolean |
equals(java.lang.Object o) |
|
java.io.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() |
|
java.io.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,
java.io.File basePath,
java.lang.String blockFile,
java.lang.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 java.io.File getBlockFile()
public long getBlockLength()
public java.io.File getMetaFile()
public long getBlockId()
public FsVolumeSpi getVolume()
public int compareTo(FsVolumeSpi.ScanInfo b)
compareTo in interface java.lang.Comparable<FsVolumeSpi.ScanInfo>public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic long getGenStamp()
public FileRegion getFileRegion()
Copyright © 2008–2025 Apache Software Foundation. All rights reserved.