Package org.apache.hadoop.fs
Class MD5MD5CRC32FileChecksum
java.lang.Object
org.apache.hadoop.fs.FileChecksum
org.apache.hadoop.fs.MD5MD5CRC32FileChecksum
- All Implemented Interfaces:
Writable
- Direct Known Subclasses:
MD5MD5CRC32CastagnoliFileChecksum,MD5MD5CRC32GzipFileChecksum
MD5 of MD5 of CRC32.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSame as this(0, 0, null)MD5MD5CRC32FileChecksum(int bytesPerCRC, long crcPerBlock, MD5Hash md5) Create a MD5FileChecksum. -
Method Summary
Modifier and TypeMethodDescriptionThe checksum algorithm name.byte[]getBytes()The value of the checksum in bytes.returns the CRC type.static DataChecksum.TypegetCrcTypeFromAlgorithmName(String algorithm) intThe length of the checksum in bytes.voidreadFields(DataInput in) Deserialize the fields of this object fromin.toString()voidwrite(DataOutput out) Serialize the fields of this object toout.Methods inherited from class org.apache.hadoop.fs.FileChecksum
equals, hashCode
-
Field Details
-
LENGTH
public static final int LENGTH- See Also:
-
-
Constructor Details
-
MD5MD5CRC32FileChecksum
public MD5MD5CRC32FileChecksum()Same as this(0, 0, null) -
MD5MD5CRC32FileChecksum
Create a MD5FileChecksum.- Parameters:
bytesPerCRC- bytesPerCRC.crcPerBlock- crcPerBlock.md5- md5.
-
-
Method Details
-
getAlgorithmName
Description copied from class:FileChecksumThe checksum algorithm name.- Specified by:
getAlgorithmNamein classFileChecksum- Returns:
- algorithm name.
-
getCrcTypeFromAlgorithmName
- Throws:
IOException
-
getLength
public int getLength()Description copied from class:FileChecksumThe length of the checksum in bytes.- Specified by:
getLengthin classFileChecksum- Returns:
- length.
-
getBytes
public byte[] getBytes()Description copied from class:FileChecksumThe value of the checksum in bytes.- Specified by:
getBytesin classFileChecksum- Returns:
- byte array.
-
getCrcType
returns the CRC type.- Returns:
- data check sum type.
-
getChecksumOpt
- Overrides:
getChecksumOptin classFileChecksum
-
readFields
Description copied from interface:WritableDeserialize the fields of this object fromin.For efficiency, implementations should attempt to re-use storage in the existing object where possible.
- Parameters:
in-DataInputto deseriablize this object from.- Throws:
IOException- any other problem for readFields.
-
write
Description copied from interface:WritableSerialize the fields of this object toout.- Parameters:
out-DataOuputto serialize this object into.- Throws:
IOException- any other problem for write.
-
toString
-