DumpUtil (Apache Hadoop Common 3.5.0 API)
Description: declaration: package: org.apache.hadoop.io.erasurecode.rawcoder.util, class: DumpUtil

Package org.apache.hadoop.io.erasurecode.rawcoder.util

# Class DumpUtil

java.lang.Object
org.apache.hadoop.io.erasurecode.rawcoder.util.DumpUtil

@Private public final class DumpUtil extends Object
A dump utility class for debugging data erasure coding/decoding issues. Don't suggest they are used in runtime production codes.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static String`
  `bytesToHex(byte[] bytes, int limit)`
  Convert bytes into format like 0x02 02 00 80.
  `static void`
  `dumpChunk(ECChunk chunk)`
  Print data in hex format in a chunk.
  `static void`
  `dumpChunks(String header, ECChunk[] chunks)`
  Print data in hex format in an array of chunks.
  `static void`
  `dumpMatrix(byte[] matrix, int numDataUnits, int numAllUnits)`

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

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

- ## Method Details

  - ### bytesToHex

    public static String bytesToHex(byte[] bytes, int limit)
    Convert bytes into format like 0x02 02 00 80. If limit is negative or too large, then all bytes will be converted.
    Parameters:
      `bytes` - bytes.
      `limit` - limit.
    Returns:
      bytesToHex.

  - ### dumpMatrix

    public static void dumpMatrix(byte[] matrix, int numDataUnits, int numAllUnits)

  - ### dumpChunks

    public static void dumpChunks(String header, ECChunk[] chunks)
    Print data in hex format in an array of chunks.
    Parameters:
      `header` - header.
      `chunks` - chunks.

  - ### dumpChunk

    public static void dumpChunk(ECChunk chunk)
    Print data in hex format in a chunk.
    Parameters:
      `chunk` - chunk.