Social service - cassandra 4

This commit is contained in:
Ahmed Salah Tawfik Ibrahim 2023-11-13 11:33:37 +01:00
parent 6fce7cf11f
commit cd1e77e4fc
9 changed files with 43 additions and 82 deletions

View File

@ -1,5 +1,9 @@
# Changelog
## [v2.9.2-SNAPSHOT] - 2023-11-05
- Replace Astyanx Java client for Cassandra 2 with Datastax client for Cassandra 4
## [v2.9.1] - 2023-09-28
- Fix for Bug #25760 not closing connection to distributed cached

99
pom.xml
View File

@ -1,6 +1,6 @@
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
@ -12,7 +12,7 @@
<groupId>org.gcube.portal</groupId>
<artifactId>social-networking-library-ws</artifactId>
<packaging>war</packaging>
<version>2.9.1</version>
<version>2.9.2</version>
<name>social-networking-library-ws</name>
<description>Rest interface for the social networking library.</description>
<properties>
@ -66,7 +66,6 @@
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.1.0</version>
<scope>provided</scope>
</dependency>
<!-- end enunciate deps -->
<dependency>
@ -93,13 +92,12 @@
<dependency>
<groupId>org.gcube.common</groupId>
<artifactId>storagehub-client-library</artifactId>
<!-- <version>2.0.0-SNAPSHOT</version> -->
<!-- <version>2.0.0-SNAPSHOT</version> -->
</dependency>
<dependency>
<groupId>com.sun.mail</groupId>
<artifactId>javax.mail</artifactId>
<version>1.5.2</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
@ -116,78 +114,20 @@
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<scope>compile</scope>
<version>18.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.netflix.astyanax</groupId>
<artifactId>astyanax</artifactId>
<version>2.0.2</version>
<scope>compile</scope>
<exclusions>
<exclusion>
<artifactId>jersey-client</artifactId>
<groupId>com.sun.jersey</groupId>
</exclusion>
<exclusion>
<artifactId>jersey-bundle</artifactId>
<groupId>com.sun.jersey</groupId>
</exclusion>
<exclusion>
<artifactId>jersey-apache-client4</artifactId>
<groupId>com.sun.jersey.contribs</groupId>
</exclusion>
<exclusion>
<groupId>javax.ws.rs</groupId>
<artifactId>jsr311-api</artifactId>
</exclusion>
<exclusion>
<groupId>org.mortbay.jetty</groupId>
<artifactId>servlet-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.netflix.astyanax</groupId>
<artifactId>astyanax-thrift</artifactId>
<version>2.0.2</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.netflix.astyanax</groupId>
<artifactId>astyanax-cassandra</artifactId>
<version>2.0.2</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.netflix.astyanax</groupId>
<artifactId>astyanax-core</artifactId>
<version>2.0.2</version>
<scope>compile</scope>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>log4j-over-slf4j</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.gcube.socialnetworking</groupId>
<artifactId>social-util-library</artifactId>
<version>[1.0.1-SNAPSHOT,2.0.0-SNAPSHOT)</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.gcube.portal</groupId>
<artifactId>social-networking-library</artifactId>
<version>[1.18.0-SNAPSHOT, 2.0.0-SNAPSHOT)</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.gcube.dvos</groupId>
<artifactId>usermanagement-core</artifactId>
@ -245,8 +185,13 @@
<groupId>com.fasterxml.jackson.dataformat</groupId>
<version>2.8.6</version>
</dependency>
<!-- Please note that the elasticsearch client needs a compress-lzf version
<dependency>
<groupId>org.gcube.portal</groupId>
<artifactId>social-networking-library</artifactId>
<version>2.0.0-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
<!-- Please note that the elasticsearch client needs a compress-lzf version
>= 1.0.2 -->
<dependency>
<groupId>com.ning</groupId>
@ -257,8 +202,15 @@
<dependency>
<groupId>org.glassfish.jersey.containers</groupId>
<!-- if your container implements Servlet API older than 3.0, use "jersey-container-servlet-core" -->
<!--<artifactId>jersey-container-servlet</artifactId>-->
<artifactId>jersey-container-servlet-core</artifactId>
<!--<version>3.0.0</version>-->
</dependency>
<!--<dependency>
<groupId>org.glassfish.jersey.containers</groupId>
<artifactId>jersey-container-servlet</artifactId>
<version>2.13</version>
</dependency>-->
<dependency>
<groupId>org.glassfish.jersey.media</groupId>
<artifactId>jersey-media-json-processing</artifactId>
@ -279,7 +231,6 @@
<groupId>javax.portlet</groupId>
<artifactId>portlet-api</artifactId>
<version>2.0</version>
<scope>compile</scope>
</dependency>
<!-- SmartGears -->
<dependency>
@ -292,7 +243,6 @@
<artifactId>common-smartgears-app</artifactId>
<scope>compile</scope>
</dependency>
<!-- notifications libraries -->
<dependency>
<groupId>org.gcube.portal</groupId>
@ -312,7 +262,16 @@
<version>4.3</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty-util</artifactId>
<version>6.1.22</version>
</dependency>
<dependency>
<groupId>com.googlecode.json-simple</groupId>
<artifactId>json-simple</artifactId>
<version>1.1.1</version>
</dependency>
</dependencies>
<build>

View File

@ -30,7 +30,7 @@ public class GroupsCache {
/**
* Retrieve an entry
* @param id
* @param groupId
* @return user associated to the user
*/
public GCubeGroup getGroup(long groupId){
@ -44,7 +44,7 @@ public class GroupsCache {
/**
* Save an entry into the cache
* @param id
* @param user
* @param group
*/
public void pushEntry(long id, GCubeGroup group){
Ehcache groupsCache = CachesManager.getCache(CachesManager.GROUPS_CACHE);

View File

@ -59,7 +59,7 @@ public class UsersCache{
/**
* Retrieve an entry
* @param id
* @param userId
* @return user associated to the user
*/
public GCubeUser getUser(long userId){

View File

@ -39,8 +39,7 @@ public class CommentInputBean implements Serializable{
/**
* @param text
* @param postid
* @param params
*/
*/
public CommentInputBean(String text, String postid) {
super();
this.text = text;

View File

@ -88,7 +88,7 @@ public class Likes {
/**
* Create a new like to a post in the context of the token
* @param postid The post id to be liked
* @param post The post id to be liked
* @return true if everything is OK
* @throws ValidationException
*/
@ -128,7 +128,7 @@ public class Likes {
/**
* Unlike to a post in the context of the token
* @param postid The post id to be liked
* @param likeInputBean The post id to be liked
* @return true if everything is OK
* @throws ValidationException
*/

View File

@ -31,8 +31,7 @@ public class ResponseBean implements Serializable {
* @param success
* @param message
* @param result
* @param help
*/
*/
public ResponseBean(boolean success, String message, Object result) {
super();
this.success = success;

View File

@ -89,7 +89,7 @@ public class Filters {
* If the initial context is the root: all feeds are returned;
* If the initial context is a VO: feeds for vres within the vo are returned;
* If the initial context is a vre: feeds of the vre are returned;
* @param retrievedLikedFeeds
* @param feeds
* @param context
* @throws Exception
*/
@ -160,7 +160,7 @@ public class Filters {
/**
* Depending on the type of object provided (e.g. Feed, Comment etc), some information are removed
* @param comments
* @param toClear
* @throws Exception
*/
public static <T> void hideSensitiveInformation(List<T> toClear, String usernameCaller){

View File

@ -108,7 +108,7 @@ public class SocialUtils {
/**
* Method used when an application needs to publish something.
* @param feedText
* @param postText
* @param uriParams
* @param previewTitle
* @param previewDescription