Giter Site home page Giter Site logo

jacob119 / hive_merge Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sskaje/hive_merge

0.0 0.0 0.0 144 KB

Merge Small files for Hive Table on HDFS

Home Page: https://sskaje.me/2013/12/project-merge-small-files-hdfs-hive-table/

Python 100.00%

hive_merge's Introduction

Merge small files on HDFS for Hive table

Solving small files problems on HDFS for Hive table.

Author: sskaje (http://sskaje.me/)

More on my blog: https://sskaje.me/2013/12/project-merging-small-files-hdfs-hive-table/

Usage

Hive Merge v0.1 
  Author: sskaje (https://sskaje.me/)

Error: database and table are required.

Usage: python merge.py OPTIONS
    options:
      -h, --help                      Display this menu
      -D, --debug                     Debug mode, display HiveQL only
      -d, --database=database         Database name
      -t, --table=table               Table name
      -c, --compress                  Enable compression
      -C, --compress-codec=codec      Compression codec. lz4, gzip, bzip2,lzo, snappy, deflate(default).
      -p, --pk=partition_key          Partition key
      -P, --pv=partition_value        Partition value
      -S, --merge-size=merge_size     Merge size before compression, hive.merge.size.per.task, 
                                         256000000 by default

Examples

# Merge files in a table
sudo -u hdfs python merge.py  -d lecai_ad -t ext_ad_show
# Merge files in a table, lz4 compressed
sudo -u hdfs python merge.py  -d lecai_ad -t ext_ad_show -c -C lz4
# Merge files in a partition(entry_date='2013-12-29'), lz4 compressed
sudo -u hdfs python merge.py  -d lecai_ad -t ext_ad_show -p entry_date -P '2013-12-29' -c -C lz4
# Merge files in a partition(entry_date='2013-12-29', type='1'), lz4 compressed
sudo -u hdfs python merge.py  -d lecai_ad -t ext_ad_show -p entry_date -P '2013-12-29' -p type -P 1 -c -C lz4

#EOF

hive_merge's People

Contributors

sskaje 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.