Fix line lengths for ingest config utils
This commit is contained in:
parent
e5caadc4f3
commit
f6491047a0
|
@ -39,8 +39,8 @@ public final class ConfigurationUtils {
|
|||
*
|
||||
* If the property value isn't of type string a {@link ElasticsearchParseException} is thrown.
|
||||
*/
|
||||
public static String readOptionalStringProperty(String processorType, String processorTag, Map<String, Object> configuration,
|
||||
String propertyName) {
|
||||
public static String readOptionalStringProperty(String processorType, String processorTag,
|
||||
Map<String, Object> configuration, String propertyName) {
|
||||
Object value = configuration.remove(propertyName);
|
||||
return readString(processorType, processorTag, propertyName, value);
|
||||
}
|
||||
|
@ -112,8 +112,8 @@ public final class ConfigurationUtils {
|
|||
* If the property value isn't of type int a {@link ElasticsearchParseException} is thrown.
|
||||
* If the property is missing an {@link ElasticsearchParseException} is thrown
|
||||
*/
|
||||
public static int readIntProperty(String processorType, String processorTag, Map<String, Object> configuration, String propertyName,
|
||||
int defaultValue) {
|
||||
public static int readIntProperty(String processorType, String processorTag, Map<String, Object> configuration,
|
||||
String propertyName, int defaultValue) {
|
||||
Object value = configuration.remove(propertyName);
|
||||
if (value == null) {
|
||||
return defaultValue;
|
||||
|
@ -146,7 +146,8 @@ public final class ConfigurationUtils {
|
|||
* If the property value isn't of type list an {@link ElasticsearchParseException} is thrown.
|
||||
* If the property is missing an {@link ElasticsearchParseException} is thrown
|
||||
*/
|
||||
public static <T> List<T> readList(String processorType, String processorTag, Map<String, Object> configuration, String propertyName) {
|
||||
public static <T> List<T> readList(String processorType, String processorTag, Map<String, Object> configuration,
|
||||
String propertyName) {
|
||||
Object value = configuration.remove(propertyName);
|
||||
if (value == null) {
|
||||
throw newConfigurationException(processorType, processorTag, propertyName, "required property is missing");
|
||||
|
@ -211,7 +212,8 @@ public final class ConfigurationUtils {
|
|||
/**
|
||||
* Returns and removes the specified property as an {@link Object} from the specified configuration map.
|
||||
*/
|
||||
public static Object readObject(String processorType, String processorTag, Map<String, Object> configuration, String propertyName) {
|
||||
public static Object readObject(String processorType, String processorTag, Map<String, Object> configuration,
|
||||
String propertyName) {
|
||||
Object value = configuration.remove(propertyName);
|
||||
if (value == null) {
|
||||
throw newConfigurationException(processorType, processorTag, propertyName, "required property is missing");
|
||||
|
@ -219,8 +221,8 @@ public final class ConfigurationUtils {
|
|||
return value;
|
||||
}
|
||||
|
||||
public static ElasticsearchParseException newConfigurationException(String processorType, String processorTag, String propertyName,
|
||||
String reason) {
|
||||
public static ElasticsearchParseException newConfigurationException(String processorType, String processorTag,
|
||||
String propertyName, String reason) {
|
||||
ElasticsearchParseException exception = new ElasticsearchParseException("[" + propertyName + "] " + reason);
|
||||
|
||||
if (processorType != null) {
|
||||
|
@ -249,7 +251,8 @@ public final class ConfigurationUtils {
|
|||
return processors;
|
||||
}
|
||||
|
||||
private static Processor readProcessor(Map<String, Processor.Factory> processorFactories, String type, Map<String, Object> config) throws Exception {
|
||||
private static Processor readProcessor(Map<String, Processor.Factory> processorFactories,
|
||||
String type, Map<String, Object> config) throws Exception {
|
||||
Processor.Factory factory = processorFactories.get(type);
|
||||
if (factory != null) {
|
||||
boolean ignoreFailure = ConfigurationUtils.readBooleanProperty(null, null, config, "ignore_failure", false);
|
||||
|
|
Loading…
Reference in New Issue