· 9 years ago · Jan 16, 2017, 05:28 PM
1create type if not exists coordinates (
2 latitude double,
3 longitude double
4);
5
6create table if not exists forecast_configuration(
7 description text,
8 coordinates list<frozen <coordinates>>,
9 forecast boolean,
10 start_date timestamp,
11 end_date timestamp,
12 user_email text,
13 notify_user boolean,
14 variables text,
15 PRIMARY KEY(description)
16);
17
18insert into forecast_configuration (description,coordinates,forecast,start_date, end_date, user_email,notify_user,variables) VALUES ('teste forecast2',[{ latitude : 38.5 ,longitude : -8},
19 { latitude : 38.52,longitude : -8.02 }], false, '2015-01-01', '2017-01-01', 'user_email@gmail.com',true,'rh,temp');
20
21ERROR 14:55:09 JVM state determined to be unstable. Exiting forcefully due to: java.lang.OutOfMemoryError: Java heap space
22
23$save['coordinates'] = json_encode($save['coordinates']); // I think my error can be here.
24
25$statement = new CassandraSimpleStatement(
26 "INSERT INTO forecast_configuration (description, coordinates, forecast, start_date, end_date, user_email,
27 notify_user, variables) " .
28 "VALUES (?, ?, ?, ?, ?, ?, ?, ?)"
29 );
30
31$options = new CassandraExecutionOptions(array('arguments' => $save));
32$session->execute($statement, $options);