All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.clickzetta.client.jdbc.core.CZConnectContext Maven / Gradle / Ivy

There is a newer version: 2.0.0
Show newest version
package com.clickzetta.client.jdbc.core;

import java.io.Serializable;
import java.net.URI;
import java.sql.SQLException;
import java.util.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

import org.apache.commons.lang3.StringUtils;
import org.json.JSONObject;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class CZConnectContext implements Serializable {
  private static final long serialVersionUID = 1L;

  private final String url;

  private final String scheme;
  private String workspace;
  private final String host;
  private final int port;
  private final String namespace;
  private final String lakehouseInstance;
  private final String instance_name;
  private final String userName;
  private final String password;
  private String token;
  private String schema;
  private String virtualCluster;
  private String priorityInString = "";

  private Integer hybridPollingTimeout;
  private int queryTimeout;
  private int maxRowSize = 0;

  private int jdbcMode;
  private boolean showDebugLog;

  private char csvFieldDelimiter;
  private char csvEscapeChar;
  private boolean csvWithHeader;
  private boolean csvSkipHeader;
  private String csvNullString;
  private Long csvIgnoreMalformedRecord;
  private String igsMasterAddress;
  private int igsMasterPort;
  private boolean useNewRestful = false;
  private long timeZone = 0;
  private boolean useOssInternalEndpointFlag = true;

  private final Map settings;
  private final Map defaultSettings;

  private LakehouseClient lakehouseClient;

  // export runningMode
  public enum RunningMode {
    GATEWAY, COORDINATOR, DRYRUN, ACROSS_VPC, COORDINATOR_SERVICE
  };
  private final RunningMode mode;
  // used for direct access mode
  private long instanceId = -1;
  private long userId = -1;

  private final List configStatements;
  private final Map configsInUrl;
  private final long tokenExpireTimeMs;
  private HttpHelper httpHelper;
  private static boolean tableauMode = false;
  private static boolean dbapiMode = false;
  private String queryTag;
  private String volumePath;
  private String localFilePath;
  private int volumeParallel = 1;
  private boolean volumeAutoCompress = false;
  private String volumeSourceCompressionType = "NONE";
  private long volumeTTL;
  private boolean volumeDownloadFlag;
  private String volumePattern;
  private int jdbcQueryTimeoutMs = 0;
  private boolean useObjectStoreHttps = true;

  private static final Logger logger = LoggerFactory.getLogger(CZConnectContext.class);

  private static final String MAINLAND_SCHEME = "clickzetta";
  private static final String OVERSEA_SCHEME = "singdata";

  CZConnectContext(String url, String scheme, String host, int port, String instance_name,
                   String workspace,
                   String userName, String password, String schema,
                   String virtualCluster, Integer hybridPollingTimeout,
                   String namespace, String lakehouseInstance,
                   RunningMode rm, int queryTimeout,
                   Map configsInUrl,
                   String igsMasterAddress, int igsMasterPort,
                   String token,
                   boolean useNewRestful,
                   long tokenExpireTimeMs,
                   boolean useOssInternalEndpointFlag,
                   int httpPoolSize,
                   String queryTag) {
    this(url, scheme, host, port, instance_name, workspace, userName, password, schema,
            virtualCluster, hybridPollingTimeout, namespace, lakehouseInstance, rm, queryTimeout,
            configsInUrl, igsMasterAddress, igsMasterPort, token, useNewRestful, tokenExpireTimeMs,
            useOssInternalEndpointFlag, httpPoolSize, queryTag, 3600L, true, true);
  }

  CZConnectContext(String url, String scheme, String host, int port, String instance_name,
          String workspace,
          String userName, String password, String schema,
          String virtualCluster, Integer hybridPollingTimeout,
          String namespace, String lakehouseInstance,
          RunningMode rm, int queryTimeout,
          Map configsInUrl,
          String igsMasterAddress, int igsMasterPort,
          String token,
          boolean useNewRestful,
          long tokenExpireTimeMs,
          boolean useOssInternalEndpointFlag,
          int httpPoolSize,
          String queryTag,
          long volumeTTL,
          boolean volumeWithDownload,
          boolean useObjectStoreHttps) {
    this.url = url;
    this.scheme = scheme;
    this.workspace = workspace;
    this.host = host;
    this.port = port;
    this.instance_name = instance_name;
    this.userName = userName;
    this.password = password;
    this.schema = schema;
    this.virtualCluster = virtualCluster;
    this.hybridPollingTimeout = hybridPollingTimeout;
    this.namespace = namespace;
    this.lakehouseInstance = lakehouseInstance;
    this.settings = new HashMap<>();
    this.showDebugLog = false;
    this.mode = rm;
    this.csvFieldDelimiter = ',';
    this.csvWithHeader = false;
    this.csvSkipHeader = false;
    this.csvNullString = "\\N";
    this.csvIgnoreMalformedRecord = 0L;
    this.queryTimeout = queryTimeout;
    this.configStatements = new ArrayList<>();
    this.configsInUrl = configsInUrl;
    this.defaultSettings = new HashMap<>();
    this.defaultSettings.put("cz.sql.adhoc.result.type", "embedded");
    this.defaultSettings.put("cz.sql.adhoc.default.format", "ARROW");
    this.settings.putAll(defaultSettings);
    this.settings.putAll(configsInUrl);
    this.igsMasterAddress = igsMasterAddress;
    this.igsMasterPort = igsMasterPort;
    this.token = token;
    this.useNewRestful = useNewRestful;
    this.tokenExpireTimeMs = tokenExpireTimeMs > 0 ? tokenExpireTimeMs : 3600 * 1000;
    this.useOssInternalEndpointFlag = useOssInternalEndpointFlag;
    this.httpHelper = new HttpHelper(httpPoolSize);
    this.queryTag = queryTag;
    this.volumeTTL = volumeTTL;
    this.volumeDownloadFlag = volumeWithDownload;
    this.useObjectStoreHttps = useObjectStoreHttps;
  }

  public void setLakehouseClient(LakehouseClient lc) {
    lakehouseClient = lc;
  }

  LakehouseClient lakehouseClient() {
    return lakehouseClient;
  }

  static boolean checkLakehouseURL(String url) {
    String MAINLAND_PREFIX = "jdbc:" + MAINLAND_SCHEME + ":";
    String OVERSEA_PREFIX = "jdbc:" + OVERSEA_SCHEME + ":";
    return url != null && (url.startsWith(MAINLAND_PREFIX) || url.startsWith(OVERSEA_PREFIX));
  }

  // e.g. jdbc:clickzetta://{Account}.api.Lakehouse.ClickZetta.com/{Workspace}
  public static CZConnectContext parse(String url, Properties info) throws SQLException {
    String scheme;
    boolean useNewRestful = true;
    String host = null;
    int port = -1;
    Map parameters = new HashMap<>();
    Map configInUrl = new HashMap<>();
    try {
      String regex = "jdbc:(\\w+)://(.+)";
      Pattern pattern = Pattern.compile(regex);
      Matcher matcher = pattern.matcher(url);
      if (!matcher.matches()) {
          throw new SQLException("url pattern not match, invalid url");
      }
      if (!Objects.equals(matcher.group(1), MAINLAND_SCHEME) && !Objects.equals(matcher.group(1), OVERSEA_SCHEME)) {
        throw new SQLException("invalid url domain: {}", matcher.group(1));
      }
      String afterPrefix;
      if (!matcher.group(2).startsWith("http") && !matcher.group(2).startsWith("https")) {
        afterPrefix = matcher.group(1) + "://" + matcher.group(2);
      } else {
        afterPrefix = matcher.group(2);
      }

      // encode special characters
      String[] splitStrs = afterPrefix.split(Pattern.quote("?"), 2);
      if (splitStrs.length == 2 && !StringUtils.isEmpty(splitStrs[1])) {
        afterPrefix = splitStrs[0] + "?" + splitStrs[1].replace("%", "%25")
                                                       .replace("#", "%23")
                                                       .replace(" ", "%20")
                                                       .replace("+", "%2B")
                                                       .replace("?", "%3F")
                                                       .replace("/", "%2F");
      }
      URI uri = new URI(afterPrefix);
      String query = uri.getQuery();
      if (query != null) {
        String[] pairs = query.split("&");
        for (String pair : pairs) {
          int idx = pair.indexOf("=");
          String key = pair.substring(0, idx);
          String value = pair.substring(idx + 1);
          if (key.startsWith("cz.")) {
            configInUrl.put(key, value);
          }
          parameters.put(key.toLowerCase(), value);
        }
      }

      scheme = uri.getScheme();
      String authority = uri.getRawAuthority();
      String[] hostAndPort = authority.split(":");
      if (hostAndPort.length == 2) {
        host = hostAndPort[0];
        port = Integer.parseInt(hostAndPort[1]);
      } else if (hostAndPort.length == 1) {
        host = hostAndPort[0];
      }

      String instance_name = "";
      if (host.indexOf(".") > 0) {
        instance_name = host.substring(0, host.indexOf("."));
        host = host.substring(host.indexOf(".") + 1);
      }
      logger.info("using instance_name {}. ", instance_name);

      if (!scheme.equals(MAINLAND_SCHEME) && !scheme.equals(OVERSEA_SCHEME)
              && !scheme.equals("http") && !scheme.equals("https")) {
        throw new SQLException("invalid schema");
      }
      if (scheme.equals(MAINLAND_SCHEME) || scheme.equals(OVERSEA_SCHEME)) {
        scheme = "https";
      }
      if (host == null || host.isEmpty()) {
        logger.warn("host is null.");
        throw new SQLException("host is null");
      }

      String path = uri.getPath();
      String[] paths = path.split("/");
      if (paths.length != 2) {
        logger.warn("Path length is less than 2.");
        throw new SQLException("workspace is not given");
      }
      String workspace = paths[1];

        String username = "";
      if (parameters.get("username") != null) {
        username = parameters.get("username").toString();
        logger.info("username: " + username);
      } else if (parameters.get("user") != null) {
        username = parameters.get("user").toString();
        logger.info("user: " + username);
      }

      String password = "";
      if (parameters.get("password") != null) {
        password = parameters.get("password").toString();
        logger.info("password: " + "********");
      }

      String magicToken = "";
      if (parameters.get("magic_token") != null) {
        magicToken = parameters.get("magic_token").toString();
        logger.info("magic_token: " + "********");
      }

      String schema = "";
      if (parameters.get("schema") != null) {
        schema = parameters.get("schema").toString();
        logger.info("schema: " + schema);
      }
      String virtualCluster = "";
      if (parameters.get("vcluster") != null) {
        virtualCluster = parameters.get("vcluster").toString();
        logger.info("vcluster: " + virtualCluster);
      } else if (parameters.get("virtualcluster") != null) {
        virtualCluster = parameters.get("virtualcluster").toString();
        logger.info("virtualcluster: " + virtualCluster);
      }
      int hybridPollingTimeout = 30;
      if (parameters.get("hybridpollingtimeout") != null) {
        hybridPollingTimeout = Integer.parseInt(parameters.get("hybridpollingtimeout").toString());
        logger.info("hybridpollingtimeout: " + hybridPollingTimeout);
      }
      int httpPoolSize = 2;
      if (parameters.get("httppoolsize") != null) {
        httpPoolSize = Integer.parseInt(parameters.get("httppoolsize").toString());
        logger.info("httpPoolSize: {}" ,httpPoolSize);
      }
      boolean useOssInternalEndpoint = true;
      if (parameters.get("use_oss_internal_endpoint") != null) {
        useOssInternalEndpoint = Boolean.parseBoolean(parameters.get("use_oss_internal_endpoint").toString());
        logger.info("useOssInternalEndpoint: {}" ,useOssInternalEndpoint);
      }

      String lakehouseInstance = "";
      if (parameters.get("lh_service") != null) {
        lakehouseInstance = parameters.get("lh_service").toString();
        logger.info("lakehouseInstance: " + lakehouseInstance);
      }
      RunningMode mode = RunningMode.GATEWAY;
      if (parameters.get("access_mode") != null) {
        String modeStr = parameters.get("access_mode").toString().toLowerCase();
        switch (modeStr) {
          case "direct":
            mode = RunningMode.COORDINATOR;
            break;
          case "dryrun":
            mode = RunningMode.DRYRUN;
            break;
          case "across_vpc":
            mode = RunningMode.ACROSS_VPC;
            break;
          case "direct_service":
            mode = RunningMode.COORDINATOR_SERVICE;
            break;
        }
        logger.info("running mode: {}", mode);
      }
      String igsMasterAddress = "";
      int igsMasterPort = 10086;
      if (mode == RunningMode.COORDINATOR || mode == RunningMode.COORDINATOR_SERVICE) {
        if (parameters.get("igs_master_address") != null) {
          igsMasterAddress = parameters.get("igs_master_address").toString();
          logger.info("igs_master_address: " + igsMasterAddress);
        }
        if (parameters.get("igs_master_port") != null) {
          igsMasterPort = Integer.parseInt(parameters.get("igs_master_port").toString());
          logger.info("igs_master_port: " + igsMasterPort);
        }
      }
      int queryTimeout = 0;
      if (parameters.get("querytimeout") != null) {
        queryTimeout = Integer.parseInt((String) parameters.get("querytimeout"));
        logger.info("queryTimeout: {}", queryTimeout);
      }
      if (parameters.get("use_http") != null && parameters.get("use_http").equals("true")) {
        scheme = "http";
        logger.info("use_http: true");
      }
      if (parameters.get("use_new_restful") != null) {
        if (parameters.get("use_new_restful").equals("true")) {
          useNewRestful = true;
          logger.info("use_new_restful: true");
        } else if (parameters.get("use_new_restful").equals("false")) {
          useNewRestful = false;
          logger.info("use_new_restful: false");
        }
      }
      long tokenExpireTimeMs = 0;
      if (parameters.get("token_expire_time_ms") != null) {
        tokenExpireTimeMs = Long.parseLong((String) parameters.get("token_expire_time_ms"));
        logger.info("token_expire_time_ms: {}", tokenExpireTimeMs);
      }
      if (parameters.get("tableau_mode") != null) {
        tableauMode = parameters.get("tableau_mode").equals("true");
      }
      if (parameters.get("dbapi_mode") != null) {
        dbapiMode = parameters.get("dbapi_mode").equals("true");
      }
      String queryTag = "";
      if (parameters.get("query_tag") != null) {
        queryTag = parameters.get("query_tag").toString();
        if (queryTag.length() > 1000) {
          throw new IllegalArgumentException("query_tag length should be less than 1000");
        }
        logger.info("query_tag: {}", queryTag);
      }
      long volumeTTL = 3600L;
      if (parameters.get("volume_ttl") != null) {
        volumeTTL = Long.parseLong((String) parameters.get("volume_ttl"));
        logger.info("volume_ttl: {}", volumeTTL);
      }
      boolean volumeWithDownload = true;
      if (parameters.get("volume_with_download") != null) {
          volumeWithDownload = Boolean.parseBoolean((String) parameters.get("volume_with_download"));
          logger.info("volume_with_download: {}", volumeWithDownload);
      }
      boolean useObjectStoreHttps = true;
      if (parameters.get("use_object_store_https") != null) {
        useObjectStoreHttps = Boolean.parseBoolean((String) parameters.get("use_object_store_https"));
        logger.info("use_object_store_https: {}", useObjectStoreHttps);
      }

      String namespace = workspace;
      if (!schema.isEmpty()) {
        namespace = workspace + "." + schema;
      }

      if (info != null) {
        if (info.getProperty("lh_service") != null) {
          lakehouseInstance = info.getProperty("lh_service");
          logger.info("lakehouseInstance from property: " + lakehouseInstance);
        }
        if (info.getProperty("username") != null) {
          username = info.getProperty("username");
          logger.info("username from property: " + username);
        } else if (info.getProperty("user") != null) {
          username = info.getProperty("user");
          logger.info("user from property: " + username);
        }
        if (info.getProperty("password") != null) {
          password = info.getProperty("password");
          logger.info("password from property: " + "********");
        }
        if (info.getProperty("use_object_store_https") != null) {
          useObjectStoreHttps = Boolean.parseBoolean(info.getProperty("use_object_store_https"));
          logger.info("use_object_store_https from property: {}", useObjectStoreHttps);
        }
      }

      if (mode == RunningMode.GATEWAY) {
        if ((username.isEmpty() || password.isEmpty()) && magicToken.isEmpty()) {
          logger.info("UserNameOrPassword is null.");
          throw new SQLException("UserNameOrPassword is null.");
        }
      }

      return new CZConnectContext(url, scheme, host, port, instance_name, workspace, username, password, schema,
              virtualCluster, hybridPollingTimeout, namespace, lakehouseInstance, mode, queryTimeout, configInUrl,
              igsMasterAddress, igsMasterPort, magicToken, useNewRestful, tokenExpireTimeMs, useOssInternalEndpoint,
              httpPoolSize, queryTag, volumeTTL, volumeWithDownload, useObjectStoreHttps);
    } catch (Exception ex) {
      throw new SQLException("invalid url: " + ex.getMessage());
    }
  }

  public static boolean getTableauMode() {
    return tableauMode;
  }

  public static boolean getDbapiMode() {
    return dbapiMode;
  }

  public String toString() {
    StringBuilder urlStr = new StringBuilder();
    urlStr.append(scheme);
    urlStr.append("://");
    urlStr.append(host);
    if (port != -1) {
      urlStr.append(":");
      urlStr.append(port);
    }
    return urlStr.toString();
  }

  public String toJson() {
    JSONObject object = new JSONObject();
    object.put("host", host);
    object.put("instance", instance_name);
    object.put("user", userName);
    object.put("workspace", workspace);
    object.put("schema", schema);
    object.put("vc", virtualCluster);
    object.put("maxRowSize", maxRowSize);
    object.put("priority", priorityInString);
    object.put("configs", settings);

    return object.toString();
  }

  String getIgsUrl() {
    String host = this.host;
    if (port != -1) {
      host += ":" + port;
    }
    return String.format("igs:clickzetta://%s" +
            ".%s/%s?schema=%s", instance_name, host, workspace, schema);
  }

  String getSchema() {
    return schema;
  }

  void setVc(String vc) {
    virtualCluster = vc;
  }

  void setPriorityInString(String s) {
    priorityInString = s;
  }

  void setSchema(String sch) {
    schema = sch;
    logger.info("switch schema: " + sch);
  }

  // TODO: remove public
  public String getHost() {
    return host;
  }

  public int getPort() {
    return port;
  }

  String getLakeHouseName() {
    return instance_name;
  }

  String getWorkspace() {
    return workspace;
  }

  String getUserName() {
    return userName;
  }

  // for test
  String getPassword() {
    return password;
  }

  String getLakehouseInstance() {
    return lakehouseInstance;
  }

  // direct -> oss internal
  // direct + useOssInternal -> oss internal
  // direct + !useOssInternal -> oss external
  boolean useInternalOssEndpoint() {
    boolean result = mode == RunningMode.COORDINATOR || mode == RunningMode.ACROSS_VPC;
    result &= useOssInternalEndpointFlag;
    return result;
  }

  String getURL() {
    return url;
  }

  String getUrlForGetToken() {
    StringBuilder urlStr = new StringBuilder();
    urlStr.append(scheme + "://");
    urlStr.append(host);
    if (port != -1) {
      urlStr.append(":");
      urlStr.append(port);
    }
    urlStr.append("/clickzetta-portal/user/loginSingle");
    return urlStr.toString();
  }

  String getUrlForGetRegion() {
    StringBuilder urlStr = new StringBuilder();
    urlStr.append(scheme + "://");
    urlStr.append(host);
    if (port != -1) {
      urlStr.append(":");
      urlStr.append(port);
    }
    urlStr.append("/clickzetta-hornhub/hornhub/service/getInsideUrl");
    logger.info("getUrlForGetRegion: " + urlStr);
    return urlStr.toString();
  }

  Map getRequestBodyForGetToken() throws SQLException {
    if (userName.isEmpty() || password.isEmpty()) {
      throw new SQLException("No user or password.");
    }
    Map request = new HashMap<>();
    request.put("username", userName);
    request.put("password", password);
    request.put("instanceName", instance_name);
    return request;
  }

  void setToken(String token) {
    this.token = token;
  }

  String getToken() {
    return token;
  }

  String getNamespace() {
    return namespace;
  }

  String getVirtualCluster() {
    return virtualCluster;
  }

  String getPriority() {
    return priorityInString;
  }

  public int getHybridPollingTimeout() {
    return hybridPollingTimeout;
  }

  void setHybridPollingTimeout(int timeout) {
    hybridPollingTimeout = timeout;
  }

  int getJDBCMode() {
    return jdbcMode;
  }

  void setJDBCMode(int mode) {
    jdbcMode = mode;
  }

  int getQueryTimeout() {
    return queryTimeout;
  }

  void setQueryTimeout(int timeout) {
    queryTimeout = timeout;
    logger.info("setQueryTimeout: {}", timeout);
  }

  int getMaxRowSize() {
    return maxRowSize;
  }

  void setMaxRowSize(int count) {
    settings.put("cz.sql.result.row.partial.limit", String.valueOf(count));
    maxRowSize = count;
  }

  void setCsvFieldDelimiter(char delimiter) {
    csvFieldDelimiter = delimiter;
    logger.info("set csvFieldDelimiter {}", (int)csvFieldDelimiter);
  }

  void setCsvEscapeChar(char escapeChar) {
    csvEscapeChar = escapeChar;
    logger.info("set csvFieldDelimiter {}", (int)csvEscapeChar);
  }

  void setCsvWithHeader(boolean withHeader) {
    csvWithHeader = withHeader;
  }
  void setCsvSkipHeaer(boolean skipHeader) {
    csvSkipHeader = skipHeader;
  }

  void setCsvNullString(String nullString) {
    csvNullString = nullString;
  }

  void setQueryTag(String tag) {
    if (tag == null || tag.length() > 1000) {
      throw new IllegalArgumentException("query tag is null or too long");
    }
    queryTag = tag;
  }

  char getCsvFieldDelimiter() {
    return csvFieldDelimiter;
  }

  char getCsvEscapeChar() {
    return csvEscapeChar;
  }

  boolean getCsvWithHeader() {
    return csvWithHeader;
  }
  boolean getCsvSkipHeader() {
    return csvSkipHeader;
  }

  String getCsvNullString() {
    return csvNullString;
  }

  void setCsvIgnoreMalformedRecord(Long count) {
    csvIgnoreMalformedRecord = count;
  }

  long getCsvTimeZonePlus() {
    return timeZone;
  }

  void setCsvTimeZonePlus(long tz) {
    timeZone = tz;
  }

  Long getCsvIgnoreMalformedRecord() {
    return csvIgnoreMalformedRecord;
  }

  void setConfig(String key, String value) {
    settings.put(key, value);
  }

  Map getConfigs() {
    return settings;
  }

  void resetConfigs() {
    settings.clear();
    settings.putAll(defaultSettings);
    settings.putAll(configsInUrl);
  }

  void resetConfig(String key) {
    settings.remove(key.toLowerCase());
  }

  boolean showDebug() {
    return showDebugLog;
  }

  void setShowDebug(boolean show) {
    showDebugLog = show;
  }

  void setUserId(long userId) throws SQLException {
    this.userId = userId;
  }

  void setInstanceId(long instanceId) throws SQLException {
    this.instanceId = instanceId;
  }

  public long getInstanceId() {
    if (instanceId != -1) {
      return instanceId;
    } else {
      try {
        return Long.parseLong(getLakeHouseName());
      } catch (NumberFormatException e) {
        return 1;
      }
    }
  }

  public long getUserId() {
    if (userId != -1) {
      return userId;
    } else {
      return Long.parseLong(getUserName());
    }
  }

  void setWorkspace(String workspace) {
    this.workspace = workspace;
  }

  void clearContextForDirectMode() throws SQLException {
    if (mode != RunningMode.COORDINATOR) {
      throw new SQLException("Only direct access mode support clear context.");
    }
    instanceId = -1;
    userId = -1;
    workspace = "";
    resetConfigs();
    schema = "";
    virtualCluster = "";
    showDebugLog = false;
    queryTimeout = 0;
    jdbcMode = 0;
    maxRowSize = 0;
  }

  public RunningMode getRunningMode() {
    return mode;
  }

  public void addConfigStatementHistory(String statement) {
    logger.info("config statement histories: {}, {}", configStatements.size(), statement);
    if (configStatements.size() >= 10) {
      configStatements.remove(configStatements.size() - 1);
    }
    configStatements.add(0, statement);
  }

  public List getConfigStatementHistory() {
    return configStatements;
  }

  public String getIgsMasterAddress() {
    return igsMasterAddress;
  }
  public int getIgsMasterPort() {
    return igsMasterPort;
  }
  public boolean isUseNewRestful() {
    return useNewRestful;
  }
  public long getTokenExpireTimeMs() {
    return tokenExpireTimeMs;
  }
  public boolean useOssInternalEndpointFlag() {
    return useOssInternalEndpointFlag;
  }
  public HttpHelper getHttpHelper() {
    return httpHelper;
  }
  public String getQueryTag() {
    return queryTag;
  }
  public String getVolumePath() {
    return volumePath;
  }
  public void setVolumePath(String volumePath) {
    this.volumePath = volumePath;
  }
  public String getLocalFilePath() {
      return localFilePath;
  }
  public void setLocalFilePath(String localFilePath) {
      this.localFilePath = localFilePath;
  }
  public int getVolumeParallel() {
    return volumeParallel;
  }
  public void setVolumeParallel(int volumeParallel) {
    this.volumeParallel = volumeParallel;
  }
  public boolean isVolumeAutoCompress() {
    return volumeAutoCompress;
  }
  public void setVolumeAutoCompress(boolean volumeAutoCompress) {
    this.volumeAutoCompress = volumeAutoCompress;
  }
  public String getVolumeSourceCompressionType() {
      return volumeSourceCompressionType;
  }
  public void setVolumeSourceCompressionType(String volumeSourceCompressionType) {
      this.volumeSourceCompressionType = volumeSourceCompressionType;
  }
  public long getVolumeTTL() {
      return volumeTTL;
  }
  public void setVolumeTTL(long volumeTTL) {
      this.volumeTTL = volumeTTL;
  }
  public boolean getVolumeDownloadFlag() {
      return volumeDownloadFlag;
  }
  public void setVolumeDownloadFlag(boolean volumeDownloadFlag) {
      this.volumeDownloadFlag = volumeDownloadFlag;
  }
  public String getVolumePattern() {
      return volumePattern;
  }
  public void setVolumePattern(String volumePattern) {
      this.volumePattern = volumePattern;
  }

  public int getJdbcQueryTimeoutMs() {
      return jdbcQueryTimeoutMs;
  }
  public void setJdbcQueryTimeoutMs(int jdbcQueryTimeoutMs) {
      this.jdbcQueryTimeoutMs = jdbcQueryTimeoutMs;
  }

  public boolean useObjectStoreHttps() {
    return useObjectStoreHttps;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy