Class MD5MD5CRC32FileChecksum

java.lang.Object
org.apache.hadoop.fs.FileChecksum
org.apache.hadoop.fs.MD5MD5CRC32FileChecksum
All Implemented Interfaces:
Writable
Direct Known Subclasses:
MD5MD5CRC32CastagnoliFileChecksum, MD5MD5CRC32GzipFileChecksum

@LimitedPrivate("HDFS") @Unstable public class MD5MD5CRC32FileChecksum extends FileChecksum
MD5 of MD5 of CRC32.
  • Field Details

  • Constructor Details

    • MD5MD5CRC32FileChecksum

      public MD5MD5CRC32FileChecksum()
      Same as this(0, 0, null)
    • MD5MD5CRC32FileChecksum

      public MD5MD5CRC32FileChecksum(int bytesPerCRC, long crcPerBlock, MD5Hash md5)
      Create a MD5FileChecksum.
      Parameters:
      bytesPerCRC - bytesPerCRC.
      crcPerBlock - crcPerBlock.
      md5 - md5.
  • Method Details

    • getAlgorithmName

      public String getAlgorithmName()
      Description copied from class: FileChecksum
      The checksum algorithm name.
      Specified by:
      getAlgorithmName in class FileChecksum
      Returns:
      algorithm name.
    • getCrcTypeFromAlgorithmName

      public static DataChecksum.Type getCrcTypeFromAlgorithmName(String algorithm) throws IOException
      Throws:
      IOException
    • getLength

      public int getLength()
      Description copied from class: FileChecksum
      The length of the checksum in bytes.
      Specified by:
      getLength in class FileChecksum
      Returns:
      length.
    • getBytes

      public byte[] getBytes()
      Description copied from class: FileChecksum
      The value of the checksum in bytes.
      Specified by:
      getBytes in class FileChecksum
      Returns:
      byte array.
    • getCrcType

      public DataChecksum.Type getCrcType()
      returns the CRC type.
      Returns:
      data check sum type.
    • getChecksumOpt

      public Options.ChecksumOpt getChecksumOpt()
      Overrides:
      getChecksumOpt in class FileChecksum
    • readFields

      public void readFields(DataInput in) throws IOException
      Description copied from interface: Writable
      Deserialize the fields of this object from in.

      For efficiency, implementations should attempt to re-use storage in the existing object where possible.

      Parameters:
      in - DataInput to deseriablize this object from.
      Throws:
      IOException - any other problem for readFields.
    • write

      public void write(DataOutput out) throws IOException
      Description copied from interface: Writable
      Serialize the fields of this object to out.
      Parameters:
      out - DataOuput to serialize this object into.
      Throws:
      IOException - any other problem for write.
    • toString

      public String toString()
      Overrides:
      toString in class Object