/** * Configures a failure handling strategy in case a request to Elasticsearch fails. * * <p>This strategy allows for custom failure handling using a {@link ActionRequestFailureHandler}. */ public Elasticsearch failureHandlerCustom(Class<? extends ActionRequestFailureHandler> failureHandlerClass) { internalProperties.putString(CONNECTOR_FAILURE_HANDLER, ElasticsearchValidator.CONNECTOR_FAILURE_HANDLER_VALUE_CUSTOM); internalProperties.putClass(CONNECTOR_FAILURE_HANDLER_CLASS, failureHandlerClass); return this; }
@Override protected Map<String, String> toFormatProperties() { final DescriptorProperties properties = new DescriptorProperties(); if (null != recordClass) { properties.putClass(AvroValidator.FORMAT_RECORD_CLASS, recordClass); } if (null != avroSchema) { properties.putString(AvroValidator.FORMAT_AVRO_SCHEMA, avroSchema); } return properties.asMap(); } }
properties.putString(CONNECTOR_SINK_PARTITIONER, sinkPartitionerType); if (sinkPartitionerClass != null) { properties.putClass(CONNECTOR_SINK_PARTITIONER_CLASS, sinkPartitionerClass);
/** * Configures a failure handling strategy in case a request to Elasticsearch fails. * * <p>This strategy allows for custom failure handling using a {@link ActionRequestFailureHandler}. */ public Elasticsearch failureHandlerCustom(Class<? extends ActionRequestFailureHandler> failureHandlerClass) { internalProperties.putString(CONNECTOR_FAILURE_HANDLER, ElasticsearchValidator.CONNECTOR_FAILURE_HANDLER_VALUE_CUSTOM); internalProperties.putClass(CONNECTOR_FAILURE_HANDLER_CLASS, failureHandlerClass); return this; }
/** * Configures a failure handling strategy in case a request to Elasticsearch fails. * * <p>This strategy allows for custom failure handling using a {@link ActionRequestFailureHandler}. */ public Elasticsearch failureHandlerCustom(Class<? extends ActionRequestFailureHandler> failureHandlerClass) { internalProperties.putString(CONNECTOR_FAILURE_HANDLER, ElasticsearchValidator.CONNECTOR_FAILURE_HANDLER_VALUE_CUSTOM); internalProperties.putClass(CONNECTOR_FAILURE_HANDLER_CLASS, failureHandlerClass); return this; }
@Override protected Map<String, String> toFormatProperties() { final DescriptorProperties properties = new DescriptorProperties(); if (null != recordClass) { properties.putClass(AvroValidator.FORMAT_RECORD_CLASS, recordClass); } if (null != avroSchema) { properties.putString(AvroValidator.FORMAT_AVRO_SCHEMA, avroSchema); } return properties.asMap(); } }
properties.putString(CONNECTOR_SINK_PARTITIONER, sinkPartitionerType); if (sinkPartitionerClass != null) { properties.putClass(CONNECTOR_SINK_PARTITIONER_CLASS, sinkPartitionerClass);
properties.putString(CONNECTOR_SINK_PARTITIONER, sinkPartitionerType); if (sinkPartitionerClass != null) { properties.putClass(CONNECTOR_SINK_PARTITIONER_CLASS, sinkPartitionerClass);
/** * Internal method for format properties conversion. */ @Override public Map<String, String> toFormatProperties() { final DescriptorProperties properties = new DescriptorProperties(); if (null != recordClass) { properties.putClass(AvroValidator.FORMAT_RECORD_CLASS, recordClass); } if (null != avroSchema) { properties.putString(AvroValidator.FORMAT_AVRO_SCHEMA, avroSchema); } return properties.asMap(); } }