File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # Licensed to the Apache Software Foundation (ASF) under one
2+ # or more contributor license agreements. See the NOTICE file
3+ # distributed with this work for additional information
4+ # regarding copyright ownership. The ASF licenses this file
5+ # to you under the Apache License, Version 2.0 (the
6+ # "License"); you may not use this file except in compliance
7+ # with the License. You may obtain a copy of the License at
8+ #
9+ # http://www.apache.org/licenses/LICENSE-2.0
10+ #
11+ # Unless required by applicable law or agreed to in writing,
12+ # software distributed under the License is distributed on an
13+ # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+ # KIND, either express or implied. See the License for the
15+ # specific language governing permissions and limitations
16+ # under the License.
117# Makefile for generating vendor packages
218
319.PHONY : all clean fb303 hive-metastore
@@ -22,11 +38,3 @@ hive-metastore:
2238 thrift -gen py -o /tmp/hive /tmp/hive/hive_metastore.thrift
2339 rm -rf hive_metastore
2440 mv /tmp/hive/gen-py/hive_metastore hive_metastore
25-
26- # Clean generated files
27- clean :
28- rm -rf fb303
29- rm -rf hive_metastore
30- rm -rf /tmp/fb303.thrift
31- rm -rf /tmp/gen-py/
32- rm -rf /tmp/hive
Original file line number Diff line number Diff line change 1818
1919Some packages we want to maintain in the repository itself, because there is no good 3rd party alternative.
2020
21- ## FB303 Thrift client
21+ ## Quick Setup
22+
23+ Generate all vendor packages:
24+
25+ ``` bash
26+ make all
27+ ```
28+
29+ Generate individual packages:
30+
31+ ``` bash
32+ make fb303 # FB303 Thrift client only
33+ make hive-metastore # Hive Metastore Thrift definitions only
34+ ```
35+
36+ ## Packages
37+
38+ ### FB303 Thrift client
2239
2340fb303 is a base Thrift service and a common set of functionality for querying stats, options, and other information from a service.
2441
42+ ** Generate with Make:**
2543``` bash
26- rm -f /tmp/fb303.thrift
27- rm -rf fb303
28- curl -s https://raw.githubusercontent.com/apache/thrift/master/contrib/fb303/if/fb303.thrift > /tmp/fb303.thrift
29- rm -rf /tmp/gen-py/
30- thrift -gen py -o /tmp/ /tmp/fb303.thrift
31- mv /tmp/gen-py/fb303 fb303
44+ make fb303
3245```
3346
3447# Hive Metastore Thrift definition
3548
3649The thrift definition require the fb303 service as a dependency
3750
51+ ** Generate with Make:**
3852``` bash
39- rm -rf /tmp/hive
40- mkdir -p /tmp/hive/share/fb303/if/
41- curl -s https://raw.githubusercontent.com/apache/thrift/master/contrib/fb303/if/fb303.thrift > /tmp/hive/share/fb303/if/fb303.thrift
42- curl -s https://raw.githubusercontent.com/apache/hive/master/standalone-metastore/metastore-common/src/main/thrift/hive_metastore.thrift > /tmp/hive/hive_metastore.thrift
43- thrift -gen py -o /tmp/hive /tmp/hive/hive_metastore.thrift
44- mv /tmp/hive/gen-py/hive_metastore hive_metastore
53+ make hive-metastore
4554```
55+
56+ ## Requirements
57+
58+ - Apache Thrift compiler (` thrift ` )
59+ - ` curl ` for downloading Thrift definitions
You can’t perform that action at this time.
0 commit comments