Giter Club home page Giter Club logo

wangyuefive / hdfschecksumforlocalfile Goto Github PK

View Code? Open in Web Editor NEW

This project forked from srch07/hdfschecksumforlocalfile

0.0 0.0 0.0 19.37 MB

This program / jar creates checksum, with same algorithm that hadoop uses to create on hdfs files. So integrity of file can be verified on local and hadoop system. Can also, be used to check if file exist based on checksum, before uploading and cluttering hdfs with duplicate files.

Java 100.00%

hdfschecksumforlocalfile's Introduction

HDFSChecksumForLocalfile

This program / jar creates checksum, with same algorithm that hadoop uses to create on hdfs files. So integrity of file can be verified on local and hadoop system. Can also, be used to check if file exist based on checksum, before uploading and cluttering hdfs with duplicate files.

How to test it?

Download the jar from the archive directory.

It can be fired using java -jar "jar_name" "arguments"

Arguments can be provided in either of the below format:

  1. file name with path

    eg, java -jar "this_jar_filename_with_path" "local file path"

  2. filename_with_path BytesPerChecksum ChecksumPerBlock

    eg, java -jar "this_jar_filename_with_path" "local file path" 256 512

  3. filename_with_path BytesPerChecksum ChecksumPerBlock AlgorithmType(CRC32/CRC32C/NULL/DEFAULT/MIXED)

    eg, java -jar "this_jar_filename_with_path" "local file path" 256 512 CRC32C

How to use this jar in your project?

Add this jar to your class path and import com.srch07.HadoopChecksum

use HadoopChecksum.calculate(filepath) or it's overloaded multiple signatures just like command line. It will return a String value of checksum.

Note : This project uses hadoop-common maven library internally. So for whatever purpose you are using already a version of it in your project, you can define the scope in this project as provided.

hdfschecksumforlocalfile's People

Contributors

srch07 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.