Split elimination in mapreduce systems
First Claim
1. A method comprising:
- receiving a query comprising at least one predicate, the query referring to data comprising a plurality of records, each record comprising a plurality of values in a plurality of attributes and each record being located in at least one of a plurality of blocks of a distributed file system, each block having a unique identifier;
determining a block count indicating the number of blocks in which each of the values of the data appear;
determining a record count indicating the number of instances of each of the values in each of the attributes;
based on the block count, determining a profit value associated with copying each of the values of the data to a materialized view;
based on the record count, determining a cost value associated with copying each of the values of the data to a materialized view;
selecting a predetermined number of values such that the profit to cost ratio is maximal for the predetermined number of values;
providing a materialized view comprising the predetermined number of values;
determining whether the query is applicable to the materialized view;
wherein the query comprises more than one predicate and determining whether the query is applicable to the materialized view comprises;
determining whether the predicates comprise a conjunction of a predicate met by one of the values of the materialized view;
executing the query against the materialized view if it is applicable to the materialized view.
1 Assignment
0 Petitions
Accused Products
Abstract
Embodiments of the present invention relate to elimination of blocks such as splits in distributed processing systems such as MapReduce systems using the Hadoop Distributed Filing System (HDFS). In one embodiment, a method of and computer program product for optimizing queries in distributed processing systems are provided. A query is received. The query includes at least one predicate. The query refers to data. The data includes a plurality of records. Each record comprises a plurality of values in a plurality of attributes. Each record is located in at least one of a plurality of blocks of a distributed file system. Each block has a unique identifier. For each block of the distributed file system, at least one value cluster is determined for an attribute of the plurality of attributes. Each value cluster has a range. The predicate of the query is compared with the at least one value cluster of each block. The query is executed against only those blocks where the predicate is met by at least one value cluster.
32 Citations
12 Claims
-
1. A method comprising:
-
receiving a query comprising at least one predicate, the query referring to data comprising a plurality of records, each record comprising a plurality of values in a plurality of attributes and each record being located in at least one of a plurality of blocks of a distributed file system, each block having a unique identifier; determining a block count indicating the number of blocks in which each of the values of the data appear; determining a record count indicating the number of instances of each of the values in each of the attributes; based on the block count, determining a profit value associated with copying each of the values of the data to a materialized view; based on the record count, determining a cost value associated with copying each of the values of the data to a materialized view; selecting a predetermined number of values such that the profit to cost ratio is maximal for the predetermined number of values; providing a materialized view comprising the predetermined number of values; determining whether the query is applicable to the materialized view; wherein the query comprises more than one predicate and determining whether the query is applicable to the materialized view comprises; determining whether the predicates comprise a conjunction of a predicate met by one of the values of the materialized view; executing the query against the materialized view if it is applicable to the materialized view. - View Dependent Claims (2, 3, 4, 5, 6)
-
-
7. A computer program product for optimizing queries in distributed processing systems, the computer program product comprising a computer readable storage medium having program instructions embodied therewith, the program instructions executable by a processor to cause the processor to perform a method comprising:
-
receiving a query comprising at least one predicate, the query referring to data comprising a plurality of records, each record comprising a plurality of values in a plurality of attributes and each record being located in at least one of a plurality of blocks of a distributed file system, each block having a unique identifier; determining a block count indicating the number of blocks in which each of the values of the data appear; determining a record count indicating the number of instances of each of the values in each of the attributes; based on the block count, determining a profit value associated with copying each of the values of the data to a materialized view; based on the record count, determining a cost value associated with copying each of the values of the data to a materialized view; selecting a predetermined number of values such that the profit to cost ratio is maximal for the predetermined number of values; providing a materialized view comprising the predetermined number of values; determining whether the query is applicable to the materialized view; wherein the query comprises more than one predicate and determining whether the query is applicable to the materialized view comprises; determining whether the predicates comprise a conjunction of a predicate met by one of the values of the materialized view; executing the query against the materialized view if it is applicable to the materialized view. - View Dependent Claims (8, 9, 10, 11, 12)
-
Specification