WritableMD5MD5CRC32CastagnoliFileChecksum, MD5MD5CRC32GzipFileChecksum@LimitedPrivate("HDFS")
@Unstable
public class MD5MD5CRC32FileChecksum
extends FileChecksum
| Modifier and Type | Field | Description |
|---|---|---|
static int |
LENGTH |
| Constructor | Description |
|---|---|
MD5MD5CRC32FileChecksum() |
Same as this(0, 0, null)
|
MD5MD5CRC32FileChecksum(int bytesPerCRC,
long crcPerBlock,
MD5Hash md5) |
Create a MD5FileChecksum.
|
| Modifier and Type | Method | Description |
|---|---|---|
java.lang.String |
getAlgorithmName() |
The checksum algorithm name.
|
byte[] |
getBytes() |
The value of the checksum in bytes.
|
Options.ChecksumOpt |
getChecksumOpt() |
|
DataChecksum.Type |
getCrcType() |
returns the CRC type.
|
static DataChecksum.Type |
getCrcTypeFromAlgorithmName(java.lang.String algorithm) |
|
int |
getLength() |
The length of the checksum in bytes.
|
void |
readFields(java.io.DataInput in) |
Deserialize the fields of this object from
in. |
java.lang.String |
toString() |
|
void |
write(java.io.DataOutput out) |
Serialize the fields of this object to
out. |
equals, hashCodepublic static final int LENGTH
public MD5MD5CRC32FileChecksum()
public MD5MD5CRC32FileChecksum(int bytesPerCRC,
long crcPerBlock,
MD5Hash md5)
bytesPerCRC - bytesPerCRC.crcPerBlock - crcPerBlock.md5 - md5.public java.lang.String getAlgorithmName()
FileChecksumgetAlgorithmName in class FileChecksumpublic static DataChecksum.Type getCrcTypeFromAlgorithmName(java.lang.String algorithm) throws java.io.IOException
java.io.IOExceptionpublic int getLength()
FileChecksumgetLength in class FileChecksumpublic byte[] getBytes()
FileChecksumgetBytes in class FileChecksumpublic DataChecksum.Type getCrcType()
public Options.ChecksumOpt getChecksumOpt()
getChecksumOpt in class FileChecksumpublic void readFields(java.io.DataInput in)
throws java.io.IOException
Writablein.
For efficiency, implementations should attempt to re-use storage in the existing object where possible.
in - DataInput to deseriablize this object from.java.io.IOException - any other problem for readFields.public void write(java.io.DataOutput out)
throws java.io.IOException
Writableout.out - DataOuput to serialize this object into.java.io.IOException - any other problem for write.public java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2008–2025 Apache Software Foundation. All rights reserved.