# SPARQL2 Flink: Evaluation of SPARQL Queries on Apache Flink
## 5 Evaluation and Result
### Carry out Scalability Tests on a Local Cluster Environment  
The Apache Flink local cluster needs at least one _Job Manager_ and one or more _Task Managers_. The Job Manager is the master that coordinates and manages the execution of the program; the Task Managers are the workers or slaves that execute parts of the parallel programs. The parallelism of task execution was determined by using the Task Slots available on each Task Manager. In order to carry out scalability tests, we setup an Apache Flink local cluster with one master node and fifteen slave nodes; each slave node with one Task Slot. Table 3 shows an specifications of each node. The _flink-conf.yaml_ file is part of the Job Manager and the Task Manager and contains all cluster configurations as a flat collection of YAML(YAML Ain't Markup Language-[[https://yaml.org](https://yaml.org)]([https://yaml.org](https://yaml.org)) accessed on 23 March 2020) key-value pairs. Most of the configurations are the same for the Job Manager node and the Task Manager nodes. The parameters listed in Listing 4 were set up in order to carry out scalability tests. The parameters not listed were maintained with default values. A detailed description of each parameter can be see in [38]. Two scalability tests were conducted. In both tests, the primary measure evaluated is the _query execution time_ of nine queries on different datasets and number of nodes in the cluster. Based on the number of available nodes, we configured five different clusters. C1 cluster with one master node and four slave nodes; C2 cluster with one master node and seven slave nodes; C3 cluster with one master node and eight slave nodes; C4 cluster with one master node and eleven slave nodes; C5 cluster with one master node and fifteen slave nodes. \begin{table}
\begin{tabular}{c c} \hline \hline
**Node** & **Specifications** \\ \hline \multirow{2}{*}{master} & Model: iMac13.2, SO: Sierra 10.12.1, Processor: Intel Quad Core i7 \\  & 3.4 GHz, RAM: 32 GB, HD: 1 TB \\ \hline \multirow{2}{*}{slave01 to slave13} & Model: iMac13.2, SO: Mojave 10.14, Processor: Intel Quad Core i7 \\  & 3.4 GHz, RAM: 32 GB, HD: 532 GB \\ \hline \multirow{2}{*}{slave14} & Model: iMac13.2, SO: Mojave 10.14, Processor: Intel Quad Core i5 \\  & 2.9 GHz, RAM: 32 GB, HD: 532 GB \\ \hline \multirow{2}{*}{slave15} & Model: iMac13.2, SO: Mojave 10.14, Processor: Intel Quad Core i5 \\  & 2.9 GHz, RAM: 16 GB, HD: 532 GB \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Local cluster nodes specifications. The first scalability test aims to evaluate the performance of SPARQL2 Flink with ds300 mb, ds600 mb, ds1 gb, and ds2 gb datasets with a different number of triples. The test was performed on C1, C3, and C5 clusters. Each dataset was replicated on each node. Each node was configured with Apache Flink 1.10.0. A query executed on a dataset and a cluster configuration is considered an individual test. For instance, the query Q1 was executed on the ds300 mb dataset on cluster C1. After that, the same query was executed on the same dataset on clusters C3 and C5. The remaining eight queries were executed on the other datasets and clusters in the same way. Consequently, a total of 108 tests were conducted. Figure 2 depicts the query execution times of nine queries after running the first scalability test. Figure 2: Execution times of nine queries after running the first scalability test. The x-axis represents the number of nodes on cluster C1, C3, and C5. The y-axis represents the time in seconds, which includes the dataset loading time (dlt), the query execution time (qet), and the amount of time taken in creating the file with query results. Additionally, on the top, the number of triples of each dataset is shown. The second scalability test was performed on the C2, C4, and C5 clusters. For this test, Apache Flink 1.10.0 and Hadoop 2.8.3 were configured to use HDFS in order to store the ds18 gb dataset. As in the first test, the nine queries were executed by changing the cluster configuration, for a total of 27 additional tests.