Coder Social home page Coder Social logo

shashanknaikdev / cleanupemptyfilestool Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tmalaska/cleanupemptyfilestool

1.0 1.0 0.0 454 KB

This tool is designed to look through your HDFS folders to ether identify files with no data in them or delete files with no data in them.

License: Apache License 2.0

HTML 12.44% Scala 87.56%

cleanupemptyfilestool's Introduction

#CleanUpEmptyFilesTool This tool is designed to look through your HDFS folders to ether identify files with no data in them or delete files with no data in them.

This is hopeful for clusters that have a lot of users with lots of freedom to make mistakes.

##How to run

  • This will list all files in a director. This will even work even if you have a million files in one folder. hadoop jar CleanUpEmptyFilesTool.jar com.cloudera.sa.cap1.largefileutil.CleanUpEmptyFilesTool ls folderName

  • This will list out only files that have zero size hadoop jar CleanUpEmptyFilesTool.jar com.cloudera.sa.cap1.largefileutil.CleanUpEmptyFilesTool ls-zero folderName

  • This will list out and delete all files of zero size. hadoop jar CleanUpEmptyFilesTool.jar com.cloudera.sa.cap1.largefileutil.CleanUpEmptyFilesTool rm-zero folderName

##How to test The following cmd will make a test folder for you to test on

hadoop jar CleanUpEmptyFilesTool.jar com.cloudera.sa.cap1.largefileutil.GenTestFolder 100 folderName

#ReviewTablesTool This tool is designed to look through your tables and tell you if you could benefit from a compaction

##How to run hadoop jar CleanUpEmptyFilesTool.jar com.cloudera.sa.cap1.largefileutil.ReviewTablesTool

#WhereAreTheFiles This tool is designed to look through HDFS and mark which files and folders are in hive tables are not

##How to run hadoop jar CleanUpEmptyFilesTool.jar com.cloudera.sa.cap1.largefileutil.WhereAreTheFiles

#CountFilesInHiveTables This tool with query the hive metastore dump to count number of files and blocks in a table

##Hive to run spark-submit --class com.cloudera.sa.cap1.spark.CountFilesInHiveTables \ --master yarn --deploy-mode client --executor-memory 512MB --num-executors 2 --executor-cores 1 \ CleanUpEmptyFilesTool.jar \ l



cleanupemptyfilestool's People

Stargazers

Shashank Naik avatar

Watchers

Shashank Naik 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.