step0:TPC-DS的1T数据造数
tdh-user@tdh01:~$ tar -jxvf tpcds-6.X_with_arm_support.tar.bz2
tdh-user@tdh01:~$ beeline -u "jdbc:hive2://tdh02:10000/jeffdb;guardianToken=Iki9oN4MjpVzHtZiOQGI-TDH"
万事开头难,local没有TDH client驱动,捂脸-_!!!
indicated failure: Unsupported mechanism type PLAIN (state=08S01,code=0)
step1: TDH下载client
- TDH Manager:8180
- /Management/Download 下载 TDH Client
manager-client.png
step2:解压clinet到host宿主机
Jeffens-MBP:/ jeffenmbp$ cd /Users/jeffenmbp/Downloads
Jeffens-MBP:Downloads jeffenmbp$ scp tdh-client.tar user@manager-host:/opt/
Jeffens-MBP:Downloads ssh user/pwd@manager-host
tdh-user@tdh01:~$ tar -xvf tdh-clinet.tar
- 环境变量等设定
tdh-user@tdh01:~$ source /opt/TDH-Client/init.sh
- manager的虚机node也同错,居然没有java没用jre,难道是scala写的?
ERROR, can't find java, JAVA_HOME is empty.
step3: set JAVA_HOME
tdh-user@tdh01:~$ vi /etc/profile
export JAVA_HOME=/usr/java/jdk1.8.0_191-arm64
export PATH=$JAVA_HOME/bin:$PATH
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
tdh-user@tdh01:~$ source /etc/profile
step4: 通过pod环境造数
而非宿主机或local环境进行hive数据生成
- -[x] yarn pod 有MR的jar可以跑gendata的bash
- -[x] Inceptor pod有hive可以beeline可跑cretetables的bash
- 【check out】inceptor server pod
# 查看Inceptor的pods
tdh-user@tdh01:~$ kubectl get pods -o wide|grep -e inceptor -e NAME
tdh-user@tdh01:~$ kubectl exec -it inceptor-server-inceptor1-6cb7f48b8b-6hk47 bash
# 拷贝脚本压缩包到pod里
tdh-user@tdh01:~$ kubectl cp xxx.tar podname:/path/
tdh-user@tdh01:~$ kubectl cp tpcds-6.X_with_arm_support.tar.bz2 inceptor-server-inceptor1-6cb7f48b8b-6hk47:/vdir
- create table error
Could not open connection to jdbc:hive2://tdh02:10000: Peer indicated failure: Unsupported mechanism type PLAIN
- edit for token by quotation
# by host
tdh-user@tdh02:~# vi /transwarp/mounts/inceptor1/tpcds-6.X/bin/create-tables.sh
# by pod
tdh-user@tdh01:~$ vi inceptor-server-inceptor1-6cb7f48b8b-6hk47:/vdir/tpcds-6.X/bin/create-tables.sh
# search keyword
/beeline
# next matched
n
# edit
o
# save n quit
:wq
- 无需指定database,会自动创建text/orc两个database
tdh-user@tdh01:~$ beeline -u "jdbc:hive2://${TRANS_HOST}:10000/tpcds;guardianToken=Iki9oN4MjpVzHtZiOQGI-TDH" -f ${query_folder}/${t}.sql
- 查看主机目录
volumeMounts(pod目录)对应的volume name对应的hostpath(主机持久化目录)
volumeMounts | hostPath |
---|---|
/vdir | /transwarp/mounts/inceptor1 |
tdh-user@tdh01:~$ kubectl get pod inceptor-server-inceptor1-6cb7f48b8b-6hk47 -o yaml
apiVersion: v1
kind: Pod
metadata:
。。。。。。
spec:
volumeMounts:
- mountPath: /etc/inceptor1/conf
name: conf
- mountPath: /var/log/inceptor1/
name: log
- mountPath: /vdir
name: mountbind
- mountPath: /usr/lib/transwarp/plugins
name: plugin
- mountPath: /etc/localtime
name: timezone
- mountPath: /etc/transwarp/conf
name: transwarphosts
- mountPath: /var/run/hdfs1
name: hdfssocketdir
- mountPath: /etc/tos/conf
name: tos
- mountPath: /etc/license/conf
name: license
- mountPath: /etc/zookeeper1/conf
name: zookeeper1
- mountPath: /etc/hdfs1/conf
name: hdfs1
- mountPath: /etc/yarn1/conf
name: yarn1
- mountPath: /etc/search1/conf
name: search1
- mountPath: /etc/hyperbase1/conf
name: hyperbase1
- mountPath: /etc/txsql1/conf
name: txsql1
- mountPath: /var/run/secrets/kubernetes.io/serviceaccount
name: default-token-6nmj8
readOnly: true
。。。。。。
volumes:
- hostPath:
path: /etc/inceptor1/conf
type: ""
name: conf
- hostPath:
path: /var/log/inceptor1/
type: ""
name: log
- hostPath:
path: /transwarp/mounts/inceptor1
type: ""
name: mountbind
- hostPath:
path: /usr/lib/transwarp/plugins
type: ""
name: plugin
- hostPath:
path: /etc/localtime
type: ""
name: timezone
- hostPath:
path: /etc/transwarp/conf
type: ""
name: transwarphosts
- hostPath:
path: /var/run/hdfs1
type: ""
name: hdfssocketdir
- hostPath:
path: /etc/tos/conf
type: ""
name: tos
- hostPath:
path: /etc/license/conf
type: ""
name: license
- hostPath:
path: /etc/zookeeper1/conf
type: ""
name: zookeeper1
- hostPath:
path: /etc/hdfs1/conf
type: ""
name: hdfs1
- hostPath:
path: /etc/yarn1/conf
type: ""
name: yarn1
- hostPath:
path: /etc/search1/conf
type: ""
name: search1
- hostPath:
path: /etc/hyperbase1/conf
type: ""
name: hyperbase1
- hostPath:
path: /etc/txsql1/conf
type: ""
name: txsql1
- name: default-token-6nmj8
- pod目录(对应host宿主机可持久化的目录):
/vdir/ tpcds-6.X
- 「error」没有hdfs 服务
Exception in thread "main" java.lang.RuntimeException: core-site.xml not found
- 查看hdfs文件列表
[root@tdh02 ~]# hdfs dfs -ls /
[root@tdh02 ~]# exit
- 「check out」hdfs pod
bigdata@tdh02:~$ kubectl get pods -o wide|grep -e hdfs -e NAME
bigdata@tdh02:~$ kubectl exec -it pod-name bash //hadoop-hdfs-datanode-hdfs1-6d5d84c877-22q55
- 「error」没有kerberos认证
mkdir: Failed on local exception: java.io.IOException: javax.security.sasl.SaslException:
GSS initiate failed [Caused by GSSException: No valid credentials provided (Mechanism level: Failed to find any Kerberos tgt)];
Host Details : local host is: "tdh02/192.168.111.234"; destination host is: "tdh03":8020;
- pod里需kerberos认证
需密码;如果做access token不需密码
[root@tdh02 ~]# kinit hdfs
[root@tdh02 ~]# kinit hive
[root@tdh02 ~]# hdfs/123456
- 「error」缺少yarn/mr
NoClassDefFoundError: org/apache/hadoop/filecache/DistributedCache
- 「check out」yarn nodemaneger pod
bigdata@tdh02:~$ kubectl get pods -o wide|grep -e yarn -e NAME
bigdata@tdh02:~$ kubectl exec -it hadoop-yarn-nodemanager-yarn1-64d4485fcd-sskp2 bash
PS:pod自动restarts后,非持久化的存储文件会一并kill
bigdata@tdh02:~$ kubectl get pod hadoop-yarn-nodemanager-yarn1-64d4485fcd-sskp2 -o yaml
step5 aha
tdh-user@tdh01:~$ ./tpcds-test-1t.pl -v hive2
report uh-huh
tdh-user@tdh01:~$ vi /vdir/tpcds-6.X/perf/tdh02_tpcds_orc_1000_2019-12-08-20-56-10dc694e34d9a3bbedaf3ce59290f5d2e5
Database: tpcds_orc_1000
HostName: tdh02
NO Test Name Time Latest N Run Result
1 query1.sql 68.852 [38.170, 75.270, 49.470]
2 query2.sql 58.57 [52.838, 60.167, 59.706]
3 query3.sql 35.035 [23.872, 28.702, 26.873]
4 query4.sql 711.379 [648.989, 699.788, 673.860]
5 query5.sql 79.724 [68.611, 77.968, 81.631]
6 query6.sql 22.756 [19.643, 21.786, 22.226]
7 query7.sql 37.702 [30.903, 35.260, 38.002]
8 query8.sql 39.361 [36.350, 37.130, 37.456]
9 query9.sql 226.371 [173.445, 177.693, 174.741]
10 query10.sql 31.079 [32.472, 32.659, 29.599]
11 query11.sql 435.431 [426.929, 387.644, 363.676]
12 query12.sql 9.492 [8.216, 8.865, 10.145]
13 query13.sql 51.02 [47.104, 49.265, 48.562]
14 query14.sql 522.216 [510.365, 507.653, 479.601]
15 query15.sql 24.367 [20.166, 20.148, 18.523]
16 query16.sql 158.805 [155.223, 152.661, 155.041]
17 query17.sql 65.429 [61.022, 59.033, 60.424]
18 query18.sql 59.21 [58.671, 55.220, 62.860]
19 query19.sql 21.225 [19.398, 19.864, 20.906]
20 query20.sql 11.307 [11.681, 10.769, 13.050]
21 query21.sql 6.452 [5.372, 5.869, 7.106]
22 query22.sql 39.932 [36.131, 35.687, 34.997]
23 query23.sql 1504.225 [1468.756, 1491.690, 1467.900]
24 query24.sql 212.497 [204.052, 204.285, 210.874]
25 query25.sql 58.642 [53.195, 51.314, 56.955]
26 query26.sql 24.263 [27.186, 24.059, 25.044]
27 query27.sql 34.463 [33.274, 30.460, 32.183]
28 query28.sql 58.048 [53.025, 52.432, 53.883]
29 query29.sql 109.72 [107.337, 105.203, 107.512]
30 query30.sql 34.906 [28.016, 27.363, 31.637]
31 query31.sql 117.08 [110.937, 102.057, 103.368]
32 query32.sql 24.161 [23.199, 22.042, 22.831]
33 query33.sql 34.82 [33.198, 33.915, 34.159]
34 query34.sql 28.957 [24.303, 25.704, 27.371]
35 query35.sql 88.703 [81.699, 90.603, 86.083]
36 query36.sql 33.325 [28.546, 28.589, 28.928]
37 query37.sql 31.705 [21.748, 20.179, 23.206]
38 query38.sql 231.199 [229.739, 234.974, 225.602]
39 query39.sql 42.036 [42.613, 41.178, 42.170]
40 query40.sql 21.051 [18.915, 18.279, 20.119]
41 query41.sql 2.882 [3.058, 3.306, 2.970]
42 query42.sql 7.169 [6.739, 7.769, 7.544]
43 query43.sql 33.282 [28.542, 29.765, 28.336]
44 query44.sql 81.794 [74.106, 74.408, 83.666]
45 query45.sql 22.086 [19.832, 24.823, 21.728]
46 query46.sql 45.13 [39.496, 42.102, 42.349]
47 query47.sql 476.853 [470.822, 462.566, 465.041]
48 query48.sql 38.281 [32.924, 30.990, 32.873]
49 query49.sql 56.982 [50.133, 53.168, 53.708]
50 query50.sql 237.648 [322.096, 218.492, 158.753]
51 query51.sql 273.109 [259.791, 274.726, 276.170]
52 query52.sql 10.988 [10.928, 10.899, 9.789]
53 query53.sql 17.282 [15.089, 15.018, 16.298]
54 query54.sql 32.881 [30.541, 31.791, 29.899]
55 query55.sql 12.884 [9.216, 9.538, 10.857]
56 query56.sql 24.237 [22.433, 23.141, 25.554]
57 query57.sql 122.901 [119.246, 120.425, 123.309]
58 query58.sql 125.087 [120.960, 121.347, 120.439]
59 query59.sql 511.02 [515.282, 528.206, 507.848]
60 query60.sql 35.554 [33.882, 33.402, 35.635]
61 query61.sql 21.072 [18.519, 20.000, 19.415]
62 query62.sql 31.938 [31.024, 32.503, 32.396]
63 query63.sql 13.71 [12.172, 12.671, 12.388]
64 query64.sql 744.147 [980.515, 733.433, 759.394]
65 query65.sql 256.174 [243.856, 252.039, 237.059]
66 query66.sql 32.996 [36.615, 32.284, 32.727]
67 query67.sql 1106.64 [1023.450, 1061.947, 1033.126]
68 query68.sql 63.396 [54.722, 51.547, 54.623]
69 query69.sql 25.111 [20.057, 22.407, 22.863]
70 query70.sql 211.003 [180.621, 187.805, 189.381]
71 query71.sql 28.062 [23.825, 24.454, 23.248]
72 query72.sql 227.063 [211.053, 206.566, 0.000]
73 query73.sql 23.295 [20.563, 21.884, 21.111]
74 query74.sql 338.197 [316.943, 323.811, 316.562]
75 query75.sql 573.47 [573.539, 556.330, 557.033]
76 query76.sql 139.352 [121.209, 128.247, 134.744]
77 query77.sql 32.562 [28.884, 30.256, 32.111]
78 query78.sql 1035.677 [962.908, 980.787, 982.145]
79 query79.sql 125.309 [120.746, 119.907, 120.687]
80 query80.sql 55.397 [50.305, 52.540, 53.667]
81 query81.sql 33.339 [27.579, 33.028, 30.487]
82 query82.sql 38.211 [31.254, 38.436, 33.049]
83 query83.sql 32.047 [32.424, 34.713, 34.354]
84 query84.sql 31.32 [31.614, 32.649, 31.426]
85 query85.sql 58.057 [57.812, 55.304, 52.257]
86 query86.sql 23.21 [20.030, 21.185, 29.963]
87 query87.sql 327.032 [316.552, 315.121, 322.858]
88 query88.sql 91.28 [82.318, 97.144, 88.735]
89 query89.sql 32.42 [36.850, 31.453, 31.242]
90 query90.sql 12.278 [11.773, 11.338, 13.203]
91 query91.sql 7.37 [6.778, 6.797, 6.473]
92 query92.sql 13.192 [12.405, 14.056, 12.117]
93 query93.sql 269.301 [271.161, 278.101, 363.786]
94 query94.sql 78.285 [73.754, 75.648, 110.240]
95 query95.sql 527.627 [555.023, 546.441, 539.789]
96 query96.sql 18.843 [16.989, 16.230, 17.766]
97 query97.sql 448.901 [400.880, 421.941, 464.974]
98 query98.sql 21.667 [15.707, 17.612, 17.510]
99 query99.sql 56.801 [55.585, 55.741, 55.989]
--------------------------------------------------------
All: 14779.318 [14348.439, 14233.665, 14011.944]
网友评论