@cubejs-backend/hive-driver 1.6.32 → 1.6.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/package.json +5 -5
- package/src/HiveDriver.js +15 -13
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [1.6.34](https://github.com/cube-js/cube/compare/v1.6.33...v1.6.34) (2026-04-14)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
- Generate unique names for pool with dataSource & preAggregation… ([#10680](https://github.com/cube-js/cube/issues/10680)) ([df1b7e7](https://github.com/cube-js/cube/commit/df1b7e70949b8db698a017ecc490c3788aa1d96f))
|
|
11
|
+
- Support pre-aggregation-specific data source configuration ([#10587](https://github.com/cube-js/cube/issues/10587)) ([04eed5d](https://github.com/cube-js/cube/commit/04eed5d5ba3c1ceb8cda3c13eebf7f354eb61f48))
|
|
12
|
+
|
|
13
|
+
## [1.6.33](https://github.com/cube-js/cube/compare/v1.6.32...v1.6.33) (2026-04-09)
|
|
14
|
+
|
|
15
|
+
**Note:** Version bump only for package @cubejs-backend/hive-driver
|
|
16
|
+
|
|
6
17
|
## [1.6.32](https://github.com/cube-js/cube/compare/v1.6.31...v1.6.32) (2026-04-06)
|
|
7
18
|
|
|
8
19
|
**Note:** Version bump only for package @cubejs-backend/hive-driver
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@cubejs-backend/hive-driver",
|
|
3
3
|
"description": "Cube.js Hive database driver",
|
|
4
4
|
"author": "Cube Dev, Inc.",
|
|
5
|
-
"version": "1.6.
|
|
5
|
+
"version": "1.6.34",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
8
|
"url": "https://github.com/cube-js/cube.git",
|
|
@@ -17,8 +17,8 @@
|
|
|
17
17
|
"lint:fix": "eslint --fix src/* --ext .ts"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@cubejs-backend/base-driver": "1.6.
|
|
21
|
-
"@cubejs-backend/shared": "1.6.
|
|
20
|
+
"@cubejs-backend/base-driver": "1.6.34",
|
|
21
|
+
"@cubejs-backend/shared": "1.6.34",
|
|
22
22
|
"jshs2": "^0.4.4",
|
|
23
23
|
"sasl-plain": "^0.1.0",
|
|
24
24
|
"saslmechanisms": "^0.1.1",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
},
|
|
28
28
|
"license": "Apache-2.0",
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@cubejs-backend/linter": "1.6.
|
|
30
|
+
"@cubejs-backend/linter": "1.6.34"
|
|
31
31
|
},
|
|
32
32
|
"publishConfig": {
|
|
33
33
|
"access": "public"
|
|
@@ -38,5 +38,5 @@
|
|
|
38
38
|
"eslintConfig": {
|
|
39
39
|
"extends": "../cubejs-linter"
|
|
40
40
|
},
|
|
41
|
-
"gitHead": "
|
|
41
|
+
"gitHead": "0db9e700b727993b5afe74e5b34686ae76b3cd89"
|
|
42
42
|
}
|
package/src/HiveDriver.js
CHANGED
|
@@ -11,7 +11,7 @@ const {
|
|
|
11
11
|
} = require('@cubejs-backend/shared');
|
|
12
12
|
const jshs2 = require('jshs2');
|
|
13
13
|
const SqlString = require('sqlstring');
|
|
14
|
-
const { BaseDriver } = require('@cubejs-backend/base-driver');
|
|
14
|
+
const { BaseDriver, createPoolName } = require('@cubejs-backend/base-driver');
|
|
15
15
|
const Connection = require('jshs2/lib/Connection');
|
|
16
16
|
const IDLFactory = require('jshs2/lib/common/IDLFactory');
|
|
17
17
|
|
|
@@ -61,28 +61,30 @@ class HiveDriver extends BaseDriver {
|
|
|
61
61
|
const dataSource =
|
|
62
62
|
config.dataSource ||
|
|
63
63
|
assertDataSource('default');
|
|
64
|
+
const preAggregations = config.preAggregations || false;
|
|
64
65
|
|
|
65
66
|
this.config = {
|
|
66
67
|
auth: 'PLAIN',
|
|
67
|
-
host: getEnv('dbHost', { dataSource }),
|
|
68
|
-
port: getEnv('dbPort', { dataSource }),
|
|
69
|
-
dbName: getEnv('dbName', { dataSource }) || 'default',
|
|
68
|
+
host: getEnv('dbHost', { dataSource, preAggregations }),
|
|
69
|
+
port: getEnv('dbPort', { dataSource, preAggregations }),
|
|
70
|
+
dbName: getEnv('dbName', { dataSource, preAggregations }) || 'default',
|
|
70
71
|
timeout: 10000,
|
|
71
|
-
username: getEnv('dbUser', { dataSource }),
|
|
72
|
-
password: getEnv('dbPass', { dataSource }),
|
|
73
|
-
hiveType: getEnv('hiveType', { dataSource }) === 'CDH'
|
|
72
|
+
username: getEnv('dbUser', { dataSource, preAggregations }),
|
|
73
|
+
password: getEnv('dbPass', { dataSource, preAggregations }),
|
|
74
|
+
hiveType: getEnv('hiveType', { dataSource, preAggregations }) === 'CDH'
|
|
74
75
|
? HS2Util.HIVE_TYPE.CDH
|
|
75
76
|
: HS2Util.HIVE_TYPE.HIVE,
|
|
76
|
-
hiveVer: getEnv('hiveVer', { dataSource }) || '2.1.1',
|
|
77
|
-
thriftVer: getEnv('hiveThriftVer', { dataSource }) || '0.9.3',
|
|
78
|
-
cdhVer: getEnv('hiveCdhVer', { dataSource }),
|
|
77
|
+
hiveVer: getEnv('hiveVer', { dataSource, preAggregations }) || '2.1.1',
|
|
78
|
+
thriftVer: getEnv('hiveThriftVer', { dataSource, preAggregations }) || '0.9.3',
|
|
79
|
+
cdhVer: getEnv('hiveCdhVer', { dataSource, preAggregations }),
|
|
79
80
|
authZid: 'cube.js',
|
|
80
81
|
...config
|
|
81
82
|
};
|
|
82
83
|
|
|
83
84
|
const configuration = new Configuration(this.config);
|
|
84
|
-
|
|
85
|
-
|
|
85
|
+
|
|
86
|
+
const poolName = createPoolName('hive', dataSource, preAggregations);
|
|
87
|
+
this.pool = new Pool(poolName, {
|
|
86
88
|
create: async () => {
|
|
87
89
|
const idl = new IDLContainer();
|
|
88
90
|
await idl.initialize(configuration);
|
|
@@ -124,7 +126,7 @@ class HiveDriver extends BaseDriver {
|
|
|
124
126
|
min: 0,
|
|
125
127
|
max:
|
|
126
128
|
config.maxPoolSize ||
|
|
127
|
-
getEnv('dbMaxPoolSize', { dataSource }) ||
|
|
129
|
+
getEnv('dbMaxPoolSize', { dataSource, preAggregations }) ||
|
|
128
130
|
8,
|
|
129
131
|
evictionRunIntervalMillis: 10000,
|
|
130
132
|
softIdleTimeoutMillis: 30000,
|