Class PureJavaCrc32

java.lang.Object
java.util.zip.CRC32
org.apache.hadoop.util.PureJavaCrc32
All Implemented Interfaces:
Checksum

@Public @Stable public class PureJavaCrc32 extends CRC32
The legacy PureJavaCrc32 implemented in HADOOP-6148 is much slower than JDK native implementation in modern JDKs, HADOOP-19839 rewrites it to delegate to JDK native CRC32.
See Also:
  • Constructor Details

    • PureJavaCrc32

      public PureJavaCrc32()
  • Method Details

    • mod

      public static int mod(long x)
      Compute x mod p, where p is the CRC32 polynomial.
      Parameters:
      x - the input value
      Returns:
      x mod p