JP6990802B1 - Stream processing method for multi-center data co-computing based on Spark - Google Patents
Stream processing method for multi-center data co-computing based on Spark Download PDFInfo
- Publication number
- JP6990802B1 JP6990802B1 JP2021533418A JP2021533418A JP6990802B1 JP 6990802 B1 JP6990802 B1 JP 6990802B1 JP 2021533418 A JP2021533418 A JP 2021533418A JP 2021533418 A JP2021533418 A JP 2021533418A JP 6990802 B1 JP6990802 B1 JP 6990802B1
- Authority
- JP
- Japan
- Prior art keywords
- computing
- task
- client
- resource
- request
- Prior art date
- Legal status (The legal status 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 status listed.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/48—Program initiating; Program switching, e.g. by interrupt
- G06F9/4806—Task transfer initiation or dispatching
- G06F9/4843—Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5005—Allocation of resources, e.g. of the central processing unit [CPU] to service a request
- G06F9/5011—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
- G06F9/5016—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals the resource being the memory
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2209/00—Indexing scheme relating to G06F9/00
- G06F2209/50—Indexing scheme relating to G06F9/50
- G06F2209/5018—Thread allocation
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Multi Processors (AREA)
- Computer And Data Communications (AREA)
Abstract
【課題】本発明は、Sparkに基づくマルチセンターのデータ協調コンピューティングのストリーム処理方法を提供する。【解決手段】複数のクライアントは、ユーザーによるコンピューティングタスク要求を生成してコンピューティング端末に送信し、コンピューティング端末は、要求を解析し、コンピューティング命令を生成して実行する。本発明は、マルチセンターのデータコンピューティングの要求及び操作の、ストリーム処理コンピューティングを実行することにより、プログラム実行性能及びリソース割り当て効率を改善する。リソース管理ログとRESTFulを設定し、マルチセンターからのSpark要求タスクに占められ、要求されるメモリー及びスレッドリソースを正確に制御し記録する。マクシミン規準のポリシーを用いて、ストリームコンピューティングにおける各テップのリソース割り当てを実行する。本発明は、マルチセンターのデータ協調コンピューティングにおける数多くのスレッドによって引き起こされるブロッキング遅延という問題を解決して、単一のユーザーの待ち時間を減らし、リソース割り当ての柔軟性及び公平性を改善する。【選択図】図1PROBLEM TO BE SOLVED: To provide a stream processing method for multi-center data co-computing based on Spark. A plurality of clients generate a computing task request by a user and send it to a computing terminal, and the computing terminal analyzes the request, generates a computing instruction, and executes the request. The present invention improves program execution performance and resource allocation efficiency by performing stream processing computing of multi-center data computing requirements and operations. The resource management log and RESTFul are set, and the memory and thread resources requested are accurately controlled and recorded, which are occupied by the Spark request task from the multi-center. Perform resource allocation for each step in stream computing using the policies of the Maximin standard. The present invention solves the problem of blocking delays caused by numerous threads in multicenter data co-computing, reduces latency for a single user, and improves resource allocation flexibility and fairness. [Selection diagram] Fig. 1
Description
本発明は、ストリーム処理の技術分野に関し、特に、Sparkに基づくマルチセンターのデータ協調コンピューティングのストリーム処理方法に関する。 The present invention relates to the technical field of stream processing, and more particularly to a stream processing method of multi-center data co-computing based on Spark.
ストリーム処理技術(Stream Processing)は、コンピュータプログラミングのパラダイムであり、データストリームプログラミングやインタラクティブプログラミングとも呼ばれ、コンピューティングアプリケーションを、限られた並行処理モデルでより効率的に使用できるようにする技術である。このタイプの技術的なアプリケーションは、例えばグラフィックスプロセッシングユニット(Graphic Processing Unit、GPU)又は現場でプログラム可能なゲートアレイ(Field-programmable Gate Arrays、FPGA)などの様々な計算ユニットに存在することが可能であり、しかも、メモリの割り当て、同期及びユニット間のコミュニケーションを明示的に管理しない。Spark streamingは、SparkのコアAPIの拡張の一つであり、それがリアルタイムストリーミングデータの処理に対して、拡張性、高いスループット、フォールト・トレラントなどの特性を有している。提供される主なインタフェースは、コンテキストの作成Streaming Context、ストリーム開始start、ストリーム終了stop、キャッシュcache、Check pointingなどである。 Stream processing, also known as data stream programming or interactive programming, is a computer programming paradigm that enables computing applications to be used more efficiently with a limited concurrency model. .. This type of technical application can reside in various computing units such as graphics processing units (GPUs) or field programmable gate arrays (Field-programmable Gate Arrays, FPGAs). Moreover, it does not explicitly manage memory allocation, synchronization, and communication between units. Spark streaming is one of Spark's core API extensions, which have characteristics such as scalability, high throughput, and fault tolerance for the processing of real-time streaming data. The main interfaces provided are Streaming Context, stream start start, stream end stop, cache cache, Checkpointing, etc.
マルチセンターのデータ協調コンピューティングは、ビッグデータの背景に現れている応用シナリオであり、マルチパーティデータセンターは、より使用しやすく強力なデータ処理プラットフォームのリソースを個々の単一のユーザーに提供するために、データリソースとデータ処理の要求を統括する必要がある。個々の単一のユーザーは、自分のデータリソースと複数のデータリソースとを統合して集中的に解析することを選択してもよいし、複数の種類の演算要求を選択して、マルチセンター背景で並行コンピューティングを行ってもよい。 Multi-center data co-computing is an application scenario that emerges behind big data, as multi-party data centers provide the resources of a more user-friendly and powerful data processing platform to a single user. In addition, it is necessary to control data resources and data processing requirements. An individual single user may choose to integrate their data resources with multiple data resources for intensive analysis, or select multiple types of compute requests to create a multi-center background. You may perform concurrent computing with.
従来のマルチセンターにおける協調分析プラットフォームは、実質的な単一センターであることが多く、つまり、マルチパーティデータベースを同一箇所のデータノードにキャッシュし、さらに様々な分析要求を一つずつ処理し、実際にすべての並行を一つのストリームにデフォルトして行うことに等価であり、このような形態により、数多くのスレッドによって引き起こされるブロッキング遅延をもたらし、各パッチのキューにおける待ち時間が延長され、新たなユーザーからのコンピューティング要求が即時のフィードバックと満足を得ることが困難であり、データリアルタイム性も保持しにくい。 Traditional multi-center collaborative analysis platforms are often essentially a single center, that is, the multi-party database is cached in the same data node, and various analysis requests are processed one by one. Equivalent to defaulting all parallels to one stream, such a form results in blocking delays caused by many threads, increases latency in the queue for each patch, and new users. It is difficult to obtain immediate feedback and satisfaction from computing requests from, and it is also difficult to maintain data real-time performance.
本発明は、従来技術における欠陥に対して、Sparkに基づくマルチセンターのデータ協調コンピューティングのストリーム処理方法を提供することを目的とする。本発明は、リソース管理ログ及びSparkのストリームコンピューティングにより、マルチセンターのデータ協調コンピューティングへのストリーム処理を実現し、ストリーム処理のリソース割り当ての利点及びマルチセンター化のヘテロジニアスコンピューティング要求を結合し、マルチセンターの協調コンピューティングのリソース割り当ての公平性及びデータ分析効率を向上させ、コンピューティングキュータスクの待ち時間を短縮する。 It is an object of the present invention to provide a stream processing method for multi-center data co-computing based on Spark for defects in the prior art. The present invention realizes stream processing to multi-center data co-computing by resource management log and Spark stream computing, and combines the advantages of stream processing resource allocation with multi-centered heterogeneous computing requirements. Improves the fairness of resource allocation and data analysis efficiency of multi-center co-computing, and reduces the latency of computing queue tasks.
本発明の目的は、以下のような技術手段により実現される。
Sparkに基づくマルチセンターのデータ協調コンピューティングのストリーム処理方法であって、
当該方法は、マルチセンターのデータ協調コンピューティングシステムで実施されるものであり、前記マルチセンターのデータ協調コンピューティングシステムは、複数のクライアント及び一つのコンピューティング端末を含み、前記クライアントは、ユーザーによるコンピューティングタスク要求を生成してコンピューティング端末に送信するためのものであり、前記コンピューティング端末は、要求を解析して、コンピューティング命令を生成して実行するためのものであり、
当該方法は、
クライアント及びコンピューティング端末にRESTFulサービスを構築し、コンピューティングタスクキューを
とし、LがコンピューティングタスクキューQの長さであり、いずれか一つのクライアントckがコンピューティング端末に一つの新たなコンピューティングタスク要求tkを送信し、当該要求には、コンピューティングのスレッドリソース要求ntk、メモリーをコンピューティングする要求nmk、このタスクに対応するコンピューティングすべきデータDkを含む、ステップ(1)と、
コンピューティング端末は、クライアントckから送信されたコンピューティングタスク要求を解析して、
を取得する、ステップ(2)と、
コンピューティング端末は、
を一つのエレメントとして、コンピューティングタスクキューQに挿入してから、Scheduling計算を始め、Scheduling計算では、タスクキューQにおける各エレメントのコンピューティング要求の値をクライアントを単位とするマクシミン規準に従って最適化し、各エレメントのntk及びnmkを更新する、ステップ(3)と、
キュー
の長さ
をコンピューティングし、Lを循環境界条件として、Spark.Streaming Context(Spark.Streaming ContextがSparkフレームワークにおけるストリーム処理タスクの作成命令インタフェースである)により、
個のストリームを作成し、Spark.Conf(Spark.ConfがSparkフレームワークにおけるストリーム処理タスクの配置命令インタフェースである)により、各ストリームに割り当てられたリソースを宣言し、Sparkに実際のストリームタスクを順次送信することについて、データDkをロードし、データをコンピューティングタスクtkを実行し、割り当てられたスレッドリソースがntkとなり、メモリーリソースがnmkとなり、ただし、Dkには、中間結果及びコンピューティングタスクメタデータが存在すれば、直接にそれに対応するステップからタスクをコンピューティングし始め、
ストリーム1:データD1をロードし、データに対してコンピューティングタスクt1を実行し、割り当てられたスレッドリソースがnt1となり、メモリーリソースがnm1となり、
ストリーム2:データD2をロードし、データに対してコンピューティングタスクt2を実行し、割り当てられたスレッドリソースがnt2となり、メモリーリソースがnm2となり、
…
ストリームL:データDLをロードし、データに対してコンピューティングタスクtLを実行し、割り当てられたスレッドリソースがntLとなり、メモリーリソースがnmLとなるステップ(4)と、
ストリーム処理されているタスク
について、Streaming Context.Check Pointing(Streaming Context.Check PointingがSparkフレームワークにおけるストリーム処理タスクのデータ持続化命令インタフェースである)により、ストリーム処理過程におけるHDFSへのデータの読み取り、データの前処理キャッシュ、コンピューティング、戻りという四つのステップにおいて、データストリームを持続化させる操作を実行し、中間結果及びコンピューティングタスクメタデータをDlに記憶し、同時に、キューの更新状況を監視し、キューの更新を監視した場合、Streaming Context.stop(Streaming Context.stopがSparkフレームワークにおけるストリーム処理タスクの中止命令インタフェースである)により、当該ストリームを停止させ、ステップ(4)に戻り、ストリーム処理過程におけるコンピューティングタスクが完了した場合に、当該ストリーム処理タスクに対応するクライアントにタスク処理結果を返し、タスクをキューQから取り出す、ステップ(5)とを含む、Sparkに基づくマルチセンターのデータ協調コンピューティングのストリーム処理方法。
The object of the present invention is realized by the following technical means.
A stream processing method for multi-center data co-computing based on Spark.
The method is carried out in a multi-center data co-computing system, wherein the multi-center data co-computing system includes a plurality of clients and one computing terminal, wherein the clients are computing by a user. It is for generating an ing task request and sending it to a computing terminal, and the computing terminal is for analyzing a request to generate and execute a computing instruction.
The method is
Build RESTFul services on clients and computing terminals and create computing task queues
L is the length of the computing task queue Q, and any one of the client c k sends one new computing task request t k to the computing terminal, and the request is sent to the computing thread. Step (1), which includes a resource request nt k , a memory computing request nm k , and a computeable data D k corresponding to this task.
The computing terminal analyzes the computing task request sent from the client ck , and the computing terminal analyzes the computing task request.
To get step (2) and
Computing terminals
Is inserted into the computing task queue Q as one element, and then the Scheduling calculation is started. In the Scheduling calculation, the value of the computing request of each element in the task queue Q is optimized according to the Maximin standard for each client. Step (3), which updates nt k and nm k of each element,
queue
Length of
With L as the circular boundary condition, Spark. By Streaming Context (Spark. Streaming Context is an instruction interface for creating stream processing tasks in the Spark framework).
Create individual streams and use Spark. Data Dk for declaring the resources assigned to each stream by Conf ( Spark.Conf is the placement instruction interface for stream processing tasks in the Spark framework) and sequentially sending the actual stream tasks to Spark. Load and execute the computing task tk, the allocated thread resource is nt k , the memory resource is nm k , but if D k has intermediate results and computing task metadata. , Start computing the task directly from the corresponding step,
Stream 1: Load data D 1 , perform computing task t 1 on the data, the allocated thread resource becomes nt 1 , the memory resource becomes nm 1 and so on.
Stream 2: Load data D 2 , perform computing task t 2 on the data, the allocated thread resource becomes nt 2 , the memory resource becomes nm 2 .
…
Stream L : Load the data DL, execute the computing task t L on the data, the allocated thread resource becomes nt L , and the memory resource becomes nm L (4).
Tasks being streamed
About, Streaming Context. Check Pointing (Streaming Context. Check Pointing is the data sustaining instruction interface for stream processing tasks in the Spark framework) allows the data to be read into HDFS during the stream processing process, data preprocessing cache, computing, and return. In one step, if you perform an operation to sustain the data stream, store the intermediate results and computing task metadata in D l , and at the same time monitor the queue update status and monitor the queue update, Streaming Context. .. When the stream is stopped by stop (Streaming Context.stop is the stop instruction interface of the stream processing task in the Spark framework), the process returns to step (4), and the computing task in the stream processing process is completed. A stream processing method for multi-center data co-computing based on Spark, including step (5) of returning a task processing result to a client corresponding to a stream processing task and retrieving the task from queue Q.
さらに、前記ステップ(3)において、クライアントに基づくScheduling計算の流れは、以下の通りであり、
ステップ(3.1):キュー
であり、LがコンピューティングキューQの長さであることについて、クライアントに複数の記録が存在している場合に、まず、クライアントに従って加算し、クライアントを単位とする新たなキュー
を取得し、LmidがQmid長さであり、sjが各クライアントによって送信されたタスク総数であり、ntj
mid、nmj
midがそれぞれクライアントcjによって要求されたスレッドリソース総数及びメモリーリソース総数であり、
ステップ(3.2):スレッドリソースについて、以下のように最適化割り当ての流れを実行しており、
ステップ(3.2.1):すべてのクライアントのスレッドリソース要求総数キュー
について、サイズに従ってソートして
及び添え字マッピングM=
を取得し、コンピューティングセンターのコンピューティングリソースプールの総スレッドリソースをNTとすると、予めntj
midに与えられるリソースが
となり、
ステップ(3.2.2):
が存在している場合に、この集合が
とし、ステップ(3.2.3)に移行し、それ以外の場合は、最終的なスレッドリソース割り当てポリシー
を出力し、添え字マッピングにより、ソートする前に戻す順序に対応するスレッドリソース割り当てポリシー
を取得し、ステップ(3.2.4)に移行し、
ステップ(3.2.3):再割り当てする必要があるスレッドリソースが
であり、ただし、
がJのエレメントの数であり、ステップ(3.2.2)に戻り、
ステップ(3.2.4):同じクライアントに割り当てられたスレッドリソースを、当該クライアントと対応するすべてのタスクに均一に割り当て、同じcjにタスク
を対応させ、ただし、
がユーザーcjが実際に提出した一つのタスクtzに割り当てられたスレッドリソースであり、ntj
midがステップ(3.2.2)で得られた当該ユーザーに割り当てられたすべてのスレッドリソースであり、sjがユーザーcjによって送信されたタスクの総数であり、
ステップ(3.3):メモリーリソースについて、以下のように最適化割り当ての流れを実行しており、
ステップ(3.3.1):すべてのクライアントのメモリーリソース要求総数キュー
について、サイズに従ってソートして、
及び添え字マッピングM=
を取得し、コンピューティングセンターのコンピューティングリソースプールの総メモリーリソースをNMとすると、予めnmj
midに与えられるリソースが
となり、
ステップ(3.3.2):
が存在している場合に、この集合を
として、ステップ(3.2.3)に移行し、それ以外の場合は、最終的なメモリーリソース割り当てポリシー
を出力し、添え字マッピングにより、ソートする前に戻す順序に対応するメモリーリソース割り当てポリシー
を取得し、ステップ(3.2.4)に移行し、
ステップ(3.3.3):再割り当てする必要があるメモリーリソースが
であり、ただし、
がJのエレメントの数であり、ステップ(3.3.2)に戻り、
ステップ(3.3.4):同じクライアントに割り当てられたメモリーリソースを当該クライアントと対応するすべてのタスクに均一に割り当て、同一cjにタスク
,
を対応させ、ただし、
がユーザーcjが実際に提出した一つのタスクtzに割り当てられたメモリーリソースであり、nmj
midがステップ(3.2.2)で得られた当該ユーザーに割り当てられたすべてのメモリーリソースであり、sjがユーザーcjによって送信されたタスクの総数であり、
ステップ(3.4):ステップ(3.2)及びステップ(3.3)で得られた[ntk]及び[nmk]から、
]を再構成する。
Further, in the step (3), the flow of Scheduling calculation based on the client is as follows.
Step (3.1): Queue
If there are multiple records in the client regarding that L is the length of the computing queue Q, first, the queue is added according to the client, and a new queue in the client unit.
Is obtained, L mid is the Q mid length, s j is the total number of tasks sent by each client, and nt j mid and nm j mid are the total number of thread resources and memory resources requested by the client c j , respectively. Is the total number
Step (3.2): For thread resources, the flow of optimization allocation is executed as follows.
Step (3.2.1): Total number of thread resource requests queue for all clients
Sort by size
And subscript mapping M =
And if the total thread resource of the computing resource pool of the computing center is NT, the resource given to nt j mid in advance is
And
Step (3.2.2):
If is present, then this set
And move to step (3.2.3), otherwise the final thread resource allocation policy
Thread resource allocation policy corresponding to the order to return before sorting by subscript mapping
Is obtained, and the process proceeds to step (3.2.4).
Step (3.2.3): Thread resource that needs to be reassigned
However,
Is the number of elements of J, returning to step (3.2.2),
Step (3.2.4): Thread resources assigned to the same client are evenly allocated to all tasks corresponding to the client, and tasks are assigned to the same cj .
However,
Is the thread resource assigned to one task t z actually submitted by the user c j , and nt j mid is all the thread resources assigned to the user obtained in step (3.2.2). Yes, s j is the total number of tasks sent by user c j ,
Step (3.3): For memory resources, the flow of optimization allocation is executed as follows.
Step (3.3.1): Total memory resource request queue for all clients
Sort by size,
And subscript mapping M =
And if the total memory resource of the computing resource pool of the computing center is NM, the resource given to nm j mid in advance is
And
Step (3.3.2):
If is present, then this set
As a result, move to step (3.2.3), otherwise the final memory resource allocation policy.
And by subscript mapping, the memory resource allocation policy corresponding to the order to return before sorting
Is obtained, and the process proceeds to step (3.2.4).
Step (3.3.3): Memory resources that need to be reallocated
However,
Is the number of elements of J, returning to step (3.3.2),
Step (3.3.4): Allocate memory resources allocated to the same client evenly to all tasks corresponding to the client, and tasks to the same cj .
, ,
However,
Is the memory resource allocated to one task t z actually submitted by user c j , and nm j mid is all memory resources allocated to that user obtained in step (3.2.2). Yes, s j is the total number of tasks sent by user c j ,
Step (3.4): From [nt k ] and [nm k ] obtained in step (3.2) and step (3.3).
] Is reconstructed.
本発明による有益な効果は、以下の通りである。
本発明は、マルチセンターのデータコンピューティングの要求及び操作の、ストリーム処理コンピューティングを実行することにより、プログラム実行性能及びリソース割り当て効率を改善する。リソース管理ログとRESTFulを設定し、マルチセンターからのSpark要求タスクに占められ、要求されるメモリー及びスレッドリソースを正確に制御し記録する。マクシミン規準のポリシーを用いて、ストリームコンピューティングにおける各テップのリソース割り当てを実行する。本発明は、マルチセンターのデータ協調コンピューティングにおける数多くのスレッドによって引き起こされるブロッキング遅延という問題を解決して、単一のユーザーの待ち時間を減らし、リソース割り当ての柔軟性及び公平性を改善する。
The beneficial effects of the present invention are as follows.
The present invention improves program execution performance and resource allocation efficiency by performing stream processing computing of multi-center data computing requirements and operations. The resource management log and RESTFul are set, and the memory and thread resources requested are accurately controlled and recorded, which are occupied by the Spark request task from the multi-center. Perform resource allocation for each step in stream computing using the policies of the Maximin standard. The present invention solves the problem of blocking delays caused by numerous threads in multicenter data co-computing, reduces latency for a single user, and improves resource allocation flexibility and fairness.
以下に、図面及び具体的な実施例を参照しつつ、本発明をより詳しく説明する。
図1に示すように、本発明は、Sparkに基づくマルチセンターのデータ協調コンピューティングのストリーム処理方法を提供しており、当該方法は、マルチセンターのデータ協調コンピューティングシステムで実施されるものであり、前記マルチセンターのデータ協調コンピューティングシステムは、複数のクライアント及び一つのコンピューティング端末を含み、前記クライアントは、ユーザーによるコンピューティングタスク要求を生成してコンピューティング端末に送信するためのものであり、前記コンピューティング端末は、要求を解析して、コンピューティング命令を生成して実行するためのものであり、
当該方法は、
クライアント及びコンピューティング端末にRESTFulサービスを構築し、コンピューティングタスクキューを
とし、LがコンピューティングタスクキューQの長さであり、いずれか一つのクライアントckがコンピューティング端末に一つの新たなコンピューティングタスク要求tkを送信し、当該要求には、コンピューティングのスレッドリソース要求ntk、メモリーをコンピューティングする要求nmk、このタスクに対応するコンピューティングすべきデータDkを含む、ステップ(1)と、
コンピューティング端末は、クライアントckから送信されたコンピューティングタスク要求を解析して、
を取得する、ステップ(2)と、
コンピューティング端末は、
を一つのエレメントとして、コンピューティングタスクキューQに挿入してから、Scheduling計算を始め、Scheduling計算では、タスクキューQにおける各エレメントのコンピューティング要求の値をクライアントを単位とするマクシミン規準に従って最適化し、各エレメントのntk及びnmkを更新する、ステップ(3)と、
キュー
の長さ
をコンピューティングし、Lを循環境界条件として、Spark.Streaming Context(Spark.Streaming ContextがSparkフレームワークにおけるストリーム処理タスクの作成命令インタフェースである)により、
個のストリームを作成し、Spark.Conf(Spark.ConfがSparkフレームワークにおけるストリーム処理タスクの配置命令インタフェースである)により、各ストリームに割り当てられたリソースを宣言し、Sparkに実際のストリームタスクを順次送信することについて、データDkをロードし、データをコンピューティングタスクtkを実行し、割り当てられたスレッドリソースがntkとなり、メモリーリソースがnmkとなり、ただし、Dkには、中間結果及びコンピューティングタスクメタデータが存在すれば、直接にそれに対応するステップからタスクをコンピューティングし始め、
ストリーム1:データD1をロードし、データに対してコンピューティングタスクt1を実行し、割り当てられたスレッドリソースがnt1となり、メモリーリソースがnm1となり、
ストリーム2:データD2をロードし、データに対してコンピューティングタスクt2を実行し、割り当てられたスレッドリソースがnt2となり、メモリーリソースがnm2となり、
…
ストリームL:データDLをロードし、データに対してコンピューティングタスクtLを実行し、割り当てられたスレッドリソースがntLとなり、メモリーリソースがnmLとなるステップ(4)と、
ストリーム処理されているタスク
について、Streaming Context.Check Pointing(Streaming Context.Check PointingがSparkフレームワークにおけるストリーム処理タスクのデータ持続化命令インタフェースである)により、ストリーム処理過程におけるHDFSへのデータの読み取り、データの前処理キャッシュ、コンピューティング、戻りという四つのステップにおいて、データストリームを持続化させる操作を実行し、中間結果及びコンピューティングタスクメタデータをDlに記憶し、同時に、キューの更新状況を監視し、キューの更新を監視した場合、Streaming Context.stop(Streaming Context.stopがSparkフレームワークにおけるストリーム処理タスクの中止命令インタフェースである)により、当該ストリームを停止させ、ステップ(4)に戻り、ストリーム処理過程におけるコンピューティングタスクが完了した場合に、当該ストリーム処理タスクに対応するクライアントにタスク処理結果を返し、タスクをキューQから取り出す、ステップ(5)とを含む。
Hereinafter, the present invention will be described in more detail with reference to the drawings and specific examples.
As shown in FIG. 1, the present invention provides a stream processing method for multi-center data co-computing based on Spark, which method is implemented in a multi-center data co-computing system. The multi-center data co-computing system includes a plurality of clients and one computing terminal, the client for generating a computing task request by a user and transmitting it to the computing terminal. The computing terminal is for analyzing a request, generating a computing instruction, and executing the computing instruction.
The method is
Build RESTFul services on clients and computing terminals and create computing task queues
L is the length of the computing task queue Q, and any one of the client c k sends one new computing task request t k to the computing terminal, and the request is sent to the computing thread. Step (1), which includes a resource request nt k , a memory computing request nm k , and a computeable data D k corresponding to this task.
The computing terminal analyzes the computing task request sent from the client ck , and the computing terminal analyzes the computing task request.
To get step (2) and
Computing terminals
Is inserted into the computing task queue Q as one element, and then the Scheduling calculation is started. In the Scheduling calculation, the value of the computing request of each element in the task queue Q is optimized according to the Maximin standard for each client. Step (3), which updates nt k and nm k of each element,
queue
Length of
With L as the circular boundary condition, Spark. By Streaming Context (Spark. Streaming Context is an instruction interface for creating stream processing tasks in the Spark framework).
Create individual streams and use Spark. Data Dk for declaring the resources assigned to each stream by Conf ( Spark.Conf is the placement instruction interface for stream processing tasks in the Spark framework) and sequentially sending the actual stream tasks to Spark. Load and execute the computing task tk, the allocated thread resource is nt k , the memory resource is nm k , but if D k has intermediate results and computing task metadata. , Start computing the task directly from the corresponding step,
Stream 1: Load data D 1 , perform computing task t 1 on the data, the allocated thread resource becomes nt 1 , the memory resource becomes nm 1 and so on.
Stream 2: Load data D 2 , perform computing task t 2 on the data, the allocated thread resource becomes nt 2 , the memory resource becomes nm 2 .
…
Stream L : Load the data DL, execute the computing task t L on the data, the allocated thread resource becomes nt L , and the memory resource becomes nm L (4).
Tasks being streamed
About, Streaming Context. Check Pointing (Streaming Context. Check Pointing is the data sustaining instruction interface for stream processing tasks in the Spark framework) allows the data to be read into HDFS during the stream processing process, data preprocessing cache, computing, and return. In one step, if you perform an operation to sustain the data stream, store the intermediate results and computing task metadata in D l , and at the same time monitor the queue update status and monitor the queue update, Streaming Context. .. When the stream is stopped by stop (Streaming Context.stop is the stop instruction interface of the stream processing task in the Spark framework), the process returns to step (4), and the computing task in the stream processing process is completed. This includes step (5) of returning the task processing result to the client corresponding to the stream processing task and retrieving the task from the queue Q.
さらに、前記ステップ(3)において、クライアントに基づくScheduling計算流れは、以下の通りである。
ステップ(3.1):キュー
であり、LがコンピューティングキューQの長さであることについて、クライアントに複数の記録が存在している場合に、まず、クライアントに従って加算し、クライアントを単位とする新たなキュー
を取得し、LmidがQmid長さであり、sjが各クライアントによって送信されたタスク総数であり、ntj
mid、nmj
midがそれぞれクライアントcjによって要求されたスレッドリソース総数及びメモリーリソース総数であり、
ステップ(3.2):スレッドリソースについて、以下のように最適化割り当ての流れを実行しており、
ステップ(3.2.1):すべてのクライアントのスレッドリソース要求総数キュー
について、サイズに従ってソートして
及び添え字マッピングM=
を取得し、コンピューティングセンターのコンピューティングリソースプールの総スレッドリソースをNTとすると、予めntj
midに与えられるリソースが
となり、
ステップ(3.2.2):
が存在している場合に、この集合が
とし、ステップ(3.2.3)に移行し、それ以外の場合は、最終的なスレッドリソース割り当てポリシー
を出力し、添え字マッピングにより、ソートする前に戻す順序に対応するスレッドリソース割り当てポリシー
を取得し、ステップ(3.2.4)に移行し、
ステップ(3.2.3):再割り当てする必要があるスレッドリソースが
であり、ただし、
がJのエレメントの数であり、ステップ(3.2.2)に戻り、
ステップ(3.2.4):同じクライアントに割り当てられたスレッドリソースを、当該クライアントと対応するすべてのタスクに均一に割り当て、同じcjにタスク
を対応させ、ただし、
がユーザーcjが実際に提出した一つのタスクtzに割り当てられたスレッドリソースであり、ntj
midがステップ(3.2.2)で得られた当該ユーザーに割り当てられたすべてのスレッドリソースであり、sjがユーザーcjによって送信されたタスクの総数であり、
ステップ(3.3):メモリーリソースについて、以下のように最適化割り当ての流れを実行しており、
ステップ(3.3.1):すべてのクライアントのメモリーリソース要求総数キュー
について、サイズに従ってソートして、
及び添え字マッピングM=
を取得し、コンピューティングセンターのコンピューティングリソースプールの総メモリーリソースをNMとすると、予めnmj
midに与えられるリソースが
となり、
ステップ(3.3.2):
が存在している場合に、この集合を
として、ステップ(3.2.3)に移行し、それ以外の場合は、最終的なメモリーリソース割り当てポリシー
を出力し、添え字マッピングにより、ソートする前に戻す順序に対応するメモリーリソース割り当てポリシー
を取得し、ステップ(3.2.4)に移行し、
ステップ(3.3.3):再割り当てする必要があるメモリーリソースが
であり、ただし、
がJのエレメントの数であり、ステップ(3.3.2)に戻り、
ステップ(3.3.4):同じクライアントに割り当てられたメモリーリソースを当該クライアントと対応するすべてのタスクに均一に割り当て、同一cjにタスク
,
を対応させ、ただし、
がユーザーcjが実際に提出した一つのタスクtzに割り当てられたメモリーリソースであり、nmj
midがステップ(3.2.2)で得られた当該ユーザーに割り当てられたすべてのメモリーリソースであり、sjがユーザーcjによって送信されたタスクの総数であり、
ステップ(3.4):ステップ(3.2)及びステップ(3.3)で得られた[ntk]及び[nmk]から、
]を再構成する。
Further, in the step (3), the Scheduling calculation flow based on the client is as follows.
Step (3.1): Queue
If there are multiple records in the client regarding that L is the length of the computing queue Q, first, the queue is added according to the client, and a new queue in the client unit.
Is obtained, L mid is the Q mid length, s j is the total number of tasks sent by each client, and nt j mid and nm j mid are the total number of thread resources and memory resources requested by the client c j , respectively. Is the total number
Step (3.2): For thread resources, the flow of optimization allocation is executed as follows.
Step (3.2.1): Total number of thread resource requests queue for all clients
Sort by size
And subscript mapping M =
And if the total thread resource of the computing resource pool of the computing center is NT, the resource given to nt j mid in advance is
And
Step (3.2.2):
If is present, then this set
And move to step (3.2.3), otherwise the final thread resource allocation policy
Thread resource allocation policy corresponding to the order to return before sorting by subscript mapping
Is obtained, and the process proceeds to step (3.2.4).
Step (3.2.3): Thread resource that needs to be reassigned
However,
Is the number of elements of J, returning to step (3.2.2),
Step (3.2.4): Thread resources assigned to the same client are evenly allocated to all tasks corresponding to the client, and tasks are assigned to the same cj .
However,
Is the thread resource assigned to one task t z actually submitted by the user c j , and nt j mid is all the thread resources assigned to the user obtained in step (3.2.2). Yes, s j is the total number of tasks sent by user c j ,
Step (3.3): For memory resources, the flow of optimization allocation is executed as follows.
Step (3.3.1): Total memory resource request queue for all clients
Sort by size,
And subscript mapping M =
And if the total memory resource of the computing resource pool of the computing center is NM, the resource given to nm j mid in advance is
And
Step (3.3.2):
If is present, then this set
As a result, move to step (3.2.3), otherwise the final memory resource allocation policy.
And by subscript mapping, the memory resource allocation policy corresponding to the order to return before sorting
Is obtained, and the process proceeds to step (3.2.4).
Step (3.3.3): Memory resources that need to be reallocated
However,
Is the number of elements of J, returning to step (3.3.2),
Step (3.3.4): Allocate memory resources allocated to the same client evenly to all tasks corresponding to the client, and tasks to the same cj .
, ,
However,
Is the memory resource allocated to one task t z actually submitted by user c j , and nm j mid is all memory resources allocated to that user obtained in step (3.2.2). Yes, s j is the total number of tasks sent by user c j ,
Step (3.4): From [nt k ] and [nm k ] obtained in step (3.2) and step (3.3).
] Is reconstructed.
以下に、本発明に係るSparkに基づくマルチセンターのデータ協調コンピューティングのストリーム処理方法を、マルチセンターの医学データ協調コンピューティングプラットフォーム上に適用する一つの具体的な実施例を示し、当該実施例は、具体的に、以下のステップを含む。
ステップ(1):クライアント(三つの病院)及びコンピューティング端末(データセンター)に、RESTFulサービスを構築し、コンピューティングタスクキューを、以下の式とする。
ステップ(2):コンピューティング端末は、クライアントciから送信されたコンピューティングタスク要求を解析して、
を取得する。
ステップ(3):コンピューティング端末は、
を一つのエレメントとして、コンピューティングタスクキュー
に挿入する。
ステップ(3.1):次のキューについて
ステップ(3.2):スレッドリソースについて、次のように最適化割り当ての流れを実行しており、
ステップ(3.2.1):すべてのクライアントのスレッドリソース要求総数キュー[8,12,16]について、サイズに従ってソートして、[8,12,16]及び添え字マッピングM=[1,2,3]を取得し、コンピューティングセンターのコンピューティングリソースプールの総スレッドリソースをNT=32とすると、予め[8,12,16]に与えられるリソースが[10,10,12]となる。
ステップ(3.2.2):
が存在している場合に、この集合を
とし、ステップ(3.2.3)に移行する。
ステップ(3.2.3):再割り当てする必要があるスレッドリソースが
であり、ただし、
がJのエレメントの数であり、
であり、ステップ(3.2.2)に戻る。
ステップ(3.2.2):
が存在していない場合、最終的なスレッドリソース割り当てポリシー
を出力し、添え字マッピングにより、ソートする前に戻す順序に対応するメモリーリソース割り当てポリシー
を取得し、ステップ(3.2.4)に移行する。
ステップ(3.2.4):同一“hospital2”にタスク
を対応させる。
ステップ(3.3):メモリーリソースについて、以下のように、最適化割り当ての流れを実行しており、
ステップ(3.3.1):すべてのクライアントのメモリーリソース要求総数キュー
について、サイズに従ってソートして、
及び添え字マッピングM=
を取得し、コンピューティングセンターのコンピューティングリソースプールの総メモリーリソースを
、予め
に与えられるリソースが
となる。
ステップ(3.3.2):
が存在している場合、この集合を、
とし、ステップ(3.3.3)に移行する。
ステップ(3.3.3):再割り当てする必要があるメモリーリソースが
,
であり、ただし、
がJのエレメントの数であり、ステップ(3.3.2)に戻る。
ステップ(3.3.2):
が存在していない場合、最終的なスレッドリソース割り当てポリシー
を出力し、添え字マッピングにより、ソートする前に戻す順序に対応するメモリーリソース割り当てポリシー
を取得し、ステップ(3.3.4)に移行する。
ステップ(3.3.4):同一の“hospital2”にタスク
,
を対応させる。
ステップ(3.4):ステップ(3.2)及びステップ(3.3)で得られた[ntk]及び[nmk]から、次の式を再構成する。
であり、4を循環境界条件として、Spark.Streaming Context(Spark.Streaming ContextがSparkフレームワークにおけるストリーム処理タスクの作成命令インタフェースである)により、4個のストリームを作成し、Spark.Conf(Spark.ConfがSparkフレームワークにおけるストリーム処理タスクの配置命令インタフェースである)により、各ストリームに割り当てられたリソースを宣言し、Sparkに実際のストリームタスクを順次送信することについて、
ストリーム1:データ“path1”をロードし、データに対してコンピューティングタスク“task1”を実行し、割り当てられたスレッドリソースが9となり、メモリーリソースが4となる。
ストリーム2:データ“path2”をロードし、データに対してコンピューティングタスク“task2”を実行し、割り当てられたスレッドリソースが9となり、メモリーリソースが9となる。
ストリーム3:データ“path3”をロードし、データにコンピューティングタス“task3”を実行し、割り当てられたスレッドリソースが4となり、メモリーリソースが9となる。
ストリーム4:データ“path4”をロードし、データにコンピューティングタスク“task4”を実行し、割り当てられたスレッドリソースが10となり、メモリーリソースが10となる。
ただし、ストリーム1、ストリーム2、ストリーム3を検査すると、中間結果及びコンピューティングタスクメタデータが存在している場合に、直接に、それに対応するステップからタスクをコンピューティングし始める。
(5):ストリーム処理されているタスクについて、
Step (1): Build a RESTFul service on a client (three hospitals) and a computing terminal (data center), and use the following formula for the computing task queue.
Step (2): The computing terminal analyzes the computing task request sent from the client ci , and then
To get.
Step (3): The computing terminal
As one element, the computing task queue
Insert in.
Step (3.1): About the next queue
Step (3.2): For thread resources, the flow of optimization allocation is executed as follows.
Step (3.2.1): Total number of thread resource requests for all clients [8,12,16] sorted by size [8,12,16] and subscript mapping M = [1,2] If, 3] is acquired and the total thread resource of the computing resource pool of the computing center is NT = 32, the resource given to [8,12,16] in advance becomes [10,10,12].
Step (3.2.2):
If is present, then this set
Then, the process proceeds to step (3.2.3).
Step (3.2.3): Thread resource that needs to be reassigned
However,
Is the number of elements of J,
Then, the process returns to step (3.2.2).
Step (3.2.2):
If does not exist, the final thread resource allocation policy
And by subscript mapping, the memory resource allocation policy corresponding to the order to return before sorting
Is acquired, and the process proceeds to step (3.2.4).
Step (3.2.4): Task on the same "hospital2"
To correspond.
Step (3.3): For the memory resource, the flow of optimization allocation is executed as follows.
Step (3.3.1): Total memory resource request queue for all clients
Sort by size,
And subscript mapping M =
And get the total memory resources of the compute resource pool in the compute center
, In advance
The resources given to
Will be.
Step (3.3.2):
If exists, this set,
Then, the process proceeds to step (3.3.3).
Step (3.3.3): Memory resources that need to be reallocated
, ,
However,
Is the number of elements of J, and returns to step (3.3.2).
Step (3.3.2):
If does not exist, the final thread resource allocation policy
And by subscript mapping, the memory resource allocation policy corresponding to the order to return before sorting
Is acquired, and the process proceeds to step (3.3.4).
Step (3.3.4): Task on the same “hospital2”
, ,
To correspond.
Step (3.4): From the [nt k ] and [nm k ] obtained in step (3.2) and step (3.3), the following equation is reconstructed.
With 4 as the circulation boundary condition, Spark. Four streams are created by the Streaming Context (Spark. Streaming Context is an instruction interface for creating a stream processing task in the Spark framework), and Spark. Conf (Spark.Conf is the placement instruction interface for stream processing tasks in the Spark framework) declares the resources assigned to each stream and sequentially sends the actual stream tasks to Spark.
Stream 1: Load the data "path1", execute the computing task "task1" on the data, the allocated thread resource becomes 9, and the memory resource becomes 4.
Stream 2: The data “path2” is loaded, the computing task “task2” is executed on the data, the allocated thread resource becomes 9, and the memory resource becomes 9.
Stream 3: Load the data "path3", execute the computing task "task3" on the data, the allocated thread resource becomes 4, and the memory resource becomes 9.
Stream 4: Load the data "path4", execute the computing task "task4" on the data, the allocated thread resource becomes 10, and the memory resource becomes 10.
However, when the stream 1, stream 2, and stream 3 are inspected, if intermediate results and computing task metadata are present, the task is directly started to be computed from the corresponding step.
(5): For tasks that are being streamed
以上は、本発明の実施例に過ぎず、本発明の保護範囲を限定するものではない。本発明の趣旨及び原則を逸脱しない限り創造的労働を経ずに行われたいかなる修正、均等置換や改良などは、いずれも本発明の保護範囲に含まれる。
The above is only an embodiment of the present invention and does not limit the scope of protection of the present invention. Any modifications, even substitutions or improvements made without creative labor, as long as they do not deviate from the spirit and principles of the invention, are all within the scope of the invention.
Claims (2)
当該方法は、マルチセンターのデータ協調コンピューティングシステムで実施されるものであり、前記マルチセンターのデータ協調コンピューティングシステムは、複数のクライアント及び一つのコンピューティング端末を含み、前記クライアントは、ユーザーによるコンピューティングタスク要求を生成してコンピューティング端末に送信するためのものであり、前記コンピューティング端末は、要求を解析して、コンピューティング命令を生成して実行するためのものであり、
当該方法は、
クライアント及びコンピューティング端末にRESTFulサービスを構築し、コンピューティングタスクキューを
とし、LがコンピューティングタスクキューQの長さであり、いずれか一つのクライアントckがコンピューティング端末に一つの新たなコンピューティングタスク要求tkを送信し、当該要求には、コンピューティングのスレッドリソース要求ntk、メモリーをコンピューティングする要求nmk、このタスクに対応するコンピューティングすべきデータDkを含む、ステップ(1)と、
コンピューティング端末は、クライアントckから送信されたコンピューティングタスク要求を解析して、
を取得する、ステップ(2)と、
コンピューティング端末は、
を一つのエレメントとして、コンピューティングタスクキューQに挿入してから、Scheduling計算を始め、Scheduling計算では、タスクキューQにおける各エレメントのコンピューティング要求の値をクライアントを単位とするマクシミン規準に従って最適化し、各エレメントのntk及びnmkを更新する、ステップ(3)と、
キューQの長さ
をコンピューティングし、Lを循環境界条件として、Spark.Streaming Contextにより、L個のストリームを作成し、Spark.Confにより各ストリームに割り当てられたリソースを宣言し、Sparkに実際のストリームタスクkを順次送信することについて、データDkをロードし、コンピューティングタスクtkを実行し、コンピューティングのスレッドリソース要求ntkが満たされるスレッド数を割り当て、コンピューティングメモリーが満たされる要求nmkを割り当て、ただし、Dkに中間結果及びコンピューティングタスクメタデータが存在すれば、直接に、それに対応するステップからタスクをコンピューティングし始める、ステップ(4)と、
ストリーム処理されているタスク
について、Streaming Context.Check Pointingにより、ストリーム処理過程におけるHDFSへのデータの読み取り、データの前処理キャッシュ、コンピューティング、戻りという四つのステップにおいて、データストリームを持続化させる操作を実行し、中間結果及びコンピューティングタスクメタデータをDlに記憶し、同時に、キューの更新状況を監視し、キューの更新を監視した場合、Streaming Context.stopにより、当該ストリームを停止させ、ステップ(4)に戻り、ストリーム処理過程におけるコンピューティングタスクが完了した場合に、当該ストリーム処理タスクに対応するクライアントにタスク処理結果を返し、タスクをキューQから取り出す、ステップ(5)と、を含むことを特徴とするSparkに基づくマルチセンターのデータ協調コンピューティングのストリーム処理方法。 A stream processing method for multi-center data co-computing based on Spark.
The method is carried out in a multi-center data co-computing system, wherein the multi-center data co-computing system includes a plurality of clients and one computing terminal, wherein the clients are computing by a user. It is for generating an ing task request and sending it to a computing terminal, and the computing terminal is for analyzing a request to generate and execute a computing instruction.
The method is
Build RESTFul services on clients and computing terminals and create computing task queues
L is the length of the computing task queue Q, and any one of the client c k sends one new computing task request t k to the computing terminal, and the request is sent to the computing thread. Step (1), which includes a resource request nt k , a memory computing request nm k , and a computeable data D k corresponding to this task.
The computing terminal analyzes the computing task request sent from the client ck , and the computing terminal analyzes the computing task request.
To get step (2) and
Computing terminals
Is inserted into the computing task queue Q as one element, and then the Scheduling calculation is started. In the Scheduling calculation, the value of the computing request of each element in the task queue Q is optimized according to the Maximin standard for each client. Step (3), which updates nt k and nm k of each element,
Cue Q length
With L as the circular boundary condition, Spark. By Streaming Context, L streams were created, and Spark. For declaring the resources allocated to each stream by Conf and sequentially sending the actual stream task k to Spark, load the data Dk , execute the computing task tk, and request the computing thread resource nt. Allocate the number of threads that satisfy k , allocate the required nm k that compute memory is satisfied, but if D k has intermediate results and compute task metadata, compute the task directly from the corresponding step. Start ing, step (4),
Tasks being streamed
About, Streaming Context. Check Pointing performs operations to sustain the data stream in four steps: reading the data to the HDFS during the stream processing process, preprocessing data cache, computing, and returning, with intermediate results and computing task metadata. Is stored in D l , and at the same time, the update status of the queue is monitored, and when the update of the queue is monitored, Streaming Context. By stop, the stream is stopped, the process returns to step (4), and when the computing task in the stream processing process is completed, the task processing result is returned to the client corresponding to the stream processing task, and the task is fetched from the queue Q. , Step (5), and a Spark-based multicenter data co-computing stream processing method comprising.
ステップ(3.1):キュー
であり、LがコンピューティングキューQの長さであることについて、クライアントに複数の記録が存在している場合に、まず、クライアントに従って加算し、クライアントを単位とする新たなキュー
を取得し、LmidがQmid長さであり、sjが各クライアントによって送信されたタスク総数であり、ntj mid、nmj midがそれぞれクライアントcjによって要求されたスレッドリソース総数及びメモリーリソース総数であり、
ステップ(3.2):スレッドリソースについて、以下のように最適化割り当ての流れを実行しており、
ステップ(3.2.1):すべてのクライアントのスレッドリソース要求総数キュー
について、サイズに従ってソートして
及び添え字マッピングM=
を取得し、コンピューティングセンターのコンピューティングリソースプールの総スレッドリソースをNTとすると、予めntj midに与えられるリソースが
となり、
ステップ(3.2.2):
が存在している場合に、この集合が
とし、ステップ(3.2.3)に移行し、それ以外の場合は、最終的なスレッドリソース割り当てポリシー
を出力し、添え字マッピングにより、ソートする前に戻す順序に対応するスレッドリソース割り当てポリシー
を取得し、ステップ(3.2.4)に移行し、
ステップ(3.2.3):再割り当てする必要があるスレッドリソースが
であり、ただし、
がJのエレメントの数であり、ステップ(3.2.2)に戻り、
ステップ(3.2.4):同じクライアントに割り当てられたスレッドリソースを、当該クライアントと対応するすべてのタスクに均一に割り当て、同じcjにタスク
を対応させ、ただし、
がユーザーcjが実際に提出した一つのタスクtzに割り当てられたスレッドリソースであり、ntj midがステップ(3.2.2)で得られた当該ユーザーに割り当てられたすべてのスレッドリソースであり、sjがユーザーcjによって送信されたタスクの総数であり、
ステップ(3.3):メモリーリソースについて、以下のように最適化割り当ての流れを実行しており、
ステップ(3.3.1):すべてのクライアントのメモリーリソース要求総数キュー
について、サイズに従ってソートして、
及び添え字マッピングM=
を取得し、コンピューティングセンターのコンピューティングリソースプールの総メモリーリソースをNMとすると、予めnmj midに与えられるリソースが
となり、
ステップ(3.3.2):
が存在している場合に、この集合を
として、ステップ(3.2.3)に移行し、それ以外の場合は、最終的なメモリーリソース割り当てポリシー
を出力し、添え字マッピングにより、ソートする前に戻す順序に対応するメモリーリソース割り当てポリシー
を取得し、ステップ(3.2.4)に移行し、
ステップ(3.3.3):再割り当てする必要があるメモリーリソースが
であり、ただし、
がJのエレメントの数であり、ステップ(3.3.2)に戻り、
ステップ(3.3.4):同じクライアントに割り当てられたメモリーリソースを当該クライアントと対応するすべてのタスクに均一に割り当て、同一cjにタスク
,
を対応させ、ただし、
がユーザーcjが実際に提出した一つのタスクtzに割り当てられたメモリーリソースであり、nmj midがステップ(3.2.2)で得られた当該ユーザーに割り当てられたすべてのメモリーリソースであり、sjがユーザーcjによって送信されたタスクの総数であり、
ステップ(3.4):ステップ(3.2)及びステップ(3.3)で得られた[ntk]及び[nmk]から、
]を再構成することを特徴とする請求項1に記載のSparkに基づくマルチセンターのデータ協調コンピューティングのストリーム処理方法。
In step (3), the flow of Scheduling calculation based on the client is as follows.
Step (3.1): Queue
If there are multiple records in the client regarding that L is the length of the computing queue Q, first, the queue is added according to the client, and a new queue in the client unit.
Is obtained, L mid is the Q mid length, s j is the total number of tasks sent by each client, and nt j mid and nm j mid are the total number of thread resources and memory resources requested by the client c j , respectively. Is the total number
Step (3.2): For thread resources, the flow of optimization allocation is executed as follows.
Step (3.2.1): Total number of thread resource requests queue for all clients
Sort by size
And subscript mapping M =
And if the total thread resource of the computing resource pool of the computing center is NT, the resource given to nt j mid in advance is
And
Step (3.2.2):
If is present, then this set
And move to step (3.2.3), otherwise the final thread resource allocation policy
Thread resource allocation policy corresponding to the order to return before sorting by subscript mapping
Is obtained, and the process proceeds to step (3.2.4).
Step (3.2.3): Thread resource that needs to be reassigned
However,
Is the number of elements of J, returning to step (3.2.2),
Step (3.2.4): Thread resources assigned to the same client are evenly allocated to all tasks corresponding to the client, and tasks are assigned to the same cj .
However,
Is the thread resource assigned to one task t z actually submitted by the user c j , and nt j mid is all the thread resources assigned to the user obtained in step (3.2.2). Yes, s j is the total number of tasks sent by user c j ,
Step (3.3): For memory resources, the flow of optimization allocation is executed as follows.
Step (3.3.1): Total memory resource request queue for all clients
Sort by size,
And subscript mapping M =
And if the total memory resource of the computing resource pool of the computing center is NM, the resource given to nm j mid in advance is
And
Step (3.3.2):
If is present, then this set
As a result, move to step (3.2.3), otherwise the final memory resource allocation policy.
And by subscript mapping, the memory resource allocation policy corresponding to the order to return before sorting
Is obtained, and the process proceeds to step (3.2.4).
Step (3.3.3): Memory resources that need to be reallocated
However,
Is the number of elements of J, returning to step (3.3.2),
Step (3.3.4): Allocate memory resources allocated to the same client evenly to all tasks corresponding to the client, and tasks to the same cj .
, ,
However,
Is the memory resource allocated to one task t z actually submitted by user c j , and nm j mid is all memory resources allocated to that user obtained in step (3.2.2). Yes, s j is the total number of tasks sent by user c j ,
Step (3.4): From [nt k ] and [nm k ] obtained in step (3.2) and step (3.3).
] The stream processing method of the multi-center data co-computing based on Spark according to claim 1.
Applications Claiming Priority (3)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910629253.8A CN110347489B (en) | 2019-07-12 | 2019-07-12 | Multi-center data collaborative computing stream processing method based on Spark |
CN201910629253.8 | 2019-07-12 | ||
PCT/CN2020/083593 WO2020233262A1 (en) | 2019-07-12 | 2020-04-07 | Spark-based multi-center data collaborative computing stream processing method |
Publications (2)
Publication Number | Publication Date |
---|---|
JP6990802B1 true JP6990802B1 (en) | 2022-01-12 |
JP2022508354A JP2022508354A (en) | 2022-01-19 |
Family
ID=68176115
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2021533418A Active JP6990802B1 (en) | 2019-07-12 | 2020-04-07 | Stream processing method for multi-center data co-computing based on Spark |
Country Status (3)
Country | Link |
---|---|
JP (1) | JP6990802B1 (en) |
CN (1) | CN110347489B (en) |
WO (1) | WO2020233262A1 (en) |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110347489B (en) * | 2019-07-12 | 2021-08-03 | 之江实验室 | Multi-center data collaborative computing stream processing method based on Spark |
CN110955526B (en) * | 2019-12-16 | 2022-10-21 | 湖南大学 | Method and system for realizing multi-GPU scheduling in distributed heterogeneous environment |
CN115081936B (en) * | 2022-07-21 | 2022-11-18 | 之江实验室 | Method and device for scheduling observation tasks of multiple remote sensing satellites under emergency condition |
CN115242877B (en) * | 2022-09-21 | 2023-01-24 | 之江实验室 | Spark collaborative computing and operating method and device for multiple K8s clusters |
US11954525B1 (en) | 2022-09-21 | 2024-04-09 | Zhejiang Lab | Method and apparatus of executing collaborative job for spark faced to multiple K8s clusters |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101009642A (en) | 2006-12-31 | 2007-08-01 | 华为技术有限公司 | A resource allocation method and device based on the task packet |
US20160335135A1 (en) | 2015-05-14 | 2016-11-17 | Tmaxsoft. Co., Ltd. | Method for minimizing lock contention among threads when tasks are distributed in multithreaded system and appratus using the same |
US20170060641A1 (en) | 2015-08-28 | 2017-03-02 | Vmware, Inc. | Pluggable Engine for Application Specific Schedule Control |
CN107870763A (en) | 2017-11-27 | 2018-04-03 | 深圳市华成峰科技有限公司 | For creating the method and its device of the real-time sorting system of mass data |
Family Cites Families (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105335376B (en) * | 2014-06-23 | 2018-12-07 | 华为技术有限公司 | A kind of method for stream processing, apparatus and system |
US9575749B1 (en) * | 2015-12-17 | 2017-02-21 | Kersplody Corporation | Method and apparatus for execution of distributed workflow processes |
CN105930373A (en) * | 2016-04-13 | 2016-09-07 | 北京思特奇信息技术股份有限公司 | Spark streaming based big data stream processing method and system |
US10554577B2 (en) * | 2017-03-14 | 2020-02-04 | International Business Machines Corporation | Adaptive resource scheduling for data stream processing |
CN107193652B (en) * | 2017-04-27 | 2019-11-12 | 华中科技大学 | The flexible resource dispatching method and system of flow data processing system in container cloud environment |
CN107291843A (en) * | 2017-06-01 | 2017-10-24 | 南京邮电大学 | Hierarchical clustering improved method based on Distributed Computing Platform |
CN108037998B (en) * | 2017-12-01 | 2019-05-24 | 北京工业大学 | A kind of data receiving channel dynamic allocation method towards Spark Streaming platform |
CN108804211A (en) * | 2018-04-27 | 2018-11-13 | 西安华为技术有限公司 | Thread scheduling method, device, electronic equipment and storage medium |
CN109684078A (en) * | 2018-12-05 | 2019-04-26 | 苏州思必驰信息科技有限公司 | Resource dynamic distributing method and system for spark streaming |
CN110347489B (en) * | 2019-07-12 | 2021-08-03 | 之江实验室 | Multi-center data collaborative computing stream processing method based on Spark |
-
2019
- 2019-07-12 CN CN201910629253.8A patent/CN110347489B/en active Active
-
2020
- 2020-04-07 JP JP2021533418A patent/JP6990802B1/en active Active
- 2020-04-07 WO PCT/CN2020/083593 patent/WO2020233262A1/en active Application Filing
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101009642A (en) | 2006-12-31 | 2007-08-01 | 华为技术有限公司 | A resource allocation method and device based on the task packet |
US20160335135A1 (en) | 2015-05-14 | 2016-11-17 | Tmaxsoft. Co., Ltd. | Method for minimizing lock contention among threads when tasks are distributed in multithreaded system and appratus using the same |
US20170060641A1 (en) | 2015-08-28 | 2017-03-02 | Vmware, Inc. | Pluggable Engine for Application Specific Schedule Control |
CN107870763A (en) | 2017-11-27 | 2018-04-03 | 深圳市华成峰科技有限公司 | For creating the method and its device of the real-time sorting system of mass data |
Also Published As
Publication number | Publication date |
---|---|
WO2020233262A1 (en) | 2020-11-26 |
CN110347489B (en) | 2021-08-03 |
JP2022508354A (en) | 2022-01-19 |
CN110347489A (en) | 2019-10-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP6990802B1 (en) | Stream processing method for multi-center data co-computing based on Spark | |
Hadary et al. | Protean:{VM} allocation service at scale | |
Le et al. | Allox: compute allocation in hybrid clusters | |
US11294726B2 (en) | Systems, methods, and apparatuses for implementing a scalable scheduler with heterogeneous resource allocation of large competing workloads types using QoS | |
EP3425502B1 (en) | Task scheduling method and device | |
Shi et al. | MDP and machine learning-based cost-optimization of dynamic resource allocation for network function virtualization | |
JP6165777B2 (en) | Computing system, computer storage memory, and computer-implemented method for automatic scaling | |
Mattess et al. | Scaling mapreduce applications across hybrid clouds to meet soft deadlines | |
US10101991B2 (en) | Managing a software-patch submission queue | |
US20180321975A1 (en) | Systems, methods, and apparatuses for implementing a stateless, deterministic scheduler and work discovery system with interruption recovery | |
US9389995B2 (en) | Optimization of Map-Reduce shuffle performance through snuffler I/O pipeline actions and planning | |
JP3944154B2 (en) | Method and system for dynamically adjusting a thread pool in a multi-threaded server | |
US8935404B2 (en) | Saving program execution state | |
US20140379722A1 (en) | System and method to maximize server resource utilization and performance of metadata operations | |
Tumanov et al. | alsched: Algebraic scheduling of mixed workloads in heterogeneous clouds | |
Chard et al. | Cost-aware cloud provisioning | |
US20200174844A1 (en) | System and method for resource partitioning in distributed computing | |
US11182217B2 (en) | Multilayered resource scheduling | |
Huang et al. | Achieving load balance for parallel data access on distributed file systems | |
US10404823B2 (en) | Multitier cache framework | |
Shin et al. | Data jockey: Automatic data management for HPC multi-tiered storage systems | |
Sreedhar et al. | A survey on big data management and job scheduling | |
Chard et al. | An automated tool profiling service for the cloud | |
Ivanov et al. | Improving efficiency of analysis jobs in CMS | |
Jordan et al. | Wrangler's user environment: A software framework for management of data-intensive computing system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20210610 |
|
A871 | Explanation of circumstances concerning accelerated examination |
Free format text: JAPANESE INTERMEDIATE CODE: A871 Effective date: 20210624 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20211112 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20211206 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 6990802 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |