StripedBlockChecksumReconstructor (Apache Hadoop HDFS 3.5.0 API)
Description: declaration: package: org.apache.hadoop.hdfs.server.datanode.erasurecode, class: StripedBlockChecksumReconstructor

Package org.apache.hadoop.hdfs.server.datanode.erasurecode

# Class StripedBlockChecksumReconstructor

java.lang.Object
org.apache.hadoop.hdfs.server.datanode.erasurecode.StripedBlockChecksumReconstructor

All Implemented Interfaces:
  `Closeable`, `AutoCloseable`

Direct Known Subclasses:
  `StripedBlockChecksumCompositeCrcReconstructor`, `StripedBlockChecksumMd5CrcReconstructor`

@Private public abstract class StripedBlockChecksumReconstructor extends Object implements Closeable
StripedBlockChecksumReconstructor reconstruct one or more missed striped block in the striped block group, the minimum number of live striped blocks should be no less than data block number. Then checksum will be recalculated using the newly reconstructed block.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected static final org.slf4j.Logger`
  `LOG`

- ## Constructor Summary

  Constructors
  Modifier
  Constructor
  Description
  `protected`
  `StripedBlockChecksumReconstructor(ErasureCodingWorker worker, StripedReconstructionInfo stripedReconInfo, org.apache.hadoop.io.DataOutputBuffer checksumWriter, long requestedBlockLength)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `close()`
  `long`
  `getBytesRead()`
  `long`
  `getBytesWritten()`
  `org.apache.hadoop.util.DataChecksum`
  `getChecksum()`
  `long`
  `getChecksumDataLen()`
  `protected org.apache.hadoop.io.DataOutputBuffer`
  `getChecksumWriter()`
  `abstract Object`
  `getDigestObject()`
  Should return a representation of a completed/reconstructed digest which is suitable for debug printing.
  `ErasureCodingWorker`
  `getErasureCodingWorker()`
  `long`
  `getRemoteBytesRead()`
  `void`
  `incrBytesRead(boolean local, long delta)`
  `void`
  `incrBytesWritten(long delta)`
  `protected void`
  `initDecoderIfNecessary()`
  `protected void`
  `initDecodingValidatorIfNecessary()`
  `protected static void`
  `markBuffers(ByteBuffer[] buffers)`
  `void`
  `reconstruct()`
  `protected static void`
  `resetBuffers(ByteBuffer[] buffers)`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### LOG

    protected static final org.slf4j.Logger LOG

- ## Constructor Details

  - ### StripedBlockChecksumReconstructor

    protected StripedBlockChecksumReconstructor(ErasureCodingWorker worker, StripedReconstructionInfo stripedReconInfo, org.apache.hadoop.io.DataOutputBuffer checksumWriter, long requestedBlockLength) throws IOException
    Throws:
      `IOException`

- ## Method Details

  - ### reconstruct

    public void reconstruct() throws IOException
    Throws:
      `IOException`

  - ### getDigestObject

    public abstract Object getDigestObject()
    Should return a representation of a completed/reconstructed digest which is suitable for debug printing.

  - ### getChecksumWriter

    protected org.apache.hadoop.io.DataOutputBuffer getChecksumWriter()

  - ### getChecksumDataLen

    public long getChecksumDataLen()

  - ### close

    public void close() throws IOException
    Specified by:
      `close` in interface `AutoCloseable`
    Specified by:
      `close` in interface `Closeable`
    Throws:
      `IOException`

  - ### incrBytesRead

    public void incrBytesRead(boolean local, long delta)

  - ### incrBytesWritten

    public void incrBytesWritten(long delta)

  - ### getBytesRead

    public long getBytesRead()

  - ### getRemoteBytesRead

    public long getRemoteBytesRead()

  - ### getBytesWritten

    public long getBytesWritten()

  - ### initDecoderIfNecessary

    protected void initDecoderIfNecessary()

  - ### initDecodingValidatorIfNecessary

    protected void initDecodingValidatorIfNecessary()

  - ### getChecksum

    public org.apache.hadoop.util.DataChecksum getChecksum()

  - ### getErasureCodingWorker

    public ErasureCodingWorker getErasureCodingWorker()

  - ### markBuffers

    protected static void markBuffers(ByteBuffer[] buffers)

  - ### resetBuffers

    protected static void resetBuffers(ByteBuffer[] buffers)