Skip to content

Commit

Permalink
feat(client-emr-containers): EMR on EKS adds support for log rotation…
Browse files Browse the repository at this point in the history
… of Spark container logs with EMR-6.11.0 onwards, to the StartJobRun API.
  • Loading branch information
awstools committed Jun 7, 2023
1 parent d6b0058 commit 9a4e143
Show file tree
Hide file tree
Showing 15 changed files with 143 additions and 48 deletions.
6 changes: 3 additions & 3 deletions clients/client-emr-containers/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ AWS SDK for JavaScript EMRContainers Client for Node.js, Browser and React Nativ
<p>Amazon EMR on EKS provides a deployment option for Amazon EMR that allows
you to run open-source big data frameworks on Amazon Elastic Kubernetes Service (Amazon EKS).
With this deployment option, you can focus on running analytics workloads while Amazon EMR on EKS builds, configures, and manages containers for open-source applications.
For more information about Amazon EMR on EKS concepts and tasks, see <a href="https://docs.aws.amazon.com/emr/latest/EMR-on-EKS-DevelopmentGuide/emr-eks.html">What is
For more information about Amazon EMR on EKS concepts and tasks, see <a href="https://docs.aws.amazon.com/emr/latest/EMR-on-EKS-DevelopmentGuide/emr-eks.html">What is
shared id="EMR-EKS"/></a>.</p>
<p>
<i>Amazon EMR containers</i> is the API name for Amazon EMR on EKS.
The <code>emr-containers</code> prefix is used in the following scenarios: </p>
<i>Amazon EMR containers</i> is the API name for Amazon EMR on EKS. The <code>emr-containers</code> prefix is used in the following
scenarios: </p>
<ul>
<li>
<p>It is the prefix in the CLI commands for Amazon EMR on EKS. For example,
Expand Down
6 changes: 3 additions & 3 deletions clients/client-emr-containers/src/EMRContainers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -429,11 +429,11 @@ export interface EMRContainers {
* <p>Amazon EMR on EKS provides a deployment option for Amazon EMR that allows
* you to run open-source big data frameworks on Amazon Elastic Kubernetes Service (Amazon EKS).
* With this deployment option, you can focus on running analytics workloads while Amazon EMR on EKS builds, configures, and manages containers for open-source applications.
* For more information about Amazon EMR on EKS concepts and tasks, see <a href="https://docs.aws.amazon.com/emr/latest/EMR-on-EKS-DevelopmentGuide/emr-eks.html">What is
* For more information about Amazon EMR on EKS concepts and tasks, see <a href="https://docs.aws.amazon.com/emr/latest/EMR-on-EKS-DevelopmentGuide/emr-eks.html">What is
* shared id="EMR-EKS"/></a>.</p>
* <p>
* <i>Amazon EMR containers</i> is the API name for Amazon EMR on EKS.
* The <code>emr-containers</code> prefix is used in the following scenarios: </p>
* <i>Amazon EMR containers</i> is the API name for Amazon EMR on EKS. The <code>emr-containers</code> prefix is used in the following
* scenarios: </p>
* <ul>
* <li>
* <p>It is the prefix in the CLI commands for Amazon EMR on EKS. For example,
Expand Down
6 changes: 3 additions & 3 deletions clients/client-emr-containers/src/EMRContainersClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -331,11 +331,11 @@ export interface EMRContainersClientResolvedConfig extends EMRContainersClientRe
* <p>Amazon EMR on EKS provides a deployment option for Amazon EMR that allows
* you to run open-source big data frameworks on Amazon Elastic Kubernetes Service (Amazon EKS).
* With this deployment option, you can focus on running analytics workloads while Amazon EMR on EKS builds, configures, and manages containers for open-source applications.
* For more information about Amazon EMR on EKS concepts and tasks, see <a href="https://docs.aws.amazon.com/emr/latest/EMR-on-EKS-DevelopmentGuide/emr-eks.html">What is
* For more information about Amazon EMR on EKS concepts and tasks, see <a href="https://docs.aws.amazon.com/emr/latest/EMR-on-EKS-DevelopmentGuide/emr-eks.html">What is
* shared id="EMR-EKS"/></a>.</p>
* <p>
* <i>Amazon EMR containers</i> is the API name for Amazon EMR on EKS.
* The <code>emr-containers</code> prefix is used in the following scenarios: </p>
* <i>Amazon EMR containers</i> is the API name for Amazon EMR on EKS. The <code>emr-containers</code> prefix is used in the following
* scenarios: </p>
* <ul>
* <li>
* <p>It is the prefix in the CLI commands for Amazon EMR on EKS. For example,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,8 @@ export interface CreateManagedEndpointCommandOutput extends CreateManagedEndpoin

/**
* @public
* <p>Creates a managed endpoint. A managed endpoint is a gateway that connects Amazon EMR Studio to
* Amazon EMR on EKS so that Amazon EMR Studio can communicate with your virtual
* cluster.</p>
* <p>Creates a managed endpoint. A managed endpoint is a gateway that connects Amazon EMR Studio to Amazon EMR on EKS so that Amazon EMR Studio can
* communicate with your virtual cluster.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down Expand Up @@ -83,6 +82,10 @@ export interface CreateManagedEndpointCommandOutput extends CreateManagedEndpoin
* s3MonitoringConfiguration: { // S3MonitoringConfiguration
* logUri: "STRING_VALUE", // required
* },
* containerLogRotationConfiguration: { // ContainerLogRotationConfiguration
* rotationSize: "STRING_VALUE", // required
* maxFilesToKeep: Number("int"), // required
* },
* },
* },
* clientToken: "STRING_VALUE", // required
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,8 @@ export interface DeleteManagedEndpointCommandOutput extends DeleteManagedEndpoin

/**
* @public
* <p>Deletes a managed endpoint. A managed endpoint is a gateway that connects Amazon EMR Studio to
* Amazon EMR on EKS so that Amazon EMR Studio can communicate with your virtual
* cluster.</p>
* <p>Deletes a managed endpoint. A managed endpoint is a gateway that connects Amazon EMR Studio to Amazon EMR on EKS so that Amazon EMR Studio can
* communicate with your virtual cluster.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,10 @@ export interface DescribeJobRunCommandOutput extends DescribeJobRunResponse, __M
* // s3MonitoringConfiguration: { // S3MonitoringConfiguration
* // logUri: "STRING_VALUE", // required
* // },
* // containerLogRotationConfiguration: { // ContainerLogRotationConfiguration
* // rotationSize: "STRING_VALUE", // required
* // maxFilesToKeep: Number("int"), // required
* // },
* // },
* // },
* // jobDriver: { // JobDriver
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@ export interface DescribeManagedEndpointCommandOutput extends DescribeManagedEnd
/**
* @public
* <p>Displays detailed information about a managed endpoint. A managed endpoint is a gateway
* that connects Amazon EMR Studio to Amazon EMR on EKS so that Amazon EMR Studio can communicate with
* your virtual cluster.</p>
* that connects Amazon EMR Studio to Amazon EMR on EKS so that Amazon EMR Studio can communicate with your virtual cluster.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down Expand Up @@ -97,6 +96,10 @@ export interface DescribeManagedEndpointCommandOutput extends DescribeManagedEnd
* // s3MonitoringConfiguration: { // S3MonitoringConfiguration
* // logUri: "STRING_VALUE", // required
* // },
* // containerLogRotationConfiguration: { // ContainerLogRotationConfiguration
* // rotationSize: "STRING_VALUE", // required
* // maxFilesToKeep: Number("int"), // required
* // },
* // },
* // },
* // serverUrl: "STRING_VALUE",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,10 @@ export interface ListJobRunsCommandOutput extends ListJobRunsResponse, __Metadat
* // s3MonitoringConfiguration: { // S3MonitoringConfiguration
* // logUri: "STRING_VALUE", // required
* // },
* // containerLogRotationConfiguration: { // ContainerLogRotationConfiguration
* // rotationSize: "STRING_VALUE", // required
* // maxFilesToKeep: Number("int"), // required
* // },
* // },
* // },
* // jobDriver: { // JobDriver
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@ export interface ListManagedEndpointsCommandOutput extends ListManagedEndpointsR
/**
* @public
* <p>Lists managed endpoints based on a set of parameters. A managed endpoint is a gateway
* that connects Amazon EMR Studio to Amazon EMR on EKS so that Amazon EMR Studio can communicate with
* your virtual cluster.</p>
* that connects Amazon EMR Studio to Amazon EMR on EKS so that Amazon EMR Studio can communicate with your virtual cluster.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down Expand Up @@ -107,6 +106,10 @@ export interface ListManagedEndpointsCommandOutput extends ListManagedEndpointsR
* // s3MonitoringConfiguration: { // S3MonitoringConfiguration
* // logUri: "STRING_VALUE", // required
* // },
* // containerLogRotationConfiguration: { // ContainerLogRotationConfiguration
* // rotationSize: "STRING_VALUE", // required
* // maxFilesToKeep: Number("int"), // required
* // },
* // },
* // },
* // serverUrl: "STRING_VALUE",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,10 @@ export interface StartJobRunCommandOutput extends StartJobRunResponse, __Metadat
* s3MonitoringConfiguration: { // S3MonitoringConfiguration
* logUri: "STRING_VALUE", // required
* },
* containerLogRotationConfiguration: { // ContainerLogRotationConfiguration
* rotationSize: "STRING_VALUE", // required
* maxFilesToKeep: Number("int"), // required
* },
* },
* },
* tags: { // TagMap
Expand Down
17 changes: 9 additions & 8 deletions clients/client-emr-containers/src/commands/TagResourceCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,15 @@ export interface TagResourceCommandOutput extends TagResourceResponse, __Metadat

/**
* @public
* <p>Assigns tags to resources. A tag is a label that you assign to an Amazon Web Services resource. Each tag
* consists of a key and an optional value, both of which you define. Tags enable you to
* categorize your Amazon Web Services resources by attributes such as purpose, owner, or environment. When
* you have many resources of the same type, you can quickly identify a specific resource
* based on the tags you've assigned to it. For example, you can define a set of tags for your
* Amazon EMR on EKS clusters to help you track each cluster's owner and stack level.
* We recommend that you devise a consistent set of tag keys for each resource type. You can
* then search and filter the resources based on the tags that you add.</p>
* <p>Assigns tags to resources. A tag is a label that you assign to an Amazon Web Services
* resource. Each tag consists of a key and an optional value, both of which you define. Tags
* enable you to categorize your Amazon Web Services resources by attributes such as purpose,
* owner, or environment. When you have many resources of the same type, you can quickly
* identify a specific resource based on the tags you've assigned to it. For example, you can
* define a set of tags for your Amazon EMR on EKS clusters to help you track each
* cluster's owner and stack level. We recommend that you devise a consistent set of tag keys
* for each resource type. You can then search and filter the resources based on the tags that
* you add.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down
6 changes: 3 additions & 3 deletions clients/client-emr-containers/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
* <p>Amazon EMR on EKS provides a deployment option for Amazon EMR that allows
* you to run open-source big data frameworks on Amazon Elastic Kubernetes Service (Amazon EKS).
* With this deployment option, you can focus on running analytics workloads while Amazon EMR on EKS builds, configures, and manages containers for open-source applications.
* For more information about Amazon EMR on EKS concepts and tasks, see <a href="https://docs.aws.amazon.com/emr/latest/EMR-on-EKS-DevelopmentGuide/emr-eks.html">What is
* For more information about Amazon EMR on EKS concepts and tasks, see <a href="https://docs.aws.amazon.com/emr/latest/EMR-on-EKS-DevelopmentGuide/emr-eks.html">What is
* shared id="EMR-EKS"/></a>.</p>
* <p>
* <i>Amazon EMR containers</i> is the API name for Amazon EMR on EKS.
* The <code>emr-containers</code> prefix is used in the following scenarios: </p>
* <i>Amazon EMR containers</i> is the API name for Amazon EMR on EKS. The <code>emr-containers</code> prefix is used in the following
* scenarios: </p>
* <ul>
* <li>
* <p>It is the prefix in the CLI commands for Amazon EMR on EKS. For example,
Expand Down
38 changes: 30 additions & 8 deletions clients/client-emr-containers/src/models/models_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,22 @@ export interface CloudWatchMonitoringConfiguration {
logStreamNamePrefix?: string;
}

/**
* @public
* <p>The settings for container log rotation.</p>
*/
export interface ContainerLogRotationConfiguration {
/**
* <p>The file size at which to rotate logs. Minimum of 2KB, Maximum of 2GB.</p>
*/
rotationSize: string | undefined;

/**
* <p>The number of files to keep in container after rotation.</p>
*/
maxFilesToKeep: number | undefined;
}

/**
* @public
* @enum
Expand Down Expand Up @@ -317,6 +333,11 @@ export interface MonitoringConfiguration {
* <p>Amazon S3 configuration for monitoring log publishing.</p>
*/
s3MonitoringConfiguration?: S3MonitoringConfiguration;

/**
* <p>Enable or disable container log rotation.</p>
*/
containerLogRotationConfiguration?: ContainerLogRotationConfiguration;
}

/**
Expand Down Expand Up @@ -408,7 +429,8 @@ export type ContainerProviderType = (typeof ContainerProviderType)[keyof typeof
*/
export interface ContainerProvider {
/**
* <p>The type of the container provider. Amazon EKS is the only supported type as of now.</p>
* <p>The type of the container provider. Amazon EKS is the only supported type as of
* now.</p>
*/
type: ContainerProviderType | string | undefined;

Expand Down Expand Up @@ -697,11 +719,11 @@ export type VirtualClusterState = (typeof VirtualClusterState)[keyof typeof Virt
/**
* @public
* <p>This entity describes a virtual cluster. A virtual cluster is a Kubernetes namespace
* that Amazon EMR is registered with. Amazon EMR uses virtual clusters to run jobs and host
* endpoints. Multiple virtual clusters can be backed by the same physical cluster. However,
* each virtual cluster maps to one namespace on an Amazon EKS cluster. Virtual clusters do not
* create any active resources that contribute to your bill or that require lifecycle
* management outside the service.</p>
* that Amazon EMR is registered with. Amazon EMR uses virtual clusters to run
* jobs and host endpoints. Multiple virtual clusters can be backed by the same physical
* cluster. However, each virtual cluster maps to one namespace on an Amazon EKS
* cluster. Virtual clusters do not create any active resources that contribute to your bill
* or that require lifecycle management outside the service.</p>
*/
export interface VirtualCluster {
/**
Expand Down Expand Up @@ -1001,8 +1023,8 @@ export interface ListVirtualClustersRequest {
containerProviderId?: string;

/**
* <p>The container provider type of the virtual cluster. Amazon EKS is the only supported type as of
* now.</p>
* <p>The container provider type of the virtual cluster. Amazon EKS is the only
* supported type as of now.</p>
*/
containerProviderType?: ContainerProviderType | string;

Expand Down
5 changes: 5 additions & 0 deletions clients/client-emr-containers/src/protocols/Aws_restJson1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ import {
Configuration,
ConfigurationOverrides,
ContainerInfo,
ContainerLogRotationConfiguration,
ContainerProvider,
EksInfo,
Endpoint,
Expand Down Expand Up @@ -1949,6 +1950,8 @@ const se_ConfigurationOverrides = (input: ConfigurationOverrides, context: __Ser

// se_ContainerInfo omitted.

// se_ContainerLogRotationConfiguration omitted.

// se_ContainerProvider omitted.

// se_EksInfo omitted.
Expand Down Expand Up @@ -2046,6 +2049,8 @@ const de_ConfigurationOverrides = (output: any, context: __SerdeContext): Config

// de_ContainerInfo omitted.

// de_ContainerLogRotationConfiguration omitted.

// de_ContainerProvider omitted.

// de_Credentials omitted.
Expand Down
Loading

0 comments on commit 9a4e143

Please sign in to comment.