Git Product home page Git Product logo

lakefs-garbager's Introduction

Lakefs Garbage Collector

Issue:

We have many small files in lakeFS, which is not efficient for querying. We want to collect all the small files into a single parquet file.

Solution:

This is a simple garbage collection tool for lakeFS. It is intended to be run as a cron job.

Collects all the files in a branch from a lakeFS repository with size less than a given threshold and collects them into a duckdb table. If the table size exceeds a given threshold, make a new parquet file and upload it to the lakeFS repository. After uploading the parquet file success, delete the old files from the lakeFS repository.

Usage

yarn start 

Configuration

The following environment variables are required:

  • LAKEFS_HOST - The lakeFS host to connect to
  • LAKEFS_ACCESS_KEY_ID - The lakeFS access key id to use
  • LAKEFS_SECRET_ACCESS_KEY - The lakeFS secret access key to use
  • LAKEFS_REPOSITORY - The lakeFS repository to use
  • LAKEFS_BRANCH - The lakeFS branch to use
  • FILE_PREFIX - The prefix of the files to save (e.g. blocks)
  • TABLE_NAME - The name of the duckdub table to use (e.g. blocks)
  • MAX_SIZE - The maximum size of the table in bytes (e.g. 500 for 500 Mb)
  • INTERVAL_TIME - The interval time in milliseconds (e.g. 5 for 5 minutes)

lakefs-garbager's People

Contributors

quannadev avatar

Watchers

 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.