Troubleshooting Aerospike Connect for Spark
Mistakes to avoidโ
Mixed data types in binsโ
In Aerospike, records with the same bin name can have mixed data types. Spark views each bin as a database column with the same data type. This can cause runtime errors in Spark.
To handle mixed data types, refer to aerospike.schema.flexible
on the Aerospike Connect for Spark Configuration Reference page.
Very sparse binsโ
Aerospike Connect for Spark detects the schema by a sampling of records. This means the sampled records may not have some bins. To avoid this situation, provide the schema.
Common error messagesโ
This section addresses error messages you may encounter when working with Aerospike Connect for Spark.
java.lang.IllegalArgumentException: Unsupported class file major version
โ
Run java -version
to verify that the Java version in use is 1.8
.
Operation not allowed at this timeโ
Error message: com.aerospike.client.AerospikeException: Error 22,1,30000,0,0,BB9030011AC4202 172.17.0.3 3000: Operation not allowed at this time
Check the aerospike.conf
file. Aerospike versions 4.9 and later require nsup-period
to be set explicitly in order to allow records with TTL to be inserted. Other root causes are described in Client Writes Fail With Aerospike Err Fail Forbidden.
socketTimeoutExceptionโ
Error message: java.util.concurrent.ExecutionException: com.aerospike.client.AerospikeException$Connection: Error -8,1,1000,1000,0,BB9040016AE4202 174.22.0.4 3000: java.net.SocketTimeoutException
This happens when the server gets more scan requests than it can process. To avoid this problem, reduce the value of aerospike.partition.factor
and configure scan-threads-limit on the server.
FORBIDDENโ
Error message: 22 AS_ERR_FORBIDDEN
Raise the scan-threads-limit
dynamically and/or reduce the single-scan-threads
so that no starvation is happening when a lot of parallel partition scans are kicked off.
You can also reduce the value of aerospike.partition.factor
.