Class: Fluent::Plugin::NullOutput
- Defined in:
- lib/fluent/plugin/out_null.rb
Constant Summary
Constants inherited from Output
Output::BUFFER_STATS_KEYS, Output::CHUNKING_FIELD_WARN_NUM, Output::CHUNK_ID_PLACEHOLDER_PATTERN, Output::CHUNK_KEY_PATTERN, Output::CHUNK_KEY_PLACEHOLDER_PATTERN, Output::CHUNK_TAG_PLACEHOLDER_PATTERN, Output::FORMAT_COMPRESSED_MSGPACK_STREAM, Output::FORMAT_COMPRESSED_MSGPACK_STREAM_TIME_INT, Output::FORMAT_MSGPACK_STREAM, Output::FORMAT_MSGPACK_STREAM_TIME_INT, Output::TIMESTAMP_CHECK_BASE_TIME, Output::TIME_KEY_PLACEHOLDER_THRESHOLDS, Output::UNRECOVERABLE_ERRORS
Constants included from Configurable
Configurable::CONFIG_TYPE_REGISTRY
Instance Attribute Summary collapse
-
#delayed ⇒ Object
Returns the value of attribute delayed.
-
#feed_proc ⇒ Object
Returns the value of attribute feed_proc.
Attributes inherited from Output
#as_secondary, #buffer, #chunk_key_accessors, #chunk_key_tag, #chunk_key_time, #chunk_keys, #delayed_commit, #delayed_commit_timeout, #dequeued_chunks, #dequeued_chunks_mutex, #output_enqueue_thread_waiting, #retry, #retry_for_error_chunk, #secondary, #timekey_zone
Attributes included from Fluent::PluginLoggerMixin
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize ⇒ NullOutput
constructor
A new instance of NullOutput.
- #multi_workers_ready? ⇒ Boolean
- #prefer_buffered_processing ⇒ Object
- #prefer_delayed_commit ⇒ Object
- #process(tag, es) ⇒ Object
- #try_write(chunk) ⇒ Object
- #write(chunk) ⇒ Object
Methods inherited from Output
#acts_as_secondary, #after_shutdown, #after_start, #backup_chunk, #before_shutdown, #calculate_timekey, #check_slow_flush, #chunk_for_test, #close, #commit_write, #configure, #emit_buffered, #emit_count, #emit_events, #emit_records, #emit_size, #emit_sync, #enqueue_thread_run, #enqueue_thread_wait, #execute_chunking, #extract_placeholders, #flush_thread_run, #flush_thread_wakeup, #force_flush, #format, #formatted_to_msgpack_binary, #formatted_to_msgpack_binary?, #generate_format_proc, #get_placeholders_keys, #get_placeholders_tag, #get_placeholders_time, #handle_limit_reached, #handle_stream_simple, #handle_stream_with_custom_format, #handle_stream_with_standard_format, #implement?, #interrupt_flushes, #log_retry_error, #metadata, #next_flush_time, #num_errors, #placeholder_validate!, #placeholder_validators, #retry_state, #rollback_count, #rollback_write, #shutdown, #start, #statistics, #stop, #submit_flush_all, #submit_flush_once, #support_in_v12_style?, #terminate, #try_flush, #try_rollback_all, #try_rollback_write, #update_retry_state, #write_count, #write_guard
Methods included from UniqueId::Mixin
#dump_unique_id_hex, #generate_unique_id
Methods included from Fluent::PluginHelper::Mixin
Methods included from Fluent::PluginLoggerMixin
#configure, included, #terminate
Methods included from Fluent::PluginId
#configure, #plugin_id, #plugin_id_configured?, #plugin_id_for_test?, #plugin_root_dir, #stop
Methods inherited from Base
#acquire_worker_lock, #after_shutdown, #after_shutdown?, #after_start, #after_started?, #before_shutdown, #before_shutdown?, #called_in_test?, #close, #closed?, #configure, #configured?, #context_router, #context_router=, #fluentd_worker_id, #get_lock_path, #has_router?, #inspect, #plugin_root_dir, #reloadable_plugin?, #shutdown, #shutdown?, #start, #started?, #stop, #stopped?, #string_safe_encoding, #terminate, #terminated?
Methods included from SystemConfig::Mixin
#system_config, #system_config_override
Methods included from Configurable
#config, #configure, #configure_proxy_generate, #configured_section_create, included, lookup_type, register_type
Constructor Details
#initialize ⇒ NullOutput
Returns a new instance of NullOutput.
43 44 45 46 47 |
# File 'lib/fluent/plugin/out_null.rb', line 43 def initialize super @delayed = false @feed_proc = nil end |
Instance Attribute Details
#delayed ⇒ Object
Returns the value of attribute delayed.
41 42 43 |
# File 'lib/fluent/plugin/out_null.rb', line 41 def delayed @delayed end |
#feed_proc ⇒ Object
Returns the value of attribute feed_proc.
41 42 43 |
# File 'lib/fluent/plugin/out_null.rb', line 41 def feed_proc @feed_proc end |
Instance Method Details
#multi_workers_ready? ⇒ Boolean
49 50 51 |
# File 'lib/fluent/plugin/out_null.rb', line 49 def multi_workers_ready? true end |
#prefer_buffered_processing ⇒ Object
33 34 35 |
# File 'lib/fluent/plugin/out_null.rb', line 33 def prefer_buffered_processing false end |
#prefer_delayed_commit ⇒ Object
37 38 39 |
# File 'lib/fluent/plugin/out_null.rb', line 37 def prefer_delayed_commit @delayed end |
#process(tag, es) ⇒ Object
53 54 55 56 |
# File 'lib/fluent/plugin/out_null.rb', line 53 def process(tag, es) raise "failed to flush" if @never_flush # Do nothing end |
#try_write(chunk) ⇒ Object
65 66 67 68 69 70 71 72 |
# File 'lib/fluent/plugin/out_null.rb', line 65 def try_write(chunk) raise "failed to flush" if @never_flush if @feed_proc @feed_proc.call(chunk) end # not to commit chunks for testing # commit_write(chunk.unique_id) end |
#write(chunk) ⇒ Object
58 59 60 61 62 63 |
# File 'lib/fluent/plugin/out_null.rb', line 58 def write(chunk) raise "failed to flush" if @never_flush if @feed_proc @feed_proc.call(chunk) end end |