Skip to content

Commit

Permalink
Merge pull request kruize#1381 from msvinaykumar/envfix
Browse files Browse the repository at this point in the history
Environment variable error found in the log
  • Loading branch information
dinogun authored Nov 22, 2024
2 parents 227769f + cab1b67 commit 569b668
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,8 @@ public void run() {
Map<String, CreateExperimentAPIObject> 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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 1 addition & 2 deletions src/main/java/com/autotune/utils/KruizeConstants.java
Original file line number Diff line number Diff line change
Expand Up @@ -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";
}
Expand Down Expand Up @@ -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";
Expand Down

0 comments on commit 569b668

Please sign in to comment.