https://eyeballs.tistory.com/206
1. 한글 Korean
2. 내가 번역한 영어 English by me
3. Gemini 가 고쳐준 영어 English fixed by Gemini
1. 스파크 애플리케이션은 두 가지 프로세스로 구성된다. 하나는 드라이버 프로세스, 또 다른 하나는 익스큐터 프로세스.
2. Spark application consists of two different processes. One is driver process, the other one is executor process.
3. A Spark application consists of two main processes: a driver process and an executor process.
Spark applications are made up of a driver process and an executor process.
1. 하나의 애플리케이션은 하나의 SparkSession 을 갖는다.
2. One Spark application has one SparkSession.
3. Each Spark application has a single SparkSession.
1. 드라이버 프로세스는 스파크 애플리케이션(익스큐터 및 태스크)의 정보 유지 관리한다.
2. Driver process manages the status of Spark application(executors and tasks)
3. The driver process maintains information about the Spark application, including its executors and tasks.
The driver process manages the state of the Spark application, keeping track of its executors and tasks
1. 드라이버 프로세스는 클러스터 매니저와 통신하여 자원 얻고 익스큐터 실행한다.
2. Driver process communicates with Cluster Manager to ask resources for executors.
3. The driver process communicates with the cluster manager to request resources for the executors.
1. 드라이버 프로세스는 사용자 프로그램이나 입력에 대해 응답한다.
2. Driver process responses to input request from user programs.
3. The driver process responds to requests from user programs.
1. 드라이버 프로세스는 실행된 코드 해석하고, 물리적 실행 계획을 DAG 변환한다.
2. Driver process interprets the run Spark codes and transforms it into the physical execution plan.
3. The driver process interprets the Spark code and transforms it into a physical execution plan.
1. 드라이버 프로세스는 생성된 Task들을 Executor에게 할당한다.
2. Driver process allows generated tasks to executors to run.
3. The driver process assigns the generated tasks to the executors.
The driver process dispatches generated tasks to the executors for execution.
1. 드라이버 프로세스는 작업을 각 익스큐터에게 배포하고 스케줄링하는 역할을 맡는다.
2. Driver process deploys tasks to each excutors and schedules tasks.
3. The driver process is responsible for distributing and scheduling tasks across the executors
1. 익스큐터 프로세스는 드라이버 프로세스가 할당한 코드 작업을 수행한다.
2. Executor process executes tasks that driver process allows.
3. The executor process executes the tasks assigned by the driver process.
1. 익스큐터 프로세스는 자신의 작업 진행 상황을 드라이버에게 보고한다.
2. Executor process reports its progress of task execution to driver process.
3. The executor process reports its task progress back to the driver process.
The executor process reports its progress to the driver
1. 모든 스파크 애플리케이션은 개별 익스큐터 프로세스를 사용한다.
2. All spark applications use its own executor processes.
3. Each Spark application uses its own set of executor processes
1. 드라이버 프로세스, 익스큐터 프로세스는 말 그대로 프로세스이기 때문에, 단일 머신 위에서 동작 가능하다.
2. Driver process and executor process are a process literally, so they can run on a single machine.
3. Because the driver and executor are just processes, they can both run on a single machine
Since the driver and executor are simply processes, they have the capability to operate on a single machine.
1. 클러스터 매니저는 스파크 앱 실행에 필요한 자원을 할당한다.
2. The Cluster manager assigns resources to Spark applications in need to execute.
3. The cluster manager allocates resources required by Spark applications.
The cluster manager allocates resources for a Spark application to execute.
1. sparksession 이란, 데이터를 처리하는 진입점(Entry Point) 역할을 하는 객체이며, 드라이버 프로세스 그 자체다.
2. A SparkSession is an object that is responsible for an entry point to handle data, and it is a driver process itself.
3. A SparkSession is the unified entry point for a Spark application, and it resides within the driver process.
1. sparksession 을 통해 df, ds, rdd, sparksql 를 처리할 수 있다.
2. We can handle df, ds, rdd, sparksql through the SparkSession.
3. We can work with DataFrames, Datasets, RDDs, and Spark SQL through the SparkSession.
The SparkSession allows us to process DataFrames, Datasets, RDDs, and Spark SQL.
1. 여기서 말하는 '처리'란, df, ds, rdd, sparksql 코드를 해석하고 실행 계획을 수립한다는 의미이다.
2. Here, 'handle' means that it interprets df, ds, rdd, sparksql codes and builds an execution plan.
3. Specifically, this means the SparkSession interprets the code and creates an execution plan.
1. Hadoop YARN 이 클러스터 매니저로 사용되는 경우, yarn 은 사용 가능한 노드에 container 를 생성하고 spark 에게 사용하라고 넘겨준다.
2. When Hadoop YARN is used as a cluster manager, YARN generates containers on nodes that resource is available, and gives the containers to Spark to use.
3. When Hadoop YARN is used as the cluster manager, YARN provisions containers on available nodes and provides them to the Spark application
1. 이렇게 넘겨받은 container 에서 새로운 spark executor 가 실행된다.
2. new spark executors are excuted in the container from the cluster manager.
3. A new Spark executor is launched within each container provided by the cluster manager.
1. sparksession 을 통해 csv, json 등 다양한 포맷의 파일을 읽는다.
2. We can read different formatted files Through the SparkSession, such as csv, json.
3. We can read files of various formats through the SparkSession, such as CSV or JSON.
1. 여기서 '파일을 읽는다'는 의미는, 파일을 읽고 코드를 해석하고 실행 계획을 수립한다는 의미이다.
2. Specifically, it means that it reads files, interprets the code, and builds an execution plan.
3. Specifically, the SparkSession is responsible for reading the files, interpreting the code, and building the execution plan.
1. 실질적인 읽기 작업은 각 executor 에서 진행된다.
2. Practical reading tasks are executed on each executor.
3. The actual file-reading work is performed by each executor
1. sparkcontext 는 Spark 1.0 버전에서 주로 사용되었고, Spark 2.0 이상 버전에서는 sparksession 에 흡수되었다.
2. SparkConext was used on Spark version 1.0, and it is included into SparkSession on Spark version 2.0 and higer.
3. The SparkContext was the primary entry point in Spark 1.x, but it has been integrated into the SparkSession in Spark 2.x and later.
1. 모든 익스큐터가 병렬 작업할 수 있도록 데이터를 파티션이라는 청크 단위로 분할한다.
2. Spark splits data as a unit of chunk called partition for each executor to work in parallel.
3. To enable all executors to work in parallel, Spark divides the data into smaller chunks called partitions.
1. 파티셔닝이란, 데이터가 클러스터에서 물리적으로 분산되는 방식을 의미한다.
2. Partitioning means how data is distributed physically on the cluster.
3. Partitioning refers to the physical distribution of data across the cluster.
1. 파티셔닝 스키마란, 데이터를 저장할 때 사용되는 물리적인 분할 방법을 의미한다.
2. Partitioning schema means how data is stored physically in the storage.
3. The partitioning schema defines the strategy for how data is physically stored in the storage.
1. 예를 들어, 아래와 같이 partitioning 할 컬럼을 직접 지정하여 저장하면, dir 구조의 path 에 데이터가 저장된다.
2. For instance, if you set a column to apply partitioning as follow, data is stored in the directory form path.
3. For instance, if you specify a column to partition by, the data is stored in a directory-like structure as follows.
1. 파티셔닝과 파티셔닝 스키마는 다음과 같은 부분이 다르다.
2. Partitioning and partitioning schema are different as follow.
3. The key differences between partitioning and the partitioning schema are as follows
1. 그리고 해당 데이터를 대상으로 작업을 분산 실행한다.
2. And then Spark executes the task in parallel for the corresponding data.
3. Spark then executes the tasks in parallel on that data.
1. 특정 컬럼을 기준으로 디렉토리 단위의 path 에 데이터를 저장한다.
2. Data is stored based on a specific column in a directory path.
3. Data is stored in a directory-like structure based on a specific column.
1. 이를 통해 특정 파티션만 읽는 Partition Pruning 이 가능하다.
2. Through this strategy, we can read only designated partitions and its called Partition Pruning.
3. This strategy allows for partition pruning, which means Spark can selectively read only the necessary partitions.
1. 하둡은 데이터를 읽을 때, 설정된 InputSplit 분할 정책에 따라 데이터를 분할한다.
2. When Hadoop reads data, it divides data following a split strategy which is set in advance.
3. When Hadoop reads data, it divides the data according to a pre-configured split policy (or InputSplit policy)."
1. 이 분할 정책에 따라 나눠진 데이터가 Spark 의 파티션 단위가 된다.
2. The data divided by this strategy will be Spark partitions.
3. The data divisions resulting from this policy become Spark's partitions.
1. HDFS 파일 크기가 128MB보다 크다면, Spark에서 128MB만큼 쪼개면서 파일 읽는다.
2. If HDFS file size is bigger than 128mb, Spark reads the file dividing by 128mb.
3. If an HDFS file is larger than 128 MB, Spark will read it by splitting it into 128 MB blocks.
1. 통상적으로는 Partition의 크기가 클수록 메모리가 더 필요하고, Partition의 수가 많을수록 Core가 더 필요하다.
2. Generally, it needs more memory as the size of partition, and more cores as the number of partitions.
3. Generally, larger partitions require more memory per core, while a greater number of partitions requires more cores to process them in parallel.
1. 파티션 수가 많으면 메모리 부담이 적어지고 병렬성이 올라간다.
2. Memory overhead gets lower and parallelism gets higher as the number of partitions.
3. A larger number of partitions can reduce memory overhead and increase parallelism.
크기가 커진다.
- The size is increasing.
- The size of X is increasing.
- The size is growing
- The size is expanding.
크기가 작아진다.
- The size is decreasing.
- The size is shrinking.
수가 많아진다.
- The number is getting higher.
- The number is increasing.
- The count is growing.
수가 적어진다.
- The number is decreasing.
- The count is falling.
값이 늘어난다.
- The value is increasing.
- The value has grown.
값이 줄어든다.
- The value is decreasing.
- The value has dropped.
병렬성이 올라간다.
- Parallelism is increasing.
병렬성이 내려간다.
- Parallelism is decreasing.
- Parallelism is being reduced.
Up 을 사용하려면
- The value is going up.
- The count is trending up.
- We need to ramp up the parallelism.
- The metrics are up this quarter."
Down 을 사용하려면
- The value is going down.
- The count is trending down.
- We need to scale down our cluster.
- The number of errors is down.
결론 : better use "increase," "decrease," "grow," "reduce," "rise," and "fall" instead of "up", "down"
어느 경우든 increase, decrease 를 사용해도 무방.....
"increase" and "decrease" could be used to describe a change in value, number, size, or rate.
For instance,
- We saw a decrease in memory usage.
- The throughput increased by 15%.
- There was a decrease in latency.
* For growth (like a business or population): "Grow" or "expand."
* Example: "The company's data footprint is growing."
* For reduction or simplification: "Reduce" or "lower."
* Example: "We need to lower the memory footprint."
* For a sudden change: "Spike" or "drop."
* Example: "The CPU usage spiked at 2:00 AM." "The number of errors dropped after the fix."
* For something going up or down in a graph: "Rise" or "fall."
* Example: "The number of users has risen steadily."
1. Shuffle Partition 하나 크기가 100~200MB 정도 나올 수 있도록 개수 조절하는 것이 좋다.
2. Better adjust Shuffle Partition to have partitions with 100~200 mb size.
3. It's best practice to adjust the number of shuffle partitions so that each partition is between 100 and 200 MB in size.
1. Partition의 크기가 크고 연산에 쓰이는 메모리가 부족하다면 Shuffle Spill 이 발생할 수 있다.
2. It could lead to Shuffle Spill when partition size is larger and memory is not enough.
3. If partition sizes are too large and there is insufficient memory for the operation, it can lead to a shuffle spill.
1. Shuffle spill 이란, 셔플에 필요한 메모리가 부족해서 디스크를 대신 사용하는 것을 말한다.
2. Shuffle Spill refers to the use of disk instead of memory because memory is not enough for shuffle
3. A shuffle spill occurs when Spark runs out of memory for a shuffle operation, and Spark is forced to write data to disk instead.
1. 메모리 내 데이터를 직렬화한 후 디스크에 저장한다.
2. Data is serialized before being stored to the disk.
3. The data is serialized and then written to (or onto) disk.
1. shuffle spill 은 성능에 악영향을 준다.
2. Shuffle Spill has a bad effect for performance.
3. Shuffle spill has a negative impact on performance.
1. 200개 정도의 파티션은 대부분의 Spark Job에서 허용 가능한 수준의 오버헤드이다.
2. 200 Partitions is acceptable for Spark Job.
3. A default of 200 partitions is generally considered an acceptable starting point for most Spark jobs.
1. 기본값 200은 병렬성 극대화, 데이터 스큐 완화, Executor OOM 방지라는 장점을 고려한 것이다.
2. Default value 200 is considered adventage such as increasing parallelism, reducing data skew, and avoiding executor OOM.
3. The default value of 200 shuffle partitions is chosen to maximize parallelism, mitigate data skew, and prevent OutOfMemory (OOM) errors on executors
1. Spark은 데이터를 처리할 Task를 해당 데이터가 있는 노드 (DataNode)의 Executor에게 우선적으로 할당하려고 시도한다.
2. Spark tries to assign tasks to handle data to executors in priority which have that data.
3. Spark attempts to preferably assign a task to an executor that is running on the same node as the data to be processed.
1. 이것을 데이터 지역성이라고 부르며, 이것은 네트워크 비용 최소화를 위한 전략이다.
2. It's called data locality to reduce network communication cost.
3. This is called data locality, and it's a strategy used to minimize network communication costs
1. 위와 같은 방식으로 동작하기 때문에, 중간에 끊어진 blocks 를 읽어도 중복 처리, 데이터 누락 등의 이슈가 없다.
2. It works as described, so there are no errors such as duplication and missing data when it read blocks which is not completed.
3. Because of this approach as described above, there are no issues with data duplication or data loss, even when reading incomplete or corrupt data blocks.
1. 데이터를 여러 번에 걸쳐 조금씩 읽고 처리한다.
2. It reads small data several times and handle them.
3. Spark reads and processes data in small, incremental chunks.
1. 각 Executor는 자신이 처리한 결과 데이터를 메모리 내의 파티션 형태로 가지고 있다.
2. Each executor has the partition in memory which each handled.
3. Each executor holds the results of the data it has processed in its own memory partitions.
1. 여러 Executor가 주체적으로 병렬로 HDFS에 쓰기 작업 수행한다.
2. Several executors execute writing tasks to HDFS in parallel actively.
3. Multiple executors write to HDFS in parallel.
1. 일반적으로는 파티션 크기에 따라 HDFS 블록이 생성된다(결정된다)
2. Generally, HDFS blocks are generated by partition size.
3. Generally, the HDFS block size is determined by the partition size.
1. 하지만 파티션 크기가 HDFS 블록 크기보다 큰 경우, Executor의 메모리 내 파티션 하나가 HDFS에 여러 개의 블록으로 나뉘어 저장될 수 있다.
2. But if partition size is larger than HDFS block size, a single partition in memory of executor could be divided into several HDFS blocks.
3. However, if a partition is larger than the HDFS block size, a single in-memory partition could be split into multiple HDFS blocks.
1. 반대로, 여러 개의 작은 파티션의 내용이 하나의 HDFS 블록에 이어져서 저장될 수도 있다.
2. On the other hand, multiple small partitions could be a single HDFS block.
3. Conversely (or On the contrary), the contents of several small partitions could be combined and written to a single HDFS block.
1. memory 내 데이터를 쓰고, 이어서 disk 내 데이터를 쓴다.
2. It writes data from memory and it writes data from disk continually
3. Spark first writes data from memory, and then writes the spilled data from disk.
Spark writes the in-memory data first, followed by the data spilled to disk.
1. dataframe 이 한 번 생성되면 변경할 수 없는 불변성을 갖는다.
2. Dataframe has an immutable property which means it never can be changed.
3. A DataFrame is immutable, which means it cannot be changed after it is created.
1. 조건절 푸시다운이란, 조건을 데이터 소스에 위임하는 것을 의미한다.
2. Predicate Pushdown means to yield the filter condition to the data source.
3. 'Predicate pushdown' means delegating the filtering of data to the data source.
'Predicate pushdown' is an optimization where filter conditions are sent down to the data source to reduce the amount of data read.
spark 는 클러스터 매니저의 도움을 받아 고가용성을 갖출 수 있다.
spark streaming 은 재실행되었을 때 check pointing 기능을 활용하여 기존 상태로 복귀가 가능하다.
Pipelining 이란, 여러 연산을 하나의 실행 단위로 묶어 연산 속도 최적화하는 것이다.
개인 컴터에서 --master local 로 실행한다면, localhost:4040 으로 webui 접근 가능하다.
파티셔닝을 사용한 디렉토리 구조는 직관적이라서, 사용자가 구조를 이해하고 데이터를 관리 용이하다.
버켓팅이란, 컬럼 값을 기준으로 데이터를 hashing하여 고정된 개수의 "버킷"(파일)으로 나누어 저장하는 방법이다.
df 을 스파크 SQL에서 처리하려면 tempview 에 등록해야 한다.
in-memory metastore 는 그냥 테스트용으로 사용하고, 실제 운영할 때는 꼭 외부 저장소를 metastore 로 사용해야 한다.
Spark SQL은 특정 메타데이터 저장소의 세부 구현 방식에 구애받지 않고, 일관된 방식으로 메타데이터에 접근할 수 있다.
타입 안정성을 갖는 데이터 타입을 사용해야 하는 경우 Df 대신 Ds 를 사용한다.
또한, 정확도와 방어적 코드가 중요힌 경우 컴파일 타임에서 오류 확인이 가능한 DataSet 을 사용하는게 좋다.
RDD 란, 불변성을 가지며, 병렬로 처리할 수 있는 파티셔닝된 레코드 모음
RDD 는 단지 df 의 연산 과정을 기록한 메타데이터(DAG, 계보)일 뿐이다.
실제 연산은 executor 내에서 파티션을 처리하면서 진행된다.
그냥 데이터(파티션)가 어떻게 처리되어가는지 보여주는 논리적 흐름의 기록일 뿐이다.
RDD는 장애 발생 시 재연산할 수 있는 '회복력 있는 분산 컬렉션'을 추상화하는 역할을 한다.
파이썬에서 RDD 를 사용하면 RDD 모든 레코드에 파이썬 UDF 를 적용하는 효과를 불러온다.
'English' 카테고리의 다른 글
| [Eng] 소설책에서 가져온 좋은 표현들 (0) | 2025.08.05 |
|---|---|
| [IT] 견고한 데이터 엔지니어링 정리 및 영어 공부 6 (0) | 2025.07.01 |
| [IT] 견고한 데이터 엔지니어링 정리 및 영어 공부 5 (0) | 2025.06.27 |
| [IT] 견고한 데이터 엔지니어링 정리 및 영어 공부 2 (1) | 2025.06.24 |
| [IT] 견고한 데이터 엔지니어링 정리 및 영어 공부 1 (1) | 2025.06.23 |