Cassandra scripts throwing error

Document ID : KB000098310
Last Modified Date : 31/05/2018
Show Technical Document Details
Issue:
The following function is showing warnings when try to run from Devcenter. Error reports that unixTimestampOf() function is deprecated in Cassandra 2.2.0, you are currently using Cassandra 3.0.15
 
Environment:
Cassandra 3.0
Cause:
The above summary indicates that unixTimestampOf should be replaced by toUnixTimestamp in order to support Cassandra 3.0+.
Resolution:
This is a defect of MAG 4.x that claims to support Cassandra 3. A ticket will be created to fix this issue in MAG4.2." We won't release a patch for MAG4.X since the deprecated function still works. CA will provide a fix for MAG4.3 release

Workaround/Resolution: 
Although the function of unixTimestampOf is deprecated starting from CQL3.3, the function has not been removed and it is still working on Cassandra 3.x version lower than “cqlsh 5.0.1 | Cassandra 3.11.1 | CQL spec 3.4.4”. The customer is using 3.0.15. Therefore, the warning is thrown out in the log filebut won’t impact the functionality.
 
As a workaround of this issue, toUnixTimestamp will be used to replace the unixTimestampOf in all the cql scripts where the unixTimestampOf is used. I have tested the function of toUnixTimestamp. It works as expected as unixTimestampOf does.  However, “MAG NoSQL Fetch OTP” is an encas policy and is not editable. The policy has to be fixed in the next MAG release. Therefore, if the customer decides to use Cassandra 3.0.15, the functionality won't be impacted. However, if they plan to use the newest version of Cassandra, the next release of MAG4.2 is recommended.