Package org.apache.hadoop.fs
Class CompositeCrcFileChecksum
java.lang.Object
org.apache.hadoop.fs.FileChecksum
org.apache.hadoop.fs.CompositeCrcFileChecksum
- All Implemented Interfaces:
Writable
Composite CRC.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCompositeCrcFileChecksum(int crc, DataChecksum.Type crcType, int bytesPerCrc) Create a CompositeCrcFileChecksum. -
Method Summary
Modifier and TypeMethodDescriptionThe checksum algorithm name.byte[]getBytes()The value of the checksum in bytes.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
-
CompositeCrcFileChecksum
Create a CompositeCrcFileChecksum.- Parameters:
crc- crc.crcType- crcType.bytesPerCrc- bytesPerCrc.
-
-
Method Details
-
getAlgorithmName
Description copied from class:FileChecksumThe checksum algorithm name.- Specified by:
getAlgorithmNamein classFileChecksum- Returns:
- algorithm name.
-
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.
-
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
-