Spark Documentation 문서 번역을 한 번 해보려고 한다.

눈가락번역기의 번역 상태가 많이 좋지 않으니 양해 바람.

 

 

 

번역 대상 문서 : https://spark.apache.org/docs/latest/monitoring.html

 

Monitoring and Instrumentation
모니터링과 측정

There are several ways to monitor Spark applications: web UIs, metrics, and external instrumentation.
Spark applications 를 모니터링하는 몇 가지 방법을 소개한다. WebUI, Metrics, 그리고 외부 계측.

Web Interfaces
웹 인터페이스

Every SparkContext launches a Web UI, by default on port 4040, that displays useful information about the application. This includes:
모든 SparkContext 는 WebUI 를 함께 실행한다. 기본 포트 4040이며, 다음과 같이 application 에 대한 유용한 정보를 보여준다.

  • A list of scheduler stages and tasks
    stages 와 tasks 스케줄러 리스트
  • A summary of RDD sizes and memory usage
    RDD 사이즈와 memory 사용률 정보
  • Environmental information.
    환경 정보
  • Information about the running executors
    실행중인 executors 정보

You can access this interface by simply opening http://<driver-node>:4040 in a web browser.

웹 브라우저에서 <driver-node>:4040 으로 접근하는 것으로 간단하게 해당 인터페이스에 접근 가능하다. 
If multiple SparkContexts are running on the same host, they will bind to successive ports beginning with 4040 (4041, 4042, etc).
만약 같은 호스트에 여러 SparkContext 가 동작중이라면, 4040부터 시작하는 포트 중 사용 가능한 포트에 바인딩 된다(예를 들면 4041, 4042... 등)

Note that this information is only available for the duration of the application by default.
이 정보는 오로지 application이 살아있는 동안만 활용 가능하다.
To view the web UI after the fact, set spark.eventLog.enabled to true before starting the application.

나중에라도 WebUI 를 보고 싶다면, spark application 실행 전 spark.eventLog.enabled 를 true 로 설정해야 한다.
This configures Spark to log Spark events that encode the information displayed in the UI to persisted storage.
이 설정은 WebUI 에 보여지는 Spark event 정보들을 인코드하여 영구 저장 매체에 로깅할 수 있도록 한다.

Viewing After the Fact
정보 다시 확인하는 방법

It is still possible to construct the UI of an application through Spark’s history server, provided that the application’s event logs exist.
application의 이벤트 로그가 존재한다면 Spark history server 를 통해 application 의 UI 를 다시 구성하는 것이 가능하다.

You can start the history server by executing:
다음 명령어로 history server 실행이 가능하다.

./sbin/start-history-server.sh

This creates a web interface at http://<server-url>:18080 by default, listing incomplete and completed applications and attempts.
이것은 기본 <server-url>:18080 으로 Web Interface 를 생성한다. 이것은 불완전하거나 완전한 application 과 attempts 목록을 나타낸다.

When using the file-system provider class (see spark.history.provider below), the base logging directory must be supplied in the spark.history.fs.logDirectory configuration option, and should contain sub-directories that each represents an application’s event logs.
file-system provider class (아래 spark.history.provider 참고) 를 사용할 때, 기본 로깅 디렉터리는 spark.history.fs.logDirectory configuration 옵션으로 설정되어야 하며, applications 의 이벤트 로그를 나타내는 서브 디렉터리를 포함해야 한다.

The spark jobs themselves must be configured to log events, and to log them to the same shared, writable directory.

Spark jobs 는 자체적으로 이벤트를 로깅하도록 설정되어야 하며, 쓰기 및 공유가 가능한 디렉터리에 로깅해야 한다.

For example, if the server was configured with a log directory of hdfs://namenode/shared/spark-logs, then the client-side options would be:
예를 들어, 만약 서버가 hdfs://namenode/shared/spark-logs 디렉터리에 로그를 남기도록 설정되어있다면, 
Client-side 의 옵션 역시 다음과 같이 되어야 한다.

spark.eventLog.enabled true
spark.eventLog.dir hdfs://namenode/shared/spark-logs

The history server can be configured as follows:
history server 는 다음과 같이 설정 가능하다.

Environment Variables
환경 변수들

Environment Variable
환경 변수
Meaning
의미
SPARK_DAEMON_MEMORY Memory to allocate to the history server (default: 1g).
history server 에 할당할 메모리 크기(기본 1g)
SPARK_DAEMON_JAVA_OPTS JVM options for the history server (default: none).
history server 를 위한 JVM 옵션 (기본 none)
SPARK_DAEMON_CLASSPATH Classpath for the history server (default: none).
history server 를 위한 classpath (기본 none)
SPARK_PUBLIC_DNS The public address for the history server.
history server 를 위한 public 주소.
If this is not set, links to application history may use the internal address of the server, resulting in broken links (default: none).
만약 세팅되지 않는다면, application history 링크는 서버의 internal 주소를 사용 할 수 있으며, 그 링크는 깨질 수 있다(기본 none)
SPARK_HISTORY_OPTS spark.history.* configuration options for the history server (default: none).
history server 를 위한 spark.history.* 설정 옵션들 (기본 none)

Applying compaction on rolling event log files
롤링 이벤트 로그 파일들에 압축 적용하기

A long-running application (e.g. streaming) can bring a huge single event log file which may cost a lot to maintain and also requires a bunch of resource to replay per each update in Spark History Server.
streaming 처럼 오랫동안 실행되는 application 은 하나의 큰 이벤트 로그 파일을 만들 수 있는데, 이것은 유지하는 데 비용이 들 수 있고 Spark History Server 에서 각 업데이트를 재현하는 데 꽤나 큰 리소스가 들 수 있다.

Enabling spark.eventLog.rolling.enabled and spark.eventLog.rolling.maxFileSize would let you have rolling event log files instead of single huge event log file which may help some scenarios on its own, but it still doesn’t help you reducing the overall size of logs.

spark.eventLog.rolling.enabled 및 spark.eventLog.rolling.maxFileSize 옵션을 활성화해두면, 하나의 큰 이벤트 파일 생성하는 대신 롤링 이벤트 로그 파일들을 얻을 수 있고, 이는 어떤 시나리오에서는 도움이 될 수 있다(..??). 하지만, 아직 전체 로그 파일 크기를 줄이는 데 도움을 주진 않는다.

Spark History Server can apply compaction on the rolling event log files to reduce the overall size of logs, via setting the configuration spark.history.fs.eventLog.rolling.maxFilesToRetain on the Spark History Server.

Spark History Server 에서 spark.history.fs.eventLog.rolling.maxFilesToRetain 설정하여 전체 로그 사이즈를 줄이기 위해, 롤링 이벤트 로그 파일들의 압축을 적용할 수 있다. 

Details will be described below, but please note in prior that compaction is LOSSY operation.

자세한 것은 아래 더 서술하겠지만, 압축은 데이터 손실이 발생하는 작업이다.

Compaction will discard some events which will be no longer seen on UI - you may want to check which events will be discarded before enabling the option.

압축은 UI 에 더 이상 보이지 않을 이벤트들을 버릴 것이다.

해당 옵션을 활성화하기 전에, 압축에 인해 사라질 이벤트들을 보고싶을 지 모른다.

When the compaction happens, the History Server lists all the available event log files for the application, and considers the event log files having less index than the file with smallest index which will be retained as target of compaction.

압축이 이미 실행되었다면, History Server 는 application 의 모든 사용가능한 이벤트 로그 파일들을을 리스팅한다.

가장 작은 인덱스를 가진 파일을 보존 대상으로 선택하며, 해당 파일보다 인덱스가 작은 이벤트 로그 파일을 대상으로 압축을 수행한다. (아니 가장 작은 인덱스보다 인덱스가 작다는 게 말이야 방구야....)

For example, if the application A has 5 event log files and spark.history.fs.eventLog.rolling.maxFilesToRetain is set to 2, then first 3 log files will be selected to be compacted.

예를 들어, application A 가 5개의 이벤트 로그 파일들을 갖고 있고, spark.history.fs.eventLog.rolling.maxFilesToRetain 값이 2로 설정되어있다면, 첫 세 개의 로그 파일들만 압축된다.

Once it selects the target, it analyzes them to figure out which events can be excluded, and rewrites them into one compact file with discarding events which are decided to exclude.
일단 타켓이 선택되고나면, 어떤 이벤트들을 걸러낼지 분석하고, 걸러낼 것들을 걸러낸 후 남은 이벤트들을 하나의 압축 파일로 다시 쓴다.

 

The compaction tries to exclude the events which point to the outdated data.

압축은 오래된 데이터를 가리키는 이벤트를 걸러내려한다.

As of now, below describes the candidates of events to be excluded:
현재 아래 기술된 것들이 걸러낼 이벤트의 후보들이다.

  • Events for the job which is finished, and related stage/tasks events
    이미 마무리된 job 이벤트 그리고 마무리된 stage/tasks 와 관련된 이벤트
  • Events for the executor which is terminated
    terminated 된 executor 에 대한 이벤트
  • Events for the SQL execution which is finished, and related job/stage/tasks events
    이미 마무리된 SQL exeuction 이벤트 그리고 마무리된 job/stage/tasks 와 관련된 이벤트

Once rewriting is done, original log files will be deleted, via best-effort manner.

일단 압축이 되고 나면, 원본 로그를 사라져버린다.

The History Server may not be able to delete the original log files, but it will not affect the operation of the History Server.

History Server 는 원본 로그 파일들을 삭제할 수 없지만, History Server 동작에 영향을 주지 않는다.

Please note that Spark History Server may not compact the old event log files if figures out not a lot of space would be reduced during compaction.

Spark History Server 는 압축하며 저장공간 확보에 도움이 되지 않는게 확인되면, 오래된 이벤트 로그 파일들을 압축하지 않는다.

For streaming query we normally expect compaction will run as each micro-batch will trigger one or more jobs which will be finished shortly, but compaction won’t run in many cases for batch query.

streaming query 가 실행될 때, micro-batch 로 압축이 실행될거라 기대하지만, 압축은 배치 쿼리를 위한 많은 상황에서 동작하지 않는다..

이런 문장 해석하고 있으려니 현타가 오네..

Please also note that this is a new feature introduced in Spark 3.0, and may not be completely stable.

이것은 Spark 3.0 에서 소개된 새로운 특징이며, 언제든 바뀔 수 있다.

Under some circumstances, the compaction may exclude more events than you expect, leading some UI issues on History Server for the application.

몇몇 환경 하에서, 압축은 생각한 것 보다 더 많은 이벤트들을 걸러낼 수 있으며, 이는 UI 이슈를 일으켜 History Server 의 application 정보를 보지 못하게 만들 수 있다.

Use it with caution.

조심해서 쓰세욥

 

 

 

 

 

 

Spark Documentation 문서 번역을 한 번 해보려고 한다.

눈가락번역기의 번역 상태가 많이 좋지 않으니 양해 바람.

 

 

 

번역 대상 문서 : https://spark.apache.org/docs/latest/spark-connect-overview.html

 

Spark Connect Overview
Spark Connect 개요

Building client-side Spark applications
client-side Spark 어플리케이션 구축하기

In Apache Spark 3.4, Spark Connect introduced a decoupled client-server architecture that allows remote connectivity to Spark clusters using the DataFrame API and unresolved logical plans as the protocol.
Apache Spark 3.4 에서, Spark Connect 는 DataFrame API 및 해결되지 않은 논리적 계획(???) 을 프로토콜로 이용하여 Spark clusters 에 원격으로 연결 가능하도록 비결합된 client-server 구조를 제안한다. 

The separation between client and server allows Spark and its open ecosystem to be leveraged from everywhere.

Client 와 Server 의 분리는 Spark 와 Spark 의 Ecosystem 들이 어디서든 활용될 수 있도록 한다.

It can be embedded in modern data applications, in IDEs, Notebooks and programming languages.

Spark Connect 는 data applications, IDEs, 주피터 노트북, 그리고 Programming Lang 에 내장될 수 있다.

To get started, see Quickstart: Spark Connect.

시작하려면 Quickstart: Spark Connect 문서를 확인하라.

 

How Spark Connect works
Spark Connect 가 동작하는 방식

The Spark Connect client library is designed to simplify Spark application development.
Spark Connect client lib 는 Spark Application 개발을 간단하게 만들도록 디자인되었다.

It is a thin API that can be embedded everywhere: in application servers, IDEs, notebooks, and programming languages.
Application Servers, IDEs, 주피터 노트북, Programming Lang 등 어디에든 내장될 수 있는 가벼운 API 이다.

The Spark Connect API builds on Spark’s DataFrame API using unresolved logical plans as a language-agnostic protocol between the client and the Spark driver.
Spark Connect API 는 client 와 Spark driver 간 언어의 장벽이 없는 프로토콜로, 미해결된 논리적 계획들(??) 을 사용한 Spark 의 Data Frame API 을 기반으로 구축된다. 뭔 소리야.... 

The Spark Connect client translates DataFrame operations into unresolved logical query plans which are encoded using protocol buffers.

Spark Connect client 는 DataFrame 의 동작을 미해결된 논리적 query 계획들로 변형하며, 그 계획들은 protocol buffers 를 이용하여 인코딩된다.

These are sent to the server using the gRPC framework.

그리고 인코딩 된 정보들은 gRPC framework 를 이용하여 server 로 보내진다.

The Spark Connect endpoint embedded on the Spark Server receives and translates unresolved logical plans into Spark’s logical plan operators.

Spark Server 에 내장된 Spark Connect endpoint 는 그것을 받고, 받은 미해결된 논리 계획들을 동작가능한 Spark 의 논리적 계획으로 변형한다.

This is similar to parsing a SQL query, where attributes and relations are parsed and an initial parse plan is built.

이것은 SQL 쿼리를 파싱하는 것과 비슷하다. 마치 attributes 와 relations 가 파싱되고 초기 파싱 계획이 구축되는 것처럼...(??)

From there, the standard Spark execution process kicks in, ensuring that Spark Connect leverages all of Spark’s optimizations and enhancements.

일반적인 Spark 실행 프로세스가 시작되며, Spark Connect 가 모든 Spark 의 최적화 전략과 향상된 기능들을 활용할 수 있도록 보장한다.

Results are streamed back to the client through gRPC as Apache Arrow-encoded row batches.

그 결과는 gRPC-Arrow 의 row 배치를 통해 client 에 다시 스트림으로 되돌아간다.

 

Operational benefits of Spark Connect
Spark Connect 의 실행시 얻는 장점

With this new architecture, Spark Connect mitigates several multi-tenant operational issues:

새로운 architecture인 Spark Connect 는 몇몇 multi-tenant 실행 이슈들을 완화해준다.

Stability: Applications that use too much memory will now only impact their own environment as they can run in their own processes.

안정성 : applications 이 메모리를 많이 사용하는 것은 그 applications 프로세스들을 실행하는 그 환경에만 영향을 준다.

Users can define their own dependencies on the client and don’t need to worry about potential conflicts with the Spark driver.
사용자들은 client 단에서 그들 자신의 의존성들을 정의할 수 있으며, Spark driver 로 인한 잠재적인 결함에 대해 걱정하지 않아도 된다.

Upgradability: The Spark driver can now seamlessly be upgraded independently of applications, for example to benefit from performance improvements and security fixes.

업그레이드 능력 : Spark driver 는 applications 에 상관없이 독립적으로, 그리고 downtime 없이 업그레이드가 가능하다. 예를 들어 퍼포먼스 향상과 시큐리티 보완의 장점을 가져갈 수 있다.

This means applications can be forward-compatible, as long as the server-side RPC definitions are designed to be backwards compatible.

이것은, 서버 측 RPC 정의가 역방향 호환성을 갖도록 설계되어 있다면, applications 가 순방향 호환이 될 수 있다는 것을 의미한다.

Debuggability and observability: Spark Connect enables interactive debugging during development directly from your favorite IDE.

디버깅 능력과 모니터링 능력 : Spark Connect 는 사용자가 어느 IDE 에서 개발을 진행하든, 상호보완적 디버깅 기능을 제공한다.

Similarly, applications can be monitored using the application’s framework native metrics and logging libraries.

이와 비슷하게, applications 는 applications 의 framework 기본 메트릭과 로깅 lib 를 이용하여 모니터링 가능하다.

How to use Spark Connect
Spark Connect 사용법

Starting with Spark 3.4, Spark Connect is available and supports PySpark and Scala applications.
Spark 3.4 부터, Spark Connect 는 PySpark 와 Scala applications 에서 사용 가능하다.

We will walk through how to run an Apache Spark server with Spark Connect and connect to it from a client application using the Spark Connect client library.

Spark Connect 를 이용하여 Apache Spark 서버를 실행하는 방법과, Spark Connect Client Lib 를 이용하여 Client Application 으로부터 Spark 서버에 연결하는 방법을 연습해보겠다.

Download and start Spark server with Spark Connect
Spark Connect 를 이용하여 Spark server 실행하기

First, download Spark from the Download Apache Spark page.

먼저 Download Apache Spark 페이지에서 Spark를 다운받는다. 

Spark Connect was introduced in Apache Spark version 3.4 so make sure you choose 3.4.0 or newer in the release drop down at the top of the page.

Spark Connect 는 Apache Spark 3.4 이후부터 제공되기 때문에, 페이지 꼭대기에 drop down 메뉴에서 3.4.0 이상 버전을 선택해야 한다.

Then choose your package type, typically “Pre-built for Apache Hadoop 3.3 and later”, and click the link to download.

그리고 package type 을 선택한다. 일반적으로 “Pre-built for Apache Hadoop 3.3 and later” 을 선택하며,, 이것을 클릭하고 다운로드한다.

Now extract the Spark package you just downloaded on your computer, for example:

그리고 컴퓨터에 다운받은 Spark package 를 아래 명령어로 압축 해제한다.

tar -xvf spark-3.4.0-bin-hadoop3.tgz

In a terminal window, go to the spark folder in the location where you extracted Spark before and run the start-connect-server.sh script to start Spark server with Spark Connect, like in this example:

터미널 창에서 방금 압축 해제한 위치로 이동한 후, Spark Connect 와 함께 Spark Server 를 실행하기 위해 start-connect-server.sh 스크립트를 실행해라.

./sbin/start-connect-server.sh --packages org.apache.spark:spark-connect_2.12:3.4.0

Note that we include a Spark Connect package (spark-connect_2.12:3.4.0), when starting Spark server.

Spark Server 가 시작할 때, Spark Connect 패키지가 포함되도록 하자.

This is required to use Spark Connect.

그것은 Spark Connect 를 사용하기 위한 조건이다.

Make sure to use the same version of the package as the Spark version you downloaded previously.

다운받은 Spark 와 같은 버전의 Spark Connect package 를 사용해야 한다.

In this example, Spark 3.4.0 with Scala 2.12.

위의 예에서는 Spark 3.4.0 + Scala 2.12 와 같은 버전의 package 를 사용하면 된다.

Now Spark server is running and ready to accept Spark Connect sessions from client applications.

이제 Spark server 가 실행되고, Client Applications 로부터 Spark Connect Session 을 맺을 준비가 되었다.

In the next section we will walk through how to use Spark Connect when writing client applications.

다음 단계에서, Client Applications 을 작성할 때 Spark Connect 를 어떻게 사용하는지 연습해보자.

Use Spark Connect in client applications
Client Applications 에서 Spark Connect 사용하기

When creating a Spark session, you can specify that you want to use Spark Connect and there are a few ways to do that outlined as follows.

Spark 세션을 생성할 때, Spark Connect 를 사용하도록 구성할 수 있으며, 이를 위한 몇 가지 방법이 있다.

If you do not use one of the mechanisms outlined here, your Spark session will work just like before, without leveraging Spark Connect, and your application code will run on the Spark driver node.

만약 다음의 방법을 사용하지 않는다면, Spark Session 은 Spark Connect 활용 없이 이전과 동일하게 동작 할 것이며, Application 코드는 Spark Driver 노드에서 동작 할 것이다.

Set SPARK_REMOTE environment variable
SPARK_REMOTE 환경 변수 설정

If you set the SPARK_REMOTE environment variable on the client machine where your Spark client application is running and create a new Spark Session as in the following example, the session will be a Spark Connect session.

만약 Spark Client Application 이 동작중인 client 컴퓨터의 SPARK_REMOTE 환경 변수가 설정되고 다음과 같은 예제로 새로운 Spark Session 이 생성되면, Session 은 Spark Connect Session 이 된다.

With this approach, there is no code change needed to start using Spark Connect.

이러한 방법으로, Spark connect 를 사용하기 위해 코드를 변경하는 일은 불필요하게 된다.

In a terminal window, set the SPARK_REMOTE environment variable to point to the local Spark server you started previously on your computer:

터미널 창에서, SPARK_REMOTE 환경 변수를 local spark server 를 바라보도록 설정하라.

여기서 local spark server 란, 위에서 미리 실행해두었던 Spark server 를 의미한다.

export SPARK_REMOTE="sc://localhost"

And start the Spark shell as usual:

그리고 Spark Shell 을 실행하라.

./bin/pyspark

The PySpark shell is now connected to Spark using Spark Connect as indicated in the welcome message:
PySpark shell 은 환영 메세지에서 볼 수 있듯이, Spark Connect 를 이용하여 Spark 에 연결되었다.

Client connected to the Spark Connect server at localhost

And if you write your own program, create a Spark session as shown in this example:
프로그램 코드를 작성할 때 아래 예제처럼 Spark Session 을 생성하라.

from pyspark.sql import SparkSession
spark = SparkSession.builder.getOrCreate()

This will create a Spark Connect session from your application by reading the SPARK_REMOTE environment variable we set previously.

이것은 미리 설정해 둔 SPARK_REMOTE 환경 변수를 읽고 Spark Connect Session 을 생성 할 것이다.

Specify Spark Connect when creating Spark session
Spark Session 을 생성할 때 Spark Connect 특정짓기

You can also specify that you want to use Spark Connect explicitly when you create a Spark session.
Spark Session 을 생성할 때, 명시적으로 Spark Connect 를 사용하도록 특정지을 수 있다.

For example, you can launch the PySpark shell with Spark Connect as illustrated here.
예를 들어, 다음 설명과 같이 Spark Connect 와 함께 PySpark shell 을 실행할 수 있다.

To launch the PySpark shell with Spark Connect, simply include the remote parameter and specify the location of your Spark server.
Spark Connect 를 사용하는 PySpark Shell 을 실행하기 위해, remote 파라미터와 특정 Spark server 위치를 넣어라.

We are using localhost in this example to connect to the local Spark server we started previously:
앞서 실행해 둔 local Spark Server 에 연결하는 현 예제를 계속 이어간다면, localhost 를 파라미터 값으로 넣으면 된다.

./bin/pyspark --remote "sc://localhost"

And you will notice that the PySpark shell welcome message tells you that you have connected to Spark using Spark Connect:
그러면 PySpark Shell 의 환영 메세지를 볼 수 있고, 이는 Spark Connect 를 이용하여 Spark 에 연결되었다는 것을 의미한다.

Client connected to the Spark Connect server at localhost

You can also check the Spark session type.
또한 Spark Session type 을 확인해 볼 수 있다.

If it includes .connect. you are using Spark Connect as shown in this example:
만약 아래와 같이 type 에 ".connect." 가 포함되어있다면, Spark Connect 를 사용중인 것이다.

SparkSession available as 'spark'.
>>> type(spark)
<class 'pyspark.sql.connect.session.SparkSession'>

Now you can run PySpark code in the shell to see Spark Connect in action:
이제 PySpark 코드를 shell 에서 실행해보자. Spark Connect 가 사용되는 것을 볼 수 있다.

>>> columns = ["id","name"]
>>> data = [(1,"Sarah"),(2,"Maria")]
>>> df = spark.createDataFrame(data).toDF(*columns)
>>> df.show()
+---+-----+
| id| name|
+---+-----+
|  1|Sarah|
|  2|Maria|
+---+-----+

Or, when writing your own code, include the remote function with a reference to your Spark server when you create a Spark session, as in this example:
혹은, 프로그램 코드를 작성할 때, Spark Session 을 생성할 때 Spark Server 정보와 함께 remote 함수를 추가해라.

from pyspark.sql import SparkSession
spark = SparkSession.builder.remote("sc://localhost").getOrCreate()

What is supported in Spark 3.4
Spark 3.4 에서 지원하는 것

PySpark: In Spark 3.4, Spark Connect supports most PySpark APIs, including DataFrame, Functions, and Column.
PySpark : Spark 3.4 에서, Spark Connect 는 DataFrame, Functions, Column 을 포함한 대부분의 PySpark API 들을 지원한다.

However, some APIs such as SparkContext and RDD are not supported.

그렇지만, SparkContext 나 RDD 같은 몇몇 API 는 지원하지 않는다.

You can check which APIs are currently supported in the API reference documentation.

API 참고 문서에서 현재 지원중인 API 인지 아닌지 확인할 수 있다.

Supported APIs are labeled “Supports Spark Connect” so you can check whether the APIs you are using are available before migrating existing code to Spark Connect.

지원되는 API 는 "Supports Spark Connect" 이라는 라벨이 붙어있어서, 현재 스파크 코드를 Spark Connect 를 사용하도록 옮기는 작업을 하기 전에 미리 어떤 API 들이 사용 가능한지 확인할 수 있다.

Scala: In Spark 3.4, Spark Connect supports most Scala APIs, including Dataset, functions, and Column.

Support for more APIs is planned for upcoming Spark releases.

Scala : Spark 3.4 에서, Spark Connect 는 DataSet, functions, Column 등 대부분의 Scala API 들을 지원한다.

더 많은 API 를 지원 할 계획이며, 다가오는 Spark releases 에서 발표될 예정.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

ChatGPT 가 조언해준 것을 참고삼아

Spark Documentation 문서 번역을 한 번 해보려고 한다.

눈가락번역기의 번역 상태가 많이 좋지 않으니 양해 바람.

 

 

 

 

번역 대상 문서 : https://spark.apache.org/docs/latest/index.html

Spark Overview
스파크 개요

Apache Spark is a unified analytics engine for large-scale data processing.
Apache Spark 는 대규모 데이터 처리를 위한 통합 분석 엔진이다.

It provides high-level APIs in Java, Scala, Python, and R, and an optimized engine that supports general execution graphs.
Java, Scala, Python, R 언어를 통해 높은 레벨의 API 들과, 일반적인 실행 그래프를 지원하는 최적화 엔진을 제공한다.

It also supports a rich set of higher-level tools including Spark SQL for SQL and structured data processing, pandas API on Spark for pandas workloads, MLlib for machine learning, GraphX for graph processing, and Structured Streaming for incremental computation and stream processing.
SQL 과 구조화된 데이터 처리를 위한 Spark SQL, pandas 작업을 위한 pandas API on Spark, 머신 러닝을 위한 MLlib, 그래프 처리를 위한 GraphX, 점진적인 계산과 스트림 처리를 위한 Structured Streaming 등 더 높은 레벨의 도구들을 제공한다.

Running the Examples and Shell
예제 실행 및 Shell

Spark comes with several sample programs.
Spark 는 몇몇 예시 프로그램들과 함께 제공된다.

Python, Scala, Java, and R examples are in the examples/src/main directory.
Python, Scala, Java, 그리고 R 예제들은 examples/src/main 디렉터리 안에 있다.

To run Spark interactively in a Python interpreter, use bin/pyspark:
Python 인터프리터에서 상호작용하며 Spark 를 실행시키려면, bin/pyspark 를 실행해라. 

./bin/pyspark --master "local[2]"

Sample applications are provided in Python. For example:
Python 언어로 된 예시 어플리케이션들은 다음과 같이 제공된다.

./bin/spark-submit examples/src/main/python/pi.py 10

To run one of the Scala or Java sample programs, use bin/run-example <class> [params] in the top-level Spark directory.
Scala, Java 예제 프로그램 중 하나를 실행하려면, Spark 가장 최상위 디렉터리에서 bin/run-exaple <class> [params] 을 실행해라.

(Behind the scenes, this invokes the more general spark-submit script for launching applications). For example,
(이는 내부적으로, 더 일반적으로 어플리케이션을 실행하는 방법인 spark-submit script 를 부른다) 예를 들어

./bin/run-example SparkPi 10

You can also run Spark interactively through a modified version of the Scala shell.
또한 Scala Shell 의 수정된 버전을 통해, 상호작용하며 Spark 를 실행할 수 있다.

This is a great way to learn the framework.
이것이 framework 를 배우는 아주 멋진 방법이다!

./bin/spark-shell --master "local[2]"

The --master option specifies the master URL for a distributed cluster, or local to run locally with one thread, or local[N] to run locally with N threads.

--master 옵션은 분산 클러스터를 위한 master URL 을 특정짓는 옵션이며, 로컬에서 동작할 때는 하나의 쓰레드 혹은 N 개의 쓰레드로 동작시킬 수 있다.

You should start by using local for testing.

테스트를 위해 로컬에서 시작할 수 있다.

For a full list of options, run the Spark shell with the --help option.
전체 실행 옵션을 보려면, Spark shell 실행시 --help 옵션을 주고 실행해라.

Since version 1.4, Spark has provided an R API (only the DataFrame APIs are included).

1.4 버전 이후로, Spark 는 R API 도 제공한다. (오직 DataFrame APIs 에서만)

To run Spark interactively in an R interpreter, use bin/sparkR:

R 인터프리터에서 상호작용하며 Spark 를 실행하려면, bin/sparkR 을 실행해라. 

./bin/sparkR --master "local[2]"

Example applications are also provided in R. For example:

R 에서 예제 어플리케이션이 다음과 같이 제공된다.

./bin/spark-submit examples/src/main/r/dataframe.R

Running Spark Client Applications Anywhere with Spark Connect
Spark Connect 로 어디서든 Spark Client Application 실행하기

Spark Connect is a new client-server architecture introduced in Spark 3.4 that decouples Spark client applications and allows remote connectivity to Spark clusters.

Spark Connect 는 Spark 3.4 에서부터 추가된 새로운 Client-Server 아키텍처다. 이것은 Spark Client Applications 들의 커플링을 막고, Spark Clusters 에 원격으로 접근하는 것을 허용한다.

The separation between client and server allows Spark and its open ecosystem to be leveraged from anywhere, embedded in any application.

Client 와 Server 의 분리는 Spark 와 Spark 의 Ecosystem들이 어느 어플리케이션에 내장될 수 있고 어디서든 활용될 수 있도록 해준다.

In Spark 3.4, Spark Connect provides DataFrame API coverage for PySpark and DataFrame/Dataset API support in Scala.

Spark 3.4 에서, Spark Connect 는 Pyspark 의 DataFrame API 를 제공하고, Scala 의 DataFrame/DataSet API 을 제공한다.

To learn more about Spark Connect and how to use it, see Spark Connect Overview.

Spark Connect 에 대해 더 배우고 어떻게 사용하는지 알고싶다면 Spark Connect Overview 를 확인해라.

 

 

 

 

 

 

 

 

 

IT 필드에서 사용하는 영어 표현 및 단어들만 집중적으로 공부하고 싶다.

그래서 AI 에게 물어보았고, 다음과 같은 답변을 받았다.

 

먼저 Google Bard 의 답은 이렇다.

" IT 분야에 종사하는 사람들과 직접 대화를 나누는 것입니다. IT 뉴스를 읽거나 IT 관련 책을 읽는 것도 도움이 됩니다. 

또한, IT 관련 동영상을 시청하거나 IT 관련 팟캐스트를 듣는 것도 좋은 방법입니다."

 

그 다음 ChatGPT 의 답은 이렇다.

"용어 사전 및 용어집 참조: IT 분야의 용어와 표현을 모아놓은 사전이나 용어집을 활용해 보세요. 예를 들어, Techopedia, TechTerms 등의 웹사이트에서 IT 용어를 검색하고 익힐 수 있습니다.
영어 IT 블로그 및 웹사이트 구독: IT 관련 블로그나 웹사이트를 구독하여 최신 정보와 용어를 접할 수 있습니다. TechCrunch, Wired, CNET 등이 대표적인 예시입니다.
기술 서적과 논문 읽기: 기술 서적이나 논문은 IT 분야에서 사용되는 용어와 표현을 익히는 데 도움이 될 수 있습니다. 기술 서적을 읽으면서 새로운 용어와 표현을 찾아보세요.
영어 IT 강좌 수강: 온라인 강좌 플랫폼에서 IT 관련 강좌를 수강하여 전문 용어와 표현을 익힐 수 있습니다. Udemy, Coursera, edX 등에서 다양한 IT 강좌를 찾아보세요.
프로젝트 및 실습: IT 분야에서 사용되는 용어를 실제 프로젝트나 실습을 통해 익히는 것도 좋은 방법입니다. 프로그래밍을 해보거나 시스템을 구축해보면서 용어를 자연스럽게 습득할 수 있습니다.
기술 커뮤니티 참여: IT 관련 온라인 포럼이나 커뮤니티에 참여하여 다른 사람들과 의사소통하며 용어를 익히는 것도 도움이 됩니다.
영어 IT 뉴스 및 미디어 소식 접하기: IT 분야의 영어 뉴스를 읽거나 듣는 것도 좋은 방법입니다. IT 관련 뉴스를 통해 새로운 용어와 표현을 배울 수 있습니다.
플래시카드 사용: IT 용어와 표현을 플래시카드에 작성하여 시각적으로 공부하면 기억에 더 잘 남을 수 있습니다.
전문 용어 앱 및 웹사이트 활용: IT 분야의 전문 용어를 학습할 수 있는 앱이나 웹사이트도 많이 있습니다. 예를 들어, Anki, Quizlet, Duolingo 등을 활용해 보세요.
토론 및 발표 연습: IT 관련 주제로 토론이나 발표를 준비하면서 영어로 표현하는 데 연습할 수 있습니다."

 

어떤 특정 강의나 책 등을 추천해줄거라 생각했는데..

그러면 광고가 되어버리니까 그런식으로 대답을 해주지는 않는 것인지도 모르겠다.

 

결론은, IT 영어만 콕 집어서 배우는 확실한 방법은 없는 것 같고

해당 환경에 주기적으로 노출되면서 배우는 게 좋을 듯.

 

 

추가로, Google Bard 의 광기를 살짝 엿볼 수 있었다.

'English' 카테고리의 다른 글

Study English 23.08.07 : Spark Connect Overview 번역  (0) 2023.08.19
Study English 23.08.06 : Spark Overview 번역  (0) 2023.08.18
Study English 23.08.04  (0) 2023.08.18
Study English 23.08.03  (0) 2023.08.05
Study English 23.08.02  (0) 2023.08.03

 

 

첫번째 줄 : 한글

두번째 줄 : translation myself

세번째 줄 : chatGPT

 

 

 

회사 일이 바쁘고 스트레스가 심해서 한동안 영어 공부를 못했다.

I wasn't able to study English because work was hard and very stressful.

- I haven't been able to study English for a while due to the busy work and high stress at the company.

 

열심히 해야지.. ㅎㅎㅎㅎ

I should do my best... lol

- I need to work hard.. hehehe

 

오늘은 도구 묘사를 한 번 해볼까 함.

So today I'm going to describe a tool.

- Today, maybe I'll try describing an object.

 

내가 사용하고 있는 컵이 있는데, 이 컵은 예전에 AI컨퍼런스 갔을 때 사은품으로 받은 것이다.

I have a cup and I got this as a freebie from AI conference I joined before.

- I have a cup that I use; I received it as a souvenir when I attended an AI conference a while back.

 

a while back : 수주[수개월] 전에(는), 앞서(는). 여기서는 before 대신 a while back 을 사용한 듯.

 

아직도 잘 사용하고 있다.

Still using it very well.

- I still use it well.

 

컵의 바깥 부분에 회사 로고가 새겨져있고, 손잡이가 달려있다.

The outside of the cup has the company's logo and handle.

- The company logo is engraved on the outer part of the cup, and it has a handle.

 

컵의 입구 부분에 설거지를 하다가 실수로 깨뜨린 부분이 있다.

The entrance of the cup has a scar that I broken by mistake while I washed dishes.

- There's a part near the cup's opening that got accidentally chipped while I was washing dishes.

 

chip : 이가 빠지다

chipped : (그릇이나 연장의) 이가 빠진

 

컵의 전체 색깔은 검은색이다.

The cup is all balck.

- The entire cup is black in color.

 

내부에 500ml 정도의 물을 많이 담을 수 있는 넉넉한 크기이다.

It has nice capacity to contain about 500ml water.

- It's a generously sized cup that can hold around 500ml of water inside.

 

컵은 원통형 모양이며, 재질은 도자기이다.

The cup looks cylinder and material is ceramics.

- The cup is cylindrical in shape, and it's made of ceramic.

 

같은 디자인의 컵이 세 개 있어서, 가끔 설거지가 귀찮을때는 새 컵을 사용할 수 있다.

I have the same cups two more, so sometime when I don't feel to wash dishes, I use a new cup lol.

- I have three cups with the same design, so sometimes when I don't feel like doing dishes, I can use a new cup.

 

다이소에서 비슷한 크기의 컵을 팔던데, 마음에 드는 디자인이 나오면 하나 사려고 한다.

I saw Daiso has cups with the same capacity, If I find a cup with nice design, I would buy it.

- I saw similar-sized cups being sold at Daiso, and if I find a design I like, I plan to buy one.

 

 

 

 

google bard 가 계속 영어 번역하는 것을 사리고 있다.....

 

 

 

'English' 카테고리의 다른 글

Study English 23.08.06 : Spark Overview 번역  (0) 2023.08.18
Study English 23.08.05  (0) 2023.08.18
Study English 23.08.03  (0) 2023.08.05
Study English 23.08.02  (0) 2023.08.03
Study English 23.08.01  (0) 2023.08.02

+ Recent posts