목록전체 글 (768)
우노
Docker run 명령어 기본 구조 docker run 은 Image 로 Container 를 생성하는 명령어입니다. docker run docker run -d -it --name containername imagename bash Docker run 옵션 종류 -i, --interactive 표준 입력(stdin)을 활성화하며, 컨테이너와 연결(attach)되어 있지 않더라도 표준 입력을 유지합니다. 보통 이 옵션을 사용하여 Bash 에 명령을 입력합니다. -t, --tty TTY 모드(pseudo-TTY)를 사용합니다. Bash를 사용하려면 이 옵션을 설정해야 합니다. 이 옵션을 설정하지 않으면 명령을 입력할 수는 있지만, 셸이 표시되지 않습니다. --name 컨테이너 이름을 설정합니다. -d, ..
AWS CLI 를 사용한, S3 업로드 및 다운로드 S3 에 파일 업로드 aws s3 cp "로컬 경로" "S3 버킷 경로" S3 에서 파일 다운로드 aws s3 cp "S3 버킷 경로" "로컬 경로" S3 에 폴더 업로드 aws s3 cp "로컬 경로" "S3 버킷 경로" --recursive S3 에서 폴더 다운로드 aws s3 cp "S3 버킷 경로" "로컬 경로" --recursive
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/chuRgJ/btrdaFcHViy/RiyZlOMSqYRjzCU1TW6Io1/img.png)
sc.textFile Spark 환경에서, 외부 텍스트 데이터를 spark context 객체의 textFile 메서드를 이용해 읽어오면, Spark Cluster 내에 RDD 객체가 생성된다. sc.textFile() 함수 사용 코드는 아래와 같다. val temp = sc.textFile("file:///home/test.txt", minPartitions=3) temp.getNumPartitions 또한, RDD 생성시, minPartitions 매개변수를 통해 데이터를 최소 몇 조각으로 나눌지 지정할 수 있으며, RDD 생성 후, getNumPartitions 함수를 통해 데이터가 총 몇 조각의 파티션으로 나뉘었는지도 확인할 수 있다. 데이터를 몇 개의 파티션으로 나누는게 좋을까? 각 Execut..
특정 application 의 전체 로그 확인 yarn logs -applicationId 특정 application 의 에러 로그만 확인 yarn logs -applicationId -log_files stderr참고 https://sthyun.tistory.com/entry/Yarn-log-확인
HDFS 명령어 Hadoop 의 Filesystem 인 HDFS 는, 아래와 같은 명령어 구조를 사용해 다룰 수 있다. Hadoop-2.6.0 에서는 총 33개의 HDFS 명령어를 지원한다. hdfs dfs [GENERIC_OPTIONS] [COMMAND_OPTIONS] ls 특정 디렉토리 또는 디렉토리 내부의 파일을 보여준다. hdfs dfs -ls [-R] {args} R : 특정 디렉토리 이하에 대해서 정보를 보여줌 mkdir 특정 path 에 directory 를 생성한다. hdfs dfs -mkdir [-p] {paths} cat 해당 파일의 내용을 출력한다. (linux 명령어 cat 과 동일) hdfs dfs -cat URI [URI ...] cp Hdfs 내부에서 파일을 복사/붙여넣기 한다..
에러 메세지 Error response from daemon: conflict: unable to delete "" (must be forced) - image is referenced in multiple repositories 해결 방법 "-f" 를 옵션으로 주어, 이미지를 강제 삭제 docker rmi -f "IMAGE ID"
에러 메세지 Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running? 원인 docker service 실행이 안되어있는 것 해결 방법 sudo systemctl start docker sudo systemctl enable docker # 옵션 : 시스템 부팅 시, 도커를 시작하도록
초 단위 측정 import time # 초 단위 start_s = int(round(time.time())) end_s = int(round(time.time())) print("second : ", end_s - start_s) 밀리 초 단위 측정 import time # 밀리 초 단위 start_ms = int(round(time.time() * 1000)) end_ms = int(round(time.time() * 1000)) print("milli second : ", end_ms - start_ms)
Container Image 기반으로 Lambda Function 을 구현하면, 로그 출력으로 Duration, Billed Duration, Init Duration 을 확인할 수 있다. Init Duration Lambda 함수 초기화 시간 cold start 에만 발생 Duration 함수 실행 시간 cold start, warm start 모두 발생 Billed Duration 비용 청구 시간 cold start 일 땐 Init Duration + Duration = Billed Duration warm start 일 땐 Duration = Billed Duration
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/cammbf/btrcp0CufZ9/xFsm0cXZO6iFdFWAPFBPZ1/img.png)
C언어의 메모리 구조 프로그램을 실행시키면, 운영체제는 우리가 실행시킨 프로그램을 위해, 메모리 공간을 할당해줍니다. 프로그램이 운영체제로부터 할당받는 대표적인 메모리 공간은 4가지입니다. 코드(code) 영역 데이터(data) 영역 스택(stack) 영역 힙(heap) 영역 메모리 영역 시각화 코드(Code) 영역 코드(Code) 영역은, 실행할 프로그램의 코드가 저장되는 영역으로, 텍스트 영역이라고도 부릅니다. CPU 는 코드 영역에 저장된 명령어를 하나씩 가져가서 처리하게 됩니다. 데이터(Data) 영역 전역 변수와 static 변수가 할당되는 영역입니다. 프로그램의 시작과 동시에 메모리에 할당되고, 프로그램이 종료되면 메모리에서 소멸됩니다. 예제 코드 #include int a = 10; // 데..