Created
April 20, 2011 12:33
-
-
Save yyuu/931210 to your computer and use it in GitHub Desktop.
Makefile to dump all Cassandra's SSTables to JSON (with LZO compression)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SRCDIR = /var/lib/cassandra/data | |
DSTDIR = . | |
SOURCES = $(wildcard $(SRCDIR)/*/*-Data.db) | |
ALL = $(foreach S,$(SOURCES),$(basename $(subst $(SRCDIR)/,,$(S))).json.lzo) | |
.SUFFIXES: .json.lzo | |
all: $(ALL) | |
%.json.lzo: | |
-mkdir -p $(dir $@) | |
sstable2json $(SRCDIR)/$(basename $(basename $@)).db | lzop -c > $@ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment