WO2014107359A1 - System and method for distributed database query engines - Google Patents

System and method for distributed database query engines Download PDF

Info

Publication number
WO2014107359A1
WO2014107359A1 PCT/US2013/077240 US2013077240W WO2014107359A1 WO 2014107359 A1 WO2014107359 A1 WO 2014107359A1 US 2013077240 W US2013077240 W US 2013077240W WO 2014107359 A1 WO2014107359 A1 WO 2014107359A1
Authority
WO
WIPO (PCT)
Prior art keywords
query
worker
node
data
nodes
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.)
Ceased
Application number
PCT/US2013/077240
Other languages
French (fr)
Inventor
Raghotham Murthy
Rajat Goel
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Meta Platforms Inc
Original Assignee
Facebook Inc
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Priority to KR1020157020768A priority Critical patent/KR101775433B1/en
Priority to CA2896855A priority patent/CA2896855C/en
Priority to JP2015551711A priority patent/JP6117378B2/en
Priority to AU2013371448A priority patent/AU2013371448B2/en
Priority to BR112015016352A priority patent/BR112015016352A2/en
Priority to KR1020177024191A priority patent/KR102037232B1/en
Application filed by Facebook Inc filed Critical Facebook Inc
Priority to MX2015008799A priority patent/MX349042B/en
Priority to CN201380069759.9A priority patent/CN104903894B/en
Publication of WO2014107359A1 publication Critical patent/WO2014107359A1/en
Priority to IL239717A priority patent/IL239717A/en
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2458Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
    • G06F16/2471Distributed queries
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • G06F16/2358Change logging, detection, and notification
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2453Query optimisation
    • G06F16/24534Query rewriting; Transformation
    • G06F16/24539Query rewriting; Transformation using cached or materialised query results
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • G06F16/24552Database cache management
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/951Indexing; Web crawling techniques
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9535Search customisation based on user profiles and personalisation

Definitions

  • This invention relates generally to databases, and in particular to a distributed database query engine for low query latency database analyses.
  • Frameworks exist that support large-scale data-intensive distributed applications, by enabling applications to interact with a cluster of
  • Hadoop util izes a distributed , scalable, portable fi le system , called Hadoop Distributed File System (H DFS), to distribute a massive amount of data among data nodes (also referred to as slave nodes) in a Hadoop cluster.
  • H DFS Hadoop Distributed File System
  • I n order to reduce the adverse impact of a data node power outage or network failure (including switch failu re), data in an H DFS is typically replicated on different data nodes.
  • Hive an open source data warehouse system , was developed to run on top of Hadoop clusters.
  • Hive su pports data queries expressed in a scripted query language (SQL)-like declarative language called HiveQL.
  • the H ive system then compiles the queries expressed in HiveQL into map-reduce jobs that can be executed on the Hadoop cluster, in a mathematical form of directed acyclic graph .
  • the HiveQL language includes a type system that supports tables containing primitive types, col lections such as arrays and maps, and nested compositions of types. I n addition , the Hive system includes a system catalog , called
  • H ive-Metastore containing schemes and statistics, which is useful in data exploration and query optimization .
  • the H ive system can store and analyze large amounts of data for a social networking system .
  • the H ive system can analyze the degree of connection between users to rank stories that users follow on the social networking system .
  • the H ive system can analyze activity logs to gain insights into how services of the social networking system are bei ng used to help application developers, page administrators and advertisers make development and business decisions.
  • the H ive system can run complex data mining programs to optim ize the advertisements shown to the users of the social networking system .
  • the H ive system can further analyze the usage logs to identify spam and abuse of the social networki ng system .
  • the H ive system incl udes web-based tools for people without programm ing ability to author and execute H ive queries, for authori ng , debugging and scheduling complex data pipelines, and for generating reports based on data stored in the H ive system and other relational databases like MySQL and Oracle.
  • query latency for the H ive system is usually h igh . Due to the large amou nt of data and the map-reduce scheme of the Hadoop cluster, even a simplest query can take from several seconds to minutes to complete. This is particular a problem for interactive analyses when an operator needs the result of the current query to decide the next query of a series of queries. The latency problem significantly affects the productivity of the analysts since the analysts cannot determine the next query when waiting for the result of the current query.
  • RDB MS relational database management system
  • the technology introduced here provides the benefits of low-latency queries on a very large amount of data stored in a large scale storage cluster (e.g. a Hadoop cluster), which stores metadata in a system catalog (e.g . Hive Metastore).
  • a large scale storage cluster e.g. a Hadoop cluster
  • a system catalog e.g . Hive Metastore
  • the distributed query engine includes a gateway server and a plural ity of work nodes.
  • the gateway server divides a query task into partial tasks. Each worker node of the engine handles a partial task to generate an intermediate query result in memory.
  • the intermediate query result can be an approximate intermediate result generated by scanning a portion of the related data.
  • the gateway server receives the intermediate query results and constructs a query result for the query task based on the intermediate query results.
  • the system includes a gateway server and a plu rality of worker nodes.
  • the gateway server is configured to divide the database query, for the database containing data stored in a distributed storage cluster havi ng a plurality of data nodes, into a plurality of partial queries and construct a query result based on a plurality of intermediate results.
  • Each worker node of the plurality of worker nodes is configured to process a respective partial query of the plurality of partial queries by scanning data related to the respective partial query that stored on at least one data node of the distributed storage cluster and generate an intermediate result of the plurality of i ntermediate results that is stored in a memory of that worker node.
  • the techniques introduced here are capable of performing low-latency query processing on a large aggregate of data stored in a large scale storage cluster such as a Hadoop cluster. Th is is particularly beneficial for interactive analyses since operators do not need to wait for the cu rrent query to complete to determine the next query.
  • This distributed query system can further generate approximate results by scanning a portion of the related data. Operators of the system can receive rapid prototyping of a series of queries to test the valid ity of the series the queries, before processing the series of queries on the whole set of the related data.
  • Embodiments according to the invention are in particular disclosed in the attached claims di rected to a system, a storage medium and a method, wherein any feature mentioned in one claim category, e .g. system , can be claimed in another claim category, e.g . method , as well .
  • a system comprises:
  • a gateway server configured to generate a pl urality of partial queries from a database query for a database containing data stored in a distributed storage cluster that has a plurality of data nodes, and to construct a query result based on a plural ity of intermediate results; and a plural ity of worker nodes, wherein each worker node of the plurality of worker nodes is configured to process a respective partial query of the plurality of partial queries by scanning data related to the respective partial query and stored on at least one data node of the distributed storage cluster, and wherein each worker node of the pl urality of worker nodes is further configured to generate an intermediate resu lt of the plu rality of intermediate results that is stored in a memory of that worker node.
  • Each worker node of the plurality of worker nodes can be further configured to process the respective partial query of the plu rality of partial queries by scanni ng a portion of the data related to the respective partial query that is stored on the at least one data node of the distributed storage cluster and to generate an approximate intermediate result that is stored in the memory of that worker node.
  • the gateway server can be further configured to construct an approximate query result based on at least one approximate intermed iate result.
  • the gateway server can also further be configured to construct an approximate query result based on a portion of the plurality of intermediate results.
  • the gateway server can even further be configured to identify a straggling worker node, further d ivide a partial query that is assigned to the straggl ing worker node i nto a plu rality of subordinate partial queries, and assign the plurality of subordinate partial queries to some of the plurality of worker nodes, wherein the straggling worker node is a worker node that either fails to report a rate of progress to the gateway server or reports the rate of progress below a predetermined val ue after a
  • Each worker node of the plurality of the worker nodes can be a service running a respective data node within the distributed storage cluster.
  • the system further can com prise:
  • a metadata cache configured to cache table level metadata of the database and fi le level metadata of the distributed storage cluster.
  • the metadata cache can be configured to retain cached metadata from a previous database query for the database query.
  • Each worker node of the plurality of the worker nodes can periodical ly send heartbeat messages to the gateway server to report status of a partial query processing by that worker node.
  • the gateway server can further be configured to receive an instruction from a client device to retu rn an approximate query result or terminate a processing of the database query.
  • the gateway server can also further be configured to instruct the worker nodes to immed iately return approxi mate intermediate results, and to return an approximate query result based on the approximate
  • the database query can include a request for an approximate query result.
  • the query result can be accompanied by an indication of a portion of related data stored in the data nodes that has been scanned for the query result.
  • the database can be a Hive data warehouse system and the distributed storage cluster is a Hadoop cl uster.
  • a method uses a system according to the invention or any of the above mentioned em bodiments.
  • a method comprises:
  • each of the partial queries to a respective worker node of a plural ity of worker nodes, wherein each worker node is a service runn ing on a data node of the distributed storage cluster;
  • each intermediate resu lt is processed by a respective worker node of the worker nodes by scanning related data stored in a data node on which the perspective worker node ru ns;
  • the method further can comprise: returning the query result along with a portion indicator to the client device, wherein the portion indicator indicates the portion of related data stored in the data nodes that has been scanned for the query result.
  • the method also further can comprise :
  • step of retrieving comprises:
  • intermediate result is processed by a respective worker node of the worker nodes by scanning a portion of related data stored in a data node on which the perspective worker node runs.
  • the method may further comprise:
  • step of sending comprises:
  • each of the partial queries to a respective worker node of a plural ity of worker nodes, wherein each worker node is a service runn ing on a data node of the distributed storage cluster;
  • each intermediate result is processed by a respective worker node of the worker nodes by scanning related data stored in a data node on which the perspective worker node ru ns;
  • the step of identifying can comprise :
  • identifying a straggling worker node by monitoring heartbeat messages that the worker nodes periodically send , wherein the straggli ng worker node is identified when heartbeat messages from the straggling worker node are not received for a predetermined ti me period , or when a heartbeat message from the straggling worker node is received and the heartbeat message includ ing a number representing a status of a partial query processing by the straggli ng worker node that is below a threshold value.
  • FIG . 1 illustrates an example of a Hadoop cluster upon which a distributed query engine can be built.
  • FIG . 2 illustrates an example of a Hadoop cluster having a
  • FIG . 3 ill ustrates relationships among a distributed query engine, a Hadoop Distributed File System (H DFS), a H ive data warehouse and a storage cluster.
  • H DFS Hadoop Distributed File System
  • FIG . 4 illustrates a h igh level block diagram of an example distributed query engine.
  • FIG . 5 ill ustrates a sample process for identifyi ng straggling worker nodes and further dividing the partial queries.
  • FIG . 6 ill ustrates a sample process for approximate processing of a database query.
  • F IG . 7 is a high-level block diagram showi ng an example of the architecture of a computer node, wh ich may represent any cluster node described herein .
  • references in th is description to "an embodiment", “one embodiment”, or the like, mean that the particular feature, function, or characteristic being described is included in at least one embodiment of the present invention . Occurrences of such phrases in this description do not necessarily al l refer to the same embodiment, nor are they necessari ly mutual ly exclusive.
  • Modern social networking systems can accumulate massive amou nts of data each day and therefore need a highly scalable system for storing and analyzi ng data.
  • Particularly, efficient interactive analyses on the massive amount of data need a low-latency fast-responding way of processing data queries.
  • the present invention discloses a distributed query engine enabled by com bin ing an in-memory serving-tree based computation framework with approximate query processing .
  • the distributed query engine d ivides a query task into m ultiple partial tasks and distributes the partial tasks to worker nodes for further i n-memory processing.
  • the distributed query engi ne is capable of generating an approximate result at any time during the query processing , by requesting approximate intermediate results from the worker nodes based on the scanned portion of the data.
  • the d istributed query engine can be built on top of a Hadoop cluster runn ing Hadoop Distributed File System (H DFS), H ive data warehouse, and H ive-Metastore.
  • the distributed query engine can be com patible with H ive's data formats and metadata, and support a subset of HiveQL language. Operators using the distributed query engine can efficiently discover statistics patterns in the data managed by the H ive data warehouse.
  • the distri ubbed query engine can conduct quick analyses and rapid prototyping of a series of queries by generating approximate results.
  • the distributed query engine can run fu ll analyses by scanning the entire related data aggregate.
  • FIG . 1 illustrates an example of a Hadoop cluster that a
  • the Hadoop cluster 1 00 includes a metadata node 1 1 0A and a plu rality of data nodes 1 1 0B, 1 1 0C and 1 1 0D.
  • the nodes can communicate with each other through an interconnect 1 20.
  • the interconnect 1 20 may be , for example, a local area network (LAN ), wide area network (WAN), metropolitan area network (MAN ), global area network such as the I nternet, a Fibre Channel fabric, or any combination of such interconnects.
  • the interconnect 1 20 can include a network switch for processing and routing data between the nodes under network protocols, incl udi ng TCP/I P.
  • Clients 1 30A and 1 30 B may comm unicate with the Hadoop cluster 1 00 via a network 1 40, which can be, for exam ple, the I nternet, a LAN , or any other type of network or combination of networks.
  • a network 1 40 can be, for exam ple, the I nternet, a LAN , or any other type of network or combination of networks.
  • Each of the clients may be, for example, a conventional personal com puter (PC), server-class computer, workstation , handheld computing/communication device, or the like.
  • the Hadoop cluster is implemented using one or more racks of commod ity-class servers.
  • Files and data are stored in a distributed manner across the nodes in the Hadoop cluster 100 in a Hadoop Distributed File System (HDFS).
  • HDFS Hadoop Distributed File System
  • the HDFS serves the functions of a conventional hierarchical file system. Files and data blocks of files can be created, deleted, or moved in the HDFS.
  • the NameNode service can store the file system index, including the mapping of blocks to files and file system properties, in a file 160 called Fslmage in the metadata node.
  • Each data node 110 is responsible for storing files for the HDFS.
  • Files stored in the HDFS are divided into subsets, referred to herein as "blocks".
  • the size of a block is 64 MBs.
  • the blocks are typically replicated to multiple data nodes. Therefore, the HDFS in the Hadoop cluster 100 can, but does not necessarily, use a conventional RAID architecture to achieve data reliability.
  • File operations are controlled by the NameNode service 150 running on the metadata node 110A.
  • data nodes 110B, 110C, 110D are organized into racks where all nodes are connected via a network switch. The network speed between nodes within a rack can be faster than the network speed between nodes in different racks.
  • the Hadoop cluster may take that fact into account when assigning tasks.
  • a DataNode service 170 runs on each data node for responding read and write requests for blocks. The
  • DataNode services 170 also respond to requests from the metadata node for creating, deleting and replicating blocks.
  • the data nodes 110B, 110C, 110D send periodic heartbeat messages including block reports to the metadata node 110A.
  • the metadata node 110A validates its block mapping and other file system metadata using the periodic block reports.
  • a client 1 30A or 1 30B seeks to write a file to the Hadoop cluster 1 00
  • the client sends a file creation request to the metadata node 1 1 0A.
  • the metadata node 1 1 0A responds to the client with the identity of one or more assigned data node(s) and the destination locations of the blocks of the files.
  • the client sends data blocks of the fi le to the assigned data node(s); and the cluster can repl icate the data blocks on one or more data nodes.
  • the metadata node records the file creation i n its metadata, including the Fsl mage file.
  • a Hadoop cluster works as a parallel data processing engine based on a framework called MapReduce.
  • the Hadoop cluster includes a JobTracker to implement the MapReduce fu nction .
  • a JobTracker can be i mplemented as a dedicated server (JobTracker node 21 0A) within a Hadoop cluster 200.
  • the Hadoop cluster 200 includes two racks 242 and 244 interconnected via a switch 226.
  • Rack 242 includes JobTracker node 21 0A, metadata node 21 0B, data nodes 21 0C-21 0D and a switch 222 to interconnect the nodes within rack 242.
  • Rack 244 includes data nodes 21 0E-21 0H and a switch 224 to interconnect the nodes within rack 242.
  • a JobTracker can be im plemented as a service that shares the same metadata node with a NameNode service.
  • the metadata node 21 0B also referred to as name node
  • the JobTracker node 21 0A which is dedicated to control MapReduce jobs, receives a request from a client 230 to launch a MapReduce job. Once the MapReduce job (also referred to as a MapReduce appl ication or a
  • MapReduce task is subm itted to the JobTracker 21 OA, JobTracker 21 OA identifies input and output files and/or directories in the H DFS for the job .
  • the input file for the MapReduce task can incl ude a plurality of in put file blocks that contain in put data for the MapReduce task.
  • the JobTracker 21 0A uses knowledge of the i nput file blocks (including physical quantity of blocks and where the blocks are located) to decide how many subordinate tasks wil l be created .
  • the MapReduce application is copied to every processi ng node where the input file blocks are present. For each assigned processing node , JobTracker 21 OA creates at least one subordinate task.
  • a TaskTracker service mon itors the status of the su bordinate task on that node and reports the status and intermediate output back to the JobTracker.
  • the Hadoop cluster 200 distributes the subordinate tasks based on the knowledge of the fi le blocks. Therefore, instead of moving storage to the processing locations, a Hadoop cluster moves the processi ng tasks to the storage locations.
  • each node 21 0A-21 0H are il lustrated as single units in F IG . 2, each node can have a distributed architecture.
  • a node can be designed as a combination of multiple computers, which may be physically separate from each other and which may communicate with each other over a physical interconnect.
  • Such an architecture allows convenient scal ing , such as by deploying computers capable of
  • a distributed query engi ne is built on top of a Hadoop cluster running Hadoop Distributed File System (H DFS) and H ive data warehouse.
  • FIG . 3 illustrates the relationships among the distri ubbed query engine 300, the Hive data warehouse, the H DFS and the storage cluster.
  • the distributed query engine 300 is bui lt on top of the H ive data warehouse and the H DFS, which in turn rely on the storage cluster to operate.
  • a Hadoop cluster 31 0 including a plu rality of nodes 31 2 that are responsible for storing the massive amount of data.
  • the Hadoop cl uster 31 0 further includes a metadata node 31 4.
  • a Hadoop Distributed File System (H DFS) 320 is running on the Hadoop cluster 31 0 to distribute and manage the data among the nodes 31 2.
  • Data Node services 322 are running on the nodes 31 2 to manage the local data store in the nodes 31 2. Data and files are split into blocks that are stored in the nodes 31 2 of the Hadoop cluster 31 0.
  • a NameNode service 324 is running on the metadata node 31 4 to provide metadata services within the Hadoop cluster, including maintaining the file system namespace and controlling access by external clients.
  • a H ive data warehouse system 330 is built on top of the Hadoop cluster 31 0 and the H DFS 320.
  • the H ive data warehouse system 330 works as a database interface.
  • the H ive data warehouse system 330 supports data queries expressed in an SQL-like declarative language, H iveQL. Instead of relying on the map-reduce scheme of the Hadoop cluster to process the database queries for the Hive system , the
  • discontinued query engine includes a plurality of worker nodes 342 to process the database queries in a parallel fashion .
  • the distributed query engine 300 further includes a gateway 348.
  • the worker nodes 342 are im plemented as services running on the nodes 312 of the Hadoop cluster 31 0.
  • the worker nodes 342 are implemented as dedicated servers interconnected with the nodes 31 2 of the Hadoop cluster 31 0.
  • the worker nodes 342 are responsible to compi le the partial tasks expressed in HiveQL into instructions that the DataNode services 322 of the H DFS 320 can execute.
  • the distributed query engi ne receives a query task from a client and splits the query task into multiple partial tasks.
  • Operators of the distributed query engine 400 can provide query task via input interface 486 of a cl ient 480.
  • the input interface 486 includes both command line interface 482 and graph ic interface 484.
  • an operator can provide the query task as a program directly expressed i n a database query language, such as SQL or H iveQL.
  • a database query language such as SQL or H iveQL.
  • the graphic interface 484 an operator can provide the query task by working with the graphic interface elements of 484.
  • the graphic interface 484 is implemented as an input web page . An operator can provide the query task by interacting with elements on the input web page, selecting options, and entering input data.
  • the graphic interface 484 can translates the operator's selections and in puts into a correspondi ng program expressed in a database query language .
  • the input interface 486 transmits the program , received from either the command li ne interface 482 or graphic i nterface 484, to a gateway 41 0 of the distributed query engine 400 as the query task.
  • the gateway 41 0 receives the query task from the client 480 and parses the query task.
  • the gateway 41 0 sends an inqui ry to the H ive Metastore 440 based on the query task.
  • the Hive Metastore 440 returns table metadata and H DFS file identifications to the gateway 41 0 for the data upon which the query task needs to run .
  • the gateway 41 0 retrieves the locations of the corresponding H DFS blocks from the H DFS Name Node 460 based on the H DFS file identifications.
  • the gateway 41 0 divides the query task into a plurality of partial queries based on the corresponding H DFS blocks.
  • the gateway 41 0 assigns each individual partial query to be executed on one H DFS block within the correspondi ng H DFS blocks.
  • the gateway 41 0 can divide the query task i nto partial queries in other ways, as may be contemplated by a person of ordinary skill in the art.
  • the gateway 41 0 sends each of the partial queries to a worker 41 2 for local processing.
  • workers 41 2 are overlaid on the Hadoop cluster that stores the H ive table data.
  • Each work 41 2 runs as a service on a Hadoop cluster node 432.
  • the partial queries are
  • each worker 41 2 is responsible for a partial query to process data store on the node 432 which that particular worker 41 2 runs.
  • the worker 41 2 directly contacts a DataNode service 422 which runs on the same cluster node 432 as the worker 41 2.
  • the worker 41 2 is able to ach ieve low-latency data reads for the partial query by requesting data within a single cluster node 432.
  • the cluster node 432 can use remote procedure cal l (RPC) frameworks to facilitate the implementation of the services.
  • RPC remote procedure cal l
  • the cluster node 432 use an RPC framework such as
  • Apache Th rift framework to define and create the worker service 41 2 as a highly scalable and high performance server service.
  • the worker nodes 342 are implemented as services running on the nodes 31 2 of the Hadoop cluster 31 0.
  • the worker nodes 342 are implemented as dedicated servers interconnected with the nodes 31 2 of the Hadoop cluster 31 0.
  • the workers 41 2 periodically retu rn status updates (referred to as "heartbeats") to the gateway 41 0 indicating the process of the partial query processing.
  • heartbeats retu rn status updates
  • the gateway 41 0 determ ines that the worker has failed and reschedules the partial query to another worker.
  • Each worker 41 2 scans data related to the respective partial query that stored on one or more cluster nodes 432, and generates an
  • the worker 41 2 processes the partial query entirely in the memory of the cluster node on which the worker 41 2 runs.
  • the worker 41 2 stores the intermediate result in its memory.
  • the worker 41 2 sends the intermediate result to the gateway 41 0.
  • the worker 412 sends the i ntermediate result via RPC cal ls such as Apache Thrift calls.
  • the gateway 41 0 receives all intermed iate results from the workers 41 2 and combines the intermediate results into a query result as an answer for the query task. Then the gateway 41 0 returns the query result to the client 480. I n one embodiment, the cl ient 480 optional ly displays the query result on a display component.
  • a MetaCache 41 4 runs on the gateway 41 0 to cache both the H ive table-level and the H DFS file-level metadata to decrease query latency. I n some embod iments, the MetaCache 41 4 can be implemented as a standalone server interconnected with the gateway 41 0. The
  • MetaCache 41 4 can keep the cached data from previous queries. For example, when an operator is interactively analyzi ng on data of a H ive table, the operator ru ns mu ltiple consecutive queries on the same Hive table. By preserving the cached data from previous queries, the
  • MetaCache 41 4 can reuse the cached metadata instead of fetching the metadata repetitively from the Hive Metastore 440 and the H DFS
  • the MetaCache 41 4 has high cache hit rates because data in a typical Hive table is written once and read many times without further changes.
  • the MetaCache 41 4 can retrieve a real-time feed of audit logs of the H ive system to invalidate entries in the cached data for partitions in the H ive system that may have been changed by H ive queries or other operations.
  • the MetaCache 414 automatically pu rges entries in the cached data that have not been queried for a predeterm ined time period (e.g . one hour). I n doing so, the
  • MetaCache 41 4 prevents arbitrary growth in memory usage and mi nim izes cache errors.
  • each cluster node 432 on wh ich a worker 41 2 runs can be different.
  • Cluster nodes 432 and worker services 41 2 can also fail for various reasons. While the gateway 41 0 can receive intermediate results from a majority of workers 41 2 in a reasonable time period , there are workers 41 2 that fail to deliver the intermediate result due to the node or service failures or delays. These workers either report rates of progress below a predetermined percentage after a predetermined time period since the partial queries distribution , or si mply fail to respond the progress to the gateway 41 0. These workers are identified as straggling workers. Once the gateway 41 0 identifies the straggling workers, the gateway 41 0 sends messages to the straggling workers to cancel assignment of the partial queries.
  • the gateway 41 0 For each unfinished partial query for wh ich straggling workers failed to deliver the intermediate results, the gateway 41 0 further divides the partial query i nto a plurality of subordinate partial queries, and assigns the subordinate partial queries to some of the workers 41 2. I n one embodiment, the gateway 41 0 determines the assignment of the
  • the gateway 41 0 can determine the
  • Th is add itional parallelized process speeds up the retries of the unfinished partial queries and thus decreases the query latency caused by straggling workers.
  • FIG . 5 illustrates a sample process for identifying straggl ing worker nodes and further d ividing the partial queries.
  • a gateway of the distributed query engine receives a database query from a client device, for a database containing data stored in a distributed storage cluster which has a plurality of data nodes.
  • the gateway divides the database query into a plurality of partial queries.
  • the gateway sends each of the partial queries to a respective worker node of a plurality of worker nodes.
  • Each worker node can be a service running on a data node of the distributed storage cluster.
  • the gateway server identifies a straggling worker node.
  • the gateway further divides a partial query that is assigned to the straggling worker node into a plurality of subordi nate partial queries, and assigns the plurality of subordi nate partial queries to some of the plurality of worker nodes.
  • the gateway identifies a straggling worker node by monitoring heartbeat messages that the worker nodes periodically sends. The straggling worker node is identified when
  • the straggling worker node is identified when a heartbeat message from the straggling worker node is received; where the heartbeat message includes a number representing the status of a partial query processing by the straggling worker node that is below a threshold value.
  • the gateway retrieves a plurality of intermediate results for the partial queries from the worker nodes. Each intermediate result is processed by a respective worker node of the worker nodes by scanning related data stored in a data node on wh ich the perspective worker node runs.
  • the gateway generates a query result based on the plurality of intermed iate resu lts.
  • the distributed query engine can be
  • H iveQL is a declarative language similar to SQL. H iveQL does not need to strictly follow the standard of SQL, and offers extensions not originally specified in SQL.
  • the distri ubbed query engi ne can support filters, aggregates, top-k, percentiles, sub-queries in FROM clauses, U N ION ALL and user-defined functions.
  • the distributed query engine support
  • TABLESAM PLE clause can be used to explicitly lim it the amount of input data that is scanned .
  • the distributed query engine support W ITH clause allows operators to write more readable queries by declaring variables for complex expressions that are used multiple times in the same query.
  • the W ITH clause can also provide a way for the operator to specify hints to the optim izer such that it eval uates common
  • the distributed query engine can supply an approximate query resu lt before the entire query processing is finished .
  • the distributed query engine can automatically supply the approximate query result after a predetermined time period since the initial query in put, or when the processing of the query satisfies a predetermined condition (e.g . a certain number of workers fail).
  • the distributed query engine can also supply the approximate query result i n response to an operator instruction . For example, an operator waiti ng for the query result can input Ctrl-C to instruct the d istributed query engine to stop the query processing.
  • U pon receiving the instruction the distributed query engi ne stops the query processing and returns an approximate query result.
  • the distributed query engine further supplies a percentage indicator to indicate the percentage of data scanned for the approximate query result. I n one em bodiment, the distributed query engine returns the approximate query resu lt and continues the query processing for an exact query result (i .e. with a percentage indicator of 1 00%).
  • the distributed query engine uses one-pass algorithms for aggregations and stores all intermediate results in memory.
  • the sizes of the intermediate results and the final query result can be relatively small .
  • the distributed query engine's ability of returning an approximate query result can further reduces the size. For example, if the query is to sort data records by a specified column (e.g . ORDER BY clause), the query is to sort data records by a specified column (e.g . ORDER BY clause), the query is to sort data records by a specified column (e.g . ORDER BY clause), the query is to sort data records by a specified column (e.g . ORDER BY clause).
  • the distributed query engine can generate approximate answer by letting workers only scan a portion of the related data records. Simi larly, the distributed query engine can also generate approximate answers for types of queries such as counting distinct entries and calculating percentile.
  • an operator of the distributed query engine can i nput a query task instructi ng a count of the number of distinct values of a country colum n from a specific set of data records.
  • the distributed query engine receives the query, divides the query i nto partial queries, and assigns workers to process these partial queries. After 20 seconds from the time the distributed query engine starts the task, the operator terminates the task by pressing CTRL-C on a keyboard of a client device.
  • the d istributed query engine Upon receiving the termi nation instruction , the d istributed query engine immediately instructs the assigned workers to return approximate intermediate results and in turn returns an approximate result by combining these approxi mate intermed iate resu lts.
  • the approximate result is returned to a client device of the operator.
  • the client device can further receive information about the total processing ti me , num ber of workers used , rows of the data records that have been scanned , amount of data scanned , amount of data to be scanned for exact result, percentage of data scanned, and/or number of fail ures.
  • the distributed query engine can automatically return an approximate query result after the number of failures exceeding a predetermined threshold value.
  • the operator specifies in the query task that an exact result is requi red .
  • the distributed query engine will keep processing u ntil all related data records are scanned by assigned workers.
  • An exact query result can be returned to a user device of the operator.
  • the client device can further receive information about the total processing time, number of workers used, rows of the data records that have been scanned , amount of data scanned, percentage of data scanned (i .e. 1 00%), and/or number of failures.
  • FIG . 6 ill ustrates a sample process for approximate processing of a database query.
  • a gateway of the distributed query engine receives a database query from a client device, for a database containi ng data stored i n a distributed storage cluster which has a plurality of data nodes.
  • the gateway divides the database query i nto a plurality of partial queries.
  • the gateway sends each of the partial queries to a respective worker node of a plurality of worker nodes.
  • Each worker node can be a service running on a data node of the distributed storage cluster.
  • the gateway can instruct the worker nodes to immediately retu rn
  • immediately returning approximate query results means returning the results within a very short time period such as one second .
  • the instruction can be triggered by various events.
  • the gateway may receive an instruction from the client device to terminate the processing of the database query; or the gateway may decide to return an approximate query result automatically when an exact query resu lt is not available after a predeterm ined time period . Therefore, the approximate result can be requested manually by the client device, or automatically triggered by the distributed query engine without user intervention .
  • the gateway retrieves a plurality of approximate intermediate results for the partial queries from the worker nodes.
  • Each approximate intermediate result is processed by a respective worker node of the worker nodes by scanning a portion of related data stored in a data node on which the perspective worker node runs.
  • the gateway Upon receivi ng the approxi mate intermediate results, at step 61 2, the gateway generates an approximate query result based on a plu rality of approximate intermediate results.
  • the gateway of the distributed query engine returns the approximate query result.
  • the approximate query result is returned along with a percentage indicator to the client device.
  • the percentage indicator suggests the percentage of related data stored in the data nodes that has been scanned for the query result.
  • the distributed query engine significantly reduces the latencies of queries on data stored in data storage clusters such as a Hadoop cluster, as compared to the query latencies by using a Hive system alone.
  • Operators or users of the distributed query engine can conduct ad hoc queries with smal l waiting time periods.
  • the distributed query engine can be utilized in different situations. For example, without the distributed query engine, the operators or analysts need to explicitly load data from H ive into a database such as MySQL or Oracle and then fetch data from the database to drive web-based data analysis reports. Using the distributed query engine, the operators can fetch data directly from the H ive system to generate the web-based data analysis report.
  • the distributed query engine can fetch data samples to show the operator a preview of the data on the graphic interface 484.
  • the distributed query engine can index and pin popular data sets in memory to further improve query latencies.
  • F IG . 7 is a high-level block diagram showi ng an example of the architectu re of a com puter node, which may represent any cluster node described herein.
  • the node 700 includes one or more processors 71 0 and memory 720 coupled to an interconnect 730.
  • the interconnect 730 shown in Figure 7 is an abstraction that represents any one or more separate physical buses, point to point connections, or both connected by
  • the interconnect 730 may i nclude, for example, a system bus, a Peripheral
  • PCI Component Interconnect
  • PC I-Express PC I-Express bus
  • ISA HyperTransport or industry standard architecture
  • SCS I small computer system interface
  • USB universal serial bus
  • I2C I IC
  • I EE E I nstitute of Electrical and Electronics Engi neers
  • the processor(s) 71 0 is/are the central processing unit (CPU ) of the storage controller 700 and , thus, control the overal l operation of the node 700. I n certain embodiments, the processor(s) 71 0 accom plish this by executing software or firmware stored in memory 720.
  • the processor(s) 71 0 may be, or may include, one or more programmable general-purpose or special-purpose microprocessors, digital signal processors (DSPs), programmable controllers, application specific integrated circuits (AS ICs), programmable logic devices (PLDs), trusted platform modules (TPMs), or the like, or a combination of such devices.
  • the memory 720 is or includes the main memory of the node 700.
  • the memory 720 represents any form of random access memory (RAM), read-only memory (ROM), flash memory, or the like, or a combination of such devices.
  • the memory 720 may contain a code 770 containing instructions according to the techniques disclosed herein .
  • the network adapter 740 provides the node 700 with the ability to communicate with remote devices, over a network and may be, for example, an Ethernet adapter or Fibre Channel adapter.
  • the network adapter 740 may also provide the node 700 with the abi lity to communicate with other nodes within the cluster.
  • a node may use more than one network adapter to deal with the communications within and outside of the cluster separately.
  • the storage adapter 750 allows the node 700 to access a persistent storage, and may be, for example, a Fibre Channel adapter or SCS I adapter.
  • the code 770 stored in memory 720 may be im plemented as software and/or firmware to program the processor(s) 71 0 to carry out actions described above .
  • such software or firmware may be initial ly provided to the node 700 by downloading it from a remote system th rough the node 700 (e.g . , via network adapter 740).
  • programmable circuitry e.g . , one or more microprocessors
  • Special-pu rpose hardwired ci rcuitry may be in the form of, for example , one or more application-specific integrated circuits (AS ICs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), etc.
  • AS ICs application-specific integrated circuits
  • PLDs programmable logic devices
  • FPGAs field-programmable gate arrays
  • Machine-readable storage medium includes any mechanism that can store information in a form accessi ble by a machine (a machine may be, for example, a computer, network device, cellular phone, personal digital assistant (PDA), man ufacturing tool , any device with one or more
  • a machine-accessible storage medium includes recordable/non-recordable media (e.g . , read-only memory (ROM ); random access memory (RAM); magnetic disk storage media ; optical storage media; flash memory devices; etc. ), etc.
  • recordable/non-recordable media e.g . , read-only memory (ROM ); random access memory (RAM); magnetic disk storage media ; optical storage media; flash memory devices; etc.
  • logic can incl ude, for example, programmable ci rcuitry program med with specific software and/or firmware, special-purpose hardwi red circu itry, or a combination thereof.
  • logic can incl ude, for example, programmable ci rcuitry program med with specific software and/or firmware, special-purpose hardwi red circu itry, or a combination thereof.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Computational Linguistics (AREA)
  • Fuzzy Systems (AREA)
  • Mathematical Physics (AREA)
  • Probability & Statistics with Applications (AREA)
  • Software Systems (AREA)
  • Computing Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Multi Processors (AREA)

Abstract

Techniques for a system capable of performing low latency database query processing are disclosed herein. The system includes a gateway server and a plurality of worker nodes. The gateway server is configured to divide a database query, for a database containing data stored in a distributed storage cluster having a plurality of data nodes, into a plurality of partial queries and construct a query result based on a plurality of intermediate results. Each worker node of the plurality of worker nodes is configured to process a respective partial query of the plurality of partial queries by scanning data related to the respective partial query that stored on at least one data node of the distributed storage cluster and generate an intermediate result of the plurality of intermediate results that is stored in a memory of that worker node.

Description

SYSTEM AN D METHOD FOR DISTRIBUTED DATABASE
QU ERY ENGI NES
CROSS-REFERENCE TO RELATED APPLICATION
[0001 ] This application claims priority to U.S. Patent Application No. 13/735,820 filed 7 January 2013, which is hereby incorporated by reference in its entirety.
[0002] This application claims priority to European Patent Application No. 13198563.2 filed 19 December 2013, which is hereby incorporated by reference in its entirety. FIE LD OF THE INVENTION
[0003] This invention relates generally to databases, and in particular to a distributed database query engine for low query latency database analyses. BACKGROU N D
[0004] Developments in computer and networking technology have given rise to applications that requ ire massive amounts of data storage. For example, tens of millions of users can create web pages and u pload images and text to a social media website. Consequently, a social media website can accumulate massive amounts of data each day and therefore need a highly scalable system for storing and processing data. Various tools exist to facil itate such mass data storage.
Frameworks exist that support large-scale data-intensive distributed applications, by enabling applications to interact with a cluster of
thousands of computers (also referred to as nodes) and petabytes of data. For instance, a framework called Hadoop util izes a distributed , scalable, portable fi le system , called Hadoop Distributed File System (H DFS), to distribute a massive amount of data among data nodes (also referred to as slave nodes) in a Hadoop cluster. I n order to reduce the adverse impact of a data node power outage or network failure (including switch failu re), data in an H DFS is typically replicated on different data nodes. [0005] Hive, an open source data warehouse system , was developed to run on top of Hadoop clusters. Hive su pports data queries expressed in a scripted query language (SQL)-like declarative language called HiveQL. The H ive system then compiles the queries expressed in HiveQL into map-reduce jobs that can be executed on the Hadoop cluster, in a mathematical form of directed acyclic graph . The HiveQL language includes a type system that supports tables containing primitive types, col lections such as arrays and maps, and nested compositions of types. I n addition , the Hive system includes a system catalog , called
H ive-Metastore, containing schemes and statistics, which is useful in data exploration and query optimization .
[0006] Coupled with the Hadoop cluster, the H ive system can store and analyze large amounts of data for a social networking system . For example, the H ive system can analyze the degree of connection between users to rank stories that users follow on the social networking system . The H ive system can analyze activity logs to gain insights into how services of the social networking system are bei ng used to help application developers, page administrators and advertisers make development and business decisions. The H ive system can run complex data mining programs to optim ize the advertisements shown to the users of the social networking system . The H ive system can further analyze the usage logs to identify spam and abuse of the social networki ng system .
[0007] The H ive system incl udes web-based tools for people without programm ing ability to author and execute H ive queries, for authori ng , debugging and scheduling complex data pipelines, and for generating reports based on data stored in the H ive system and other relational databases like MySQL and Oracle.
[0008] However, query latency for the H ive system is usually h igh . Due to the large amou nt of data and the map-reduce scheme of the Hadoop cluster, even a simplest query can take from several seconds to minutes to complete. This is particular a problem for interactive analyses when an operator needs the result of the current query to decide the next query of a series of queries. The latency problem significantly affects the productivity of the analysts since the analysts cannot determine the next query when waiting for the result of the current query.
[0009] One possible workaround solution is to create data pipelines that load aggregate data from Hive into other type of relational database management system (RDB MS) such as MySQL and Oracle. Then the operator performs interactive analysis and bui lds reports using these RDB MS . However, each RDB MS needs a separate data pipeline. It also takes time for the data pipeline to transfer the aggregate data from H ive to other RDBMS. Thus, this workaround process is sti ll cumbersome and inconvenient.
SU MMARY
[001 0] The technology introduced here provides the benefits of low-latency queries on a very large amount of data stored in a large scale storage cluster (e.g. a Hadoop cluster), which stores metadata in a system catalog (e.g . Hive Metastore). I n particular, the technology introduced here incl udes a distributed query engi ne based on a servi ng tree
computation framework. The distributed query engine includes a gateway server and a plural ity of work nodes. The gateway server divides a query task into partial tasks. Each worker node of the engine handles a partial task to generate an intermediate query result in memory. The intermediate query result can be an approximate intermediate result generated by scanning a portion of the related data. The gateway server receives the intermediate query results and constructs a query result for the query task based on the intermediate query results.
[001 1 ] I n accordance with the techniques i ntroduced here, therefore, a system for processing a database query for a database is provided . The system includes a gateway server and a plu rality of worker nodes. The gateway server is configured to divide the database query, for the database containing data stored in a distributed storage cluster havi ng a plurality of data nodes, into a plurality of partial queries and construct a query result based on a plurality of intermediate results. Each worker node of the plurality of worker nodes is configured to process a respective partial query of the plurality of partial queries by scanning data related to the respective partial query that stored on at least one data node of the distributed storage cluster and generate an intermediate result of the plurality of i ntermediate results that is stored in a memory of that worker node.
[0012] The techniques introduced here are capable of performing low-latency query processing on a large aggregate of data stored in a large scale storage cluster such as a Hadoop cluster. Th is is particularly beneficial for interactive analyses since operators do not need to wait for the cu rrent query to complete to determine the next query. This distributed query system can further generate approximate results by scanning a portion of the related data. Operators of the system can receive rapid prototyping of a series of queries to test the valid ity of the series the queries, before processing the series of queries on the whole set of the related data.
[001 3] Embodiments according to the invention are in particular disclosed in the attached claims di rected to a system, a storage medium and a method, wherein any feature mentioned in one claim category, e .g. system , can be claimed in another claim category, e.g . method , as well .
[0014] I n an embodiment of the invention , a system comprises:
a gateway server configured to generate a pl urality of partial queries from a database query for a database containing data stored in a distributed storage cluster that has a plurality of data nodes, and to construct a query result based on a plural ity of intermediate results; and a plural ity of worker nodes, wherein each worker node of the plurality of worker nodes is configured to process a respective partial query of the plurality of partial queries by scanning data related to the respective partial query and stored on at least one data node of the distributed storage cluster, and wherein each worker node of the pl urality of worker nodes is further configured to generate an intermediate resu lt of the plu rality of intermediate results that is stored in a memory of that worker node. [001 5] Each worker node of the plurality of worker nodes can be further configured to process the respective partial query of the plu rality of partial queries by scanni ng a portion of the data related to the respective partial query that is stored on the at least one data node of the distributed storage cluster and to generate an approximate intermediate result that is stored in the memory of that worker node.
[001 6] The gateway server can be further configured to construct an approximate query result based on at least one approximate intermed iate result.
[001 7] The gateway server can also further be configured to construct an approximate query result based on a portion of the plurality of intermediate results.
[001 8] The gateway server can even further be configured to identify a straggling worker node, further d ivide a partial query that is assigned to the straggl ing worker node i nto a plu rality of subordinate partial queries, and assign the plurality of subordinate partial queries to some of the plurality of worker nodes, wherein the straggling worker node is a worker node that either fails to report a rate of progress to the gateway server or reports the rate of progress below a predetermined val ue after a
predetermined time period to the gateway server.
[001 9] Each worker node of the plurality of the worker nodes can be a service running a respective data node within the distributed storage cluster.
[0020] The system further can com prise:
a metadata cache configured to cache table level metadata of the database and fi le level metadata of the distributed storage cluster.
[0021 ] The metadata cache can be configured to retain cached metadata from a previous database query for the database query.
[0022] Each worker node of the plurality of the worker nodes can periodical ly send heartbeat messages to the gateway server to report status of a partial query processing by that worker node. [0023] The gateway server can further be configured to receive an instruction from a client device to retu rn an approximate query result or terminate a processing of the database query.
[0024] The gateway server can also further be configured to instruct the worker nodes to immed iately return approxi mate intermediate results, and to return an approximate query result based on the approximate
intermediate results to a client device.
[0025] The database query can include a request for an approximate query result.
[0026] The query result can be accompanied by an indication of a portion of related data stored in the data nodes that has been scanned for the query result.
[0027] The database can be a Hive data warehouse system and the distributed storage cluster is a Hadoop cl uster.
[0028] I n a further embodiment of the invention , a method uses a system according to the invention or any of the above mentioned em bodiments.
[0029] I n a further embodiment of the invention a method comprises:
receiving from a client device a database query for a database containing data stored in a distributed storage cluster that has a plurality of data nodes;
dividing the database query into a plurality of partial queries; sending each of the partial queries to a respective worker node of a plural ity of worker nodes, wherein each worker node is a service runn ing on a data node of the distributed storage cluster;
retrieving a plu rality of intermediate resu lts for the partial queries from the worker nodes, wherein each intermediate resu lt is processed by a respective worker node of the worker nodes by scanning related data stored in a data node on which the perspective worker node ru ns; and
generating a query result based on the plurality of intermediate results.
[0030] The method further can comprise: returning the query result along with a portion indicator to the client device, wherein the portion indicator indicates the portion of related data stored in the data nodes that has been scanned for the query result.
[0031 ] The method also further can comprise :
instructing the worker nodes to im mediately return approximate query results;
and wherein the step of retrieving comprises:
retrieving a plurality of approximate intermediate results for the partial queries from the worker nodes, wherein each approxi mate
intermediate result is processed by a respective worker node of the worker nodes by scanning a portion of related data stored in a data node on which the perspective worker node runs.
[0032] The method may further comprise:
for each partial query, retrievi ng metadata regarding which data node stores data related to the partial query;
and the step of sending comprises:
sending each of the partial queries to a respective worker node of a plural ity of worker nodes based on the metadata.
[0033] I n a further embodiment of the invention , which can be claimed as well , a method comprises:
receiving a database query from a client device , for a database containing data stored in a distributed storage cluster havi ng a plural ity of data nodes;
dividing the database query into a plurality of partial queries; sending each of the partial queries to a respective worker node of a plural ity of worker nodes, wherein each worker node is a service runn ing on a data node of the distributed storage cluster;
identifying a straggling worker node, dividing a partial query that is assigned to the straggling worker node into a plurality of su bordinate partial queries, and assigning the plural ity of subord inate partial queries to some of the plurality of worker nodes;
retrieving a plurality of intermediate resu lts for the partial queries from the worker nodes, wherein each intermediate result is processed by a respective worker node of the worker nodes by scanning related data stored in a data node on which the perspective worker node ru ns; and
generating a query result based on the plurality of intermediate results.
[0034] The step of identifying can comprise :
identifying a straggling worker node by monitoring heartbeat messages that the worker nodes periodically send , wherein the straggli ng worker node is identified when heartbeat messages from the straggling worker node are not received for a predetermined ti me period , or when a heartbeat message from the straggling worker node is received and the heartbeat message includ ing a number representing a status of a partial query processing by the straggli ng worker node that is below a threshold value.
[0035] I n a further embodiment of the invention , which can be claimed as well , one or more computer-readable non-transitory storage media embody software that is operable when executed to perform in a system according to the invention or any of the above mentioned em bodiments.
[0036] Other aspects of the technology introduced here will be apparent from the accompanyi ng figures and from the detailed description, which follows.
BRIEF DESCRIPTION OF THE DRAWI NGS
[0037] These and other objects, features and characteristics of the present invention wil l become more apparent to those ski lled in the art from a study of the following detailed description in conjunction with the appended claims and drawings, all of wh ich form a part of this
specification . I n the drawings:
FIG . 1 illustrates an example of a Hadoop cluster upon which a distributed query engine can be built.
FIG . 2 illustrates an example of a Hadoop cluster having a
JobTracker managing a MapReduce task. FIG . 3 ill ustrates relationships among a distributed query engine, a Hadoop Distributed File System (H DFS), a H ive data warehouse and a storage cluster.
FIG . 4 illustrates a h igh level block diagram of an example distributed query engine.
FIG . 5 ill ustrates a sample process for identifyi ng straggling worker nodes and further dividing the partial queries.
FIG . 6 ill ustrates a sample process for approximate processing of a database query.
F IG . 7 is a high-level block diagram showi ng an example of the architecture of a computer node, wh ich may represent any cluster node described herein .
DETAI LED DESCRIPTION
[0038] References in th is description to "an embodiment", "one embodiment", or the like, mean that the particular feature, function, or characteristic being described is included in at least one embodiment of the present invention . Occurrences of such phrases in this description do not necessarily al l refer to the same embodiment, nor are they necessari ly mutual ly exclusive.
[0039] Modern social networking systems can accumulate massive amou nts of data each day and therefore need a highly scalable system for storing and analyzi ng data. Particularly, efficient interactive analyses on the massive amount of data need a low-latency fast-responding way of processing data queries. The present invention discloses a distributed query engine enabled by com bin ing an in-memory serving-tree based computation framework with approximate query processing . The
distributed query engine d ivides a query task into m ultiple partial tasks and distributes the partial tasks to worker nodes for further i n-memory processing. The distributed query engi ne is capable of generating an approximate result at any time during the query processing , by requesting approximate intermediate results from the worker nodes based on the scanned portion of the data. U nlike the map-reduce scheme of the conventional Hadoop clusters, the worker nodes process the partial tasks and store the entire intermediate results in memory to reduce the
processing time and improve overal l latency. Only the intermed iate results, instead of the underlying date , are transferred for the construction of the result, significantly reducing the amount of transferred data and the transferring time.
[0040] I n one embodiment, the d istributed query engine can be built on top of a Hadoop cluster runn ing Hadoop Distributed File System (H DFS), H ive data warehouse, and H ive-Metastore. The distributed query engine can be com patible with H ive's data formats and metadata, and support a subset of HiveQL language. Operators using the distributed query engine can efficiently discover statistics patterns in the data managed by the H ive data warehouse. The distri buted query engine can conduct quick analyses and rapid prototyping of a series of queries by generating approximate results. In addition , the distributed query engine can run fu ll analyses by scanning the entire related data aggregate.
[0041 ] FIG . 1 illustrates an example of a Hadoop cluster that a
distributed query engine can be built upon . I n Figure 1 , the Hadoop cluster 1 00 includes a metadata node 1 1 0A and a plu rality of data nodes 1 1 0B, 1 1 0C and 1 1 0D. The nodes can communicate with each other through an interconnect 1 20. The interconnect 1 20 may be , for example, a local area network (LAN ), wide area network (WAN), metropolitan area network (MAN ), global area network such as the I nternet, a Fibre Channel fabric, or any combination of such interconnects. I n some em bodiments, the interconnect 1 20 can include a network switch for processing and routing data between the nodes under network protocols, incl udi ng TCP/I P.
Clients 1 30A and 1 30 B may comm unicate with the Hadoop cluster 1 00 via a network 1 40, which can be, for exam ple, the I nternet, a LAN , or any other type of network or combination of networks. Each of the clients may be, for example, a conventional personal com puter (PC), server-class computer, workstation , handheld computing/communication device, or the like. In some embodiments, the Hadoop cluster is implemented using one or more racks of commod ity-class servers. [0042] Files and data are stored in a distributed manner across the nodes in the Hadoop cluster 100 in a Hadoop Distributed File System (HDFS). To the clients of the cluster 100, including clients 130A and 130B, the HDFS serves the functions of a conventional hierarchical file system. Files and data blocks of files can be created, deleted, or moved in the HDFS. There is a NameNode service 150 running on the metadata node 110A to provide metadata services within HDFS, including
maintaining the file system namespace and controlling access by external clients. The NameNode service can store the file system index, including the mapping of blocks to files and file system properties, in a file 160 called Fslmage in the metadata node. In some embodiments, there may be a secondary metadata node running a secondary NameNode service. The secondary metadata node serves as a backup in case the metadata node fails.
[0043] Each data node 110 is responsible for storing files for the HDFS. Files stored in the HDFS are divided into subsets, referred to herein as "blocks". In one embodiment, the size of a block is 64 MBs. The blocks are typically replicated to multiple data nodes. Therefore, the HDFS in the Hadoop cluster 100 can, but does not necessarily, use a conventional RAID architecture to achieve data reliability. File operations are controlled by the NameNode service 150 running on the metadata node 110A. In some embodiments, data nodes 110B, 110C, 110D are organized into racks where all nodes are connected via a network switch. The network speed between nodes within a rack can be faster than the network speed between nodes in different racks. The Hadoop cluster may take that fact into account when assigning tasks. A DataNode service 170 runs on each data node for responding read and write requests for blocks. The
DataNode services 170 also respond to requests from the metadata node for creating, deleting and replicating blocks.
[0044] In some embodiments, the data nodes 110B, 110C, 110D send periodic heartbeat messages including block reports to the metadata node 110A. The metadata node 110A validates its block mapping and other file system metadata using the periodic block reports. [0045] When a client 1 30A or 1 30B seeks to write a file to the Hadoop cluster 1 00, the client sends a file creation request to the metadata node 1 1 0A. The metadata node 1 1 0A responds to the client with the identity of one or more assigned data node(s) and the destination locations of the blocks of the files. The client sends data blocks of the fi le to the assigned data node(s); and the cluster can repl icate the data blocks on one or more data nodes. Once all blocks are sent, the metadata node records the file creation i n its metadata, including the Fsl mage file.
[0046] A Hadoop cluster works as a parallel data processing engine based on a framework called MapReduce. The Hadoop cluster includes a JobTracker to implement the MapReduce fu nction . As il lustrated in FIG . 2, a JobTracker can be i mplemented as a dedicated server (JobTracker node 21 0A) within a Hadoop cluster 200. The Hadoop cluster 200 includes two racks 242 and 244 interconnected via a switch 226. Rack 242 includes JobTracker node 21 0A, metadata node 21 0B, data nodes 21 0C-21 0D and a switch 222 to interconnect the nodes within rack 242. Rack 244 includes data nodes 21 0E-21 0H and a switch 224 to interconnect the nodes within rack 242. In some other embodiments, a JobTracker can be im plemented as a service that shares the same metadata node with a NameNode service. The metadata node 21 0B (also referred to as name node) runs the NameNode service to track where across the cluster the data is kept. The JobTracker node 21 0A, which is dedicated to control MapReduce jobs, receives a request from a client 230 to launch a MapReduce job. Once the MapReduce job (also referred to as a MapReduce appl ication or a
MapReduce task) is subm itted to the JobTracker 21 OA, JobTracker 21 OA identifies input and output files and/or directories in the H DFS for the job . The input file for the MapReduce task can incl ude a plurality of in put file blocks that contain in put data for the MapReduce task. The JobTracker 21 0A uses knowledge of the i nput file blocks (including physical quantity of blocks and where the blocks are located) to decide how many subordinate tasks wil l be created . The MapReduce application is copied to every processi ng node where the input file blocks are present. For each assigned processing node , JobTracker 21 OA creates at least one subordinate task. On each assigned processing node, a TaskTracker service mon itors the status of the su bordinate task on that node and reports the status and intermediate output back to the JobTracker. The Hadoop cluster 200 distributes the subordinate tasks based on the knowledge of the fi le blocks. Therefore, instead of moving storage to the processing locations, a Hadoop cluster moves the processi ng tasks to the storage locations.
[0047] Although the nodes 21 0A-21 0H are il lustrated as single units in F IG . 2, each node can have a distributed architecture. For example, a node can be designed as a combination of multiple computers, which may be physically separate from each other and which may communicate with each other over a physical interconnect. Such an architecture allows convenient scal ing , such as by deploying computers capable of
communicating with each other through the interconnect.
[0048] I n one embodiment, a distributed query engi ne is built on top of a Hadoop cluster running Hadoop Distributed File System (H DFS) and H ive data warehouse. FIG . 3 illustrates the relationships among the distri buted query engine 300, the Hive data warehouse, the H DFS and the storage cluster. The distributed query engine 300 is bui lt on top of the H ive data warehouse and the H DFS, which in turn rely on the storage cluster to operate. A Hadoop cluster 31 0 including a plu rality of nodes 31 2 that are responsible for storing the massive amount of data. The Hadoop cl uster 31 0 further includes a metadata node 31 4. A Hadoop Distributed File System (H DFS) 320 is running on the Hadoop cluster 31 0 to distribute and manage the data among the nodes 31 2. Data Node services 322 are running on the nodes 31 2 to manage the local data store in the nodes 31 2. Data and files are split into blocks that are stored in the nodes 31 2 of the Hadoop cluster 31 0. A NameNode service 324 is running on the metadata node 31 4 to provide metadata services within the Hadoop cluster, including maintaining the file system namespace and controlling access by external clients.
[0049] A H ive data warehouse system 330 is built on top of the Hadoop cluster 31 0 and the H DFS 320. The H ive data warehouse system 330 works as a database interface. The H ive data warehouse system 330 supports data queries expressed in an SQL-like declarative language, H iveQL. Instead of relying on the map-reduce scheme of the Hadoop cluster to process the database queries for the Hive system , the
discontinued query engine includes a plurality of worker nodes 342 to process the database queries in a parallel fashion . The distributed query engine 300 further includes a gateway 348. I n one embodiment, the worker nodes 342 are im plemented as services running on the nodes 312 of the Hadoop cluster 31 0. In another em bodiment, the worker nodes 342 are implemented as dedicated servers interconnected with the nodes 31 2 of the Hadoop cluster 31 0.
[0050] I n some embodiments, the worker nodes 342 are responsible to compi le the partial tasks expressed in HiveQL into instructions that the DataNode services 322 of the H DFS 320 can execute.
[0051 ] The distributed query engi ne receives a query task from a client and splits the query task into multiple partial tasks. F IG . 4 i llustrates a high level block diagram of an example distributed query engine 400.
Operators of the distributed query engine 400 can provide query task via input interface 486 of a cl ient 480. I n one embodiment, the input interface 486 includes both command line interface 482 and graph ic interface 484. Using the command line interface 482, an operator can provide the query task as a program directly expressed i n a database query language, such as SQL or H iveQL. By using the graphic interface 484, an operator can provide the query task by working with the graphic interface elements of 484. I n one embodiment, the graphic interface 484 is implemented as an input web page . An operator can provide the query task by interacting with elements on the input web page, selecting options, and entering input data. The graphic interface 484 can translates the operator's selections and in puts into a correspondi ng program expressed in a database query language . The input interface 486 transmits the program , received from either the command li ne interface 482 or graphic i nterface 484, to a gateway 41 0 of the distributed query engine 400 as the query task. [0052] The gateway 41 0 receives the query task from the client 480 and parses the query task. The gateway 41 0 sends an inqui ry to the H ive Metastore 440 based on the query task. The Hive Metastore 440 returns table metadata and H DFS file identifications to the gateway 41 0 for the data upon which the query task needs to run . Then the gateway 41 0 retrieves the locations of the corresponding H DFS blocks from the H DFS Name Node 460 based on the H DFS file identifications.
[0053] I n one embodiment, the gateway 41 0 divides the query task into a plurality of partial queries based on the corresponding H DFS blocks. The gateway 41 0 assigns each individual partial query to be executed on one H DFS block within the correspondi ng H DFS blocks. I n other embodiments, the gateway 41 0 can divide the query task i nto partial queries in other ways, as may be contemplated by a person of ordinary skill in the art.
[0054] The gateway 41 0 sends each of the partial queries to a worker 41 2 for local processing. I n one embodiment, workers 41 2 are overlaid on the Hadoop cluster that stores the H ive table data. Each work 41 2 runs as a service on a Hadoop cluster node 432. The partial queries are
generated such that each worker 41 2 is responsible for a partial query to process data store on the node 432 which that particular worker 41 2 runs. The worker 41 2 directly contacts a DataNode service 422 which runs on the same cluster node 432 as the worker 41 2. The worker 41 2 is able to ach ieve low-latency data reads for the partial query by requesting data within a single cluster node 432.
[0055] The cluster node 432 can use remote procedure cal l (RPC) frameworks to facilitate the implementation of the services. For example, in one embodiment, the cluster node 432 use an RPC framework such as
Apache Th rift framework to define and create the worker service 41 2 as a highly scalable and high performance server service.
[0056] I n one embodiment, the worker nodes 342 are implemented as services running on the nodes 31 2 of the Hadoop cluster 31 0. I n another embodiment, the worker nodes 342 are implemented as dedicated servers interconnected with the nodes 31 2 of the Hadoop cluster 31 0. [0057] The workers 41 2 periodically retu rn status updates (referred to as "heartbeats") to the gateway 41 0 indicating the process of the partial query processing. I n one embodiment, if there is an assigned worker which stops returni ng heartbeats or shows no progress, the gateway 41 0 determ ines that the worker has failed and reschedules the partial query to another worker. Each worker 41 2 scans data related to the respective partial query that stored on one or more cluster nodes 432, and generates an
intermediate result for the partial query. I n one embodiment, the worker 41 2 processes the partial query entirely in the memory of the cluster node on which the worker 41 2 runs. The worker 41 2 stores the intermediate result in its memory. At the end of the processing of the partial query, the worker 41 2 sends the intermediate result to the gateway 41 0. I n some embodiments, the worker 412 sends the i ntermediate result via RPC cal ls such as Apache Thrift calls.
[0058] The gateway 41 0 receives all intermed iate results from the workers 41 2 and combines the intermediate results into a query result as an answer for the query task. Then the gateway 41 0 returns the query result to the client 480. I n one embodiment, the cl ient 480 optional ly displays the query result on a display component.
[0059] A MetaCache 41 4 runs on the gateway 41 0 to cache both the H ive table-level and the H DFS file-level metadata to decrease query latency. I n some embod iments, the MetaCache 41 4 can be implemented as a standalone server interconnected with the gateway 41 0. The
MetaCache 41 4 can keep the cached data from previous queries. For example, when an operator is interactively analyzi ng on data of a H ive table, the operator ru ns mu ltiple consecutive queries on the same Hive table. By preserving the cached data from previous queries, the
MetaCache 41 4 can reuse the cached metadata instead of fetching the metadata repetitively from the Hive Metastore 440 and the H DFS
NameNode 460.
[0060] The MetaCache 41 4 has high cache hit rates because data in a typical Hive table is written once and read many times without further changes. I n one embodiment, the MetaCache 41 4 can retrieve a real-time feed of audit logs of the H ive system to invalidate entries in the cached data for partitions in the H ive system that may have been changed by H ive queries or other operations. I n another embodiment, the MetaCache 414 automatically pu rges entries in the cached data that have not been queried for a predeterm ined time period (e.g . one hour). I n doing so, the
MetaCache 41 4 prevents arbitrary growth in memory usage and mi nim izes cache errors.
[0061 ] The workload of each cluster node 432 on wh ich a worker 41 2 runs can be different. Cluster nodes 432 and worker services 41 2 can also fail for various reasons. While the gateway 41 0 can receive intermediate results from a majority of workers 41 2 in a reasonable time period , there are workers 41 2 that fail to deliver the intermediate result due to the node or service failures or delays. These workers either report rates of progress below a predetermined percentage after a predetermined time period since the partial queries distribution , or si mply fail to respond the progress to the gateway 41 0. These workers are identified as straggling workers. Once the gateway 41 0 identifies the straggling workers, the gateway 41 0 sends messages to the straggling workers to cancel assignment of the partial queries. For each unfinished partial query for wh ich straggling workers failed to deliver the intermediate results, the gateway 41 0 further divides the partial query i nto a plurality of subordinate partial queries, and assigns the subordinate partial queries to some of the workers 41 2. I n one embodiment, the gateway 41 0 determines the assignment of the
subord inate partial queries based on the current workload of the workers 41 2. I n other embodiments, the gateway 41 0 can determine the
assignment in other ways, as may be contemplated by a person of ordinary ski ll in the art. Th is add itional parallelized process speeds up the retries of the unfinished partial queries and thus decreases the query latency caused by straggling workers.
[0062] FIG . 5 illustrates a sample process for identifying straggl ing worker nodes and further d ividing the partial queries. At step 502, a gateway of the distributed query engine receives a database query from a client device, for a database containing data stored in a distributed storage cluster which has a plurality of data nodes. At step 504, the gateway divides the database query into a plurality of partial queries. Then at step 506, the gateway sends each of the partial queries to a respective worker node of a plurality of worker nodes. Each worker node can be a service running on a data node of the distributed storage cluster.
[0063] At step 508, the gateway server identifies a straggling worker node. The gateway further divides a partial query that is assigned to the straggling worker node into a plurality of subordi nate partial queries, and assigns the plurality of subordi nate partial queries to some of the plurality of worker nodes. I n one embodiment, the gateway identifies a straggling worker node by monitoring heartbeat messages that the worker nodes periodically sends. The straggling worker node is identified when
heartbeat messages from the straggling worker node are not received for a predetermined time period . I n another embodi ment, the straggling worker node is identified when a heartbeat message from the straggling worker node is received; where the heartbeat message includes a number representing the status of a partial query processing by the straggling worker node that is below a threshold value.
[0064] At step 51 0, the gateway retrieves a plurality of intermediate results for the partial queries from the worker nodes. Each intermediate result is processed by a respective worker node of the worker nodes by scanning related data stored in a data node on wh ich the perspective worker node runs. At step 51 2, the gateway generates a query result based on the plurality of intermed iate resu lts.
[0065] I n one embodiment, the distributed query engine can be
compatible with H ive system's data formats and metadata , and can support a subset or an entire set of HiveQL language. And H iveQL is a declarative language similar to SQL. H iveQL does not need to strictly follow the standard of SQL, and offers extensions not originally specified in SQL. For example, the distri buted query engi ne can support filters, aggregates, top-k, percentiles, sub-queries in FROM clauses, U N ION ALL and user-defined functions. [0066] I n one embodiment, the distributed query engine support
TABLESAM PLE clause can be used to explicitly lim it the amount of input data that is scanned . I n another embodiment, the distributed query engine support W ITH clause allows operators to write more readable queries by declaring variables for complex expressions that are used multiple times in the same query. The W ITH clause can also provide a way for the operator to specify hints to the optim izer such that it eval uates common
sub-expressions only once during run time.
[0067] I n some embodiments, the distributed query engine can supply an approximate query resu lt before the entire query processing is finished . The distributed query engine can automatically supply the approximate query result after a predetermined time period since the initial query in put, or when the processing of the query satisfies a predetermined condition (e.g . a certain number of workers fail). The distributed query engine can also supply the approximate query result i n response to an operator instruction . For example, an operator waiti ng for the query result can input Ctrl-C to instruct the d istributed query engine to stop the query processing. U pon receiving the instruction , the distributed query engi ne stops the query processing and returns an approximate query result. In one embodiment, the distributed query engine further supplies a percentage indicator to indicate the percentage of data scanned for the approximate query result. I n one em bodiment, the distributed query engine returns the approximate query resu lt and continues the query processing for an exact query result (i .e. with a percentage indicator of 1 00%).
[0068] Particularly for queries to explore data instead of write or change data, approximate query results can be sufficient for the operator's analysis. Run time errors l ike node fai lures, corrupted input data, or even a user kill ing their queries can be treated as situations where all input data was not scanned . When there is a failure, the distributed query engine can instantly retu rn an approximate query result based on the processi ng of the partial queries so far, instead of simply returni ng an error message. In one embodiment, the distributed query engine returns the approximate query result along with a percentage ind icator. [0069] I n another embodiment, an operator can also specify in his query task that an exact query result is required . I n these cases, a run ti me error can be returned if the query processing fails.
[0070] The distributed query engine uses one-pass algorithms for aggregations and stores all intermediate results in memory. The sizes of the intermediate results and the final query result can be relatively small . The distributed query engine's ability of returning an approximate query result can further reduces the size. For example, if the query is to sort data records by a specified column (e.g . ORDER BY clause), the
distributed query engine can generate approximate answer by letting workers only scan a portion of the related data records. Simi larly, the distributed query engine can also generate approximate answers for types of queries such as counting distinct entries and calculating percentile.
[0071 ] For example, in one em bod iment, an operator of the distributed query engine can i nput a query task instructi ng a count of the number of distinct values of a country colum n from a specific set of data records. The distributed query engine receives the query, divides the query i nto partial queries, and assigns workers to process these partial queries. After 20 seconds from the time the distributed query engine starts the task, the operator terminates the task by pressing CTRL-C on a keyboard of a client device. Upon receiving the termi nation instruction , the d istributed query engine immediately instructs the assigned workers to return approximate intermediate results and in turn returns an approximate result by combining these approxi mate intermed iate resu lts. The approximate result is returned to a client device of the operator. The client device can further receive information about the total processing ti me , num ber of workers used , rows of the data records that have been scanned , amount of data scanned , amount of data to be scanned for exact result, percentage of data scanned, and/or number of fail ures.
[0072] I n another embod iment, the distributed query engine can automatically return an approximate query result after the number of failures exceeding a predetermined threshold value. I n yet another embodiment, the operator specifies in the query task that an exact result is requi red . The distributed query engine will keep processing u ntil all related data records are scanned by assigned workers. An exact query result can be returned to a user device of the operator. The client device can further receive information about the total processing time, number of workers used, rows of the data records that have been scanned , amount of data scanned, percentage of data scanned (i .e. 1 00%), and/or number of failures.
[0073] FIG . 6 ill ustrates a sample process for approximate processing of a database query. At step 602, a gateway of the distributed query engine receives a database query from a client device, for a database containi ng data stored i n a distributed storage cluster which has a plurality of data nodes. At step 604, the gateway divides the database query i nto a plurality of partial queries. Then at step 606, the gateway sends each of the partial queries to a respective worker node of a plurality of worker nodes. Each worker node can be a service running on a data node of the distributed storage cluster. At step 608, after send ing the partial queries, the gateway can instruct the worker nodes to immediately retu rn
approximate query resu lts. I n one embodiment, immediately returning approximate query results means returning the results within a very short time period such as one second . The instruction can be triggered by various events. For example, the gateway may receive an instruction from the client device to terminate the processing of the database query; or the gateway may decide to return an approximate query result automatically when an exact query resu lt is not available after a predeterm ined time period . Therefore, the approximate result can be requested manually by the client device, or automatically triggered by the distributed query engine without user intervention .
[0074] At step 61 0, after the instruction for approximate intermediate results, the gateway retrieves a plurality of approximate intermediate results for the partial queries from the worker nodes. Each approximate intermediate result is processed by a respective worker node of the worker nodes by scanning a portion of related data stored in a data node on which the perspective worker node runs. Upon receivi ng the approxi mate intermediate results, at step 61 2, the gateway generates an approximate query result based on a plu rality of approximate intermediate results.
Then at step 61 4, the gateway of the distributed query engine returns the approximate query result. I n one embodiment, the approximate query result is returned along with a percentage indicator to the client device. The percentage indicator suggests the percentage of related data stored in the data nodes that has been scanned for the query result.
[0075] I n addition to the above illustrated advantages, the techniques presented herein present additional advantages as discussed below.
[0076] The distributed query engine significantly reduces the latencies of queries on data stored in data storage clusters such as a Hadoop cluster, as compared to the query latencies by using a Hive system alone.
Operators or users of the distributed query engine can conduct ad hoc queries with smal l waiting time periods. The distributed query engine can be utilized in different situations. For example, without the distributed query engine, the operators or analysts need to explicitly load data from H ive into a database such as MySQL or Oracle and then fetch data from the database to drive web-based data analysis reports. Using the distributed query engine, the operators can fetch data directly from the H ive system to generate the web-based data analysis report.
[0077] I n one embodiment, when an operator is authori ng a query task usi ng, for example, the graph ic interface 484 shown in FIG . 4, the distributed query engine can fetch data samples to show the operator a preview of the data on the graphic interface 484. I n another em bod iment, the distributed query engine can index and pin popular data sets in memory to further improve query latencies.
[0078] The techniques presented herein provide a low latency
distributed query engine that can be built on top of a data storage cluster. The distributed query engine can be compatible with existing data and metadata of a H ive system . The distributed query engine can be used to drive data analysis reports without the need for pipelines that load data into other databases (e.g . MySQL or Oracle) for ad-hoc analysis. [0079] F IG . 7 is a high-level block diagram showi ng an example of the architectu re of a com puter node, which may represent any cluster node described herein. The node 700 includes one or more processors 71 0 and memory 720 coupled to an interconnect 730. The interconnect 730 shown in Figure 7 is an abstraction that represents any one or more separate physical buses, point to point connections, or both connected by
appropriate bridges, adapters, or controllers. The interconnect 730, therefore, may i nclude, for example, a system bus, a Peripheral
Component Interconnect (PCI ) bus or PC I-Express bus, a HyperTransport or industry standard architecture (ISA) bus, a small computer system interface (SCS I ) bus, a universal serial bus (USB), I IC (I2C) bus, or an I nstitute of Electrical and Electronics Engi neers (I EE E) standard 1 394 bus, also called "Firewire".
[0080] The processor(s) 71 0 is/are the central processing unit (CPU ) of the storage controller 700 and , thus, control the overal l operation of the node 700. I n certain embodiments, the processor(s) 71 0 accom plish this by executing software or firmware stored in memory 720. The processor(s) 71 0 may be, or may include, one or more programmable general-purpose or special-purpose microprocessors, digital signal processors (DSPs), programmable controllers, application specific integrated circuits (AS ICs), programmable logic devices (PLDs), trusted platform modules (TPMs), or the like, or a combination of such devices.
[0081 ] The memory 720 is or includes the main memory of the node 700. The memory 720 represents any form of random access memory (RAM), read-only memory (ROM), flash memory, or the like, or a combination of such devices. In use, the memory 720 may contain a code 770 containing instructions according to the techniques disclosed herein .
[0082] Also connected to the processor(s) 71 0 through the interconnect 730 are a network adapter 740 and a storage adapter 750. The network adapter 740 provides the node 700 with the ability to communicate with remote devices, over a network and may be, for example, an Ethernet adapter or Fibre Channel adapter. The network adapter 740 may also provide the node 700 with the abi lity to communicate with other nodes within the cluster. In some embodiments, a node may use more than one network adapter to deal with the communications within and outside of the cluster separately. The storage adapter 750 allows the node 700 to access a persistent storage, and may be, for example, a Fibre Channel adapter or SCS I adapter.
[0083] The code 770 stored in memory 720 may be im plemented as software and/or firmware to program the processor(s) 71 0 to carry out actions described above . I n certain embodiments, such software or firmware may be initial ly provided to the node 700 by downloading it from a remote system th rough the node 700 (e.g . , via network adapter 740).
[0084] The techniques introduced herein can be implemented by, for example, programmable circuitry (e.g . , one or more microprocessors) programmed with software and/or firmware, or entirely i n special-purpose hardwired circuitry, or in a combination of such forms. Special-pu rpose hardwired ci rcuitry may be in the form of, for example , one or more application-specific integrated circuits (AS ICs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), etc.
[0085] Software or firmware for use in i mplementing the techniques introduced here may be stored on a machi ne-readable storage medium and may be executed by one or more general-purpose or special-purpose programmable microprocessors. A "machine-readable storage medium", as the term is used herein , includes any mechanism that can store information in a form accessi ble by a machine (a machine may be, for example, a computer, network device, cellular phone, personal digital assistant (PDA), man ufacturing tool , any device with one or more
processors, etc. ). For example, a machine-accessible storage medium includes recordable/non-recordable media (e.g . , read-only memory (ROM ); random access memory (RAM); magnetic disk storage media ; optical storage media; flash memory devices; etc. ), etc.
[0086] The term "logic", as used herein , can incl ude, for example, programmable ci rcuitry program med with specific software and/or firmware, special-purpose hardwi red circu itry, or a combination thereof. [0087] I n addition to the above mentioned examples, various other modifications and alterations of the invention may be made without departing from the invention. Accordingly, the above disclosure is not to be considered as lim iting and the appended clai ms are to be interpreted as encompassing the true spirit and the entire scope of the invention .

Claims

1 . A system comprising :
a gateway server configured to generate a plu rality of partial queries from a database query for a database containi ng data stored in a distributed storage cluster that has a plurality of data nodes, and to construct a query result based on a plurality of intermediate results; and
a plurality of worker nodes, wherein each worker node of the plurality of worker nodes is configured to process a respective partial query of the plurality of partial queries by scanning data related to the respective partial query and stored on at least one data node of the distributed storage cluster, and wherein each worker node of the plurality of worker nodes is further configured to generate an intermediate result of the pl urality of intermediate resu lts that is stored in a memory of that worker node .
2. The system of claim 1 , wherein each worker node of the plurality of worker nodes is further configured to process the respective partial query of the plurality of partial queries by scanning a portion of the data related to the respective partial query that is stored on the at least one data node of the distributed storage cl uster and to generate an approximate intermediate result that is stored in the memory of that worker node;
wherein preferably the gateway server is fu rther configured to construct an approximate query result based on at least one approximate intermediate result.
3. The system of claim 1 or 2, wherein the gateway server is further configu red to construct an approximate query result based on a portion of the plu rality of intermediate results.
4. The system of any of claims 1 to 3, wherein the gateway server is further configured to identify a straggling worker node, further divide a partial query that is assigned to the straggling worker node into a plural ity of subordinate partial queries, and assign the plurality of subordinate partial queries to some of the plurality of worker nodes, wherei n the straggling worker node is a worker node that either fails to report a rate of progress to the gateway server or reports the rate of progress below a predetermined value after a predetermined time period to the gateway server.
5. The system of any of claims 1 to 4 , wherein each worker node of the plural ity of the worker nodes is a service running a respective data node with in the distributed storage cluster.
6. The system of any of claims 1 to 5 , further comprising:
a metadata cache configured to cache table level metadata of the database and file level metadata of the d istributed storage cluster; wherei n preferably the metadata cache is configured to retain cached metadata from a previous database query for the database query.
7. The system of any of claims 1 to 6 , wherein each worker node of the plurality of the worker nodes periodical ly sends heartbeat messages to the gateway server to report status of a partial query processing by that worker node.
8. The system of any of claims 1 to 7, wherein the gateway server is further configured to receive an instruction from a client device to return an approximate query result or term inate a processing of the database query.
9. The system of any of claims 1 to 8, wherein the gateway server is further configured to instruct the worker nodes to immediately return approximate intermediate results, and to return an approximate query result based on the approxi mate intermediate results to a client device.
1 0. The system of any of claims 1 to 9, wherein the database query
incl udes a request for an approxi mate query result.
1 1 . The system of any of claims 1 to 1 0, wherein the query result is
accompanied by an indication of a portion of related data stored in the data nodes that has been scanned for the query result.
1 2. The system of any of claims 1 to 1 1 , wherein the database is a Hive data warehouse system and the distributed storage cluster is a Hadoop cluster.
1 3. A method wherein a system according to any of the claims 1 to 1 2 is used .
1 4. A method comprising:
receiving from a client device a database query for a database containing data stored in a distributed storage cluster that has a plurality of data nodes;
dividing the database query into a plurality of partial queries;
sending each of the partial queries to a respective worker node of a plurality of worker nodes, wherein each worker node is a service running on a data node of the distributed storage cluster;
retrieving a plurality of intermediate results for the partial queries from the worker nodes, wherein each intermediate result is processed by a respective worker node of the worker nodes by scanning related data stored in a data node on which the perspective worker node runs; and
generating a query result based on the plurality of intermediate results.
15. The method of claim 14, further comprising:
returning the query result along with a portion indicator to the client device, wherein the portion indicator indicates the portion of related data stored in the data nodes that has been scanned for the query result.
1 6. The method of claim 1 4, further comprising :
instructing the worker nodes to immediately return approximate query results;
and wherein the step of retrieving comprises:
retrievi ng a plurality of approximate intermediate results for the partial queries from the worker nodes, wherein each approximate intermediate result is processed by a respective worker node of the worker nodes by scanni ng a portion of related data stored in a data node on which the perspective worker node runs.
1 7. The method of claim 1 4, further comprising:
for each partial query, retrieving metadata regarding which data node stores data related to the partial query;
and the step of sending comprises:
sending each of the partial queries to a respective worker node of a plural ity of worker nodes based on the metadata.
1 8. A method comprising :
receiving a database query from a cl ient device, for a database containing data stored in a distributed storage cl uster having a plural ity of data nodes;
dividing the database query into a plurality of partial queries;
sending each of the partial queries to a respective worker node of a plural ity of worker nodes, wherein each worker node is a service running on a data node of the distributed storage cluster; identifying a straggling worker node, dividing a partial query that is assigned to the straggling worker node into a plu rality of subordinate partial queries, and assigning the plurality of subordinate partial queries to some of the plural ity of worker nodes;
retrievi ng a plurality of intermediate results for the partial queries from the worker nodes, wherein each intermediate result is processed by a respective worker node of the worker nodes by scanni ng related data stored in a data node on which the perspective worker node runs; and
generating a query result based on the plurality of intermediate results.
The method of claim 1 8, wherein the step of identifying comprises: identifying a straggling worker node by mon itoring heartbeat messages that the worker nodes periodically send , wherein the straggling worker node is identified when heartbeat messages from the straggli ng worker node are not received for a predetermined time period , or when a heartbeat message from the straggling worker node is received and the heartbeat message including a number representing a status of a partial query processing by the straggling worker node that is below a th reshold value.
PCT/US2013/077240 2013-01-07 2013-12-20 System and method for distributed database query engines Ceased WO2014107359A1 (en)

Priority Applications (9)

Application Number Priority Date Filing Date Title
CA2896855A CA2896855C (en) 2013-01-07 2013-12-20 System and method for distributed database query engines
JP2015551711A JP6117378B2 (en) 2013-01-07 2013-12-20 System and method for a distributed database query engine
AU2013371448A AU2013371448B2 (en) 2013-01-07 2013-12-20 System and method for distributed database query engines
BR112015016352A BR112015016352A2 (en) 2013-01-07 2013-12-20 system and method for database distributed query engines
KR1020177024191A KR102037232B1 (en) 2013-01-07 2013-12-20 System and method for distributed database query engines
KR1020157020768A KR101775433B1 (en) 2013-01-07 2013-12-20 Sysyem and method for distributed database query engines
MX2015008799A MX349042B (en) 2013-01-07 2013-12-20 System and method for distributed database query engines.
CN201380069759.9A CN104903894B (en) 2013-01-07 2013-12-20 System and method for distributed database query engine
IL239717A IL239717A (en) 2013-01-07 2015-06-30 System and method for distributed database query engines

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
US13/735,820 2013-01-07
US13/735,820 US9081826B2 (en) 2013-01-07 2013-01-07 System and method for distributed database query engines
EP13198563.2 2013-12-19
EP13198563.2A EP2752779B1 (en) 2013-01-07 2013-12-19 System and method for distributed database query engines

Publications (1)

Publication Number Publication Date
WO2014107359A1 true WO2014107359A1 (en) 2014-07-10

Family

ID=49886706

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/US2013/077240 Ceased WO2014107359A1 (en) 2013-01-07 2013-12-20 System and method for distributed database query engines

Country Status (11)

Country Link
US (5) US9081826B2 (en)
EP (2) EP2752779B1 (en)
JP (1) JP6117378B2 (en)
KR (2) KR102037232B1 (en)
CN (2) CN110069526A (en)
AU (1) AU2013371448B2 (en)
BR (1) BR112015016352A2 (en)
CA (1) CA2896855C (en)
IL (1) IL239717A (en)
MX (1) MX349042B (en)
WO (1) WO2014107359A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016071837A (en) * 2014-09-30 2016-05-09 Kddi株式会社 Data virtualization device and large scale data processing program
JP2016159499A (en) * 2015-02-27 2016-09-05 京セラドキュメントソリューションズ株式会社 Function providing system and function relay program
US10698913B2 (en) 2013-01-07 2020-06-30 Facebook, Inc. System and methods for distributed database query engines

Families Citing this family (205)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9495381B2 (en) 2005-01-12 2016-11-15 Wandisco, Inc. Geographically-distributed file system using coordinated namespace replication over a wide area network
US9361311B2 (en) * 2005-01-12 2016-06-07 Wandisco, Inc. Distributed file system using consensus nodes
US9332069B2 (en) 2012-12-28 2016-05-03 Wandisco, Inc. Methods, devices and systems for initiating, forming and joining memberships in distributed computing systems
US9424272B2 (en) * 2005-01-12 2016-08-23 Wandisco, Inc. Distributed file system using consensus nodes
US9317572B2 (en) 2010-03-31 2016-04-19 Cloudera, Inc. Configuring a system to collect and aggregate datasets
US9081888B2 (en) 2010-03-31 2015-07-14 Cloudera, Inc. Collecting and aggregating log data with fault tolerance
US9082127B2 (en) 2010-03-31 2015-07-14 Cloudera, Inc. Collecting and aggregating datasets for analysis
US8874526B2 (en) 2010-03-31 2014-10-28 Cloudera, Inc. Dynamically processing an event using an extensible data model
US20120239681A1 (en) 2011-03-14 2012-09-20 Splunk Inc. Scalable interactive display of distributed data
US9128949B2 (en) 2012-01-18 2015-09-08 Cloudera, Inc. Memory allocation buffer for reduction of heap fragmentation
US9172608B2 (en) 2012-02-07 2015-10-27 Cloudera, Inc. Centralized configuration and monitoring of a distributed computing cluster
US9405692B2 (en) 2012-03-21 2016-08-02 Cloudera, Inc. Data processing performance enhancement in a distributed file system
US9338008B1 (en) 2012-04-02 2016-05-10 Cloudera, Inc. System and method for secure release of secret information over a network
US9842126B2 (en) 2012-04-20 2017-12-12 Cloudera, Inc. Automatic repair of corrupt HBases
US9607045B2 (en) 2012-07-12 2017-03-28 Microsoft Technology Licensing, Llc Progressive query computation using streaming architectures
US9264516B2 (en) 2012-12-28 2016-02-16 Wandisco, Inc. Methods, devices and systems enabling a secure and authorized induction of a node into a group of nodes in a distributed computing environment
US9454573B1 (en) 2013-02-25 2016-09-27 Emc Corporation Parallel processing database system with a shared metadata store
US9984083B1 (en) * 2013-02-25 2018-05-29 EMC IP Holding Company LLC Pluggable storage system for parallel query engines across non-native file systems
US9342557B2 (en) * 2013-03-13 2016-05-17 Cloudera, Inc. Low latency query engine for Apache Hadoop
US9292373B2 (en) 2013-03-15 2016-03-22 International Business Machines Corporation Query rewrites for data-intensive applications in presence of run-time errors
US9009215B2 (en) 2013-03-15 2015-04-14 Wandisco, Inc. Methods, devices and systems for dynamically managing memberships in replicated state machines within a distributed computing environment
US9448851B2 (en) * 2013-06-19 2016-09-20 International Business Machines Corporation Smarter big data processing using collaborative map reduce frameworks
US9442967B2 (en) * 2013-07-25 2016-09-13 Facebook, Inc. Systems and methods for efficient data ingestion and query processing
WO2015153045A1 (en) * 2014-03-31 2015-10-08 Wandisco, Inc. Geographically-distributed file system using coordinated namespace replication
US9477731B2 (en) * 2013-10-01 2016-10-25 Cloudera, Inc. Background format optimization for enhanced SQL-like queries in Hadoop
US9934382B2 (en) 2013-10-28 2018-04-03 Cloudera, Inc. Virtual machine image encryption
US10491663B1 (en) * 2013-10-28 2019-11-26 Amazon Technologies, Inc. Heterogeneous computations on homogeneous input data
US9690671B2 (en) 2013-11-01 2017-06-27 Cloudera, Inc. Manifest-based snapshots in distributed computing environments
US10628417B2 (en) * 2013-12-01 2020-04-21 Paraccel Llc Physical planning of database queries using partial solutions
US8874835B1 (en) 2014-01-16 2014-10-28 Pure Storage, Inc. Data placement based on data properties in a tiered storage device system
US10255320B1 (en) 2014-01-27 2019-04-09 Microstrategy Incorporated Search integration
US9952894B1 (en) 2014-01-27 2018-04-24 Microstrategy Incorporated Parallel query processing
US11386085B2 (en) 2014-01-27 2022-07-12 Microstrategy Incorporated Deriving metrics from queries
US11921715B2 (en) 2014-01-27 2024-03-05 Microstrategy Incorporated Search integration
US10095759B1 (en) 2014-01-27 2018-10-09 Microstrategy Incorporated Data engine integration and data refinement
US9715515B2 (en) * 2014-01-31 2017-07-25 Microsoft Technology Licensing, Llc External data access with split index
US10366102B2 (en) 2014-02-19 2019-07-30 Snowflake Inc. Resource management systems and methods
CN104520815B (en) * 2014-03-17 2019-03-01 华为技术有限公司 Method and device for task scheduling
US9667736B2 (en) * 2014-04-29 2017-05-30 International Business Machines Corporation Parallel I/O read processing for use in clustered file systems having cache storage
US20150347508A1 (en) * 2014-06-02 2015-12-03 Microsoft Corporation Partial result classification
US9836506B2 (en) * 2014-06-11 2017-12-05 International Business Machines Corporation Dynamic query optimization with pilot runs
US11487771B2 (en) * 2014-06-25 2022-11-01 Microsoft Technology Licensing, Llc Per-node custom code engine for distributed query processing
US9558069B2 (en) 2014-08-07 2017-01-31 Pure Storage, Inc. Failure mapping in a storage array
US9082512B1 (en) 2014-08-07 2015-07-14 Pure Storage, Inc. Die-level monitoring in a storage cluster
US9766972B2 (en) * 2014-08-07 2017-09-19 Pure Storage, Inc. Masking defective bits in a storage array
US10983859B2 (en) 2014-08-07 2021-04-20 Pure Storage, Inc. Adjustable error correction based on memory health in a storage unit
US11474874B2 (en) 2014-08-14 2022-10-18 Qubole, Inc. Systems and methods for auto-scaling a big data system
US10599648B2 (en) * 2014-09-26 2020-03-24 Applied Materials, Inc. Optimized storage solution for real-time queries and data modeling
US10467569B2 (en) * 2014-10-03 2019-11-05 Datameer, Inc. Apparatus and method for scheduling distributed workflow tasks
US9747333B2 (en) 2014-10-08 2017-08-29 Cloudera, Inc. Querying operating system state on multiple machines declaratively
WO2016065198A1 (en) * 2014-10-22 2016-04-28 Qubole, Inc. High performance hadoop with new generation instances
US10298709B1 (en) * 2014-12-31 2019-05-21 EMC IP Holding Company LLC Performance of Hadoop distributed file system operations in a non-native operating system
US11294893B2 (en) * 2015-03-20 2022-04-05 Pure Storage, Inc. Aggregation of queries
US9836495B2 (en) 2015-05-14 2017-12-05 Illumon Llc Computer assisted completion of hyperlink command segments
US11436667B2 (en) 2015-06-08 2022-09-06 Qubole, Inc. Pure-spot and dynamically rebalanced auto-scaling clusters
US20170004527A1 (en) * 2015-07-01 2017-01-05 Turn Inc. Systems, methods, and devices for scalable data processing
US20170060941A1 (en) * 2015-08-25 2017-03-02 Futurewei Technologies, Inc. Systems and Methods for Searching Heterogeneous Indexes of Metadata and Tags in File Systems
CN105302697B (en) * 2015-11-13 2018-05-18 中国建设银行股份有限公司 A kind of running state monitoring method and system of density data model database
CN106815254B (en) * 2015-12-01 2020-08-14 阿里巴巴集团控股有限公司 A data processing method and device
US10394600B2 (en) * 2015-12-29 2019-08-27 Capital One Services, Llc Systems and methods for caching task execution
US9948655B1 (en) * 2016-04-15 2018-04-17 AtScale, Inc. Data access authorization for dynamically generated database structures
WO2017190757A1 (en) * 2016-05-02 2017-11-09 Norcom Information Technology Ag Distributed data analysis system and method
US11080207B2 (en) 2016-06-07 2021-08-03 Qubole, Inc. Caching framework for big-data engines in the cloud
US10740328B2 (en) 2016-06-24 2020-08-11 Microsoft Technology Licensing, Llc Aggregate-query database system and processing
US10331668B1 (en) * 2016-07-19 2019-06-25 Arcadia Data Inc. Apparatus and method for query processing using analytical view partitions and database partitions
US9672905B1 (en) 2016-07-22 2017-06-06 Pure Storage, Inc. Optimize data protection layouts based on distributed flash wear leveling
US10262002B2 (en) 2016-08-11 2019-04-16 International Business Machines Corporation Consistent execution of partial queries in hybrid DBMS
CN106354765B (en) * 2016-08-19 2020-06-26 广东亿迅科技有限公司 Log analysis system and method based on distributed acquisition
US10455045B2 (en) 2016-09-06 2019-10-22 Samsung Electronics Co., Ltd. Automatic data replica manager in distributed caching and data processing systems
US10467195B2 (en) * 2016-09-06 2019-11-05 Samsung Electronics Co., Ltd. Adaptive caching replacement manager with dynamic updating granulates and partitions for shared flash-based storage system
US10606664B2 (en) 2016-09-07 2020-03-31 Qubole Inc. Heterogeneous auto-scaling big-data clusters in the cloud
KR101728873B1 (en) 2016-09-07 2017-05-04 주식회사 비트나인 Graph query language distribution process system and query language distribution process method thereof
US11243963B2 (en) 2016-09-26 2022-02-08 Splunk Inc. Distributing partial results to worker nodes from an external data system
US11580107B2 (en) 2016-09-26 2023-02-14 Splunk Inc. Bucket data distribution for exporting data to worker nodes
US11281706B2 (en) 2016-09-26 2022-03-22 Splunk Inc. Multi-layer partition allocation for query execution
US11663227B2 (en) 2016-09-26 2023-05-30 Splunk Inc. Generating a subquery for a distinct data intake and query system
US10776355B1 (en) 2016-09-26 2020-09-15 Splunk Inc. Managing, storing, and caching query results and partial query results for combination with additional query results
US10726009B2 (en) 2016-09-26 2020-07-28 Splunk Inc. Query processing using query-resource usage and node utilization data
US11604795B2 (en) 2016-09-26 2023-03-14 Splunk Inc. Distributing partial results from an external data system between worker nodes
US11586627B2 (en) 2016-09-26 2023-02-21 Splunk Inc. Partitioning and reducing records at ingest of a worker node
US10977260B2 (en) 2016-09-26 2021-04-13 Splunk Inc. Task distribution in an execution node of a distributed execution environment
US11562023B1 (en) 2016-09-26 2023-01-24 Splunk Inc. Merging buckets in a data intake and query system
US11250056B1 (en) 2016-09-26 2022-02-15 Splunk Inc. Updating a location marker of an ingestion buffer based on storing buckets in a shared storage system
US20180089324A1 (en) 2016-09-26 2018-03-29 Splunk Inc. Dynamic resource allocation for real-time search
US11126632B2 (en) 2016-09-26 2021-09-21 Splunk Inc. Subquery generation based on search configuration data from an external data system
US11321321B2 (en) 2016-09-26 2022-05-03 Splunk Inc. Record expansion and reduction based on a processing task in a data intake and query system
US11593377B2 (en) 2016-09-26 2023-02-28 Splunk Inc. Assigning processing tasks in a data intake and query system
US11222066B1 (en) 2016-09-26 2022-01-11 Splunk Inc. Processing data using containerized state-free indexing nodes in a containerized scalable environment
US10795884B2 (en) 2016-09-26 2020-10-06 Splunk Inc. Dynamic resource allocation for common storage query
US10956415B2 (en) 2016-09-26 2021-03-23 Splunk Inc. Generating a subquery for an external data system using a configuration file
US11615104B2 (en) 2016-09-26 2023-03-28 Splunk Inc. Subquery generation based on a data ingest estimate of an external data system
US10984044B1 (en) 2016-09-26 2021-04-20 Splunk Inc. Identifying buckets for query execution using a catalog of buckets stored in a remote shared storage system
US11269939B1 (en) 2016-09-26 2022-03-08 Splunk Inc. Iterative message-based data processing including streaming analytics
US11874691B1 (en) 2016-09-26 2024-01-16 Splunk Inc. Managing efficient query execution including mapping of buckets to search nodes
US11294941B1 (en) 2016-09-26 2022-04-05 Splunk Inc. Message-based data ingestion to a data intake and query system
US11860940B1 (en) 2016-09-26 2024-01-02 Splunk Inc. Identifying buckets for query execution using a catalog of buckets
US11567993B1 (en) 2016-09-26 2023-01-31 Splunk Inc. Copying buckets from a remote shared storage system to memory associated with a search node for query execution
US11106734B1 (en) 2016-09-26 2021-08-31 Splunk Inc. Query execution using containerized state-free search nodes in a containerized scalable environment
US11416528B2 (en) * 2016-09-26 2022-08-16 Splunk Inc. Query acceleration data store
US11620336B1 (en) 2016-09-26 2023-04-04 Splunk Inc. Managing and storing buckets to a remote shared storage system based on a collective bucket size
US12013895B2 (en) 2016-09-26 2024-06-18 Splunk Inc. Processing data using containerized nodes in a containerized scalable environment
US11003714B1 (en) 2016-09-26 2021-05-11 Splunk Inc. Search node and bucket identification using a search node catalog and a data store catalog
US11461334B2 (en) 2016-09-26 2022-10-04 Splunk Inc. Data conditioning for dataset destination
US11442935B2 (en) 2016-09-26 2022-09-13 Splunk Inc. Determining a record generation estimate of a processing task
US11232100B2 (en) * 2016-09-26 2022-01-25 Splunk Inc. Resource allocation for multiple datasets
US11550847B1 (en) 2016-09-26 2023-01-10 Splunk Inc. Hashing bucket identifiers to identify search nodes for efficient query execution
US11314753B2 (en) 2016-09-26 2022-04-26 Splunk Inc. Execution of a query received from a data intake and query system
US11599541B2 (en) 2016-09-26 2023-03-07 Splunk Inc. Determining records generated by a processing task of a query
US11163758B2 (en) 2016-09-26 2021-11-02 Splunk Inc. External dataset capability compensation
US10353965B2 (en) 2016-09-26 2019-07-16 Splunk Inc. Data fabric service system architecture
US11023463B2 (en) 2016-09-26 2021-06-01 Splunk Inc. Converting and modifying a subquery for an external data system
US9747158B1 (en) 2017-01-13 2017-08-29 Pure Storage, Inc. Intelligent refresh of 3D NAND
US10482096B2 (en) * 2017-02-13 2019-11-19 Microsoft Technology Licensing, Llc Distributed index searching in computing systems
KR101856454B1 (en) 2017-03-06 2018-05-10 주식회사 티맥스데이터 Computer device for distributed processing
US10552435B2 (en) * 2017-03-08 2020-02-04 Microsoft Technology Licensing, Llc Fast approximate results and slow precise results
US10544955B2 (en) * 2017-03-09 2020-01-28 Johnson Controls Technology Company Dynamically updatable building management system control platform
US10846318B1 (en) 2017-04-18 2020-11-24 Microstrategy Incorporated Natural language visualizations
US10209982B2 (en) 2017-05-16 2019-02-19 Bank Of America Corporation Distributed storage framework information server platform architecture
US10733024B2 (en) 2017-05-24 2020-08-04 Qubole Inc. Task packing scheduling process for long running applications
CN109213743B (en) * 2017-06-30 2021-10-15 北京京东尚科信息技术有限公司 A data query method and device
US11921672B2 (en) 2017-07-31 2024-03-05 Splunk Inc. Query execution at a remote heterogeneous data store of a data fabric service
US11989194B2 (en) 2017-07-31 2024-05-21 Splunk Inc. Addressing memory limits for partition tracking among worker nodes
US12248484B2 (en) 2017-07-31 2025-03-11 Splunk Inc. Reassigning processing tasks to an external storage system
US12118009B2 (en) 2017-07-31 2024-10-15 Splunk Inc. Supporting query languages through distributed execution of query engines
US10198469B1 (en) 2017-08-24 2019-02-05 Deephaven Data Labs Llc Computer data system data source refreshing using an update propagation graph having a merged join listener
CN111052493B (en) * 2017-09-04 2023-04-14 远景Aesc能源元器件有限公司 Battery pack, control device, control method, and storage device
US10552394B2 (en) 2017-09-07 2020-02-04 International Business Machines Corporation Data storage with improved efficiency
US10896182B2 (en) 2017-09-25 2021-01-19 Splunk Inc. Multi-partitioning determination for combination operations
US11151137B2 (en) 2017-09-25 2021-10-19 Splunk Inc. Multi-partition operation in combination operations
CN107784103A (en) * 2017-10-27 2018-03-09 北京人大金仓信息技术股份有限公司 A kind of standard interface of access HDFS distributed memory systems
KR101966201B1 (en) * 2017-11-01 2019-04-05 (주)데이터스트림즈 Big data archiving and searching stsrem
US10467112B2 (en) 2017-11-09 2019-11-05 Bank Of America Corporation Distributed data monitoring device
US10331484B2 (en) 2017-11-14 2019-06-25 Bank Of America Corporation Distributed data platform resource allocator
US11228489B2 (en) * 2018-01-23 2022-01-18 Qubole, Inc. System and methods for auto-tuning big data workloads on cloud platforms
US11023293B2 (en) 2018-03-07 2021-06-01 Open Text Sa Ulc Flexible and scalable artificial intelligence and analytics platform with flexible content storage and retrieval
US10904357B1 (en) * 2018-03-16 2021-01-26 Intuit Inc. Optimizing request dispatching between services
US11354696B1 (en) 2018-03-21 2022-06-07 84.51, Llc Systems and methods for implementing a rewards program
US11138230B2 (en) 2018-03-26 2021-10-05 Mcafee, Llc Methods, apparatus, and systems to aggregate partitioned computer database data
KR102038527B1 (en) * 2018-03-28 2019-11-26 주식회사 리얼타임테크 Distributed cluster management system and method for thereof
US10768998B2 (en) 2018-04-05 2020-09-08 International Business Machines Corporation Workload management with data access awareness in a computing cluster
US10585714B2 (en) 2018-04-05 2020-03-10 International Business Machines Corporation Workload management with data access awareness using an ordered list of hosts in a computing cluster
US10761891B2 (en) 2018-04-05 2020-09-01 International Business Machines Corporation Workload management with data access awareness by aggregating file locality information in a computing cluster
CN110309334B (en) * 2018-04-20 2023-07-18 腾讯科技(深圳)有限公司 Query method, system, computer device and readable storage medium for graph database
US11334543B1 (en) 2018-04-30 2022-05-17 Splunk Inc. Scalable bucket merging for a data intake and query system
CN110457971B (en) * 2018-05-07 2022-09-16 腾讯科技(深圳)有限公司 Method and device for detecting repeated identification code information
JP7313123B2 (en) * 2018-05-25 2023-07-24 ヤフー株式会社 Computing system and computing method
CN110866062B (en) * 2018-08-09 2023-11-24 菜鸟智能物流控股有限公司 Data synchronization method and device based on distributed cluster
CN108959660B (en) * 2018-08-15 2021-07-27 东北大学 A storage method and using method based on HDFS distributed file system
CN109766368B (en) * 2018-11-14 2021-08-27 国云科技股份有限公司 Hive-based data query multi-type view output system and method
CN109767274B (en) * 2018-12-05 2023-04-25 航天信息股份有限公司 Method and system for carrying out associated storage on massive invoice data
CN111291040B (en) * 2018-12-10 2022-10-18 中国移动通信集团四川有限公司 Data processing method, device, equipment and medium
US10902069B2 (en) * 2018-12-18 2021-01-26 Runtime Collective Limited Distributed indexing and aggregation
CN111367954A (en) * 2018-12-26 2020-07-03 中兴通讯股份有限公司 Data query processing method, device and system and computer readable storage medium
CN113168147B (en) * 2018-12-29 2024-07-09 阿里巴巴集团控股有限公司 System and method for efficiently scanning a database using hardware acceleration
US11195050B2 (en) 2019-02-05 2021-12-07 Microstrategy Incorporated Machine learning to generate and evaluate visualizations
CN109815209A (en) * 2019-03-20 2019-05-28 上海电力学院 A Distributed Storage System for Lean Management of Hospital Logistics
CN110008257B (en) * 2019-04-10 2024-04-16 深圳市腾讯计算机系统有限公司 Data processing method, device, system, computer equipment and storage medium
WO2020220216A1 (en) 2019-04-29 2020-11-05 Splunk Inc. Search time estimate in data intake and query system
US11715051B1 (en) 2019-04-30 2023-08-01 Splunk Inc. Service provider instance recommendations using machine-learned classifications and reconciliation
US11100109B2 (en) * 2019-05-03 2021-08-24 Microsoft Technology Licensing, Llc Querying data in a distributed storage system
CN110175151A (en) * 2019-05-22 2019-08-27 中国农业科学院农业信息研究所 A kind of processing method, device, equipment and the storage medium of agricultural big data
US11704316B2 (en) 2019-05-31 2023-07-18 Qubole, Inc. Systems and methods for determining peak memory requirements in SQL processing engines with concurrent subtasks
CN110297827A (en) * 2019-05-31 2019-10-01 国网上海市电力公司 A kind of electric power data searching system of set Lucene and Hbase
US11144360B2 (en) 2019-05-31 2021-10-12 Qubole, Inc. System and method for scheduling and running interactive database queries with service level agreements in a multi-tenant processing system
US11567957B2 (en) * 2019-09-25 2023-01-31 Salesforce.Com, Inc. Incremental addition of data to partitions in database tables
US11494380B2 (en) 2019-10-18 2022-11-08 Splunk Inc. Management of distributed computing framework components in a data fabric service system
US11106509B2 (en) 2019-11-18 2021-08-31 Bank Of America Corporation Cluster tuner
US11429441B2 (en) 2019-11-18 2022-08-30 Bank Of America Corporation Workflow simulator
CN110909048A (en) * 2019-12-03 2020-03-24 北京明略软件系统有限公司 Data query method, device, server, client and storage medium
KR102178121B1 (en) * 2019-12-03 2020-11-12 아이씨티웨이주식회사 A method for providing a web-based spatial big data management service and a computer readable storage medium storing instructions for performing the same
US11614970B2 (en) 2019-12-06 2023-03-28 Microstrategy Incorporated High-throughput parallel data transmission
CN111061791B (en) * 2019-12-12 2023-04-07 广东食品药品职业学院 Middle and small-sized E-commerce big data platform
US11567965B2 (en) 2020-01-23 2023-01-31 Microstrategy Incorporated Enhanced preparation and integration of data sets
US11922222B1 (en) 2020-01-30 2024-03-05 Splunk Inc. Generating a modified component for a data intake and query system using an isolated execution environment image
CN111414349A (en) * 2020-03-18 2020-07-14 江苏鸿程大数据技术与应用研究院有限公司 Interactive unified big data programming computing platform
US11210288B2 (en) 2020-05-12 2021-12-28 Coupang Corp. Systems and methods for reducing database query latency
CN111756732B (en) * 2020-06-23 2022-07-12 北京明朝万达科技股份有限公司 Data scanning and control method and device, electronic equipment and readable storage medium
CN111988165B (en) * 2020-07-09 2023-01-24 云知声智能科技股份有限公司 Method and system for monitoring use condition of distributed storage system
CN113254488A (en) * 2020-08-05 2021-08-13 深圳市汉云科技有限公司 Data sorting method and system of distributed database
US11704313B1 (en) 2020-10-19 2023-07-18 Splunk Inc. Parallel branch operation using intermediary nodes
CN112307066B (en) * 2020-11-03 2023-04-07 平安普惠企业管理有限公司 Distributed data aggregation method, system, device and storage medium
CN112395308A (en) * 2020-11-05 2021-02-23 深圳市中博科创信息技术有限公司 Data query method based on HDFS database
KR102265085B1 (en) * 2020-12-04 2021-06-14 김근석 Code distribution processing server, code distribution processing method, and program stored in a recording medium
CN112835895A (en) * 2021-01-27 2021-05-25 世纪龙信息网络有限责任公司 A data storage system and storage method thereof
US11513876B2 (en) 2021-02-23 2022-11-29 Sap Se Resolving data location for queries in a multi-system instance landscape
US11727022B2 (en) 2021-03-19 2023-08-15 International Business Machines Corporation Generating a global delta in distributed databases
US11704327B2 (en) * 2021-03-19 2023-07-18 International Business Machines Corporation Querying distributed databases
CN113590316A (en) * 2021-07-23 2021-11-02 中共四川省委组织部 Database cluster processing method based on domestic CPU
CN113609238A (en) * 2021-07-24 2021-11-05 全图通位置网络有限公司 Hadoop platform-based geographic entity spatial data processing method and storage medium
US12072939B1 (en) 2021-07-30 2024-08-27 Splunk Inc. Federated data enrichment objects
CN113672641B (en) * 2021-08-18 2025-01-24 北京金山云网络技术有限公司 Database cluster data processing method, device, system, medium and electronic device
CN114443686A (en) * 2021-12-23 2022-05-06 中科金审(北京)科技有限公司 Compression graph construction method and device based on relational data
US11645231B1 (en) * 2022-04-24 2023-05-09 Morgan Stanley Services Group Inc. Data indexing for distributed query execution and aggregation
US12093272B1 (en) 2022-04-29 2024-09-17 Splunk Inc. Retrieving data identifiers from queue for search of external data system
US12360998B2 (en) * 2022-05-17 2025-07-15 Sap Se Distributed query plan generation
CN115062041A (en) * 2022-06-08 2022-09-16 上海达梦数据库有限公司 Distributed database management method, device, equipment, system and medium
US12141137B1 (en) 2022-06-10 2024-11-12 Cisco Technology, Inc. Query translation for an external data system
CN115168474B (en) * 2022-07-26 2023-04-14 成都智元汇信息技术股份有限公司 Internet of things central station system building method based on big data model
CN116126217B (en) * 2022-09-14 2025-10-17 马上消费金融股份有限公司 Storage resource allocation method, device, equipment and storage medium
CN117785930A (en) * 2022-09-21 2024-03-29 华为云计算技术有限公司 A data query method and cloud service system
CN116150122A (en) * 2022-12-27 2023-05-23 中国邮政储蓄银行股份有限公司 Data query architecture and data query system
EP4404077A1 (en) * 2023-01-19 2024-07-24 MasterCard International Incorporated Method and system for operating a query processing engine
US12287790B2 (en) 2023-01-31 2025-04-29 Splunk Inc. Runtime systems query coordinator
US12585638B2 (en) 2023-07-17 2026-03-24 Cisco Technology, Inc. Query execution using a data processing scheme of a separate data processing system
US12602382B2 (en) 2024-08-15 2026-04-14 International Business Machines Corporation Resource aware query planning

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5987449A (en) * 1996-08-23 1999-11-16 At&T Corporation Queries on distributed unstructured databases
US20030074352A1 (en) * 2001-09-27 2003-04-17 Raboczi Simon D. Database query system and method
WO2005076160A1 (en) * 2004-02-06 2005-08-18 Critical Software, Sa Data warehouse distributed system and architecture to support distributed query execution
US20110082859A1 (en) * 2009-10-07 2011-04-07 International Business Machines Corporation Information theory based result merging for searching hierarchical entities across heterogeneous data sources
US7984043B1 (en) * 2007-07-24 2011-07-19 Amazon Technologies, Inc. System and method for distributed query processing using configuration-independent query plans

Family Cites Families (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001312504A (en) * 2000-04-25 2001-11-09 Jarg Corp Method and system to extract knowledge
JP2002108899A (en) * 2000-09-27 2002-04-12 Hitachi Kokusai Electric Inc Database access method and multidimensional database access system
JP2002108670A (en) * 2000-09-29 2002-04-12 Hitachi Kokusai Electric Inc Database access method and multidimensional database access system
US6922791B2 (en) * 2001-08-09 2005-07-26 Dell Products L.P. Failover system and method for cluster environment
EP1349082A1 (en) 2002-03-28 2003-10-01 LION Bioscience AG Method and apparatus for querying relational databases
US20040103087A1 (en) * 2002-11-25 2004-05-27 Rajat Mukherjee Method and apparatus for combining multiple search workers
US7523118B2 (en) * 2006-05-02 2009-04-21 International Business Machines Corporation System and method for optimizing federated and ETL'd databases having multidimensionally constrained data
CN100573524C (en) * 2007-07-31 2009-12-23 武汉大学 A kind of efficient, transparent distributed spatial database querying method
US8468212B2 (en) * 2007-08-08 2013-06-18 Silicon Image, Inc. Network repository for metadata
JP4995750B2 (en) 2008-02-06 2012-08-08 日本電信電話株式会社 Web search device, Web search method, program, and recording medium
US8213924B2 (en) * 2008-10-06 2012-07-03 Facebook, Inc. Providing distributed online services for mobile devices
US20100115100A1 (en) * 2008-10-30 2010-05-06 Olga Tubman Federated configuration data management
US8392402B2 (en) 2008-12-03 2013-03-05 International Business Machines Corporation Hybrid push/pull execution of continuous SQL queries
US9043319B1 (en) * 2009-12-07 2015-05-26 Google Inc. Generating real-time search results
US8874961B2 (en) * 2010-03-22 2014-10-28 Infosys Limited Method and system for automatic failover of distributed query processing using distributed shared memory
KR101183768B1 (en) * 2010-08-13 2012-09-17 삼성에스디에스 주식회사 System and method providing integrated view, server having function for generating view
US8775425B2 (en) * 2010-08-24 2014-07-08 International Business Machines Corporation Systems and methods for massive structured data management over cloud aware distributed file system
US10579634B2 (en) * 2012-08-30 2020-03-03 Citus Data Bilgi Islemleri Ticaret A.S. Apparatus and method for operating a distributed database with foreign tables
US9081826B2 (en) 2013-01-07 2015-07-14 Facebook, Inc. System and method for distributed database query engines
US10185744B2 (en) * 2015-06-23 2019-01-22 Sap Se Caching views on historical data

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5987449A (en) * 1996-08-23 1999-11-16 At&T Corporation Queries on distributed unstructured databases
US20030074352A1 (en) * 2001-09-27 2003-04-17 Raboczi Simon D. Database query system and method
WO2005076160A1 (en) * 2004-02-06 2005-08-18 Critical Software, Sa Data warehouse distributed system and architecture to support distributed query execution
US7984043B1 (en) * 2007-07-24 2011-07-19 Amazon Technologies, Inc. System and method for distributed query processing using configuration-independent query plans
US20110082859A1 (en) * 2009-10-07 2011-04-07 International Business Machines Corporation Information theory based result merging for searching hierarchical entities across heterogeneous data sources

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10698913B2 (en) 2013-01-07 2020-06-30 Facebook, Inc. System and methods for distributed database query engines
US11347761B1 (en) 2013-01-07 2022-05-31 Meta Platforms, Inc. System and methods for distributed database query engines
JP2016071837A (en) * 2014-09-30 2016-05-09 Kddi株式会社 Data virtualization device and large scale data processing program
JP2016159499A (en) * 2015-02-27 2016-09-05 京セラドキュメントソリューションズ株式会社 Function providing system and function relay program

Also Published As

Publication number Publication date
CA2896855A1 (en) 2014-07-10
US20190121809A1 (en) 2019-04-25
MX349042B (en) 2017-07-07
EP3096250B1 (en) 2019-02-20
US10698913B2 (en) 2020-06-30
JP2016509294A (en) 2016-03-24
EP2752779B1 (en) 2016-06-29
CN104903894A (en) 2015-09-09
CN104903894B (en) 2018-12-28
US20140195558A1 (en) 2014-07-10
JP6117378B2 (en) 2017-04-19
KR20150104585A (en) 2015-09-15
US11347761B1 (en) 2022-05-31
US20160188677A1 (en) 2016-06-30
EP3096250A1 (en) 2016-11-23
US9361344B2 (en) 2016-06-07
AU2013371448B2 (en) 2017-02-16
CN110069526A (en) 2019-07-30
US9081826B2 (en) 2015-07-14
KR101775433B1 (en) 2017-09-06
EP2752779A2 (en) 2014-07-09
MX2015008799A (en) 2016-04-25
IL239717A (en) 2017-04-30
BR112015016352A2 (en) 2017-07-11
US20150261831A1 (en) 2015-09-17
US10210221B2 (en) 2019-02-19
IL239717A0 (en) 2015-08-31
AU2013371448A1 (en) 2015-07-23
KR20170103021A (en) 2017-09-12
KR102037232B1 (en) 2019-10-28
EP2752779A3 (en) 2015-02-18
CA2896855C (en) 2016-11-01

Similar Documents

Publication Publication Date Title
US11347761B1 (en) System and methods for distributed database query engines
US10572479B2 (en) Parallel processing database system
US9292575B2 (en) Dynamic data aggregation from a plurality of data sources
US11640347B2 (en) Automated query retry execution in a database system
US20170351989A1 (en) Providing supply chain information extracted from an order management system
EP2869220B1 (en) Networked database system
KR20100132752A (en) Query data distribution processing system for improving service performance through database distribution
EP2765517B1 (en) Data stream splitting for low-latency data access
Ye et al. Accessing and steering the elastic OLAP Cloud

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 13870065

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2896855

Country of ref document: CA

WWE Wipo information: entry into national phase

Ref document number: 239717

Country of ref document: IL

ENP Entry into the national phase

Ref document number: 2015551711

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

WWE Wipo information: entry into national phase

Ref document number: MX/A/2015/008799

Country of ref document: MX

REG Reference to national code

Ref country code: BR

Ref legal event code: B01A

Ref document number: 112015016352

Country of ref document: BR

ENP Entry into the national phase

Ref document number: 2013371448

Country of ref document: AU

Date of ref document: 20131220

Kind code of ref document: A

ENP Entry into the national phase

Ref document number: 20157020768

Country of ref document: KR

Kind code of ref document: A

122 Ep: pct application non-entry in european phase

Ref document number: 13870065

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 112015016352

Country of ref document: BR

Kind code of ref document: A2

Effective date: 20150707