2018-09-18 06:54:33 Executor task launch worker for task 486 ERROR Executor:91 - Exception in task 162.0 in stage 9.0 (TID 486)
java.sql.BatchUpdateException: The query has timed out.
at com.shaded.com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.executeBatch(SQLServerPreparedStatement.java:2022)
at com.microsoft.antispam.outputWriters.SQLDataWarehouseWriter$$anonfun$5$$anonfun$apply$1$$anonfun$6.apply(SQLDataWarehouseWriter.scala:89)
at com.microsoft.antispam.outputWriters.SQLDataWarehouseWriter$$anonfun$5$$anonfun$apply$1$$anonfun$6.apply(SQLDataWarehouseWriter.scala:89)
at scala.util.Try$.apply(Try.scala:192)
Driver version
7.0.0.jre8
SQL Server version
Azure SQL Data Warehouse Gen1
Client Operating System
Ubuntu
JAVA/JVM version
1.8
Problem description
I use the method mention here: https://github.com/Microsoft/mssql-jdbc/wiki/How-to-enable-Bulk-Copy-API-for-batch-insert-operations to bulk copy data to Data Warehouse
I use
insertStatement.setQueryTimeout(10 * 60)to set timeout.I don't specify timeout properties on connection string.
Expected behaviour: Timeout exception will be thrown after 10 mins
Actual behaviour:

Timeout exception thrown only after 1 min, like this:
Error message/stack trace: