KR101954001B1 - Fault recovery method in spark streaming based apparatus and distributed apparatus supporting real-time processing - Google Patents

Fault recovery method in spark streaming based apparatus and distributed apparatus supporting real-time processing Download PDF

Info

Publication number
KR101954001B1
KR101954001B1 KR1020170164882A KR20170164882A KR101954001B1 KR 101954001 B1 KR101954001 B1 KR 101954001B1 KR 1020170164882 A KR1020170164882 A KR 1020170164882A KR 20170164882 A KR20170164882 A KR 20170164882A KR 101954001 B1 KR101954001 B1 KR 101954001B1
Authority
KR
South Korea
Prior art keywords
data
time
failure recovery
input
streaming
Prior art date
Application number
KR1020170164882A
Other languages
Korean (ko)
Other versions
KR20180072544A (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 서울대학교산학협력단
Publication of KR20180072544A publication Critical patent/KR20180072544A/en
Application granted granted Critical
Publication of KR101954001B1 publication Critical patent/KR101954001B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1405Saving, restoring, recovering or retrying at machine instruction level
    • G06F11/1407Checkpointing the instruction stream

Abstract

스파크 스트리밍 기반 장치에서의 고장 복구 방법은 스파크 스트리밍 기반 장치가 기준시간 단위로 입력 스트리밍 데이터, 누적 변형 히스토리 및 상태 데이터를 저장하는 단계, 상기 장치가 상기 입력 스트리밍 데이터에 대한 변형 시간을 기준으로 상기 입력 스트리밍 데이터에 대한 고장 복구 시간을 추정하면서 전체 고장 복구 시간을 누적하는 단계, 상기 장치가 상기 전체 고장 복구 시간이 임계값을 초과하면 저장된 상태 데이터 중 가장 최근 입력된 입력 스트리밍 데이터에 대한 상태 데이터인 타겟 상태 데이터를 결정하는 단계 및 상기 장치가 상기 타겟 상태 데이터보다 전에 생성되어 저장된 상태 데이터 중 적어도 하나의 상태 데이터 및 상기 타겟 상태 데이터가 생성되기 전에 입력되어 저장된 입력 스트리밍 데이터 중 적어도 하나의 입력 스트리밍 데이터를 삭제하는 단계를 포함한다.A failure recovery method in a spark streaming-based device includes the steps of: storing input streaming data, cumulative deformation history, and status data in units of a reference time in a spark streaming-based device; The method comprising the steps of: accumulating a total failure recovery time while estimating a failure recovery time for the streaming data; if the total failure recovery time exceeds the threshold, Determining at least one of state data of at least one of state data generated and stored before the target state data and input streaming data stored before being input and stored before the target state data is generated, And deleting the streaming data.

Description

스파크 스트리밍 기반 장치에서의 고장 복구 방법 및 실시간 스트림 프로세싱을 지원하는 분산 장치{FAULT RECOVERY METHOD IN SPARK STREAMING BASED APPARATUS AND DISTRIBUTED APPARATUS SUPPORTING REAL-TIME PROCESSING}FIELD OF THE INVENTION [0001] The present invention relates to a fault recovery method for a spark streaming-based device and a distributed device supporting real-time stream processing.

이하 설명하는 기술은 스파크 스트리밍 기반 장치에서 고장을 복구하는 기법에 관한 것이다.The techniques described below relate to techniques for repairing failures in spark streaming based devices.

최근 대용량 데이터를 실시간으로 처리하기 위한 장치 및 기법에 대한 연구가 활발하게 진행되고 있다. 예컨대, 자율주행 자동차를 실현하기 위한 기술 중 하나는 클라우드 연결 자동차이다. 실시간 클라우드 데이터센터는 차량에게 자율주행에 관련된 실시간 서비스를 제공하기 위해 다양하고 어려운 요구사항들을 충족해야만 한다. 이 요구사항들로는 실시간 스트림 데이터 처리, 실시간 상태 유지(stateful) 작업, 실시간 고장 복구가 있다.Recently, researches have been actively conducted on devices and techniques for real-time processing of large-volume data. For example, one of the technologies for realizing an autonomous vehicle is a cloud-connected automobile. Real-time cloud data centers must meet diverse and demanding requirements to provide real-time services for autonomous vehicles. These requirements include real-time stream data processing, real-time stateful operations, and real-time fault recovery.

이러한 요구사항들을 충족하기 위해서는 데이터 분석 프레임워크가 필수적이다. 현존하는 기술들은 배치와 스트림 프로세싱으로 구분된다. 전자에 해당하는 대표적인 것으로는 하둡(Hadoop)이 있으며, 후자에는 스파크 스트리밍(Spark Streaming), 스톰(Storm)이 있다.A data analysis framework is essential to meet these requirements. Existing technologies are divided into batch and stream processing. The former is Hadoop, and the latter is Spark Streaming and Storm.

미국공개특허 제2011-0239048호U.S. Published Patent No. 2011-0239048

하둡과 스톰은 실시간 고장 복구와 같은 요구사항을 충족하지 못한다. 스파크 스트리밍은 부분적으로 실시간 고장 복구를 지원한다. 다만 스파크 스트리밍은 고장 복구를 위한 변형 히스토리의 수가 증가될수록 일정 시간안에 고장 복구를 수행하지 못하는 한계가 있다. 이하 설명하는 기술은 스파크 스트리밍 기반 장치에서 일정 시간 내에 고장을 복구할 수 있는 기법을 제공하고자 한다. Hadoop and Storm do not meet requirements such as real-time fault recovery. Spark streaming supports partial real-time fault recovery. However, spark streaming has a limitation in that failure recovery can not be performed within a predetermined time as the number of variation histories for failure recovery increases. The technique described below is intended to provide a technique for recovering a failure within a predetermined time in a spark streaming-based apparatus.

스파크 스트리밍 기반 장치에서의 고장 복구 방법은 스파크 스트리밍 기반 장치가 기준시간 단위로 입력 스트리밍 데이터, 누적 변형 히스토리 및 상태 데이터를 저장하는 단계, 상기 장치가 상기 입력 스트리밍 데이터에 대한 변형 시간을 기준으로 상기 입력 스트리밍 데이터에 대한 고장 복구 시간을 추정하면서 전체 고장 복구 시간을 누적하는 단계, 상기 장치가 상기 전체 고장 복구 시간이 임계값을 초과하면 저장된 상태 데이터 중 가장 최근 입력된 입력 스트리밍 데이터에 대한 상태 데이터인 타겟 상태 데이터를 결정하는 단계 및 상기 장치가 상기 타겟 상태 데이터보다 전에 생성되어 저장된 상태 데이터 중 적어도 하나의 상태 데이터 및 상기 타겟 상태 데이터가 생성되기 전에 입력되어 저장된 입력 스트리밍 데이터 중 적어도 하나의 입력 스트리밍 데이터를 삭제하는 단계를 포함한다.A failure recovery method in a spark streaming-based device includes the steps of: storing input streaming data, cumulative deformation history, and status data in units of a reference time in a spark streaming-based device; The method comprising the steps of: accumulating a total failure recovery time while estimating a failure recovery time for the streaming data; if the total failure recovery time exceeds the threshold, Determining at least one of state data of at least one of state data generated and stored before the target state data and input streaming data stored before being input and stored before the target state data is generated, And deleting the streaming data.

이하 설명하는 기술은 고장 복구를 위한 변형 히스토리를 계속 누적하지 않고, 스파크 스트리밍 기반 장치에서 실시간성을 보장할 수 있는 변형 히스토리와 관련 데이터만을 관리한다. 이를 통해 이하 설명하는 기술은 항상 일정한 기준 시간 내에 고장 복구를 할 수 있다.The technique described below manages only the deformation history and related data that can guarantee real-time performance in the spark streaming-based device without accumulating the deformation history for failure recovery. Through this, the technique described below can always perform failure recovery within a predetermined reference time.

도 1은 종래 스파크 스트리밍 기반 장치의 동작에 대한 예이다.
도 2는 종래 스파크 스트리밍 기반 장치에서의 마이크로 배치 프로세싱에 대한 예이다.
도 3은 스파크 스트리밍 기반 장치의 고장 복구 과정에 대한 예이다.
도 4는 스파크 스트리밍 기반 장치에서의 고장 복구 방법에 대한 순서도의 예이다.
도 5는 스파크 스트리밍 기반 장치에서 고장 복구 시간을 추정하는 과정에 대한 예이다.
도 6은 스파크 스트리밍 기반 장치에서 고장 복구를 위한 데이터를 관리하는 예이다.
도 7은 스파크 스트리밍 기반 장치의 아키텍처에 대한 예이다.
도 8은 스파크 스트리밍 기반 장치의 구성을 도시한 블록도의 예이다.
Figure 1 is an example of the operation of a conventional spark streaming based device.
Figure 2 is an example of micro-batch processing in a conventional spark streaming-based device.
Figure 3 is an example of a failure recovery procedure for a spark streaming based device.
Figure 4 is an example of a flowchart for a method of fault recovery in a spark streaming based device.
5 is an example of a process of estimating a failure recovery time in a spark streaming-based device.
6 is an example of managing data for fault recovery in a spark streaming-based device.
Figure 7 is an example of an architecture for a spark streaming-based device.
8 is an example of a block diagram illustrating the configuration of a spark streaming-based device.

이하 설명하는 기술은 다양한 변경을 가할 수 있고 여러 가지 실시례를 가질 수 있는 바, 특정 실시례들을 도면에 예시하고 상세하게 설명하고자 한다. 그러나, 이는 이하 설명하는 기술을 특정한 실시 형태에 대해 한정하려는 것이 아니며, 이하 설명하는 기술의 사상 및 기술 범위에 포함되는 모든 변경, 균등물 내지 대체물을 포함하는 것으로 이해되어야 한다.The following description is intended to illustrate and describe specific embodiments in the drawings, since various changes may be made and the embodiments may have various embodiments. However, it should be understood that the following description does not limit the specific embodiments, but includes all changes, equivalents, and alternatives falling within the spirit and scope of the following description.

제1, 제2, A, B 등의 용어는 다양한 구성요소들을 설명하는데 사용될 수 있지만, 해당 구성요소들은 상기 용어들에 의해 한정되지는 않으며, 단지 하나의 구성요소를 다른 구성요소로부터 구별하는 목적으로만 사용된다. 예를 들어, 이하 설명하는 기술의 권리 범위를 벗어나지 않으면서 제1 구성요소는 제2 구성요소로 명명될 수 있고, 유사하게 제2 구성요소도 제1 구성요소로 명명될 수 있다. 및/또는 이라는 용어는 복수의 관련된 기재된 항목들의 조합 또는 복수의 관련된 기재된 항목들 중의 어느 항목을 포함한다.The terms first, second, A, B, etc., may be used to describe various components, but the components are not limited by the terms, but may be used to distinguish one component from another . For example, without departing from the scope of the following description, the first component may be referred to as a second component, and similarly, the second component may also be referred to as a first component. And / or < / RTI > includes any combination of a plurality of related listed items or any of a plurality of related listed items.

본 명세서에서 사용되는 용어에서 단수의 표현은 문맥상 명백하게 다르게 해석되지 않는 한 복수의 표현을 포함하는 것으로 이해되어야 하고, "포함한다" 등의 용어는 설시된 특징, 개수, 단계, 동작, 구성요소, 부분품 또는 이들을 조합한 것이 존재함을 의미하는 것이지, 하나 또는 그 이상의 다른 특징들이나 개수, 단계 동작 구성요소, 부분품 또는 이들을 조합한 것들의 존재 또는 부가 가능성을 배제하지 않는 것으로 이해되어야 한다.As used herein, the singular " include " should be understood to include a plurality of representations unless the context clearly dictates otherwise, and the terms " comprises & , Parts or combinations thereof, and does not preclude the presence or addition of one or more other features, integers, steps, components, components, or combinations thereof.

도면에 대한 상세한 설명을 하기에 앞서, 본 명세서에서의 구성부들에 대한 구분은 각 구성부가 담당하는 주기능 별로 구분한 것에 불과함을 명확히 하고자 한다. 즉, 이하에서 설명할 2개 이상의 구성부가 하나의 구성부로 합쳐지거나 또는 하나의 구성부가 보다 세분화된 기능별로 2개 이상으로 분화되어 구비될 수도 있다. 그리고 이하에서 설명할 구성부 각각은 자신이 담당하는 주기능 이외에도 다른 구성부가 담당하는 기능 중 일부 또는 전부의 기능을 추가적으로 수행할 수도 있으며, 구성부 각각이 담당하는 주기능 중 일부 기능이 다른 구성부에 의해 전담되어 수행될 수도 있음은 물론이다.Before describing the drawings in detail, it is to be clarified that the division of constituent parts in this specification is merely a division by main functions of each constituent part. That is, two or more constituent parts to be described below may be combined into one constituent part, or one constituent part may be divided into two or more functions according to functions that are more subdivided. In addition, each of the constituent units described below may additionally perform some or all of the functions of other constituent units in addition to the main functions of the constituent units themselves, and that some of the main functions, And may be carried out in a dedicated manner.

또, 방법 또는 동작 방법을 수행함에 있어서, 상기 방법을 이루는 각 과정들은 문맥상 명백하게 특정 순서를 기재하지 않은 이상 명기된 순서와 다르게 일어날 수 있다. 즉, 각 과정들은 명기된 순서와 동일하게 일어날 수도 있고 실질적으로 동시에 수행될 수도 있으며 반대의 순서대로 수행될 수도 있다.Also, in performing a method or an operation method, each of the processes constituting the method may take place differently from the stated order unless clearly specified in the context. That is, each process may occur in the same order as described, may be performed substantially concurrently, or may be performed in the opposite order.

스파크 스트리밍(Spark Streaming) 기반 시스템 내지 장치에 대하여 먼저 간략하게 설명한다. 스파크 스트리밍 기반 장치는 물리적으로 하나의 장치를 의미하는 것은 아니고, 스파크 스트리밍 처리가 가능한 하나의 객체를 의미한다. 이하 스파크 스트리밍 기반 장치로 통일하여 설명한다. 스파크 스트리밍 기반 장치는 네트워크로 연결된 복수의 컴퓨팅 장치로 구성될 수 있다. 해당 분야의 통상의 지식을 가진 자가 알고 있는 바와 같이 스파크 스트리밍 기반 장치는 마스터 노드(driver)와 하나 이상의 워커 노드(worker node)로 구성된다. 스파크 스트리밍 기반 장치에 대한 기본 적인 아키텍처는 종래 공개된 기술에 따른다(예컨대, Matei Zaharia 외 5인, "Discretized streams: fault-tolerant streaming computation at scale", SOSP '13 Proceedings of the Twenty-Fourth ACM Symposium on Operating Systems Principles, Pages 423-438 등 참조).A system or apparatus based on Spark Streaming will be briefly described first. A spark streaming-based device does not mean a single device physically, but an object capable of spark streaming processing. Hereinafter, a spark streaming-based apparatus will be described in unity. The spark streaming based device may be comprised of a plurality of networked computing devices. As one of ordinary skill in the art knows, a spark streaming-based device comprises a master node and at least one worker node. The basic architecture for a spark streaming based device follows the prior art (see, for example, Matei Zaharia et al., &Quot; Discretized streams: fault-tolerant streaming computation at scale ", SOSP'13 Proceedings of the Twenty-Fourth ACM Symposium on Operating Systems Principles, Pages 423-438, etc.).

이하 설명하는 기술은 스파크 스트리밍 기반 장치에 대한 새로운 물리적 구조를 제안하는 것은 아니다. 따라서 스파크 스트리밍 기반 장치에 대한 물리적인 구성에 대해서는 상세한 설명을 생략한다. 이하 설명하는 기술은 종래 스파크 스트리밍 기반 장치의 구조를 활용하여 실시간 고장 복구가 가능한 알고리즘이라고 할 수 있다. 또한 이하 설명하는 기술은 실시간 고장 복구가 가능한 프레임워크를 갖는 스파크 스트리밍 기반 장치라고 할 수 있다.The techniques described below do not suggest a new physical structure for spark streaming based devices. Therefore, a detailed description of the physical configuration of the spark streaming-based device will be omitted. The technique described below can be regarded as an algorithm capable of real-time failure recovery using the structure of a conventional spark streaming-based device. In addition, the technique described below is a spark streaming-based device having a framework capable of real-time failure recovery.

스파크 스트리밍 기반 장치는 초 단위 스트림 프로세싱(second-scale stream processing)을 제공한다. 초 단위 프로세싱을 지원하기 위해 이 장치는 자주 사용되는 대용량 데이터를 메모리에 적재한 채로 분산 처리를 빠르게 수행한다. 하지만 스파크 스트리밍 기반 장치는 기능적으로 배치 프로세싱만을 지원하기 때문에 이상적인 스트림 프로세싱을 지원하는 것은 한계가 있다. 이를 극복하기 위해 스파크 스트리밍 기반 장치는 마이크로 배치 프로세싱(micro batch processing) 형태로 스트림 데이터를 처리하여 제한적으로 스트림 프로세싱을 지원한다. 마이크로 배치 프로세싱은 입력 스트림 데이터(input stream data)를 일정 주기 동안 받아서 배치 형태로 저장해두고 매 주기마다 쌓인 입력 데이터를 처리하여 결과 스트림 데이터(output stream data)를 얻는 처리 방식을 말한다.Spark streaming-based devices provide second-scale stream processing. To support processing in seconds, the device quickly performs distributed processing while storing frequently used large amounts of data in memory. However, since spark streaming-based devices only functionally support batch processing, there is a limit to supporting ideal stream processing. To overcome this, spark streaming-based devices process stream data in the form of micro batch processing to support limited stream processing. Micro batch processing refers to a processing method in which input stream data is received for a predetermined period and stored in a batch format, and input data accumulated every cycle is processed to obtain output stream data.

스파크 스트리밍 기반 장치가 제공하는 정상적인 동작은 마이크로 배치 프로세싱이다. 이 프로세싱은 비상태형(stateless)과 상태형(stateful)으로 구분된다. 비상태형 작업은 어떤 주기에 대하여 그 주기에 입력된 데이터 요소들만 사용하여 결과값을 얻는다. 반면 상태형 작업은 그 주기에 입력된 데이터뿐만 아니라 이전 주기의 데이터 또는 이전 주기의 결과 데이터까지 사용하여 결과값을 얻는다.The normal operation provided by a spark streaming-based device is micro-batch processing. This processing is divided into stateless and stateful. The stateless work obtains the result using only the data elements entered in the cycle for a certain period. On the other hand, a stateful task uses the data input in the cycle as well as the data of the previous period or the result data of the previous period to obtain the resultant value.

도 1은 종래 스파크 스트리밍 기반 장치의 동작(100)에 대한 예이다. 도 1은 스파크 스트리밍 기반 장치에서 상태형 작업을 처리하는 과정에 대한 예이다. 스파크 스트리밍 기반 장치는 입력 스트림 데이터(i1, ... , in)를 입력받는다(110). 스파크 스트리밍 기반 장치는 일반적으로 입력 스트림 데이터를 입력받은 다른 장치(노드)가 보유하는 입력 스트림 데이터를 읽는다. 스파크 스트리밍 기반 장치는 입력 스트림 데이터가 수신될 때마다 고장 감내 스토리지(fault-tolerant storage)에 저장한다(120). 이는 고장 복구를 지원하기 위함이다. 스파크 스트리밍 기반 장치는 스토리지에서 데이터 하나를 꺼내 RDD(resilient distributed dataset)라는 자료 구조에 적재한다(130). RDD는 사용자의 데이터 집합을 추상화하여 하나의 객체로 표현한 것이다. RDD는 인메모리(inmemory) 분산 컴퓨팅을 목적으로 관리하는 분할된 데이터의 집합이다. Figure 1 is an example of an operation 100 of a conventional spark streaming-based device. Figure 1 is an example of a process for processing a stateful task in a spark streaming-based device. The spark streaming-based device receives input stream data (i 1 , ..., i n ) (110). Spark streaming based devices typically read input stream data held by another device (node) that has received input stream data. The spark streaming-based device stores (120) fault-tolerant storage whenever input stream data is received. This is to support fault recovery. A spark streaming-based device retrieves one piece of data from storage and loads it into a data structure called resilient distributed dataset (130). RDD is an abstract representation of a user's dataset as a single object. RDD is a set of partitioned data that manages for the purpose of inmemory distributed computing.

스파크 스트리밍 기반 장치는 입력 스트림 데이터와 피드백 데이터를 입력으로 받아서 변형을(transformation) 수행한다(140). 스파크 스트리밍 기반 장치는 변형을 수행한 데이터도 RDD에 적재한다(160). 스파크 스트리밍 기반 장치는 변형을 수행한 결과 스트림 데이터(o1,...,on)를 출력한다(170). A spark streaming-based device receives input stream data and feedback data and performs transformation (140). The spark streaming-based device loads the data that has undergone the transformation into the RDD (160). The spark streaming based apparatus outputs stream data (o 1 , ..., o n ) as a result of performing the transformation (170).

스파크 스트리밍 기반 장치는 입력 스트림 대이터와 피드백 데이터를 입력으로 삼아 변형을 수행한다. 도 1은 함수 f()로 변형 과정을 표현하였다. f()는 입력 스트림 데이터(in)와 피드백 데이터(pre out)를 입력값을 갖는다. 처음에 스파크 스트리밍 기반 장치는 최초 입력 스트림 데이터와 초기 입력값(λ)을 이용하여 변형을 수행한다. 스파크 스트리밍 기반 장치가 변형을 수행하면 일정한 결과 스트림 데이터를 출력한다. 이후 스파크 스트리밍 기반 장치는 다음 입력 스트림 데이터(in)와 이전 결과 스트림 데이터(prev out)를 이용하여 변형을 수행한다. 따라서 결과 스트림 데이터의 k번째 데이터는 입력 스트림 데이터의 k번째 데이터와 결과 스트림 데이터의 k-1 번째 데이터로부터 변형들을 수행하여 계산된다. A spark streaming-based device performs transformations using input stream data and feedback data as input. Figure 1 represents the transformation process with function f (). f () has input values of input stream data (in) and feedback data (pre out). Initially, the spark streaming based device performs the transform using the original input stream data and the initial input value ([lambda]). When a spark streaming based device performs a transformation, it outputs constant result stream data. The spark streaming based device then performs the transform using the next input stream data (in) and the previous result stream data (prev out). Therefore, the kth data of the resultant stream data is calculated by performing transformations from the kth data of the input stream data and the (k-1) th data of the resultant stream data.

마지막으로 스파크 스트리밍 기반 장치는 고장 복구를 위해 수행된 변형들을 고장 복구 스토리지에 저장한다(150). 누적된 변형 히스토리를 리니지(lineage)라고부른다.Finally, the spark streaming based device stores the transformations performed for fault recovery in the fault recovery storage (150). The accumulated deformation history is called a lineage.

도 2는 종래 스파크 스트리밍 기반 장치에서의 마이크로 배치 프로세싱에 대한 예이다. 도 2는 10초 주기를 갖는 상태형 마이크로 배치 프로세싱의 동작에 대한 예이다. 도 2의 좌측은 시간축과 각 구간에 입력되는 입력 스트림 데이터를 도시한다. 첫 번째 주기 동안 i1, i2, i3 및 i4 스트림 데이터가 그리고 두 번째 주기 동안 i5, i6 및 i7 스트림 데이터가 입력되었다고 가정하자. 스파크 스트리밍 기반 장치는 첫 주기인 10초 동안 스트림 데이터가 입력되면 곧장 고장 감내 스토리지에 저장한다. 첫 주기가 끝나는 10초가 되면 스파크 스트리밍 기반 장치는 FIFO(first-in first-out) 순서로 스토리지에 저장되어 있던 입력 스트림 데이터에 대한 상태형 마이크로 배치 프로세싱을 수행한다. 스파크 스트리밍 기반 장치는 최초 10초 주기에 포함된 i1, i2, i3 및 i4 스트림 데이터에 대한 배치 프로세싱을 수행한다. 스파크 스트리밍 기반 장치는 i1, i2, i3 및 i4 스트림 데이터 각각에 대하여 전술한 변형 과정을 수행한다. 그리고 스파크 스트리밍 기반 장치는 이후 복구를 위하여 입력 데이터 (i1,...,ij), 변형된 상태 데이터(o1,...,oj) 및 변형 히스토리(상태 변형에서 입력된 데이터에 대한 정보)를 저장한다. 타임라인에서 점선은 각각의 입력 데이터에 대한 프로세싱을 의미한다. 이 수행 과정은 다음 주기에서도 반복된다. Figure 2 is an example of micro-batch processing in a conventional spark streaming-based device. Figure 2 is an example of the operation of stateful micro-batch processing with a 10 second period. The left side of FIG. 2 shows the time axis and the input stream data input in each section. Suppose i 1 , i 2 , i 3 and i 4 stream data are input during the first period and i 5 , i 6 and i 7 stream data are input during the second period. The spark streaming-based device stores the stream data into the failed storage immediately after 10 seconds of the first cycle. At 10 seconds after the end of the first cycle, the spark streaming-based device performs stateful micro batch processing of the input stream data stored in the storage in first-in first-out (FIFO) order. The spark streaming based device performs batch processing for the i 1 , i 2 , i 3 and i 4 stream data included in the first 10 second period. The spark streaming-based device performs the transformation process described above for each of the i 1 , i 2 , i 3 and i 4 stream data. The spark streaming-based device then uses the input data (i 1 , ..., i j ), the modified state data (o 1 , ..., o j ) and the deformation history Information). In the timeline, the dotted line represents processing for each input data. This process is repeated in the next cycle.

스파크 스트리밍 기반 장치는 고장이 발생하더라도 손실되지 않는 데이터를 사용하여 최신 상태 데이터를 복구한다. 손실되지 않는 데이터는 RDD와 고장 감내 스토리지에 저장되어 있는 데이터 중에 후자이다. 고장 복구 스토리지는 백업된 입력 스트림 데이터, 백업된 상태 데이터 그리고 누적 변형 히스토리를 저장한다. Spark streaming-based devices use state-of-the-art data that is not lost when a failure occurs. The data that is not lost is the latter of the data stored in RDD and fault tolerant storage. Fault recovery storage stores backed up input stream data, backed up state data, and cumulative variation history.

도 3은 스파크 스트리밍 기반 장치의 고장 복구 과정에 대한 예이다. 스파크 스트리밍 기반 장치는 우선 고장 복구 스토리지에서 백업된 입력 스트림 데이터와 백업된 상태 데이터를 읽어서 RDD에 적재한다. 도 3는 고장 복구 스토리지(DB 도형)에서 데이터를 읽어서 RDD(원형)에 적재한다고 표시하였다. 그 다음 스파크 스트리밍 기반 장치는 누적 변형 히스토리를 읽고 이를 토대로 고장 직전의 상태 데이터를 복구한다. 누적 변형 히스토리는 고장이 발생한 지점까지 상태 변형을 수행했던 입력 데이터와 피드백 데이터(초기 입력값 내지 직전 상태 데이터)에 대한 정보를 포함한다. 예컨대, o2가 복구할 상태 데이터라고 가정하면, 스파크 스트리밍 기반 장치는 i1 및 λ를 상태 변형하여 o1을 생성하고, 이후 i1 및 생성한 o1을 이용하여 o2를 생성한다. 이 경우 누적된 리니지(변형 히스토리)는 f(i1, λ), f(i2, o1)이다. 마지막으로 복구된 상태 데이터(o2)를 토대로 고장 이후에 수신된 입력 스트림 데이터(i3 및 i4)에 대한 마이크로 배치 프로세싱을 수행한다.Figure 3 is an example of a failure recovery procedure for a spark streaming based device. Spark streaming-based devices first read back input stream data and backed up state data from the failover storage and load them into RDD. FIG. 3 shows that data is read from the fault recovery storage (DB diagram) and loaded on the RDD (circular). The spark streaming-based device then reads the cumulative strain history and restores the state data just prior to the failure based on the cumulative strain history. The cumulative deformation history includes input data for which state transformation has been performed up to a point where a failure has occurred and information about feedback data (initial input value to previous state data). For example, assuming that o 2 is state data to be recovered, the spark streaming based device generates a state o 1 by modifying i 1 and λ, and then generates o 2 using i 1 and the generated o 1 . In this case, the accumulated lineage (deformation history) is f (i 1 , λ) and f (i 2 , o 1 ). Finally, micro-batch processing is performed on the input stream data (i 3 and i 4 ) received after the failure based on the recovered state data o 2 .

전술한 스파크 스트리밍 기반 장치에서 고장 복구 작업에 소요되는 시간은 리니지의 길이에 비례하여 증가한다. 따라서 종래 스파크 스트리밍 기반 장치는 실시간 고장 복구를 보장하지 못한다.In the spark streaming-based apparatus described above, the time required for the failure recovery operation increases in proportion to the length of the lineage. Thus, conventional spark streaming based devices do not guarantee real-time fault recovery.

이하 설명하는 기술은 스파크 스트리밍 기반 장치에서 일정한 임계 시간 내에 고장 복구를 수행하기 위한 기법이다. 이하 설명하는 기술을 적용한 스파크 스트리밍 기반 장치는 항상 최대 임계 시간 이내에서 고장 복구를 수행할 수 있다. 도 4는 스파크 스트리밍 기반 장치에서의 고장 복구 방법에 대한 순서도의 예이다. 스파크 스트리밍 기반 장치는 먼저 입력 스트림 데이터를 읽는다(210). 이후 스파크 스트리밍 기반 장치는 전술한 바와 같이 일정한 시간 단위로 마이크로 배치 프로세싱을 수행한다. 이 과정에서 스파크 스트리밍 기반 장치는 입력 스트림 데이터에 대한 상태 변형 작업을 수행한다(220). 상태 변형을 수행하고 스파크 스트리밍 기반 장치는 입력 스트림 데이터, 상태 데이터 및 변형 히스토리를 일정한 저장 객체에 저장한다(230). The technique described below is a technique for performing failure recovery within a predetermined threshold time in a spark streaming-based apparatus. A spark streaming based device employing the techniques described below can always perform fault recovery within a maximum threshold time. Figure 4 is an example of a flowchart for a method of fault recovery in a spark streaming based device. The spark streaming based device first reads the input stream data (210). The spark streaming based device then performs micro batch processing on a constant time basis as described above. In this process, the spark streaming-based device performs state transformation on the input stream data (220). State transformation, and the spark streaming-based device stores input stream data, state data, and transformation history in a constant storage object (230).

한편 스파크 스트리밍 기반 장치는 상태 변형 작업을 수행하면서 개별 입력 스트림 데이터 대한 상태 변형 소요 시간을 측정한다(240). 예컨대, 입력 스트림 데이터 i1이 입력되는 경우 i1과 λ를 o1으로 변형하는 시간을 측정한다. 개별 입력 스트림 데이터에 대한 상태 변형 소요 시간을 모두 측정하면, 스파크 스트리밍 기반 장치는 현재 시점까지의 누적 고장 복구 시간을 추정할 수 있다(250). 스파크 스트리밍 기반 장치는 현재까지의 상태 변형 소요 시간 및 입력 스트림 데이터를 RDD에 적재하는 시간 등을 고려하여 누적 고장 복구 시간은 추정한다.Meanwhile, the spark streaming-based device measures the state transformation time for each input stream data while performing a state transformation operation (240). For example, when the input stream data i 1 is input, the time to transform i 1 and λ to o 1 is measured. By measuring both the state transformation times for the individual input stream data, the spark streaming based device can estimate the cumulative failure recovery time to the present time (250). The spark streaming-based device estimates the cumulative failure recovery time in consideration of the time required to change the state until now and the time to load the input stream data in the RDD.

도 5는 스파크 스트리밍 기반 장치에서 고장 복구 시간을 추정하는 과정에 대한 예이다. 스파크 스트리밍 기반 장치는 리니지 기반 고장 복구 시간을 추정하는 에이전트와 고장 복구 시간에 기반하여 체크 포인팅을 갱신하는 에이전트를 이용하여 고장 복구에 사용되는 데이터를 관리할 수 있다. 고장 복구 시간을 추정하고, 고장 복구에 사용되는 데이터를 관리하는 과정은 다양한 방법으로 구현될 수 있다. 도 5(A)는 스파크 스트리밍 기반 장치가 마이크로 배치 프로세싱을 수행하면서 고장 복구를 추정하는 예이고, 도 5(B)는 각 입력 스트림에 대한 변형 소요 시간을 측정한 예이다. 스파크 스트리밍 기반 장치는 상태형 마이크로 배치 프로세싱을 수행하는 잡(job)에 대하여 매 주기마다 고장 복구 시간을 추정한다. 스파크 스트리밍 기반 장치는 입력으로 변형과 그 수행 시간을 받아서 고장 복구 시간 추정표에 기록한다. 그리고 스파크 스트리밍 기반 장치는 총 고장 복구 시간을 추정한다. 이렇게 추정된 고장 복구 시간은 높은 정확도를 갖는다. 그 이유는 고장 복구 시 리니지에 기술된 변형 작업을 동일하게 재수행되기 때문이다.5 is an example of a process of estimating a failure recovery time in a spark streaming-based device. Spark streaming-based devices can manage data used for fault recovery by using agents that estimate lineage-based failure recovery time and agents that update checkpointing based on failure recovery time. The process of estimating the fault recovery time and managing the data used for fault recovery can be implemented in various ways. FIG. 5A is an example in which the spark streaming-based apparatus estimates the failure recovery while performing the micro batch processing, and FIG. 5B is an example of measuring the time required for the transformation for each input stream. The spark streaming-based device estimates the failure recovery time for each cycle of a job performing stateful micro batch processing. The spark streaming-based device receives the transformation and its execution time as input and records it in the failure recovery time estimation table. And spark streaming-based devices estimate total failure recovery time. This estimated failure recovery time has high accuracy. The reason for this is that the repair work described in the lineage is performed again in the same manner as in the case of failure recovery.

스파크 스트리밍 기반 장치는 누적 고장 복구 시간이 사전에 정의한 임계값을 초과하는지 확인한다(260). 스파크 스트리밍 기반 장치는 추정된 누적 고장 복구 시간이 미리 정의된 임계값을 넘을 경우 마지막으로 연산된 상태 데이터를 백업한다. 임계값은 개발될 서비스의 요구사항에 따라 다르게 결정되는 값이며 서비스 개발자에 의해 설정된다. The spark streaming based device verifies 260 that the cumulative failure recovery time exceeds a predefined threshold. The spark streaming based device backs up the last computed state data if the estimated cumulative failure recovery time exceeds a predefined threshold. The threshold is a value determined differently by the requirements of the service to be developed and is set by the service developer.

예컨대, 주기, 적재 시간, 임계값 그리고 데드라인(deadline)이 각각 10,000ms, 200ms, 900ms, 1300ms라고 가정하자. 주기는 마이크로배치 프로세싱의 수행 시간 간격이다. 적재 시간은 초기 상태 데이터를 고장 감내 스토리지에서 읽어서 RDD에 적재하는 시간이다. 임계값은 스파크 스트리밍 기반 장치가 체크포인팅 여부를 결정하는데 사용되는 시간이다. 데드라인은 특정 잡에서 허용되는 고장 복구 시간의 상한(upper bound)값이다.For example, assume that the period, the loading time, the threshold, and the deadline are 10,000 ms, 200 ms, 900 ms, and 1300 ms, respectively. The cycle is the execution time interval of micro batch processing. Load time is the time to load the initial state data into the RDD by reading from the faulty storage. The threshold is the time that a spark streaming based device is used to determine whether to checkpoint. The deadline is the upper bound value of the fault recovery time allowed for a particular job.

설명의 편의를 위하여 스파크 스트리밍 기반 장치가 10초 구간에서는 i1을 처리(배치 프로세싱)하고, 20초 구간에서는 i2를 처리하고, 30초 구간에서는 i3를 처리하고, 40초 구간에서 i4를 처리한다고 가정한다. A spark stream based device for convenience of description the 10SEC period handle i 1 (batch processing), and the 20 seconds interval handles i 2, it processes the i 3 in 30 seconds interval, and i 4 eseo 40 cho interval .

초기 데이터 λ의 적재 시간은 200ms라고 가정한다. 이 경우 0초를 기준으로 총 고장 복구 시간은 200ms인 것이다. 이후 스파크 스트리밍 기반 장치는 마이크로배치 프로세싱 작업에서 변형 작업에 소요된 시간을 기록한다. 도 5(B)를 기준으로 설명하면 10초에서는 마이크로배치 프로세싱의 변형 작업에 소요된 시간이 200ms인 것을 측정하고 추정표에 기록한다. 10초 기준으로 총 고장 복구 시간은 400ms이다(초기 데이터 λ의 적재 시간과 최초 변형 작업 소요 시간의 합). 그 이후에 20초, 30초, 40초 각각 변형 작업에 소요된 시간으로 100ms, 300ms, 200ms를 측정하고 그 추정표에 기록한다. 40초 시점에 총 고장 복구 시간은 이들을 모두 합한 1000ms이다. 이 때 임계값인 900ms를 초과하므로 스파크 스트리밍 기반 장치는 새로운 체크 포인팅을 하게 된다. Assume that the loading time of the initial data? Is 200 ms. In this case, the total failure recovery time based on 0 second is 200ms. The spark streaming based device then records the time spent in the deformation work in the micro batch processing operation. Referring to FIG. 5 (B), in the 10 seconds, the time required for the micro-batch processing modification operation is measured to be 200 ms and recorded in the estimation table. The total failure recovery time in terms of 10 seconds is 400 ms (the sum of the loading time of the initial data λ and the time required for the first deformation operation). After that, 20, 30, and 40 seconds are measured as 100 ms, 300 ms, and 200 ms, respectively, and recorded in the estimation table. The total failure recovery time at 40 seconds is 1000ms combined. At this time, since the threshold value exceeds 900 ms, the spark streaming-based device will perform a new checkpointing.

스파크 스트리밍 기반 장치는 누적 고장 복구 시간이 임계값을 초과하면 새로운 체크 포인팅을 수행한다(270). 도 6은 스파크 스트리밍 기반 장치에서 고장 복구를 위한 데이터를 관리하는 예이다. 도 6은 누적 고장 복구 시간이 임계값을 초과하는 경우 체크 포인팅을 수행하는 예이다. 간략하게 설명하면 스파크 스트리밍 기반 장치는 현재 시점으로 더 이상 보관할 필요가 없는 데이터를 삭제하고, 현재 시점의 상태 데이터를 백업한다. The spark streaming based device performs a new checkpointing if the cumulative failure recovery time exceeds the threshold (270). 6 is an example of managing data for fault recovery in a spark streaming-based device. Figure 6 is an example of performing checkpointing when the cumulative failure recovery time exceeds a threshold. Briefly, a spark streaming-based device deletes data that is no longer needed to be kept at the current point in time, and backs up the current state data.

도 5에서 40초 시점에서 i4를 처리하여 상태 데이터 o4를 생성하였다. 이때 총 누적 고장 복구 시간이 임계값을 초과하였다. 이 경우 스파크 스트리밍 기반 장치는 마지막 상태 데이터인 o4를 고장 복구 스토리지 상에 저장한다. 그리고 이전 입력 스트림 데이터 i1, i2, i3, i4와 중간 상태 데이터 λ, o1, o2, o3는 고장 복구에 사용되지 않으므로 제거한다. 이 경우 이제 고장 복구 시간은 다시 200ms로 단축된다. 도 6(A)는 40초 시점에서 마지막 상태 데이터인 o4를 저장하고, 이전 입력 스트림 데이터와 중간 상태 데이터를 삭제한 예를 도시한다. 도 6(A)에서 점선으로 도시한 객체는 삭제되는 데이터이다. In Fig. 5, i 4 is processed at a time point of 40 seconds to generate status data o 4 . At this time, the cumulative failure recovery time exceeded the threshold value. In this case, the spark streaming-based device stores the last state data o 4 on the fault recovery storage. Then, the previous input stream data i 1 , i 2 , i 3 , i 4 and the intermediate state data λ 1 , o 1 , o 2 , o 3 are not used for fault recovery and are removed. In this case, the fault recovery time is shortened again to 200 ms. 6 (A) shows an example in which the last state data o 4 is stored at the 40-second time point, and the previous input stream data and the intermediate state data are deleted. An object shown by a dotted line in Fig. 6 (A) is data to be deleted.

나아가 스파크 스트리밍 기반 장치는 마지막 상태 데이터인 o4를 기준으로 이전에 존재하는 입력 데이터들 중 적어도 하나 및/또는 중간 상태 데이터 중 적어도 하나를 삭제할 수도 있다. 만약 삭제할 데이터가 많다면, 삭제에도 일정한 시간이 소요될 수 있으므로, 스파크 스트리밍 기반 장치는 동적을 삭제될 대상을 선택할 수 있을 것이다. Further, the spark streaming based device may delete at least one of the input data and / or the intermediate state data that existed before based on the last state data o 4 . If there is a lot of data to delete, it may take some time to delete it, so the spark streaming-based device will be able to select the object to be deleted.

도 4에 대한 설명으로 돌아가서, 스파크 스트리밍 기반 장치는 고장이 발생하는지 확인한다(280). 고장이 발생하지 않았다면(280의 NO) 이전에 수행했던 과정을 반복 수행한다. 고장이 발생했다면 현재 고장 복구 스토리지에 있는 데이터를 기준으로 고장을 복구한다. 현재 고장 복구 스토리지에 저장된 데이터는 누적하여 정했던 데이터(230 단계)이거나, 새로운 체크 포인팅을 갱신된 데이터(270)일 것이다.Returning to the description of FIG. 4, the spark streaming based device checks if a failure has occurred (280). If the failure has not occurred (NO at 280), repeat the previous steps. If a failure occurs, the failure is recovered based on the data in the current failover storage. The data currently stored in the fault recovery storage may be either the accumulated data (step 230) or the new checkpointing updated data 270.

도 6(B)는 새로운 체크 포인팅으로 갱싱된 데이터를 사용하여 고장을 복구하는 예이다. 마지막 상태 데이터인 o4를 백업한 이후 새로운 입력 스트림 데이터 i5, i6, i7를 처리했다고 가정한다. 이 경우 체크 포인팅 후 입력된 i5, i6, i7 및 상태 변형 히스토리(리니지)는 고장 복수 스토리지에 저장된 상태이다. i7를 처리한 시점에 고장이 발생했다고 가정하면 스파크 스트리밍 기반 장치는 마지막으로 체크포인팅된 입력 스트림 데이터 i5, i6, i7과 중간 상태 결과값 o4을 RDD로 적재한다. 그리고 f(i5, o4), f(i6, o5), f(i7, o6)을 연산하여 o7을 계산한다.6 (B) shows an example of restoring a fault using data ganged with a new checkpointing. It is assumed that new input stream data i 5 , i 6 , i 7 has been processed after backing up last state data o 4 . In this case, i 5 , i 6 , i 7 and state variation history (Lineage) input after checkpointing are stored in the failing multiple storages. Assuming that a failure occurred at the time of processing i 7 , the spark streaming based device loads the last checkpointed input stream data i 5 , i 6 , i 7 and the intermediate result value o 4 into the RDD. Then, f (i 5 , o 4 ), f (i 6 , o 5 ) and f (i 7 , o 6 ) are calculated to calculate o 7 .

도 7은 스파크 스트리밍 기반 장치의 아키텍처에 대한 예이다. 스파크 스트리밍 기반 장치는 하드웨어와 소프트웨어 구성으로 구분된다. 하드웨어 구성은 다수의 컴퓨팅 노드들이 LAN(local area network)으로 연결되어 있는 상태이다. 도 7은 스파크 스트리밍 기반 장치의 소프트웨어 구성을 나타낸다. 이 구성은 계층화된 아키텍처 (layered architecture)이며 하단부터 상단 순서로 설명 하면 다음과 같다. 각각의 노드마다 운영체제(operating system) 계층이 있다. 다수의 노드들에 걸쳐 분산 자원 관리(distributed resource management) 계층이 있다. 이 계층은 분산 파일 시스템(distributed file system)을 포함한다. 그 위에 데이터 분석 프레임워크가 있으며 여러 개의 잡(job)들을 수행한다. 잡은 여러 개의 태스크 (task)들로 구성된다. 이러한 구성에서 잡이 분산 파일 시스템을 통해 파일을 저장할 경우 파일 복제본 세 개가 서로 다른 노드에 저장된다. 잡이 파일을 읽는 경우 에는 그 세 개의 복제본들 중 하나에서 읽어온다. 전술한 고장 복구 시간 추정 및 체크포인팅 관리는 데이터 분석 프레임워크에 위치한다. 고장 복구 시간 추정 및 체크포인팅 관리는 프레임워크에 위치하는 소프트웨어적인 객체일 수 있다.Figure 7 is an example of an architecture for a spark streaming-based device. Spark streaming-based devices are divided into hardware and software configurations. In the hardware configuration, a plurality of computing nodes are connected to a local area network (LAN). 7 shows a software configuration of a spark streaming-based device. This configuration is a layered architecture and will be described in the order from the bottom to the top. Each node has an operating system layer. There is a distributed resource management layer across multiple nodes. This layer includes a distributed file system. On top of that, there is a data analysis framework and it performs several jobs. A task consists of several tasks. In this configuration, when a file is stored through a distributed file system, three copies of the file are stored on different nodes. When reading a job file, it reads from one of those three replicas. The aforementioned fault recovery time estimation and checkpointing management are located in the data analysis framework. Fault recovery time estimation and checkpointing management can be software-based objects located in the framework.

도 8은 스파크 스트리밍 기반 장치(300)의 구성을 도시한 블록도의 예이다. 스파크 스트리밍 기반 장치(300)는 LAN 네트워크 또는 경우에 따라서 무선 네트워크에 위치하는 컴퓨팅 장치이다. 하나의 서버와 같은 장치가 전술한 고장 복구 동작을 수행할 수 있다. 나아가 복수의 서버(마스터 노드 및 워커 노드)가 협력하여 전술한 고장 복구 동작을 수행할 수 있다. 고장 복구를 위한 누적 고장 복구 시간 추정 및 고장 복구 데이터 관리를 어느 하나의 장치가 수행한다고 가정한다. 8 is an example of a block diagram illustrating the configuration of a spark streaming-based device 300. As shown in FIG. Spark streaming based device 300 is a computing device that is located in a LAN network or possibly a wireless network. A device such as one server can perform the above-described failure recovery operation. Furthermore, a plurality of servers (master node and worker node) can cooperate to perform the above-described failure recovery operation. It is assumed that any one of the devices performs the cumulative failure recovery time estimation and the failure recovery data management for the failure recovery.

스파크 스트리밍 기반 장치(300)는 컴퓨팅 장치로서, 인터페이스 장치(310), 메모리 장치(320), 파일 시스템 장치(330) 및 연산 장치(340)를 포함한다. 인터페이스 장치(310)는 입력 스트리밍 데이터를 입력 받는 장치이다. 인터페이스 장치(310)는 네트워크를 통해 데이터를 입력받는 통신 모듈일 수 있다. 인터페이스 장치(310)는 다른 객체에 저장된 입력 스트림 데이터를 읽어들이는 장치일 수 있다. 메모리 장치(320)는 RDD 구조를 보유하는 장치이다. 스파크 스트리밍 기반 장치(300)는 복수를 수행하는 경우 입력 스트림 데이터 및 상태 데이터를 RDD에 적재한다. 즉, RDD 자료 구조로 변환하여 처리한다. 메모리 장치(320)는 RDD 구조를 갖는 데이터를 저장하는 객체이다. The spark streaming based device 300 is a computing device and includes an interface device 310, a memory device 320, a file system device 330 and a computing device 340. The interface device 310 is a device that receives input streaming data. The interface device 310 may be a communication module that receives data through a network. The interface device 310 may be a device for reading input stream data stored in another object. The memory device 320 is a device having an RDD structure. Spark streaming based device 300 loads input stream data and state data into the RDD when performing a plurality. That is, it is converted into an RDD data structure and processed. The memory device 320 is an object that stores data having an RDD structure.

파일 시스템 장치(330)는 기준시간 단위로 입력 스트리밍 데이터, 누적 변형 히스토리 및 상태 데이터를 저장한다. 즉, 파일 시스템 장치(330)는 전술한 고장 복구 스토리지 내지 고장 감내 스토리지에 해당한다. 파일 시스템 장치(330)는 고장 복구를 위해 필요한 데이터를 누적 관리한다.The file system device 330 stores input streaming data, cumulative variation history, and state data on a reference time basis. That is, the file system device 330 corresponds to the above-described failure-recovery storage or failure-in-failure storage. The file system device 330 cumulatively manages data necessary for failure recovery.

연산 장치(340)는 누적 고장 복구 시간을 추정하고, 고장 복구를 위한 데이터를 관리하는 명령을 생성한다. 연산 장치(340)는 물리적으로 연산 처리가 가능한 CPU, AP 또는 전술한 고장 복구 알고리즘이 소프트웨어가 임베딩된 칩셋 등일 수 있다. 전술한 고장 복구 알고리즘은 메모리 장치(320)나 별도의 저장 장치에 저장될 수도 있다. 연산 장치(340)는 입력 스트리밍 데이터에 대한 변형 히스토리를 생성하고, 입력 스트리밍 데이터에 대한 고장 복구 시간을 기반으로 전체 고장 복구 시간을 추정한다. 연산 장치(340)는 전체 고장 복구 시간이 임계값을 초과하면 저장된 상태 데이터 중 가장 최근 입력된 입력 스트리밍 데이터에 대한 상태 데이터인 타겟 상태 데이터(마지막 상태 데이터) 를 결정한다. 연산 장치(340)는 파일 시스템 장치(330)에 대하여 타겟 상태 데이터보다 전에 생성되어 저장된 상태 데이터 중 적어도 하나의 상태 데이터 및 타겟 상태 데이터가 생성되기 전에 입력되어 저장된 입력 스트리밍 데이터 중 적어도 하나의 입력 스트리밍 데이터를 삭제하라는 명령을 생성할 수 있다.The computing device 340 estimates the cumulative failure recovery time and generates an instruction to manage data for failure recovery. The computing device 340 may be a CPU, an AP, or a chipset in which the above-described failure recovery algorithm is embedded with software, which can be physically processed. The above-described failure recovery algorithm may be stored in the memory device 320 or in a separate storage device. The computing device 340 generates a variation history for the input streaming data and estimates the total failure recovery time based on the failure recovery time for the input streaming data. When the total failure recovery time exceeds the threshold, the computing device 340 determines the target state data (the last state data), which is the state data for the most recently input streaming data stored among the stored state data. The computing device 340 is operable to provide at least one input stream of at least one of the status data generated and stored prior to the target status data to the file system device 330 and the input stream data stored prior to the generation of the target status data You can create a command to delete the data.

본 실시례 및 본 명세서에 첨부된 도면은 전술한 기술에 포함되는 기술적 사상의 일부를 명확하게 나타내고 있는 것에 불과하며, 전술한 기술의 명세서 및 도면에 포함된 기술적 사상의 범위 내에서 당업자가 용이하게 유추할 수 있는 변형 예와 구체적인 실시례는 모두 전술한 기술의 권리범위에 포함되는 것이 자명하다고 할 것이다.The present embodiment and drawings attached hereto are only a part of the technical idea included in the above-described technology, and it is easy for a person skilled in the art to easily understand the technical idea included in the description of the above- It will be appreciated that variations that may be deduced and specific embodiments are included within the scope of the foregoing description.

300 : 스파크 스트리밍 기반 장치
310 : 인터페이스 장치
320 : 메모리 장치
330 : 파일 시스템 장치
340 : 연산 장치
300: Spark streaming-based device
310: Interface device
320: memory device
330: File system device
340:

Claims (10)

스파크 스트리밍 기반 장치가 기준시간 단위로 입력 스트리밍 데이터, 누적 변형 히스토리 및 상태 데이터를 고장 복구 스토리지에 저장하는 단계;
상기 장치가 상기 기준시간 단위로 상기 입력 스트리밍 데이터의 처리 시간 및 변형 시간을 합산한 시간을 기준으로 고장 복구 시간을 추정하고, 추정한 고장 복구 시간을 누적하여 전체 고장 복구 시간을 누적하는 단계;
상기 장치가 상기 전체 고장 복구 시간이 임계값을 초과하면 저장된 상태 데이터 중 가장 최근 입력된 입력 스트리밍 데이터에 대한 상태 데이터인 타겟 상태 데이터를 결정하는 단계; 및
상기 장치가 상기 고장 복구 스토리지에서 상기 타겟 상태 데이터보다 전에 생성되어 저장된 상태 데이터 중 적어도 하나의 상태 데이터 및 상기 타겟 상태 데이터가 생성되기 전에 입력되어 저장된 입력 스트리밍 데이터 중 적어도 하나의 입력 스트리밍 데이터를 삭제하는 단계를 포함하는 스파크 스트리밍 기반 장치에서의 고장 복구 방법.
Storing the input streaming data, the cumulative variation history and the state data in the fault recovery storage in units of a reference time, the spark streaming based apparatus comprising:
Estimating a failure recovery time based on a time obtained by summing the processing time and the deformation time of the input streaming data in units of the reference time and accumulating the total failure recovery time by accumulating the estimated failure recovery time;
Determining, when the device exceeds the total failure recovery time threshold, target state data that is state data for the most recently entered input streaming data among stored state data; And
The apparatus deletes at least one input streaming data among at least one of status data generated and stored before the target status data in the failure recovery storage and input streaming data input and stored before the target status data is generated A method for repairing a fault in a spark streaming-based device, comprising:
삭제delete 제1항에 있어서,
상기 장치는 상기 기준시간에 처리되는 개별 입력 스트리밍 데이터에 대한 고장 복구 시간을 추정하는 스파크 스트리밍 기반 장치에서의 고장 복구 방법.
The method according to claim 1,
Wherein the apparatus estimates the failure recovery time for the individual input streaming data processed at the reference time.
제1항에 있어서,
상기 장치가 상기 고장 복구 스토리지에 저장된 상태 데이터 중 상기 타겟 상태 데이터 전에 생성된 모든 상태 데이터 및 상기 고장 복구 스토리지에 저장된 입력 스트리밍 데이터 중 상기 타겟 상태 데이터가 생성되기 전에 입력된 모든 입력 스트리밍 데이터를 삭제하는 스파크 스트리밍 기반 장치에서의 고장 복구 방법.
The method according to claim 1,
The device deletes all of the status data generated before the target status data and the input streaming data stored in the failure recovery storage among the status data stored in the failure recovery storage, and all input streaming data entered before the target status data is generated Fault recovery method in a spark streaming based device.
제1항에 있어서,
상기 장치는 고장 발생 시점에 저장된 상태 데이터 및 입력 스트리밍 데이터를 이용하여 고장을 복구하는 단계를 더 포함하는 스파크 스트리밍 기반 장치에서의 고장 복구 방법.
The method according to claim 1,
Wherein the apparatus further comprises recovering the fault using state data and input streaming data stored at the time of the fault occurrence.
컴퓨터에서 상기 제1항, 제3항 내지 제5항 중 어느 하나의 항에 기재된 스파크 스트리밍 기반 장치에서의 고장 복구 방법을 실행하기 위한 프로그램을 기록한 컴퓨터로 읽을 수 있는 기록 매체.A computer-readable recording medium having recorded thereon a program for executing a failure recovery method in a spark streaming-based apparatus according to any one of claims 1 to 3. 입력 스트리밍 데이터를 입력 받는 인터페이스 장치;
상기 입력 스트리밍 데이터에 대한 RDD (resilient distributed dataset)를 보유하는 메모리 장치;
기준시간 단위로 입력 스트리밍 데이터, 누적 변형 히스토리 및 상태 데이터를 저장하는 파일 시스템 장치; 및
상기 기준시간 단위로 상기 입력 스트리밍 데이터의 처리 시간 및 변형 시간을 합산한 시간을 기준으로 고장 복구 시간을 추정하고, 추정한 고장 복구 시간을 누적하여 전체 고장 복구 시간을 추정하고, 상기 전체 고장 복구 시간이 임계값을 초과하면 저장된 상태 데이터 중 가장 최근 입력된 입력 스트리밍 데이터에 대한 상태 데이터인 타겟 상태 데이터를 결정하고,
상기 파일 시스템 장치에 대하여 상기 타겟 상태 데이터보다 전에 생성되어 저장된 상태 데이터 중 적어도 하나의 상태 데이터 및 상기 타겟 상태 데이터가 생성되기 전에 입력되어 저장된 입력 스트리밍 데이터 중 적어도 하나의 입력 스트리밍 데이터를 삭제하라는 명령을 생성하는 연산 장치를 포함하는 실시간 스트림 프로세싱을 지원하는 분산 장치.
An interface device for receiving input streaming data;
A memory device holding a resilient distributed dataset (RDD) for the input streaming data;
A file system device for storing input streaming data, cumulative variation history and state data in units of reference time; And
Estimating a failure recovery time based on a sum of a processing time and a deformation time of the input streaming data in units of the reference time, estimating a total failure recovery time by accumulating the estimated failure recovery time, Determines target state data, which is state data for the most recently input streaming data among the stored state data,
An instruction to delete at least one input streaming data among at least one of status data generated and stored before the target status data and input streaming data input and stored before the target status data is generated for the file system device And a computing device for generating real time stream processing.
삭제delete 제7항에 있어서,
상기 연산 장치는 상기 기준시간에 처리되는 개별 입력 스트리밍 데이터에 대한 고장 복구 시간을 추정하는 실시간 스트림 프로세싱을 지원하는 분산 장치.
8. The method of claim 7,
Wherein the computing device supports real-time stream processing for estimating a failure recovery time for individual input streaming data processed at the reference time.
제7항에 있어서,
상기 연산 장치는 저장된 상태 데이터 중 상기 타겟 상태 데이터 전에 생성된 모든 상태 데이터 및 저장된 입력 스트리밍 데이터 중 상기 타겟 상태 데이터가 생성되기 전에 입력된 모든 입력 스트리밍 데이터를 삭제하라는 명령을 생성하는 실시간 스트림 프로세싱을 지원하는 분산 장치.
8. The method of claim 7,
The computing device supports real-time stream processing for generating all of the state data generated before the target state data and stored input streaming data among the stored state data to delete all the inputted streaming data before the target state data is generated Lt; / RTI >
KR1020170164882A 2016-12-21 2017-12-04 Fault recovery method in spark streaming based apparatus and distributed apparatus supporting real-time processing KR101954001B1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
KR1020160176059 2016-12-21
KR20160176059 2016-12-21

Publications (2)

Publication Number Publication Date
KR20180072544A KR20180072544A (en) 2018-06-29
KR101954001B1 true KR101954001B1 (en) 2019-05-23

Family

ID=62781319

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020170164882A KR101954001B1 (en) 2016-12-21 2017-12-04 Fault recovery method in spark streaming based apparatus and distributed apparatus supporting real-time processing

Country Status (1)

Country Link
KR (1) KR101954001B1 (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8706985B1 (en) 2010-06-30 2014-04-22 Western Digital Technologies, Inc. System and method for optimizing garbage collection in data storage

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8458650B2 (en) 2010-03-29 2013-06-04 International Business Machines Corporation Injecting a fault into a stream operator in a data stream processing application

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8706985B1 (en) 2010-06-30 2014-04-22 Western Digital Technologies, Inc. System and method for optimizing garbage collection in data storage

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
"Resilient distributed datasets: A fault-tolerant abstraction for in-memory cluster computing." Proceedings of the 9th USENIX conference on Networked Systems Design and Implementation. USENIX Associat
"Discretized streams: Fault-tolerant streaming computation at scale", Matei Zaharia, et al., Proceedings of the Twenty-Fourth ACM Symposium on Operating Systems Principles(2013.11.)*

Also Published As

Publication number Publication date
KR20180072544A (en) 2018-06-29

Similar Documents

Publication Publication Date Title
US7549027B1 (en) System and method for managing replication of data in a data storage environment
US9454439B2 (en) Disaster recovery validation
US20200117548A1 (en) Optimized backup of clusters with multiple proxy servers
US7546428B1 (en) Computer architecture for managing replication of data in a data storage environment
US8132043B2 (en) Multistage system recovery framework
US10200470B1 (en) Data driven backup policy for data-centers and applications
CN105871603B (en) A kind of the real time streaming data processing fail recovery and method of data grids based on memory
JP5308403B2 (en) Data processing failure recovery method, system and program
US20200334199A1 (en) Automatic snapshot and journal retention systems with large data flushes using machine learning
JP6249016B2 (en) Fault recovery procedure generation device, fault recovery procedure generation method, and fault recovery procedure generation program
US20130198134A1 (en) Online verification of a standby database in log shipping physical replication environments
CN108647137B (en) Operation performance prediction method, device, medium, equipment and system
US20130166521A1 (en) Determining whether a selected backup set satisfies a retention policy
EP2888685A2 (en) Transaction-level health monitoring of online services
US11093358B2 (en) Methods and systems for proactive management of node failure in distributed computing systems
CN110825562B (en) Data backup method, device, system and storage medium
CN102833281A (en) Method, device and system for realizing distributed automatically-increasing counting
CN115562911B (en) Virtual machine data backup method, device, system, electronic equipment and storage medium
CN109842500B (en) Scheduling method and system, working node and monitoring node
US20230023053A1 (en) Data loss recovery in a secondary storage controller from a primary storage controller
US11533391B2 (en) State replication, allocation and failover in stream processing
CN101206596A (en) Method for restoration of system operation
JP6620609B2 (en) Distributed processing execution management program, distributed processing execution management method, and distributed processing execution management device
KR101954001B1 (en) Fault recovery method in spark streaming based apparatus and distributed apparatus supporting real-time processing
US10082969B2 (en) System and method for managing a storage system

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right
GRNT Written decision to grant