8/9/2015 distributed indexing of web scale datasets for the cloud email:{ikons, eangelou, dtsouma,...

36
04/07/22 Distributed Indexing of Web Scale Datasets for the Cloud Email:{ikons, eangelou, dtsouma, nkoziris}@cslab.ece.ntua.gr Computing Systems Laboratory School of Electrical and Computer Engineering National Technical University of Athens Greece Ioannis Konstantinou Evangelos Angelou Dimitrios Tsoumakos Nectarios Koziris

Upload: peregrine-grant-byrd

Post on 11-Jan-2016

217 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: 8/9/2015 Distributed Indexing of Web Scale Datasets for the Cloud Email:{ikons, eangelou, dtsouma, nkoziris}@cslab.ece.ntua.gr Computing Systems Laboratory

21/04/23

Distributed Indexing of Web Scale Datasets for the Cloud

Email:{ikons, eangelou, dtsouma, nkoziris}@cslab.ece.ntua.gr

Computing Systems Laboratory School of Electrical and Computer Engineering

National Technical University of AthensGreece

Ioannis Konstantinou Evangelos Angelou

Dimitrios TsoumakosNectarios Koziris

Page 2: 8/9/2015 Distributed Indexing of Web Scale Datasets for the Cloud Email:{ikons, eangelou, dtsouma, nkoziris}@cslab.ece.ntua.gr Computing Systems Laboratory

21/04/23

Problem• Data explosion era: Increasing data volume (e-

mail-web logs, historical data, click streams) pushes classic RDBMS to their limits

• Cheaper storage and bandwidth enables the growth of publicly available datasets.– Internet Archive’s WaybackMachine– Wikipedia– Amazon public datasets

• Centralized indices are slow to create and not scalable 2/36

Page 3: 8/9/2015 Distributed Indexing of Web Scale Datasets for the Cloud Email:{ikons, eangelou, dtsouma, nkoziris}@cslab.ece.ntua.gr Computing Systems Laboratory

21/04/23

Our contribution

• A Distributed processing framework to index, store and serve web-scale content under heavy request loads

• Simple indexing rules• NoSQL and MapReduce combination:

• MapReduce jobs process input to create index

• Index and content is served through a NoSQL system

3/36

Page 4: 8/9/2015 Distributed Indexing of Web Scale Datasets for the Cloud Email:{ikons, eangelou, dtsouma, nkoziris}@cslab.ece.ntua.gr Computing Systems Laboratory

21/04/23

Goals 1/2

• Support of almost any type of datasets– Unstructured: plain text files– Semi-structured: XML, HTML– Fully structured: SQL Databases

• Near real-time query response times– Query execution times should be in the order of

milliseconds

4/36

Page 5: 8/9/2015 Distributed Indexing of Web Scale Datasets for the Cloud Email:{ikons, eangelou, dtsouma, nkoziris}@cslab.ece.ntua.gr Computing Systems Laboratory

21/04/23

Goals 2/2

• Scalability (preferably elastic)– Storage space– Concurrent user requests

• Ease of use– Simple index rules– Meaningful searches– Find conferences whose title contains cloud and

were held in California

5/36

Page 6: 8/9/2015 Distributed Indexing of Web Scale Datasets for the Cloud Email:{ikons, eangelou, dtsouma, nkoziris}@cslab.ece.ntua.gr Computing Systems Laboratory

21/04/23

Architecture 1/2

Raw Content

Uploader

Index rulesContent

tableMapReduce

MapReduce

Indextable

Indexer

Searchobjects

Getobject

ClientAPI

• Raw dataset is uploaded to HDFS• Dataset with index rules is fed to the Uploader, to create

the Content table

6/36

Page 7: 8/9/2015 Distributed Indexing of Web Scale Datasets for the Cloud Email:{ikons, eangelou, dtsouma, nkoziris}@cslab.ece.ntua.gr Computing Systems Laboratory

21/04/23

Architecture 2/2

• The Content table is fed to the Indexer that extracts the Index table

• The client API contacts the index table to perform searches, and the content table to serve objects

Raw Content

Uploader

Index rulesContent

tableMapReduce

MapReduce

Indextable

Indexer

Searchobjects

Getobject

ClientAPI

7/36

Page 8: 8/9/2015 Distributed Indexing of Web Scale Datasets for the Cloud Email:{ikons, eangelou, dtsouma, nkoziris}@cslab.ece.ntua.gr Computing Systems Laboratory

21/04/23

Index rules<author>

<name>Ioannis</name><surname>Konstantinou</surname><date>26/04/2010</date>

</author>

Attribute types

Record boundaries

• Record boundaries split input into distinct entities used as processing units

• attribute types: record regions to index– A specific XML tag, HTML table , database column

8/36

Page 9: 8/9/2015 Distributed Indexing of Web Scale Datasets for the Cloud Email:{ikons, eangelou, dtsouma, nkoziris}@cslab.ece.ntua.gr Computing Systems Laboratory

21/04/23

Uploader 1/2

Raw Content

Uploader

Index rulesContent

tableMapReduce

MapReduce

Indextable

Indexer

Searchobjects

Getobject

ClientAPI

• MapReduce class that crunches data input from HDFS to create the Content table

• Mappers emit a <MD5Hash,Hbase cell> key-value pair for each encountered record

9/36

Page 10: 8/9/2015 Distributed Indexing of Web Scale Datasets for the Cloud Email:{ikons, eangelou, dtsouma, nkoziris}@cslab.ece.ntua.gr Computing Systems Laboratory

21/04/23

• Reducers lexicographically sort incoming key-values according to the MD5Hash

• Results are stored in HDFS in HFile format• Hbase is informed about the new Content table

Raw Content

Uploader

Index rulesContent

tableMapReduce

MapReduce

Indextable

Indexer

Searchobjects

Getobject

ClientAPI

Uploader 2/2

10/36

Page 11: 8/9/2015 Distributed Indexing of Web Scale Datasets for the Cloud Email:{ikons, eangelou, dtsouma, nkoziris}@cslab.ece.ntua.gr Computing Systems Laboratory

21/04/23

Content table

• Acts as a record hashmap• Each row contains a single record item• Row key is the MD5Hash of the record content• Allows fast random access reads during

successful index searches• Incremental content addition or removal

Row key: MD5Hash Row value: record content

2da0ae7cb598ac8e9455570a9c2f19fe

<author><name>Ioannis</name><surname>Konstantinou</surname><date>20100424</date></author>

223c14b2a8c7bbe24ba0d6854dd6f3cc

<author><name>Evangelos</name><surname>Konstantinou</surname><date>20100426</date></author>

11/36

Page 12: 8/9/2015 Distributed Indexing of Web Scale Datasets for the Cloud Email:{ikons, eangelou, dtsouma, nkoziris}@cslab.ece.ntua.gr Computing Systems Laboratory

21/04/23

Indexer 1/3

Raw Content

Uploader

Index rulesContent

tableMapReduce

MapReduce

Indextable

Indexer

Searchobjects

Getobject

ClientAPI

• Creates an inverted list of index terms and document locations (index table)

• MapReduce class that reads the Content table and creates the Index table

12/36

Page 13: 8/9/2015 Distributed Indexing of Web Scale Datasets for the Cloud Email:{ikons, eangelou, dtsouma, nkoziris}@cslab.ece.ntua.gr Computing Systems Laboratory

21/04/23

Indexer 2/3

• Mappers read the content table and emit <keyword,MD5Hash> key-value pairs

• Reducers lexicographically sort incoming key-values according to the keyword value

Raw Content

Uploader

Index rulesContent

tableMapReduce

MapReduce

Indextable

Indexer

Searchobjects

Getobject

ClientAPI

13/36

Page 14: 8/9/2015 Distributed Indexing of Web Scale Datasets for the Cloud Email:{ikons, eangelou, dtsouma, nkoziris}@cslab.ece.ntua.gr Computing Systems Laboratory

21/04/23

Indexer 3/3

• Reducers aggregate <keword,MD5Hash> key-values to <keyword,list(MD5Hash)> key-values

• Results are stored in HDFS in HFile format• Hbase is informed about the new Index table

Raw Content

Uploader

Index rulesContent

tableMapReduce

MapReduce

Indextable

Indexer

Searchobjects

Getobject

ClientAPI

14/36

Page 15: 8/9/2015 Distributed Indexing of Web Scale Datasets for the Cloud Email:{ikons, eangelou, dtsouma, nkoziris}@cslab.ece.ntua.gr Computing Systems Laboratory

21/04/23

Index tableRow key: “term”_”attribute type” Row value: list(MD5Hash)

20100424_date 2da0ae7cb598ac8e9455570a9c2f19fe

20100426_date 223c14b2a8c7bbe24ba0d6854dd6f3cc

Konstantinou_name 2da0ae7cb598ac8e9455570a9c2f19fe, 223c14b2a8c7bbe24ba0d6854dd6f3cc

• Row key: index term followed by the attribute type • Row content: list of MD5Hashes of the records that

contain this specific keyword in a specific attribute

15/36

Page 16: 8/9/2015 Distributed Indexing of Web Scale Datasets for the Cloud Email:{ikons, eangelou, dtsouma, nkoziris}@cslab.ece.ntua.gr Computing Systems Laboratory

21/04/23

Client API 1/3

Raw Content

Uploader

Index rulesContent

tableMapReduce

MapReduce

Indextable

Indexer

Searchobjects

Getobject

ClientAPI

• Built on top of HBase client API• Basic search and get operations• Google-style freetext queries over multiple

indexed attributes16/36

Page 17: 8/9/2015 Distributed Indexing of Web Scale Datasets for the Cloud Email:{ikons, eangelou, dtsouma, nkoziris}@cslab.ece.ntua.gr Computing Systems Laboratory

21/04/23

Client API 2/3

Raw Content

Uploader

Index rulesContent

tableMapReduce

MapReduce

Indextable

Indexer

Searchobjects

Getobject

ClientAPI

• Search for a keyword using Index table– Exact match (Hbase Get)– Prefix search (Hbase Scan).

• Retrieve object from Content table– Using a simple Hbase Get operation 17/36

Page 18: 8/9/2015 Distributed Indexing of Web Scale Datasets for the Cloud Email:{ikons, eangelou, dtsouma, nkoziris}@cslab.ece.ntua.gr Computing Systems Laboratory

21/04/23

Client API 3/3

Raw Content

Uploader

Index rulesContent

tableMapReduce

MapReduce

Indextable

Indexer

Searchobjects

Getobject

ClientAPI

• Supports AND-ing and OR-ing through client side processing

18/36

Page 19: 8/9/2015 Distributed Indexing of Web Scale Datasets for the Cloud Email:{ikons, eangelou, dtsouma, nkoziris}@cslab.ece.ntua.gr Computing Systems Laboratory

21/04/23

Experimental Setup• 11 Worker Nodes, each with:

– 8 cores @ 2GHz– 8GB Ram, disabled page swapping– 500GB storage

• A Total of 88 CPUs, 88GB of RAM and 5.55 TB of hard disk space

• Hadoop version 0.20.1• Hbase version 0.20.2

– Contributed 3 bug fixes for the 0.20.3 version19/36

Page 20: 8/9/2015 Distributed Indexing of Web Scale Datasets for the Cloud Email:{ikons, eangelou, dtsouma, nkoziris}@cslab.ece.ntua.gr Computing Systems Laboratory

21/04/23

Hadoop-HBase Configuration

• Hadoop, HBase were given 1GB of RAM each• Each Map/Reduce task was given 512MB of

RAM• Each worker node could concurrently spawn 6

Maps and 2 Reduces• A total of 66 Maps and 22 Reduces• Hadoop’s speculative execution was disabled

20/36

Page 21: 8/9/2015 Distributed Indexing of Web Scale Datasets for the Cloud Email:{ikons, eangelou, dtsouma, nkoziris}@cslab.ece.ntua.gr Computing Systems Laboratory

21/04/23

Datasets 1/2

• Downloaded from Wikipedia’s dump service and from Project Gutenberg’s custom dvd creation service

• Structured: 23 GB MySQL Database dump of the Latest English wikipedia

21/36

Page 22: 8/9/2015 Distributed Indexing of Web Scale Datasets for the Cloud Email:{ikons, eangelou, dtsouma, nkoziris}@cslab.ece.ntua.gr Computing Systems Laboratory

21/04/23

Datasets 2/2

• Semi-structured (XML-HTML)– 150 GB XML part of a 2,55TB of every English wiki

page along with its revisions up to May 2008– 150 GB HTML from a static wikipedia version

• Unstructured: 20GB full dump of all languages of Gutenberg’s text document collection (46.000 files)

22/36

Page 23: 8/9/2015 Distributed Indexing of Web Scale Datasets for the Cloud Email:{ikons, eangelou, dtsouma, nkoziris}@cslab.ece.ntua.gr Computing Systems Laboratory

21/04/23

Real-life Query traffic

• Publicly available AOL dataset– 20M keywords– 650K users– 3 month period

• Clients created both point and prefix queries following a zipfian pattern

23/36

Page 24: 8/9/2015 Distributed Indexing of Web Scale Datasets for the Cloud Email:{ikons, eangelou, dtsouma, nkoziris}@cslab.ece.ntua.gr Computing Systems Laboratory

21/04/23

Content table creation time

• Time increases linear with data size• DB dataset is created faster than TXT

– Less processing is required

24/36

Page 25: 8/9/2015 Distributed Indexing of Web Scale Datasets for the Cloud Email:{ikons, eangelou, dtsouma, nkoziris}@cslab.ece.ntua.gr Computing Systems Laboratory

21/04/23

Index Table size 1/2

• XML-HTML– Index growth gets smaller when dataset increases– For the same dataset size, XML index is larger than

HTML index

25/36

Page 26: 8/9/2015 Distributed Indexing of Web Scale Datasets for the Cloud Email:{ikons, eangelou, dtsouma, nkoziris}@cslab.ece.ntua.gr Computing Systems Laboratory

21/04/23

Index Table size 2/2

• TXT-DB– TXT index is bigger for the same dataset size– Diversity of terms for the Gutenberg TXT dataset

26/36

Page 27: 8/9/2015 Distributed Indexing of Web Scale Datasets for the Cloud Email:{ikons, eangelou, dtsouma, nkoziris}@cslab.ece.ntua.gr Computing Systems Laboratory

21/04/23

Index Table creation time 1/2

• XML is more demanding compared to HTML• A lot of HTML code gets stripped during

indexing

27/36

Page 28: 8/9/2015 Distributed Indexing of Web Scale Datasets for the Cloud Email:{ikons, eangelou, dtsouma, nkoziris}@cslab.ece.ntua.gr Computing Systems Laboratory

21/04/23

Index Table creation time 2/2

• Time increases linear with data size• DB dataset is created faster than TXT

– Less processing is required

28/36

Page 29: 8/9/2015 Distributed Indexing of Web Scale Datasets for the Cloud Email:{ikons, eangelou, dtsouma, nkoziris}@cslab.ece.ntua.gr Computing Systems Laboratory

21/04/23

Indexing Scalability 23GB SQL

• The speed is proportional to the number of processing nodes

• Typical cloud application requirement– Extra nodes are acquired by a cloud vendor in an

easy and inexpensive manner29/36

Page 30: 8/9/2015 Distributed Indexing of Web Scale Datasets for the Cloud Email:{ikons, eangelou, dtsouma, nkoziris}@cslab.ece.ntua.gr Computing Systems Laboratory

21/04/23

Query Performance• 3 types of queries

– Point: keyword search in one attribute e.g. keyword_attribute

– Any: keyword search in any attribute e.g. keyword_*– Range: Prefix query in any attribute e.g. keyword*

• Traffic was created concurrently by 14 machines• Mean query response time for different

– Load (queries/sec)– Dataset sizes– Number of indexed attribute types

30/36

Page 31: 8/9/2015 Distributed Indexing of Web Scale Datasets for the Cloud Email:{ikons, eangelou, dtsouma, nkoziris}@cslab.ece.ntua.gr Computing Systems Laboratory

21/04/23

Response time vs query load 1/2

• Range query loads above 140queries/sec failed• Response times for a load of 14 queries/sec

– Point queries: 20ms– Any attribute queries: 150ms– Range queries: 27sec

31/36

Page 32: 8/9/2015 Distributed Indexing of Web Scale Datasets for the Cloud Email:{ikons, eangelou, dtsouma, nkoziris}@cslab.ece.ntua.gr Computing Systems Laboratory

21/04/23

Response time vs query load 2/2

• HBase caching result due to skewed workload– Up to 100queries/sec there are enough client channels– Between 100 and 1000 queries/sec caching is significant– After 1000 queries/sec response time increases

exponentially32/36

Page 33: 8/9/2015 Distributed Indexing of Web Scale Datasets for the Cloud Email:{ikons, eangelou, dtsouma, nkoziris}@cslab.ece.ntua.gr Computing Systems Laboratory

21/04/23

Response time vs dataset size

• Average load of 14 queries/second• Range queries are more expensive• Response times for exact queries remain constant

33/36

Page 34: 8/9/2015 Distributed Indexing of Web Scale Datasets for the Cloud Email:{ikons, eangelou, dtsouma, nkoziris}@cslab.ece.ntua.gr Computing Systems Laboratory

21/04/23

Related Work 1/2

• MapReduce based data analysis frameworks– Yahoo’s PIG, Facebook’s Hive and HadoopDB

• Analytical jobs are described in a declarative scripting language

• They are translated in a chain of MapReduce steps and executed on Hadoop

• Query responses time in the order of minutes to hours

34/36

Page 35: 8/9/2015 Distributed Indexing of Web Scale Datasets for the Cloud Email:{ikons, eangelou, dtsouma, nkoziris}@cslab.ece.ntua.gr Computing Systems Laboratory

21/04/23

Related Work 2/2

• Distributed indexing frameworks based on Hadoop– Ivory distributes only the index creation but the

created index is served through a simple DB– Hindex distributes Indices through HBase but the

index creation is centralized

• In our system, both the index creation and serving is done in a distributed way

35/36

Page 36: 8/9/2015 Distributed Indexing of Web Scale Datasets for the Cloud Email:{ikons, eangelou, dtsouma, nkoziris}@cslab.ece.ntua.gr Computing Systems Laboratory

21/04/23

Questions

36/36