diff --git a/src/main/java/com/gotocompany/firehose/config/OSSConfig.java b/src/main/java/com/gotocompany/firehose/config/OSSConfig.java index dc521eaf..82a07d6d 100644 --- a/src/main/java/com/gotocompany/firehose/config/OSSConfig.java +++ b/src/main/java/com/gotocompany/firehose/config/OSSConfig.java @@ -2,51 +2,38 @@ import org.aeonbits.owner.Config; -/** - * OSS_TYPE needs to be set as SINK_BLOB or DLQ_BLOB_STORAGE. - */ public interface OSSConfig extends Config { - @Key("${OSS_TYPE}_OSS_ENDPOINT") String getOSSEndpoint(); + @Key("${OSS_TYPE}_OSS_ACCESS_KEY_ID") + String getOSSAccessKeyId(); + + @Key("${OSS_TYPE}_OSS_ACCESS_KEY_SECRET") + String getOSSAccessKeySecret(); + @Key("${OSS_TYPE}_OSS_BUCKET_NAME") String getOSSBucketName(); @Key("${OSS_TYPE}_OSS_DIRECTORY_PREFIX") String getOSSDirectoryPrefix(); - @Key("${OSS_TYPE}_OSS_ACCESS_KEY_ID") - String getOSSAccessKeyId(); + @Key("${OSS_TYPE}_OSS_REGION") + String getOSSRegion(); - @Key("${OSS_TYPE}_OSS_ACCESS_KEY_SECRET") - String getOSSAccessKeySecret(); + @Key("${OSS_TYPE}_OSS_MAX_CONNECTIONS") + @DefaultValue("1024") + Integer getOSSMaxConnections(); + + @Key("${OSS_TYPE}_OSS_SOCKET_TIMEOUT") + @DefaultValue("50000") + Integer getOSSSocketTimeout(); + + @Key("${OSS_TYPE}_OSS_CONNECTION_TIMEOUT") + @DefaultValue("50000") + Integer getOSSConnectionTimeout(); - /** - * @return Total retry attempts for OSS object storage. - */ - @Key("${OSS_TYPE}_OSS_RETRY_MAX_ATTEMPTS") - @DefaultValue("10") - Integer getOSSRetryMaxAttempts(); - - /** - * @return Total Timeout after which retries will fail. - */ - @Key("${OSS_TYPE}_OSS_RETRY_TOTAL_TIMEOUT_MS") - @DefaultValue("120000") - Long getOSSRetryTotalTimeoutMS(); - - /** - * @return Initial delay before retrying. - */ - @Key("${OSS_TYPE}_OSS_RETRY_INITIAL_DELAY_MS") - @DefaultValue("1000") - Long getOSSRetryInitialDelayMS(); - - /** - * @return Max delay before each retry - */ - @Key("${OSS_TYPE}_OSS_RETRY_MAX_DELAY_MS") - @DefaultValue("30000") - Long getOSSRetryMaxDelayMS(); + @Key("${OSS_TYPE}_OSS_MAX_ERROR_RETRY") + @DefaultValue("3") + Integer getOSSMaxErrorRetry(); }