2020-06-24 22:54:20 +00:00
|
|
|
hbase_tmp_path := /tmp/hbase
|
2020-07-01 16:41:59 +00:00
|
|
|
bindings_path := $(CURDIR)/hbase-protobuf-python
|
2020-06-24 22:54:20 +00:00
|
|
|
|
|
|
|
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; \
|
2020-11-03 16:59:28 +00:00
|
|
|
protoc -I=/usr/local/include/ --proto_path=. --python_out=$(bindings_path) *.proto
|
2020-06-24 22:54:20 +00:00
|
|
|
cd $(hbase_tmp_path)/hbase-protocol-shaded/src/main/protobuf; \
|
2020-11-03 16:59:28 +00:00
|
|
|
protoc -I=/usr/local/include/ --proto_path=. --python_out=$(bindings_path) client/*.proto
|
2020-06-24 22:54:20 +00:00
|
|
|
cd $(hbase_tmp_path)/hbase-protocol-shaded/src/main/protobuf; \
|
2020-11-03 16:59:28 +00:00
|
|
|
protoc -I=/usr/local/include/ --proto_path=. --python_out=$(bindings_path) server/*.proto
|
2020-06-24 22:54:20 +00:00
|
|
|
cd $(hbase_tmp_path)/hbase-protocol-shaded/src/main/protobuf; \
|
2020-11-03 16:59:28 +00:00
|
|
|
protoc -I=/usr/local/include/ --proto_path=. --python_out=$(bindings_path) server/io/*.proto
|
2020-06-24 22:54:20 +00:00
|
|
|
cd $(hbase_tmp_path)/hbase-protocol-shaded/src/main/protobuf; \
|
2020-11-03 16:59:28 +00:00
|
|
|
protoc -I=/usr/local/include/ --proto_path=. --python_out=$(bindings_path) server/zookeeper/*.proto
|
2020-06-24 22:54:20 +00:00
|
|
|
|
2021-03-03 18:00:03 +00:00
|
|
|
test:
|
|
|
|
./hbase-setup.sh
|
|
|
|
./bash_unit
|
|
|
|
./bash_unit tests/test_hbase_up.sh
|
2020-06-24 22:54:20 +00:00
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -rf $(hbase_tmp_path)
|
|
|
|
rm -rf $(bindings_path)
|