Skip to content
This repository has been archived by the owner on Feb 23, 2023. It is now read-only.

xiaogaozi/redis2hdfs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

redis2hdfs

Build Status Latest Version Supported Python versions Development Status License

redis2hdfs is a command line tool to help you export Redis data to HDFS. It use SCAN related commands to iterate elements (no KEYS), so you can use in production safely.

NOTE: ensure WebHDFS is enabled.

Installation

$ pip install redis2hdfs

Usage

$ redis2hdfs --redis-key myzset --namenode-host namenode.example.com --hdfs-username hdfs --hdfs-path /tmp/myzset.lzo --compress-format lzo

redis2hdfs could compress file before copy to HDFS, through --compress-format option. Currently supported compress formats are: LZO.

If you want to use LZO format, you need install lzop first.

redis2hdfs supports Redis global-style key pattern, so you can specify --redis-key like *abc*. redis2hdfs will copy all matched keys' data to HDFS, at this time the --hdfs-path option will be the parent directory to store data.

For more information, just run redis2hdfs --help.

Development

$ mkvirtualenv redis2hdfs
$ python setup.py develop
$ pip install -r tests-req.txt
$ nosetests -v

About

Export Redis data to HDFS

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages