Class: AWSCDK::EMRServerless::CfnApplication::WorkerConfigurationProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
emr_serverless/cfn_application.rb

Overview

The configuration of a worker.

For more information, see Supported worker configurations .

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(cpu:, memory:, disk: nil, disk_type: nil) ⇒ WorkerConfigurationProperty

Returns a new instance of WorkerConfigurationProperty.

Parameters:

  • cpu (String)

    The CPU requirements of the worker configuration.

  • memory (String)

    The memory requirements of the worker configuration.

  • disk (String, nil) (defaults to: nil)

    The disk requirements of the worker configuration.

  • disk_type (String, nil) (defaults to: nil)

    The disk type for every worker instance of the work type.



1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
# File 'emr_serverless/cfn_application.rb', line 1571

def initialize(cpu:, memory:, disk: nil, disk_type: nil)
  @cpu = cpu
  Jsii::Type.check_type(@cpu, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "cpu")
  @memory = memory
  Jsii::Type.check_type(@memory, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "memory")
  @disk = disk
  Jsii::Type.check_type(@disk, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "disk") unless @disk.nil?
  @disk_type = disk_type
  Jsii::Type.check_type(@disk_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "diskType") unless @disk_type.nil?
end

Instance Attribute Details

#cpuString (readonly)

The CPU requirements of the worker configuration.

Each worker can have 1, 2, 4, 8, or 16 vCPUs.



1588
1589
1590
# File 'emr_serverless/cfn_application.rb', line 1588

def cpu
  @cpu
end

#diskString? (readonly)

The disk requirements of the worker configuration.



1598
1599
1600
# File 'emr_serverless/cfn_application.rb', line 1598

def disk
  @disk
end

#disk_typeString? (readonly)

The disk type for every worker instance of the work type.

Shuffle optimized disks have higher performance characteristics and are better for shuffle heavy workloads. Default is STANDARD .



1605
1606
1607
# File 'emr_serverless/cfn_application.rb', line 1605

def disk_type
  @disk_type
end

#memoryString (readonly)

The memory requirements of the worker configuration.



1593
1594
1595
# File 'emr_serverless/cfn_application.rb', line 1593

def memory
  @memory
end

Class Method Details

.jsii_propertiesObject



1607
1608
1609
1610
1611
1612
1613
1614
# File 'emr_serverless/cfn_application.rb', line 1607

def self.jsii_properties
  {
    :cpu => "cpu",
    :memory => "memory",
    :disk => "disk",
    :disk_type => "diskType",
  }
end

Instance Method Details

#to_jsiiObject



1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
# File 'emr_serverless/cfn_application.rb', line 1616

def to_jsii
  result = {}
  result.merge!({
    "cpu" => @cpu,
    "memory" => @memory,
    "disk" => @disk,
    "diskType" => @disk_type,
  })
  result.compact
end