@Override
    public void open(Configuration parameters) throws Exception {
        RdbSideTableInfo rdbSideTableInfo = (RdbSideTableInfo) sideInfo.getSideTableInfo();
        synchronized (RdbAsyncReqRow.class) {
            if (resourceCheck) {
                resourceCheck = false;
                JdbcResourceCheck.getInstance().checkResourceStatus(rdbSideTableInfo.getCheckProperties());
            }
        }
        super.open(parameters);

        VertxOptions vertxOptions = new VertxOptions();
        if (clientShare) {
            rdbSideTableInfo.setAsyncPoolSize(poolSize);
        }

        JsonObject jdbcConfig = buildJdbcConfig();
        System.setProperty("vertx.disableFileCPResolving", "true");
        vertxOptions
                .setEventLoopPoolSize(DEFAULT_VERTX_EVENT_LOOP_POOL_SIZE)
                .setWorkerPoolSize(asyncPoolSize)
                .setFileResolverCachingEnabled(false);

        executor = new ThreadPoolExecutor(
                MAX_DB_CONN_POOL_SIZE_LIMIT,
                MAX_DB_CONN_POOL_SIZE_LIMIT,
                0,
                TimeUnit.MILLISECONDS,
                new LinkedBlockingQueue<>(MAX_TASK_QUEUE_SIZE),
                new DTThreadFactory("rdbAsyncExec"),
                new ThreadPoolExecutor.CallerRunsPolicy());

        vertx = Vertx.vertx(vertxOptions);
        if (clientShare) {
            rdbSqlClientPool.putIfAbsent(url, JDBCClient.createNonShared(vertx, jdbcConfig));
            LOG.info("{} lru type open connection share, url:{}, rdbSqlClientPool size:{}, rdbSqlClientPool:{}", rdbSideTableInfo.getType(), url, rdbSqlClientPool.size(), rdbSqlClientPool);
        } else {
            this.rdbSqlClient = JDBCClient.createNonShared(vertx, jdbcConfig);
        }

    }
Date: 2018/11/26
Company: www.dtstack.com

@author maqi
rdb/rdb-side/src/main/java/com/dtstack/flink/sql/side/rdb/async/RdbAsyncReqRow.java