Class CompositeCrcFileChecksum

java.lang.Object
org.apache.hadoop.fs.FileChecksum
org.apache.hadoop.fs.CompositeCrcFileChecksum
All Implemented Interfaces:
Writable

@LimitedPrivate("HDFS") @Unstable public class CompositeCrcFileChecksum extends FileChecksum
Composite CRC.
  • Field Details

  • Constructor Details

    • CompositeCrcFileChecksum

      public CompositeCrcFileChecksum(int crc, DataChecksum.Type crcType, int bytesPerCrc)
      Create a CompositeCrcFileChecksum.
      Parameters:
      crc - crc.
      crcType - crcType.
      bytesPerCrc - bytesPerCrc.
  • Method Details

    • getAlgorithmName

      public String getAlgorithmName()
      Description copied from class: FileChecksum
      The checksum algorithm name.
      Specified by:
      getAlgorithmName in class FileChecksum
      Returns:
      algorithm name.
    • 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.
    • 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