En-Query / EncryptedQuery

GNU Affero General Public License v3.0
9 stars 2 forks source link

Flink JDBC test fails during build #2

Open elsif2 opened 5 years ago

elsif2 commented 5 years ago

The Flink JDBC test fails due to insufficient number of network buffers configured in the mini flink cluster:

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running org.enquery.encryptedquery.flink.jdbc.ResponderTest
2018-12-06 09:52:51,152 [main] INFO  org.enquery.encryptedquery.flink.jdbc.JDBCTestBase  - INSERT INTO books (id, title, author, price, qty, release_dt) VALUES (1001,'Java public for dummies','Tan Ah Teck',11.11,11, '2001-01-03T10:15:30.000Z'),(1002,'More Java for dummies','Tan Ah Teck',22.22,22, '2008-06-11T07:15:30.000Z'),(1003,'More Java for more dummies','Mohammad Ali',33.33,33, '2012-01-03T10:15:30.000Z'),(1004,'A Cup of Java','Kumar',44.44,44, '2001-01-03T11:18:00.000Z'),(1005,'A Teaspoon of Java','Kevin Jones',55.55,55, '2016-07-04T16:00:00.000Z'),(1006,'A Teaspoon of Java 1.4','Kevin Jones',66.66,66, '2016-08-08T10:15:30.000Z'),(1007,'A Teaspoon of Java 1.5','Kevin Jones',77.77,77, '2001-01-03T10:15:30.000Z'),(1008,'A Teaspoon of Java 1.6','Kevin Jones',88.88,88, '2001-01-03T10:15:30.000Z'),(1009,'A Teaspoon of Java 1.7','Kevin Jones',99.99,99, '2001-01-03T10:15:30.000Z'),(1010,'A Teaspoon of Java 1.8','Kevin Jones',null,1010, '2001-01-03T10:15:30.000Z')
2018-12-06 09:52:51,680 [main] INFO  org.enquery.encryptedquery.querier.wideskies.encrypt.EncryptQueryBasicTaskFactory  - initializing EncryptQueryBasicTaskFactory instance
2018-12-06 09:52:51,938 [main] INFO  org.enquery.encryptedquery.querier.wideskies.encrypt.EncryptQuery  - Completed parallel creation of encrypted query vectors
2018-12-06 09:52:52,177 [main] WARN  org.enquery.encryptedquery.flink.BaseQueryExecutor  - maxHitsPerSelector configuration parameter is missing, defaulting to 1000
2018-12-06 09:52:52,183 [main] INFO  org.enquery.encryptedquery.flink.BaseQueryExecutor  - Loaded query params bitSize: '9',  Selector: 'title', Embed Selector: 'true'.

.
.
.

Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 4.248 sec <<< FAILURE! - in org.enquery.encryptedquery.flink.jdbc.ResponderTest
test(org.enquery.encryptedquery.flink.jdbc.ResponderTest)  Time elapsed: 3.283 sec  <<< ERROR!
org.apache.flink.runtime.client.JobExecutionException: Job execution failed.
    at org.enquery.encryptedquery.flink.jdbc.ResponderTest.test(ResponderTest.java:134)
Caused by: java.io.IOException: Insufficient number of network buffers: required 40, but only 37 available. The total number of network buffers is currently set to 3237 of 32768 bytes each. You can increase this number by setting the configuration keys 'taskmanager.network.memory.fraction', 'taskmanager.network.memory.min', and 'taskmanager.network.memory.max'.
elsif2 commented 5 years ago

My target system has 40 cores. Building on an 8 core system the build completes successfully.

wstreaker021 commented 5 years ago

Reading your last comment, the system builds and the test works properly on the 8 core system but fails on the 40 core system ?

wstreaker021 commented 5 years ago

What are your system specs when this test failed ? I just created an Ubuntu Desktop 18.04 LTS vm to build and test. VM: 2 cpu's with 2cores each 8GB memory NAT network setup 50GB disk space

Installed the following packages: Apache Maven Oracle JDK 1.8.0_191 git gcc build-essential m4

Cloned Encrypted Query went to the parent folder and issued 'mvn clean install -P native-libs' to build went to the flink folder and issued 'mvn clean install' to build and run unit tests for flink-jdbc.

After full end to end testing it appears that the native libraries do not get built correctly on Ubuntu with the current build scripts. It builds correctly on Centos and copying the native libraries from centos to Ubuntu fixed that issue. Though they are not executed during the unit tests