hbase-exporter/Makefile
2021-03-03 19:00:03 +01:00

27 lines
1.1 KiB
Makefile

hbase_tmp_path := /tmp/hbase
bindings_path := $(CURDIR)/hbase-protobuf-python
all:
@echo Generating Python Protobuf bindings from HBase source
-mkdir $(bindings_path)
-git clone --depth 1 https://github.com/apache/hbase $(hbase_tmp_path)
cd $(hbase_tmp_path)/hbase-protocol-shaded/src/main/protobuf; \
protoc -I=/usr/local/include/ --proto_path=. --python_out=$(bindings_path) *.proto
cd $(hbase_tmp_path)/hbase-protocol-shaded/src/main/protobuf; \
protoc -I=/usr/local/include/ --proto_path=. --python_out=$(bindings_path) client/*.proto
cd $(hbase_tmp_path)/hbase-protocol-shaded/src/main/protobuf; \
protoc -I=/usr/local/include/ --proto_path=. --python_out=$(bindings_path) server/*.proto
cd $(hbase_tmp_path)/hbase-protocol-shaded/src/main/protobuf; \
protoc -I=/usr/local/include/ --proto_path=. --python_out=$(bindings_path) server/io/*.proto
cd $(hbase_tmp_path)/hbase-protocol-shaded/src/main/protobuf; \
protoc -I=/usr/local/include/ --proto_path=. --python_out=$(bindings_path) server/zookeeper/*.proto
test:
./hbase-setup.sh
./bash_unit
./bash_unit tests/test_hbase_up.sh
clean:
rm -rf $(hbase_tmp_path)
rm -rf $(bindings_path)