Package org.apache.hadoop.util
Class PureJavaCrc32C
java.lang.Object
org.apache.hadoop.util.PureJavaCrc32C
- All Implemented Interfaces:
Checksum
The legacy PureJavaCrc32C implemented in HADOOP-7443 is
much slower than JDK native implementation in modern JDKs,
HADOOP-19839 rewrites it to delegate to JDK native CRC32C.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
PureJavaCrc32C
public PureJavaCrc32C()
-
-
Method Details
-
update
public void update(int b) -
update
public void update(byte[] b) -
update
public void update(byte[] b, int off, int len) -
update
-
getValue
public long getValue() -
reset
public void reset() -
mod
public static int mod(long x) Compute x mod p, where p is the CRC32C polynomial.- Parameters:
x- the input value- Returns:
- x mod p
-