Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add data frame feature #38934

Merged
merged 98 commits into from
Feb 18, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
98 commits
Select commit Hold shift + click to select a range
5d89d3c
feature index prototype
Jul 24, 2018
9c59ae1
1st version of a feature index builder
Aug 2, 2018
73ea5aa
Merge branch 'master' of github.com:elastic/elasticsearch into featur…
Aug 3, 2018
d78d131
do not reuse ML feature causing a conflict
Aug 3, 2018
fd708ed
Merge branch 'master' of github.com:elastic/elasticsearch into featur…
Aug 10, 2018
1a00847
temporary merge PR 32743 (#32776)
Aug 10, 2018
e6d58c5
[ML-Dataframe] Feature/dataframe basictests (#32783)
Aug 14, 2018
a0b72c9
Revert "temporary merge PR 32743 (#32776)"
Sep 5, 2018
192e6de
Merge branch 'master' of github.com:elastic/elasticsearch into featur…
Sep 5, 2018
b2195fb
adapt to upstream changes
Sep 5, 2018
4946d33
[ML-Dataframe] Use AsyncTwoPhaseIndexer (#33504)
Sep 10, 2018
b13cca3
[ML-Dataframe] add stop and delete endpoints (#33597)
Sep 12, 2018
9ff27a7
Merge branch 'master' of github.com:elastic/elasticsearch into featur…
Sep 12, 2018
ac211fa
Merge branch 'master' of github.com:elastic/elasticsearch into featur…
Sep 12, 2018
f3de9fb
adapt to upstream changes
Sep 12, 2018
10e01ae
Merge branch 'master' of github.com:elastic/elasticsearch into featur…
Sep 21, 2018
e5c2bf1
Merge branch 'master' of github.com:elastic/elasticsearch into featur…
Sep 25, 2018
28e426a
[ML-Dataframe] add basic configuration (#33813)
Sep 25, 2018
8eb7976
Merge branch 'master' of github.com:elastic/elasticsearch into featur…
Oct 9, 2018
b1802f1
adapt to upstream changes
Oct 10, 2018
f477852
[ML-Dataframe] Feature/fib reenable agg config tests (#34453)
Oct 16, 2018
89a19d8
Merge branch 'master' of github.com:elastic/elasticsearch into featur…
Oct 17, 2018
97782f5
Merge branch 'master' of github.com:elastic/elasticsearch into featur…
Oct 18, 2018
ad8cc92
[ML-Dataframe] Feature/fib multi aggs and sources (#34525)
Oct 19, 2018
0310769
fix NPE and creating XContent from search phase
Oct 25, 2018
6a2f761
Merge branch 'master' of github.com:elastic/elasticsearch into featur…
Oct 26, 2018
7d34ec1
Merge branch 'master' of github.com:elastic/elasticsearch into featur…
Nov 13, 2018
6bf69d0
Merge branch 'master' of github.com:elastic/elasticsearch into featur…
Nov 13, 2018
2ff80fd
adapt to upstream changes
Nov 13, 2018
341091b
fix imports
Nov 13, 2018
7036ffa
[ML-Dataframe] add validation and mapping detection (#34844)
Nov 15, 2018
016dea1
Merge branch 'master' of github.com:elastic/elasticsearch into featur…
Nov 15, 2018
6b66fe9
[ML-Dataframe] re-factor code to use LogManager and own loggers (#35631)
Nov 16, 2018
22cdb96
Merge branch 'master' of github.com:elastic/elasticsearch into featur…
Nov 19, 2018
47b12b7
Merge branch 'master' of github.com:elastic/elasticsearch into featur…
Nov 20, 2018
2b005b0
[ML-Dataframe] change licensing check and plugin name/description (#3…
Nov 20, 2018
70ca2da
Merge branch 'master' of github.com:elastic/elasticsearch into featur…
Nov 22, 2018
2da7e30
remove settings parameter after upstream re-factoring (#35831)
Nov 22, 2018
43536a0
Merge branch 'master' of github.com:elastic/elasticsearch into featur…
Nov 24, 2018
926abc2
[ML-Dataframe] Feature/fib get jobs (#35825)
Nov 25, 2018
e4a1efe
Merge branch 'master' of github.com:elastic/elasticsearch into featur…
Nov 26, 2018
f5362b0
Merge branch 'master' of github.com:elastic/elasticsearch into featur…
Nov 27, 2018
130a4e5
Merge branch 'master' of github.com:elastic/elasticsearch into featur…
Nov 28, 2018
7a78e1f
[ML-DataFrame] add a stats endpoint (#35911)
Nov 28, 2018
c1bcd36
dedup ID fields (#35995)
Nov 28, 2018
12318a5
[ML-DataFrame] Rename plugin and endpoints (#36048)
Nov 29, 2018
116bfef
add a client helper origin for data frame (#36057)
Nov 30, 2018
9f6b85d
Merge branch 'master' of github.com:elastic/elasticsearch into featur…
Dec 4, 2018
dd08f7b
adapt to upstream changes
Dec 4, 2018
7cd9208
[ML-DataFrame] cancel indexer on job deletion and remove task, allow …
Dec 5, 2018
9d5ab7d
Merge branch 'master' of github.com:elastic/elasticsearch into featur…
Dec 7, 2018
3f7cb62
Merge branch 'master' of github.com:elastic/elasticsearch into featur…
Dec 10, 2018
5f03768
repair merge conflicts
Dec 10, 2018
cf92a1a
[ML-DataFrame] fix state persistence and load on startup (#36375)
Dec 10, 2018
fa85f40
[ML-DataFrame] add generation to dataframe state (#36434)
Dec 11, 2018
4f90174
Merge branch 'master' of github.com:elastic/elasticsearch into featur…
Dec 12, 2018
2f98c1d
[ML-Dataframe] add integration tests (#34554)
Dec 12, 2018
239eb27
move common fields and string into a utility class (#36557)
Dec 13, 2018
7bbbdee
Merge branch 'master' of github.com:elastic/elasticsearch into featur…
Dec 18, 2018
972c063
[ML-DataFrame] add a wait_for_completion option to the stop data fra…
Dec 19, 2018
7010273
Merge branch 'master' of github.com:elastic/elasticsearch into featur…
Dec 19, 2018
b65a799
Merge branch 'master' of github.com:elastic/elasticsearch into featur…
Jan 2, 2019
a072c0d
Merge branch 'master' of github.com:elastic/elasticsearch into featur…
Jan 8, 2019
c7e6480
fix merge conflict
Jan 8, 2019
cc3a9e1
Merge branch 'master' of github.com:elastic/elasticsearch into featur…
Jan 9, 2019
4aec7f7
Merge branch 'master' of github.com:elastic/elasticsearch into featur…
Jan 10, 2019
ce82256
[ML-DataFrame] Feature/fib jobconfigmanager (#37068)
Jan 10, 2019
89209c1
return job counts and statistics for usage endpoint (#37346)
Jan 14, 2019
d48cbde
Merge branch 'master' of github.com:elastic/elasticsearch into featur…
Jan 15, 2019
48ebf09
Merge branch 'master' of github.com:elastic/elasticsearch into featur…
Jan 15, 2019
8d487bc
Merge branch 'master' of github.com:elastic/elasticsearch into featur…
Jan 16, 2019
c82f7f3
Merge branch 'master' of github.com:elastic/elasticsearch into featur…
Jan 17, 2019
13ef708
[ML-DataFrame] rename jobs to transforms (#37518)
Jan 17, 2019
4582609
Merge branch 'master' of github.com:elastic/elasticsearch into featur…
Jan 21, 2019
ec6684c
fix merge conflict
Jan 21, 2019
94eba06
Merge branch 'master' of github.com:elastic/elasticsearch into featur…
Jan 23, 2019
fac99c7
[ML-DataFrame] implement new data frame transforms configuration (#37…
Jan 23, 2019
c1e0851
Merge branch 'master' of github.com:elastic/elasticsearch into featur…
Jan 24, 2019
84c1ba2
[ML-DataFrame] add query support (#37827)
Jan 28, 2019
a16d21c
Merge branch 'master' of github.com:elastic/elasticsearch into featur…
Jan 29, 2019
719d3fb
Merge branch 'master' of github.com:elastic/elasticsearch into featur…
Jan 31, 2019
1c04676
Merge branch 'master' of github.com:elastic/elasticsearch into featur…
Feb 1, 2019
d23ac76
[ML-DataFrame] Feature/fib lenient aggs (#38122)
Feb 1, 2019
cdad0d2
Merge branch 'master' of github.com:elastic/elasticsearch into featur…
Feb 5, 2019
094bfa8
Merge branch 'master' of github.com:elastic/elasticsearch into featur…
Feb 6, 2019
3de0c53
Merge branch 'master' of github.com:elastic/elasticsearch into featur…
Feb 6, 2019
4bb0fc6
Merge branch 'master' of github.com:elastic/elasticsearch into featur…
Feb 8, 2019
417a7db
Merge branch 'master' of github.com:elastic/elasticsearch into featur…
Feb 8, 2019
cd7292c
add support for max, value_count, cardinality and sum (#38569)
Feb 9, 2019
cedd78c
[ML-DataFrame] Add support for (date) histogram pivots (#38725)
benwtrent Feb 11, 2019
124b170
Merge branch 'master' of github.com:elastic/elasticsearch into featur…
Feb 11, 2019
dd1943c
[ML-DataFrame] allow aggs as abbreviation for aggregations (#38706)
Feb 12, 2019
3122884
[ML-DataFrame] set meta data on data frame index (#38766)
Feb 14, 2019
2dabf4a
default to match_all if query is not given (#38865)
Feb 14, 2019
5758a11
[ML-DataFrame] remove array arguments for group_by (#38895)
Feb 15, 2019
8a0c3fd
Merge branch 'master' of github.com:elastic/elasticsearch into featur…
Feb 15, 2019
614cb0f
remove superflous import
Feb 15, 2019
54e6d10
Merge branch 'master' of github.com:elastic/elasticsearch into featur…
Feb 18, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1697,7 +1697,7 @@ public void testCRUDIndexTemplateWithTypes() throws Exception {
assertTrue(template2.mappings().containsKey("custom_doc_type"));

List<String> names = randomBoolean()
? Arrays.asList("*-1", "template-2")
? Arrays.asList("*plate-1", "template-2")
: Arrays.asList("template-*");
GetIndexTemplatesRequest getBothRequest = new GetIndexTemplatesRequest(names);
org.elasticsearch.action.admin.indices.template.get.GetIndexTemplatesResponse getBoth = execute(
Expand Down Expand Up @@ -1780,7 +1780,7 @@ public void testCRUDIndexTemplate() throws Exception {


List<String> names = randomBoolean()
? Arrays.asList("*-1", "template-2")
? Arrays.asList("*plate-1", "template-2")
: Arrays.asList("template-*");
GetIndexTemplatesRequest getBothRequest = new GetIndexTemplatesRequest(names);
GetIndexTemplatesResponse getBoth = execute(
Expand Down Expand Up @@ -1834,7 +1834,7 @@ public void testIndexTemplatesExist() throws Exception {

{
final List<String> templateNames = randomBoolean()
? Arrays.asList("*-1", "template-2")
? Arrays.asList("*plate-1", "template-2")
: Arrays.asList("template-*");

final IndexTemplatesExistRequest bothRequest = new IndexTemplatesExistRequest(templateNames);
Expand Down
5 changes: 5 additions & 0 deletions docs/reference/rest-api/info.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,11 @@ Example response:
"available" : true,
"enabled" : true
},
"data_frame" : {
"description" : "Data Frame for the Elastic Stack",
"available" : true,
"enabled" : true
},
"graph" : {
"description" : "Graph Data Exploration for the Elastic Stack",
"available" : true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -553,6 +553,15 @@ public static boolean isMachineLearningAllowedForOperationMode(final OperationMo
return isPlatinumOrTrialOperationMode(operationMode);
}

/**
* Data Frame is always available as long as there is a valid license
*
* @return true if the license is active
*/
public synchronized boolean isDataFrameAllowed() {
return status.active;
}

/**
* Rollup is always available as long as there is a valid license
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ public final class ClientHelper {
public static final String DEPRECATION_ORIGIN = "deprecation";
public static final String PERSISTENT_TASK_ORIGIN = "persistent_tasks";
public static final String ROLLUP_ORIGIN = "rollup";
public static final String DATA_FRAME_ORIGIN = "data_frame";

private ClientHelper() {}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
import org.elasticsearch.xpack.core.beats.BeatsFeatureSetUsage;
import org.elasticsearch.xpack.core.ccr.AutoFollowMetadata;
import org.elasticsearch.xpack.core.ccr.CCRFeatureSet;
import org.elasticsearch.xpack.core.dataframe.DataFrameFeatureSetUsage;
import org.elasticsearch.xpack.core.deprecation.DeprecationInfoAction;
import org.elasticsearch.xpack.core.graph.GraphFeatureSetUsage;
import org.elasticsearch.xpack.core.graph.action.GraphExploreAction;
Expand Down Expand Up @@ -439,8 +440,9 @@ public List<NamedWriteableRegistry.Entry> getNamedWriteables() {
new NamedWriteableRegistry.Entry(LifecycleAction.class, DeleteAction.NAME, DeleteAction::new),
new NamedWriteableRegistry.Entry(LifecycleAction.class, FreezeAction.NAME, FreezeAction::new),
new NamedWriteableRegistry.Entry(LifecycleAction.class, SetPriorityAction.NAME, SetPriorityAction::new),
new NamedWriteableRegistry.Entry(LifecycleAction.class, UnfollowAction.NAME, UnfollowAction::new)
);
new NamedWriteableRegistry.Entry(LifecycleAction.class, UnfollowAction.NAME, UnfollowAction::new),
// Data Frame
new NamedWriteableRegistry.Entry(XPackFeatureSet.Usage.class, XPackField.DATA_FRAME, DataFrameFeatureSetUsage::new));
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ public final class XPackField {
public static final String INDEX_LIFECYCLE = "ilm";
/** Name constant for the CCR feature. */
public static final String CCR = "ccr";
/** Name constant for the data frame feature. */
public static final String DATA_FRAME = "data_frame";

private XPackField() {}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ private XPackSettings() {
*/
public static final Setting<Boolean> CCR_ENABLED_SETTING = Setting.boolSetting("xpack.ccr.enabled", true, Property.NodeScope);

/** Setting for enabling or disabling data frame. Defaults to true. */
public static final Setting<Boolean> DATA_FRAME_ENABLED = Setting.boolSetting("xpack.data_frame.enabled", true,
Setting.Property.NodeScope);

/** Setting for enabling or disabling security. Defaults to true. */
public static final Setting<Boolean> SECURITY_ENABLED = Setting.boolSetting("xpack.security.enabled", true, Setting.Property.NodeScope);

Expand Down Expand Up @@ -209,6 +213,7 @@ public static List<Setting<?>> getAllSettings() {
settings.add(ROLLUP_ENABLED);
settings.add(PASSWORD_HASHING_ALGORITHM);
settings.add(INDEX_LIFECYCLE_ENABLED);
settings.add(DATA_FRAME_ENABLED);
return Collections.unmodifiableList(settings);
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/

package org.elasticsearch.xpack.core.dataframe;

import org.elasticsearch.cluster.metadata.MetaData;
import org.elasticsearch.common.io.stream.StreamInput;
import org.elasticsearch.common.io.stream.StreamOutput;
import org.elasticsearch.common.xcontent.XContentBuilder;
import org.elasticsearch.xpack.core.XPackFeatureSet.Usage;
import org.elasticsearch.xpack.core.XPackField;
import org.elasticsearch.xpack.core.dataframe.transform.DataFrameIndexerTransformStats;

import java.io.IOException;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Objects;

public class DataFrameFeatureSetUsage extends Usage {

private final Map<String, Long> transformCountByState;
private final DataFrameIndexerTransformStats accumulatedStats;

public DataFrameFeatureSetUsage(StreamInput in) throws IOException {
super(in);
this.transformCountByState = in.readMap(StreamInput::readString, StreamInput::readLong);
this.accumulatedStats = new DataFrameIndexerTransformStats(in);
}

public DataFrameFeatureSetUsage(boolean available, boolean enabled, Map<String, Long> transformCountByState,
DataFrameIndexerTransformStats accumulatedStats) {
super(XPackField.DATA_FRAME, available, enabled);
this.transformCountByState = Objects.requireNonNull(transformCountByState);
this.accumulatedStats = Objects.requireNonNull(accumulatedStats);
}

@Override
public void writeTo(StreamOutput out) throws IOException {
super.writeTo(out);
out.writeMap(transformCountByState, StreamOutput::writeString, StreamOutput::writeLong);
accumulatedStats.writeTo(out);
}

@Override
protected void innerXContent(XContentBuilder builder, Params params) throws IOException {
super.innerXContent(builder, params);
if (transformCountByState.isEmpty() == false) {
builder.startObject(DataFrameField.TRANSFORMS.getPreferredName());
long all = 0L;
for (Entry<String, Long> entry : transformCountByState.entrySet()) {
builder.field(entry.getKey(), entry.getValue());
all+=entry.getValue();
}
builder.field(MetaData.ALL, all);
builder.endObject();

// if there are no transforms, do not show any stats
builder.field(DataFrameField.STATS_FIELD.getPreferredName(), accumulatedStats);
}
}

@Override
public int hashCode() {
return Objects.hash(enabled, available, transformCountByState, accumulatedStats);
}

@Override
public boolean equals(Object obj) {
if (obj == null) {
return false;
}
if (getClass() != obj.getClass()) {
return false;
}
DataFrameFeatureSetUsage other = (DataFrameFeatureSetUsage) obj;
return Objects.equals(name, other.name) && available == other.available && enabled == other.enabled
&& Objects.equals(transformCountByState, other.transformCountByState)
&& Objects.equals(accumulatedStats, other.accumulatedStats);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/

package org.elasticsearch.xpack.core.dataframe;

import org.elasticsearch.common.ParseField;

/*
* Utility class to hold common fields and strings for data frame.
*/
public final class DataFrameField {

// common parse fields
public static final ParseField AGGREGATIONS = new ParseField("aggregations");
public static final ParseField AGGS = new ParseField("aggs");
public static final ParseField ID = new ParseField("id");
public static final ParseField TRANSFORMS = new ParseField("transforms");
public static final ParseField COUNT = new ParseField("count");
public static final ParseField GROUP_BY = new ParseField("group_by");
public static final ParseField TIMEOUT = new ParseField("timeout");
public static final ParseField WAIT_FOR_COMPLETION = new ParseField("wait_for_completion");
public static final ParseField STATS_FIELD = new ParseField("stats");

// common strings
public static final String TASK_NAME = "data_frame/transforms";
public static final String REST_BASE_PATH = "/_data_frame/";
public static final String REST_BASE_PATH_TRANSFORMS_BY_ID = REST_BASE_PATH + "transforms/{id}/";

// note: this is used to match tasks
public static final String PERSISTENT_TASK_DESCRIPTION_PREFIX = "data_frame_";

// strings for meta information
public static final String META_FIELDNAME = "_data_frame";
public static final String CREATION_DATE_MILLIS = "creation_date_in_millis";
public static final String VERSION = "version";
public static final String CREATED = "created";
public static final String CREATED_BY = "created_by";
public static final String TRANSFORM = "transform";
public static final String DATA_FRAME_SIGNATURE = "data-frame-transform";

private DataFrameField() {
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/

package org.elasticsearch.xpack.core.dataframe;

import java.text.MessageFormat;
import java.util.Locale;

public class DataFrameMessages {

public static final String REST_STOP_TRANSFORM_WAIT_FOR_COMPLETION_TIMEOUT =
"Timed out after [{0}] while waiting for data frame transform [{1}] to stop";
public static final String REST_STOP_TRANSFORM_WAIT_FOR_COMPLETION_INTERRUPT =
"Interrupted while waiting for data frame transform [{0}] to stop";
public static final String REST_PUT_DATA_FRAME_TRANSFORM_EXISTS = "Transform with id [{0}] already exists";
public static final String REST_DATA_FRAME_UNKNOWN_TRANSFORM = "Transform with id [{0}] could not be found";
public static final String REST_PUT_DATA_FRAME_FAILED_TO_VALIDATE_DATA_FRAME_CONFIGURATION =
"Failed to validate data frame configuration";
public static final String REST_PUT_DATA_FRAME_FAILED_PERSIST_TRANSFORM_CONFIGURATION = "Failed to persist data frame configuration";
public static final String REST_PUT_DATA_FRAME_FAILED_TO_DEDUCE_TARGET_MAPPINGS = "Failed to deduce target mappings";
public static final String REST_PUT_DATA_FRAME_FAILED_TO_CREATE_TARGET_INDEX = "Failed to create target index";
public static final String REST_PUT_DATA_FRAME_FAILED_TO_START_PERSISTENT_TASK =
"Failed to start persistent task, configuration has been cleaned up: [{0}]";
public static final String REST_DATA_FRAME_FAILED_TO_SERIALIZE_TRANSFORM = "Failed to serialise transform [{0}]";

public static final String FAILED_TO_CREATE_DESTINATION_INDEX = "Could not create destination index [{0}] for transform[{1}]";
public static final String FAILED_TO_LOAD_TRANSFORM_CONFIGURATION =
"Failed to load data frame transform configuration for transform [{0}]";
public static final String FAILED_TO_PARSE_TRANSFORM_CONFIGURATION =
"Failed to parse transform configuration for data frame transform [{0}]";
public static final String DATA_FRAME_TRANSFORM_CONFIGURATION_NO_TRANSFORM =
"Data frame transform configuration must specify exactly 1 function";
public static final String DATA_FRAME_TRANSFORM_CONFIGURATION_PIVOT_NO_GROUP_BY =
"Data frame pivot transform configuration must specify at least 1 group_by";
public static final String DATA_FRAME_TRANSFORM_CONFIGURATION_PIVOT_NO_AGGREGATION =
"Data frame pivot transform configuration must specify at least 1 aggregation";
public static final String DATA_FRAME_TRANSFORM_PIVOT_FAILED_TO_CREATE_COMPOSITE_AGGREGATION =
"Failed to create composite aggregation from pivot function";
public static final String DATA_FRAME_TRANSFORM_CONFIGURATION_INVALID =
"Data frame transform configuration [{0}] has invalid elements";

public static final String LOG_DATA_FRAME_TRANSFORM_CONFIGURATION_BAD_QUERY =
"Failed to parse query for data frame transform";
public static final String LOG_DATA_FRAME_TRANSFORM_CONFIGURATION_BAD_GROUP_BY =
"Failed to parse group_by for data frame pivot transform";
public static final String LOG_DATA_FRAME_TRANSFORM_CONFIGURATION_BAD_AGGREGATION =
"Failed to parse aggregation for data frame pivot transform";

private DataFrameMessages() {
}

/**
* Returns the message parameter
*
* @param message Should be one of the statics defined in this class
*/
public static String getMessage(String message) {
return 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 message, Object... args) {
return new MessageFormat(message, Locale.ROOT).format(args);
}
}
Loading