You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: hiveserver2/README.md
+9-3
Original file line number
Diff line number
Diff line change
@@ -2,12 +2,18 @@
2
2
3
3
For the convenience to access Hive from clients in various languages, the Hive developers created Hive Server, which is a Thrift service. The currently well-used version is known as Hive Server 2.
4
4
5
-
To write a Hive Server 2 client in Go, we need to use the `thrift` command to compile the Thrift service definition file [`TCLIService.thrift`](https://github.com/apache/hive/blob/master/service-rpc/if/TCLIService.thrift) from Hive Server 2 codebase, into Go source code.
5
+
To write a Hive Server 2 client in Go, we need to use the `thrift` command to compile the Thrift service definition file [`TCLIService.thrift`](https://github.com/apache/hive/blob/master/service-rpc/if/TCLIService.thrift) from Hive Server 2 codebase, into Go source code:
6
6
7
-
According to their [blog post](https://cwiki.apache.org/confluence/display/Hive/HowToContribute), the Hive developers for some reasons locks the Thrift version to 0.9.3, which is pretty old that you might not want to install it on your computer. Thanks to the Thrift team, who releases Thrift in Docker images and we can use the 0.9.3 version of Docker image for the compilation:
According to their [blog post](https://cwiki.apache.org/confluence/display/Hive/HowToContribute#HowToContribute-GeneratingThriftCode), the Hive developers recommends to use Thrift v0.14.1 to generate the Hive's auto-generated Thrift code:
8
12
9
13
```bash
10
-
docker run --rm -it -v $PWD:/work -w /work thrift:0.9.3 thrift -r --gen go TCLIService.thrift
14
+
docker run --rm -it -v $PWD:/work -w /work \
15
+
anthonyroussel/thrift:0.14.1 \
16
+
thrift -r --gen go TCLIService.thrift
11
17
```
12
18
13
19
The above command generates Go source code in the subdirectory `./gen-go/tcliservice`.
0 commit comments