티스토리 뷰
728x90
import boto3
from botocore.config import Config
import random
from airflow.providers.amazon.aws.sensors.emr_step import EmrStepSensor
_POKE_INTERVAL = 60
_RANDOM = {"START": 1, "END": 60, "INTERVAL": 1}
_MAX_ATTEMPTS = 15
class DefaultEmrStepSensor(EmrStepSensor):
def __init__(
self,
poke_interval=None,
**kwargs,
):
poke_interval = poke_interval or _POKE_INTERVAL + random.randrange(
_RANDOM["START"], _RANDOM["END"], _RANDOM["INTERVAL"]
)
super().__init__(poke_interval=poke_interval, **kwargs)
def get_emr_response(self):
config = Config(retries={"max_attempts": _MAX_ATTEMPTS, "mode": "standard"})
emr_client = boto3.client("emr", config=config)
self.log.info("Poking step %s on cluster %s", self.step_id, self.job_flow_id)
return emr_client.describe_step(
ClusterId=self.job_flow_id,
StepId=self.step_id,
)
https://github.com/apache/airflow/issues/23475
https://github.com/apache/airflow/pull/23906/files
https://boto3.amazonaws.com/v1/documentation/api/latest/guide/retries.html#retries
https://aws.amazon.com/ko/premiumsupport/knowledge-center/ssm-parameter-store-rate-exceeded/
https://aws.amazon.com/ko/premiumsupport/knowledge-center/cloudwatch-logs-throttling/
https://github.com/cloud-custodian/cloud-custodian/issues/1812
https://docs.aws.amazon.com/step-functions/latest/dg/limits-overview.html
728x90
'공부' 카테고리의 다른 글
[aws] s3 mkdir (0) | 2023.01.07 |
---|---|
[aws] s3 bucket list (0) | 2023.01.07 |
[aws] s3 delete files (0) | 2023.01.06 |
[sh] cp all files (add hidden files) (0) | 2023.01.05 |
[sh] docker image `RUN yum install -y awscli` (0) | 2023.01.05 |
댓글
250x250
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
TAG
- 테슬라 레퍼럴
- 클루지
- COUNT
- wlw
- 모델y
- 팔로워 수 세기
- 연애학개론
- 유투브
- 테슬라 리퍼럴 코드
- 테슬라 크레딧 사용
- 모델 Y 레퍼럴
- 테슬라
- 어떻게 능력을 보여줄 것인가?
- 책그림
- 테슬라 레퍼럴 적용 확인
- 테슬라 추천
- 인스타그램
- 테슬라 리퍼럴 코드 혜택
- 테슬라 리퍼럴 코드 생성
- 할인
- 김달
- 테슬라 레퍼럴 코드 확인
- follower
- Bot
- 개리마커스
- 메디파크 내과 전문의 의학박사 김영수
- 레퍼럴
- Kluge
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | |
7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 | 29 | 30 |
글 보관함