Click or drag to resize
Grid Solutions Framework

HadoopReplicationProviderComputeHdfsFileHash Method

Computes a MD5 hash of the file content using the algorithm used by HDFS.

Namespace: Hadoop.Replication
Assembly: Hadoop.Replication (in Hadoop.Replication.dll) Version: 2.4.182-beta
Syntax
public static byte[] ComputeHdfsFileHash(
	string fileName,
	int bytesPerCrc32,
	int hdfsBlockSize,
	bool applyBufferPadding
)
View Source

Parameters

fileName  String
Name of the file for which the hash is to be computed.
bytesPerCrc32  Int32
Number of bytes at which HDFS is configured to compute a CRC32.
hdfsBlockSize  Int32
Size (in MB) of the data blocks for HDFS where the file resides.
applyBufferPadding  Boolean
true if the buffer used for computing file hash is to be padded with null bytes for replicating HDFS hashing bug, otherwise false.

Return Value

Byte
An Array of Bytes containing the file hash.
See Also