diff --git a/src/main/java/com/autotune/analyzer/workerimpl/BulkJobManager.java b/src/main/java/com/autotune/analyzer/workerimpl/BulkJobManager.java index b50f66f51..c4eb77237 100644 --- a/src/main/java/com/autotune/analyzer/workerimpl/BulkJobManager.java +++ b/src/main/java/com/autotune/analyzer/workerimpl/BulkJobManager.java @@ -148,8 +148,8 @@ public void run() { Map createExperimentAPIObjectMap = getExperimentMap(labelString, jobData, metadataInfo, datasource); //Todo Store this map in buffer and use it if BulkAPI pods restarts and support experiment_type jobData.setTotal_experiments(createExperimentAPIObjectMap.size()); jobData.setProcessed_experiments(0); - if (jobData.getTotal_experiments() > KruizeDeploymentInfo.BULK_API_LIMIT) { - setFinalJobStatus(FAILED,String.valueOf(HttpURLConnection.HTTP_BAD_REQUEST),LIMIT_INFO,datasource); + if (jobData.getTotal_experiments() > KruizeDeploymentInfo.bulk_api_limit) { + setFinalJobStatus(FAILED,String.valueOf(HttpURLConnection.HTTP_BAD_REQUEST),LIMIT_INFO,datasource); } else { ExecutorService createExecutor = Executors.newFixedThreadPool(bulk_thread_pool_size); ExecutorService generateExecutor = Executors.newFixedThreadPool(bulk_thread_pool_size); diff --git a/src/main/java/com/autotune/operator/KruizeDeploymentInfo.java b/src/main/java/com/autotune/operator/KruizeDeploymentInfo.java index bec435227..31715f6f0 100644 --- a/src/main/java/com/autotune/operator/KruizeDeploymentInfo.java +++ b/src/main/java/com/autotune/operator/KruizeDeploymentInfo.java @@ -81,8 +81,7 @@ public class KruizeDeploymentInfo { public static Boolean log_http_req_resp = false; public static String recommendations_url; public static String experiments_url; - public static int BULK_API_LIMIT = 1000; - public static int BULK_API_MAX_BATCH_SIZE = 100; + public static Integer bulk_api_limit = 1000; public static Integer bulk_thread_pool_size = 3; public static int generate_recommendations_date_range_limit_in_days = 15; public static Integer delete_partition_threshold_in_days = DELETE_PARTITION_THRESHOLD_IN_DAYS; diff --git a/src/main/java/com/autotune/utils/KruizeConstants.java b/src/main/java/com/autotune/utils/KruizeConstants.java index 8e8cf0a1e..34b90d0e5 100644 --- a/src/main/java/com/autotune/utils/KruizeConstants.java +++ b/src/main/java/com/autotune/utils/KruizeConstants.java @@ -708,7 +708,6 @@ public static final class KRUIZE_CONFIG_ENV_NAME { public static final String RECOMMENDATIONS_URL = "recommendationsURL"; public static final String EXPERIMENTS_URL = "experimentsURL"; public static final String BULK_API_LIMIT = "bulkapilimit"; - public static final String BULK_API_CHUNK_SIZE = "bulkapichunksize"; public static final String BULK_THREAD_POOL_SIZE = "bulkThreadPoolSize"; public static final String EXPERIMENT_NAME_FORMAT = "experimentNameFormat"; } @@ -806,7 +805,7 @@ public static final class KRUIZE_BULK_API { public static final String IN_PROGRESS = "IN_PROGRESS"; public static final String COMPLETED = "COMPLETED"; public static final String FAILED = "FAILED"; - public static final String LIMIT_MESSAGE = "The number of experiments exceeds %s."; + public static final String LIMIT_MESSAGE = "The number of experiments exceeds the defined limit."; public static final String NOTHING = "Nothing to do."; public static final String START_TIME = "start_time"; public static final String END_TIME = "end_time";