@Override
    public ImpalaSink genStreamSink(AbstractTargetTableInfo targetTableInfo) {
        ImpalaTableInfo impalaTableInfo = (ImpalaTableInfo) targetTableInfo;
        this.dbUrl = getImpalaJdbcUrl(impalaTableInfo);
        this.password = impalaTableInfo.getPassword();
        this.userName = impalaTableInfo.getUserName();
        this.authMech = impalaTableInfo.getAuthMech();

        this.principal = impalaTableInfo.getPrincipal();
        this.keytabPath = impalaTableInfo.getKeyTabFilePath();
        this.krb5confPath = impalaTableInfo.getKrb5FilePath();

        this.updateMode = Objects.isNull(impalaTableInfo.getUpdateMode()) ?
                "append" : impalaTableInfo.getUpdateMode();

        this.batchSize = Objects.isNull(impalaTableInfo.getBatchSize()) ?
                batchSize : impalaTableInfo.getBatchSize();
        this.batchWaitInterval = Objects.isNull(impalaTableInfo.getBatchWaitInterval()) ?
                batchWaitInterval : impalaTableInfo.getBatchWaitInterval();
        this.parallelism = Objects.isNull(impalaTableInfo.getParallelism()) ?
                parallelism : impalaTableInfo.getParallelism();
        this.registerTabName = impalaTableInfo.getTableName();

        this.fieldList = impalaTableInfo.getFieldList();
        this.fieldTypeList = impalaTableInfo.getFieldTypeList();
        this.fieldExtraInfoList = impalaTableInfo.getFieldExtraInfoList();
        this.tableName = impalaTableInfo.getTableName();
        this.schema = impalaTableInfo.getSchema();
        this.primaryKeys = impalaTableInfo.getPrimaryKeys();
        this.partitionFields = impalaTableInfo.getPartitionFields();

        this.storeType = Objects.isNull(impalaTableInfo.getStoreType()) ?
                DEFAULT_STORE_TYPE : impalaTableInfo.getStoreType();
        this.enablePartition = impalaTableInfo.isEnablePartition();

        return this;
    }
Date: 2020/10/14
Company: www.dtstack.com

@author tiezhu
impala/impala-sink/src/main/java/com/dtstack/flink/sql/sink/impala/ImpalaSink.java