Guest User

Untitled

a guest
Jan 16th, 2017
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.26 KB | None | 0 0
  1. create type if not exists coordinates (
  2. latitude double,
  3. longitude double
  4. );
  5.  
  6. create 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.  
  18. insert 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.  
  21. ERROR 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);
Add Comment
Please, Sign In to add comment