JP5657498B2 - File search system - Google Patents
File search system Download PDFInfo
- Publication number
- JP5657498B2 JP5657498B2 JP2011217881A JP2011217881A JP5657498B2 JP 5657498 B2 JP5657498 B2 JP 5657498B2 JP 2011217881 A JP2011217881 A JP 2011217881A JP 2011217881 A JP2011217881 A JP 2011217881A JP 5657498 B2 JP5657498 B2 JP 5657498B2
- Authority
- JP
- Japan
- Prior art keywords
- index
- file
- search
- processing
- server
- 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.)
- Expired - Fee Related
Links
Images
Description
本発明は、大規模なファイル群を対象とした検索用インデクスの効率的な生成・更新・管理技術に関する。 The present invention relates to a technique for efficiently generating, updating, and managing a search index for a large group of files.
近年におけるアプリケーションの多様化やストレージコストの低価格化に伴い、ストレージに保存されるデータ量は爆発的に増加している。これに伴い、企業内で扱うドキュメントデータのデータ量も膨大になっている。このため、大量に存在するデータを有効活用するための検索システムの重要性が増している。 With the recent diversification of applications and lower storage costs, the amount of data stored in storage has increased explosively. Along with this, the amount of document data handled in the company has become enormous. For this reason, the importance of a search system for effectively utilizing a large amount of data is increasing.
通常、検索対象とするドキュメントの数が膨大である場合、検索インデクス(索引データ)の事前の生成により、検索パフォーマンスの向上が図られている。この他、同じ検索インデクスを複数の検索サーバに設置して負荷を分散する方法や、複数の検索サーバ上に検索インデクスを分割配置し、検索処理を分散する方法等も、検索パフォーマンスの向上を図る方法として一般に採用されている。 Usually, when the number of documents to be searched is enormous, search performance is improved by generating search indexes (index data) in advance. In addition, methods such as installing the same search index on multiple search servers to distribute the load and distributing search processing by dividing search indexes on multiple search servers to improve search performance Generally used as a method.
このような技術背景において、検索インデクスの生成方法についても、様々な技術が提案されている。例えば特許文献1には、分割された検索インデクスのサイズの偏りをなるべく低減する手法が開示されている。
In such a technical background, various techniques have been proposed as a search index generation method. For example,
しかし、現在のIT情勢を考慮すると、検索対象となるデータ量は、今後ますます肥大化すると考えられる。また、検索サーバ数や分割インデクス数も膨大になることが容易に予想される。従って、今後は、分割インデクスを高速に生成できる仕組みが必要になると発明者らは考える。 However, in consideration of the current IT situation, the amount of data to be searched is considered to increase further in the future. In addition, the number of search servers and the number of divided indexes are easily expected to become enormous. Therefore, the inventors think that a mechanism capable of generating a split index at high speed will be required in the future.
そこで、発明者らは、前述した課題のうち分割インデクスの高速生成を目的として、各検索サーバに割り当てる分割インデクスの生成対象となるファイルパスのリストを生成する第1の処理機能部と、前記リストに基づいて分割インデクスを生成する第2の処理機能部と、生成された分割インデクスを検索サーバに配置する第3の処理機能部と、前記第1〜第3の処理機能部間における処理動作をパイプライン処理により実現する第4の処理機能部とを有するファイル検索システムを提案する。 Therefore, the inventors have a first processing function unit that generates a list of file paths to be generated for the split index to be assigned to each search server for the purpose of high-speed generation of the split index among the above-described problems, and the list A processing function between the second processing function unit that generates the split index based on the third processing function unit that places the generated split index in the search server, and the first to third processing function units. A file search system having a fourth processing function unit realized by pipeline processing is proposed.
本発明によれば、分割インデクスを高速に生成することができる。上述した以外の課題、構成及び効果は、以下の実施の形態の説明により明らかにされる。 According to the present invention, a split index can be generated at high speed. Problems, configurations, and effects other than those described above will become apparent from the following description of embodiments.
以下の実施の形態においては、複数のセクションに分割して、実施の形態に係る検索システムの実現に必要な処理機能を説明する。以下の実施の形態において、要素の数等(個数、数値、量、範囲等を含む)に言及する場合、特に明示した場合および原理的に明らかに特定の数に限定される場合等を除き、その特定の数に限定されるものではなく、特定の数以上でも以下でもよい。以下の実施の形態において、その構成要素(要素ステップ等も含む)は、特に明示した場合および原理的に明らかに必須であると考えられる場合等を除き、必ずしも必須のものではない。 In the following embodiment, processing functions necessary for realizing the search system according to the embodiment will be described by being divided into a plurality of sections. In the following embodiments, when referring to the number of elements, etc. (including the number, numerical value, quantity, range, etc.), unless otherwise specified and in principle limited to a specific number in principle, It is not limited to the specific number, and may be more or less than the specific number. In the following embodiments, the constituent elements (including element steps and the like) are not necessarily indispensable unless otherwise specified or apparently essential in principle.
また、以下の実施の形態において、各構成、機能、処理部、処理手段等は、それらの一部又は全部を、例えば集積回路その他のハードウェアとして実現しても良い。また、前述した各構成、機能等は、プロセッサがそれぞれの機能を実現するプログラムを解釈し、実行することにより実現しても良い。すなわち、ソフトウェアとして実現しても良い。各機能を実現するプログラム、テーブル、ファイル等の情報は、メモリやハードディスク、SSD(Solid State Drive)等の記憶装置、ICカード、SDカード、DVD等の記憶媒体に格納することができる。 Further, in the following embodiments, each configuration, function, processing unit, processing unit, and the like may be partially or entirely realized as, for example, an integrated circuit or other hardware. Further, each configuration, function, and the like described above may be realized by a processor interpreting and executing a program that realizes each function. That is, it may be realized as software. Information such as programs, tables, and files for realizing each function can be stored in a memory, a hard disk, a storage device such as an SSD (Solid State Drive), or a storage medium such as an IC card, an SD card, or a DVD.
また、制御線や情報線は、説明上必要と考えられるものを示すものであり、製品上必要な全ての制御線や情報線を表すものでない。実際にはほとんど全ての構成が相互に接続されていると考えて良い。 Control lines and information lines indicate what is considered necessary for the description, and do not represent all control lines and information lines necessary for the product. In practice, it can be considered that almost all components are connected to each other.
以下、本発明の実施の形態を図面に基づいて詳細に説明する。なお、実施の形態を説明するための全図において、同一の機能を有する部材には同一または関連する符号を付し、その繰り返しの説明は省略する。また、以下の実施の形態では、特に必要なとき以外は同一または同様な部分の説明を原則として繰り返さない。 Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings. Note that components having the same function are denoted by the same or related reference symbols throughout the drawings for describing the embodiments, and the repetitive description thereof is omitted. In the following embodiments, the description of the same or similar parts will not be repeated in principle unless particularly necessary.
[検索システムの全体構成]
図1に、本形態例に係る検索システムの構成例を示す。本形態例に係る検索システムは、検索クライアント100、検索サーバ101、ファイルサーバ102、分散処理サーバ103、管理サーバ104から構成され、それらがネットワーク105を通じて互いに接続されている。ネットワーク105は、ローカルエリアネットワーク(LAN)、ワイドエリアネットワーク(WAN)等として一般に知られるネットワークを用いて実現することができる。なお、ネットワーク105は、有線ネットワークでも無線ネットワークでも構わない。また、検索システムは、1つの領域・国内に構築される必要は無く、複数の地域・国間を跨いで構築されてもよい。
[Entire configuration of search system]
FIG. 1 shows a configuration example of a search system according to this embodiment. The search system according to this embodiment includes a search client 100, a
[検索クライアントの構成]
検索クライアント100は、Webブラウザを動作させることができる環境がインストールされたコンピュータであり、据え置き型に限らず、携帯型のコンピュータ、携帯情報端末、携帯電話機の端末を含む。検索クライアント100は、HTTP(Hypertext Transfer Protocol)等を使用して検索サーバ101に対して検索クエリを送信する機能と、検索サーバ101から検索結果を取得する機能と、取得した検索結果を利用者に表示する機能とを有している。検索クライアント100は、検索システム上に複数存在する。
Search client configuration
The search client 100 is a computer in which an environment capable of operating a Web browser is installed, and is not limited to a stationary type, but includes a portable computer, a portable information terminal, and a mobile phone terminal. The search client 100 uses a HTTP (Hypertext Transfer Protocol) or the like to transmit a search query to the
[検索サーバの構成]
図2に、検索サーバ101の内部構成例を示す。検索サーバ101は、検索クライアント100から検索クエリを受信して検索処理を実行し、検索結果を返信するサーバである。検索サーバ101は、検索システム内に複数台存在し、それぞれがローカルストレージ201を保持している。ローカルストレージ201内には、ファイルサーバ102に保存されるファイル群に基づいて生成された検索用の分割インデクス202が保存されている。
Search server configuration
FIG. 2 shows an internal configuration example of the
検索サーバ101には、インデクス管理モジュール203と検索モジュール204がインストールされている。インデクス管理モジュール203は、分割インデクス202の管理・更新用のプログラムである。検索モジュール204は、検索用の分割インデクスを用いて検索処理を実行するプログラムである。因みに、インデクス管理モジュール203と検索モジュール204は、検索サーバ101のそれぞれにインストールされている。
In the
分割インデクス202は、ファイルサーバ102上に保存されているファイル群に基づいて、管理サーバ104上のインデクス生成モジュール403及び分散処理サーバ103により生成される検索用のインデクスである。後述するように、分割インデクス202は、コンシステントハッシュ法に基づいて、インデクスID毎に分割されたインデクスである。なお、インデクスIDには分割インデクス202が紐付けられており、この紐付きを通じ、検索サーバ101に分割インデクス202が配置される。検索サーバ101上に配置させる分割インデクス202の数(インデクスの分割数)は、あらかじめ管理者が決定する。
The
インデクス管理モジュール203は、分割インデクス202を、検索サーバ101に配置・管理するモジュールである。分割インデクス202が新たに生成された場合、インデクス管理モジュール203は、分割インデクス202を検索サーバ101のローカルディスク201にダウンロードして保存する。
The index management module 203 is a module that arranges and manages the
検索サーバ101に分割インデクス202が既に存在し、その分割インデクス202の更新操作を実行する場合、インデクス管理モジュール203は、既存の分割インデクス202に対して、新規に生成された分割インデクスをマージして最新の分割インデクスを生成する。
When the
検索サーバ101の追加により、システム全体で保持している分割インデクスの数が増加した場合、インデクス管理モジュール203は、それぞれの検索サーバ101に保存されている既存の分割インデクス202をさらに分割する機能を有する。なお、新たに追加された検索サーバ101のインデクス管理モジュール203は、他の検索サーバ101で新規に分割されたインデクスを集約して1つの分割インデクス202を生成する機能を有する。
When the number of split indexes held in the entire system increases due to the addition of the
削除対象の検索サーバ101におけるインデクス管理モジュール203は、自サーバに保持されていた分割インデクス202をインデクスIDに従って再度分割し、他の検索サーバ101の分割インデクス202に割り振る機能を有する。
The index management module 203 in the
検索モジュール204は、検索サーバ101に配置された分割インデクス202を使用して、検索クライアント100から受け取った検索クエリに対する検索結果を生成し、検索クライアント100に検索結果を返信する機能を有する検索エンジンである。検索モジュール204は、他の検索サーバ群にインストールされているそれぞれの検索モジュール204と連携し、検索処理を分散的に実行する機能も有している。
The search module 204 is a search engine that has a function of generating a search result for a search query received from the search client 100 using the
[ファイルサーバの構成]
ファイルサーバ102は、企業内等において作成された大量のドキュメントデータを保存するサーバである。ファイルサーバ102は、検索システム内に複数台存在する。各ファイルサーバ102は、分散処理サーバ103及び管理サーバ104と、NFS(Network File System)やCIFS(Common Internet File System)等のプロトコルを通じて接続されている。これにより、分散処理サーバ103及び管理サーバ104上の各モジュールは、ファイルサーバ102上に存在するファイルへのアクセス及びファイル情報の取得が可能である。
[File Server Configuration]
The file server 102 is a server that stores a large amount of document data created in a company or the like. A plurality of file servers 102 exist in the search system. Each file server 102 is connected to the distributed
[分散処理サーバの構成]
図3に、分散処理サーバ103の内部構成例を示す。分散処理サーバ103は、検索システム内に複数台存在する。これら複数の分散処理サーバ103は、一つの処理命令を他のサーバとの連携により分散的に処理する機能を有するサーバ群である。
[Configuration of distributed processing server]
FIG. 3 shows an internal configuration example of the distributed
分散処理サーバ103には、分散ファイルシステム302と分散処理モジュール303がインストールされている。分散処理サーバ103には、ローカルストレージ301が設けられている。分散ファイルシステム302は、ローカルストレージ301を用い、共通する一つのファイルシステムを全ての分散処理サーバ103から利用可能とするモジュールである。分散処理モジュール303は、管理サーバ104のインデクス生成モジュール402から命令を受けた場合、他の分散処理サーバ103と連携し、分割インデクス202を分散的に生成する機能を有するモジュールである。
A distributed file system 302 and a distributed processing module 303 are installed in the distributed
[管理サーバの構成]
図4に、管理サーバ104の内部構成例を示す。管理サーバ104は、検索システムを構成する検索サーバ101、ファイルサーバ102、分散処理サーバ103等のサーバ管理機能を有するサーバである。管理サーバ104のローカルストレージ401には、分割インデクスの生成を制御するためのスキャナモジュール402、インデクス生成モジュール403、パイプライン制御モジュール404、システム管理モジュール405、インデクスIDテーブル406、検索サーバ管理テーブル407、ファイル管理テーブル408がインストールされている。これらのモジュールは、管理サーバ104以外に存在してもよい。例えばこれらのモジュールの全部又は一部は、分散処理サーバ103上で直接動作可能であってもよい。
[Management server configuration]
FIG. 4 shows an internal configuration example of the
スキャナモジュール402は、ファイルサーバ102上のファイル・ディレクトリをスキャンして、ファイル・フォルダパス名の一覧とそれらの属性情報を取得する機能と、それらのファイル・フォルダが新規生成・更新・削除のいずれの状態であるかを判定し、インデクスのターゲットとなるファイルパスが記述されたインデクスリストを生成する機能とを有するモジュールである。 The scanner module 402 scans a file / directory on the file server 102 to acquire a list of file / folder path names and their attribute information, and the file / folder is newly created / updated / deleted. It is a module having a function of determining whether or not the file is in the state and generating an index list in which the file path that is the target of the index is described.
スキャナモジュール402の機能は、以下の処理機能の実行を通じ実現することができる。例えばLinuxのFindコマンドを利用し、ファイルサーバ102上のファイル・ディレクトリパスの一覧とそれらの属性情報を取得する。この後、取得したファイル属性情報のハッシュ値を計算する。次に、任意のタイミングに取得しておいたファイル管理テーブル408(後述)に格納されているファイル属性情報のハッシュ値702(図7)と計算されたハッシュ値を比較し、その一致・不一致により、インデクス対象となるか否かを判定する。 The functions of the scanner module 402 can be realized by executing the following processing functions. For example, by using a Linux Find command, a list of file / directory paths on the file server 102 and their attribute information are acquired. Thereafter, a hash value of the acquired file attribute information is calculated. Next, the hash value 702 (FIG. 7) of the file attribute information stored in the file management table 408 (described later) acquired at an arbitrary timing is compared with the calculated hash value. It is determined whether or not it is an index target.
ハッシュ値が同じであった場合、スキャナモジュール402は、該当するファイル・ディレクトリに更新が無いと判定し、インデクシングの対象外とする。ハッシュ値が異なる場合、スキャナモジュール402は、ファイル・ディレクトリに更新があったと判定し、インデクシング対象に設定する。 If the hash values are the same, the scanner module 402 determines that the corresponding file / directory has not been updated, and excludes it from the indexing target. If the hash values are different, the scanner module 402 determines that the file / directory has been updated, and sets it as an indexing target.
ファイル管理テーブル408にファイル・フォルダパス701が存在するにもかかわらず、Findコマンドによって取得できない場合、スキャナモジュール402は、当該ファイルパスがファイル削除を示すように、インデクスリストに情報を書き出す。
If the file management table 408 has a file /
なお、インデクスリストは、インデクス処理対象のファイルパス、処理ステータスが記述されたテキストファイルである。インデクスリストに記載されるファイルパスと処理ステータスは、スキャナモジュール402がファイル管理テーブル408から抜き出して生成する一時ファイルであり、後述するインデクス生成モジュール403により利用される。 The index list is a text file that describes the file path and processing status of the index processing target. The file path and the processing status described in the index list are temporary files generated by the scanner module 402 extracted from the file management table 408, and are used by the index generation module 403 described later.
スキャナモジュール402は、各ファイルサーバ102上のファイルシステムのルートから最深部までを一度にスキャンするのでなく、1フォルダ階層毎又は任意のフォルダ階層毎にインデクスリストを出力し、インデクス生成モジュール403及びインデクス管理モジュール203の間でパイプライン処理を実行する。これにより、スキャナモジュール402がファイルサーバ102のスキャンを完全に終える前に、インデクス生成モジュール403及びインデクス管理モジュール203がインデクスの生成・更新処理を開始することが可能となり、インデクス生成速度の高速化を実現することが可能となる。 The scanner module 402 does not scan from the root to the deepest part of the file system on each file server 102 at once, but outputs an index list for each folder hierarchy or for each arbitrary folder hierarchy, and the index generation module 403 and the index generation module 403 Pipeline processing is executed between the management modules 203. As a result, before the scanner module 402 completes scanning of the file server 102, the index generation module 403 and the index management module 203 can start index generation / update processing, thereby increasing the index generation speed. It can be realized.
インデクス生成モジュール403は、スキャナモジュール402が出力したインデクスリストに基づいて、分散処理サーバ103にインデクスを分散的に生成させる機能を有するモジュールである。インデクス生成モジュール403は、コンシステントハッシュ法に基づいてファイルパスに対応するハッシュ値を算出し、当該ハッシュ値から対応するインデクスIDを求める。また、インデクス生成モジュール403は、インデクスID毎に分割インデクスを生成する。
The index generation module 403 is a module having a function of causing the distributed
インデクス生成モジュール403の処理は、タスクと呼ばれる処理単位に分割され、複数の分散処理サーバ103に分散される。なお、タスクは、分散処理サーバ103上において、第一の分散処理と第二の分散処理に分けて実行される。これらの処理は、大規模分散処理の技術として知られるMapReduceを使用することでも実現できる。その場合、第一の分散処理をMap処理、第二の分散処理をReduce処理として実現する。詳細動作については後述する。
The processing of the index generation module 403 is divided into processing units called tasks and distributed to a plurality of distributed
パイプライン制御モジュール404は、インデクスの生成を高速化するために、スキャナモジュール402、インデクス生成モジュール403、インデクス管理モジュール203の処理を多重化制御するためのモジュールである。各モジュールのパイプライン制御に関する詳細動作は後述する。 The pipeline control module 404 is a module for controlling the processes of the scanner module 402, the index generation module 403, and the index management module 203 in a multiplexed manner in order to speed up the index generation. Detailed operations regarding pipeline control of each module will be described later.
システム管理モジュール405は、検索システム上に存在するサーバ群の管理や各種テーブルを初期化を実行する機能と、システムの初期化に係るパラメータを管理者が入力するためのユーザインターフェースを提供する機能とを有するモジュールである。 The system management module 405 includes a function for managing a group of servers existing on the search system and initializing various tables, and a function for providing a user interface for an administrator to input parameters relating to system initialization. It is a module which has.
インデクスIDテーブル406の例を図5に示す。インデクスIDテーブル406は、仮想インデクスID501とインデクスID502を格納するテーブルであり、ファイルパスからインデクスIDを取得するために用いられる。インデクスIDテーブル406は、コンシステントハッシュ法の実現手段として利用される。
An example of the index ID table 406 is shown in FIG. The index ID table 406 stores a
以下、コンシステントハッシュ法について解説する。コンシステントハッシュ法は、0〜2^128−1(2^128はMD5ハッシュ法に基づく値。MD5は一例であって、任意のハッシュアルゴリズムを利用することが可能である)の整数の目盛りが振られた円周上にインデクスIDのハッシュ値を求めて配置し、円周上の範囲を分割する。なお、インデクスIDのハッシュ値を取得するとは、インデクスIDを文字列としてMD5等のハッシュ関数を適用することを意味する。 The following describes the consistent hash method. The consistent hash method has an integer scale of 0 to 2 ^ 128-1 (2 ^ 128 is a value based on the MD5 hash method. MD5 is an example and any hash algorithm can be used). A hash value of the index ID is obtained and arranged on the circled circle, and the range on the circle is divided. Note that acquiring the hash value of the index ID means applying a hash function such as MD5 using the index ID as a character string.
ファイルパスからインデクスIDを取得するには、ファイルパスから同じハッシュ関数(この例ではMD5)を利用してハッシュ値を求めて円周上に配置し、その位置から反時計回りに回って最初に遭遇するハッシュ値に対応するインデクスIDが、ファイルパスに紐付けるインデクスIDとなる。以上が基本的なコンシステントハッシュの概念である。ただし、単純なコンシステントハッシュ法は、各インデクスIDに割り当てられるファイル数は、円周上で分割される間隔に依存する。 In order to obtain the index ID from the file path, the hash value is obtained from the file path by using the same hash function (MD5 in this example), arranged on the circumference, and rotated counterclockwise from that position first. The index ID corresponding to the encountered hash value is the index ID associated with the file path. The above is the basic concept of consistent hash. However, in the simple consistent hash method, the number of files assigned to each index ID depends on the interval divided on the circumference.
このため、インデクスIDのハッシュ値だけで分割すると、インデクスIDの追加・削除を行った場合に、各インデクスIDに割り当てられるファイル数に偏りが生じてしまう。これは、インデクスサイズが各分割インデクス間で偏ることを意味し、検索パフォーマンスの劣化を招くことになる。このため、インデクスサイズを平準化する必要がある。 For this reason, if only the hash value of the index ID is divided, when the index ID is added / deleted, the number of files allocated to each index ID is biased. This means that the index size is biased among the respective split indexes, and the search performance is deteriorated. For this reason, it is necessary to level the index size.
平準化を行うには、円周上に配置されるインデクスIDに対応する点の間隔を短くすることが必要となる。そこで、コンシステントハッシュ法の仮想ノードに相当する仮想インデクスIDを生成する。仮想インデクスIDは、インデクスIDに紐付けられるハッシュ値であり、1インデクスIDあたりn個の仮想インデクスIDを生成し、システム上に存在するそれぞれの分割インデクス間でサイズを平準化させる。仮想インデクスIDの生成と使用方法については後述する。 In order to perform leveling, it is necessary to shorten the interval between the points corresponding to the index IDs arranged on the circumference. Therefore, a virtual index ID corresponding to the virtual node of the consistent hash method is generated. The virtual index ID is a hash value linked to the index ID, and n virtual index IDs are generated for each index ID, and the size is leveled between the respective divided indexes existing on the system. A method for generating and using the virtual index ID will be described later.
検索サーバ管理テーブル407の例を図6に示す。検索サーバ管理テーブル407は、インデクスID601と、そのインデクスIDが紐付けられている分割インデクスが配置されている配置先検索サーバ名602、分割インデクスの保存先のパス603、削除インデクスリストの保存先のパス604が格納されたテーブルである。削除インデクスリスト604は、インデクス生成モジュール403により生成される一時ファイルであり、検索サーバ101上に既に配置されている分割インデクス202において、削除すべきファイルパスが1行毎に書かれたテキストファイルである。
An example of the search server management table 407 is shown in FIG. The search server management table 407 includes an
ファイル管理テーブル408の例を図7に示す。ファイル管理テーブル408は、ファイルサーバ102上に存在するファイル・フォルダパス名701の一覧と、それらの属性情報及びその属性情報から生成したハッシュ値702を保存・管理するためのテーブルである。このテーブルに保存されているハッシュ値702と、スキャナモジュール402のスキャン実行時に取得したファイルの属性情報から生成されるハッシュ値702を比較し、ファイルの更新状態(処理ステータス)703をチェックする。
An example of the file management table 408 is shown in FIG. The file management table 408 is a table for storing and managing a list of file /
[検索サーバ管理テーブルの初期化フロー]
図8に、検索サーバ管理テーブル407の初期化フローを示す。ここでは、検索サーバ101が2台存在し、各検索サーバ101上に2つ分割インデクス202を配置する場合を想定する。すなわち、検索システム全体におけるインデクスの分割数は4(=2×2)である場合を想定する。また、2台の検索サーバ名は、”Search1”と”Search2”であるものとする。
[Search server management table initialization flow]
FIG. 8 shows an initialization flow of the search server management table 407. Here, it is assumed that there are two
まず、管理者は、検索サーバ管理テーブル407の初期化を行うために、検索サーバ101の台数、及び、各検索サーバ101上に配置する分割インデクス202の数からインデクスの分割数を設定する(S801)。
First, in order to initialize the search server management table 407, the administrator sets the number of index divisions based on the number of
前述したように、この説明では、2台の検索サーバ101上に2つずつ分割インデクス202が配置されている。このため、全体のインデクス分割数は4である。この情報をシステム管理モジュール405に入力すると、システム管理モジュール405は、各分割インデクス202に対して割り振るインデクスIDを決定する(S802)。本明細書の場合、インデクスIDは0から始まる昇順の数字とする。すなわち、システム管理モジュール405は、「0」、「1」、「2」、「3」の順番にインデクスIDを割り振る。
As described above, in this description, two divided
次に、システム管理モジュール405は、各インデクスIDと検索サーバ101との紐付けを実行し(S803)、その結果を検索サーバ管理テーブル407に格納する(S804)。本実施例に場合、システム管理モジュール405が自動的にインデクスIDと検索サーバの紐付けを実行するが、管理者が手動で設定してもよい。 Next, the system management module 405 associates each index ID with the search server 101 (S803), and stores the result in the search server management table 407 (S804). In this embodiment, the system management module 405 automatically associates the index ID with the search server, but may be set manually by the administrator.
例えば本実施例の場合、検索サーバ管理テーブル407のエントリは、「インデクスID=0,配置先検索サーバ名=Search1」、「インデクスID=1,配置先検索サーバ名=Search1」、「インデクスID=2,配置先検索サーバ名=Search2」、「インデクスID=3,配置先検索サーバ名=Search2」の4つとなる。なお、初期化後の段階において、分割インデクス保存先パス603、削除インデクスリスト保存先パス604は空欄である。以上で、検索サーバ管理テーブル407の初期化が完了する。
For example, in this embodiment, the entries of the search server management table 407 include “index ID = 0, placement destination search server name =
[インデクスIDテーブルの初期化フロー]
図9に、インデクスIDテーブル406の初期化フローを示す。インデクスIDテーブル406の初期化も検索サーバ管理テーブル407の初期化と同様のタイミングで実行される。
[Index ID table initialization flow]
FIG. 9 shows an initialization flow of the index ID table 406. The initialization of the index ID table 406 is also executed at the same timing as the initialization of the search server management table 407.
まず、管理者が検索サーバ101の台数と各検索サーバ101上に配置する分割インデクスの数に基づいてインデクスの分割数を設定し(S901)、インデクスIDを決定する(S902)。
First, the administrator sets the number of index divisions based on the number of
ここでも、インデクスIDは、「0」、「1」、「2」、「3」の4つであるものとする。なお、仮想インデクスIDの数は、一つのインデクスIDに対して2であるものとする。仮想インデクスIDの数は、最終的にインデクスIDに紐付けられるファイル数が平準化されるように定められる任意の固定値である。 Also here, it is assumed that there are four index IDs of “0”, “1”, “2”, and “3”. Note that the number of virtual index IDs is 2 for one index ID. The number of virtual index IDs is an arbitrary fixed value determined so that the number of files finally linked to the index IDs is leveled.
次に、システム管理モジュール405は、1つのインデクスIDに対して任意の仮想インデクスIDを生成する(S903)。例えばインデクスID「0」に紐付ける仮想インデクスIDを「0−0」、「0−1」、インデクスID「1」に紐付ける仮想インデクスIDを「1−0」、「1−1」、インデクスID「2」に紐付ける仮想インデクスIDを「2−0」、「2−1」、インデクスID「3」に紐付ける仮想インデクスIDを「3−0」、「3−1」とする。 Next, the system management module 405 generates an arbitrary virtual index ID for one index ID (S903). For example, the virtual index IDs associated with the index ID “0” are “0-0” and “0-1”, and the virtual index IDs associated with the index ID “1” are “1-0”, “1-1”, and the index. The virtual index IDs associated with the ID “2” are “2-0” and “2-1”, and the virtual index IDs associated with the index ID “3” are “3-0” and “3-1”.
続いて、システム管理モジュール405は、仮想インデクスIDの文字列からハッシュ値を取得する(S904)。この後、システム管理モジュール405は、取得されたハッシュ値をインデクスIDテーブル406の仮想インデクスID501のカラムに格納し、そのエントリのインデクスID502のカラムにこの仮想インデクスIDが紐付けられるインデクスIDを格納する(S905)。
Subsequently, the system management module 405 acquires a hash value from the character string of the virtual index ID (S904). Thereafter, the system management module 405 stores the acquired hash value in the column of the
図10に、初期化が終了したインデクスIDテーブル406の例を示す。このテーブルを利用することにより、ファイルパスが与えられたとき、そのファイルパスがどのインデクスIDに紐付けるかを知ることが可能となる。例えばファイルパス「/FileServer1/test.txt」のハッシュ値を求めたところ「29999999999」であった場合、このハッシュ値は、項番3と項番4の点の間に配置され、項番3のエントリの点にヒットする(コンシステントハッシュの円周上で左に回る場合)。項番3のインデクスIDは「3」であるので、ファイルパス「/FileServer1/test.tx」”のインデクスIDは「3」となることが分かる。
FIG. 10 shows an example of the index ID table 406 that has been initialized. By using this table, when a file path is given, it is possible to know which index ID the file path is associated with. For example, when the hash value of the file path “/FileServer1/test.txt” is obtained and found to be “29999999999”, this hash value is arranged between the points of
このテーブルはコンシステントハッシュ法の実現方式であり、このテーブルを元にしてファイルパスからインデクスIDを取得し、インデクスID毎に分割インデクスを生成すると、各々の分割インデクスのサイズ又は紐付けられるファイル数の平準化が実現される。 This table is an implementation method of the consistent hash method. When an index ID is obtained from a file path based on this table and a split index is generated for each index ID, the size of each split index or the number of files to be linked Leveling is realized.
[インデクスリストの生成フロー]
図11に、スキャナモジュール402によるインデクスリストの生成フローを示す。まず、パイプライン制御モジュール404は、スキャナモジュール402に対し、フォルダツリーの1階層目のインデクスリストの生成開始を指示する(S1101)。前述したように、インデクスリストの生成は、1階層ずつに限らず、任意の階層数毎に実行してもよい。
[Index list generation flow]
FIG. 11 shows an index list generation flow by the scanner module 402. First, the pipeline control module 404 instructs the scanner module 402 to start generating an index list in the first layer of the folder tree (S1101). As described above, the generation of the index list is not limited to one layer, but may be executed for any number of layers.
次に、スキャナモジュール402は、ファイル管理テーブル408にアクセスし、指定された階層のファイル群が存在するか否かをチェックする(S1102)。指定された階層のファイルパスにエントリが存在する場合、スキャナモジュール402は、処理ステータスのカラムに削除を示す「−1」を設定する(S1103)。なお、指定された階層のファイルパスにエントリが存在しない場合、スキャナモジュール402は、S1103をスキップする。 Next, the scanner module 402 accesses the file management table 408 and checks whether a file group of the designated hierarchy exists (S1102). If there is an entry in the file path of the designated hierarchy, the scanner module 402 sets “−1” indicating deletion in the processing status column (S1103). If there is no entry in the file path of the specified hierarchy, the scanner module 402 skips S1103.
その後、スキャナモジュール402は、ファイル検索の階層指定オプションを付与してFindコマンドを実行する(S1104)。これは、実際のLinuxOS上では、Findコマンドに、maxdepth=1(階層深度が1の場合)を設定することで実施できる。 After that, the scanner module 402 executes a Find command with a file search hierarchy designation option (S1104). This can be implemented by setting maxdepth = 1 (when the hierarchical depth is 1) in the Find command on an actual Linux OS.
指定した階層のファイル・フォルダパスとその属性情報を取得すると、スキャナモジュール402は、各々の属性情報に基づいてハッシュ値を取得する(S1105)。 When the file / folder path of the designated hierarchy and its attribute information are acquired, the scanner module 402 acquires a hash value based on each attribute information (S1105).
続いて、スキャナモジュール402は、Findにより取得したファイルパスをキーに使用し、ファイルパスの有無をファイル管理テーブル408に問い合わせる(S1106)。 Subsequently, the scanner module 402 uses the file path acquired by Find as a key, and inquires of the file management table 408 whether the file path exists (S1106).
ファイルパスがファイル管理テーブル408に存在しない場合(S1106で否定結果)、当該ファイルは新規作成であることを意味する。従って、この場合、スキャナモジュール402は、ファイル管理テーブル408に新たにそのファイルパス701をキーとするエントリを生成し、ファイルハッシュ702と処理ステータス703に新規生成を示す「1」を追加する(S1107)。
If the file path does not exist in the file management table 408 (No in S1106), it means that the file is newly created. Therefore, in this case, the scanner module 402 newly creates an entry with the
一方、ファイルパス701がファイル管理テーブル408に存在する場合(S1106で肯定結果)、当該ファイルは既にファイル管理テーブル408に登録されているファイルであることを意味する。この場合、スキャナモジュール402は、ハッシュ値のチェックを実行する(S1108)。具体的には、スキャナモジュール402は、ファイル管理テーブル408からファイルパス701が一致するエントリのファイルハッシュ702を取得し、Findコマンドにより取得したハッシュ値と比較する。
On the other hand, if the
ハッシュ値が一致した場合(S1108で肯定結果)、ファイル更新がなかったことを意味する。従って、この場合、スキャナモジュール402は、ファイルパスが一致するエントリの処理ステータスに「0」を設定する(S1109)。 If the hash values match (Yes in S1108), it means that there was no file update. Accordingly, in this case, the scanner module 402 sets “0” to the processing status of the entry with the matching file path (S1109).
ハッシュ値が一致しなかった場合(S1108で否定結果)、ファイル更新があったことを意味する。従って、この場合、スキャナモジュール402は、ファイルハッシュ702を新たなハッシュ値で上書きし、処理ステータス703にファイル更新があったことを示す「2」を上書きする(S1110)。
If the hash values do not match (No in S1108), it means that the file has been updated. Therefore, in this case, the scanner module 402 overwrites the
以上の処理により、指定された階層のファイル処理(「0」=処理なし、「1」=インデクス新規生成、「2」=インデクス更新、「−1」=インデクスから削除)が確定する。 With the above processing, the file processing of the designated hierarchy (“0” = no processing, “1” = new index generation, “2” = index update, “−1” = deletion from the index) is confirmed.
次に、スキャナモジュール402は、ファイル管理テーブル408にアクセスし、指定されたフォルダ階層のエントリ内で処理ステータス703が、「1」、「2」、「−1」であるエントリを取得してインデクスリストに書き出し、分散ファイルシステム302上に保存する(S1111)。すなわち、何らかの変化があったファイルだけを抽出する。なお、インデクスリストは、インデクス処理対象のファイルパス、処理ステータスが記述されたテキストファイルである。
Next, the scanner module 402 accesses the file management table 408, acquires an entry whose
その後、スキャナモジュール402は、パイプライン制御モジュール404にインデクスリストの保存先パスと生成終了を通知する(S1112)。 Thereafter, the scanner module 402 notifies the pipeline control module 404 of the storage destination path of the index list and the end of generation (S1112).
以後、スキャナモジュール402は、パイプライン制御モジュール404に指示されたディレクトリのエントリをファイル管理テーブル408から取得し、フォルダ深度を2、3…と深めながらインデクスリストを生成する。 Thereafter, the scanner module 402 acquires the directory entry designated by the pipeline control module 404 from the file management table 408, and generates an index list while increasing the folder depth to 2, 3,.
[分割インデクス生成のフロー]
図12に、インデクス生成モジュール403による分割インデクス202の生成フローを示す。インデクス生成モジュール403は、スキャナモジュール402から与えられるインデクスリストに基づいて分割インデクス202を生成する。インデクス生成モジュール403の処理は、1つのインデクスリストに対して、タスクと呼ばれる複数の処理単位に分割され、複数の分散処理サーバ103上で分散的に処理される。以下、タスク生成及び分散処理サーバ上での処理を示す。
[Flow of split index generation]
FIG. 12 shows a generation flow of the
まず、スキャナモジュール402がインデクスリストの生成終了をパイプライン制御モジュール404に通知する(S1201)。このとき、パイプライン制御モジュール404は、分散処理サーバ103上でインデクスの生成を開始可能か否かをチェックする(S1202)。 First, the scanner module 402 notifies the pipeline control module 404 of the end of index list generation (S1201). At this time, the pipeline control module 404 checks whether or not index generation can be started on the distributed processing server 103 (S1202).
分散処理サーバ103上でインデクスの生成が開始可能な場合(S1202で肯定結果)、パイプライン制御モジュール404は、インデクス生成モジュール403に対し、分割インデクスの生成開始とインデクスリストの保存先パスを通知する(S1203)。なお、インデクスの生成が開始可能でない場合(S1202で否定結果)の場合、パイプライン制御モジュール404は、一定時間の待機時間の後(S12021)、再び、S1202の判定処理に戻る。 If index generation can be started on the distributed processing server 103 (Yes in S1202), the pipeline control module 404 notifies the index generation module 403 of the generation start of the split index and the storage path of the index list. (S1203). If index generation cannot be started (No in S1202), the pipeline control module 404 returns to the determination process in S1202 again after a predetermined waiting time (S12021).
先の通知を受けたインデクス生成モジュール403は、分散ファイルシステム302上からインデクスリストを取得する(S1204)。インデクス生成モジュール403は、第一の分散処理として、以下に示すS1205〜S1207までの処理を行う。 Receiving the previous notification, the index generation module 403 acquires an index list from the distributed file system 302 (S1204). The index generation module 403 performs the following processing from S1205 to S1207 as the first distributed processing.
まず、インデクス生成モジュール403は、インデクスリストを任意の数に分割する(S1205)。ここでの数は、分散処理サーバ103の台数及び処理性能から決定される数である。インデクスリストは、インデクス処理対象のファイルパス、処理ステータスが記述されたテキストファイルであり、このファイルを分割する際には、分割数に応じて単純に任意の行で区切って複数のインデクスリストが生成されることとなる。
First, the index generation module 403 divides the index list into an arbitrary number (S1205). The number here is a number determined from the number of distributed
分割された各々のインデクスリストは、それぞれが、分散処理サーバ103上で複数のタスクとして処理される。第一の分散処理における各々のタスク処理は、分割されたインデクスリストに記述されているファイルパスを取得し(S1206)、インデクスIDテーブルに問い合わせ、インデクスIDを取得する(S1207)。
Each of the divided index lists is processed as a plurality of tasks on the distributed
第一のタスク処理が全て完了すると、インデクス生成モジュール403は、分散処理サーバ103上でインデクスIDによるグルーピングを行い、インデクスIDをキーとするインデクスリストを生成する(S1208)。
When all of the first task processing is completed, the index generation module 403 performs grouping based on the index ID on the distributed
次に、第二の分散処理として、インデクス生成モジュール403は、以下に示すS1209〜S1212までの処理を行う。 Next, as a second distributed process, the index generation module 403 performs the following processes from S1209 to S1212.
まず、インデクス生成モジュール403は、インデクスIDをキーとするインデクスリスト(インデクスID分だけリストが存在する)に対し、分散処理サーバ103上で複数のタスクとして処理を開始する。
First, the index generation module 403 starts processing as a plurality of tasks on the distributed
第二の分散処理におけるタスク処理は、インデクスIDをキーとするインデクスリストからファイルパスと処理ステータスを取得する(S1209)。 In the task processing in the second distributed processing, the file path and the processing status are acquired from the index list using the index ID as a key (S1209).
次に、タスク処理は、処理ステータスをチェックする(S1210)。ここで、処理ステータスが、「1」(=ファイル新規生成)又は「2」(=ファイル更新)の場合、各タスクは、ファイルサーバ102からファイルをダウンロードした後、分割インデクスを生成する(S1211)。なお、このとき生成される分割インデクスは、分散処理サーバ103のローカルストレージ301上に一時的に生成される。
Next, the task processing checks the processing status (S1210). If the processing status is “1” (= new file creation) or “2” (= file update), each task creates a split index after downloading the file from the file server 102 (S1211). . Note that the split index generated at this time is temporarily generated on the local storage 301 of the distributed
これに対し、処理ステータスが「−1」(=インデクスから削除)の場合、各タスクは、削除インデクスリストとしてファイルパスを削除インデクスリストとして出力する(S1212)。なお、削除インデクスリストは、検索サーバ101上に既に配置されている分割インデクスから削除すべきファイルパスが1行毎に書かれたテキストファイルである。
On the other hand, when the processing status is “−1” (= deleted from the index), each task outputs the file path as a deletion index list as a deletion index list (S1212). The deletion index list is a text file in which a file path to be deleted from a split index already arranged on the
この後、インデクス生成モジュール403は、第二のタスク処理により生成された分割インデクスと削除インデクスリストをセットとして、分散ファイルサーバ103上にアップロードする(S1213)。 Thereafter, the index generation module 403 uploads the divided index and the deletion index list generated by the second task processing as a set to the distributed file server 103 (S1213).
その後、インデクス生成モジュール403は、アップロードした保存先を分割インデクス保存先パス603と削除インデクスリスト保存先パス604に格納し(S1214)、パイプライン制御モジュール404に対し、分割インデクスの生成完了を通知する(S1215)。
After that, the index generation module 403 stores the uploaded storage destination in the split index
以上のように、分散処理サーバ103上では、第一の分散処理と第二の分散処理が実行され、タスク処理が同時並列的に実行される。これにより、分割インデクスの生成速度が向上する。なお、コンシステントハッシュ法における仮想インデクスIDを利用して第二のタスク処理を実行することにより、分散処理数をさらに調整することもできる。
As described above, on the distributed
さらに、スキャナモジュール402とインデクス生成モジュール403は非同期に動作する。このため、スキャナモジュール402によるインデクスリストの生成が複数完了した場合には、S1201〜S1213の処理は多重化することが可能となり、分割インデクスの生成速度が向上する。 Further, the scanner module 402 and the index generation module 403 operate asynchronously. For this reason, when a plurality of index list generations by the scanner module 402 are completed, the processing of S1201 to S1213 can be multiplexed, and the generation speed of the split index is improved.
[検索サーバへの分割インデクスの配置フロー]
図13に、インデクス生成モジュール403により生成された分割インデクス(この時点では、分割インデクスは、検索サーバ101ではなく、分散ファイルシステム302上に保存されている)を、インデクス管理モジュール203が、検索サーバ101に配置するフローである。
[Flow of split index allocation to search servers]
FIG. 13 shows the split index generated by the index generation module 403 (at this time, the split index is stored on the distributed file system 302 instead of the search server 101), and the index management module 203 stores the search server. 101 is a flow to be arranged in 101.
図13に示すフローは、パイプライン制御モジュール404が、インデクス生成モジュール403から分割インデクス202の生成終了通知を受けることで開始する(S1301)。この通知の受けたパイプライン制御モジュール404は、検索サーバ管理テーブル407に問い合わせを行い、インデクスIDをキーとして、配置先検索サーバ名602を取得する(S1302)。
The flow shown in FIG. 13 starts when the pipeline control module 404 receives a generation end notification of the
次に、パイプライン制御モジュール404は、特定された検索サーバ101上のインデクス管理モジュール203に対し、インデクス処理が可能か否かの問い合わせを行う(S1303)。インデクス処理が可能な場合(S1303で肯定結果)、パイプライン制御モジュール404は、インデクス管理モジュール203に対し、インデクス処理の開始を命令する(S1304)。なお、インデクス管理モジュール203が他の処理を実行中の場合、パイプライン制御モジュール404は、一定の時間待機する(S1305)。
Next, the pipeline control module 404 makes an inquiry to the index management module 203 on the specified
次に、インデクス管理モジュール203は、既に分割インデクスが存在するか否かをチェックする(S1306)。既に分割インデクス202が同じ検索サーバ101上に存在する場合(S1306で肯定結果)、インデクス管理モジュール203は、分散ファイルシステム302上からインデクスIDに対応する分割インデクス202と削除インデクスリストをダウンロードする(S1307)。
Next, the index management module 203 checks whether or not a split index already exists (S1306). If the
インデクス管理モジュール203は、検索サーバ101上に存在する既存の分割インデクス202に対して、削除インデクスリストに基づいてインデクスを削除する(S1308)。次に、インデクス管理モジュール203は、ダウンロードした分割インデクス202を既存の分割インデクス202にマージし、最新の分割インデクス202を生成する(S1309)。
The index management module 203 deletes the index from the existing
一方、分割インデクス202が同じ検索サーバ101上に存在しなかった場合(S1306で否定結果)、インデクス管理モジュール203は、分散ファイルシステム302上からインデクスIDに対応する分割インデクス202をダウンロードする(S1310)。
On the other hand, if the
続いて、インデクス管理モジュール203は、検索モジュール204に分割インデクス202のマウントを要求する(S1311)。これにより、検索モジュール204に分割インデクスがマウントされ、検索の実行が可能となる。 Subsequently, the index management module 203 requests the search module 204 to mount the split index 202 (S1311). As a result, the split index is mounted on the search module 204, and the search can be executed.
最後に、インデクス管理モジュール203は、パイプライン制御モジュール404に対し、分割インデクスの配置終了を通知し、処理を完了する(S1312)。 Finally, the index management module 203 notifies the pipeline control module 404 of the end of the allocation of the split index and completes the processing (S1312).
[検索サーバの追加フロー]
図14に、検索システムに検索サーバ101が追加された場合に実行される処理フローを示す。
[Search server addition flow]
FIG. 14 shows a processing flow executed when the
この処理フローは、システム管理モジュール405に対し、管理者が、検索サーバ101の追加を入力することで開始される(S1401)。
This processing flow starts when the administrator inputs addition of the
検索サーバ101が追加されたことを受け付けると、システム管理モジュール405は、新規に追加された検索サーバ101に対し、新規にインデクスIDを割り当てる(S1402)。例えば2台の検索サーバ101が配置された検索システムに、1台の検索サーバ101が新たに追加される場合にあって、1台の検索サーバ101に2つの分割インデクス202が配置されるとき、新たに追加される検索サーバ101にはインデクスID4,5が割り当てられる。
Upon accepting that the
次に、システム管理モジュール405は、検索サーバ管理テーブル407に、新規に生成されたインデクスID601のエントリを作成し、そのエントリに配置先検索サーバ名602を設定する(S1403)。すなわち、検索サーバ管理テーブル407の初期化を実行する。
Next, the system management module 405 creates an entry for the newly generated
その後、システム管理モジュール405は、新規に生成されたインデクスID502に対応付ける仮想インデクスID501のハッシュ値をインデクスIDテーブル406に格納する(S1404)。すなわち、インデクスIDテーブルを初期化する。
Thereafter, the system management module 405 stores the hash value of the
新規の仮想インデクスIDがインデクスIDテーブル406に追加されると、パイプライン制御モジュール404は、再配置のターゲットとなる全ての検索サーバ101上のインデクス管理モジュール203に対し、分割インデクスの再配置開始を命令する(S1405)。すなわち、再配置に関係する既存の検索サーバ101に対し、分割インデクスの再配置を命じる。
When a new virtual index ID is added to the index ID table 406, the pipeline control module 404 starts to relocate the divided indexes to the index management modules 203 on all the
再配置命令を受けた検索サーバ101のインデクス管理モジュール203は、既存の分割インデクス202の先頭からファイルパスを順々に取得する(S1406)。
The index management module 203 of the
次に、インデクス管理モジュール203は、ファイルパスからハッシュ値を計算してインデクスIDテーブル406に問い合わせ、インデクスIDを取得する(S1407)。 Next, the index management module 203 calculates a hash value from the file path, queries the index ID table 406, and acquires the index ID (S1407).
次に、インデクス管理モジュール203は、取得したインデクスIDが新規に追加されたインデクスIDか否か判定する(S1408)。インデクスIDが新規でなかった場合(S1408で否定結果)、インデクス管理モジュール203は、そのファイルパスについて何も処理を行わない。インデクスIDが新規であった場合(S1408で肯定結果)、インデクス管理モジュール203は、分割インデクスからそのエントリを抜き出し、新規インデクスIDに紐付けられている分割インデクスを生成・追加する(S1409)。 Next, the index management module 203 determines whether or not the acquired index ID is a newly added index ID (S1408). If the index ID is not new (No in S1408), the index management module 203 performs no processing for the file path. If the index ID is new (Yes in S1408), the index management module 203 extracts the entry from the split index, and generates and adds a split index associated with the new index ID (S1409).
なお、S1406〜S1409の操作は分割インデクス202に登録されている全てのファイルパスに対して処理される。また、分割インデクスは、一時的に検索サーバ101のローカルストレージ201上に生成されるものとする。
Note that the operations of S1406 to S1409 are processed for all the file paths registered in the
その後、新規に生成された分割インデクスを分散ファイルシステム302にアップロードし(S1410)、パイプライン制御モジュール404に分割終了を通知する(S1411)。 Thereafter, the newly created split index is uploaded to the distributed file system 302 (S1410), and the pipeline control module 404 is notified of the end of splitting (S1411).
パイプライン制御モジュール404は、各々の検索サーバ101上のインデクス管理モジュール203から終了通知を受けた順番に、新規に追加された検索サーバ101のインデクス管理モジュール203に対し、インデクス配置処理の開始を指示する(S1412)。
The pipeline control module 404 instructs the index management module 203 of the newly added
新規に追加された検索サーバ101のインデクス管理モジュール203は、分散ファイルシステム302から分割インデクスをダウンロードし、分割インデクスのマージ処理を繰り返す(S1413)。以上により、新規追加された検索サーバ101上に分散インデクス202を生成することが可能となる。
The newly added index management module 203 of the
[検索サーバ削除フロー]
図15に、検索システムから検索サーバ101が削減された場合の処理フローを示す。この処理フローは、管理者が、検索サーバ101の削減をシステム管理モジュール405に入力することで開始される(S1501)。
[Search server deletion flow]
FIG. 15 shows a processing flow when the
検索サーバ101が削除されたことを受け付けると、システム管理モジュール405は、削減対象である検索サーバ101が配置先ファイルサーバ名になっているエントリのインデクスID601を検索サーバ管理テーブル407から取得し、そのインデクスIDに紐付けられている仮想インデクスIDを計算して取得する(S1502)。
Upon accepting that the
その後、システム管理モジュール405は、S1502で取得した仮想インデクスIDを、インデクスIDテーブル406から削除する(S1503)。 Thereafter, the system management module 405 deletes the virtual index ID acquired in S1502 from the index ID table 406 (S1503).
次に、システム管理モジュール405は、パイプライン制御モジュール404に対し、削減される検索サーバ101のインデクス管理モジュール203にインデクス削除の指示を出す(S1504)。
Next, the system management module 405 instructs the pipeline control module 404 to delete the index to the index management module 203 of the
指示を受けたインデクス管理モジュール203は、分割インデクス202に登録されているファイルパスを先頭から終端まで順に取得する(S1505)。
Upon receiving the instruction, the index management module 203 obtains the file paths registered in the
次に、インデクス管理モジュール203は、取得したファイルパスからハッシュ値を計算し、計算されたハッシュ値に対応するインデクスIDをインデクスIDテーブルに問い合わせる(S1506)。 Next, the index management module 203 calculates a hash value from the acquired file path, and inquires the index ID table for the index ID corresponding to the calculated hash value (S1506).
その後、インデクス管理モジュール203は、分割インデクス202からファイルパスのエントリのインデクスIDを抜き出し、取得したインデクスIDに紐付けられた新規の分割インデクスを生成し、又は、その分割インデクスにインデクスデータを追加する。その後、インデクス管理モジュール203は、再配置先にマージするための分割インデクスを生成する(S1507)。この分割処理が終わった時、削除ターゲットである検索サーバ101のローカルストレージ201に、インデクスID毎の分割インデクスが複数存在する。
After that, the index management module 203 extracts the index ID of the file path entry from the
次に、インデクス管理モジュール203は、S1507で生成したインデクスID毎の分割インデクスを分散ファイルシステム302上にアップロードする(S1508)。 Next, the index management module 203 uploads the split index for each index ID generated in S1507 onto the distributed file system 302 (S1508).
続いて、インデクス管理モジュール203は、システム管理モジュール405に対し、(1) インデクスID毎の分割インデクス生成が完了したこと、(2) 分散ファイルシステム302上の保存先情報を通知する(S1509)。 Subsequently, the index management module 203 notifies the system management module 405 of (1) completion of generation of the split index for each index ID and (2) storage destination information on the distributed file system 302 (S1509).
この通知を受けて、システム管理モジュール405は、パイプライン制御モジュール404に指示を出し、再配置のターゲットとなる全ての検索サーバ101上のインデクス管理モジュール203に対してインデクスのマージを命じる指示を出す(S1510)。
Upon receiving this notification, the system management module 405 issues an instruction to the pipeline control module 404, and issues an instruction for merging indexes to the index management modules 203 on all the
指示を受けた各々のインデクス管理モジュール203は、分割インデクスのダウンロードとマージ処理を行い、最新の分割インデクス202を生成する(S1511)。 Receiving the instruction, each index management module 203 performs download and merge processing of the split index, and generates the latest split index 202 (S1511).
以上の完了後、インデクス管理モジュール203は、削除ターゲットの検索サーバ101をシステム上から削除する(S1512)。
After completion of the above, the index management module 203 deletes the deletion
[まとめ]
本実施の形態によれば、検索インデクスに対応するハッシュ値をマッピングするコンシステントハッシュ空間に仮想ノード(仮想インデクスID)を設定することにより、分割インデクスのサイズの平準化と偏りの抑制とを同時に実現することができる。これにより、検索パフォーマンスの向上を実現することができる。
[Summary]
According to the present embodiment, by setting a virtual node (virtual index ID) in a consistent hash space that maps a hash value corresponding to a search index, leveling of the size of the split index and suppression of bias are simultaneously performed. Can be realized. Thereby, the improvement of search performance is realizable.
また、本実施の形態によれば、検索サーバ101の物理的な追加又は削除に伴う分割インデクスの追加又は削除に関しても、仮想ノード(仮想インデクスID)の再配置により柔軟に対応することができる。結果的に、各検索サーバ101に対応付けられる複数の分割インデクス202の管理を簡素化することができる。
Further, according to the present embodiment, addition or deletion of a divided index accompanying physical addition or deletion of the
また、本実施の形態によれば、パイプライン処理による分割インデクスの生成を、複数台の分散処理サーバ103に分散して実行することができる。これにより、分割インデクスの生成速度を向上させることができる。さらに、分散処理サーバ103上における分割インデクスの生成をインデクスID毎に実行することにより、分割インデクスの生成時における分散処理サーバ間の無駄なネットワークトラフィック及びディスクI/Oを軽減することができる。これにより、分割インデクスの生成をより効率的にかつ高速化することができる。
Further, according to the present embodiment, the generation of the split index by the pipeline processing can be distributed to the plurality of distributed
また、本実施の形態によれば、分割リストの生成対象とするファイルパスを与えるインデクスリストの生成処理を、ファイルサーバ内のフォルダツリーの任意の階層数毎に実行することにより、分割インデクスの生成をより効率的にかつ高速化することができる。 Further, according to the present embodiment, by generating an index list generation process for giving a file path to be generated as a split list for each arbitrary number of hierarchies in the folder tree in the file server, split index generation is performed. Can be made more efficient and faster.
100…検索クライアント
101…検索サーバ
102…ファイルサーバ
103…分散処理サーバ
104…管理サーバ
105…ネットワーク
201…ローカルストレージ
202…分割インデクス
203…インデクス管理モジュール
204…検索モジュール
301…ローカルストレージ
302…分散ファイルシステム
303…分散処理モジュール
401…ローカルストレージ
402…スキャナモジュール
403…インデクス生成モジュール
404…パイプライン制御モジュール
405…システム管理モジュール
406…インデクスIDテーブル
407…検索サーバ管理テーブル
408…ファイル管理テーブル
DESCRIPTION OF SYMBOLS 100 ...
Claims (6)
前記ファイルシステムのファイル・ディレクトリをスキャンして、ファイルパスのリストを生成する第1の処理機能部と、
各検索サーバに割り当てられる分割インデクスのそれぞれに対し、インデクスIDを割り当てる処理と、各インデクスIDを配置先となる検索サーバに紐付ける処理と、検索サーバの台数と各検索サーバに配置する分割インデクスの数とに基づいて、各インデクスIDに対してn個の仮想インデクスIDを紐付ける処理と、前記仮想インデクスIDの文字列からコンシステントハッシュ空間上のハッシュ値(第1のハッシュ値)を取得する処理と、前記ハッシュ値(第1のハッシュ値)と前記インデクスIDとの対応関係を示すテーブルを生成する処理と、前記リストから読み出されるファイルパスからコンシステントハッシュ空間上のハッシュ値(第2のハッシュ値)を取得する処理と、前記ハッシュ値(第2のハッシュ値)を用いて前記テーブルを参照し、各ファイルパスに対応付けるインデクスIDを決定する処理と、前記インデクスID毎に分割インデクスを生成する処理とを実行する第2の処理機能部と、
生成された分割インデクスを検索サーバに配置する第3の処理機能部と、
を有することを特徴とするファイル検索システム。 In a file search system that searches large file systems,
A first processing function unit for scanning a file / directory of the file system to generate a list of file paths;
A process of assigning an index ID to each of the divided indexes assigned to each search server, a process of associating each index ID with the search server that is the placement destination, the number of search servers, and the number of divided indexes to be placed on each search server Based on the number, a process of associating n virtual index IDs with each index ID, and a hash value (first hash value) in the consistent hash space is obtained from the character string of the virtual index ID. Processing, processing for generating a table indicating a correspondence relationship between the hash value (first hash value) and the index ID, and a hash value (second second) in the consistent hash space from the file path read from the list (Hash value) and the hash value (second hash value) Referring to Buru, a second processing function unit that executes a process of determining the index ID to be associated with each file path, and a process of generating a split index for each of the index ID,
A third processing function unit for placing the generated split index in the search server ;
A file search system comprising:
前記第2の処理機能部は、前記リストを任意の数に分割し、分割後の各リストに対する分割インデクスの生成処理を複数の分散処理システムに分散させる
ことを特徴とするファイル検索システム。 The file search system according to claim 1 ,
The file processing system, wherein the second processing function unit divides the list into an arbitrary number, and distributes the generation processing of the divided index for each divided list to a plurality of distributed processing systems.
前記第2の処理機能部は、前記リストをインデクスID毎に分割する
ことを特徴とするファイル検索システム。 The file search system according to claim 2 ,
The file processing system, wherein the second processing function unit divides the list for each index ID.
前記第1の処理機能部は、前記ファイルシステム上の任意のフォルダ階層毎に前記ファイルパスのリストを生成し、その生成のたび、生成されたリストを前記第2の処理機能部に与える
ことを特徴とするファイル検索システム。 The file search system according to claim 1,
The first processing function unit generates a list of the file paths for each arbitrary folder hierarchy in the file system, each of the product, to give the generated list to the second processing function unit Feature file search system.
検索サーバの追加時、ファイルパスから一意に算出されるハッシュ値をマッピングするコンシステントハッシュ空間上に設定された仮想インデクスIDのハッシュ値(第1のハッシュ値)とインデクスIDとの対応関係を更新する第4の処理機能部と、
更新後の前記対応関係を用い、分割インデクスの再配置を実行する第5の処理機能部と
を有することを特徴とするファイル検索システム。 The file search system according to claim 1,
When adding a search server, the correspondence between the hash value (first hash value) of the virtual index ID set in the consistent hash space that maps the hash value uniquely calculated from the file path and the index ID is updated. A fourth processing function unit,
A file processing system comprising: a fifth processing function unit that executes rearrangement of divided indexes using the correspondence relationship after update.
検索サーバの削除時、削除対象とする検索サーバに割り当てられている分割インデクスに登録されているファイルパスから対応するインデクスIDを算出し、各インデクスIDに対応する再配置先の検索サーバ別のマージ用分割インデクスを生成する第6の処理機能部と
を有することを特徴とするファイル検索システム。 The file search system according to claim 1,
When deleting a search server, the corresponding index ID is calculated from the file path registered in the split index assigned to the search server to be deleted, and merged for each relocation destination search server corresponding to each index ID And a sixth processing function unit for generating a divided index for use.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2011217881A JP5657498B2 (en) | 2011-09-30 | 2011-09-30 | File search system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2011217881A JP5657498B2 (en) | 2011-09-30 | 2011-09-30 | File search system |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2013077233A JP2013077233A (en) | 2013-04-25 |
JP5657498B2 true JP5657498B2 (en) | 2015-01-21 |
Family
ID=48480631
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2011217881A Expired - Fee Related JP5657498B2 (en) | 2011-09-30 | 2011-09-30 | File search system |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP5657498B2 (en) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP5798503B2 (en) * | 2012-01-31 | 2015-10-21 | 株式会社日立ソリューションズ | File list generation method and system, file list generation device, and program |
JP5759915B2 (en) * | 2012-02-15 | 2015-08-05 | 株式会社日立ソリューションズ | File list generation method and system, program, and file list generation device |
KR101482868B1 (en) | 2013-07-24 | 2015-01-15 | 닉스테크 주식회사 | Distributed indexing system for performance improvement of data loss prevention |
JP6329778B2 (en) * | 2014-02-12 | 2018-05-23 | 株式会社エヌ・ティ・ティ・データ | Storage system, indexing method, indexing program |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP4977502B2 (en) * | 2007-03-16 | 2012-07-18 | 日本電気株式会社 | Distributed database system, search server, search method, and program |
JP2009211403A (en) * | 2008-03-04 | 2009-09-17 | Hitachi Software Eng Co Ltd | File search program |
JP5310399B2 (en) * | 2009-09-01 | 2013-10-09 | 富士通株式会社 | Index management apparatus processing method and index management apparatus |
-
2011
- 2011-09-30 JP JP2011217881A patent/JP5657498B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JP2013077233A (en) | 2013-04-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP5759881B2 (en) | Information processing system | |
CN109739815B (en) | File processing method, system, device, equipment and storage medium | |
CN103002027B (en) | Data-storage system and the method for tree directory structure is realized based on key-value pair system | |
JP4547264B2 (en) | Apparatus and method for proxy cache | |
CN108513657B (en) | Data conversion method and backup server | |
JP5589205B2 (en) | Computer system and data management method | |
WO2012056731A1 (en) | Resource management server, resource management method and storage medium in which resource management program is stored | |
CN104881466B (en) | The processing of data fragmentation and the delet method of garbage files and device | |
CN101692239A (en) | Method for distributing metadata of distributed type file system | |
CN104754001A (en) | Cloud storage system and data storage method | |
JP5375972B2 (en) | Distributed file system, data selection method thereof, and program | |
JP2012523023A (en) | Storage system that eliminates duplicate data | |
WO2011018852A1 (en) | Data storage device with duplicate elimination function and control device for creating search index for the data storage device | |
US11907294B2 (en) | Efficient and scalable time-series data storage and retrieval over a network | |
JP5657498B2 (en) | File search system | |
US10241963B2 (en) | Hash-based synchronization of geospatial vector features | |
US11151081B1 (en) | Data tiering service with cold tier indexing | |
JP2015510174A (en) | Location independent files | |
CN102520995B (en) | Software remote stream type loading method and system | |
JP2013210698A (en) | File retrieval system and program | |
de la Prieta et al. | Multi-agent system for controlling a cloud computing environment | |
CN116848517A (en) | Cache indexing using data addresses based on data fingerprints | |
US11016946B1 (en) | Method and apparatus for processing object metadata | |
US20140114918A1 (en) | Use of proxy objects for integration between a content management system and a case management system | |
JP5898026B2 (en) | Storage capacity leveling method in distributed search system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20140109 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20140530 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20140715 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20140910 |
|
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: 20141111 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20141126 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 5657498 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
LAPS | Cancellation because of no payment of annual fees |