본문 바로가기

전체 글

(40)
spark tuning.. import sys from pyspark import SparkContext, SparkConf from pyspark.sql.session import SparkSession i_data="../wordcount/input/xaa" o_data="../wordcount/output_ex" # spark=SparkSession # spark.conf.set("spark.driver.memory", '5g') if __name__ == "__main__": # create Spark context with necessary configuration sc = SparkContext("local","PySpark Word Count Example") # read data from text file and s..
Spark Tuning https://gritmind.blog/2020/10/16/spark_tune/ 스파크(Spark) 튜닝하기 Spark는 대용량 데이터 처리를 분산 환경에서 효율적으로 처리할 수 있는 프레임워크입니다. Spark는 여러 층의 데이터 추상화 구조와 분산 아키텍쳐가 녹아있는 복잡한 프레임워크이기 때문에 Job gritmind.blog 위 링크 참조하여 필요한 부분만 정리 RDD(Resilient Distributed Datasets) Spark 아키텍쳐는 크게 RDD와 DAG로 2가지의 주요한 추상화를 가진다. RDD는 특히 Spark 프로그래밍 튜닝 기법에서 많이 다룬다. Spark=RDD+Interface 공식처럼 RDD는 분산 환경과 Spark에 맞는 특별한 자료구조 RDD는 Spark 고유의 자료구조..
Spark 기초 https://gritmind.blog/2020/08/23/spark_start/ 스파크(Spark) 시작하기 최근 빅데이터 플랫폼에서 인메모리 방식의 Spark의 활용도가 점점 높아지고 있습니다. Spark은 분산 환경에서 동작하기 때문에 일반 프로그래밍과 다른 측면이 있습니다. Spark을 사용하기에 앞서 gritmind.blog 위 링크 참조하여 내가 필요한 부분만 정리 Spark란? 분산 데이터처리 시스템 분산 환경에서 동작 인메모리 방식 Spark 시작하기 Spark 프로그래밍 언어 스칼라로 작성되고 JVM(Java Virtual Machine)으로 돌아감 다양한 언어로 작성 가능(Scala, Java, Python, R) python으로 작성 시 저수준 API인 RDD로 작성하거나 사용자 정의..
linux split 명령어(파일 쪼개기, 합치기) spark에 사용하려는 약 input file을 다운받았음. 한번씩 돌리기엔 파일 크기가 커서 단위로 쪼개려 함 linux split 명령어 사용 split -b 옵션 사용, 100MB 파일로 나누었다 split -b 100m hg38.fa
spark-wordcount quick example (Spark streaming programming guide) https://spark.apache.org/docs/latest/streaming-programming-guide.html Spark Streaming - Spark 3.1.1 Documentation Spark Streaming Programming Guide Overview Spark Streaming is an extension of the core Spark API that enables scalable, high-throughput, fault-tolerant stream processing of live data streams. Data can be ingested from many sources like Kafka, Kinesis, or T spark.apache.org 위 링크의 a qu..
linked list stack (in c) #include #include #define FALSE 0 #define TRUE 1 typedef struct NODE{ struct NODE *next; int num; }NODE; NODE *top; void push(int data); int pop(); int isempty(); int main(){ push(1); push(2); printf("%d\n", pop()); push(3); push(4); printf("%d\n", pop()); printf("%d\n", pop()); printf("%d\n", pop()); return 0; } void push(int data){ struct NODE *pushnode=malloc(sizeof(struct NODE)); pushnode->n..
stack & queue (in c) -stack 선입후출 top에서 삽입/삭제가 일어남 연산 push() //데이터 삽입 pop() //데이터 삭제, 반환 isempty() //스텍이 비었는지 여부 반환 //비었으면 1(true) 아니면 0(false) 반환 isfull() //스텍에 원소가 찼는지 여부 반환 //찼으면 1(true) 아니면 0(false) 반환 1차원 배열로 구현 -> stack.c #include #define MAX_STACK_SIZE 3 #define FALSE 0 #define TRUE 1 int stack[MAX_STACK_SIZE]; int top=-1; void push(int data); int pop(); int isempty(); int isfull(); int main(){ push(10); push(..
Auto Draw - By Google Creative Lab google creative lab에서 제작한 autodraw ai 기술을 이용해 막그린 그림도 그럴듯한 그림으로 바꾸어준다. 어플리케이션으로도 이용 가능 태블릿을 사용하면 더욱 편할 것으로 예상 저작권 걱정이 필요 없다는 것이 큰 장점. 아이콘, 로고를 제작할 때 유용해 보인다. 실행 링크 https://www.autodraw.com/ AutoDraw Fast drawing for everyone. AutoDraw pairs machine learning with drawings from talented artists to help you draw stuff fast. www.autodraw.com 설명 링크 https://experiments.withgoogle.com/autodraw AutoDraw..