Tkhemali Connector 1.X installation
|
NOTE
|
To install Tkhemali Connector 1.X, follow the steps:
-
Make sure that PXF and Tkhemali services are installed. For information on how to add services to ADB clusters, see Add services.
-
Add the new custom profile
TKHto the PXF configuration file /var/lib/pxf/conf/pxf-profiles.xml on master. To edit the file, you can use theviorvimcommand:$ sudo vi /var/lib/pxf/conf/pxf-profiles.xmlThe content of the changed file can look as follows. In the given example, the file does not contain other profiles:
<profiles> <profile> <name>TKH</name> <description>Clickhouse</description> <plugins> <accessor>io.arenadata.tkh.pxf.TkhAccessor</accessor> <resolver>io.arenadata.tkh.pxf.TkhResolver</resolver> </plugins> <optionMappings> <!-- distribution parameters --> <mapping option="distribution" property="clickhouse.distribution"/> <mapping option="url" property="clickhouse.dist.simple.url"/> <mapping option="gp_url" property="clickhouse.dist.gp.url"/> <mapping option="gp_user" property="clickhouse.dist.gp.user"/> <mapping option="gp_password" property="clickhouse.dist.gp.password"/> <mapping option="gp_request" property="clickhouse.dist.gp.request"/> <!-- common parameters --> <mapping option="send_delay" property="clickhouse.send.delay"/> <mapping option="lines_batch_size" property="clickhouse.lines.batch.size"/> <mapping option="bytes_batch_size_mb" property="clickhouse.bytes.batch.size.mb"/> <!-- connection and query parameters --> <mapping option="send_compressed" property="clickhouse.connection.decompress"/> <mapping option="insert_distributed_sync" property="clickhouse.connection.insert_distributed_sync"/> </optionMappings> </profile> </profiles>NOTEThe directory, where PXF configuration files are located, is defined by the
PXF_BASEenvironment variable. The default value is /var/lib/pxf. The path may differ in your environment. -
Log in under the default user
gpadmin. All the commands listed in the subsequent steps should be performed on master:$ sudo su - gpadmin -
Synchronize the PXF configuration on all hosts in the ADB cluster:
$ pxf cluster syncResult:
Syncing PXF configuration files from master host to standby master host and 2 segment hosts... PXF configs synced successfully on 3 out of 3 hosts
-
Restart PXF:
$ pxf cluster restartResult:
Restarting PXF on master host, standby master host, and 2 segment hosts... PXF restarted successfully on 4 out of 4 hosts
-
Connect to the database via
psql(or any other client program):$ psql adb -
To check that the new extension
gptkhis available, use thepsqlmeta-command\dx:\dxThe output contains the
gptkhextension:List of installed extensions Name | Version | Schema | Description -----------+---------+------------+--------------------------------------------------------------------- dblink | 1.1 | public | connect to other PostgreSQL databases from within a database diskquota | 2.2 | public | Disk Quota Main Program gptkh | 0.14 | public | gptkh kadb_fdw | 0.16 | kadb | Kafka-ADB foreign data wrapper plpgsql | 1.0 | pg_catalog | PL/pgSQL procedural language postgis | 2.5.4 | public | PostGIS geometry, geography, and raster spatial types and functions pxf | 2.0 | public | Extension which allows to access unmanaged data (7 rows)