728x90
반응형

분류 전체보기 256

No lease on .. File does not exist. Holder DFSClient_NONMAPREDUCE_-690256595_53 does not have any open files. 에러 발생 시

sprark 배치 수행 중 아래와 같은 에러가 발생했다. 대략적인 원인은 병렬 처리로 인해서 임시 데이터가 삭제된 것이다. Caused by: org.apache.hadoop.ipc.RemoteException(org.apache.hadoop.hdfs.server.namenode.LeaseExpiredException): No lease on .c000.snappy.parquet (inode 4027045532): File does not exist. Holder DFSClient_NONMAPREDUCE_-690256595_53 does not have any open files. hive 테이블에 데이터를 입력하기 전에 alter table truncate partition 하는 부분이 있었는데 그 부..

hive 테이블에 한번에 여러 파티션에 insert 하기

아래와 같이 한 번의 쿼리로 여러 파티션이 데이터를 입력할 수 있다. FROM table_name INSERT OVERWRITE TABLE table_1 PARTITION (part_date = '20200101', cust_type = '1') select * where table_name.part_date = '20200101' and table_name.cust_type = '1' INSERT OVERWRITE TABLE table_1 PARTITION (part_date = '20200101', cust_type = '2') select * where table_name.part_date = 'v' and table_name.cust_type = '2' INSERT OVERWRITE TABLE t..

Service 'SparkUI' failed after 16 retries (starting from 4040)! Consider explicitly setting the appropriate port for the service 'SparkUI' (for example spark.ui.port for SparkUI) to an available port or increasing spark.port.maxRetries 에러 발생시

스파크 잡을 실행하면 아래와 같은 에러 메지시가 나타날 때가 있다. Service 'SparkUI' failed after 16 retries (starting from 4040)! Consider explicitly setting the appropriate port for the service 'SparkUI' (for example spark.ui.port for SparkUI) to an available port or increasing spark.port.maxRetries. 원인은 동시에 어러개의 잡이 실행될 때 SparkUI를 생성하기 위한 포트가 이미 사용 중이면 발생한다. 포트를 찾아보는 기본 값은 16이다. 가장 간단한 해결 방법은 더 많은 포트를 찾아보고 비어있는 포트에서 Spark..

udemy에서 한글 자막 보기

1. 대본 버튼 클릭 2. 대본에서 한글로 번역 3. F12를 클릭하거나, 우클릭 후 검사를 눌러서 개발자도구를 연다. 4. console 창에 아래 코드를 입력한다. if(typeof window.i!=='undefined'){clearInterval(window.i)}else{let lastText='';function check(){let toEl=$('.well--container--2edq4 span');let fromEl=$('p[data-purpose="transcript-cue-active"] span');let currentText=fromEl.html();if(lastText!==currentText){toEl.html(currentText)}lastText=fromEl.html()}w..

Tips 2021.02.14

하여서/해서/하여/해를 어떨때 사용하는가?

결론은 4가지 모두 사용해도 된다. 해서는 하여서를 줄인말이고, 해는 하여를 줄인말이다. 국립국어원에서 답변해준 아래 내용만 이해하고 있으면 될 것 같다. 표준 국어 대사전에서는 '-여'에 대해 '까닭이나 근거 따위를 나타내는 연결 어미'로 풀이하고 있으며 '-여서'에 대해 '이유나 근거를 나타내는 연결 어미'로 풀이하고 있어, 두 표현 간의 의미 차이가 크지는 않은 것으로 볼 수 있겠습니다. 참고 korean.go.kr/front/onlineQna/onlineQnaView.do?mn_id=216&qna_seq=191086&pageIndex=1 국립국어원 축소 확대 온라인가나다 상세보기 하여/해서/해 와 관련하여 질문합니다. 작성자 김성희 등록일 2020. 7. 14. 조회수 481 장점을 부각하여 홍보..

번역 2021.02.13

[git stash] commit 하지 않은 코드를 다른 브랜치로 옮기기

현재 코딩 중인 코드를 다른 브랜치로 옮기고 싶을 때가 있다. 이 때는 아래와 같이 stash를 이용하면 된다. -- 코드 임시 저장 git stash save -- 코드 임시 저장 목록 확인 git stash list -- 임시 저장 코드 가져오기 git checkout 원하는 브랜치명 -- 마지막 save한 코드 가져오기 git stash apply // stash 이름(예 : stash@{1}) git stash apply [stash 이름] 참고 gmlwjd9405.github.io/2018/05/18/git-stash.html

Git 2021.02.09

airflow로 데이터 입수 여부 확인하기

데이터를 생성하는 배치를 수행하고 나면 데이터가 정상적으로 입수 됐는지 확인이 필요할 때가 있다. 이 때는 airflow에서 check_operator를 사용하면 된다. check_operator는 sql을 실행 결과에서 반환한 값이 0인이 아닌지에 따라 성공여부를 판단한다. 0이면 실패이고, 1이면 성공이다. druid_broker_conn_id 값은 airflow admin의 connections에 생성한 connection id 값을 입력하면 된다. 아래 예시는 druid이지만 sql은 SQLCheckOperator를 이용하면 된다. 예시 코드는 아래와 같다. from airflow.operators.druid_check_operator import DruidCheckOperator check_in..

728x90
반응형