Remove the ml_messages.properties file (elastic/x-pack-elasticsearch#657)
String constants are no in Messages Original commit: elastic/x-pack-elasticsearch@ab8af83e10
This commit is contained in:
parent
2d27e8ad81
commit
69880373fc
|
@ -7,235 +7,117 @@ package org.elasticsearch.xpack.ml.job.messages;
|
|||
|
||||
import java.text.MessageFormat;
|
||||
import java.util.Locale;
|
||||
import java.util.ResourceBundle;
|
||||
|
||||
/**
|
||||
* Defines the keys for all the message strings
|
||||
* Log and audit message strings
|
||||
*/
|
||||
public final class Messages {
|
||||
/**
|
||||
* The base name of the bundle without the .properties extension
|
||||
* or locale
|
||||
*/
|
||||
private static final String BUNDLE_NAME = "org.elasticsearch.xpack.ml.job.messages.ml_messages";
|
||||
public static final String AUTODETECT_FLUSH_UNEXPTECTED_DEATH = "autodetect.flush.failed.unexpected.death";
|
||||
|
||||
public static final String CPU_LIMIT_JOB = "cpu.limit.jobs";
|
||||
public static final String DATAFEED_AGGREGATIONS_REQUIRES_JOB_WITH_SUMMARY_COUNT_FIELD = "A job configured with a datafeed with aggregations must have summary_count_field_name ''{0}''";
|
||||
public static final String DATAFEED_CANNOT_DELETE_IN_CURRENT_STATE = "Cannot delete datafeed [{0}] while its status is {1}";
|
||||
public static final String DATAFEED_CANNOT_UPDATE_IN_CURRENT_STATE = "Cannot update datafeed [{0}] while its status is {1}";
|
||||
public static final String DATAFEED_CONFIG_CANNOT_USE_SCRIPT_FIELDS_WITH_AGGS = "script_fields cannot be used in combination with aggregations";
|
||||
public static final String DATAFEED_CONFIG_INVALID_OPTION_VALUE = "Invalid {0} value ''{1}'' in datafeed configuration";
|
||||
public static final String DATAFEED_DOES_NOT_SUPPORT_JOB_WITH_LATENCY = "A job configured with datafeed cannot support latency";
|
||||
public static final String DATAFEED_NOT_FOUND = "No datafeed with id [{0}] exists";
|
||||
|
||||
public static final String DATASTORE_ERROR_DELETING = "datastore.error.deleting";
|
||||
public static final String DATASTORE_ERROR_DELETING_MISSING_INDEX = "datastore.error.deleting.missing.index";
|
||||
public static final String DATASTORE_ERROR_EXECUTING_SCRIPT = "datastore.error.executing.script";
|
||||
public static final String INCONSISTENT_ID = "Inconsistent {0}; ''{1}'' specified in the body differs from ''{2}'' specified as a URL argument";
|
||||
public static final String INVALID_ID = "Invalid {0}; ''{1}'' must be lowercase alphanumeric, may contain hyphens or underscores, may not start with underscore";
|
||||
|
||||
public static final String INVALID_ID = "invalid.id";
|
||||
public static final String INCONSISTENT_ID = "inconsistent.id";
|
||||
public static final String JOB_AUDIR_DATAFEED_DATA_SEEN_AGAIN = "Datafeed has started retrieving data again";
|
||||
public static final String JOB_AUDIT_CREATED = "Job created";
|
||||
public static final String JOB_AUDIT_DATAFEED_CONTINUED_REALTIME = "Datafeed continued in real-time";
|
||||
public static final String JOB_AUDIT_DATAFEED_DATA_ANALYSIS_ERROR = "Datafeed is encountering errors submitting data for analysis: {0}";
|
||||
public static final String JOB_AUDIT_DATAFEED_DATA_EXTRACTION_ERROR = "Datafeed is encountering errors extracting data: {0}";
|
||||
public static final String JOB_AUDIT_DATAFEED_LOOKBACK_COMPLETED = "Datafeed lookback completed";
|
||||
public static final String JOB_AUDIT_DATAFEED_LOOKBACK_NO_DATA = "Datafeed lookback retrieved no data";
|
||||
public static final String JOB_AUDIT_DATAFEED_NO_DATA = "Datafeed has been retrieving no data for a while";
|
||||
public static final String JOB_AUDIT_DATAFEED_RECOVERED = "Datafeed has recovered data extraction and analysis";
|
||||
public static final String JOB_AUDIT_DATAFEED_STARTED_FROM_TO = "Datafeed started (from: {0} to: {1})";
|
||||
public static final String JOB_AUDIT_DATAFEED_STARTED_REALTIME = "Datafeed started in real-time";
|
||||
public static final String JOB_AUDIT_DATAFEED_STOPPED = "Datafeed stopped";
|
||||
public static final String JOB_AUDIT_DELETED = "Job deleted";
|
||||
public static final String JOB_AUDIT_OLD_RESULTS_DELETED = "Deleted results prior to {1}";
|
||||
public static final String JOB_AUDIT_REVERTED = "Job model snapshot reverted to ''{0}''";
|
||||
public static final String JOB_AUDIT_SNAPSHOT_DELETED = "Job model snapshot ''{0}'' deleted";
|
||||
|
||||
public static final String LICENSE_LIMIT_DETECTORS = "license.limit.detectors";
|
||||
public static final String LICENSE_LIMIT_JOBS = "license.limit.jobs";
|
||||
public static final String LICENSE_LIMIT_DETECTORS_REACTIVATE = "license.limit.detectors.reactivate";
|
||||
public static final String LICENSE_LIMIT_JOBS_REACTIVATE = "license.limit.jobs.reactivate";
|
||||
public static final String LICENSE_LIMIT_PARTITIONS = "license.limit.partitions";
|
||||
public static final String JOB_CONFIG_BYFIELD_INCOMPATIBLE_FUNCTION = "by_field_name cannot be used with function ''{0}''";
|
||||
public static final String JOB_CONFIG_CATEGORIZATION_FILTERS_CONTAINS_DUPLICATES = "categorization_filters contain duplicates";
|
||||
public static final String JOB_CONFIG_CATEGORIZATION_FILTERS_CONTAINS_EMPTY = "categorization_filters are not allowed to contain empty strings";
|
||||
public static final String JOB_CONFIG_CATEGORIZATION_FILTERS_CONTAINS_INVALID_REGEX = "categorization_filters contains invalid regular expression ''{0}''";
|
||||
public static final String JOB_CONFIG_CATEGORIZATION_FILTERS_REQUIRE_CATEGORIZATION_FIELD_NAME = "categorization_filters require setting categorization_field_name";
|
||||
public static final String JOB_CONFIG_CONDITION_INVALID_VALUE_NULL = "Invalid condition: the value field cannot be null";
|
||||
public static final String JOB_CONFIG_CONDITION_INVALID_VALUE_NUMBER = "Invalid condition value: cannot parse a double from string ''{0}''";
|
||||
public static final String JOB_CONFIG_CONDITION_INVALID_VALUE_REGEX = "Invalid condition value: ''{0}'' is not a valid regular expression";
|
||||
public static final String JOB_CONFIG_DETECTION_RULE_CONDITION_CATEGORICAL_INVALID_OPTION = "Invalid detector rule: a categorical rule_condition does not support {0}";
|
||||
public static final String JOB_CONFIG_DETECTION_RULE_CONDITION_CATEGORICAL_MISSING_OPTION = "Invalid detector rule: a categorical rule_condition requires {0} to be set";
|
||||
public static final String JOB_CONFIG_DETECTION_RULE_CONDITION_INVALID_FIELD_NAME = "Invalid detector rule: field_name has to be one of {0}; actual was ''{1}''";
|
||||
public static final String JOB_CONFIG_DETECTION_RULE_CONDITION_MISSING_FIELD_NAME = "Invalid detector rule: missing field_name in rule_condition where field_value ''{0}'' is set";
|
||||
public static final String JOB_CONFIG_DETECTION_RULE_CONDITION_NUMERICAL_INVALID_OPERATOR = "Invalid detector rule: operator ''{0}'' is not allowed";
|
||||
public static final String JOB_CONFIG_DETECTION_RULE_CONDITION_NUMERICAL_INVALID_OPTION = "Invalid detector rule: a numerical rule_condition does not support {0}";
|
||||
public static final String JOB_CONFIG_DETECTION_RULE_CONDITION_NUMERICAL_MISSING_OPTION = "Invalid detector rule: a numerical rule_condition requires {0} to be set";
|
||||
public static final String JOB_CONFIG_DETECTION_RULE_CONDITION_NUMERICAL_WITH_FIELD_NAME_REQUIRES_FIELD_VALUE = "Invalid detector rule: a numerical rule_condition with field_name requires that field_value is set";
|
||||
public static final String JOB_CONFIG_DETECTION_RULE_INVALID_TARGET_FIELD_NAME = "Invalid detector rule: target_field_name has to be one of {0}; actual was ''{1}''";
|
||||
public static final String JOB_CONFIG_DETECTION_RULE_MISSING_TARGET_FIELD_NAME = "Invalid detector rule: missing target_field_name where target_field_value ''{0}'' is set";
|
||||
public static final String JOB_CONFIG_DETECTION_RULE_NOT_SUPPORTED_BY_FUNCTION = "Invalid detector rule: function {0} does not support rules";
|
||||
public static final String JOB_CONFIG_DETECTION_RULE_REQUIRES_AT_LEAST_ONE_CONDITION = "Invalid detector rule: at least one rule_condition is required";
|
||||
public static final String JOB_CONFIG_FIELDNAME_INCOMPATIBLE_FUNCTION = "field_name cannot be used with function ''{0}''";
|
||||
public static final String JOB_CONFIG_FIELD_VALUE_TOO_LOW = "{0} cannot be less than {1,number}. Value = {2,number}";
|
||||
public static final String JOB_CONFIG_FUNCTION_INCOMPATIBLE_PRESUMMARIZED = "The ''{0}'' function cannot be used in jobs that will take pre-summarized input";
|
||||
public static final String JOB_CONFIG_FUNCTION_REQUIRES_BYFIELD = "by_field_name must be set when the ''{0}'' function is used";
|
||||
public static final String JOB_CONFIG_FUNCTION_REQUIRES_FIELDNAME = "field_name must be set when the ''{0}'' function is used";
|
||||
public static final String JOB_CONFIG_FUNCTION_REQUIRES_OVERFIELD = "over_field_name must be set when the ''{0}'' function is used";
|
||||
public static final String JOB_CONFIG_ID_ALREADY_TAKEN = "The job cannot be created with the Id ''{0}''. The Id is already used.";
|
||||
public static final String JOB_CONFIG_ID_TOO_LONG = "The job id cannot contain more than {0,number,integer} characters.";
|
||||
public static final String JOB_CONFIG_INVALID_FIELDNAME_CHARS = "Invalid field name ''{0}''. Field names including over, by and partition fields cannot contain any of these characters: {1}";
|
||||
public static final String JOB_CONFIG_INVALID_TIMEFORMAT = "Invalid Time format string ''{0}''";
|
||||
public static final String JOB_CONFIG_MISSING_ANALYSISCONFIG = "An analysis_config must be set";
|
||||
public static final String JOB_CONFIG_MULTIPLE_BUCKETSPANS_MUST_BE_MULTIPLE = "Multiple bucket_span ''{0}'' must be a multiple of the main bucket_span ''{1}''";
|
||||
public static final String JOB_CONFIG_MULTIPLE_BUCKETSPANS_REQUIRE_BUCKETSPAN = "Multiple bucket_spans require a bucket_span to be specified";
|
||||
public static final String JOB_CONFIG_NO_ANALYSIS_FIELD_NOT_COUNT = "Unless the function is 'count' one of field_name, by_field_name or over_field_name must be set";
|
||||
public static final String JOB_CONFIG_NO_DETECTORS = "No detectors configured";
|
||||
public static final String JOB_CONFIG_OVERFIELD_INCOMPATIBLE_FUNCTION = "over_field_name cannot be used with function ''{0}''";
|
||||
public static final String JOB_CONFIG_OVERLAPPING_BUCKETS_INCOMPATIBLE_FUNCTION = "Overlapping buckets cannot be used with function ''{0}''";
|
||||
public static final String JOB_CONFIG_PER_PARTITION_NORMALIZATION_CANNOT_USE_INFLUENCERS = "A job configured with Per-Partition Normalization cannot use influencers";
|
||||
public static final String JOB_CONFIG_PER_PARTITION_NORMALIZATION_REQUIRES_PARTITION_FIELD = "If the job is configured with Per-Partition Normalization enabled a detector must have a partition field";
|
||||
public static final String JOB_CONFIG_UNKNOWN_FUNCTION = "Unknown function ''{0}''";
|
||||
public static final String JOB_CONFIG_UPDATE_ANALYSIS_LIMITS_MODEL_MEMORY_LIMIT_CANNOT_BE_DECREASED = "Invalid update value for analysis_limits: model_memory_limit cannot be decreased; existing is {0}, update had {1}";
|
||||
|
||||
public static final String JOB_AUDIT_CREATED = "job.audit.created";
|
||||
public static final String JOB_AUDIT_DELETED = "job.audit.deleted";
|
||||
public static final String JOB_AUDIT_PAUSED = "job.audit.paused";
|
||||
public static final String JOB_AUDIT_RESUMED = "job.audit.resumed";
|
||||
public static final String JOB_AUDIT_UPDATED = "job.audit.updated";
|
||||
public static final String JOB_AUDIT_REVERTED = "job.audit.reverted";
|
||||
public static final String JOB_AUDIT_OLD_RESULTS_DELETED = "job.audit.old.results.deleted";
|
||||
public static final String JOB_AUDIT_SNAPSHOT_DELETED = "job.audit.snapshot.deleted";
|
||||
public static final String JOB_AUDIT_DATAFEED_STARTED_FROM_TO = "job.audit.datafeed.started.from.to";
|
||||
public static final String JOB_AUDIT_DATAFEED_CONTINUED_REALTIME = "job.audit.datafeed.continued.realtime";
|
||||
public static final String JOB_AUDIT_DATAFEED_STARTED_REALTIME = "job.audit.datafeed.started.realtime";
|
||||
public static final String JOB_AUDIT_DATAFEED_LOOKBACK_COMPLETED = "job.audit.datafeed.lookback.completed";
|
||||
public static final String JOB_AUDIT_DATAFEED_LOOKBACK_NO_DATA = "job.audit.datafeed.lookback.no.data";
|
||||
public static final String JOB_AUDIT_DATAFEED_STOPPED = "job.audit.datafeed.stopped";
|
||||
public static final String JOB_AUDIT_DATAFEED_NO_DATA = "job.audit.datafeed.no.data";
|
||||
public static final String JOB_AUDIR_DATAFEED_DATA_SEEN_AGAIN = "job.audit.datafeed.data.seen.again";
|
||||
public static final String JOB_AUDIT_DATAFEED_DATA_ANALYSIS_ERROR = "job.audit.datafeed.data.analysis.error";
|
||||
public static final String JOB_AUDIT_DATAFEED_DATA_EXTRACTION_ERROR = "job.audit.datafeed.data.extraction.error";
|
||||
public static final String JOB_AUDIT_DATAFEED_RECOVERED = "job.audit.datafeed.recovered";
|
||||
public static final String JOB_DATA_CONCURRENT_USE_CLOSE = "Cannot close job {0} while the job is processing another request";
|
||||
public static final String JOB_DATA_CONCURRENT_USE_FLUSH = "Cannot flush job {0} while the job is processing another request";
|
||||
public static final String JOB_DATA_CONCURRENT_USE_UPDATE = "Cannot update job {0} while the job is processing another request";
|
||||
public static final String JOB_DATA_CONCURRENT_USE_UPLOAD = "Cannot write to job {0} while the job is processing another request";
|
||||
|
||||
public static final String SYSTEM_AUDIT_STARTED = "system.audit.started";
|
||||
public static final String SYSTEM_AUDIT_SHUTDOWN = "system.audit.shutdown";
|
||||
public static final String JOB_UNKNOWN_ID = "No known job with id ''{0}''";
|
||||
|
||||
public static final String JOB_CANNOT_DELETE_WHILE_RUNNING = "job.cannot.delete.while.running";
|
||||
public static final String JOB_CANNOT_PAUSE = "job.cannot.pause";
|
||||
public static final String JOB_CANNOT_RESUME = "job.cannot.resume";
|
||||
|
||||
public static final String JOB_CONFIG_BYFIELD_INCOMPATIBLE_FUNCTION = "job.config.byField.incompatible.function";
|
||||
public static final String JOB_CONFIG_BYFIELD_NEEDS_ANOTHER = "job.config.byField.needs.another";
|
||||
public static final String JOB_CONFIG_CATEGORIZATION_FILTERS_REQUIRE_CATEGORIZATION_FIELD_NAME = "job.config.categorization.filters."
|
||||
+ "require.categorization.field.name";
|
||||
public static final String JOB_CONFIG_CATEGORIZATION_FILTERS_CONTAINS_DUPLICATES = "job.config.categorization.filters.contains"
|
||||
+ ".duplicates";
|
||||
public static final String JOB_CONFIG_CATEGORIZATION_FILTERS_CONTAINS_EMPTY = "job.config.categorization.filter.contains.empty";
|
||||
public static final String JOB_CONFIG_CATEGORIZATION_FILTERS_CONTAINS_INVALID_REGEX = "job.config.categorization.filter.contains."
|
||||
+ "invalid.regex";
|
||||
public static final String JOB_CONFIG_CONDITION_INVALID_OPERATOR = "job.config.condition.invalid.operator";
|
||||
public static final String JOB_CONFIG_CONDITION_INVALID_VALUE_NULL = "job.config.condition.invalid.value.null";
|
||||
public static final String JOB_CONFIG_CONDITION_INVALID_VALUE_NUMBER = "job.config.condition.invalid.value.numeric";
|
||||
public static final String JOB_CONFIG_CONDITION_INVALID_VALUE_REGEX = "job.config.condition.invalid.value.regex";
|
||||
public static final String JOB_CONFIG_DETECTION_RULE_CONDITION_CATEGORICAL_INVALID_OPTION = "job.config.detectionrule.condition."
|
||||
+ "categorical.invalid.option";
|
||||
public static final String JOB_CONFIG_DETECTION_RULE_CONDITION_CATEGORICAL_MISSING_OPTION = "job.config.detectionrule.condition."
|
||||
+ "categorical.missing.option";
|
||||
public static final String JOB_CONFIG_DETECTION_RULE_CONDITION_INVALID_FIELD_NAME = "job.config.detectionrule.condition.invalid."
|
||||
+ "fieldname";
|
||||
public static final String JOB_CONFIG_DETECTION_RULE_CONDITION_MISSING_FIELD_NAME = "job.config.detectionrule.condition.missing."
|
||||
+ "fieldname";
|
||||
public static final String JOB_CONFIG_DETECTION_RULE_CONDITION_NUMERICAL_INVALID_OPERATOR = "job.config.detectionrule.condition."
|
||||
+ "numerical.invalid.operator";
|
||||
public static final String JOB_CONFIG_DETECTION_RULE_CONDITION_NUMERICAL_INVALID_OPTION = "job.config.detectionrule.condition."
|
||||
+ "numerical.invalid.option";
|
||||
public static final String JOB_CONFIG_DETECTION_RULE_CONDITION_NUMERICAL_MISSING_OPTION = "job.config.detectionrule.condition."
|
||||
+ "numerical.missing.option";
|
||||
public static final String JOB_CONFIG_DETECTION_RULE_CONDITION_NUMERICAL_WITH_FIELD_NAME_REQUIRES_FIELD_VALUE = "job.config."
|
||||
+ "detectionrule.condition.numerical.with.fieldname.requires.fieldvalue";
|
||||
public static final String JOB_CONFIG_DETECTION_RULE_INVALID_TARGET_FIELD_NAME = "job.config.detectionrule.invalid.targetfieldname";
|
||||
public static final String JOB_CONFIG_DETECTION_RULE_MISSING_TARGET_FIELD_NAME = "job.config.detectionrule.missing.targetfieldname";
|
||||
public static final String JOB_CONFIG_DETECTION_RULE_NOT_SUPPORTED_BY_FUNCTION = "job.config.detectionrule.not.supported.by.function";
|
||||
public static final String JOB_CONFIG_DETECTION_RULE_REQUIRES_AT_LEAST_ONE_CONDITION = "job.config.detectionrule.requires.at."
|
||||
+ "least.one.condition";
|
||||
public static final String JOB_CONFIG_FIELDNAME_INCOMPATIBLE_FUNCTION = "job.config.fieldname.incompatible.function";
|
||||
public static final String JOB_CONFIG_FUNCTION_REQUIRES_BYFIELD = "job.config.function.requires.byfield";
|
||||
public static final String JOB_CONFIG_FUNCTION_REQUIRES_FIELDNAME = "job.config.function.requires.fieldname";
|
||||
public static final String JOB_CONFIG_FUNCTION_REQUIRES_OVERFIELD = "job.config.function.requires.overfield";
|
||||
public static final String JOB_CONFIG_ID_TOO_LONG = "job.config.id.too.long";
|
||||
public static final String JOB_CONFIG_ID_ALREADY_TAKEN = "job.config.id.already.taken";
|
||||
public static final String JOB_CONFIG_INVALID_FIELDNAME_CHARS = "job.config.invalid.fieldname.chars";
|
||||
public static final String JOB_CONFIG_INVALID_TIMEFORMAT = "job.config.invalid.timeformat";
|
||||
public static final String JOB_CONFIG_FUNCTION_INCOMPATIBLE_PRESUMMARIZED = "job.config.function.incompatible.presummarized";
|
||||
public static final String JOB_CONFIG_MISSING_ANALYSISCONFIG = "job.config.missing.analysisconfig";
|
||||
public static final String JOB_CONFIG_FIELD_VALUE_TOO_LOW = "job.config.field.value.too.low";
|
||||
public static final String JOB_CONFIG_NO_ANALYSIS_FIELD = "job.config.no.analysis.field";
|
||||
public static final String JOB_CONFIG_NO_ANALYSIS_FIELD_NOT_COUNT = "job.config.no.analysis.field.not.count";
|
||||
public static final String JOB_CONFIG_NO_DETECTORS = "job.config.no.detectors";
|
||||
public static final String JOB_CONFIG_OVERFIELD_INCOMPATIBLE_FUNCTION = "job.config.overField.incompatible.function";
|
||||
public static final String JOB_CONFIG_OVERLAPPING_BUCKETS_INCOMPATIBLE_FUNCTION = "job.config.overlapping.buckets.incompatible."
|
||||
+ "function";
|
||||
public static final String JOB_CONFIG_OVERFIELD_NEEDS_ANOTHER = "job.config.overField.needs.another";
|
||||
public static final String JOB_CONFIG_MULTIPLE_BUCKETSPANS_REQUIRE_BUCKETSPAN = "job.config.multiple.bucketspans.require.bucket_span";
|
||||
public static final String JOB_CONFIG_MULTIPLE_BUCKETSPANS_MUST_BE_MULTIPLE = "job.config.multiple.bucketspans.must.be.multiple";
|
||||
public static final String JOB_CONFIG_PER_PARTITION_NORMALIZATION_REQUIRES_PARTITION_FIELD = "job.config.per.partition.normalization."
|
||||
+ "requires.partition.field";
|
||||
public static final String JOB_CONFIG_PER_PARTITION_NORMALIZATION_CANNOT_USE_INFLUENCERS = "job.config.per.partition.normalization."
|
||||
+ "cannot.use.influencers";
|
||||
|
||||
|
||||
public static final String JOB_CONFIG_UPDATE_ANALYSIS_LIMITS_PARSE_ERROR = "job.config.update.analysis.limits.parse.error";
|
||||
public static final String JOB_CONFIG_UPDATE_ANALYSIS_LIMITS_CANNOT_BE_NULL = "job.config.update.analysis.limits.cannot.be.null";
|
||||
public static final String JOB_CONFIG_UPDATE_ANALYSIS_LIMITS_MODEL_MEMORY_LIMIT_CANNOT_BE_DECREASED = "job.config.update.analysis."
|
||||
+ "limits.model.memory.limit.cannot.be.decreased";
|
||||
public static final String JOB_CONFIG_UPDATE_CATEGORIZATION_FILTERS_INVALID = "job.config.update.categorization.filters.invalid";
|
||||
public static final String JOB_CONFIG_UPDATE_CUSTOM_SETTINGS_INVALID = "job.config.update.custom.settings.invalid";
|
||||
public static final String JOB_CONFIG_UPDATE_DESCRIPTION_INVALID = "job.config.update.description.invalid";
|
||||
public static final String JOB_CONFIG_UPDATE_DETECTORS_INVALID = "job.config.update.detectors.invalid";
|
||||
public static final String JOB_CONFIG_UPDATE_DETECTORS_INVALID_DETECTOR_INDEX = "job.config.update.detectors.invalid.detector.index";
|
||||
public static final String JOB_CONFIG_UPDATE_DETECTORS_DETECTOR_INDEX_SHOULD_BE_INTEGER = "job.config.update.detectors.detector.index."
|
||||
+ "should.be.integer";
|
||||
public static final String JOB_CONFIG_UPDATE_DETECTORS_MISSING_PARAMS = "job.config.update.detectors.missing.params";
|
||||
public static final String JOB_CONFIG_UPDATE_DETECTORS_DESCRIPTION_SHOULD_BE_STRING = "job.config.update.detectors.description.should"
|
||||
+ ".be.string";
|
||||
public static final String JOB_CONFIG_UPDATE_DETECTOR_RULES_PARSE_ERROR = "job.config.update.detectors.rules.parse.error";
|
||||
public static final String JOB_CONFIG_UPDATE_FAILED = "job.config.update.failed";
|
||||
public static final String JOB_CONFIG_UPDATE_INVALID_KEY = "job.config.update.invalid.key";
|
||||
public static final String JOB_CONFIG_UPDATE_IGNORE_DOWNTIME_PARSE_ERROR = "job.config.update.ignore.downtime.parse.error";
|
||||
public static final String JOB_CONFIG_UPDATE_JOB_IS_NOT_CLOSED = "job.config.update.job.is.not.closed";
|
||||
public static final String JOB_CONFIG_UPDATE_MODEL_DEBUG_CONFIG_PARSE_ERROR = "job.config.update.model.debug.config.parse.error";
|
||||
public static final String JOB_CONFIG_UPDATE_REQUIRES_NON_EMPTY_OBJECT = "job.config.update.requires.non.empty.object";
|
||||
public static final String JOB_CONFIG_UPDATE_PARSE_ERROR = "job.config.update.parse.error";
|
||||
public static final String JOB_CONFIG_UPDATE_BACKGROUND_PERSIST_INTERVAL_INVALID = "job.config.update.background.persist.interval."
|
||||
+ "invalid";
|
||||
public static final String JOB_CONFIG_UPDATE_RENORMALIZATION_WINDOW_DAYS_INVALID = "job.config.update.renormalization.window.days."
|
||||
+ "invalid";
|
||||
public static final String JOB_CONFIG_UPDATE_MODEL_SNAPSHOT_RETENTION_DAYS_INVALID = "job.config.update.model.snapshot.retention.days."
|
||||
+ "invalid";
|
||||
public static final String JOB_CONFIG_UPDATE_RESULTS_RETENTION_DAYS_INVALID = "job.config.update.results.retention.days.invalid";
|
||||
public static final String JOB_CONFIG_UPDATE_DATAFEED_CONFIG_PARSE_ERROR = "job.config.update.datafeed.config.parse.error";
|
||||
public static final String JOB_CONFIG_UPDATE_DATAFEED_CONFIG_CANNOT_BE_NULL = "job.config.update.datafeed.config.cannot.be.null";
|
||||
|
||||
public static final String JOB_CONFIG_UNKNOWN_FUNCTION = "job.config.unknown.function";
|
||||
|
||||
public static final String JOB_INDEX_ALREADY_EXISTS = "job.index.already.exists";
|
||||
|
||||
public static final String JOB_DATA_CONCURRENT_USE_CLOSE = "job.data.concurrent.use.close";
|
||||
public static final String JOB_DATA_CONCURRENT_USE_FLUSH = "job.data.concurrent.use.flush";
|
||||
public static final String JOB_DATA_CONCURRENT_USE_UPDATE = "job.data.concurrent.use.update";
|
||||
public static final String JOB_DATA_CONCURRENT_USE_UPLOAD = "job.data.concurrent.use.upload";
|
||||
|
||||
public static final String DATAFEED_CONFIG_INVALID_OPTION_VALUE = "datafeed.config.invalid.option.value";
|
||||
public static final String DATAFEED_CONFIG_CANNOT_USE_SCRIPT_FIELDS_WITH_AGGS = "datafeed.config.cannot.use.script.fields.with.aggs";
|
||||
|
||||
public static final String DATAFEED_DOES_NOT_SUPPORT_JOB_WITH_LATENCY = "datafeed.does.not.support.job.with.latency";
|
||||
public static final String DATAFEED_AGGREGATIONS_REQUIRES_JOB_WITH_SUMMARY_COUNT_FIELD =
|
||||
"datafeed.aggregations.requires.job.with.summary.count.field";
|
||||
|
||||
public static final String DATAFEED_CANNOT_START = "datafeed.cannot.start";
|
||||
public static final String DATAFEED_CANNOT_STOP_IN_CURRENT_STATE = "datafeed.cannot.stop.in.current.state";
|
||||
public static final String DATAFEED_CANNOT_UPDATE_IN_CURRENT_STATE = "datafeed.cannot.update.in.current.state";
|
||||
public static final String DATAFEED_CANNOT_DELETE_IN_CURRENT_STATE = "datafeed.cannot.delete.in.current.state";
|
||||
public static final String DATAFEED_FAILED_TO_STOP = "datafeed.failed.to.stop";
|
||||
public static final String DATAFEED_NOT_FOUND = "datafeed.not.found";
|
||||
|
||||
public static final String JOB_MISSING_QUANTILES = "job.missing.quantiles";
|
||||
public static final String JOB_UNKNOWN_ID = "job.unknown.id";
|
||||
|
||||
public static final String JSON_JOB_CONFIG_MAPPING = "json.job.config.mapping.error";
|
||||
public static final String JSON_JOB_CONFIG_PARSE = "json.job.config.parse.error";
|
||||
|
||||
public static final String JSON_DETECTOR_CONFIG_MAPPING = "json.detector.config.mapping.error";
|
||||
public static final String JSON_DETECTOR_CONFIG_PARSE = "json.detector.config.parse.error";
|
||||
|
||||
public static final String REST_ACTION_NOT_ALLOWED_FOR_DATAFEED_JOB = "rest.action.not.allowed.for.datafeed.job";
|
||||
|
||||
public static final String REST_INVALID_DATETIME_PARAMS = "rest.invalid.datetime.params";
|
||||
public static final String REST_INVALID_FLUSH_PARAMS_MISSING = "rest.invalid.flush.params.missing.argument";
|
||||
public static final String REST_INVALID_FLUSH_PARAMS_UNEXPECTED = "rest.invalid.flush.params.unexpected";
|
||||
public static final String REST_INVALID_RESET_PARAMS = "rest.invalid.reset.params";
|
||||
public static final String REST_INVALID_FROM = "rest.invalid.from";
|
||||
public static final String REST_INVALID_SIZE = "rest.invalid.size";
|
||||
public static final String REST_INVALID_FROM_SIZE_SUM = "rest.invalid.from.size.sum";
|
||||
public static final String REST_START_AFTER_END = "rest.start.after.end";
|
||||
public static final String REST_RESET_BUCKET_NO_LATENCY = "rest.reset.bucket.no.latency";
|
||||
public static final String REST_JOB_NOT_CLOSED_REVERT = "rest.job.not.closed.revert";
|
||||
public static final String REST_NO_SUCH_MODEL_SNAPSHOT = "rest.no.such.model.snapshot";
|
||||
public static final String REST_DESCRIPTION_ALREADY_USED = "rest.description.already.used";
|
||||
public static final String REST_CANNOT_DELETE_HIGHEST_PRIORITY = "rest.cannot.delete.highest.priority";
|
||||
|
||||
public static final String PROCESS_ACTION_SLEEPING_JOB = "process.action.sleeping.job";
|
||||
public static final String PROCESS_ACTION_CLOSED_JOB = "process.action.closed.job";
|
||||
public static final String PROCESS_ACTION_CLOSING_JOB = "process.action.closing.job";
|
||||
public static final String PROCESS_ACTION_DELETING_JOB = "process.action.deleting.job";
|
||||
public static final String PROCESS_ACTION_FLUSHING_JOB = "process.action.flushing.job";
|
||||
public static final String PROCESS_ACTION_PAUSING_JOB = "process.action.pausing.job";
|
||||
public static final String PROCESS_ACTION_RESUMING_JOB = "process.action.resuming.job";
|
||||
public static final String PROCESS_ACTION_REVERTING_JOB = "process.action.reverting.job";
|
||||
public static final String PROCESS_ACTION_UPDATING_JOB = "process.action.updating.job";
|
||||
public static final String PROCESS_ACTION_WRITING_JOB = "process.action.writing.job";
|
||||
public static final String REST_CANNOT_DELETE_HIGHEST_PRIORITY = "Model snapshot ''{0}'' is the active snapshot for job ''{1}'', so cannot be deleted";
|
||||
public static final String REST_DESCRIPTION_ALREADY_USED = "Model snapshot description ''{0}'' has already been used for job ''{1}''";
|
||||
public static final String REST_INVALID_DATETIME_PARAMS = "Query param ''{0}'' with value ''{1}'' cannot be parsed as a date or converted to a number (epoch).";
|
||||
public static final String REST_INVALID_FLUSH_PARAMS_MISSING = "Invalid flush parameters: ''{0}'' has not been specified.";
|
||||
public static final String REST_INVALID_FLUSH_PARAMS_UNEXPECTED = "Invalid flush parameters: unexpected ''{0}''.";
|
||||
public static final String REST_JOB_NOT_CLOSED_REVERT = "Can only revert to a model snapshot when the job is closed.";
|
||||
public static final String REST_NO_SUCH_MODEL_SNAPSHOT = "No model snapshot with id [{0}] exists for job [{1}]";
|
||||
public static final String REST_START_AFTER_END = "Invalid time range: end time ''{0}'' is earlier than start time ''{1}''.";
|
||||
|
||||
private Messages() {
|
||||
}
|
||||
|
||||
public static ResourceBundle load() {
|
||||
return ResourceBundle.getBundle(Messages.BUNDLE_NAME, Locale.getDefault());
|
||||
}
|
||||
|
||||
/**
|
||||
* Look up the message string from the resource bundle.
|
||||
* Returns the message parameter
|
||||
*
|
||||
* @param key Must be one of the statics defined in this file]
|
||||
* @param message Should be one of the statics defined in this class
|
||||
*/
|
||||
public static String getMessage(String key) {
|
||||
return load().getString(key);
|
||||
public static String getMessage(String message) {
|
||||
return message;
|
||||
}
|
||||
|
||||
/**
|
||||
* Look up the message string from the resource bundle and format with
|
||||
* the supplied arguments
|
||||
* @param key the key for the message
|
||||
* Format the message with the supplied arguments
|
||||
*
|
||||
* @param message Should be one of the statics defined in this class
|
||||
* @param args MessageFormat arguments. See {@linkplain MessageFormat#format(Object)}]
|
||||
*/
|
||||
public static String getMessage(String key, Object...args) {
|
||||
return new MessageFormat(load().getString(key), Locale.ROOT).format(args);
|
||||
public static String getMessage(String message, Object...args) {
|
||||
return new MessageFormat(message, Locale.ROOT).format(args);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,175 +0,0 @@
|
|||
|
||||
# Machine Learning API messages
|
||||
|
||||
autodetect.flush.failed.unexpected.death =[{0}] Flush failed: Unexpected death of the Autodetect process flushing job.
|
||||
|
||||
cpu.limit.jobs = Cannot start job with id ''{0}''. The maximum number of concurrently running jobs is limited as a function of the number of CPU cores see this error code''s help documentation for details of how to elevate the setting
|
||||
|
||||
datastore.error.deleting = Error deleting index ''{0}''
|
||||
datastore.error.deleting.missing.index = Cannot delete job - no index with id ''{0}'' in the database
|
||||
datastore.error.executing.script = Error executing script ''{0}''
|
||||
|
||||
invalid.id = Invalid {0}; ''{1}'' must be lowercase alphanumeric, may contain hyphens or underscores, may not start with underscore
|
||||
inconsistent.id = Inconsistent {0}; ''{1}'' specified in the body differs from ''{2}'' specified as a URL argument
|
||||
|
||||
license.limit.detectors = Cannot create new job - your license limits you to {0,number,integer} detector(s), but you have configured {1,number,integer}.
|
||||
license.limit.detectors.reactivate = Cannot reactivate job with id ''{0}'' - your license limits you to {1,number,integer} concurrently running detectors. You must close a job before you can reactivate another.
|
||||
license.limit.jobs = Cannot create new job - your license limits you to {0,number,integer} concurrently running job(s). You must close a job before you can create a new one.
|
||||
license.limit.jobs.reactivate = Cannot reactivate job with id ''{0}'' - your license limits you to {1,number,integer} concurrently running jobs. You must close a job before you can reactivate another.
|
||||
license.limit.partitions = Cannot create new job - your license disallows partition fields, but you have configured one.
|
||||
|
||||
job.audit.created = Job created
|
||||
job.audit.deleted = Job deleted
|
||||
job.audit.paused = Job paused
|
||||
job.audit.resumed = Job resumed
|
||||
job.audit.updated = Job updated: {0}
|
||||
job.audit.reverted = Job model snapshot reverted to ''{0}''
|
||||
job.audit.old.results.deleted = Deleted results prior to {1}
|
||||
job.audit.snapshot.deleted = Job model snapshot ''{0}'' deleted
|
||||
job.audit.datafeed.started.from.to = Datafeed started (from: {0} to: {1})
|
||||
job.audit.datafeed.started.realtime = Datafeed started in real-time
|
||||
job.audit.datafeed.continued.realtime = Datafeed continued in real-time
|
||||
job.audit.datafeed.lookback.completed = Datafeed lookback completed
|
||||
job.audit.datafeed.lookback.no.data = Datafeed lookback retrieved no data
|
||||
job.audit.datafeed.stopped = Datafeed stopped
|
||||
job.audit.datafeed.no.data = Datafeed has been retrieving no data for a while
|
||||
job.audit.datafeed.data.seen.again = Datafeed has started retrieving data again
|
||||
job.audit.datafeed.data.analysis.error = Datafeed is encountering errors submitting data for analysis: {0}
|
||||
job.audit.datafeed.data.extraction.error = Datafeed is encountering errors extracting data: {0}
|
||||
job.audit.datafeed.recovered = Datafeed has recovered data extraction and analysis
|
||||
|
||||
system.audit.started = System started
|
||||
system.audit.shutdown = System shut down
|
||||
|
||||
job.cannot.delete.while.running = Cannot delete job ''{0}'' while it is {1}
|
||||
job.cannot.pause = Cannot pause job ''{0}'' while its status is {1}
|
||||
job.cannot.resume = Cannot resume job ''{0}'' while its status is {1}
|
||||
|
||||
job.config.byField.incompatible.function = by_field_name cannot be used with function ''{0}''
|
||||
job.config.byField.needs.another = by_field_name must be used in conjunction with field_name or function
|
||||
job.config.categorization.filters.require.categorization.field.name = categorization_filters require setting categorization_field_name
|
||||
job.config.categorization.filters.contains.duplicates = categorization_filters contain duplicates
|
||||
job.config.categorization.filter.contains.empty = categorization_filters are not allowed to contain empty strings
|
||||
job.config.categorization.filter.contains.invalid.regex = categorization_filters contains invalid regular expression ''{0}''
|
||||
job.config.condition.invalid.operator = Invalid operator for condition
|
||||
job.config.condition.invalid.value.null = Invalid condition: the value field cannot be null
|
||||
job.config.condition.invalid.value.numeric = Invalid condition value: cannot parse a double from string ''{0}''
|
||||
job.config.condition.invalid.value.regex = Invalid condition value: ''{0}'' is not a valid regular expression
|
||||
job.config.detectionrule.condition.categorical.invalid.option = Invalid detector rule: a categorical rule_condition does not support {0}
|
||||
job.config.detectionrule.condition.categorical.missing.option = Invalid detector rule: a categorical rule_condition requires {0} to be set
|
||||
job.config.detectionrule.condition.invalid.fieldname = Invalid detector rule: field_name has to be one of {0}; actual was ''{1}''
|
||||
job.config.detectionrule.condition.missing.fieldname = Invalid detector rule: missing field_name in rule_condition where field_value ''{0}'' is set
|
||||
job.config.detectionrule.condition.numerical.invalid.operator = Invalid detector rule: operator ''{0}'' is not allowed
|
||||
job.config.detectionrule.condition.numerical.invalid.option = Invalid detector rule: a numerical rule_condition does not support {0}
|
||||
job.config.detectionrule.condition.numerical.missing.option = Invalid detector rule: a numerical rule_condition requires {0} to be set
|
||||
job.config.detectionrule.condition.numerical.with.fieldname.requires.fieldvalue = Invalid detector rule: a numerical rule_condition with field_name requires that field_value is set
|
||||
job.config.detectionrule.invalid.targetfieldname = Invalid detector rule: target_field_name has to be one of {0}; actual was ''{1}''
|
||||
job.config.detectionrule.missing.targetfieldname = Invalid detector rule: missing target_field_name where target_field_value ''{0}'' is set
|
||||
job.config.detectionrule.not.supported.by.function = Invalid detector rule: function {0} does not support rules
|
||||
job.config.detectionrule.requires.at.least.one.condition = Invalid detector rule: at least one rule_condition is required
|
||||
job.config.fieldname.incompatible.function = field_name cannot be used with function ''{0}''
|
||||
job.config.function.requires.byfield = by_field_name must be set when the ''{0}'' function is used
|
||||
job.config.function.requires.fieldname = field_name must be set when the ''{0}'' function is used
|
||||
job.config.function.requires.overfield = over_field_name must be set when the ''{0}'' function is used
|
||||
job.config.function.incompatible.presummarized = The ''{0}'' function cannot be used in jobs that will take pre-summarized input
|
||||
job.config.id.already.taken = The job cannot be created with the Id ''{0}''. The Id is already used.
|
||||
job.config.id.too.long = The job id cannot contain more than {0,number,integer} characters.
|
||||
job.config.invalid.fieldname.chars = Invalid field name ''{0}''. Field names including over, by and partition fields cannot contain any of these characters: {1}
|
||||
job.config.invalid.timeformat = Invalid Time format string ''{0}''
|
||||
job.config.missing.analysisconfig = An analysis_config must be set
|
||||
job.config.field.value.too.low = {0} cannot be less than {1,number}. Value = {2,number}
|
||||
job.config.no.analysis.field = One of function, field_name, by_field_name or over_field_name must be set
|
||||
job.config.no.analysis.field.not.count = Unless the function is 'count' one of field_name, by_field_name or over_field_name must be set
|
||||
job.config.no.detectors = No detectors configured
|
||||
job.config.overField.incompatible.function = over_field_name cannot be used with function ''{0}''
|
||||
job.config.overField.needs.another = over_field_name must be used in conjunction with field_name or function
|
||||
job.config.overlapping.buckets.incompatible.function = Overlapping buckets cannot be used with function ''{0}''
|
||||
job.config.multiple.bucketspans.require.bucket_span = Multiple bucket_spans require a bucket_span to be specified
|
||||
job.config.multiple.bucketspans.must.be.multiple = Multiple bucket_span ''{0}'' must be a multiple of the main bucket_span ''{1}''
|
||||
job.config.per.partition.normalization.requires.partition.field = If the job is configured with Per-Partition Normalization enabled a detector must have a partition field
|
||||
job.config.per.partition.normalization.cannot.use.influencers = A job configured with Per-Partition Normalization cannot use influencers
|
||||
|
||||
job.config.update.analysis.limits.parse.error = JSON parse error reading the update value for analysis_limits
|
||||
job.config.update.analysis.limits.cannot.be.null = Invalid update value for analysis_limits: null
|
||||
job.config.update.analysis.limits.model.memory.limit.cannot.be.decreased = Invalid update value for analysis_limits: model_memory_limit cannot be decreased; existing is {0}, update had {1}
|
||||
job.config.update.categorization.filters.invalid = Invalid update value for categorization_filters: value must be an array of strings; actual was: {0}
|
||||
job.config.update.custom.settings.invalid = Invalid update value for custom_settings: value must be an object
|
||||
job.config.update.description.invalid = Invalid update value for job description: value must be a string
|
||||
job.config.update.detectors.invalid = Invalid update value for detectors: value must be an array
|
||||
job.config.update.detectors.invalid.detector.index = Invalid index: valid range is [{0}, {1}]; actual was: {2}
|
||||
job.config.update.detectors.detector.index.should.be.integer = Invalid index: integer expected; actual was: {0}
|
||||
job.config.update.detectors.missing.params = Invalid update value for detectors: requires {0} and at least one of {1}
|
||||
job.config.update.detectors.description.should.be.string = Invalid description: string expected; actual was: {0}
|
||||
job.config.update.detectors.rules.parse.error = JSON parse error reading the update value for detectorRules
|
||||
job.config.update.failed = Update failed. Please see the logs to trace the cause of the failure.
|
||||
job.config.update.ignore.downtime.parse.error = Invalid update value for ignore_downtime: expected one of {0}; actual was: {1}
|
||||
job.config.update.invalid.key = Invalid key ''{0}''
|
||||
job.config.update.job.is.not.closed = Cannot update key ''{0}'' while job is not closed; current status is {1}
|
||||
job.config.update.model.debug.config.parse.error = JSON parse error reading the update value for ModelDebugConfig
|
||||
job.config.update.requires.non.empty.object = Update requires JSON that contains a non-empty object
|
||||
job.config.update.parse.error = JSON parse error reading the job update
|
||||
job.config.update.background.persist.interval.invalid = Invalid update value for background_persist_interval: value must be an exact number of seconds no less than 3600
|
||||
job.config.update.renormalization.window.days.invalid = Invalid update value for renormalization_window_days: value must be an exact number of days
|
||||
job.config.update.model.snapshot.retention.days.invalid = Invalid update value for model_snapshot_retention_days: value must be an exact number of days
|
||||
job.config.update.results.retention.days.invalid = Invalid update value for results_retention_days: value must be an exact number of days
|
||||
job.config.update.datafeed.config.parse.error = JSON parse error reading the update value for datafeed_config
|
||||
job.config.update.datafeed.config.cannot.be.null = Invalid update value for datafeed_config: null
|
||||
datafeed.config.cannot.use.script.fields.with.aggs = script_fields cannot be used in combination with aggregations
|
||||
|
||||
job.config.unknown.function = Unknown function ''{0}''
|
||||
|
||||
job.index.already.exists = Cannot create index ''{0}'' as it already exists
|
||||
|
||||
datafeed.config.invalid.option.value = Invalid {0} value ''{1}'' in datafeed configuration
|
||||
|
||||
datafeed.does.not.support.job.with.latency = A job configured with datafeed cannot support latency
|
||||
datafeed.aggregations.requires.job.with.summary.count.field = A job configured with a datafeed with aggregations must have summary_count_field_name ''{0}''
|
||||
|
||||
job.data.concurrent.use.close = Cannot close job {0} while the job is processing another request
|
||||
job.data.concurrent.use.flush = Cannot flush job {0} while the job is processing another request
|
||||
job.data.concurrent.use.update = Cannot update job {0} while the job is processing another request
|
||||
job.data.concurrent.use.upload = Cannot write to job {0} while the job is processing another request
|
||||
|
||||
job.missing.quantiles = Cannot read persisted quantiles for job ''{0}''
|
||||
job.unknown.id = No known job with id ''{0}''
|
||||
|
||||
datafeed.cannot.start = Cannot start datafeed [{0}] while its status is {1}
|
||||
datafeed.cannot.stop.in.current.state = Cannot stop datafeed [{0}] while its status is {1}
|
||||
datafeed.cannot.update.in.current.state = Cannot update datafeed [{0}] while its status is {1}
|
||||
datafeed.cannot.delete.in.current.state = Cannot delete datafeed [{0}] while its status is {1}
|
||||
datafeed.failed.to.stop = Failed to stop datafeed
|
||||
datafeed.not.found = No datafeed with id [{0}] exists
|
||||
|
||||
json.job.config.mapping.error = JSON mapping error reading the job configuration
|
||||
json.job.config.parse.error = JSON parse error reading the job configuration
|
||||
|
||||
json.detector.config.mapping.error = JSON mapping error reading the detector configuration
|
||||
json.detector.config.parse.error = JSON parse error reading the detector configuration
|
||||
|
||||
rest.action.not.allowed.for.datafeed.job = This action is not allowed for a datafeed job
|
||||
|
||||
rest.invalid.datetime.params = Query param ''{0}'' with value ''{1}'' cannot be parsed as a date or converted to a number (epoch).
|
||||
rest.invalid.flush.params.missing.argument = Invalid flush parameters: ''{0}'' has not been specified.
|
||||
rest.invalid.flush.params.unexpected = Invalid flush parameters: unexpected ''{0}''.
|
||||
rest.invalid.reset.params = Invalid reset range parameters: ''{0}'' has not been specified.
|
||||
rest.invalid.from = Parameter 'from' cannot be < 0
|
||||
rest.invalid.size = Parameter 'size' cannot be < 0
|
||||
rest.invalid.from.size.sum = The sum of parameters ''from'' and ''size'' cannot be higher than {0}. Please use filters to reduce the number of results.
|
||||
rest.start.after.end = Invalid time range: end time ''{0}'' is earlier than start time ''{1}''.
|
||||
rest.reset.bucket.no.latency = Bucket resetting is not supported when no latency is configured.
|
||||
rest.job.not.closed.revert = Can only revert to a model snapshot when the job is closed.
|
||||
rest.no.such.model.snapshot = No model snapshot with id [{0}] exists for job [{1}]
|
||||
rest.description.already.used = Model snapshot description ''{0}'' has already been used for job ''{1}''
|
||||
rest.cannot.delete.highest.priority = Model snapshot ''{0}'' is the active snapshot for job ''{1}'', so cannot be deleted
|
||||
|
||||
process.action.closed.job = closed
|
||||
process.action.closing.job = closing
|
||||
process.action.deleting.job = deleting
|
||||
process.action.flushing.job = flushing
|
||||
process.action.pausing.job = pausing
|
||||
process.action.resuming.job = resuming
|
||||
process.action.reverting.job = reverting the model snapshot for
|
||||
process.action.sleeping.job = holding
|
||||
process.action.updating.job = updating
|
||||
process.action.writing.job = writing to
|
||||
|
|
@ -5,50 +5,20 @@
|
|||
*/
|
||||
package org.elasticsearch.xpack.ml.job.messages;
|
||||
|
||||
import org.elasticsearch.common.SuppressForbidden;
|
||||
import org.elasticsearch.test.ESTestCase;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.Modifier;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.ResourceBundle;
|
||||
import java.util.Set;
|
||||
|
||||
@SuppressForbidden(reason = "Need to use reflection to make sure all constants are resolvable")
|
||||
public class MessagesTests extends ESTestCase {
|
||||
|
||||
public void testAllStringsAreInTheResourceBundle() throws IllegalArgumentException, IllegalAccessException {
|
||||
ResourceBundle bundle = Messages.load();
|
||||
|
||||
// get all the public string constants
|
||||
// excluding BUNDLE_NAME
|
||||
List<Field> publicStrings = new ArrayList<>();
|
||||
Field[] allFields = Messages.class.getDeclaredFields();
|
||||
for (Field field : allFields) {
|
||||
if (Modifier.isPublic(field.getModifiers())) {
|
||||
if (field.getType() == String.class && field.getName() != "BUNDLE_NAME") {
|
||||
publicStrings.add(field);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
assertTrue(bundle.keySet().size() > 0);
|
||||
|
||||
// Make debugging easier- print any keys not defined in Messages
|
||||
Set<String> keys = bundle.keySet();
|
||||
for (Field field : publicStrings) {
|
||||
String key = (String) field.get(new String());
|
||||
keys.remove(key);
|
||||
}
|
||||
|
||||
assertEquals(bundle.keySet().size(), publicStrings.size());
|
||||
|
||||
for (Field field : publicStrings) {
|
||||
String key = (String) field.get(new String());
|
||||
|
||||
assertTrue("String constant " + field.getName() + " = " + key + " not in resource bundle", bundle.containsKey(key));
|
||||
}
|
||||
public void testGetMessage_NoFormatArgs () {
|
||||
assertEquals(Messages.DATAFEED_CONFIG_CANNOT_USE_SCRIPT_FIELDS_WITH_AGGS,
|
||||
Messages.getMessage(Messages.DATAFEED_CONFIG_CANNOT_USE_SCRIPT_FIELDS_WITH_AGGS));
|
||||
}
|
||||
|
||||
public void testGetMessage_WithFormatStrings() {
|
||||
String formattedMessage = Messages.getMessage(Messages.DATAFEED_CONFIG_INVALID_OPTION_VALUE, "field-name", "field-value");
|
||||
assertEquals("Invalid field-name value 'field-value' in datafeed configuration", formattedMessage);
|
||||
|
||||
formattedMessage = Messages.getMessage(Messages.JOB_AUDIT_SNAPSHOT_DELETED, "foo-job");
|
||||
assertEquals("Job model snapshot 'foo-job' deleted", formattedMessage);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue