From 975b7d7e291cee03f73c6d4f1dabf51cf437eb96 Mon Sep 17 00:00:00 2001 From: Massimiliano Assante Date: Mon, 18 Dec 2023 13:05:26 +0100 Subject: [PATCH] daje --- .../SocialDataIndexerPlugin.class | Bin 0 -> 8096 bytes .../SocialDataIndexerPlugin.java | 354 ------------------ .../utils/SendNotification.class | Bin 0 -> 8422 bytes .../utils/SendNotification.java | 176 --------- .../socialdataindexer/Tests.class | Bin 0 -> 2222 bytes .../socialdataindexer/Tests.java | 34 -- 6 files changed, 564 deletions(-) create mode 100644 src/main/java/org/gcube/socialnetworking/socialdataindexer/SocialDataIndexerPlugin.class delete mode 100644 src/main/java/org/gcube/socialnetworking/socialdataindexer/SocialDataIndexerPlugin.java create mode 100644 src/main/java/org/gcube/socialnetworking/socialdataindexer/utils/SendNotification.class delete mode 100644 src/main/java/org/gcube/socialnetworking/socialdataindexer/utils/SendNotification.java create mode 100644 src/test/java/org/gcube/socialnetworking/socialdataindexer/Tests.class delete mode 100644 src/test/java/org/gcube/socialnetworking/socialdataindexer/Tests.java diff --git a/src/main/java/org/gcube/socialnetworking/socialdataindexer/SocialDataIndexerPlugin.class b/src/main/java/org/gcube/socialnetworking/socialdataindexer/SocialDataIndexerPlugin.class new file mode 100644 index 0000000000000000000000000000000000000000..4793f12d45ce4e2e79b2c799f78274ea827724c5 GIT binary patch literal 8096 zcmeHM>v9`46h2DatYgw9ExkcYSxQ?RE;f{MYeFG$66&&TL+rK`C^O2gVsEpSTuDyj zci}x?UFDo&e*Y5yuEEa^j1gE<(l57Y z$jguE7A*_eC^!7hIx8#Thcx0$KNWH_nY@5k)Ef!hAl4?@28g&{WcOXY# zCWebBHoUw3nE9H(L?jvwCJE#{FHX%7c*T!8N;7$fwwS4?X^DMd#j&PPTGd5Ga82XZ zo);>OHIucl!Kv;@Y%miS&i9+$FoODcu%0pHN(E=jKqW=g^c5Xj(c@U zxiSqZaS>J?QCb+}Y0u1SU5L$^DKIs@=$KZdiV*W55A_WKp?3lV5mc*%Qp2lX@j{JaiNsrg;IKUq4Wxd7Rp685KOtoge|K5 zrmNA|Y`cwi8-~P{STZZI6uZE_I!MeKwu~z$9)t@wMb-aZuA{@q3h*TtM73s3<4|O< z&Fu1*L%kg8g}J>==Fl02oFU;oDf^16g-hdey)c<@9xI_0WIRH4Q)CO1dmh%i`a-Id z(t23rpm2K3DxRx_niz8yTxY#WaS(dI99Viuu)s}R%2SD-BpGvM~GQ&y8GMXvZXD% zwXjNdU&Fq?*oii)Trp`jl@*HD#=v%uvD_X_4{LZmWtk5C@&nqc#>!W%mZ7CiEC*JA zv+%|goPrAkP8GeK_(d|{ITPQQ_V9>IVk&hLkRWiv6F!aZQyH3kuP~>ZA;w(l-oeL| zOxPx(9quudle2oWI7)(+*@D9d?26+OPVzEJNXlQ21v5K)EGq-biF6gkus(dR{ zAx>t HD24bG+D^|d{hhxf^m35!rpzeUD|bI1`)G%!O+ha4e;)E#n!3=gu}cSjul z!zbeiG0VexePaoF7Fe z@E}RV=RE_0TQWAw!^ecIT5PnVkTbl(a*zHW5fuVwSYodQ9^k7AUSxG$+){$$GfFX0 z|7`yuB@dqwsE#&)d9@fEx1-ff;3QtV7ow;lS}lBfQHxz;?wD}&X@<8TCG8qV#k1Zm z_D3?iQ$FwYnxmWKVV=NB_5f{GKY_~ui+Qzq-^>G;l5 zjNS8VtFCRh9I_h0@qwwGhYEowqvsR96InX0wP6Z1(UCq|L6(neb&t45{33zYs&Zd& zg(gB9-VB*E*XphVH<5S^tmnWj0#46T4tNBP?mEOBxPyu`=67HfC3}}a2iCCInBRdq zswL5$1IW*YqE4@(^VHQhFyLa*1#~;IV zg8yC$el-Oj-~%Y($olx@9{xuI%-jI;Y6|9WshHQ`6Vyr{^U45gXMCSNk3}X^u|9_{ z5G&FB^%SJJ6r@WjNCduw8>p|ou8ge{U44~;a5V)X2McJ;9bH{XwE-F6E~el hostsToContact; - private List portNumbers; - - private TransportClient client; - private DatabookStore store; - - private int count = 0; - - public SocialDataIndexerPlugin(){ - super(); - logger.debug("{} contructor", this.getClass().getSimpleName()); - } - - /**{@inheritDoc} - * @throws Exception */ - @Override - public void launch(Map inputs) throws Exception{ - - try{ - - logger.info("Reading scope from ScopeProvider"); - - String scope = ScopeProvider.instance.get(); - - logger.info("Scope read is " + scope); - - // connection to cassandra (remove the first / from the scope) - store = new DBCassandraAstyanaxImpl(scope.replaceFirst("/", "")); - - // retrieve ElasticSearch Endpoint and set hosts/port numbers (remove the first / from the scope) - ElasticSearchRunningCluster elasticCluster = new ElasticSearchRunningCluster(scope.replaceFirst("/", "")); - - // save info - clusterName = elasticCluster.getClusterName(); - hostsToContact = elasticCluster.getHosts(); - portNumbers = elasticCluster.getPorts(); - - logger.info("Creating elasticsearch client connection for hosts = " + hostsToContact + ", ports = " + portNumbers + " and " - + " cluster's name = " + clusterName); - - // set cluster's name to check and the sniff property to true. - // Cluster's name: each node must have this name. - // Sniff property: allows the client to recover cluster's structure. - // Look at https://www.elastic.co/guide/en/elasticsearch/client/java-api/current/transport-client.html - Settings settings = Settings.settingsBuilder() - .put("cluster.name", this.clusterName) // force unique cluster's name check - .put("client.transport.sniff", true) - .build(); - - // build the client - client = TransportClient.builder().settings(settings).build(); - - // add the nodes to contact - int reachableHosts = 0; - for (int i = 0; i < hostsToContact.size(); i++){ - try { - client.addTransportAddress( - new InetSocketTransportAddress( - InetAddress.getByName(hostsToContact.get(i)), portNumbers.get(i)) - ); - reachableHosts ++; - } catch (UnknownHostException e) { - logger.error("Error while adding " + hostsToContact.get(i) + ":" + portNumbers.get(i) + " as host to be contacted."); - } - } - - if(reachableHosts == 0){ - logger.error("Unable to reach elasticsearch cluster. Exiting ..."); - return; - } - - logger.info("Connection to ElasticSearch cluster done. Synchronization starts running..."); - final long init = System.currentTimeMillis(); - - // we build a index reachable under the path /social/enhanced_feed - List vreIds = store.getAllVREIds(); - - // save feeds & comments - for (String vreID : vreIds) { - try{ - List feeds = store.getAllFeedsByVRE(vreID); - addEnhancedFeedsInBulk(feeds, init); - logger.info("Number of indexed feeds is " + feeds.size() + " for vre " + vreID); - }catch(Exception e){ - logger.error("Exception while saving feeds/comments into the index for vre " + vreID, e); - continue; - } - - } - - logger.info("Inserted " + count + " docs into the index"); - - // refresh data (note that the index must be refreshed according to the new value of _timestamp) - client.admin().indices().prepareRefresh().execute().actionGet(); - - // delete documents with timestamp lower than init - deleteDocumentsWithTimestampLowerThan(init); - - long end = System.currentTimeMillis(); - logger.info("Synchronization thread ends running. It took " + (end - init) + " milliseconds " + - " that is " + (double)(end - init)/(1000.0 * 60.0) + " minutes."); - - }catch(Exception e){ - logger.error("Error while synchronizing data.", e); - throw e; - }finally{ - // close connection to elasticsearch - if(client != null){ - logger.info("Closing connection to elasticsearch cluster. " + client.toString()); - client.close(); - } - - // close connection to cassandra - if(store != null){ - logger.info("Closing connection to cassandra nodes. " + store.toString()); - store.closeConnection(); - } - } - } - - /** - * Add feeds into the elasticsearch index. - * @param feeds - * @param init is the timestamp that will be put in the document - * @throws BulkInsertionFailedException - */ - private void addEnhancedFeedsInBulk(List feeds, final long init) throws BulkInsertionFailedException { - logger.debug("Starting bulk insert enhanced feeds operation"); - BulkProcessor bulkProcessor = BulkProcessor.builder( - client, - new BulkProcessor.Listener() { - @Override - public void beforeBulk(long executionId, - BulkRequest request) { - logger.debug("Going to execute new bulk composed of {} actions", request.numberOfActions()); - } - @Override - public void afterBulk(long executionId, - BulkRequest request, - BulkResponse response) { - logger.debug("Executed bulk composed of {} actions", request.numberOfActions()); - if (response.hasFailures()) { - logger.warn("There was failures while executing bulk", response.buildFailureMessage()); - if (logger.isDebugEnabled()) { - for (BulkItemResponse item : response.getItems()) { - if (item.isFailed()) { - logger.debug("Error for {}/{}/{} for {} operation: {}", item.getIndex(), - item.getType(), item.getId(), item.getOpType(), item.getFailureMessage()); - } - } - } - } - } - - @Override - public void afterBulk(long executionId, - BulkRequest request, - Throwable failure) { - logger.error("Error executing bulk", failure); - if(failure instanceof NoNodeAvailableException){ - throw new RuntimeException("No node available. Exiting..."); - } - } - }) - .setBulkActions(1000) - .setBulkSize(new ByteSizeValue(5, ByteSizeUnit.MB)) - .setFlushInterval(TimeValue.timeValueSeconds(5)) - .setConcurrentRequests(0) - .setBackoffPolicy( - BackoffPolicy.exponentialBackoff(TimeValue.timeValueMillis(50), 8)) - .build(); - - // save feeds - for (Feed feed: feeds) { - - String enhFeedUUID = null; - try{ - // enhance and convert - String json = enhanceAndConvertToJson(feed); - enhFeedUUID = feed.getKey(); - IndexRequest ind = new IndexRequest(IndexFields.INDEX_NAME, IndexFields.EF_FEEDS_TABLE, enhFeedUUID)// set timestamp - .timestamp(String.valueOf(init)) // add json object - .source(json); - - // add - bulkProcessor.add(ind); - - count++; - }catch(Exception e){ - logger.error("Skip inserting feed with id " + enhFeedUUID, e); - } - } - - // close bulk operations - try { - bulkProcessor.awaitClose(60000, TimeUnit.MILLISECONDS); - } catch (InterruptedException e) { - logger.debug("Interrupted while waiting for awaitClose()", e); - } - } - - /** - * Build enhanced feed and convert to json - * @param feed to enhanced and convert - * @return json object - * @throws Exception - */ - private String enhanceAndConvertToJson(Feed feed) throws Exception { - - boolean isMultiFileUpload = feed.isMultiFileUpload(); - - // retrieve attachments - ArrayList attachments = new ArrayList(); - if (isMultiFileUpload) { - logger.debug("Retrieving attachments for feed with id="+feed.getKey()); - attachments = (ArrayList) store.getAttachmentsByFeedId(feed.getKey()); - } - - // retrieve comments - ArrayList comments = getAllCommentsByFeed(feed.getKey()); - - // build enhanced feed - EnhancedFeed enFeed = new EnhancedFeed(feed, false, false, comments, attachments); - - // convert to json - ObjectMapper mapper = new ObjectMapper(); - return mapper.writeValueAsString(enFeed); - } - - /** - * retrieve and sort comments given a feed id - * @param feedid - * @return - */ - private ArrayList getAllCommentsByFeed(String feedid) { - // logger.debug("Asking comments for " + feedid); - ArrayList toReturn = (ArrayList) store.getAllCommentByFeed(feedid); - Collections.sort(toReturn); - return toReturn; - } - - /** - * Delete disabled feeds in the index - * @param timestamp delete feeds whose _timestamp is lower than timestamp - * @return - */ - public void deleteDocumentsWithTimestampLowerThan(long timestamp) { - - logger.debug("Removing docs with timestamp lower than " + timestamp); - - // query on _timestamp field - BoolQueryBuilder filter = QueryBuilders.boolQuery(); - filter.must(QueryBuilders.matchAllQuery()); - filter.filter(QueryBuilders.rangeQuery("_timestamp").gte(0).lt(timestamp)); - - SearchResponse scrollResp = client.prepareSearch(IndexFields.INDEX_NAME) - .setSize(100) // get 100 elements at most at time - .setScroll(new TimeValue(60000)) // keep alive this query for 1 minute - .setQuery(filter) - .execute() - .actionGet(); - - int deleteDocs = 0; - - //Scroll until no more hits are returned - while (true) { - - for (SearchHit hit : scrollResp.getHits().getHits()) { - - String docID = hit.getId(); - DeleteResponse response = client.prepareDelete(IndexFields.INDEX_NAME, IndexFields.EF_FEEDS_TABLE, docID).get(); - //logger.debug("deleting doc with id = " + docID + "...found? " + response.isFound()); // found of course.. - if(response.isFound()) - deleteDocs ++; - - } - - // more enhanced feeds requested - scrollResp = client.prepareSearchScroll(scrollResp.getScrollId()).setScroll(new TimeValue(60000)).execute().actionGet(); - - //Break condition: No hits are returned - if (scrollResp.getHits().getHits().length == 0) { - logger.debug("No more hits to delete"); - break; - } - } - - logger.info("Number of delete documents is " + deleteDocs); - } - - /**{@inheritDoc}*/ - @Override - protected void onStop() throws Exception { - logger.debug("onStop()"); - Thread.currentThread().interrupt(); - } -} diff --git a/src/main/java/org/gcube/socialnetworking/socialdataindexer/utils/SendNotification.class b/src/main/java/org/gcube/socialnetworking/socialdataindexer/utils/SendNotification.class new file mode 100644 index 0000000000000000000000000000000000000000..f64b8ed43892414d1d2d3a44274ad842d7a93f58 GIT binary patch literal 8422 zcmeHMTW=dh6h51#@ugSN8?->T7r<$W4W%kjheGOX8qQy%Efn8y|SLr$7Dyam_p|H0Y zGTJNkn(?eLzii~;eKf%8+g!{Vo5TqP!!S(EQICpyXlN;l?aYb><>;qkNacdb8talA zT-V^#?lu^lGoFVJwbPd#dol{{fOK_-^?m9_d#?MOt-7Qi+|`SP&N|V%#BptoAm4VL z+dZOR#mp*4nN{AKSz8l{%qmBjbye>&66m-udfyh#x-L*K+4M1+l7caT%QAt>(%$kb zsEIA6eIIv1$Mw2nds68t(YJj)C?qn4vMfmv43C%+PR3+x!11_wDCLziVH)LG8 zLf^*<9z3zRhcqHc*|lWKH3x)q+9esVL_Qk>=3-f9Ud9q*(;@yCaaO00sRUf8TebQ2f)aLo={c^Aj%eb@aKsfw(vm(A>#VDHY2Yy2ZNuxf81+PH zMqlHs9}x@**7tH+Ec0tf_hhz664IwZfC&|qDm{)yv7l5%)Ix`hj#Dx0u;;{UaW=rD z-R51mYO!8ge{gAq&SlCmJzt^9htWKiEF&|yY*mvv9}!Nlb0r^ znl9wsE_oD^)Jrv)xry`py@W3^UW%Th<{s1-CwP{9d6w_Z=rqtnd_-NN9zG|mF+TcS z7Yi?}9T~v5f{b+Nb?^SyU7rlo!d7h?DwTtgE+s`KBJV^s2J7WPVrakT4 zrUZKP8kNi%-&LdPpo+#KT!YeaxC}EIoGa~byvX*#DH9K6BkZpd-jVl~?9edBc2~9- z%hu$iSf|)=vCOe|r?5wKHf}^kPb51GPJ`d&OmxuWbbx zu(Tj#EZGUcm~e;u7B8;E!?03ONL1-Vev6FgCHxkfr#|7x4Ek+?Tq3~!YQ1EpFxiyO zb4pz^lXSV7gE{a#+uJFN-ooL0-E**cgb#jr6E9K1ZSJfOb5Pgd zOv?3?gNOKvGkL}3U>VE}YPmy~kMQ$Fxgu7^ulskpr zRro5Bb^~?oO8YuR+E0GX>wex@cLWSXPQW5Oh}Nv&=XvzF S3QOqUw`hq84QN3dI{yH6$oJ*| literal 0 HcmV?d00001 diff --git a/src/main/java/org/gcube/socialnetworking/socialdataindexer/utils/SendNotification.java b/src/main/java/org/gcube/socialnetworking/socialdataindexer/utils/SendNotification.java deleted file mode 100644 index fbefd29..0000000 --- a/src/main/java/org/gcube/socialnetworking/socialdataindexer/utils/SendNotification.java +++ /dev/null @@ -1,176 +0,0 @@ -package org.gcube.socialnetworking.socialdataindexer.utils; - -import static org.gcube.resources.discovery.icclient.ICFactory.client; -import static org.gcube.resources.discovery.icclient.ICFactory.queryFor; - -import java.io.IOException; -import java.net.HttpURLConnection; -import java.util.List; -import java.util.Map; - -import org.apache.http.Header; -import org.apache.http.HttpResponse; -import org.apache.http.client.ClientProtocolException; -import org.apache.http.client.methods.HttpPost; -import org.apache.http.entity.ContentType; -import org.apache.http.entity.StringEntity; -import org.apache.http.impl.client.CloseableHttpClient; -import org.apache.http.impl.client.HttpClientBuilder; -import org.gcube.common.authorization.library.provider.SecurityTokenProvider; -import org.gcube.common.resources.gcore.GCoreEndpoint; -import org.gcube.common.scope.api.ScopeProvider; -import org.gcube.resources.discovery.client.api.DiscoveryClient; -import org.gcube.resources.discovery.client.queries.api.SimpleQuery; -import org.gcube.vremanagement.executor.plugin.PluginStateEvolution; -import org.gcube.vremanagement.executor.plugin.PluginStateNotification; -import org.json.simple.JSONObject; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * Send a notification to the interested person. - * @author Costantino Perciante at ISTI-CNR (costantino.perciante@isti.cnr.it) - */ -public class SendNotification extends PluginStateNotification { - - private Map pluginInputs; - private static Logger logger = LoggerFactory.getLogger(SendNotification.class); - private static final String NOTIFY_METHOD = "2/notifications/notify-job-status"; - private static final String resource = "jersey-servlet"; - private static final String serviceName = "SocialNetworking"; - private static final String serviceClass = "Portal"; - - // user to contact on exception via social-networking ws - private final static String RECIPIENT_KEY = "recipient"; - - // service name - private final static String SERVICE_NAME = "Smart-Executor"; - - public SendNotification(Map inputs) { - super(inputs); - this.pluginInputs = inputs; - } - - @SuppressWarnings("unchecked") - @Override - public void pluginStateEvolution(PluginStateEvolution pluginStateEvolution, - Exception exception) throws Exception { - - switch(pluginStateEvolution.getPluginState()){ - - // case DONE: - case STOPPED: - case FAILED: - case DISCARDED: - - // check what happened - String recipient = pluginInputs.get(RECIPIENT_KEY); - String basePath = discoverEndPoint(); - logger.info("Recipient of the notification is " + recipient + ". Base path found for the notification service is " + basePath); - - if(basePath != null && recipient != null){ - - basePath = basePath.endsWith("/") ? basePath : basePath + "/"; - basePath += NOTIFY_METHOD + "?gcube-token=" + SecurityTokenProvider.instance.get(); - basePath = basePath.trim(); - - try(CloseableHttpClient httpClient = HttpClientBuilder.create().build()){ - JSONObject obj = new JSONObject(); - obj.put("job_id", pluginStateEvolution.getUUID().toString()); - obj.put("recipient", recipient); - obj.put("job_name", pluginStateEvolution.getPluginDefinition().getName()); - obj.put("service_name", SERVICE_NAME); - // if(pluginStateEvolution.getPluginState().equals(PluginState.DONE)) - // obj.put("status", "SUCCEEDED"); - // else{ - obj.put("status", "FAILED"); - obj.put("status_message", "original status reported by " + SERVICE_NAME + " was " + pluginStateEvolution.getPluginState() - + ". Exception is " + exception != null ? exception.getMessage() : null); - // } - logger.debug("Request json is going to be " + obj.toJSONString()); - - HttpResponse response = performRequest(httpClient, basePath, obj.toJSONString()); - - logger.info(response.getStatusLine().getStatusCode() + " and response message is " + response.getStatusLine().getReasonPhrase()); - - int status = response.getStatusLine().getStatusCode(); - - if(status == HttpURLConnection.HTTP_OK){ - logger.info("Notification sent"); - } - else if(status == HttpURLConnection.HTTP_MOVED_TEMP - || status == HttpURLConnection.HTTP_MOVED_PERM - || status == HttpURLConnection.HTTP_SEE_OTHER){ - - // redirect -> fetch new location - Header[] locations = response.getHeaders("Location"); - Header lastLocation = locations[locations.length - 1]; - String realLocation = lastLocation.getValue(); - logger.info("New location is " + realLocation); - - response = performRequest(httpClient, realLocation, obj.toJSONString()); - - logger.info(" " + response.getStatusLine().getStatusCode() + " and response message is " + response.getStatusLine().getReasonPhrase()); - }else - logger.warn(" " + response.getStatusLine().getStatusCode() + " and response message is " + response.getStatusLine().getReasonPhrase()); - }catch (Exception e) { - logger.warn("Something failed when trying to notify the user", e); - } - } - break; - default: logger.info("No notification is going to be sent, because the status of the plugin execution is " + pluginStateEvolution.getPluginState().name()); - } - } - - /** - * Perform the post/json request - * @param httpClient - * @param path - * @param params - * @return - * @throws ClientProtocolException - * @throws IOException - */ - private static HttpResponse performRequest(CloseableHttpClient httpClient, String path, String params) throws ClientProtocolException, IOException{ - - HttpPost request = new HttpPost(path); - StringEntity paramsEntity = new StringEntity(params, ContentType.APPLICATION_JSON); - request.setEntity(paramsEntity); - return httpClient.execute(request); - - } - - /** - * Discover the social networking service base path. - * @return base path of the service. - */ - private static String discoverEndPoint(){ - String context = ScopeProvider.instance.get(); - String basePath = null; - try{ - - SimpleQuery query = queryFor(GCoreEndpoint.class); - query.addCondition(String.format("$resource/Profile/ServiceClass/text() eq '%s'",serviceClass)); - query.addCondition("$resource/Profile/DeploymentData/Status/text() eq 'ready'"); - query.addCondition(String.format("$resource/Profile/ServiceName/text() eq '%s'",serviceName)); - query.setResult("$resource/Profile/AccessPoint/RunningInstanceInterfaces//Endpoint[@EntryName/string() eq \""+resource+"\"]/text()"); - - DiscoveryClient client = client(); - List endpoints = client.submit(query); - if (endpoints == null || endpoints.isEmpty()) - throw new Exception("Cannot retrieve the GCoreEndpoint serviceName: "+serviceName +", serviceClass: " +serviceClass +", in scope: "+context); - - basePath = endpoints.get(0); - if(basePath==null) - throw new Exception("Endpoint:"+resource+", is null for serviceName: "+serviceName +", serviceClass: " +serviceClass +", in scope: "+context); - - logger.info("found entryname "+basePath+" for ckanResource: "+resource); - - }catch(Exception e){ - logger.error("Unable to retrieve such service endpoint information!", e); - } - - return basePath; - } - -} diff --git a/src/test/java/org/gcube/socialnetworking/socialdataindexer/Tests.class b/src/test/java/org/gcube/socialnetworking/socialdataindexer/Tests.class new file mode 100644 index 0000000000000000000000000000000000000000..a740a120865f57237ca43a0979142cfa949d9d78 GIT binary patch literal 2222 zcmeHIOK%e~5FR&alPrO>rMw??drB|Kg%d>x@u;Y@1*C)`j*jDQ+-~fZ?JeyuLjnoz z`~iLd{{u1JP1UH{Bn3oITz1FyH=k$5^Z54j(-#1E0BaSPBk;r;-gd&e_C7mgZEd1< z#M7Q=Tg@elm2e-lIglzEZSlUQ=;s7(`L zFv!X}lX9mG&7ZNkL8YZBzW1I~7>+$WL7Ano8%MY3PHLS$K@?@m$1f)yqYP?!9uyc$ zou-Vs<3yZ*wwSl#xBz>CC^#CY*lvUt3^PD4nH^l@eVsH(FlX#LW)!+$ zXPDQ?D)~7U?si_dZ{jqP>Yr$x=ZOOdpizekEE2fZ3{Oixf00e!8X6&H(yMgX6Q;|s z+6gR&nzMM98R^%f&9WOvOWEjHog5|_dy-s5<-?LKB&TN zLVirw$y(NVLR7oRbo!sZXPVFS${;Y$_MD$=K}V;Ci!JH%Gsvc4HXbUlinA_%X9D#d zX)Ts%7u%bKHNfeI^A{Ch9u`n4qg;V1erwrWE};Yve1_ota{VJ*`HHJKSi`ERan6l7SaTU>jeyrLWY|Y7;Y6XtQ0cbnZQtF!)gJ;9Nf)(y$2NkJ}&ov0rL2$ AZ2$lO literal 0 HcmV?d00001 diff --git a/src/test/java/org/gcube/socialnetworking/socialdataindexer/Tests.java b/src/test/java/org/gcube/socialnetworking/socialdataindexer/Tests.java deleted file mode 100644 index 8c16f13..0000000 --- a/src/test/java/org/gcube/socialnetworking/socialdataindexer/Tests.java +++ /dev/null @@ -1,34 +0,0 @@ -package org.gcube.socialnetworking.socialdataindexer; -import java.util.HashMap; -import java.util.Map; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -public class Tests { - - /** - * Logger - */ - private static Logger logger = LoggerFactory.getLogger(Tests.class); - - // @Before - public void beforeTest(){ - } - - // @Test - public void testLaunch() { - logger.debug("Starting to test launch"); - Map inputs = new HashMap(); - inputs.put("scope", "gcube"); - @SuppressWarnings("unused") - SocialDataIndexerPlugin plugin = new SocialDataIndexerPlugin(); - //uncomment for testing purpose - //plugin.launch(inputs); - logger.debug("-------------- launch test finished"); - } - - // @After - public void after(){ - - } -}