Class: AWSCDK::EMR::CfnCluster::HadoopJarStepConfigProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
emr/cfn_cluster.rb

Overview

The HadoopJarStepConfig property type specifies a job flow step consisting of a JAR file whose main function will be executed.

The main function submits a job for the cluster to execute as a step on the master node, and then waits for the job to finish or fail before executing subsequent steps.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(jar:, args: nil, main_class: nil, step_properties: nil) ⇒ HadoopJarStepConfigProperty

Returns a new instance of HadoopJarStepConfigProperty.

Parameters:

  • jar (String)

    A path to a JAR file run during the step.

  • args (Array<String>, nil) (defaults to: nil)

    A list of command line arguments passed to the JAR file's main function when executed.

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

    The name of the main class in the specified Java file.

  • step_properties (AWSCDK::IResolvable, Array<AWSCDK::IResolvable, AWSCDK::EMR::CfnCluster::KeyValueProperty>, nil) (defaults to: nil)

    A list of Java properties that are set when the step runs.



1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
# File 'emr/cfn_cluster.rb', line 1442

def initialize(jar:, args: nil, main_class: nil, step_properties: nil)
  @jar = jar
  Jsii::Type.check_type(@jar, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "jar")
  @args = args
  Jsii::Type.check_type(@args, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "args") unless @args.nil?
  @main_class = main_class
  Jsii::Type.check_type(@main_class, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "mainClass") unless @main_class.nil?
  @step_properties = step_properties
  Jsii::Type.check_type(@step_properties, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZW1yLkNmbkNsdXN0ZXIuS2V5VmFsdWVQcm9wZXJ0eSJ9XX19LCJraW5kIjoiYXJyYXkifX1dfX0=")), "stepProperties") unless @step_properties.nil?
end

Instance Attribute Details

#argsArray<String>? (readonly)

A list of command line arguments passed to the JAR file's main function when executed.



1462
1463
1464
# File 'emr/cfn_cluster.rb', line 1462

def args
  @args
end

#jarString (readonly)

A path to a JAR file run during the step.



1457
1458
1459
# File 'emr/cfn_cluster.rb', line 1457

def jar
  @jar
end

#main_classString? (readonly)

The name of the main class in the specified Java file.

If not specified, the JAR file should specify a Main-Class in its manifest file.



1469
1470
1471
# File 'emr/cfn_cluster.rb', line 1469

def main_class
  @main_class
end

#step_propertiesAWSCDK::IResolvable, ... (readonly)

A list of Java properties that are set when the step runs.

You can use these properties to pass key-value pairs to your main function.



1476
1477
1478
# File 'emr/cfn_cluster.rb', line 1476

def step_properties
  @step_properties
end

Class Method Details

.jsii_propertiesObject



1478
1479
1480
1481
1482
1483
1484
1485
# File 'emr/cfn_cluster.rb', line 1478

def self.jsii_properties
  {
    :jar => "jar",
    :args => "args",
    :main_class => "mainClass",
    :step_properties => "stepProperties",
  }
end

Instance Method Details

#to_jsiiObject



1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
# File 'emr/cfn_cluster.rb', line 1487

def to_jsii
  result = {}
  result.merge!({
    "jar" => @jar,
    "args" => @args,
    "mainClass" => @main_class,
    "stepProperties" => @step_properties,
  })
  result.compact
end