Class: SimpleMapReduce::Server::Config
- Inherits:
-
Object
- Object
- SimpleMapReduce::Server::Config
- Defined in:
- lib/simple_map_reduce/server/confg.rb
Constant Summary collapse
- DEFAULT_S3_CONFIG =
{ access_key_id: 'MINIO_ACCESS_KEY', secret_access_key: 'MINIO_SECRET_KEY', endpoint: 'http://127.0.0.1:9000', region: 'us-east-1', force_path_style: true }.freeze
- DEFAULT_S3_INPUT_BUCKET_NAME =
'input'
- DEFAULT_S3_INTERMEDIATE_BUCKET_NAME =
'intermediate'
- DEFAULT_S3_OUTPUT_BUCKET_NAME =
'output'
- DEFAULT_SERVER_PORT =
4567
Instance Attribute Summary collapse
-
#job_tracker_url ⇒ Object
readonly
Returns the value of attribute job_tracker_url.
-
#job_worker_url ⇒ Object
readonly
Returns the value of attribute job_worker_url.
-
#logger ⇒ Object
readonly
Returns the value of attribute logger.
-
#s3_config ⇒ Object
readonly
Returns the value of attribute s3_config.
-
#s3_input_bucket_name ⇒ Object
readonly
Returns the value of attribute s3_input_bucket_name.
-
#s3_intermediate_bucket_name ⇒ Object
readonly
Returns the value of attribute s3_intermediate_bucket_name.
-
#s3_output_bucket_name ⇒ Object
readonly
Returns the value of attribute s3_output_bucket_name.
-
#server_port ⇒ Object
readonly
Returns the value of attribute server_port.
Instance Method Summary collapse
-
#initialize(options) ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize(options) ⇒ Config
Returns a new instance of Config.
21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/simple_map_reduce/server/confg.rb', line 21 def initialize() setup_s3_config() @s3_input_bucket_name = [:s3_input_bucket_name] || DEFAULT_S3_INPUT_BUCKET_NAME @s3_intermediate_bucket_name = [:s3_intermediate_bucket_name] || DEFAULT_S3_INTERMEDIATE_BUCKET_NAME @s3_output_bucket_name = [:s3_output_bucket_name] || DEFAULT_S3_OUTPUT_BUCKET_NAME @server_port = [:server_port] || 4567 @job_tracker_url = [:job_tracker_url] @job_worker_url = [:job_worker_url] @logger = [:logger] || Logger.new($stdout) end |
Instance Attribute Details
#job_tracker_url ⇒ Object (readonly)
Returns the value of attribute job_tracker_url.
6 7 8 |
# File 'lib/simple_map_reduce/server/confg.rb', line 6 def job_tracker_url @job_tracker_url end |
#job_worker_url ⇒ Object (readonly)
Returns the value of attribute job_worker_url.
6 7 8 |
# File 'lib/simple_map_reduce/server/confg.rb', line 6 def job_worker_url @job_worker_url end |
#logger ⇒ Object (readonly)
Returns the value of attribute logger.
6 7 8 |
# File 'lib/simple_map_reduce/server/confg.rb', line 6 def logger @logger end |
#s3_config ⇒ Object (readonly)
Returns the value of attribute s3_config.
6 7 8 |
# File 'lib/simple_map_reduce/server/confg.rb', line 6 def s3_config @s3_config end |
#s3_input_bucket_name ⇒ Object (readonly)
Returns the value of attribute s3_input_bucket_name.
6 7 8 |
# File 'lib/simple_map_reduce/server/confg.rb', line 6 def s3_input_bucket_name @s3_input_bucket_name end |
#s3_intermediate_bucket_name ⇒ Object (readonly)
Returns the value of attribute s3_intermediate_bucket_name.
6 7 8 |
# File 'lib/simple_map_reduce/server/confg.rb', line 6 def s3_intermediate_bucket_name @s3_intermediate_bucket_name end |
#s3_output_bucket_name ⇒ Object (readonly)
Returns the value of attribute s3_output_bucket_name.
6 7 8 |
# File 'lib/simple_map_reduce/server/confg.rb', line 6 def s3_output_bucket_name @s3_output_bucket_name end |
#server_port ⇒ Object (readonly)
Returns the value of attribute server_port.
6 7 8 |
# File 'lib/simple_map_reduce/server/confg.rb', line 6 def server_port @server_port end |