JP2018159987A - Data node management apparatus, storage system, data node management method and program - Google Patents
Data node management apparatus, storage system, data node management method and program Download PDFInfo
- Publication number
- JP2018159987A JP2018159987A JP2017055492A JP2017055492A JP2018159987A JP 2018159987 A JP2018159987 A JP 2018159987A JP 2017055492 A JP2017055492 A JP 2017055492A JP 2017055492 A JP2017055492 A JP 2017055492A JP 2018159987 A JP2018159987 A JP 2018159987A
- Authority
- JP
- Japan
- Prior art keywords
- data
- pair
- child
- pair data
- node
- 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.)
- Pending
Links
Images
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
Description
本発明は、データノードで構成されたストレージシステム、データノードの管理を行なう、データノード管理装置、及びデータノード管理方法に関し、更には、これらを実現するためのプログラムに関する。 The present invention relates to a storage system composed of data nodes, a data node management apparatus and a data node management method for managing the data nodes, and further to a program for realizing them.
KVSは、保存対象となるデータ(Value)に対して、対応する一意の標識(Key)を設定し、これらをペア(KVペア)で保存するデータストアである。また、KVSのうち、特に、複数のサーバ装置又は記憶装置に分散してデータを保存できる機能をもったものは、「分散KVS」と呼ばれている。 KVS is a data store that sets a corresponding unique indicator (Key) for data (Value) to be stored, and stores them as a pair (KV pair). Further, among KVS, in particular, one having a function capable of storing data in a distributed manner in a plurality of server devices or storage devices is called “distributed KVS”.
分散KVSは、近年、極めて大量のデータを保管する分野において注目されている。例えば、Voldemort(非特許文献1参照)は、分散KVSが実装されたシステムのひとつである。一般に、分散KVSは、スケーラビリティに優れており、ノードの数だけ膨大なデータを格納することが可能となる。 Distributed KVS has recently attracted attention in the field of storing extremely large amounts of data. For example, Voldemort (see Non-Patent Document 1) is one of systems in which distributed KVS is implemented. In general, the distributed KVS is excellent in scalability and can store a huge amount of data as many as the number of nodes.
また、分散KVSでは、キー値を基にハッシュ関数によって算出されたハッシュ値によって、格納先のノードが決定される。特に、Consistent Hashing(例えば、特許文献1参照)は、分散KVSシステムにおいて、データの格納先を決めるための手法として、利用されている。Consistent Hashingでは、ハッシュ空間は、均等なQ個のパーティションに分割される。また、Q/N個のパーティションが、各ノードに割り当てられる。Nは全体ノードの数である。 In the distributed KVS, the storage destination node is determined based on the hash value calculated by the hash function based on the key value. In particular, consistent hashing (see, for example, Patent Document 1) is used as a method for determining a data storage destination in a distributed KVS system. In Consistent Hashing, the hash space is divided into equal Q partitions. Further, Q / N partitions are allocated to each node. N is the number of all nodes.
但し、Valueのデータサイズに偏りがある論理データ構造の場合、ノード毎に格納しているデータ量が異なり、ノード間に偏りが生じてしまう。この結果、データサイズの大きなValueを持つキー値の格納先となっている特定のノードに、大きな負荷がかかってしまう。また、このようなノードにおいては、KVペアの取得時のTAT(Turn Around Time)が増加してしまう。 However, in the case of a logical data structure in which the data size of Value is biased, the amount of data stored differs from node to node, resulting in bias between nodes. As a result, a large load is applied to the specific node that stores the key value having Value having a large data size. In such a node, TAT (Turn Around Time) at the time of acquiring a KV pair increases.
特に、分散KVSをRDB(Relational Database)に適用する場合は、検索性を高めるために、特定の値及び属性によってレコードがまとめられるので、1つのKeyに複数のデータが格納される。このため、Valueが大きくなってしまうケースが多くなってしまう。 In particular, when distributed KVS is applied to an RDB (Relational Database), records are collected by specific values and attributes in order to improve searchability, so a plurality of data is stored in one key. For this reason, there are many cases where Value becomes large.
上述のノード間におけるデータ量の偏りを解消するための手法として、割り当てたパーティションを再配置して、各ノードのデータ量を均一にする手法が提案されている。しかしながら、パーティションの再配置に伴って、データの再配置も発生するため、既存ノード間のデータ移動が大量に起こる可能性がある。この結果、上記手法を実行する場合には、大きなコストがかかってしまう。 As a method for eliminating the above-described uneven data amount between nodes, a method has been proposed in which the allocated partitions are rearranged to make the data amount of each node uniform. However, since data rearrangement also occurs with partition rearrangement, a large amount of data movement between existing nodes may occur. As a result, when the above method is executed, a large cost is required.
本発明の目的の一例は、KVペアのデータサイズに偏りがあっても、パーティションの再配置を行なうことなく、データ量の偏りの抑制と負荷の分散化とを図り得る、ストレージシステム、データノード管理装置、データノード管理方法、及びプログラムを提供することにある。 An example of an object of the present invention is to provide a storage system and a data node capable of suppressing the uneven data amount and distributing the load without performing the rearrangement of partitions even when the data size of the KV pair is uneven. A management device, a data node management method, and a program are provided.
上記目的を達成するため、本発明の一側面におけるデータノード管理装置は、
データとそれに対応するキー値とをペアデータとして格納するデータノードに対する命令を受け付ける、指示受付部と、
受け付けられた前記命令が書き込み命令である場合に、書き込み対象となるペアデータにおいて、キー値に、予め設定された添え字を付与する、ペアデータ変換処理部と、
書き込み対象となるペアデータを親ペアデータとして、親ペアデータに含まれるデータを設定数に分割し、分割された各データと親ペアデータのキー値とを合わせて、子ペアデータを生成し、その際、各子ペアデータのキー値に付与されている添え字を、子ペアデータ毎に異なる連続した識別番号に書き換え、更に、親ペアデータのデータに、各子ペアデータのキー値のリストを格納する、ペアデータ分割部と、
分割によって生成した子ペアデータを、各子ペアデータのキー値に付与されている前記識別番号の順に、いずれかの前記データノードに格納する、データノードアクセス部と、
受け付けられた命令が読み込み命令である場合に、前記リストに基づいて、読込対象となるペアデータの子ペアノードを取得し、取得した子ペアノードを結合する、データ結合部と、
を備えている、ことを特徴とする。
In order to achieve the above object, a data node management device according to one aspect of the present invention provides:
An instruction receiving unit that receives an instruction to a data node that stores data and a corresponding key value as pair data;
A pair data conversion processing unit that assigns a preset subscript to a key value in the pair data to be written when the received instruction is a write instruction;
The pair data to be written is the parent pair data, the data included in the parent pair data is divided into a set number, and each divided data and the key value of the parent pair data are combined to generate child pair data. At that time, the subscript attached to the key value of each child pair data is rewritten to a continuous identification number different for each child pair data, and further, a list of key values of each child pair data is added to the data of the parent pair data. A pair data dividing unit for storing
A data node access unit that stores child pair data generated by the division in any of the data nodes in the order of the identification numbers given to the key values of each child pair data;
When the received instruction is a read instruction, based on the list, obtain a child pair node of the pair data to be read, and combine the acquired child pair node;
It is characterized by having.
上記目的を達成するため、本発明の一側面におけるストレージシステムは、データとそれに対応するキー値とをペアデータとして格納するデータノードと、データノード管理装置とを備え、
前記データノード管理装置は、
前記データノードに対する命令を受け付ける、指示受付部と、
受け付けられた前記命令が書き込み命令である場合に、書き込み対象となるペアデータにおいて、キー値に、予め設定された添え字を付与する、ペアデータ変換処理部と、
書き込み対象となるペアデータを親ペアデータとして、親ペアデータに含まれるデータを設定数に分割し、分割された各データと親ペアデータのキー値とを合わせて、子ペアデータを生成し、その際、各子ペアデータのキー値に付与されている添え字を、子ペアデータ毎に異なる連続した識別番号に書き換え、更に、親ペアデータのデータに、各子ペアデータのキー値のリストを格納する、ペアデータ分割部と、
分割によって生成した子ペアデータを、各子ペアデータのキー値に付与されている前記識別番号の順に、いずれかの前記データノードに格納する、データノードアクセス部と、
受け付けられた命令が読み込み命令である場合に、前記リストに基づいて、読込対象となるペアデータの子ペアノードを取得し、取得した子ペアノードを結合する、データ結合部と、
を備えていることを特徴とする。
To achieve the above object, a storage system according to an aspect of the present invention includes a data node that stores data and a corresponding key value as pair data, and a data node management device,
The data node management device includes:
An instruction receiving unit for receiving an instruction for the data node;
A pair data conversion processing unit that assigns a preset subscript to a key value in the pair data to be written when the received instruction is a write instruction;
The pair data to be written is the parent pair data, the data included in the parent pair data is divided into a set number, and each divided data and the key value of the parent pair data are combined to generate child pair data. At that time, the subscript attached to the key value of each child pair data is rewritten to a continuous identification number different for each child pair data, and further, a list of key values of each child pair data is added to the data of the parent pair data. A pair data dividing unit for storing
A data node access unit that stores child pair data generated by the division in any of the data nodes in the order of the identification numbers given to the key values of each child pair data;
When the received instruction is a read instruction, based on the list, obtain a child pair node of the pair data to be read, and combine the acquired child pair node;
It is characterized by having.
また、上記目的を達成するため、本発明の一側面におけるデータノード管理方法は、
(a)データとそれに対応するキー値とをペアデータとして格納するデータノードに対する命令を受け付ける、ステップと、
(b)受け付けられた前記命令が書き込み命令である場合に、書き込み対象となるペアデータにおいて、キー値に、予め設定された添え字を付与する、ステップと、
(c)書き込み対象となるペアデータを親ペアデータとして、親ペアデータに含まれるデータを設定数に分割し、分割された各データと親ペアデータのキー値とを合わせて、子ペアデータを生成し、その際、各子ペアデータのキー値に付与されている添え字を、子ペアデータ毎に異なる連続した識別番号に書き換え、更に、親ペアデータのデータに、各子ペアデータのキー値のリストを格納する、ステップと、
(d)分割によって生成した子ペアデータを、各子ペアデータのキー値に付与されている前記識別番号の順に、いずれかのデータノードに格納する、ステップと、
(e)受け付けられた命令が読み込み命令である場合に、前記リストに基づいて、読込対象となるペアデータの子ペアノードを取得し、取得した子ペアノードを結合する、ステップと、
を有する、ことを特徴とする。
In order to achieve the above object, a data node management method according to one aspect of the present invention includes:
(A) receiving a command for a data node that stores data and a corresponding key value as pair data; and
(B) when the received command is a write command, a preset subscript is added to the key value in the pair data to be written; and
(C) The pair data to be written is the parent pair data, the data included in the parent pair data is divided into a set number, and the divided paired data and the key value of the parent pair data are combined to obtain the child pair data. At that time, the subscript attached to the key value of each child pair data is rewritten to a continuous identification number that differs for each child pair data, and further, the key of each child pair data is added to the data of the parent pair data. Storing a list of values, steps;
(D) storing the child pair data generated by the division in any of the data nodes in the order of the identification numbers given to the key values of the respective child pair data;
(E) when the received instruction is a read instruction, acquiring a child pair node of the pair data to be read based on the list, and combining the acquired child pair nodes;
It is characterized by having.
更に、上記目的を達成するため、本発明の一側面におけるプログラムは、
コンピュータに、
(a)データとそれに対応するキー値とをペアデータとして格納するデータノードに対する命令を受け付ける、ステップと、
(b)受け付けられた前記命令が書き込み命令である場合に、書き込み対象となるペアデータにおいて、キー値に、予め設定された添え字を付与する、ステップと、
(c)書き込み対象となるペアデータを親ペアデータとして、親ペアデータに含まれるデータを設定数に分割し、分割された各データと親ペアデータのキー値とを合わせて、子ペアデータを生成し、その際、各子ペアデータのキー値に付与されている添え字を、子ペアデータ毎に異なる連続した識別番号に書き換え、更に、親ペアデータのデータに、各子ペアデータのキー値のリストを格納する、ステップと、
(d)分割によって生成した子ペアデータを、各子ペアデータのキー値に付与されている前記識別番号の順に、いずれかのデータノードに格納する、ステップと、
(e)受け付けられた命令が読み込み命令である場合に、前記リストに基づいて、読込対象となるペアデータの子ペアノードを取得し、取得した子ペアノードを結合する、ステップと、
を有する、ことを特徴とする。
Furthermore, in order to achieve the above object, a program according to one aspect of the present invention is provided.
On the computer,
(A) receiving a command for a data node that stores data and a corresponding key value as pair data; and
(B) when the received command is a write command, a preset subscript is added to the key value in the pair data to be written; and
(C) The pair data to be written is the parent pair data, the data included in the parent pair data is divided into a set number, and the divided paired data and the key value of the parent pair data are combined to obtain the child pair data. At that time, the subscript attached to the key value of each child pair data is rewritten to a continuous identification number that differs for each child pair data, and further, the key of each child pair data is added to the data of the parent pair data. Storing a list of values, steps;
(D) storing the child pair data generated by the division in any of the data nodes in the order of the identification numbers given to the key values of the respective child pair data;
(E) when the received instruction is a read instruction, acquiring a child pair node of the pair data to be read based on the list, and combining the acquired child pair nodes;
It is characterized by having.
以上のように、本発明によれば、KVペアのデータサイズに偏りがあっても、パーティションの再配置を行なうことなく、データ量の偏りの抑制と負荷の分散化とを図ることができる。 As described above, according to the present invention, even if the data size of the KV pair is uneven, it is possible to suppress the uneven amount of data and to distribute the load without rearranging the partitions.
(本発明の概要)
本発明では、Valueサイズの大きなKVペアは、格納先となるKVSデータノードの数に応じて、自動的に複数のKVペアに分割されてから格納される。また、読み出し時においては、分割されたKVペアがすべて読み出され、読み出されたKVペアが結合された後、結合後のKVペアが返却される。
(Outline of the present invention)
In the present invention, a KV pair having a large value size is automatically divided into a plurality of KV pairs and stored in accordance with the number of KVS data nodes as storage destinations. Further, at the time of reading, all the divided KV pairs are read, and after the read KV pairs are combined, the combined KV pairs are returned.
更に、本発明では、分割後のKVペアは、格納される段階で、格納対象となるKVSデータノードの数に応じて、最大数で分割されるので、ノード間でのデータの偏りを未然に防ぐことが可能となる。また、分割後のKVペアに対して、並列に読み込み及び書き込みを実行することで、サイズの大きなKVペアの操作に伴うレイテンシも改善することができる。 Furthermore, in the present invention, the divided KV pairs are divided by the maximum number in accordance with the number of KVS data nodes to be stored at the stage of being stored, so that the bias of data between the nodes is obviated. It becomes possible to prevent. Further, by performing reading and writing in parallel on the divided KV pairs, it is possible to improve the latency associated with the operation of the large KV pair.
(実施の形態)
以下、本実施の形態における、データノード管理装置、ストレージシステム、データノード管理方法、及びプログラムについて、図1〜図10を参照しながら説明する。
(Embodiment)
Hereinafter, a data node management device, a storage system, a data node management method, and a program according to the present embodiment will be described with reference to FIGS.
[装置構成]
最初に、図1を用いて、本実施の形態におけるデータノード管理装置の構成について説明する。図1は、本発明の実施の形態におけるデータノード管理装置の概略構成を示すブロック図である。
[Device configuration]
First, the configuration of the data node management apparatus according to the present embodiment will be described with reference to FIG. FIG. 1 is a block diagram showing a schematic configuration of a data node management apparatus according to an embodiment of the present invention.
図1に示す本実施の形態におけるデータノード管理装置10は、データとそれに対応するキー値とをペアデータとして格納するデータノード20を管理するための装置である。データノード管理装置10は、各データノード20に、ネットワーク30を介して接続されており、データノード20と共に、ストレージシステム100を構築している。
A data
図1に示すように、データノード管理装置10は、指示受付部11と、ペアデータ変換処理部12と、ペアデータ分割部13と、データノードアクセス部14と、データ統合部15とを備えている。
As shown in FIG. 1, the data
指示受付部11は、外部から、データノード20に対する命令、即ち、書き込み命令(put)又は読み込み命令(get)を受け付ける。
The
ペアデータ変換処理部12は、受け付けられた命令が書き込み命令である場合に、書き込み対象となるペアデータにおいて、キー値に、予め設定された添え字を付与する。
When the received command is a write command, the pair data
ペアデータ分割部13は、まず、書き込み対象となるペアデータを親ペアデータとして、親ペアデータに含まれるデータを設定数に分割し、分割された各データと親ペアデータのキー値とを合わせて、子ペアデータを生成する。また、ペアデータ分割部13は、その際、各子ペアデータのキー値に付与されている添え字を、子ペアデータ毎に異なる連続した識別番号に書き換える。更に、ペアデータ分割部13は、親ペアデータのデータに、各子ペアデータのキー値のリストを格納する。
First, the pair
データノードアクセス部14は、分割によって生成した子ペアデータを、各子ペアデータのキー値に付与されている識別番号の順に、いずれかのデータノード20に格納する。
The data
データ結合部15は、受け付けられた命令が読み込み命令である場合に、親ペアデータが格納しているリストに基づいて、読み込み対象となるペアデータの子ペアノードを取得し、取得した子ペアノードを結合する。
When the received instruction is a read instruction, the
このように、本実施の形態では、書き込み対象となるデータは、設定数、例えば、データノード20の数に応じて分割され、分割された子ノードは、キー値に付与された識別番号によって管理される。また、読み込みの際には、キー値に付与された識別番号を元に、各データノード20から子ペアデータが取得され、これらが結合される。このため、本実施の形態によれば、KVペアのデータサイズに偏りがあっても、パーティションの再配置を行なうことなくノード間のデータの偏りが抑制され、負荷が分散される。
Thus, in the present embodiment, the data to be written is divided according to the set number, for example, the number of
続いて、図2を用いて、本実施の形態におけるデータノード管理装置10の構成についてより具体的に説明する。図2は、本発明の実施の形態におけるデータノード管理装置の具体的構成を示すブロック図である。
Next, the configuration of the data
図2に示すように、本実施の形態では、複数のデータノード20は、分散KVSシステムを構築している。本実施の形態におけるペアデータは、KVペアである。よって、以降の説明においては、ペアデータはKVペアとも表記する。また、これに合わせて、親ペアデータは、親KVペア、子ペアデータは子KVペアとも表記する。また、データノード20は、計算機であり、それが備えるストレージに、KVペアを格納している。
As shown in FIG. 2, in the present embodiment, a plurality of
また、図2に示すように、本実施の形態では、データノード管理装置10には、クライアント端末40が接続されている。クライアント端末40は、ユーザの操作に応じて、データノード20に対して、書き込み命令(put)及び読み込み命令(get)を発行し、これをデータノード管理装置10に入力する。
Further, as shown in FIG. 2, in the present embodiment, a
また、本実施の形態において、データノード20の数は特に限定されるものではない。更に、図2の例では、図示されているクライアント端末40は1つであるが、実際には、クライアント端末40の数も複数である。そして、一般的な分散KVSシステムでは、複数のデータノード20は、不特定多数のクライアント端末40と通信し、その要求に応じて処理を実行する。本実施の形態では、クライアント端末40とデータノード20との間に、データノード管理装置10が配置される。
In the present embodiment, the number of
更に、本実施の形態においては、1つの分散KVSシステムにおいて、データノード管理装置10は、複数存在していても良い。加えて、一つのデータノード管理装置10が、複数のクライアント端末40からの命令を並列に受け付けることもできる。
Furthermore, in this embodiment, a plurality of data
また、図2に示すように、本実施の形態では、データノード管理装置10は、上述した指示受付部11、ペアデータ変換処理部12、ペアデータ分割部13、データノードアクセス部14、及びデータ統合部15に加えて、タイムスタンプ判定部16も備えている。
As shown in FIG. 2, in the present embodiment, the data
指示受付部11は、本実施の形態では、クライアント端末40から、データノード20に対する、書き込み命令(put)及び読み込み命令(get)を受け付ける。また、指示受付部11は、受け付けた命令に対する結果を、クライアント端末40に返却する。
In this embodiment, the
ペアデータ変換処理部12は、本実施の形態では、指示受付部11で書き込み命令が受け付けられると書き込み対象となるKVペアにおいて、そのデータに、分割の有無及び状態を示すフラグを付与する。また、ペアデータ変換処理部12は、分割後の子KVペアのデータノード20への格納が終了すると、親KVペアのフラグを「分割あり」に設定する。
In this embodiment, when the
データノードアクセス部14は、本実施の形態では、各子KVペアをデータノード20に格納する場合は、各データノードに対して、書き込み命令(put)を発行する。また、データノードアクセス部14は、各データノード20から、各子KVペアを取得する場合は、各データノード20に対して、読み込み命令(get)を発行する。
In this embodiment, when storing each child KV pair in the
タイムスタンプ判定部16は、まず、指示受付部11で書き込み命令が受け付けられると、書き込み対象となるKVペアのデータに、データノード管理装置10の識別子とタイムスタンプとを付与する。具体的には、タイムスタンプ判定部16は、図3に示した分割フラグ:L(ロック中)のKVペアが生成される際に、識別子とタイムスタンプとを付与する。
First, when the
また、タイムスタンプ判定部16は、子KVペアのデータノード20への格納が終了した場合は、親KVペアのデータに付与されている、識別子とタイムスタンプとを取得する。そして、タイムスタンプ判定部16は、取得した識別子とタイムスタンプとが、自身を備えているデータノード管理装置10によって付与されたものかどうかを判定する。判定の結果、付与されたものでない場合は、タイムスタンプ判定部16は、書き込み命令はタイムアウトしているとする。
In addition, when the storage of the child KV pair in the
ここで、図3及び図4を用いて、ペアデータ変換処理部12、ペアデータ分割部13、及びデータ結合部15の処理について具体的に説明する。図3(a)〜(c)は、それぞれ、本実施の形態におけるペアデータに付加される添え字とフラグとの具体例を示す図である。図4は、ペアデータの分割を模式的に示す図である。
Here, the processing of the pair data
本実施の形態では、ペアデータ変換処理部12は、KVペアにおけるキー値とValue部のデータとを、図3(a)〜(c)のいずれかに示す形式に書き換える。
In the present embodiment, the pair data
具体的には、ペアデータ変換処理部12は、キー値に、添え字として、「−0000」〜「−9999」の形式の4ケタの数字(識別番号)を付与する。また、本実施の形態では、添え字が「−0000」であるものは「親KVペア」とされる。更に、添え字が「−0001」以降のものは「子KVペア」とされ、分割されたKVペアであることが表される。また、ペアデータ変換処理部12は、データが格納されているValue部の先頭に、「flag:N」、「flag:D」、「flag:L」といった形式で分割フラグを付与する。
Specifically, the pair data
また、ペアデータ変換処理部12は、読み込み命令(get)の結果を、クライアント端末40に返却する時は、キー値の4ケタの添え字「−0000」と、Value部の分割フラグとを取り除いた元の形式で、KVペアを返却する。
Further, when returning the result of the read command (get) to the
また、本実施の形態では、ペアデータ分割部13は、図4に示すように、元のKVペアを複数の子KVペアに分割し、更に、親KVペアを生成する。また、このとき、ペアデータ分割部13は、元のKVペアのValue部のデータを設定された分割数に応じて分割し、子KVペアに格納する。
In the present embodiment, as shown in FIG. 4, the pair
更に、本実施の形態では、データ結合部15は、親KVペアのValue部に格納されているキー値のリスト(図4参照)に基づいて、図4に示す形式に分割されたKVペアを取得し、これらのデータを結合する。
Furthermore, in the present embodiment, the
[装置動作]
次に、本発明の実施の形態におけるデータノード管理装置10の動作について図5〜図8を用いて説明する。以下の説明においては、適宜図1〜図4を参酌する。また、本実施の形態では、データノード管理装置10を動作させることによって、データノード管理方法が実施される。よって、本実施の形態におけるデータノード管理方法の説明は、以下のデータノード管理装置の動作説明に代える。
[Device operation]
Next, the operation of the data
最初に、図5〜図7を用いて、クライアント端末40から書き込み命令が発行されて、データ格納処理が指示された場合について説明する。図5は、本発明の実施の形態におけるデータノード管理装置の書き込み命令発行時の動作を示すフロー図である。
First, a case where a write command is issued from the
まず、前提として、クライアント端末40がデータ格納処理を実施する場合、クライアント端末40は、put要求とputするKVペアとを、データノード管理装置10に発行する。これにより、図5に示す処理が実行される。
First, as a premise, when the
図5に示すように、最初に、指示受付部11は、クライアント端末40から、データノード20に対する、データ格納処理を受け付ける(ステップA1)。
As shown in FIG. 5, first, the
次に、ペアデータ変換処理部12は、「元のキー値-0000」を用いて、データノード10に対して、読み込み処理(get処理)を行い(ステップA2)、「親KVペア」の存在有無を確認する(ステップA3)。
Next, the pair data
ステップA3の判定の結果、既に親KVペアが存在している場合は、ペアデータ変換処理部12は、図3に示した分割フラグを確認し、取得した親KVペアの分割フラグが「L」であるかどうかを判定する(ステップA13)。
If the parent KV pair already exists as a result of the determination in step A3, the pair data
ステップA13の判定の結果、分割フラグが「flag:L」でない場合は、ペアデータ変換処理部12は、書き込み処理を継続し、ステップA4を実行する。
As a result of the determination in step A13, when the division flag is not “flag: L”, the pair data
一方、ステップA13の判定の結果、分割フラグが「flag:L」である場合は、ロック中であり、他のデータノード管理装置が該当するキー値のKVペアを分割して書き込み中であることを表す。その場合は、ペアデータ変換処理部12は、Value部にタイムスタンプが格納されているので、タイムスタンプと現在の時刻との差分が予め設定されているタイムアウト値を超えているかどうかを判定する(ステップA14)。
On the other hand, if the result of the determination in step A13 is that the split flag is “flag: L”, the lock is being performed, and the other data node management device is writing the KV pair of the corresponding key value. Represents. In that case, since the time stamp is stored in the Value portion, the pair data
ステップA14の判定の結果、タイムスタンプと現在時刻との差分値が予め設定されているタイムアウト値を超えていない場合は、ペアデータ変換処理部12は、該当するキー値のデータは『書き込み中』であると判断し、書き込み処理は失敗であることを、クライアント端末40に返却し、一連のデータ格納処理を終了とする(ステップA15)。
If the difference value between the time stamp and the current time does not exceed the preset timeout value as a result of the determination in step A14, the pair data
一方、ステップA14の判定の結果、タイムスタンプと現在時刻との差分値が予め設定されているタイムアウト値を超えている場合は、他のデータノード管理装置が実施していた書き込みは失敗したものとして、ペアデータ変換処理部12は、書き込み処理を継続し、後述するステップA4を実行する。
On the other hand, as a result of the determination in step A14, if the difference value between the time stamp and the current time exceeds a preset timeout value, it is assumed that the writing performed by another data node management device has failed. The pair data
ステップA3の判定の結果、既に親KVペアが存在していない場合は、ペアデータ変換処理部12は、クライアント端末40から受けとったKVペアのデータサイズが閾値を超えていないかどうかを判定する(ステップA4)。ステップA4の判定の結果、閾値を超えていればステップA5以降の分割処理が実行される。
As a result of the determination in step A3, when the parent KV pair does not already exist, the pair data
一方、ステップA4の判定の結果、閾値を超えていなければ分割処理が実行されずに、ペアデータ変換処理部12は、格納先となるデータノード20に、KVペアを格納する(ステップA12)。
On the other hand, as a result of the determination in step A4, if the threshold is not exceeded, the pair data
具体的には、ステップA12では、ペアデータ変換処理部12は、図3に示した分割フラグの形式に沿って、キー値に「−0000」を付与し、Value部の先頭には分割フラグを「flag:N」を付与して、KVペアを書換え、データノード20に格納(put)処理を実施させる。データノード20による格納処理の完了後、ペアデータ変換処理部12は、クライアント端末40にデータ格納処理の完了を返却し、一連のデータ格納処理を終了とする。
Specifically, in step A12, the pair data
ステップA5では、分割処理が実行されるので、ペアデータ変換処理部12は、格納先となるデータノード20の総数を最大分割数として、格納されるデータ量が閾値を超えないサイズになるように、分割数を決定する。
In step A5, since the division process is executed, the pair data
次に、ペアデータ変換処理部12は、データノードアクセス部14を介して、キー値に「−0000」を付与した親KVペアの書き込みを実施する(ステップA6)。
Next, the pair data
具体的には、ペアデータ変換処理部12は、図3に示した分割フラグの形式に沿って、親KVペアにおいて、キー値に「−0000」を付与し、Value部には、分割フラグ「flag:L」と、データノード管理装置10の識別子(装置ID)とを付与する。また、ペアデータ変換処理部12は、親KVペアのValue部には、実行時のタイムスタンプも付与する。その後、ペアデータ変換処理部12は、形式を変更した親KVペアのデータ格納処理をデータノード20に行なわせる。なお、ここで付与される識別子としては、ホスト名とプロセスIDとを合わせたもの等、データノード管理装置10を一位に特定できるものが挙げられる。
Specifically, the pair data
ステップA6で、親KVペアが「ロック中」で書き込まれると、ペアデータ分割部13は、分割数に応じて元のKVペアを、図4に示した子KVペアに分割し、データノードアクセス部14を介して、各データノード20に対して分割後の子KVペアの書き込みを指示する(ステップA7)。
When the parent KV pair is written as “locked” in step A6, the pair
具体的には、ステップA7では、ペアデータ分割部13は、各子KVペアの分割フラグを「flag:N」とし、キー値の添え字として、分割した順番に「−0001」から分割数までの識別番号を付与する。
Specifically, in step A7, the pair
また、ステップA7では、ペアデータ分割部13は、子KVペアの格納先を、図6に示すようにConsistent Hashingの手法を用いて決定することができる。図6は、本発明の実施の形態における子KVペアの格納先の決定手法の一例を説明する説明図である。図6の例では、キー値の添え字が「−0000」である親KVペアのキー値でハッシュされた数字を起点として、子KVペアは順に格納され、分散されていく。
Further, in step A7, the pair
更に、ステップA7では、ペアデータ分割部13は、図7に示すように、子KVペアの書込み時に分散KVSのQuarum判定の仕様に沿ってレプリケーションすることもできる。図7は、本発明の実施の形態における子KVペアの格納先の決定手法の他の例を説明する説明図である。図7の例では、子KVペアは、レプリケーションされるものも含めて、「親KVペア」のキー値でハッシュされた数字を起点として、順番に格納される。
Further, in step A7, as shown in FIG. 7, the pair
次に、ステップA7の終了後、タイプスタンプ判定部16は、データノード20に対して読み込みを指示して、親KVペアを再度取得し、更に、親KVペアのデータに付与されている、識別子とタイムスタンプとを取得する。そして、タイムスタンプ判定部16は、取得した識別子とタイムスタンプとが、自身を備えているデータノード管理装置10によって付与したものと一致するかどうかを判定する(ステップA9)。
Next, after the end of step A7, the type
ステップA9の判定の結果、一致していない場合は、ステップA1で受け付けたデータ格納処理はタイムアウトしており、別のデータノード管理装置10によって書き換えられてしまっている。分割フラグがL以外になっていた場合も同様である。従って、この場合は、
ペアデータ変換処理部12は、ステップA15を実行し、書き込み処理は失敗であることを、クライアント端末40に返却し、一連のデータ格納処理を終了とする。
If they do not match as a result of the determination in step A9, the data storage process accepted in step A1 has timed out and has been rewritten by another data
The pair data
一方、ステップA9の判定の結果、一致している場合は、ペアデータ変換処理部12は、図2に示した分割フラグの形式に沿って、親KVペアのValue部において、分割フラグを「flag:D」とし、子KVペアのキー値のリストを更新する(ステップA10)。また、ペアデータ変換処理部12は、データノードアクセス部14を介して、親KVペアへの更新処理としてデータノード20に対して親KVペアの書き込みを実施する。
On the other hand, if they match as a result of the determination in step A9, the pair data
その後、ペアデータ変換処理部12は、クライアント端末40に対して、データ格納処理の完了を返却し、一連のデータ格納処理を終了とする(ステップA11)。
Thereafter, the pair data
続いて、図8を用いて、クライアント端末40から読み込み命令が発行されて、データ取得処理が指示された場合について説明する。図8は、本発明の実施の形態におけるデータノード管理装置の読み込み命令発行時の動作を示すフロー図である。
Next, a case where a read command is issued from the
まず、前提として、クライアント端末40がデータ取得処理を実施する場合、クライアント端末40は、get要求とgetするKVペアとを、データノード管理装置10に発行する。これにより、図8に示す処理が実行される。
First, as a premise, when the
図8に示すように、最初に、指示受付部11は、クライアント端末40から、データノード20に対する、データ取得処理を受け付ける(ステップB1)。
As shown in FIG. 8, first, the
次に、ペアデータ変換処理部12は、「元のキー値-0000」を用いて、データノード20に対して、読み込み処理(get処理)を行い(ステップB2)、「親KVペア」の存在有無を確認する(ステップB3)。
Next, the pair data
ステップB3の判定の結果、既に親KVペアが存在していない場合は、ペアデータ変換処理部12は、該当するキー値のKVペアは存在しなかったという結果を、クライアント端末40に返却し、一連のデータ取得処理を終了とする(ステップB8)。
As a result of the determination in step B3, when the parent KV pair does not already exist, the pair data
一方、ステップB3の判定の結果、既に親KVペアが存在している場合は、ペアデータ変換処理部12は、このKVペアを取得し、図3に示した分割フラグを確認する。そして、ペアデータ変換処理部12は、取得したKVペアの分割フラグが「flag:L」であるかどうかを判定する(ステップB4)。
On the other hand, if the result of determination in step B3 is that a parent KV pair already exists, the pair data
ステップB4の判定の結果、分割フラグが「flag:L」(ロック中)である場合は、ペアデータ変換処理部12は、該当するキー値のKVペアは「書き込み中」であることを、クライアント端末40に返却し、一連のデータ取得処理を終了とする(ステップB9)。また、「書き込み中」の情報を受け取ったクライアント端末40は、データ取得処理を失敗としてもよいし、一定時間待機してリトライしてもよい。
If the result of determination in step B4 is that the split flag is “flag: L” (locking), the pair data
一方、ステップB4の判定の結果、分割フラグが「flag:L」でない場合は、ペアデータ変換処理部12は、更に、取得したKVペアの分割フラグが「flag:N」(分割なし)であるかどうかを判定する(ステップB5)。
On the other hand, if the result of determination in step B4 is that the split flag is not “flag: L”, the pair data
ステップB5の判定の結果、分割フラグが「flag:N」(分割なし)である場合は、ペアデータ変換処理部12は、取得したKVペアのValue部から分割フラグの情報を除いたものをValue値とし、このValue値をクライアント端末40に返却し、一連のデータ取得処理を終了とする(ステップB9)。
If the result of determination in step B5 is that the split flag is “flag: N” (no split), the pair data
一方、ステップB5の判定の結果、分割フラグが「flag:N」(分割なし)でない場合、即ち、分割フラグが「flag:D」(分割あり)である場合は、ペアデータ変換処理部12は、Value部にある子KVペアのキー値リストを元に、データノード20に対して読み込み処理を実施し、リストにある子KVペアのデータを全て取得する(ステップB6)。
On the other hand, as a result of the determination in step B5, when the division flag is not “flag: N” (no division), that is, when the division flag is “flag: D” (with division), the pair data
次に、ステップB6の実行後、ペアデータ変換処理部12は、取得した子KVペアのValue部のデータを、キー値の添え字の識別番号の順に沿って結合し、結合できたデータをValue値としてクライアント端末40に返却し、一連のデータ取得処理を終了とする(ステップB7)。
Next, after the execution of step B6, the pair data
[実施の形態における効果]
以上のように、本実施の形態では、データサイズの大きなKVペアは、格納先のデータノードの数に応じて分割され、分散されて格納されるので、特定のノードにデータが偏ることが、格納の段階で回避される。
[Effects of the embodiment]
As described above, in this embodiment, a KV pair having a large data size is divided according to the number of data nodes at the storage destination and is distributed and stored, so that data is biased to a specific node. Avoided at the storage stage.
また、本実施の形態では、分割されたKVペアは、各ノードに分散されているため、データノードの数だけ並列して読み込み処理又は書き込み処理を実施することが可能となるので、レイテンシの改善が期待できる。 In the present embodiment, since the divided KV pairs are distributed to each node, it is possible to perform the reading process or the writing process in parallel by the number of data nodes, thereby improving the latency. Can be expected.
KVペアの分割及び結合は、データノード管理装置10を経由して、システム内部で自動的に実行されるので、ユーザは、分割及び結合の処理を意識せずに、分散KVSシステムを運用できる。更に、ユーザは、データモデル設計時において、データサイズの大きなKVペアが生成されることを考慮しなくても良く、自由に設計を行なうことができる。
Since the division and combination of KV pairs are automatically executed inside the system via the data
[変形例]
ここで、本実施の形態における変形例について図9を用いて説明する。図9は、本発明の実施の形態におけるデータノードの他の例を示すブロック図である。図9に示すように、本変形例では、データノード20は、通信部21と、ストレージ22と、ペアデータ削除部23とを備えている。
[Modification]
Here, a modification of the present embodiment will be described with reference to FIG. FIG. 9 is a block diagram showing another example of the data node in the embodiment of the present invention. As shown in FIG. 9, in the present modification, the
このうち、通信部21は、データノード管理装置10からの命令の受信、KVペアの送受信を行なっている。ストレージ22は、KVペア(親KVペア、子KVペア)を格納する。ペアデータ削除部23は、データノード20が格納するKVペアの中から子KVペアを特定し、特定した子KVペアのうち、設定条件を満たす子ペアデータを削除する。
Among these, the
図5に示した処理が実行され、何らかの原因で一連の書き込み処理が中断されてしまった場合に、途中まで書き込まれた子KVペアが、その後どのデータノード管理装置からも参照されず、不要なデータとしてデータノード20に残り続けてしまう可能性がある。このような中断が生じる場合としては、分割及び書き込みが決定され、先に親KVペアがロック中で書き込まれた後、分割後の子KVペアが書き込まれている途中で、データノード管理装置10がダウンしたり、タイムアウトと判定され、他のデータノード管理装置に親KVペアが書き換えられたりした場合である。このような場合、親KVペアのロックはタイムアウトにより解除されるが、途中まで書き込まれた子KVペアは、データノード20に残り続けてしまう。
When the processing shown in FIG. 5 is executed and a series of write processing is interrupted for some reason, the child KV pair written halfway is not referred to by any data node management device after that and is unnecessary. There is a possibility that data remains in the
これに対して、本変形例では、ペアデータ削除部23は、このような不要な子KVペアを削除する。具体的には、ペアデータ削除部23は、定期的に(ユーザが予め設定したタイミングで)、ストレージ22内の子KVペア(添え字が-0000ではないもの)を全件走査する。そして、ペアデータ削除部23は、走査において、例えば、親KVペア(添え字が-0000のもの)をgetできない子KVペア、親KVペアのValue部内のキー値リストに含まれていない子KVペアを見つけると、これらを削除する。この結果、障害又はタイムアウトによって書き込み処理が中断され、不要な子KVペアがストレージ22内に溜まってしまうことが回避される。
On the other hand, in the present modification, the pair
[プログラム]
本発明の実施の形態におけるプログラムは、コンピュータに、図5に示すステップA1〜A15、図8に示すB1〜B10を実行させるプログラムであれば良い。このプログラムをコンピュータにインストールし、実行することによって、本実施の形態におけるデータノード管理装置10とデータノード管理方法とを実現することができる。この場合、コンピュータのCPU(Central Processing Unit)は、指示受付部11、ペアデータ変換処理部12、ペアデータ分割部13、データノードアクセス部14、データ統合部15、及びタイムスタンプ判定部16として機能し、処理を行なう。
[program]
The program in the embodiment of the present invention may be a program that causes a computer to execute steps A1 to A15 shown in FIG. 5 and B1 to B10 shown in FIG. By installing and executing this program on a computer, the data
また、本実施の形態におけるプログラムは、複数のコンピュータによって構築されたコンピュータシステムによって実行されても良い。この場合は、例えば、各コンピュータが、それぞれ、指示受付部11、ペアデータ変換処理部12、ペアデータ分割部13、データノードアクセス部14、データ統合部15、及びタイムスタンプ判定部16のいずれかとして機能しても良い。
The program in the present embodiment may be executed by a computer system constructed by a plurality of computers. In this case, for example, each computer is any one of the
ここで、本実施の形態におけるプログラムを実行することによって、データノード管理装置10を実現するコンピュータについて図10を用いて説明する。図10は、本発明の実施の形態におけるデータノード管理装置10を実現するコンピュータの一例を示すブロック図である。
Here, a computer that realizes the data
図10に示すように、コンピュータ110は、CPU111と、メインメモリ112と、記憶装置113と、入力インターフェイス114と、表示コントローラ115と、データリーダ/ライタ116と、通信インターフェイス117とを備える。これらの各部は、バス121を介して、互いにデータ通信可能に接続される。
As shown in FIG. 10, the
CPU111は、記憶装置113に格納された、本実施の形態におけるプログラム(コード)をメインメモリ112に展開し、これらを所定順序で実行することにより、各種の演算を実施する。メインメモリ112は、典型的には、DRAM(Dynamic Random Access Memory)等の揮発性の記憶装置である。また、本実施の形態におけるプログラムは、コンピュータ読み取り可能な記録媒体120に格納された状態で提供される。なお、本実施の形態におけるプログラムは、通信インターフェイス117を介して接続されたインターネット上で流通するものであっても良い。
The
また、記憶装置113の具体例としては、ハードディスクドライブの他、フラッシュメモリ等の半導体記憶装置が挙げられる。入力インターフェイス114は、CPU111と、キーボード及びマウスといった入力機器118との間のデータ伝送を仲介する。表示コントローラ115は、ディスプレイ装置119と接続され、ディスプレイ装置119での表示を制御する。
Specific examples of the
データリーダ/ライタ116は、CPU111と記録媒体120との間のデータ伝送を仲介し、記録媒体120からのプログラムの読み出し、及びコンピュータ110における処理結果の記録媒体120への書き込みを実行する。通信インターフェイス117は、CPU111と、他のコンピュータとの間のデータ伝送を仲介する。
The data reader /
また、記録媒体120の具体例としては、CF(Compact Flash(登録商標))及びSD(Secure Digital)等の汎用的な半導体記憶デバイス、フレキシブルディスク(Flexible Disk)等の磁気記録媒体、又はCD−ROM(Compact Disk Read Only Memory)などの光学記録媒体が挙げられる。
Specific examples of the
なお、本実施の形態におけるデータノード管理装置10は、プログラムがインストールされたコンピュータではなく、各部に対応したハードウェアを用いることによっても実現可能である。更に、データノード管理装置10は、一部がプログラムで実現され、残りの部分がハードウェアで実現されていてもよい。
The data
上述した実施の形態の一部又は全部は、以下に記載する(付記1)〜(付記11)によって表現することができるが、以下の記載に限定されるものではない。 Part or all of the above-described embodiment can be expressed by (Appendix 1) to (Appendix 11) described below, but is not limited to the following description.
(付記1)
データとそれに対応するキー値とをペアデータとして格納するデータノードに対する命令を受け付ける、指示受付部と、
受け付けられた前記命令が書き込み命令である場合に、書き込み対象となるペアデータにおいて、キー値に、予め設定された添え字を付与する、ペアデータ変換処理部と、
書き込み対象となるペアデータを親ペアデータとして、親ペアデータに含まれるデータを設定数に分割し、分割された各データと親ペアデータのキー値とを合わせて、子ペアデータを生成し、その際、各子ペアデータのキー値に付与されている添え字を、子ペアデータ毎に異なる連続した識別番号に書き換え、更に、親ペアデータのデータに、各子ペアデータのキー値のリストを格納する、ペアデータ分割部と、
分割によって生成した子ペアデータを、各子ペアデータのキー値に付与されている前記識別番号の順に、いずれかの前記データノードに格納する、データノードアクセス部と、
受け付けられた命令が読み込み命令である場合に、前記リストに基づいて、読込対象となるペアデータの子ペアノードを取得し、取得した子ペアノードを結合する、データ結合部と、
を備えている、ことを特徴とするデータノード管理装置。
(Appendix 1)
An instruction receiving unit that receives an instruction to a data node that stores data and a corresponding key value as pair data;
A pair data conversion processing unit that assigns a preset subscript to a key value in the pair data to be written when the received instruction is a write instruction;
The pair data to be written is the parent pair data, the data included in the parent pair data is divided into a set number, and each divided data and the key value of the parent pair data are combined to generate child pair data. At that time, the subscript attached to the key value of each child pair data is rewritten to a continuous identification number different for each child pair data, and further, a list of key values of each child pair data is added to the data of the parent pair data. A pair data dividing unit for storing
A data node access unit that stores child pair data generated by the division in any of the data nodes in the order of the identification numbers given to the key values of each child pair data;
When the received instruction is a read instruction, based on the list, obtain a child pair node of the pair data to be read, and combine the acquired child pair node;
A data node management device comprising:
(付記2)
前記ペアデータ変換処理部が、前記書き込み命令が受け付けられると前記書き込み対象となるペアデータにおいて、データに、分割の有無及び状態を示すフラグを付与し、そして、前記子ペアデータの前記データノードへの格納が終了すると、前記親ペアデータの前記フラグを分割ありに設定し、
前記ペアデータ分割部が、前記書き込み対象となるペアデータにおいて、設定された分割数に応じて子ペアデータヘの分割を行なう、
付記1に記載のデータノード管理装置。
(Appendix 2)
When the write command is received, the pair data conversion processing unit gives a flag indicating the presence / absence and state of division to the data to be written in the pair data to be written, and sends the data to the data node of the child pair data When the storage of is completed, the flag of the parent pair data is set to be divided,
In the pair data to be written, the pair data dividing unit performs division into child pair data according to the set number of divisions.
The data node management device according to
(付記3)
前記書き込み命令が受け付けられた場合に、前記書き込み対象となるペアデータのデータに、当該データノード管理装置の識別子とタイムスタンプとを付与し、
更に、前記子ペアノードの前記データノードへの格納が終了した場合に、前記親ペアデータのデータに付与されている、前記識別子と前記タイムスタンプとを取得し、取得した前記識別子と前記タイムスタンプとが、当該データノード管理装置によって付与されたものかどうかを判定し、付与されたものでない場合は、前記書き込み命令はタイムアウトしているとする、タイムスタンプ判定部を備えている、
付記2に記載のデータノード管理装置。
(Appendix 3)
When the write command is accepted, the identifier of the data node management device and a time stamp are given to the data of the pair data to be written,
Further, when the storage of the child pair node in the data node is completed, the identifier and the time stamp given to the data of the parent pair data are acquired, and the acquired identifier and the time stamp are Is determined by the data node management device, and if not, the write command is timed out, provided with a time stamp determination unit,
The data node management device according to
(付記4)
データとそれに対応するキー値とをペアデータとして格納するデータノードと、データノード管理装置とを備え、
前記データノード管理装置は、
前記データノードに対する命令を受け付ける、指示受付部と、
受け付けられた前記命令が書き込み命令である場合に、書き込み対象となるペアデータにおいて、キー値に、予め設定された添え字を付与する、ペアデータ変換処理部と、
書き込み対象となるペアデータを親ペアデータとして、親ペアデータに含まれるデータを設定数に分割し、分割された各データと親ペアデータのキー値とを合わせて、子ペアデータを生成し、その際、各子ペアデータのキー値に付与されている添え字を、子ペアデータ毎に異なる連続した識別番号に書き換え、更に、親ペアデータのデータに、各子ペアデータのキー値のリストを格納する、ペアデータ分割部と、
分割によって生成した子ペアデータを、各子ペアデータのキー値に付与されている前記識別番号の順に、いずれかの前記データノードに格納する、データノードアクセス部と、
受け付けられた命令が読み込み命令である場合に、前記リストに基づいて、読込対象となるペアデータの子ペアノードを取得し、取得した子ペアノードを結合する、データ結合部と、
を備えている、ことを特徴とするストレージシステム。
(Appendix 4)
A data node that stores data and a corresponding key value as pair data, and a data node management device,
The data node management device includes:
An instruction receiving unit for receiving an instruction for the data node;
A pair data conversion processing unit that assigns a preset subscript to a key value in the pair data to be written when the received instruction is a write instruction;
The pair data to be written is the parent pair data, the data included in the parent pair data is divided into a set number, and each divided data and the key value of the parent pair data are combined to generate child pair data. At that time, the subscript attached to the key value of each child pair data is rewritten to a continuous identification number different for each child pair data, and further, a list of key values of each child pair data is added to the data of the parent pair data. A pair data dividing unit for storing
A data node access unit that stores child pair data generated by the division in any of the data nodes in the order of the identification numbers given to the key values of each child pair data;
When the received instruction is a read instruction, based on the list, obtain a child pair node of the pair data to be read, and combine the acquired child pair node;
A storage system characterized by comprising:
(付記5)
前記データノードが、
前記データノードが格納する前記ペアデータの中から前記子ペアデータを特定し、特定した前記子ペアデータのうち、設定条件を満たす子ペアデータを削除する、ペアデータ削除部を更に備えている、
付記4に記載のストレージシステム。
(Appendix 5)
The data node is
The child node data is specified from the pair data stored in the data node, and the child data pair is further deleted.
The storage system according to
(付記6)
(a)データとそれに対応するキー値とをペアデータとして格納するデータノードに対する命令を受け付ける、ステップと、
(b)受け付けられた前記命令が書き込み命令である場合に、書き込み対象となるペアデータにおいて、キー値に、予め設定された添え字を付与する、ステップと、
(c)書き込み対象となるペアデータを親ペアデータとして、親ペアデータに含まれるデータを設定数に分割し、分割された各データと親ペアデータのキー値とを合わせて、子ペアデータを生成し、その際、各子ペアデータのキー値に付与されている添え字を、子ペアデータ毎に異なる連続した識別番号に書き換え、更に、親ペアデータのデータに、各子ペアデータのキー値のリストを格納する、ステップと、
(d)分割によって生成した子ペアデータを、各子ペアデータのキー値に付与されている前記識別番号の順に、いずれかのデータノードに格納する、ステップと、
(e)受け付けられた命令が読み込み命令である場合に、前記リストに基づいて、読込対象となるペアデータの子ペアノードを取得し、取得した子ペアノードを結合する、ステップと、
を有する、ことを特徴とするデータノード管理方法。
(Appendix 6)
(A) receiving a command for a data node that stores data and a corresponding key value as pair data; and
(B) when the received command is a write command, a preset subscript is added to the key value in the pair data to be written; and
(C) The pair data to be written is the parent pair data, the data included in the parent pair data is divided into a set number, and the divided paired data and the key value of the parent pair data are combined to obtain the child pair data. At that time, the subscript attached to the key value of each child pair data is rewritten to a continuous identification number that differs for each child pair data, and further, the key of each child pair data is added to the data of the parent pair data. Storing a list of values, steps;
(D) storing the child pair data generated by the division in any of the data nodes in the order of the identification numbers given to the key values of the respective child pair data;
(E) when the received instruction is a read instruction, acquiring a child pair node of the pair data to be read based on the list, and combining the acquired child pair nodes;
A data node management method characterized by comprising:
(付記7)
前記(b)のステップにおいて、前記書き込み命令が受け付けられると前記書き込み対象となるペアデータにおいて、データに、分割の有無及び状態を示すフラグを付与し、そして、前記子ペアデータの前記データノードへの格納が終了すると、前記親ペアデータの前記フラグを分割ありに設定し、
前記(c)のステップにおいて、前記書き込み対象となるペアデータで、設定された分割数に応じて子ペアデータヘの分割を行なう、
付記6に記載のデータノード管理方法。
(Appendix 7)
In the step (b), when the write command is accepted, in the pair data to be written, a flag indicating the presence / absence and state of division is added to the data, and the child pair data is sent to the data node. When the storage of is completed, the flag of the parent pair data is set to be divided,
In the step (c), the pair data to be written is divided into child pair data according to the set number of divisions.
The data node management method according to
(付記8)
(f)前記書き込み命令が受け付けられた場合に、前記書き込み対象となるペアデータのデータに、当該データノード管理装置の識別子とタイムスタンプとを付与する、ステップと、
(g)前記子ペアノードの前記データノードへの格納が終了した場合に、前記親ペアデータのデータに付与されている、前記識別子と前記タイムスタンプとを取得し、取得した前記識別子と前記タイムスタンプとが、当該データノード管理装置によって付与されたものかどうかを判定し、付与されたものでない場合は、前記書き込み命令はタイムアウトしているとする、ステップと、
を更に有する、付記7に記載のデータノード管理方法。
(Appendix 8)
(F) when the write command is accepted, adding an identifier and a time stamp of the data node management device to the data of the pair data to be written;
(G) When storing the child pair node in the data node is completed, the identifier and the time stamp given to the data of the parent pair data are acquired, and the acquired identifier and the time stamp are acquired. Are determined to be given by the data node management device, and if not given, the write command is timed out, and
The data node management method according to
(付記9)
コンピュータに、
(a)データとそれに対応するキー値とをペアデータとして格納するデータノードに対する命令を受け付ける、ステップと、
(b)受け付けられた前記命令が書き込み命令である場合に、書き込み対象となるペアデータにおいて、キー値に、予め設定された添え字を付与する、ステップと、
(c)書き込み対象となるペアデータを親ペアデータとして、親ペアデータに含まれるデータを設定数に分割し、分割された各データと親ペアデータのキー値とを合わせて、子ペアデータを生成し、その際、各子ペアデータのキー値に付与されている添え字を、子ペアデータ毎に異なる連続した識別番号に書き換え、更に、親ペアデータのデータに、各子ペアデータのキー値のリストを格納する、ステップと、
(d)分割によって生成した子ペアデータを、各子ペアデータのキー値に付与されている前記識別番号の順に、いずれかのデータノードに格納する、ステップと、
(e)受け付けられた命令が読み込み命令である場合に、前記リストに基づいて、読込対象となるペアデータの子ペアノードを取得し、取得した子ペアノードを結合する、ステップと、
を有する、ことを特徴とするプログラム。
(Appendix 9)
On the computer,
(A) receiving a command for a data node that stores data and a corresponding key value as pair data; and
(B) when the received command is a write command, a preset subscript is added to the key value in the pair data to be written; and
(C) The pair data to be written is the parent pair data, the data included in the parent pair data is divided into a set number, and the divided paired data and the key value of the parent pair data are combined to obtain the child pair data. At that time, the subscript attached to the key value of each child pair data is rewritten to a continuous identification number that differs for each child pair data, and further, the key of each child pair data is added to the data of the parent pair data. Storing a list of values, steps;
(D) storing the child pair data generated by the division in any of the data nodes in the order of the identification numbers given to the key values of the respective child pair data;
(E) when the received instruction is a read instruction, acquiring a child pair node of the pair data to be read based on the list, and combining the acquired child pair nodes;
The program characterized by having.
(付記10)
前記(b)のステップにおいて、前記書き込み命令が受け付けられると前記書き込み対象となるペアデータにおいて、データに、分割の有無及び状態を示すフラグを付与し、そして、前記子ペアデータの前記データノードへの格納が終了すると、前記親ペアデータの前記フラグを分割ありに設定し、
前記(c)のステップにおいて、前記書き込み対象となるペアデータで、設定された分割数に応じて子ペアデータヘの分割を行なう、
付記9に記載のプログラム。
(Appendix 10)
In the step (b), when the write command is accepted, in the pair data to be written, a flag indicating the presence / absence and state of division is added to the data, and the child pair data is sent to the data node. When the storage of is completed, the flag of the parent pair data is set to be divided,
In the step (c), the pair data to be written is divided into child pair data according to the set number of divisions.
The program according to appendix 9.
(付記11)
前記コンピュータに、
(f)前記書き込み命令が受け付けられた場合に、前記書き込み対象となるペアデータのデータに、当該データノード管理装置の識別子とタイムスタンプとを付与する、ステップと、
(g)前記子ペアノードの前記データノードへの格納が終了した場合に、前記親ペアデータのデータに付与されている、前記識別子と前記タイムスタンプとを取得し、取得した前記識別子と前記タイムスタンプとが、当該データノード管理装置によって付与されたものかどうかを判定し、付与されたものでない場合は、前記書き込み命令はタイムアウトしているとする、ステップと、
を更に実行させる、付記10に記載のプログラム。
(Appendix 11)
In the computer,
(F) when the write command is accepted, adding an identifier and a time stamp of the data node management device to the data of the pair data to be written;
(G) When storing the child pair node in the data node is completed, the identifier and the time stamp given to the data of the parent pair data are acquired, and the acquired identifier and the time stamp are acquired. Are determined to be given by the data node management device, and if not given, the write command is timed out, and
The program according to
以上のように、本発明によれば、KVペアのデータサイズに偏りがあっても、パーティションの再配置を行なうことなく、データ量の偏りの抑制と負荷の分散化とを図ることができる。本発明は、ストレージシステム、特に分散KVSシステムに有用である。 As described above, according to the present invention, even if the data size of the KV pair is uneven, it is possible to suppress the uneven amount of data and to distribute the load without rearranging the partitions. The present invention is useful for storage systems, particularly distributed KVS systems.
10 データノード管理装置
11 指示受付部
12 ペアデータ変換処理部
13 ペアデータ分割部
14 データノードアクセス部
15 データ統合部
16 タイムスタンプ判定部
20 データノード
21 通信部
22 ストレージ
23 ペアデータ削除部
30 ネットワーク
40 クライアント端末
100 ストレージシステム
110 コンピュータ
111 CPU
112 メインメモリ
113 記憶装置
114 入力インターフェイス
115 表示コントローラ
116 データリーダ/ライタ
117 通信インターフェイス
118 入力機器
119 ディスプレイ装置
120 記録媒体
121 バス
DESCRIPTION OF
112
Claims (7)
受け付けられた前記命令が書き込み命令である場合に、書き込み対象となるペアデータにおいて、キー値に、予め設定された添え字を付与する、ペアデータ変換処理部と、
書き込み対象となるペアデータを親ペアデータとして、親ペアデータに含まれるデータを設定数に分割し、分割された各データと親ペアデータのキー値とを合わせて、子ペアデータを生成し、その際、各子ペアデータのキー値に付与されている添え字を、子ペアデータ毎に異なる連続した識別番号に書き換え、更に、親ペアデータのデータに、各子ペアデータのキー値のリストを格納する、ペアデータ分割部と、
分割によって生成した子ペアデータを、各子ペアデータのキー値に付与されている前記識別番号の順に、いずれかの前記データノードに格納する、データノードアクセス部と、
受け付けられた命令が読み込み命令である場合に、前記リストに基づいて、読込対象となるペアデータの子ペアノードを取得し、取得した子ペアノードを結合する、データ結合部と、
を備えている、ことを特徴とするデータノード管理装置。 An instruction receiving unit that receives an instruction to a data node that stores data and a corresponding key value as pair data;
A pair data conversion processing unit that assigns a preset subscript to a key value in the pair data to be written when the received instruction is a write instruction;
The pair data to be written is the parent pair data, the data included in the parent pair data is divided into a set number, and each divided data and the key value of the parent pair data are combined to generate child pair data. At that time, the subscript attached to the key value of each child pair data is rewritten to a continuous identification number different for each child pair data, and further, a list of key values of each child pair data is added to the data of the parent pair data. A pair data dividing unit for storing
A data node access unit that stores child pair data generated by the division in any of the data nodes in the order of the identification numbers given to the key values of each child pair data;
When the received instruction is a read instruction, based on the list, obtain a child pair node of the pair data to be read, and combine the acquired child pair node;
A data node management device comprising:
前記ペアデータ分割部が、前記書き込み対象となるペアデータにおいて、設定された分割数に応じて子ペアデータヘの分割を行なう、
請求項1に記載のデータノード管理装置。 When the write command is received, the pair data conversion processing unit gives a flag indicating the presence / absence and state of division to the data to be written in the pair data to be written, and sends the data to the data node of the child pair data When the storage of is completed, the flag of the parent pair data is set to be divided,
In the pair data to be written, the pair data dividing unit performs division into child pair data according to the set number of divisions.
The data node management device according to claim 1.
更に、前記子ペアノードの前記データノードへの格納が終了した場合に、前記親ペアデータのデータに付与されている、前記識別子と前記タイムスタンプとを取得し、取得した前記識別子と前記タイムスタンプとが、当該データノード管理装置によって付与されたものかどうかを判定し、付与されたものでない場合は、前記書き込み命令はタイムアウトしているとする、タイムスタンプ判定部を備えている、
請求項2に記載のデータノード管理装置。 When the write command is accepted, the identifier of the data node management device and a time stamp are given to the data of the pair data to be written,
Further, when the storage of the child pair node in the data node is completed, the identifier and the time stamp given to the data of the parent pair data are acquired, and the acquired identifier and the time stamp are Is determined by the data node management device, and if not, the write command is timed out, provided with a time stamp determination unit,
The data node management device according to claim 2.
前記データノード管理装置は、
前記データノードに対する命令を受け付ける、指示受付部と、
受け付けられた前記命令が書き込み命令である場合に、書き込み対象となるペアデータにおいて、キー値に、予め設定された添え字を付与する、ペアデータ変換処理部と、
書き込み対象となるペアデータを親ペアデータとして、親ペアデータに含まれるデータを設定数に分割し、分割された各データと親ペアデータのキー値とを合わせて、子ペアデータを生成し、その際、各子ペアデータのキー値に付与されている添え字を、子ペアデータ毎に異なる連続した識別番号に書き換え、更に、親ペアデータのデータに、各子ペアデータのキー値のリストを格納する、ペアデータ分割部と、
分割によって生成した子ペアデータを、各子ペアデータのキー値に付与されている前記識別番号の順に、いずれかの前記データノードに格納する、データノードアクセス部と、
受け付けられた命令が読み込み命令である場合に、前記リストに基づいて、読込対象となるペアデータの子ペアノードを取得し、取得した子ペアノードを結合する、データ結合部と、
を備えている、ことを特徴とするストレージシステム。 A data node that stores data and a corresponding key value as pair data, and a data node management device,
The data node management device includes:
An instruction receiving unit for receiving an instruction for the data node;
A pair data conversion processing unit that assigns a preset subscript to a key value in the pair data to be written when the received instruction is a write instruction;
The pair data to be written is the parent pair data, the data included in the parent pair data is divided into a set number, and each divided data and the key value of the parent pair data are combined to generate child pair data. At that time, the subscript attached to the key value of each child pair data is rewritten to a continuous identification number different for each child pair data, and further, a list of key values of each child pair data is added to the data of the parent pair data. A pair data dividing unit for storing
A data node access unit that stores child pair data generated by the division in any of the data nodes in the order of the identification numbers given to the key values of each child pair data;
When the received instruction is a read instruction, based on the list, obtain a child pair node of the pair data to be read, and combine the acquired child pair node;
A storage system characterized by comprising:
前記データノードが格納する前記ペアデータの中から前記子ペアデータを特定し、特定した前記子ペアデータのうち、設定条件を満たす子ペアデータを削除する、ペアデータ削除部を更に備えている、
請求項4に記載のストレージシステム。 The data node is
The child node data is specified from the pair data stored in the data node, and the child data pair is further deleted.
The storage system according to claim 4.
(b)受け付けられた前記命令が書き込み命令である場合に、書き込み対象となるペアデータにおいて、キー値に、予め設定された添え字を付与する、ステップと、
(c)書き込み対象となるペアデータを親ペアデータとして、親ペアデータに含まれるデータを設定数に分割し、分割された各データと親ペアデータのキー値とを合わせて、子ペアデータを生成し、その際、各子ペアデータのキー値に付与されている添え字を、子ペアデータ毎に異なる連続した識別番号に書き換え、更に、親ペアデータのデータに、各子ペアデータのキー値のリストを格納する、ステップと、
(d)分割によって生成した子ペアデータを、各子ペアデータのキー値に付与されている前記識別番号の順に、いずれかのデータノードに格納する、ステップと、
(e)受け付けられた命令が読み込み命令である場合に、前記リストに基づいて、読込対象となるペアデータの子ペアノードを取得し、取得した子ペアノードを結合する、ステップと、
を有する、ことを特徴とするデータノード管理方法。 (A) receiving a command for a data node that stores data and a corresponding key value as pair data; and
(B) when the received command is a write command, a preset subscript is added to the key value in the pair data to be written; and
(C) The pair data to be written is the parent pair data, the data included in the parent pair data is divided into a set number, and the divided paired data and the key value of the parent pair data are combined to obtain the child pair data. At that time, the subscript attached to the key value of each child pair data is rewritten to a continuous identification number that differs for each child pair data, and further, the key of each child pair data is added to the data of the parent pair data. Storing a list of values, steps;
(D) storing the child pair data generated by the division in any of the data nodes in the order of the identification numbers given to the key values of the respective child pair data;
(E) when the received instruction is a read instruction, acquiring a child pair node of the pair data to be read based on the list, and combining the acquired child pair nodes;
A data node management method characterized by comprising:
(a)データとそれに対応するキー値とをペアデータとして格納するデータノードに対する命令を受け付ける、ステップと、
(b)受け付けられた前記命令が書き込み命令である場合に、書き込み対象となるペアデータにおいて、キー値に、予め設定された添え字を付与する、ステップと、
(c)書き込み対象となるペアデータを親ペアデータとして、親ペアデータに含まれるデータを設定数に分割し、分割された各データと親ペアデータのキー値とを合わせて、子ペアデータを生成し、その際、各子ペアデータのキー値に付与されている添え字を、子ペアデータ毎に異なる連続した識別番号に書き換え、更に、親ペアデータのデータに、各子ペアデータのキー値のリストを格納する、ステップと、
(d)分割によって生成した子ペアデータを、各子ペアデータのキー値に付与されている前記識別番号の順に、いずれかのデータノードに格納する、ステップと、
(e)受け付けられた命令が読み込み命令である場合に、前記リストに基づいて、読込対象となるペアデータの子ペアノードを取得し、取得した子ペアノードを結合する、ステップと、
を有する、ことを特徴とするプログラム。 On the computer,
(A) receiving a command for a data node that stores data and a corresponding key value as pair data; and
(B) when the received command is a write command, a preset subscript is added to the key value in the pair data to be written; and
(C) The pair data to be written is the parent pair data, the data included in the parent pair data is divided into a set number, and the divided paired data and the key value of the parent pair data are combined to obtain the child pair data. At that time, the subscript attached to the key value of each child pair data is rewritten to a continuous identification number that differs for each child pair data, and further, the key of each child pair data is added to the data of the parent pair data. Storing a list of values, steps;
(D) storing the child pair data generated by the division in any of the data nodes in the order of the identification numbers given to the key values of the respective child pair data;
(E) when the received instruction is a read instruction, acquiring a child pair node of the pair data to be read based on the list, and combining the acquired child pair nodes;
The program characterized by having.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2017055492A JP2018159987A (en) | 2017-03-22 | 2017-03-22 | Data node management apparatus, storage system, data node management method and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2017055492A JP2018159987A (en) | 2017-03-22 | 2017-03-22 | Data node management apparatus, storage system, data node management method and program |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2018159987A true JP2018159987A (en) | 2018-10-11 |
Family
ID=63796669
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2017055492A Pending JP2018159987A (en) | 2017-03-22 | 2017-03-22 | Data node management apparatus, storage system, data node management method and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2018159987A (en) |
-
2017
- 2017-03-22 JP JP2017055492A patent/JP2018159987A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9971823B2 (en) | Dynamic replica failure detection and healing | |
US11442961B2 (en) | Active transaction list synchronization method and apparatus | |
US20150324371A1 (en) | Data Processing Method and Device in Distributed File Storage System | |
US20130218934A1 (en) | Method for directory entries split and merge in distributed file system | |
US9031906B2 (en) | Method of managing data in asymmetric cluster file system | |
US10908834B2 (en) | Load balancing for scalable storage system | |
US9372879B1 (en) | Balanced append tree data structure | |
JP6582445B2 (en) | Thin client system, connection management device, virtual machine operating device, method, and program | |
US11663192B2 (en) | Identifying and resolving differences between datastores | |
US11675743B2 (en) | Web-scale distributed deduplication | |
JP6405255B2 (en) | COMMUNICATION SYSTEM, QUEUE MANAGEMENT SERVER, AND COMMUNICATION METHOD | |
US10673713B2 (en) | Communication control device, communication device, and computer program product for dynamic group management | |
US10440523B2 (en) | Communication control device, communication device, and computer program product for managing a group of devices | |
US9262219B2 (en) | Distributed processing system, distributed processing method, and distributed processing program | |
JP6951846B2 (en) | Computer system and task allocation method | |
CN113760847A (en) | Log data processing method, device, equipment and storage medium | |
JP4891657B2 (en) | Data storage system, file search device and program | |
US9578120B1 (en) | Messaging with key-value persistence | |
KR20130038517A (en) | System and method for managing data using distributed containers | |
US10083121B2 (en) | Storage system and storage method | |
KR100983479B1 (en) | Method, system and computer readable recording medium for providing a distributed programming environment using distributed space | |
US10185735B2 (en) | Distributed database system and a non-transitory computer readable medium | |
JP2018159987A (en) | Data node management apparatus, storage system, data node management method and program | |
CN112181899A (en) | Metadata processing method and device and computer readable storage medium | |
US20240004712A1 (en) | Fencing off cluster services based on shared storage access keys |