public MaxComputeSinkWriter()

in src/main/java/com/aliyun/odps/kafka/connect/MaxComputeSinkWriter.java [111:140]


  public MaxComputeSinkWriter(
      MaxComputeSinkConnectorConfig config,
      String project,
      String table,
      RecordConverter converter,
      int bufferSize,
      PartitionWindowType partitionWindowType,
      TimeZone tz,
      boolean useStreamingTunnel,
      int retryTimes,
      String tunnelEndpoint) {
    this.odps = OdpsUtils.getOdps(config);
    this.odps.setUserAgent("aliyun-maxc-kafka-connector");
    this.tunnel = new TableTunnel(this.odps);
    this.project = Objects.requireNonNull(project);
    this.tunnelEndpoint = Objects.requireNonNull(tunnelEndpoint); // add tunnel endpoint config
    if (!Objects.equals(this.tunnelEndpoint, "")) {
      this.tunnel.setEndpoint(tunnelEndpoint);
    }
    this.table = Objects.requireNonNull(table);
    this.converter = Objects.requireNonNull(converter);
    this.bufferSize = bufferSize;
    this.partitionWindowType = partitionWindowType;
    this.tz = Objects.requireNonNull(tz);
    this.useStreamingTunnel = useStreamingTunnel;
    this.retryTimes = retryTimes;
    if (this.retryTimes < 0) {
      this.retryTimes = DEFAULT_RETRY_TIMES;
    }
  }