KR101680945B1 - Mapping method and reducing method for join operationand apparatus thereof - Google Patents

Mapping method and reducing method for join operationand apparatus thereof Download PDF

Info

Publication number
KR101680945B1
KR101680945B1 KR1020140183196A KR20140183196A KR101680945B1 KR 101680945 B1 KR101680945 B1 KR 101680945B1 KR 1020140183196 A KR1020140183196 A KR 1020140183196A KR 20140183196 A KR20140183196 A KR 20140183196A KR 101680945 B1 KR101680945 B1 KR 101680945B1
Authority
KR
South Korea
Prior art keywords
value
index
join
mapping data
field
Prior art date
Application number
KR1020140183196A
Other languages
Korean (ko)
Other versions
KR20160074193A (en
Inventor
서상원
Original Assignee
주식회사 카카오
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 주식회사 카카오 filed Critical 주식회사 카카오
Priority to KR1020140183196A priority Critical patent/KR101680945B1/en
Publication of KR20160074193A publication Critical patent/KR20160074193A/en
Application granted granted Critical
Publication of KR101680945B1 publication Critical patent/KR101680945B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2453Query optimisation
    • G06F16/24534Query rewriting; Transformation
    • G06F16/24542Plan optimisation
    • G06F16/24544Join order optimisation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • G06F16/24553Query execution of query operations
    • G06F16/24554Unary operations; Data partitioning operations
    • G06F16/24556Aggregation; Duplicate elimination

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Operations Research (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

조인 연산을 위한 매핑 방법 및 리듀싱 방법, 및 그 방법들을 이용한 장치들이 개시된다. 실시예들은 복수의 스테이지들로 구성되는 매핑 동작 및 리듀싱 동작을 통하여 조인 연산의 분산 처리를 효율적으로 수행하는 기술을 제공한다.A mapping method and a reduction method for a join operation, and devices using the methods are disclosed. The embodiments provide techniques for efficiently performing distributed processing of join operations through a mapping operation and a redundancy operation including a plurality of stages.

Description

조인 연산을 위한 매핑 방법 및 리듀싱 방법,및 그 방법들을 이용한 장치들{MAPPING METHOD AND REDUCING METHOD FOR JOIN OPERATION,AND APPARATUS THEREOF}Field of the Invention < RTI ID = 0.0 > [0001] < / RTI > A mapping method and a reduction method for join operations,

아래 실시예들은 조인 연산을 위한 매핑 방법 및 리듀싱 방법, 및 그 방법들을 이용한 장치들에 관한 것이다.
The following embodiments relate to a mapping method and a method of reducing the number of join operations, and devices using the methods.

본 발명의 배경이 되는 기술은 다음의 논문에 개시되어 있다.
1) FOTO N. AFRATI, JEFFREY D. ULLMAN, "Optimizing joins in a map-reduce environment," in Proceedings of the 13th international Conference on Extending Database Technology (2010), pp. 99-110.
2) SPYROS BLANAS, JIGNESH M. PATEL, VUK ERCEGOVAC, JUN RAO, EUGENE J. SHEKITA, YUANYUAN TIAN, "A comparison of join algorithms for log processing in MaPreduce," in Proceedings of the 2010 ACM SIGMOD International Conference on Management of data, pp. 975-986.
정보의 디지털화 속도가 급격히 증가하면서 대용량 데이터를 효율적으로 처리하는 기술이 요구된다. 대용량 데이터를 처리하기 위하여 데이터베이스가 이용된다. 데이터베이스는 연관 관계가 있는 데이터들을 테이블의 형태로 저장하며, 사용자는 다양한 쿼리 명령(Query Command)을 통하여 여러 테이블들에 저장된 데이터들로부터 다양한 정보를 추출할 수 있다.
The background of the present invention is disclosed in the following article.
1) FOTO N. AFRATI, JEFFREY D. ULLMAN, "Optimizing joins in a map-reduce environment," in Proceedings of the 13 th international Conference on Extending Database Technology (2010), pp. 99-110.
2) SPYROS BLANAS, JIGNESH M. PATEL, VUK ERCEGOVAC, JUN RAO, EUGENE J. SHEKITA, YUANYUAN TIAN, "A comparison of join algorithms for log processing in MaPreduce," Proceedings of ACM SIGMOD International Conference on Management of data , pp. 975-986.
There is a need for a technique for efficiently processing large-volume data while rapidly increasing the digitization speed of information. A database is used to process large volumes of data. The database stores correlated data in the form of a table, and the user can extract various information from the data stored in various tables through various query commands.

조인 연산은 복수의 테이블들로부터 일종의 교집합을 구하는 논리 연산이다. 테이블들에 저장된 데이터의 수가 증가할수록, 조인 연산을 위해 소요되는 시간 또는 조인 연산을 위해 필요한 하드웨어 자원이 기하급수적으로 증가될 수 있다. 따라서, 조인 연산을 효율적으로 처리하는 기술이 요구된다.
A join operation is a logical operation for obtaining a kind of intersection from a plurality of tables. As the number of data stored in the tables increases, the time required for the join operation or the hardware resources required for the join operation may increase exponentially. Therefore, there is a need for a technique for efficiently processing join operations.

일 측에 따른 조인 연산을 위한 제1 스테이지의 매핑 방법은 복수의 필드들로 구성된 테이블 데이터를 수신하는 단계; 및 상기 테이블 데이터의 필드들 중 조인 연산을 위한 조인키 필드의 값, 상기 테이블 데이터가 속한 테이블을 지시하는 태그, 및 상기 테이블 데이터의 필드들 중 상기 조인 연산을 위한 레코드 필드의 값을 포함하는 매핑 데이터를 출력하는 단계를 포함한다. 상기 매핑 데이터는 상기 조인키 필드의 값에 기초하여 결정된 리듀서로 전송될 수 있다.A mapping method of a first stage for a join operation according to one side includes receiving table data composed of a plurality of fields; And a value of a join key field for join operation among the fields of the table data, a tag indicating a table to which the table data belongs, and a mapping including a value of a record field for the join operation among the fields of the table data And outputting the data. The mapping data may be sent to a determined reducer based on the value of the join key field.

일 측에 따른 조인 연산을 위한 제1 스테이지의 리듀싱 방법은 조인 연산을 위한 조인키 필드의 값, 상기 조인 연산을 위한 테이블들 중 어느 하나를 지시하는 태그, 및 상기 조인 연산을 위한 레코드 필드의 값을 포함하는 매핑 데이터를 수신하는 단계; 상기 태그가 미리 정해진 제1 테이블을 지시하는 경우, 상기 조인키 필드의 값, 상기 조인키 필드의 값에 대응하여 상기 제1 테이블에 대응하는 매핑 데이터의 누적 개수를 지시하는 제1 인덱스, 상기 태그, 및 상기 레코드 필드의 값을 출력하는 단계; 및 상기 태그가 상기 제1 테이블과 다른 테이블을 지시하는 경우, 상기 조인키 필드의 값, 초기 인덱스로부터 상기 조인키 필드의 값에 대응하는 최대 인덱스까지 순차적으로 증가하는 제2 인덱스, 상기 태그, 및 상기 레코드 필드의 값을 반복적으로 출력하는 단계를 포함한다.The method for reducing the size of a first stage for a join operation according to one side includes a value of a join key field for a join operation, a tag indicating one of the tables for the join operation, Comprising: receiving mapping data including a value; A first index indicating a cumulative number of mapping data corresponding to the first table corresponding to a value of the join key field and a value of the join key field when the tag indicates a predetermined first table, And outputting a value of the record field; And a second index that sequentially increases from a value of the join key field to a maximum index corresponding to a value of the join key field from an initial index when the tag indicates a table different from the first table, And repeatedly outputting the value of the record field.

일 측에 따른 조인 연산을 위한 제2 스테이지의 매핑 방법은 조인 연산을 위한 조인키 필드의 값, 인덱스, 상기 조인 연산을 위한 테이블들 중 어느 하나를 지시하는 태그, 및 상기 조인 연산을 위한 레코드 필드의 값을 포함하는 리듀싱 데이터를 수신하는 단계; 및 상기 조인키 필드의 값, 상기 인덱스, 상기 태그, 및 상기 레코드 필드의 값을 포함하는 매핑 데이터를 출력하는 단계를 포함한다. 상기 매핑 데이터는 상기 조인키 필드의 값 및 상기 인덱스의 조합에 기초하여 결정된 리듀서로 전송될 수 있다.A mapping method of a second stage for a join operation according to one side includes a value of a join key field for a join operation, an index, a tag indicating any one of the tables for the join operation, and a record field The method comprising the steps of: And outputting mapping data including values of the join key field, the index, the tag, and the value of the record field. The mapping data may be transmitted to a reducer determined based on a combination of the value of the join key field and the index.

일 측에 따른 조인 연산을 위한 제2 스테이지의 리듀싱 방법은 조인 연산을 위한 조인키 필드의 값, 인덱스, 상기 조인 연산을 위한 테이블들 중 어느 하나를 지시하는 태그, 및 상기 조인 연산을 위한 레코드 필드의 값을 포함하는 매핑 데이터를 수신하는 단계; 상기 태그가 미리 정해진 제1 테이블을 지시하는 경우, 상기 조인키 필드의 값 및 상기 인덱스의 조합에 대응하여 상기 레코드 필드의 값을 저장하는 단계; 및 상기 태그가 상기 제1 테이블과 다른 테이블을 지시하는 경우, 상기 조인키 필드의 값 및 상기 인덱스의 조합에 대응하여 미리 저장된 레코드 필드의 값, 및 상기 레코드 필드의 값을 출력하는 단계를 포함한다.The method for reducing the size of a second stage for a join operation according to one side includes a value of a join key field for a join operation, an index, a tag indicating any one of the tables for the join operation, Receiving mapping data including a value of a field; Storing a value of the record field corresponding to a combination of the value of the join key field and the index if the tag indicates a predetermined first table; And outputting, if the tag indicates a table different from the first table, a value of a record field previously stored corresponding to a value of the join key field and the index, and a value of the record field .

다른 일 측에 따른 조인 연산을 위한 제1 스테이지의 매핑 방법은 복수의 필드들로 구성된 테이블 데이터를 수신하는 단계; 및 상기 테이블 데이터의 필드들 중 조인 연산을 위한 조인키 필드의 값, 상기 테이블 데이터가 속한 테이블을 지시하는 태그, 및 상기 테이블 데이터의 필드들 중 상기 조인 연산을 위한 레코드 필드의 값을 포함하는 매핑 데이터를 출력하는 단계를 포함한다. 상기 매핑 데이터는 상기 조인키 필드의 값에 기초하여 결정된 리듀서로 전송될 수 있다.A mapping method of a first stage for a join operation according to another side includes receiving table data composed of a plurality of fields; And a value of a join key field for join operation among the fields of the table data, a tag indicating a table to which the table data belongs, and a mapping including a value of a record field for the join operation among the fields of the table data And outputting the data. The mapping data may be sent to a determined reducer based on the value of the join key field.

다른 일 측에 따른 조인 연산을 위한 제1 스테이지의 리듀싱 방법은 조인 연산을 위한 조인키 필드의 값, 상기 조인 연산을 위한 테이블들 중 어느 하나를 지시하는 태그, 및 상기 조인 연산을 위한 레코드 필드의 값을 포함하는 매핑 데이터를 수신하는 단계; 상기 태그가 미리 정해진 제1 테이블을 지시하는 경우, 상기 조인키 필드의 값, 상기 조인키 필드의 값에 대응하여 상기 제1 테이블에 대응하는 매핑 데이터의 누적 개수를 지시하는 제1 인덱스, 상기 태그, 및 상기 레코드 필드의 값을 출력하는 단계; 및 상기 태그가 상기 제1 테이블과 다른 테이블을 지시하는 경우, 상기 조인키 필드의 값, 상기 조인키 필드의 값에 대응하는 최대 인덱스, 상기 태그, 및 상기 레코드 필드의 값을 출력하는 단계를 포함한다.The method for reducing the size of a first stage for a join operation according to another side includes a value of a join key field for a join operation, a tag indicating any one of the tables for the join operation, ≪ / RTI > A first index indicating a cumulative number of mapping data corresponding to the first table corresponding to a value of the join key field and a value of the join key field when the tag indicates a predetermined first table, And outputting a value of the record field; And outputting the value of the join key field, the maximum index corresponding to the value of the join key field, the tag, and the value of the record field when the tag indicates a table different from the first table do.

다른 일 측에 따른 조인 연산을 위한 제2 스테이지의 매핑 방법은 조인 연산을 위한 조인키 필드의 값, 인덱스, 상기 조인 연산을 위한 테이블들 중 어느 하나를 지시하는 태그, 및 상기 조인 연산을 위한 레코드 필드의 값을 포함하는 리듀싱 데이터를 수신하는 단계; 및 상기 조인키 필드의 값, 상기 레코드 필드의 값, 상기 태그, 및 상기 인덱스를 포함하는 매핑 데이터를 출력하는 단계를 포함한다. 상기 매핑 데이터는 상기 조인키 필드의 값 및 상기 레코드 필드의 값의 조합에 기초하여 결정된 리듀서로 전송될 수 있다.And a second stage mapping method for a join operation according to another side includes a value of a join key field for a join operation, an index, a tag indicating any one of the tables for the join operation, Receiving redundant data including a value of a field; And outputting mapping data including a value of the join key field, a value of the record field, the tag, and the index. The mapping data may be transmitted to a reducer determined based on a combination of a value of the join key field and a value of the record field.

다른 일 측에 따른 조인 연산을 위한 제2 스테이지의 리듀싱 방법은 조인 연산을 위한 조인키 필드의 값, 상기 조인 연산을 위한 레코드 필드의 값, 상기 조인 연산을 위한 테이블들 중 어느 하나를 지시하는 태그, 및 인덱스를 포함하는 매핑 데이터를 수신하는 단계; 상기 태그가 미리 정해진 제1 테이블을 지시하는 경우, 상기 조인키 필드의 값, 상기 레코드 필드의 값, 상기 태그, 및 상기 인덱스를 출력하는 단계; 및 상기 태그가 상기 제1 테이블과 다른 테이블을 지시하는 경우, 상기 조인키 필드의 값, 상기 레코드 필드의 값, 상기 태그, 및 초기 인덱스로부터 상기 인덱스까지 순차적으로 증가하는 인덱스를 반복적으로 출력하는 단계를 포함한다.The method for reducing the size of the second stage for a join operation according to another side may include a value of a join key field for a join operation, a value of a record field for the join operation, and a table for the join operation Tag, and an index; Outputting a value of the join key field, a value of the record field, the tag, and the index when the tag indicates a predetermined first table; And repeatedly outputting an index that sequentially increases from the value of the join key field, the value of the record field, the tag, and the initial index to the index when the tag indicates a table different from the first table .

다른 일 측에 따른 조인 연산을 위한 제3 스테이지의 매핑 방법은 조인 연산을 위한 조인키 필드의 값, 인덱스, 상기 조인 연산을 위한 테이블들 중 어느 하나를 지시하는 태그, 및 상기 조인 연산을 위한 레코드 필드의 값을 포함하는 리듀싱 데이터를 수신하는 단계; 및 상기 조인키 필드의 값, 상기 인덱스, 상기 태그, 및 상기 레코드 필드의 값을 포함하는 매핑 데이터를 출력하는 단계를 포함한다. 상기 매핑 데이터는 상기 조인키 필드의 값 및 상기 인덱스의 조합에 기초하여 결정된 리듀서로 전송될 수 있다.The third stage mapping method for a join operation according to another side includes a value of a join key field for a join operation, an index, a tag indicating any one of the tables for the join operation, and a record Receiving redundant data including a value of a field; And outputting mapping data including values of the join key field, the index, the tag, and the value of the record field. The mapping data may be transmitted to a reducer determined based on a combination of the value of the join key field and the index.

다른 일 측에 따른 조인 연산을 위한 제3 스테이지의 리듀싱 방법은 조인 연산을 위한 조인키 필드의 값, 인덱스, 상기 조인 연산을 위한 테이블들 중 어느 하나를 지시하는 태그, 및 상기 조인 연산을 위한 레코드 필드의 값을 포함하는 매핑 데이터를 수신하는 단계; 상기 태그가 미리 정해진 제1 테이블을 지시하는 경우, 상기 조인키 필드의 값 및 상기 인덱스의 조합에 대응하여 상기 레코드 필드의 값을 저장하는 단계; 및 상기 태그가 상기 제1 테이블과 다른 테이블을 지시하는 경우, 상기 조인키 필드의 값 및 상기 인덱스의 조합에 대응하여 미리 저장된 레코드 필드의 값, 및 상기 레코드 필드의 값을 출력하는 단계를 포함한다.
The method for reducing the size of a third stage for a join operation according to another side includes a value of a join key field for a join operation, an index, a tag indicating any one of the tables for the join operation, Receiving mapping data including a value of a record field; Storing a value of the record field corresponding to a combination of the value of the join key field and the index if the tag indicates a predetermined first table; And outputting, if the tag indicates a table different from the first table, a value of a record field previously stored corresponding to a value of the join key field and the index, and a value of the record field .

도 1은 일 실시예에 따른 내부 조인을 설명하는 도면.
도 2는 일 실시예에 따른 내부 조인 연산을 위한 분산 처리 시스템을 설명하는 도면.
도 3은 일 실시예에 따른 2-스테이지 분산 처리 시스템을 설명하는 도면.
도 4는 일 실시예에 따른 2-스테이지 분산 처리 시스템의 구성을 설명하는 도면.
도 5는 일 실시예에 따른 3-스테이지 분산 처리 시스템을 설명하는 도면.
도 6는 일 실시예에 따른 3-스테이지 분산 처리 시스템의 구성을 설명하는 도면.
도 7은 일 실시예에 따른 매핑 방법을 도시한 동작 흐름도.
도 8은 일 실시예에 따른 리듀싱 방법을 도시한 동작 흐름도.
1 illustrates an inner join according to an embodiment;
2 illustrates a distributed processing system for an inner join operation according to an embodiment;
3 is a diagram illustrating a two-stage distributed processing system according to one embodiment;
4 is a diagram illustrating a configuration of a two-stage distributed processing system according to one embodiment;
5 illustrates a three-stage distributed processing system according to one embodiment.
6 is a diagram illustrating a configuration of a three-stage distributed processing system according to one embodiment;
7 is an operational flow diagram illustrating a mapping method according to one embodiment.
Figure 8 is an operational flow diagram illustrating a method of reducing in accordance with one embodiment;

이하, 실시예들을 첨부된 도면을 참조하여 상세하게 설명한다. 각 도면에 제시된 동일한 참조 부호는 동일한 부재를 나타낸다. 하기에서 설명될 실시예들은 데이터베이스에 저장되거나 네트워크에 산재되어 있는 테이블, 집합 객체 등의 데이터를 처리하는데 사용될 수 있다. 특히, 실시예들은 내부 조인(inner join) 연산을 위한 분산 처리에 적용될 수 있다.Hereinafter, embodiments will be described in detail with reference to the accompanying drawings. Like reference symbols in the drawings denote like elements. Embodiments described below can be used to process data such as tables, aggregate objects, etc. stored in a database or interspersed in a network. In particular, embodiments may be applied to distributed processing for inner join operations.

도 1은 일 실시예에 따른 내부 조인을 설명하는 도면이다. 조인(join) 연산은 데이터베이스에 저장된 테이블들로부터 레코드(record)들을 조합하는 연산으로, 구조화 질의어(structured query language, SQL) 등의 언어를 통하여 수행될 수 있다. 데이터베이스는 분산 파일 시스템(distributed file system)에 의하여 관리될 수 있다. 조인 연산은 미리 정해진 클러스터(cluster)에 포함된 복수의 컴퓨팅 장치들(예를 들면, 서버 장치들)에 의하여 수행될 수 있다. 다양한 유형의 조인 연산이 존재하며, 그 중 내부 조인 연산은 둘 이상의 테이블들에서 키(key)가 일치하는 레코드들을 조합하는 연산이다.1 is a view for explaining an inner join according to an embodiment. A join operation is an operation that combines records from tables stored in a database, and can be performed through a language such as a structured query language (SQL). The database may be managed by a distributed file system. The join operation may be performed by a plurality of computing devices (e.g., server devices) included in a predetermined cluster. There are various types of join operations, among which an inner join operation is an operation that combines records whose keys match in two or more tables.

도 1을 참조하면, 제1 테이블(110)은 사용자 필드와 구매 아이템 필드로 구성되는 복수의 원소들을 포함할 수 있다. 제1 테이블(110)에 포함된 원소들 각각은 특정 사용자가 구매한 아이템에 관한 정보를 지시할 수 있다. 예를 들어, 제1 테이블은 {Yuna, 스마트 폰}, {Swayne, 스마트 폰}, {Grace, 스마트 폰}, {Jake, 스마트 폰}, 및 {Tiffany, 스마트 폰}을 포함할 수 있다.Referring to FIG. 1, the first table 110 may include a plurality of elements including a user field and a purchase item field. Each of the elements included in the first table 110 may indicate information about an item purchased by a particular user. For example, the first table may include {Yuna, smartphone}, {Swayne, smartphone}, {Grace, smartphone}, {Jake, smartphone}, and {Tiffany, smartphone}.

제2 테이블(120)은 아이템 필드와 함께 구매된 아이템 필드로 구성되는 복수의 원소들을 포함할 수 있다. 제2 테이블(120)에 포함된 원소들 각각은 특정 아이템과 함께 구매된 아이템에 관한 정보를 지시할 수 있다. 예를 들어, 제2 테이블은 {스마트 폰, 스마트 폰 케이스}, {스마트 폰, 이어폰}, {스마트 폰, 충전 케이블}, {노트북, 노트북 케이스}, 및 {노트북, 배터리}를 포함할 수 있다.The second table 120 may include a plurality of elements consisting of item fields purchased along with item fields. Each of the elements included in the second table 120 may indicate information about the purchased item along with the specific item. For example, the second table may include {smartphone, smartphone case}, {smartphone, earphone}, {smartphone, charging cable}, {laptop, laptop case}, and {laptop, battery} .

일 실시예에 따른 프로세싱 장치(130)는 내부 조인 연산을 수행할 수 있다. 프로세싱 장치(130)는 소프트웨어 모듈, 하드웨어 모듈, 또는 이들의 조합으로 구현될 수 있다. 아래에서 상세히 설명하겠지만, 프로세싱 장치(130)는 분산 처리를 위하여 병렬 처리 프로세서로 구성되거나, 네트워크로 연결된 복수의 프로세싱 장치들로 구성될 수도 있다.The processing device 130 according to one embodiment may perform an inner join operation. The processing device 130 may be implemented as a software module, a hardware module, or a combination thereof. As will be described in greater detail below, the processing device 130 may comprise a parallel processing processor for distributed processing, or may be comprised of a plurality of processing devices connected in a network.

프로세싱 장치(130)는 제1 테이블(110)과 제2 테이블(120)을 내부 조인함으로써 제3 테이블(140)을 출력할 수 있다. 일 예로, 프로세싱 장치(130)는 표 1과 같은 구조 질의어에 반응하여 제1 테이블(110)과 제2 테이블을 내부 조인할 수 있다.The processing device 130 may output the third table 140 by joining the first table 110 and the second table 120 internally. For example, the processing device 130 may perform internal joining of the first table 110 and the second table in response to the structure query as shown in Table 1.

SELECT
제1 테이블의 사용자 필드, 제2 테이블의 함께 구매된 아이템 필드
FROM
제1 테이블 JOIN 제2 테이블
ON
제1 테이블의 구매 아이템 필드 = 제2 테이블의 아이템 필드
SELECT
The user field of the first table, the purchased item field of the second table
FROM
Table 1 JOIN Table 2
ON
Purchase item field of the first table = item field of the second table

구조 질의어는 테이블들에 관한 제1 정보, 조인키 필드에 관한 제2 정보, 및 레코드 필드에 관한 제3 정보를 포함한다. 조인키 필드는 조인 연산을 위한 조건으로 사용되는 필드일 수 있다. 예를 들어, 표 1을 참조하면, 제1 테이블(110)과 제2 테이블(120)은 조인 연산을 위한 테이블들이고, 제1 테이블(110)의 구매 아이템 필드와 제2 테이블(120)의 아이템 필드는 조인키 필드이며, 제1 테이블(110)의 사용자 필드 및 제2 테이블(120)의 함께 구매된 아이템 필드는 조인 연산을 위한 레코드 필드일 수 있다.The structure query contains the first information about the tables, the second information about the join key field, and the third information about the record field. The join key field may be a field used as a condition for a join operation. For example, referring to Table 1, the first table 110 and the second table 120 are tables for a join operation, and the purchase item field of the first table 110 and the item of the second table 120 Field is a join key field and the user field of the first table 110 and the concatenated item field of the second table 120 may be a record field for a join operation.

프로세싱 장치(130)는 제1 테이블(110)에 포함된 제1 원소의 구매 아이템 필드의 값과 제2 테이블(120)에 포함된 제2 원소의 아이템 필드의 값을 비교하고, 그 값이 동일한 경우 제1 원소의 사용자 필드의 값과 제2 원소의 함께 구매된 아이템 필드의 값을 출력할 수 있다. 제3 테이블(140)은 프로세싱 장치(130)에 의하여 출력된 원소들로 구성되며, 특정 사용자에게 아이템을 추천하는 용도 등으로 활용될 수 있다.The processing device 130 compares the value of the purchase item field of the first element included in the first table 110 with the value of the item field of the second element included in the second table 120, The value of the user field of the first element and the value of the purchased item field of the second element may be output. The third table 140 is composed of the elements output by the processing device 130 and may be utilized for recommending an item to a specific user.

도 2는 일 실시예에 따른 내부 조인 연산을 위한 분산 처리 시스템을 설명하는 도면이다. 도 2를 참조하면, 일 실시예에 따른 분산 처리 시스템은 매퍼(210), 제1 리듀서(220), 및 제2 리듀서(230)를 포함한다. 2 is a view for explaining a distributed processing system for an inner join operation according to an embodiment. Referring to FIG. 2, a distributed processing system according to an embodiment includes a mapper 210, a first reducer 220, and a second reducer 230.

매퍼(210)는 테이블들에 포함된 원소들을 수신한다. 예를 들어, 매퍼(210)는 제1 테이블 또는 제2 테이블의 원소들을 스트리밍 형태로 수신할 수 있다. The mapper 210 receives the elements contained in the tables. For example, the mapper 210 may receive the elements of the first table or the second table in streaming form.

매퍼(210)는 개별 원소가 수신되면, 수신된 원소를 미리 정해진 포맷의 매핑 데이터로 재구성한 뒤, 매핑 데이터를 출력할 수 있다. 예를 들어, 매퍼(210)는 {조인키 필드의 값, 태그, 레코드 필드의 값}을 포함하는 매핑 데이터를 생성하고, 생성된 매핑 데이터를 출력할 수 있다. 여기서, 태그는 수신된 원소가 속한 테이블을 지시하는 정보이다. 이하, A는 제1 테이블을 지시하는 태그이고, B는 제2 테이블을 지시하는 태그일 수 있다.When the individual element is received, the mapper 210 can reconstruct the received element into mapping data of a predetermined format and output the mapping data. For example, the mapper 210 may generate mapping data including {value of the join key field, tag, value of the record field}, and output the generated mapping data. Here, the tag is information indicating a table to which the received element belongs. Hereinafter, A is a tag indicating the first table and B is a tag indicating the second table.

매핑 데이터는 조인 연산을 위한 프레임워크(framework)를 통하여 리듀서로 분배될 수 있다. 조인 연산을 위한 프레임워크는 조인 연산에 필요한 제어 동작을 수행하는 일종의 미들 웨어(middle-ware)로, 예를 들어 하둡(Hadoop) 등 맵-리듀스용 프레임워크가 이용될 수 있다. 이하, 조인 연산을 위한 프레임워크는 프레임워크라고 지칭될 수 있다.The mapping data can be distributed to the reducers through a framework for join operations. The framework for the join operation is a kind of middle-ware for performing a control operation necessary for the join operation. For example, a framework for map-reducing, such as Hadoop, can be used. Hereinafter, a framework for a join operation may be referred to as a framework.

프레임워크는 제1 파티션 키(partition key)를 이용하여 매핑 데이터를 처리할 리듀서를 결정할 수 있다. 제1 파티션 키는 매핑 데이터 내 조인키 필드로 설정될 수 있다. 이 경우, 프레임워크는 매핑 데이터 내 조인키 필드의 값을 확인하고, 동일한 조인키 필드의 값을 가지는 매핑 데이터들이 동일한 리듀서에서 처리되도록, 매핑 데이터들을 리듀서들 중 어느 하나로 전송할 수 있다. 예를 들어, 프레임워크는 조인키 필드의 값이 스마트 폰인 경우 해당 매핑 데이터를 제1 리듀서(220)로 전송하고, 조인키 필드의 값이 노트북인 경우 해당 매핑 데이터를 제2 리듀서(230)로 전송할 수 있다.The framework may use a first partition key to determine a reducer to process the mapping data. The first partitioning key may be set to a join key field in the mapping data. In this case, the framework can check the value of the join key field in the mapping data and send the mapping data to any one of the reducers so that the mapping data having the same join key field value are processed in the same reducer. For example, if the value of the join key field is a smart phone, the framework transmits the corresponding mapping data to the first reducer 220. If the value of the join key field is a notebook, the framework transmits the mapping data to the second reducer 230 Lt; / RTI >

설명의 편의를 위하여, 매퍼(210)가 하나의 블록으로 도시되었으나, 매퍼(210)는 복수의 매퍼들로 구성될 수 있다. 매퍼(210)가 복수의 매퍼들로 구성되는 경우, 각각의 매퍼들은 전술한 매퍼(210)의 동작과 동일하게 동작할 수 있다. 예를 들어, 각각의 매퍼들은 개별 원소가 수신되면, 수신된 원소를 미리 정해진 포맷의 매핑 데이터로 재구성한 뒤, 매핑 데이터를 출력할 수 있다. 이 경우, 프레임워크는 동일한 조인키 필드의 값을 가지는 매핑 데이터들이 동일한 리듀서에서 처리되도록, 출력되는 매핑 데이터들을 리듀서들 중 어느 하나로 전송할 수 있다.For convenience of explanation, the mapper 210 is shown as one block, but the mapper 210 may be composed of a plurality of mappers. When the mapper 210 is composed of a plurality of mappers, each of the mappers can operate in the same manner as the mappers 210 described above. For example, when each individual element is received, each of the mappers can reconstruct the received element into mapping data of a predetermined format, and then output the mapping data. In this case, the framework may transmit the output mapping data to one of the reducers so that the mapping data having the values of the same join key field are processed in the same reducer.

제1 리듀서(220)는 매핑 데이터가 수신되면, 매핑 데이터의 태그를 확인할 수 있다. 매핑 데이터의 태그가 A인 경우, 제1 리듀서(220)는 매핑 데이터의 레코드 필드의 값을 누적함으로써 리스트(221)를 생성할 수 있다.The first reducer 220 can confirm the tag of the mapping data when the mapping data is received. When the tag of the mapping data is A, the first reducer 220 can generate the list 221 by accumulating the value of the record field of the mapping data.

매핑 데이터의 태그가 B인 경우, 제1 리듀서(220)는 리스트(221)를 스캔함으로써, {리스트(221)에 누적된 레코드 필드의 값, 매핑 데이터의 레코드 필드의 값}을 반복적으로(iteratively) 출력할 수 있다. 예를 들어, 리스트(221)에 [Yuna, Swayne, Grace, Jake]가 누적되어 있고 제1 리듀서(220)가 {스마트 폰, B, 이어폰}을 수신하는 경우, {Yuna, 이어폰}, {Swayne, 이어폰}, {Grace, 이어폰}, {Jake, 이어폰}을 출력할 수 있다.When the tag of the mapping data is B, the first reducer 220 scans the list 221 to obtain the value of the record field accumulated in the list 221, the value of the record field of the mapping data iteratively ). For example, when [Yuna, Swayne, Grace, Jake] is accumulated in the list 221 and the first reducer 220 receives {smartphone, B, earphone}, {Yuna, earphone}, {Swayne , Earphone}, {Grace, earphone}, {Jake, earphone}.

프레임워크는 제1 소트 키(sort key)를 이용하여 매핑 데이터들을 정렬할 수 있다. 제1 소트 키는 매핑 데이터 내 조인키 필드 및 태그의 조합으로 설정될 수 있다. 이 경우, 프레임워크는 조인키 필드가 동일한 매핑 데이터들 중 특정 태그의 매핑 데이터들을 우선적으로 처리할 수 있다. 예를 들어, 프레임워크는 제1 테이블의 원소들을 먼저 처리하고 제2 테이블의 원소들을 나중에 처리할 수 있다. 이로 인하여, 제1 리듀서(220)는 태그가 A인 매핑 데이터들을 먼저 수신하고 태그가 B인 매핑 데이터들을 나중에 수신할 수 있다.The framework may sort the mapping data using a first sort key. The first sort key may be set to a combination of a join key field and a tag in the mapping data. In this case, the framework can preferentially process the mapping data of the specific tag among the mapping data in which the join key field is the same. For example, the framework may process the elements of the first table first and then the elements of the second table later. Accordingly, the first reducer 220 can receive the mapping data with the tag A first and the mapping data with the tag B later.

이상에서, 설명의 편의를 위하여 매핑 데이터의 태그가 A인 경우 리스트(221)를 생성하고 매핑 데이터의 태그가 B인 경우 {리스트(221)에 누적된 레코드 필드의 값, 매핑 데이터의 레코드 필드의 값}을 출력하는 실시예를 설명하였으나, 이는 다양하게 변형될 수 있다. 예를 들어, 매핑 데이터의 태그가 B인 경우 리스트(221)를 생성하고 매핑 데이터의 태그가 A인 경우 {리스트(221)에 누적된 레코드 필드의 값, 매핑 데이터의 레코드 필드의 값}을 출력할 수 있다. 이 경우, 프레임워크는 제2 테이블의 원소들을 먼저 처리하고 제1 테이블의 원소들을 나중에 처리할 수 있다.For convenience of explanation, when the tag of the mapping data is A, the list 221 is generated. When the tag of the mapping data is B {the value of the record field accumulated in the list 221, Value} is output, this can be variously modified. For example, when the tag of the mapping data is B, a list 221 is generated. When the tag of the mapping data is A {the value of the record field accumulated in the list 221, the value of the record field of the mapping data} can do. In this case, the framework can process the elements of the second table first and then process the elements of the first table later.

제2 리듀서(230)도 제1 리듀서(220)와 동일한 방식으로 동작할 수 있다. 제1 리듀서(220)의 출력과 제2 리듀서(230)의 출력을 합치면, 도 1의 제3 테이블(140)과 실질적으로 동일한 결과가 도출될 수 있다.The second reducer 230 may also operate in the same manner as the first reducer 220. By combining the output of the first reducer 220 and the output of the second reducer 230, substantially the same result as the third table 140 of FIG. 1 can be obtained.

도 2의 예시에서, 제1 리듀서(220)는 조인키 필드의 값이 스마트 폰인 매핑 데이터들을 처리하고, 제2 리듀서(230)는 조인키 필드의 값이 노트북인 매핑 데이터들을 처리한다. 설명의 편의를 위하여, 조인키 필드가 두 가지 값들(예를 들어, 스마트 폰 및 노트북)을 가지는 경우를 설명하였으나, 조인키 필드는 보다 다양한 값들을 가질 수 있다. In the example of FIG. 2, the first reducer 220 processes the mapping data where the value of the join key field is the smartphone, and the second reducer 230 processes the mapping data where the value of the join key field is the notebook. For convenience of explanation, the case where the join key field has two values (for example, a smart phone and a notebook) has been described, but the join key field may have more various values.

분산 처리 시스템은 조인키 필드의 서로 다른 값들의 수와 같거나 더 많은 수의 리듀서들을 포함할 수 있다. 이 경우, 프레임워크는 조인키 필드의 값과 리듀서를 일대일로 매핑할 수 있다. 각각의 리듀서들은 고유의 조인키 필드의 값을 포함하는 매핑 데이터들을 처리한다.The distributed processing system may include reducers equal to or greater than the number of different values in the join key field. In this case, the framework can map the value of the join key field and the reducer one-to-one. Each of the reducers processes the mapping data including the value of the unique join key field.

또는, 분산 처리 시스템은 조인키 필드의 서로 다른 값들의 수보다 적은 수의 리듀서들만을 포함할 수 있다. 이 경우, 프레임워크는 조인키 필드의 값과 리듀서를 다대일로 매핑할 수 있다. 예를 들어, 조인키 필드가 네 가지 값들(예를 들어, k1, k2, k3, k4)을 가질 수 있고 분산 처리 시스템이 두 개의 리듀서들(예를 들어, r1, r2)만을 포함하는 경우, 프레임워크는 k1, k2를 r1에 매핑하고 k3, k4를 r2에 매핑할 수 있다. 조인키 필드의 값과 리듀서가 다대일로 매핑되더라도, 여전히 동일한 조인키 필드의 값을 가지는 매핑 데이터들은 동일한 리듀서에서 처리될 수 있다.Alternatively, the distributed processing system may include only a fewer reducers than the number of different values of the join key field. In this case, the framework can map the value of the join key field and the reducer in many ways. For example, if the join key field may have four values (e.g., k1, k2, k3, k4) and the distributed processing system includes only two reducers (e.g., r1, r2) The framework can map k1, k2 to r1, and k3, k4 to r2. Even though the value of the join key field and the reducer are mapped to many, the mapping data still having the value of the same join key field can be processed in the same reducer.

도 2의 분산 처리 시스템들에서 두 가지 문제점들이 발생될 수 있다. 첫 번째로, 리듀서들마다 처리하는 태스크의 양이 상이하므로, 스큐드 태스크(skewed task) 문제가 발생될 수 있다. 예를 들어, 제1 리듀서(220)에서 처리되는 매핑 데이터들의 수와 제2 리듀서(230)에서 처리되는 매핑 데이터들의 수가 고르게 분배되지 않을 수 있다. 분산 처리 시스템에서 태스크들이 고르게 분배되지 않으면, 분산 처리 성능이 감소될 수 있다.Two problems can arise in the distributed processing systems of FIG. First, skewed task problems can occur because the amount of tasks to process is different for each reducer. For example, the number of mapping data processed in the first reducer 220 and the number of mapping data processed in the second reducer 230 may not be evenly distributed. If the tasks are not evenly distributed in the distributed processing system, the distributed processing performance can be reduced.

두 번째로, 각각의 리듀서들이 리스트를 관리해야 하므로, 메모리 문제가 발생될 수 있다. 예를 들어, 리듀서들마다 리스트의 크기만큼 메모리 자원을 사용해야 하며, 리스트의 크기가 가용 메모리 공간보다 커지는 경우 리스트를 전부 메모리에 로드하지 못할 수도 있다.Second, since each of the reducers has to manage the list, memory problems can occur. For example, each reducer must use a memory resource of the size of the list, and if the size of the list is larger than the available memory space, the list may not be entirely loaded into memory.

도 3은 일 실시예에 따른 2-스테이지 분산 처리 시스템을 설명하는 도면이다. 도 3을 참조하면, 일 실시예에 따른 2-스테이지 분산 처리 시스템은 두 개의 스테이지들을 포함하고, 각각의 스테이지들에서 매핑 동작과 리듀싱 동작이 수행된다. 아래에서 상세히 설명하겠지만, 2-스테이지 분산 처리 시스템은 메모리 문제를 해소할 수 있다.3 is a diagram illustrating a two-stage distributed processing system according to one embodiment. Referring to FIG. 3, a two-stage distributed processing system according to one embodiment includes two stages, and a mapping operation and a reducing operation are performed in each of the stages. As will be described in greater detail below, a two-stage distributed processing system can eliminate memory problems.

제1 스테이지의 매퍼(310)는 2-스테이지 분산 처리 시스템의 제1 스테이지를 위한 매핑 동작을 수행한다. 도 2의 매퍼(210)를 통하여 전술한 바와 같이, 매퍼(310)도 복수의 매퍼들로 구성될 수 있다. 또한, 프레임워크는 제1 파티션 키 및 제1 소트 키를 이용하여, 매퍼(310)에서 출력된 매핑 데이터들을 리듀서들로 전달할 수 있다. 매퍼(310)는 도 2의 매퍼(210)와 동일하게 동작하므로, 보다 상세한 설명은 생략한다.The mapper 310 of the first stage performs the mapping operation for the first stage of the two-stage distributed processing system. As described above, the mapper 310 may be composed of a plurality of mappers through the mapper 210 of FIG. In addition, the framework may transfer the mapping data output from the mapper 310 to the reducers using the first partition key and the first sort key. The mapper 310 operates in the same manner as the mapper 210 of FIG. 2, so that detailed description is omitted.

제1 스테이지의 제1 리듀서(321)는 2-스테이지 분산 처리 시스템의 제1 스테이지를 위한 리듀싱 동작을 수행한다. 제1 리듀서(321)는 {조인키 필드의 값, 태그, 레코드 필드의 값}을 포함하는 매핑 데이터를 수신한다. The first reducer 321 of the first stage performs a redundancy operation for the first stage of the two-stage distributed processing system. The first reducer 321 receives the mapping data including {the value of the join key field, the tag, and the value of the record field}.

제1 리듀서(321)는 매핑 데이터가 수신되면, 매핑 데이터의 태그를 확인할 수 있다. 매핑 데이터의 태그가 A인 경우, 제1 리듀서(321)는 {조인키 필드의 값, 제1 인덱스, 태그, 레코드 필드의 값}을 출력한다. 여기서, 조인키 필드의 값, 태그, 및 레코드 필드의 값은 수신된 매핑 데이터에 포함된 값들이다. 제1 인덱스는 제1 테이블에 대응하는 매핑 데이터의 누적 개수를 지시할 수 있다. 예를 들어, 태그가 A인 매핑 데이터가 처음으로 수신된 경우, 제1 인덱스는 1일 수 있다. 태그가 A인 매핑 데이터가 q번째 수신된 경우, 제1 인덱스는 q일 수 있다.The first reducer 321 can confirm the tag of the mapping data when the mapping data is received. When the tag of the mapping data is A, the first reducer 321 outputs {the value of the join key field, the first index, the tag, and the value of the record field}. Here, the value of the join key field, the value of the tag, and the value of the record field are values included in the received mapping data. The first index may indicate the cumulative number of mapping data corresponding to the first table. For example, if the mapping data with the tag A is received for the first time, the first index may be one. When the mapping data with the tag A is received q-th, the first index may be q.

도 2를 참조하여 전술한 바와 같이 제1 리듀서(321)는 복수의 조인키 필드의 값에 매핑될 수 있다. 프레임워크는 제1 소트 키를 이용하여 매핑 데이터를 처리하므로, 제1 리듀서(321)는 동일한 조인키 필드의 값을 가지는 매핑 데이터들을 연속적으로 수신할 수 있다. As described above with reference to FIG. 2, the first reducer 321 may be mapped to values of a plurality of join key fields. Since the framework processes the mapping data using the first sort key, the first reducer 321 can continuously receive the mapping data having the value of the same join key field.

매핑 데이터의 태그가 A인 경우, 제1 리듀서(321)는 수신된 매핑 데이터가 새로운 조인키 필드의 값을 가지는 매핑 데이터인지 여부를 판단할 수 있다. 제1 리듀서(321)는 매핑 데이터가 새로운 조인키 필드의 값을 가지는 매핑 데이터라는 판단에 따라, 제1 인덱스를 초기 인덱스(예를 들어, 1)로 설정할 수 있다. 제1 리듀서(321)는 {조인키 필드의 값, 제1 인덱스, 태그, 레코드 필드의 값}을 출력한 뒤, 출력된 제1 인덱스를 저장할 수 있다.If the tag of the mapping data is A, the first reducer 321 can determine whether the received mapping data is mapping data having a value of a new join key field. The first reducer 321 may set the first index to an initial index (e.g., 1) according to the determination that the mapping data is mapping data having a value of a new join key field. The first reducer 321 may store the output first index after outputting {the value of the join key field, the first index, the tag, and the value of the record field}.

태그가 A인 매핑 데이터가 추가적으로 수신되는 경우, 제1 리듀서(321)는 수신된 매핑 데이터가 새로운 조인키 필드의 값을 가지는 매핑 데이터가 아니라고 판단할 수 있다. 제1 리듀서(321)는 기존에 설정된 인덱스에 기초하여 제1 인덱스를 설정할 수 있다. 예를 들어, 제1 리듀서(321)는 기존에 설정된 인덱스에 1을 더하여 제1 인덱스를 설정할 수 있다. 기존에 설정된 인덱스는 동일한 조인키 필드의 값을 가지고 태그가 A인 직전 매핑 데이터를 처리할 때 설정된 인덱스일 수 있다.When the mapping data having the tag A is additionally received, the first reducer 321 can determine that the received mapping data is not the mapping data having the value of the new join key field. The first reducer 321 can set the first index based on the previously set index. For example, the first reducer 321 may set the first index by adding 1 to the previously set index. The previously set index may be the index set when processing the immediately preceding mapping data having the value of the same join key field and the tag A.

매핑 데이터의 태그가 B인 경우, 제1 리듀서(321)는 {조인키 필드의 값, 제2 인덱스, 태그, 레코드 필드의 값}을 반복적으로 출력한다. 여기서, 조인키 필드의 값, 태그, 및 레코드 필드의 값은 수신된 매핑 데이터에 포함된 값들이다. 제2 인덱스는 초기 인덱스부터 조인키 필드의 값에 대응하는 최대 인덱스까지 순차적으로 증가하는 인덱스이다.When the tag of the mapping data is B, the first reducer 321 repeatedly outputs {the value of the join key field, the second index, the tag, and the value of the record field}. Here, the value of the join key field, the value of the tag, and the value of the record field are values included in the received mapping data. The second index is an index sequentially increasing from the initial index to the maximum index corresponding to the value of the join key field.

매핑 데이터의 태그가 B인 경우, 제1 리듀서(321)는 기존에 설정된 인덱스를 이용하여 최대 인덱스를 설정할 수 있다. 기존에 설정된 인덱스는 동일한 조인키 필드의 값을 가지고 태그가 A인 마지막 매핑 데이터를 처리할 때 설정된 인덱스일 수 있다. 도 2를 참조하여 전술한 바와 같이 제1 리듀서(321)는 복수의 조인키 필드의 값에 매핑될 수 있으므로, 제1 리듀서(321)는 조인키 필드의 값에 대응하여 기존에 설정된 인덱스를 이용하여 최대 인덱스를 설정할 수 있다. 예를 들어, 스마트 폰에 대응하여 기존에 설정된 인덱스가 4인 경우, 제1 리듀서(321)는 최대 인덱스를 4로 설정할 수 있다.When the tag of the mapping data is B, the first reducer 321 can set the maximum index using the previously set index. The previously set index may be the index set when processing the last mapping data having the tag A with the value of the same join key field. Since the first reducer 321 can be mapped to the values of the plurality of join key fields as described above with reference to FIG. 2, the first reducer 321 can use the previously set index corresponding to the value of the join key field The maximum index can be set. For example, in a case where the previously set index corresponding to the smartphone is 4, the first reducer 321 can set the maximum index to 4. [

도 1의 제1 테이블(110)과 제2 테이블(120)을 이용하여 표 1의 내부 조인 연산이 수행되는 경우, 제1 리듀서(321)에 입력되는 입력 스트림과 제1 리듀서(321)에 의하여 출력되는 출력 스트림은 표 2와 같을 수 있다.When the inner joining operation of Table 1 is performed using the first table 110 and the second table 120 of FIG. 1, the input stream to be input to the first reducer 321 and the first reducer 321 The output stream to be output may be as shown in Table 2.

입력input {스마트 폰, A, Yuna}
{스마트 폰, A, Swayne}
{스마트 폰, A, Grace}
{스마트 폰, A, Jake}
{스마트 폰, B, 스마트 폰 케이스}
{스마트 폰, B, 이어폰}
{스마트 폰, B, 충전 케이블}
{Smartphone, A, Yuna}
{Smartphone, A, Swayne}
{Smartphone, A, Grace}
{Smartphone, A, Jake}
{Smartphone, B, smartphone case}
{Smartphone, B, earphone}
{Smartphone, B, Charging Cable}
출력Print {스마트 폰, 1, A, Yuna}
{스마트 폰, 2, A, Swayne}
{스마트 폰, 3, A, Grace}
{스마트 폰, 4, A, Jake}
{스마트 폰, 1, B, 스마트 폰 케이스}
{스마트 폰, 2, B, 스마트 폰 케이스}
{스마트 폰, 3, B, 스마트 폰 케이스}
{스마트 폰, 4, B, 스마트 폰 케이스}
{스마트 폰, 1, B, 이어폰}
{스마트 폰, 2, B, 이어폰}
{스마트 폰, 3, B, 이어폰}
{스마트 폰, 4, B, 이어폰}
{스마트 폰, 1, B, 충전 케이블}
{스마트 폰, 2, B, 충전 케이블}
{스마트 폰, 3, B, 충전 케이블}
{스마트 폰, 4, B, 충전 케이블}
{Smartphone, 1, A, Yuna}
{Smartphone, 2, A, Swayne}
{Smartphone, 3, A, Grace}
{Smartphone, 4, A, Jake}
{Smartphone, 1, B, smartphone case}
{Smartphone, 2, B, smartphone case}
{Smartphone, 3, B, smartphone case}
{Smartphone, 4, B, smartphone case}
{Smart phone, 1, B, earphone}
{Smartphone, 2, B, earphone}
{Smartphone, 3, B, earphone}
{Smartphone, 4, B, earphone}
{Smartphone, 1, B, Charging Cable}
{Smartphone, 2, B, charging cable}
{Smartphone, 3, B, charging cable}
{Smartphone, 4, B, charging cable}

제n 리듀서(322)도 제1 리듀서(321)과 동일한 방식으로 동작할 수 있다. 예를 들어, 도 1의 제1 테이블(110)과 제2 테이블(120)을 이용하여 표 1의 내부 조인 연산이 수행되는 경우, 제n 리듀서(322)에 입력되는 입력 스트림과 제n 리듀서(322)에 의하여 출력되는 출력 스트림은 표 3과 같을 수 있다.The n-th reducer 322 may also operate in the same manner as the first reducer 321. For example, when the inner join operation of Table 1 is performed using the first table 110 and the second table 120 of FIG. 1, the input stream input to the n-th reducer 322 and the input stream input to the n-th reducer 322 may be as shown in Table 3. < tb > < TABLE >

입력input {노트북, A, Tiffany}
{노트북, B, 노트북 케이스}
{노트북, B, 배터리}
{Laptop, A, Tiffany}
{Laptop, B, Laptop Case}
{Laptop, B, Battery}
출력Print {노트북, 1, A, Tiffany}
{노트북, 1, B, 노트북 케이스}
{노트북, 1, B, 배터리}
{Laptop, 1, A, Tiffany}
{Laptop, 1, B, Laptop Case}
{Laptop, 1, B, Battery}

제2 스테이지의 매퍼(330)는 2-스테이지 분산 처리 시스템의 제2 스테이지를 위한 매핑 동작을 수행한다. 매퍼(310)와 유사하게, 매퍼(330)도 복수의 매퍼들로 구성될 수 있다. 매퍼(330)는 {조인키 필드의 값, 인덱스, 태그, 레코드 필드의 값}을 포함하는 리듀싱 데이터를 수신한다.The mapper 330 of the second stage performs a mapping operation for the second stage of the two-stage distributed processing system. Similar to the mapper 310, the mapper 330 may also be composed of a plurality of mappers. The mapper 330 receives the redundancy data including {the value of the join key field, the index, the tag, and the value of the record field}.

매퍼(330)는 리듀싱 데이터가 수신되면, 수신된 리듀싱 데이터를 미리 정해진 포맷의 매핑 데이터로 재구성한 뒤, 매핑 데이터를 출력한다. 예를 들어, 매퍼(330)는 {(조인키 필드의 값, 인덱스), 태그, 레코드 필드의 값}을 포함하는 매핑 데이터를 생성하고, 생성된 매핑 데이터를 출력할 수 있다. 여기서, 조인키 필드의 값, 인덱스, 태그, 및 레코드 필드의 값은 수신된 리듀싱 데이터에 포함된 값들이다.When the redundancy data is received, the mapper 330 reconstructs the received redundancy data into mapping data of a predetermined format, and outputs the mapping data. For example, the mapper 330 may generate mapping data including {(value of join key field, index), tag, value of record field}, and output the generated mapping data. Here, the value of the join key field, the index, the tag, and the value of the record field are the values included in the received redundancy data.

프레임워크는 제2 파티션 키를 이용하여 매핑 데이터를 처리할 리듀서를 결정할 수 있다. 제2 파티션 키는 조인키 필드와 인덱스의 조합으로 설정될 수 있다. 이 경우, 프레임워크는 동일한 (조인키 필드의 값, 인덱스)를 포함하는 출력 값이 동일한 리듀서에서 처리되도록, (조인키 필드의 값, 인덱스)와 리듀서를 매핑할 수 있다.The framework may use the second partitioning key to determine a reducer to process the mapping data. The second partitioning key may be set by a combination of a join key field and an index. In this case, the framework can map the reducer (the value of the join key field, the index) and the reducer so that the output value including the same (the value of the join key field, the index) is processed by the same reducer.

프레임워크는 미리 정해진 복수의 리듀서들 중 어느 하나의 리듀서를 선택할 수 있다. 프레임워크는 2-스테이지 분산 처리 시스템의 제2 스테이지를 위한 리듀서들에 관한 정보를 알 수 있다. 프레임워크는 각 리듀서들의 현재 할당량 등을 고려하여 어느 하나의 리듀서를 선택할 수 있다.The framework may select a reducer of any one of a plurality of predetermined reducers. The framework may know information about the reducers for the second stage of the two-stage distributed processing system. The framework can select any one reducer considering the current quota of each reducer and the like.

제2 스테이지의 제1 리듀서(341)는 2-스테이지 분산 처리 시스템의 제2 스테이지를 위한 리듀싱 동작을 수행한다. 제1 리듀서(341)는 {(조인키 필드의 값, 인덱스), 태그, 레코드 필드의 값}을 수신한다.The first reducer 341 of the second stage performs a redundancy operation for the second stage of the two-stage distributed processing system. The first reducer 341 receives {(value of join key field, index), tag, value of record field}.

제1 리듀서(341)는 매핑 데이터가 수신되면, 매핑 데이터의 태그를 확인할 수 있다. 매핑 데이터의 태그가 A인 경우, 제1 리듀서(341)는 레코드 필드의 값을 기억한다. 제1 리듀서(341)는 메모리 등 미리 구비된 저장 공간에 레코드 필드의 값을 저장할 수 있다. 매핑 데이터의 태그가 B인 경우, 제1 리듀서(341)는 {기억된 레코드 필드의 값, 레코드 필드의 값}을 출력한다.The first reducer 341 can confirm the tag of the mapping data when the mapping data is received. When the tag of the mapping data is A, the first reducer 341 stores the value of the record field. The first reducer 341 may store the value of the record field in a pre-configured storage space such as a memory. When the tag of the mapping data is B, the first reducer 341 outputs {the value of the stored record field, the value of the record field}.

프레임워크는 제2 소트 키를 이용하여 매핑 데이터들을 정렬할 수 있다. 제2 소트 키는 키는 매핑 데이터 내 조인키 필드, 인덱스, 및 태그의 조합으로 설정될 수 있다. 이 경우, 프레임워크는 (조인키 필드, 인덱스)의 값이 동일한 매핑 데이터들 중 특정 태그의 매핑 데이터들을 우선적으로 처리할 수 있다.The framework can sort the mapping data using the second sort key. The second sort key may be set to a combination of a join key field, an index, and a tag in the mapping data. In this case, the framework can preferentially process the mapping data of the specific tag among the mapping data having the same value of (join key field, index).

이에 따라, 제1 리듀서(341)는 복수의 (조인키 필드의 값, 인덱스)에 매핑되는 경우에도, 제1 리듀서(341)는 (조인키 필드, 인덱스)의 값이 동일한 매핑 데이터들을 연속적으로 수신한다. 제1 리듀서(341)는 현재 처리 중인 (조인키 필드의 값, 인덱스)에 대응하여 레코드 필드의 값을 기억할 수 있다. 제1 리듀서(341)는 현재 처리 중인 (조인키 필드의 값, 인덱스)에 대응하는 레코드 필드의 값만을 저장하므로, 메모리 문제가 해소될 수 있다.Accordingly, even when the first reducer 341 is mapped to a plurality of values (index values of the join key field), the first reducer 341 continuously maps the mapping data having the same value (join key field, index) . The first reducer 341 may store the value of the record field corresponding to the currently processed (value of the join key field, index). The first reducer 341 stores only the value of the record field corresponding to the current processing (the value of the join key field, the index), so that the memory problem can be solved.

매핑 데이터의 태그가 B인 경우, 제1 리듀서(341)는 {기억된 레코드 필드의 값, 레코드 필드의 값}을 출력한다. 여기서, 기억된 레코드 필드의 값은 현재 처리 중인 (조인키 필드의 값, 인덱스)에 대응하여 미리 저장된 값이고, 레코드 필드의 값은 수신된 매핑 데이터에 포함된 값일 수 있다.When the tag of the mapping data is B, the first reducer 341 outputs {the value of the stored record field, the value of the record field}. Here, the value of the stored record field is a value previously stored corresponding to the currently processed (value of the join key field, index), and the value of the record field may be a value included in the received mapping data.

제 n 리듀서(342)도 제1 리듀서(341)과 동일한 방식으로 동작할 수 있다. 도 1의 제1 테이블(110)과 제2 테이블(120)을 이용하여 표 1의 내부 조인 연산이 수행되는 경우, 제2 스테이지의 리듀서들의 입력 스트림과 출력되는 출력 스트림은 표 4 내지 표 8과 같을 수 있다.The n-th reducer 342 may also operate in the same manner as the first reducer 341. When the inner join operation of Table 1 is performed using the first table 110 and the second table 120 of FIG. 1, the input stream and the output stream of the reducers of the second stage are shown in Tables 4 to 8 Can be the same.

입력input {(스마트 폰, 1), A, Yuna}
{(스마트 폰, 1), B, 스마트 폰 케이스}
{(스마트 폰, 1), B, 이어폰}
{(스마트 폰, 1), B, 충전 케이블}
{(Smartphone, 1), A, Yuna}
{(Smartphone, 1), B, smartphone case}
{(Smartphone, 1), B, earphone}
{(Smartphone, 1), B, charging cable}
출력Print {Yuna, 스마트 폰 케이스}
{Yuna, 이어폰}
{Yuna, 충전 케이블}
{Yuna, smartphone case}
{Yuna, Earphone}
{Yuna, charge cable}

입력input {(스마트 폰, 2), A, Swayne}
{(스마트 폰, 2), B, 스마트 폰 케이스}
{(스마트 폰, 2), B, 이어폰}
{(스마트 폰, 2), B, 충전 케이블}
{(Smartphone, 2), A, Swayne}
{(Smartphone, 2), B, smartphone case}
{(Smartphone, 2), B, earphone}
{(Smartphone, 2), B, charging cable}
출력Print {Swayne, 스마트 폰 케이스}
{Swayne, 이어폰}
{Swayne, 충전 케이블}
{Swayne, smartphone case}
{Swayne, Earphone}
{Swayne, charging cable}

입력input {(스마트 폰, 3), A, Grace}
{(스마트 폰, 3), B, 스마트 폰 케이스}
{(스마트 폰, 3), B, 이어폰}
{(스마트 폰, 3), B, 충전 케이블}
{(Smartphone, 3), A, Grace}
{(Smartphone, 3), B, smartphone case}
{(Smartphone, 3), B, earphone}
{(Smartphone, 3), B, charging cable}
출력Print {Grace, 스마트 폰 케이스}
{Grace, 이어폰}
{Grace, 충전 케이블}
{Grace, smartphone case}
{Grace, Earphone}
{Grace, charge cable}

입력input {(스마트 폰, 4), A, Jake}
{(스마트 폰, 4), B, 스마트 폰 케이스}
{(스마트 폰, 4), B, 이어폰}
{(스마트 폰, 4), B, 충전 케이블}
{(Smartphone, 4), A, Jake}
{(Smartphone, 4), B, smartphone case}
{(Smartphone, 4), B, earphone}
{(Smartphone, 4), B, charging cable}
출력Print {Jake, 스마트 폰 케이스}
{Jake, 이어폰}
{Jake, 충전 케이블}
{Jake, smartphone case}
{Jake, Earphone}
{Jake, Charging Cable}

입력input {(노트북, 1), A, Tiffany}
{(노트북, 1), B, 노트북 케이스}
{(노트북, 1), B, 배터리}
{(Notebook, 1), A, Tiffany}
{(Notebook, 1), B, notebook case}
{(Laptop, 1), B, battery}
출력Print {Tiffany, 노트북 케이스}
{Tiffany, 배터리}
{Tiffany, laptop case}
{Tiffany, Battery}

만약 제2 스테이지의 리듀서들의 수가 (조인키 필드의 값, 인덱스)의 종류 수, 예를 들어 5개, 이상인 경우 각각의 리듀서들은 하나의 (조인키 필드의 값, 인덱스)에 매핑될 수 있다. 이 경우, 각 리듀서들에서 표 4 내지 표 8의 동작이 수행할 수 있다.If the number of reducers in the second stage (the value of the join key field, the index) is more than the number of types, for example, five, the respective reducers can be mapped to one (value of the join key field, index). In this case, the operations of Tables 4 to 8 can be performed by the respective reducers.

만약 제2 스테이지의 리듀서들이 (조인키 필드의 값, 인덱스)의 종류 수, 예를 들어 5개, 미만인 경우 적어도 하나의 리듀서는 둘 이상의 (조인키 필드의 값, 인덱스)에 매핑될 수 있다. 이 경우, 해당 리듀서에서 표 4 내지 표 8 중 적어도 두 개의 동작이 함께 수행될 수 있다.At least one reducer may be mapped to more than one (value of join key field, index) if the number of types of reducers in the second stage (value of join key field, index) is less than 5, for example. In this case, at least two operations of Tables 4 to 8 may be performed in the corresponding reducer.

표 4 내지 표 8의 출력들을 합치면, 도 1의 제3 테이블(140)과 실질적으로 동일한 결과가 도출될 수 있다. 도 3에서, 리듀서의 동작을 결정하는 태그의 종류는 다양하게 변경될 수 있다. 리듀서의 동작을 결정하는 태그의 종류가 변경되면, 그에 맞게 매퍼가 처리하는 테이블들의 우선순위도 변경될 수 있다.When the outputs of Tables 4 to 8 are combined, substantially the same result as the third table 140 of FIG. 1 can be obtained. In Fig. 3, the type of the tag that determines the operation of the reducer may be variously changed. If the type of tag that determines the operation of the reducer is changed, the priority of the tables processed by the mapper can be changed accordingly.

도 4는 일 실시예에 따른 2-스테이지 분산 처리 시스템의 구성을 설명하는 도면이다. 도 4를 참조하면, 제1 스테이지는 3개의 매퍼들(411, 412, 413)과 4개의 리듀서들(421, 422, 423, 424)로 구성되고, 제2 스테이지는 2개의 매퍼들(431, 432)과 3개의 리듀서들(441, 442, 443)로 구성될 수 있다. 도 4에 도시된 각 매퍼들, 및 리듀서들은 네트워크에 분산된 컴퓨팅 노드들일 수 있다.4 is a view for explaining a configuration of a two-stage distributed processing system according to one embodiment. 4, the first stage is composed of three mappers 411, 412 and 413 and four reducers 421, 422, 423 and 424, and the second stage is composed of two mappers 431, 432 and three reducers 441, 442, 443. Each of the mapper, and reducers shown in FIG. 4 may be computing nodes distributed in a network.

제1 스테이지의 매퍼들(411, 412, 413) 각각은 프레임워크를 통하여 제1 스테이지의 리듀서들(421, 422, 423, 424)과 연결될 수 있다. 각 매퍼 또는 리듀서는 프레임워크에 현재 자신의 상태를 보고하고, 프레임워크는 각 매퍼 혹은 리듀서로부터 보고된 상태 정보를 종합하여 전체적인 작업(job)의 처리 진행 상태를 알 수 있다. 프레임워크는 제1 스테이지의 매퍼들(411, 412, 413) 각각의 출력을 제1 스테이지의 리듀서들(421, 422, 423, 424) 중 어느 하나로 전달할 수 있다. 예를 들어, 리듀서(421)와 리듀서(422)는 매퍼(431)과 연결되고, 리듀서(423)와 리듀서(424)는 매퍼(432)와 연결될 수 있다. 물론, 리듀서들(421, 422, 423, 424)과 매퍼들(431, 432) 사이의 연결 구조는 다양하게 변경될 수 있다.Each of the mappers 411, 412, and 413 of the first stage may be connected to the reducers 421, 422, 423, and 424 of the first stage through the framework. Each mapper or reducer reports its current state to the framework, and the framework can collect the state information reported from each mapper or reducer to know the progress of the overall job. The framework may communicate the output of each of the mappers 411, 412, 413 of the first stage to any one of the reducers 421, 422, 423, 424 of the first stage. For example, the reducer 421 and the reducer 422 may be connected to the mapper 431, and the reducer 423 and the reducer 424 may be connected to the mapper 432. Of course, the connection structure between the reducers 421, 422, 423, and 424 and the mappers 431 and 432 may be variously changed.

제2 스테이지의 매퍼들(431, 432) 각각은 제2 스테이지의 리듀서들(441, 442, 443)과 연결될 수 있다. 내부 조인 연산을 완료하기 위하여, 리듀서들(441, 442, 443)의 출력들은 최종 노드(도면 미도시)에서 수합될 수 있다. 도 4에 도시된 구조는 일 예시에 불과하며, 각 스테이지에 포함되는 노드들의 수, 노드들 사이의 연결 관계 등은 다양하게 변형될 수 있다.Each of the mappers 431 and 432 of the second stage can be connected to the reducers 441, 442 and 443 of the second stage. To complete the inner join operation, the outputs of the reducers 441, 442, 443 may be combined in the final node (not shown). The structure shown in FIG. 4 is merely an example, and the number of nodes included in each stage, the connection relationship between nodes, and the like can be variously modified.

도 5는 일 실시예에 따른 3-스테이지 분산 처리 시스템을 설명하는 도면이다. 도 5을 참조하면, 일 실시예에 따른 3-스테이지 분산 처리 시스템은 세 개의 스테이지들을 포함하고, 각각의 스테이지들에서 매핑 동작과 리듀싱 동작이 수행된다. 아래에서 상세히 설명하겠지만, 3-스테이지 분산 처리 시스템은 스큐드 태스크 문제와 메모리 문제를 해소할 수 있다.5 is a diagram illustrating a three-stage distributed processing system according to an embodiment. Referring to FIG. 5, a three-stage distributed processing system according to an embodiment includes three stages, and a mapping operation and a reducing operation are performed in each of the stages. As will be described in greater detail below, a three-stage distributed processing system can eliminate skewed task problems and memory problems.

제1 스테이지의 매퍼(510)는 3-스테이지 분산 처리 시스템의 제1 스테이지를 위한 매핑 동작을 수행한다. 매퍼(510)는 도 3의 제1 스테이지의 매퍼(310)와 동일하게 동작하므로, 보다 상세한 설명은 생략한다.The mapper 510 of the first stage performs a mapping operation for the first stage of the three-stage distributed processing system. The mapper 510 operates in the same manner as the mapper 310 of the first stage of FIG. 3, and thus a detailed description thereof will be omitted.

제1 스테이지의 제1 리듀서(521)는 3-스테이지 분산 처리 시스템의 제1 스테이지를 위한 리듀싱 동작을 수행한다. 제1 리듀서(521)는 {조인키 필드의 값, 태그, 레코드 필드의 값}을 포함하는 매핑 데이터를 수신한다. The first reducer 521 of the first stage performs a redundancy operation for the first stage of the three-stage distributed processing system. The first reducer 521 receives the mapping data including {the value of the join key field, the tag, and the value of the record field}.

제1 리듀서(521)는 매핑 데이터가 수신되면, 매핑 데이터의 태그를 확인할 수 있다. 매핑 데이터의 태그가 A인 경우, 제1 리듀서(521)는 도 3의 제1 스테이지의 제1 리듀서(321)와 동일하게 동작하므로, 보다 상세한 설명은 생략한다.The first reducer 521 can confirm the tag of the mapping data when the mapping data is received. When the tag of the mapping data is A, the first reducer 521 operates in the same manner as the first reducer 321 of the first stage of FIG. 3, so that detailed description is omitted.

매핑 데이터의 태그가 B인 경우, 제1 리듀서(521)는 {조인키 필드의 값, 최대 인덱스, 태그, 레코드 필드의 값}을 출력한다. 여기서, 조인키 필드의 값, 태그, 및 레코드 필드의 값은 수신된 매핑 데이터에 포함된 값들이다. 제1 리듀서(521)는 조인키 필드의 값에 대응하여 기존에 설정된 인덱스를 이용하여 최대 인덱스를 설정할 수 있다. 예를 들어, 스마트 폰에 대응하여 기존에 설정된 인덱스가 4인 경우, 제1 리듀서(321)는 최대 인덱스를 4로 설정할 수 있다. 기존에 설정된 인덱스는 동일한 조인키 필드의 값을 가지고 태그가 A인 직전 매핑 데이터를 처리할 때 설정된 인덱스일 수 있다.When the tag of the mapping data is B, the first reducer 521 outputs {the value of the join key field, the maximum index, the value of the tag, and the record field}. Here, the value of the join key field, the value of the tag, and the value of the record field are values included in the received mapping data. The first reducer 521 can set the maximum index using the index set in advance corresponding to the value of the join key field. For example, in a case where the previously set index corresponding to the smartphone is 4, the first reducer 321 can set the maximum index to 4. [ The previously set index may be the index set when processing the immediately preceding mapping data having the value of the same join key field and the tag A.

매핑 데이터의 태그가 B인 경우 도 3의 제1 리듀서(321)는 반복적으로 {조인키 필드의 값, 제2 인덱스, 태그, 레코드 필드의 값}을 출력하는 것과 달리, 제1 리듀서(521)는 {조인키 필드의 값, 최대 인덱스, 태그, 레코드 필드의 값}만을 출력한다. 이로 인하여, 스큐드 태스크 문제가 해소될 수 있다.When the tag of the mapping data is B, the first reducer 321 of FIG. 3 repeatedly outputs {the value of the join key field, the second index, the tag, the record field} (The value of the join key field, the maximum index, the value of the tag, and the record field}}. As a result, the skewed task problem can be solved.

도 1의 제1 테이블(110)과 제2 테이블(120)을 이용하여 표 1의 내부 조인 연산이 수행되는 경우, 제1 리듀서(521)에 입력되는 입력 스트림과 제1 리듀서(521)에 의하여 출력되는 출력 스트림은 표 9와 같을 수 있다.When the inner joining operation of Table 1 is performed using the first table 110 and the second table 120 of FIG. 1, the input stream to be input to the first reducer 521 and the first input signal to the first reducer 521 The output stream to be output may be as shown in Table 9.

입력input {스마트 폰, A, Yuna}
{스마트 폰, A, Swayne}
{스마트 폰, A, Grace}
{스마트 폰, A, Jake}
{스마트 폰, B, 스마트 폰 케이스}
{스마트 폰, B, 이어폰}
{스마트 폰, B, 충전 케이블}
{Smartphone, A, Yuna}
{Smartphone, A, Swayne}
{Smartphone, A, Grace}
{Smartphone, A, Jake}
{Smartphone, B, smartphone case}
{Smartphone, B, earphone}
{Smartphone, B, Charging Cable}
출력Print {스마트 폰, 1, A, Yuna}
{스마트 폰, 2, A, Swayne}
{스마트 폰, 3, A, Grace}
{스마트 폰, 4, A, Jake}
{스마트 폰, 4, B, 스마트 폰 케이스}
{스마트 폰, 4, B, 이어폰}
{스마트 폰, 4, B, 충전 케이블}
{Smartphone, 1, A, Yuna}
{Smartphone, 2, A, Swayne}
{Smartphone, 3, A, Grace}
{Smartphone, 4, A, Jake}
{Smartphone, 4, B, smartphone case}
{Smartphone, 4, B, earphone}
{Smartphone, 4, B, charging cable}

제n 리듀서(522)도 제1 리듀서(521)과 동일한 방식으로 동작할 수 있다. 예를 들어, 도 1의 제1 테이블(110)과 제2 테이블(120)을 이용하여 표 1의 내부 조인 연산이 수행되는 경우, 제n 리듀서(522)에 입력되는 입력 스트림과 제n 리듀서(522)에 의하여 출력되는 출력 스트림은 표 10과 같을 수 있다.The n-th reducer 522 may also operate in the same manner as the first reducer 521. For example, when the inner join operation of Table 1 is performed using the first table 110 and the second table 120 of FIG. 1, the input stream to be input to the n-th reducer 522 and the n-th reducer 522 may be as shown in Table 10. < tb > < TABLE >

입력input {노트북, A, Tiffany}
{노트북, B, 노트북 케이스}
{노트북, B, 배터리}
{Laptop, A, Tiffany}
{Laptop, B, Laptop Case}
{Laptop, B, Battery}
출력Print {노트북, 1, A, Tiffany}
{노트북, 1, B, 노트북 케이스}
{노트북, 1, B, 배터리}
{Laptop, 1, A, Tiffany}
{Laptop, 1, B, Laptop Case}
{Laptop, 1, B, Battery}

제2 스테이지의 매퍼(530)는 3-스테이지 분산 처리 시스템의 제2 스테이지를 위한 매핑 동작을 수행한다. 매퍼(510)와 유사하게, 매퍼(530)도 복수의 매퍼들로 구성될 수 있다. 매퍼(530)는 {조인키 필드의 값, 인덱스, 태그, 레코드 필드의 값}을 포함하는 리듀싱 데이터를 수신한다.The mapper 530 of the second stage performs a mapping operation for the second stage of the three-stage distributed processing system. Similar to the mapper 510, the mapper 530 may also be composed of a plurality of mappers. The mapper 530 receives the redundancy data including {the value of the join key field, the index, the tag, and the value of the record field}.

매퍼(530)는 리듀싱 데이터가 수신되면, 수신된 리듀싱 데이터를 미리 정해진 포맷의 매핑 데이터로 재구성한 뒤, 매핑 데이터를 출력한다. 예를 들어, 매퍼(530)는 {(조인키 필드의 값, 레코드 필드의 값), 태그, 인덱스}를 포함하는 매핑 데이터를 생성하고, 생성된 매핑 데이터를 출력할 수 있다. 여기서, 조인키 필드의 값, 레코드 필드의 값, 태그, 및 인덱스는 수신된 리듀싱 데이터에 포함된 값들이다.When the redundancy data is received, the mapper 530 reconstructs the received redundancy data into mapping data of a predetermined format, and outputs the mapping data. For example, the mapper 530 may generate mapping data including {(value of join key field, value of record field), tag, index}, and output the generated mapping data. Here, the value of the join key field, the value of the record field, the tag, and the index are the values included in the received redundancy data.

프레임워크는 제3 파티션 키를 이용하여 매핑 데이터를 처리할 리듀서를 결정할 수 있다. 제3 파티션 키는 조인키 필드와 미리 정해진 유형의 추가 필드로 설정될 수 있다. 이하, 설명의 편의를 위하여 미리 정해진 유형의 추가 필드가 레코드 필드로 설정되는 경우를 설명하나, 실시예들에 따른 미리 정해진 유형의 추가 필드는 조인키 필드와 구별되는 파라미터로, 레코드 필드, 랜덤 파라미터 등 다양한 방식으로 설정될 수 있다.The framework may use the third partitioning key to determine a reducer to process the mapping data. The third partitioning key may be set to a join key field and an additional field of a predetermined type. Hereinafter, a case where an additional field of a predetermined type is set as a record field will be described for convenience of explanation, but an additional field of a predetermined type according to embodiments is a parameter that is distinguished from a join key field, And the like.

프레임워크는 조인키 필드의 값과 레코드 필드의 값의 조합에 기초하여, 리듀서를 결정할 수 있다. 예를 들어, 프레임워크는 동일한 (조인키 필드의 값, 레코드 필드의 값)을 포함하는 출력 값이 동일한 리듀서에서 처리되도록, (조인키 필드의 값, 레코드 필드의 값)과 리듀서를 매핑할 수 있다.The framework can determine the reducer based on a combination of the value of the join key field and the value of the record field. For example, the framework can map the reducer to the value of the join key field (the value of the join key field, the value of the record field) so that the output value containing the same (the value of the join key field and the value of the record field) have.

제2 스테이지의 제1 리듀서(541)는 3-스테이지 분산 처리 시스템의 제2 스테이지를 위한 리듀싱 동작을 수행한다. 제1 리듀서(541)는 {(조인키 필드의 값, 레코드 필드의 값), 태그, 인덱스}를 수신한다.The first reducer 541 of the second stage performs a reducing operation for the second stage of the three-stage distributed processing system. The first reducer 541 receives {(value of join key field, value of record field), tag, index}.

제1 리듀서(541)는 매핑 데이터가 수신되면, 매핑 데이터의 태그를 확인할 수 있다. 매핑 데이터의 태그가 A인 경우, 제1 리듀서(541)는 {조인키 필드의 값, 레코드 필드의 값, 태그, 인덱스}를 출력한다. 여기서, 조인키 필드의 값, 레코드 필드의 값, 태그, 및 인덱스는 수신된 매핑 데이터의 값들일 수 있다.The first reducer 541 can confirm the tag of the mapping data when the mapping data is received. When the tag of the mapping data is A, the first reducer 541 outputs {the value of the join key field, the value of the record field, the tag, the index}. Here, the value of the join key field, the value of the record field, the tag, and the index may be the values of the received mapping data.

매핑 데이터의 태그가 B인 경우, 제1 리듀서(541)는 {조인키 필드의 값, 레코드 필드의 값, 태그, 제3 인덱스}를 반복적으로 출력한다. 여기서, 조인키 필드의 값, 태그, 및 레코드 필드의 값은 수신된 매핑 데이터에 포함된 값들이다. 제3 인덱스는 초기 인덱스부터 수신된 매핑 데이터의 인덱스까지 순차적으로 증가하는 인덱스이다.When the tag of the mapping data is B, the first reducer 541 repeatedly outputs {the value of the join key field, the value of the record field, the tag, the third index}. Here, the value of the join key field, the value of the tag, and the value of the record field are values included in the received mapping data. The third index is an index sequentially increasing from the initial index to the index of the received mapping data.

제 n 리듀서(542)도 제1 리듀서(541)과 동일한 방식으로 동작할 수 있다. 도 1의 제1 테이블(110)과 제2 테이블(120)을 이용하여 표 1의 내부 조인 연산이 수행되는 경우, 제2 스테이지의 리듀서들의 입력 스트림과 출력되는 출력 스트림은 표 11 내지 표 20과 같을 수 있다.The n-th reducer 542 may also operate in the same manner as the first reducer 541. When the inner join operation of Table 1 is performed using the first table 110 and the second table 120 of FIG. 1, the input stream and the output stream of the reducers of the second stage are shown in Tables 11 to 20 Can be the same.

입력input {(스마트 폰, Yuna), A, 1}{(Smartphone, Yuna), A, 1} 출력Print {스마트 폰, Yuna, A, 1}{Smartphone, Yuna, A, 1}

입력input {(스마트 폰, Swayne), A, 2}{(Smartphone, Swayne), A, 2} 출력Print {스마트 폰, Swayne, A, 2}{Smartphone, Swayne, A, 2}

입력input {(스마트 폰, Grace), A, 3}{(Smartphone, Grace), A, 3} 출력Print {스마트 폰, Grace, A, 3}{Smartphone, Grace, A, 3}

입력input {(스마트 폰, Jake), A, 4}{(Smartphone, Jake), A, 4} 출력Print {스마트 폰, Jake, A, 4}{Smartphone, Jake, A, 4}

입력input {(스마트 폰, 스마트 폰 케이스), B, 4}{(Smartphone, smartphone case), B, 4} 출력Print {스마트 폰, 스마트 폰 케이스, B, 1}
{스마트 폰, 스마트 폰 케이스, B, 2}
{스마트 폰, 스마트 폰 케이스, B, 3}
{스마트 폰, 스마트 폰 케이스, B, 4}
{Smartphone, smartphone case, B, 1}
{Smartphone, smartphone case, B, 2}
{Smartphone, smartphone case, B, 3}
{Smartphone, smartphone case, B, 4}

입력input {(스마트 폰, 이어폰), B, 4}{(Smartphone, earphone), B, 4} 출력Print {스마트 폰, 이어폰, B, 1}
{스마트 폰, 이어폰, B, 2}
{스마트 폰, 이어폰, B, 3}
{스마트 폰, 이어폰, B, 4}
{Smartphone, earphone, B, 1}
{Smartphone, earphone, B, 2}
{Smartphone, earphone, B, 3}
{Smartphone, earphone, B, 4}

입력input {(스마트 폰, 충전 케이블), B, 4}{(Smartphone, charge cable), B, 4} 출력Print {스마트 폰, 충전 케이블, B, 1}
{스마트 폰, 충전 케이블, B, 2}
{스마트 폰, 충전 케이블, B, 3}
{스마트 폰, 충전 케이블, B, 4}
{Smartphone, charging cable, B, 1}
{Smartphone, charging cable, B, 2}
{Smartphone, charge cable, B, 3}
{Smartphone, charge cable, B, 4}

입력input {(노트북, Tiffany), A, 1}{(Notebook, Tiffany), A, 1} 출력Print {노트북, Tiffany, A, 1}{Laptop, Tiffany, A, 1}

입력input {(노트북, 노트북 케이스), B, 1}{(Notebook, notebook case), B, 1} 출력Print {노트북, 노트북 케이스, B, 1}{Laptop, Notebook Case, B, 1}

입력input {(노트북, 배터리), B, 1}{(Laptop, battery), B, 1} 출력Print {노트북, 배터리, B, 1}{Laptop, Battery, B, 1}

만약 제2 스테이지의 리듀서들의 수가 (조인키 필드의 값, 인덱스)의 종류 수, 예를 들어 10개, 이상인 경우 각각의 리듀서들은 하나의 (조인키 필드의 값, 인덱스)에 매핑될 수 있다. 이 경우, 각 리듀서들에서 표 11 내지 표 20의 동작이 수행할 수 있다.If the number of reducers in the second stage (the value of the join key field, the index) is more than the number of types, for example ten or more, each reducer may be mapped to one (value of the join key field, index). In this case, the operations of Tables 11 to 20 can be performed in each of the reducers.

만약 제2 스테이지의 리듀서들이 (조인키 필드의 값, 인덱스)의 종류 수, 예를 들어 10개, 미만인 경우 적어도 하나의 리듀서는 둘 이상의 (조인키 필드의 값, 인덱스)에 매핑될 수 있다. 이 경우, 해당 리듀서에서 표 11 내지 표 20 중 적어도 두 개의 동작이 함께 수행될 수 있다.At least one reducer may be mapped to more than one (value of join key field, index) if the number of reducers of the second stage (value of join key field, index) is less than 10, for example. In this case, at least two of Table 11 to Table 20 may be performed in the corresponding reducer.

제3 스테이지의 매퍼(550)는 3-스테이지 분산 처리 시스템의 제3 스테이지를 위한 매핑 동작을 수행한다. 매퍼(550)는 도 3의 제2 스테이지의 매퍼(330)와 동일하게 동작하므로, 보다 상세한 설명은 생략한다.The mapper 550 of the third stage performs a mapping operation for the third stage of the three-stage distributed processing system. The mapper 550 operates in the same manner as the mapper 330 of the second stage of FIG. 3, so that detailed description is omitted.

제3 스테이지의 리듀서들(561, 562)은 3-스테이지 분산 처리 시스템의 제3 스테이지를 위한 리듀싱 동작을 수행한다. 리듀서들(561, 562)은 도 3의 제2 스테이지의 리듀서들(341, 342)와 동일하게 동작하므로, 보다 상세한 설명은 생략한다.The reducers 561 and 562 of the third stage perform a reducing operation for the third stage of the three-stage distributed processing system. The reducers 561 and 562 operate in the same manner as the reducers 341 and 342 in the second stage of FIG. 3, and thus a detailed description thereof will be omitted.

도 6는 일 실시예에 따른 3-스테이지 분산 처리 시스템의 구성을 설명하는 도면이다. 도 6를 참조하면, 제1 스테이지는 3개의 매퍼들(611, 612, 613)과 4개의 리듀서들(621, 622, 623, 624)로 구성되고, 제2 스테이지는 2개의 매퍼들(631, 632)과 3개의 리듀서들(641, 642, 643)로 구성되며, 제3 스테이지는 3개의 매퍼들(651, 652, 653)과 2개의 리듀서들(661, 662)로 구성될 수 있다. 도 6에 도시된 각 매퍼들, 및 리듀서들은 네트워크에 분산된 컴퓨팅 노드들일 수 있다.6 is a view for explaining a configuration of a three-stage distributed processing system according to an embodiment. 6, the first stage is composed of three mappers 611, 612 and 613 and four reducers 621, 622, 623 and 624, and the second stage is composed of two mappers 631, 632 and three reducers 641, 642 and 643 and the third stage may consist of three mappers 651, 652 and 653 and two reducers 661 and 662. Each mapper, shown in FIG. 6, and reducers may be computing nodes distributed across the network.

도 6에 도시된 각 노드들에는 도 4를 참조하여 전술한 사항들이 그대로 적용될 수 있으므로, 보다 상세한 설명은 생략한다. 내부 조인 연산을 완료하기 위하여, 리듀서들(661, 662)의 출력들은 최종 노드(도면 미도시)에서 수합될 수 있다. 도 6에 도시된 구조는 일 예시에 불과하며, 각 스테이지에 포함되는 노드들의 수, 노드들 사이의 연결 관계 등은 다양하게 변형될 수 있다.4 may be directly applied to each node shown in FIG. 6, and thus a detailed description thereof will be omitted. To complete the inner join operation, the outputs of the reducers 661 and 662 may be combined in the final node (not shown). The structure shown in FIG. 6 is merely an example, and the number of nodes included in each stage, the connection relationship between nodes, and the like can be variously modified.

도 7은 일 실시예에 따른 매핑 방법을 도시한 동작 흐름도이다. 도 7을 참조하면, 일 실시예에 따른 매핑 방법은 테이블 데이터 또는 리듀싱 데이터를 수신하는 단계(710), 및 매핑 데이터를 출력하는 단계(720)를 포함한다. 단계(720)에서 실시예들의 각 스테이지에 따라 리듀싱 데이터가 처리될 수 있다.7 is a flowchart illustrating a mapping method according to an embodiment. Referring to FIG. 7, a mapping method according to an embodiment includes receiving (710) table data or reducing data, and outputting (720) mapping data. At step 720, the reducing data may be processed according to each stage of the embodiments.

도 8은 일 실시예에 따른 리듀싱 방법을 도시한 동작 흐름도이다. 도 8을 참조하면, 일 실시예에 따른 리듀싱 방법은 매핑 데이터를 수신하는 단계(810), 및 매핑 데이터에 포함된 태그에 따라 매핑 데이터를 처리하는 단계(820)를 포함한다. 단계(820)에서 실시예들의 각 스테이지에 따라 매핑 데이터가 처리될 수 있다.FIG. 8 is a flow chart illustrating a method of reducing the amount of power in accordance with one embodiment. Referring to FIG. 8, a method for reducing data according to an exemplary embodiment includes receiving (810) mapping data, and processing (820) mapping data according to a tag included in the mapping data. In step 820, the mapping data may be processed according to each stage of the embodiments.

도 7 및 도 8에 도시된 각 단계들에는 도 1 내지 도 6을 통하여 전술한 사항들이 그대로 적용될 수 있으므로, 보다 상세한 설명은 생략한다.7 and 8 may be applied to the steps described above with reference to FIGS. 1 to 6, so that a detailed description thereof will be omitted.

이상에서 설명된 실시예들은 하드웨어 구성요소, 소프트웨어 구성요소, 및/또는 하드웨어 구성요소 및 소프트웨어 구성요소의 조합으로 구현될 수 있다. 예를 들어, 실시예들에서 설명된 장치, 방법 및 구성요소는, 예를 들어, 프로세서, 콘트롤러, ALU(arithmetic logic unit), 디지털 신호 프로세서(digital signal processor), 마이크로컴퓨터, FPGA(field programmable gate array), PLU(programmable logic unit), 마이크로프로세서, 또는 명령(instruction)을 실행하고 응답할 수 있는 다른 어떠한 장치와 같이, 하나 이상의 범용 컴퓨터 또는 특수 목적 컴퓨터를 이용하여 구현될 수 있다. 처리 장치는 운영 체제(OS) 및 상기 운영 체제 상에서 수행되는 하나 이상의 소프트웨어 애플리케이션을 수행할 수 있다. 또한, 처리 장치는 소프트웨어의 실행에 응답하여, 데이터를 접근, 저장, 조작, 처리 및 생성할 수도 있다. 이해의 편의를 위하여, 처리 장치는 하나가 사용되는 것으로 설명된 경우도 있지만, 해당 기술분야에서 통상의 지식을 가진 자는, 처리 장치가 복수 개의 처리 요소(processing element) 및/또는 복수 유형의 처리 요소를 포함할 수 있음을 알 수 있다. 예를 들어, 처리 장치는 복수 개의 프로세서 또는 하나의 프로세서 및 하나의 콘트롤러를 포함할 수 있다. 또한, 병렬 프로세서(parallel processor)와 같은, 다른 처리 구성(processing configuration)도 가능하다.The embodiments described above may be implemented in hardware components, software components, and / or a combination of hardware components and software components. For example, the devices, methods, and components described in the embodiments may be implemented within a computer system, such as, for example, a processor, a controller, an arithmetic logic unit (ALU), a digital signal processor, such as an array, a programmable logic unit (PLU), a microprocessor, or any other device capable of executing and responding to instructions. The processing device may execute an operating system (OS) and one or more software applications running on the operating system. The processing device may also access, store, manipulate, process, and generate data in response to execution of the software. For ease of understanding, the processing apparatus may be described as being used singly, but those skilled in the art will recognize that the processing apparatus may have a plurality of processing elements and / As shown in FIG. For example, the processing unit may comprise a plurality of processors or one processor and one controller. Other processing configurations are also possible, such as a parallel processor.

소프트웨어는 컴퓨터 프로그램(computer program), 코드(code), 명령(instruction), 또는 이들 중 하나 이상의 조합을 포함할 수 있으며, 원하는 대로 동작하도록 처리 장치를 구성하거나 독립적으로 또는 결합적으로(collectively) 처리 장치를 명령할 수 있다. 소프트웨어 및/또는 데이터는, 처리 장치에 의하여 해석되거나 처리 장치에 명령 또는 데이터를 제공하기 위하여, 어떤 유형의 기계, 구성요소(component), 물리적 장치, 가상 장치(virtual equipment), 컴퓨터 저장 매체 또는 장치, 또는 전송되는 신호 파(signal wave)에 영구적으로, 또는 일시적으로 구체화(embody)될 수 있다. 소프트웨어는 네트워크로 연결된 컴퓨터 시스템 상에 분산되어서, 분산된 방법으로 저장되거나 실행될 수도 있다. 소프트웨어 및 데이터는 하나 이상의 컴퓨터 판독 가능 기록 매체에 저장될 수 있다.The software may include a computer program, code, instructions, or a combination of one or more of the foregoing, and may be configured to configure the processing device to operate as desired or to process it collectively or collectively Device can be commanded. The software and / or data may be in the form of any type of machine, component, physical device, virtual equipment, computer storage media, or device , Or may be permanently or temporarily embodied in a transmitted signal wave. The software may be distributed over a networked computer system and stored or executed in a distributed manner. The software and data may be stored on one or more computer readable recording media.

실시예에 따른 방법은 다양한 컴퓨터 수단을 통하여 수행될 수 있는 프로그램 명령 형태로 구현되어 컴퓨터 판독 가능 매체에 기록될 수 있다. 상기 컴퓨터 판독 가능 매체는 프로그램 명령, 데이터 파일, 데이터 구조 등을 단독으로 또는 조합하여 포함할 수 있다. 상기 매체에 기록되는 프로그램 명령은 실시예를 위하여 특별히 설계되고 구성된 것들이거나 컴퓨터 소프트웨어 당업자에게 공지되어 사용 가능한 것일 수도 있다. 컴퓨터 판독 가능 기록 매체의 예에는 하드 디스크, 플로피 디스크 및 자기 테이프와 같은 자기 매체(magnetic media), CD-ROM, DVD와 같은 광기록 매체(optical media), 플롭티컬 디스크(floptical disk)와 같은 자기-광 매체(magneto-optical media), 및 롬(ROM), 램(RAM), 플래시 메모리 등과 같은 프로그램 명령을 저장하고 수행하도록 특별히 구성된 하드웨어 장치가 포함된다. 프로그램 명령의 예에는 컴파일러에 의해 만들어지는 것과 같은 기계어 코드뿐만 아니라 인터프리터 등을 사용해서 컴퓨터에 의해서 실행될 수 있는 고급 언어 코드를 포함한다. 상기된 하드웨어 장치는 실시예의 동작을 수행하기 위해 하나 이상의 소프트웨어 모듈로서 작동하도록 구성될 수 있으며, 그 역도 마찬가지이다.The method according to an embodiment may be implemented in the form of a program command that can be executed through various computer means and recorded in a computer-readable medium. The computer-readable medium may include program instructions, data files, data structures, and the like, alone or in combination. The program instructions to be recorded on the medium may be those specially designed and configured for the embodiments or may be available to those skilled in the art of computer software. Examples of computer-readable media include magnetic media such as hard disks, floppy disks and magnetic tape; optical media such as CD-ROMs and DVDs; magnetic media such as floppy disks; Magneto-optical media, and hardware devices specifically configured to store and execute program instructions such as ROM, RAM, flash memory, and the like. Examples of program instructions include machine language code such as those produced by a compiler, as well as high-level language code that can be executed by a computer using an interpreter or the like. The hardware devices described above may be configured to operate as one or more software modules to perform the operations of the embodiments, and vice versa.

이상과 같이 비록 한정된 도면에 의해 실시예들이 설명되었으나, 해당 기술분야에서 통상의 지식을 가진 자라면 상기의 기재로부터 다양한 수정 및 변형이 가능하다. 예를 들어, 설명된 기술들이 설명된 방법과 다른 순서로 수행되거나, 및/또는 설명된 시스템, 구조, 장치, 회로 등의 구성요소들이 설명된 방법과 다른 형태로 결합 또는 조합되거나, 다른 구성요소 또는 균등물에 의하여 대치되거나 치환되더라도 적절한 결과가 달성될 수 있다. 그러므로, 다른 구현들, 다른 실시예들 및 특허청구범위와 균등한 것들도 후술하는 특허청구범위의 범위에 속한다.
Although the preferred embodiments of the present invention have been disclosed for illustrative purposes, those skilled in the art will appreciate that various modifications, additions and substitutions are possible, without departing from the scope and spirit of the invention as disclosed in the accompanying claims. For example, it is to be understood that the techniques described may be performed in a different order than the described methods, and / or that components of the described systems, structures, devices, circuits, Lt; / RTI > or equivalents, even if it is replaced or replaced. Therefore, other implementations, other embodiments, and equivalents to the claims are also within the scope of the following claims.

Claims (12)

삭제delete 조인 연산을 위한 조인키 필드의 값, 상기 조인 연산을 위한 테이블들 중 어느 하나를 지시하는 태그, 및 상기 조인 연산을 위한 레코드 필드의 값을 포함하는 매핑 데이터를 수신하는 단계;
상기 태그가 미리 정해진 제1 테이블을 지시하는 경우,
상기 조인키 필드의 값, 상기 조인키 필드의 값에 대응하여 상기 제1 테이블에 대응하는 매핑 데이터의 누적 개수를 지시하는 제1 인덱스, 상기 태그, 및 상기 레코드 필드의 값을 출력하는 단계; 및
상기 태그가 상기 제1 테이블과 다른 테이블을 지시하는 경우,
상기 조인키 필드의 값, 상기 조인키 필드의 값에 대응하여 상기 제1 테이블에 대응하는 매핑 데이터의 최종 누적 개수를 지시하는 최대 인덱스, 상기 태그, 및 상기 레코드 필드의 값을 출력하는 단계
를 포함하는, 조인 연산을 위한 리듀싱 방법.
Receiving mapping data including a value of a join key field for a join operation, a tag indicating one of the tables for the join operation, and a value of a record field for the join operation;
If the tag indicates a predetermined first table,
Outputting values of a first index, a tag, and a record field indicating a cumulative number of mapping data corresponding to the first table corresponding to a value of the join key field and a value of the join key field; And
When the tag indicates a table different from the first table,
Outputting a value of the join field, a maximum index indicating a final cumulative number of mapping data corresponding to the first table corresponding to the value of the join key field, a value of the tag, and a record field
/ RTI > for a join operation.
제2항에 있어서,
상기 태그가 상기 제1 테이블을 지시하는 경우,
상기 출력된 제1 인덱스를 저장하는 단계; 및
상기 매핑 데이터가 새로운 조인키 필드의 값을 가지는 매핑 데이터인지 여부에 기초하여 상기 제1 인덱스를 설정하는 단계
를 더 포함하고,
상기 설정하는 단계는
상기 매핑 데이터가 새로운 조인키 필드의 값을 가지는 매핑 데이터인 경우, 상기 제1 인덱스를 초기 인덱스로 설정하는 단계; 및
상기 매핑 데이터가 새로운 조인키 필드의 값을 가지는 매핑 데이터가 아닌 경우, 기존에 설정된 인덱스에 기초하여 상기 제1 인덱스를 설정하는 단계
를 포함하는, 조인 연산을 위한 리듀싱 방법.
3. The method of claim 2,
If the tag indicates the first table,
Storing the output first index; And
Setting the first index based on whether the mapping data is mapping data having a value of a new join key field
Further comprising:
The setting step
Setting the first index as an initial index if the mapping data is mapping data having a value of a new join key field; And
Setting the first index based on a previously set index if the mapping data is not mapped data having a value of a new join key field
/ RTI > for a join operation.
제2항에 있어서,
상기 태그가 상기 제1 테이블과 다른 테이블을 지시하는 경우,
상기 조인키 필드의 값에 대응하여 기존에 설정된 인덱스에 기초하여 상기 최대 인덱스를 설정하는 단계
를 더 포함하는, 조인 연산을 위한 리듀싱 방법.
3. The method of claim 2,
When the tag indicates a table different from the first table,
Setting the maximum index based on a previously set index corresponding to the value of the join key field
Further comprising the steps of:
제2항에 있어서,
상기 매핑 데이터를 출력하는 매퍼는
상기 제1 테이블을 지시하는 태그를 포함하는 적어도 하나의 매핑 데이터를 출력한 뒤, 상기 제1 테이블과 다른 테이블을 지시하는 태그를 포함하는 적어도 하나의 매핑 데이터를 출력하는, 조인 연산을 위한 리듀싱 방법.
3. The method of claim 2,
The mapper outputting the mapping data
Outputting at least one mapping data including a tag indicating the first table and outputting at least one mapping data including a tag indicating a table different from the first table, Way.
제5항에 있어서,
상기 매퍼는
상기 테이블들에 관한 제1 정보, 상기 조인키 필드에 관한 제2 정보, 및 상기 레코드 필드에 관한 제3 정보를 포함하는 쿼리 명령에 기초하여, 상기 매핑 데이터를 출력하는, 조인 연산을 위한 리듀싱 방법.
6. The method of claim 5,
The mapper
Outputting the mapping data based on a query command including first information on the tables, second information on the join key field, and third information on the record field, Way.
조인 연산을 위한 조인키 필드의 값, 인덱스, 상기 조인 연산을 위한 테이블들 중 어느 하나를 지시하는 태그, 및 상기 조인 연산을 위한 레코드 필드의 값을 포함하는 리듀싱 데이터를 수신하는 단계; 및
상기 조인키 필드의 값, 상기 레코드 필드의 값, 상기 태그, 및 상기 인덱스를 포함하는 매핑 데이터를 출력하는 단계
를 포함하고,
상기 매핑 데이터는 상기 조인키 필드의 값 및 미리 정해진 유형의 추가 필드의 값의 조합에 기초하여 결정된 리듀서로 전송되며,
상기 리듀싱 데이터에 포함된 인덱스는
상기 태그가 미리 정해진 제1 테이블을 지시하는 경우 상기 조인키 필드의 값에 대응하여 상기 제1 테이블에 대응하는 매핑 데이터의 누적 개수를 지시하는 제1 인덱스를 포함하고, 상기 태그가 상기 제1 테이블과 다른 테이블을 지시하는 경우 상기 조인키 필드의 값에 대응하여 상기 제1 테이블에 대응하는 매핑 데이터의 최종 누적 개수를 지시하는 최대 인덱스를 포함하는, 조인 연산을 위한 매핑 방법.
Receiving redundancy data including a value of a join key field for a join operation, an index, a tag indicating one of the tables for the join operation, and a value of a record field for the join operation; And
Outputting the mapping data including the value of the join key field, the value of the record field, the tag, and the index
Lt; / RTI >
Wherein the mapping data is transmitted to a reducer determined based on a combination of a value of the join key field and a value of an additional field of a predetermined type,
The index included in the redundancy data is
And a first index indicating an accumulated number of mapping data corresponding to the first table corresponding to a value of the join key field when the tag indicates a predetermined first table, And a maximum index indicating a final cumulative number of the mapping data corresponding to the first table corresponding to the value of the join key field when indicating another table.
제7항에 있어서,
상기 미리 정해진 유형의 추가 필드의 값은
상기 레코드 필드의 값; 및
랜덤 파라미터의 값
중 적어도 하나를 포함하는, 조인 연산을 위한 매핑 방법.
8. The method of claim 7,
The value of the additional field of the predetermined type
A value of the record field; And
The value of the random parameter
/ RTI > for a join operation.
조인 연산을 위한 조인키 필드의 값, 상기 조인 연산을 위한 레코드 필드의 값, 상기 조인 연산을 위한 테이블들 중 어느 하나를 지시하는 태그, 및 인덱스를 포함하는 매핑 데이터를 수신하는 단계;
상기 태그가 미리 정해진 제1 테이블을 지시하는 경우,
상기 조인키 필드의 값, 상기 레코드 필드의 값, 상기 태그, 및 상기 인덱스를 출력하는 단계; 및
상기 태그가 상기 제1 테이블과 다른 테이블을 지시하는 경우,
상기 조인키 필드의 값, 상기 레코드 필드의 값, 상기 태그, 및 초기 인덱스로부터 상기 인덱스까지 순차적으로 증가하는 인덱스를 반복적으로 출력하는 단계
를 포함하고,
상기 매핑 데이터에 포함된 인덱스는
상기 태그가 미리 정해진 제1 테이블을 지시하는 경우 상기 조인키 필드의 값에 대응하여 상기 제1 테이블에 대응하는 매핑 데이터의 누적 개수를 지시하는 제1 인덱스를 포함하고, 상기 태그가 상기 제1 테이블과 다른 테이블을 지시하는 경우 상기 조인키 필드의 값에 대응하여 상기 제1 테이블에 대응하는 매핑 데이터의 최종 누적 개수를 지시하는 최대 인덱스를 포함하는, 조인 연산을 위한 리듀싱 방법.
Receiving mapping data including a value of a join key field for a join operation, a value of a record field for the join operation, a tag indicating any one of the tables for the join operation, and an index;
If the tag indicates a predetermined first table,
Outputting a value of the join key field, a value of the record field, the tag, and the index; And
When the tag indicates a table different from the first table,
Repeatedly outputting indexes sequentially increasing from the value of the join key field, the value of the record field, the tag, and the initial index to the index
Lt; / RTI >
The index included in the mapping data is
And a first index indicating an accumulated number of mapping data corresponding to the first table corresponding to a value of the join key field when the tag indicates a predetermined first table, And a maximum index indicating a final cumulative number of mapping data corresponding to the first table corresponding to the value of the join key field when indicating a different table.
조인 연산을 위한 조인키 필드의 값, 인덱스, 상기 조인 연산을 위한 테이블들 중 어느 하나를 지시하는 태그, 및 상기 조인 연산을 위한 레코드 필드의 값을 포함하는 리듀싱 데이터를 수신하는 단계; 및
상기 조인키 필드의 값, 상기 인덱스, 상기 태그, 및 상기 레코드 필드의 값을 포함하는 매핑 데이터를 출력하는 단계
를 포함하고,
상기 매핑 데이터는 상기 조인키 필드의 값 및 상기 인덱스의 조합에 기초하여 결정된 리듀서로 전송되며,
상기 리듀싱 데이터에 포함된 인덱스는
상기 태그가 미리 정해진 제1 테이블을 지시하는 경우 상기 조인키 필드의 값에 대응하여 상기 제1 테이블에 대응하는 매핑 데이터의 누적 개수를 지시하는 제1 인덱스를 포함하고, 상기 태그가 상기 제1 테이블과 다른 테이블을 지시하는 경우 초기 인덱스와 상기 조인키 필드의 값에 대응하여 상기 제1 테이블에 대응하는 매핑 데이터의 최종 누적 개수를 지시하는 최대 인덱스 사이의 제2 인덱스를 포함하는, 조인 연산을 위한 매핑 방법.
Receiving redundancy data including a value of a join key field for a join operation, an index, a tag indicating one of the tables for the join operation, and a value of a record field for the join operation; And
Outputting the mapping data including the value of the join key field, the index, the tag, and the value of the record field
Lt; / RTI >
Wherein the mapping data is transmitted to a reducer determined based on a combination of the value of the join key field and the index,
The index included in the redundancy data is
And a first index indicating an accumulated number of mapping data corresponding to the first table corresponding to a value of the join key field when the tag indicates a predetermined first table, And a second index between the initial index indicating a different table and a maximum index indicating a last cumulative number of mapping data corresponding to the first table corresponding to the value of the join key field. Mapping method.
조인 연산을 위한 조인키 필드의 값, 인덱스, 상기 조인 연산을 위한 테이블들 중 어느 하나를 지시하는 태그, 및 상기 조인 연산을 위한 레코드 필드의 값을 포함하는 매핑 데이터를 수신하는 단계;
상기 태그가 미리 정해진 제1 테이블을 지시하는 경우,
상기 조인키 필드의 값 및 상기 인덱스의 조합에 대응하여 상기 레코드 필드의 값을 저장하는 단계; 및
상기 태그가 상기 제1 테이블과 다른 테이블을 지시하는 경우,
상기 조인키 필드의 값 및 상기 인덱스의 조합에 대응하여 미리 저장된 레코드 필드의 값, 및 상기 레코드 필드의 값을 출력하는 단계
를 포함하며,
상기 매핑 데이터에 포함된 인덱스는
상기 태그가 미리 정해진 제1 테이블을 지시하는 경우 상기 조인키 필드의 값에 대응하여 상기 제1 테이블에 대응하는 매핑 데이터의 누적 개수를 지시하는 제1 인덱스를 포함하고, 상기 태그가 상기 제1 테이블과 다른 테이블을 지시하는 경우 초기 인덱스와 상기 조인키 필드의 값에 대응하여 상기 제1 테이블에 대응하는 매핑 데이터의 최종 누적 개수를 지시하는 최대 인덱스 사이의 제2 인덱스를 포함하는, 조인 연산을 위한 리듀싱 방법.
Receiving mapping data including a value of a join key field for a join operation, an index, a tag indicating any one of the tables for the join operation, and a value of a record field for the join operation;
If the tag indicates a predetermined first table,
Storing a value of the record field corresponding to a value of the join key field and a combination of the indexes; And
When the tag indicates a table different from the first table,
A value of a record field previously stored corresponding to a value of the join key field and the index, and a value of the record field
/ RTI >
The index included in the mapping data is
And a first index indicating an accumulated number of mapping data corresponding to the first table corresponding to a value of the join key field when the tag indicates a predetermined first table, And a second index between the initial index indicating a different table and a maximum index indicating a last cumulative number of mapping data corresponding to the first table corresponding to the value of the join key field. Reduced method.
하드웨어와 결합되어 제2항, 제7항, 제9항, 제10항, 또는 제11항 중 어느 하나의 항의 방법을 실행시키기 위하여 매체에 저장된 컴퓨터 프로그램.12. A computer program stored on a medium for execution in accordance with any one of claims 2, 7, 9, 10, or 11 in combination with hardware.
KR1020140183196A 2014-12-18 2014-12-18 Mapping method and reducing method for join operationand apparatus thereof KR101680945B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020140183196A KR101680945B1 (en) 2014-12-18 2014-12-18 Mapping method and reducing method for join operationand apparatus thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020140183196A KR101680945B1 (en) 2014-12-18 2014-12-18 Mapping method and reducing method for join operationand apparatus thereof

Publications (2)

Publication Number Publication Date
KR20160074193A KR20160074193A (en) 2016-06-28
KR101680945B1 true KR101680945B1 (en) 2016-11-29

Family

ID=56366176

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020140183196A KR101680945B1 (en) 2014-12-18 2014-12-18 Mapping method and reducing method for join operationand apparatus thereof

Country Status (1)

Country Link
KR (1) KR101680945B1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101961562B1 (en) * 2016-10-20 2019-03-22 영남대학교 산학협력단 Method for Hash-Join and computer program, and storage medium operating thereof
WO2018074906A1 (en) * 2016-10-20 2018-04-26 영남대학교 산학협력단 Join method, computer program for executing same, and recording medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
Hung-chih Yang, Ali Dasdan외 1. Map-Reduce-Merge: Simplified Relational Data Processing on Large Clusters. 2007.6,*

Also Published As

Publication number Publication date
KR20160074193A (en) 2016-06-28

Similar Documents

Publication Publication Date Title
CN109564568B (en) Apparatus, method and machine-readable storage medium for distributed dataset indexing
US10061858B2 (en) Method and apparatus for processing exploding data stream
US20190266195A1 (en) Filtering queried data on data stores
Kune et al. The anatomy of big data computing
US8984516B2 (en) System and method for shared execution of mixed data flows
US9477512B2 (en) Task-based modeling for parallel data integration
US9152921B2 (en) Computing regression models
US8868576B1 (en) Storing files in a parallel computing system based on user-specified parser function
US11429566B2 (en) Approach for a controllable trade-off between cost and availability of indexed data in a cloud log aggregation solution such as splunk or sumo
US10810198B2 (en) Group determination based on multi-table dictionary codes
US10606837B2 (en) Partitioned join with dense inner table representation
KR101680945B1 (en) Mapping method and reducing method for join operationand apparatus thereof
US20160203032A1 (en) Series data parallel analysis infrastructure and parallel distributed processing method therefor
KR101772333B1 (en) INTELLIGENT JOIN TECHNIQUE PROVIDING METHOD AND SYSTEM BETWEEN HETEROGENEOUS NoSQL DATABASES
US10439897B1 (en) Method and apparatus for enabling customized control to applications and users using smart tags
US9607021B2 (en) Loading data with complex relationships
US10083121B2 (en) Storage system and storage method
WO2018119478A1 (en) Meta-join and meta-group-by indexes for big data
US20180198768A1 (en) System and method for providing automated keychain grouping and updating
KR102172321B1 (en) Method for data deduplication
Hassan et al. Big Data Techniques: A Survey
Hasoon et al. Big Data Techniques: A Survey.
CN103885984A (en) Database search result set processing method and device

Legal Events

Date Code Title Description
A201 Request for examination
N231 Notification of change of applicant
E902 Notification of reason for refusal
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right
GRNT Written decision to grant
FPAY Annual fee payment

Payment date: 20190329

Year of fee payment: 6