Some todo added

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/social-networking/social-data-indexer-se-plugin@128910 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Costantino Perciante 2016-05-31 07:27:14 +00:00
parent 579cc4b4b1
commit 48d0d26ed3
1 changed files with 11 additions and 4 deletions

View File

@ -29,7 +29,6 @@ import org.elasticsearch.common.unit.TimeValue;
import org.elasticsearch.index.query.BoolQueryBuilder;
import org.elasticsearch.index.query.QueryBuilders;
import org.elasticsearch.search.SearchHit;
import org.gcube.common.scope.api.ScopeProvider;
import org.gcube.portal.databook.server.DBCassandraAstyanaxImpl;
import org.gcube.portal.databook.server.DatabookStore;
import org.gcube.portal.databook.shared.Attachment;
@ -82,10 +81,18 @@ public class SocialDataIndexerPlugin extends Plugin<SocialDataIndexerPluginDecla
public void launch(Map<String, Object> inputs){
try{
// TODO auth 2.0 doesn't allow scope set anymore, we will need to pass a valid token
// for the scope in which we would like the plugin to be run
// TODO in the next release this will be changed.
String scope = ScopeProvider.instance.get();
String scope = null;
// retrieve the scope from inputs, if any
if(inputs.containsKey("scope"))
scope = (String) inputs.get("scope");
else
logger.error("Scope variable is not set. The context will be evaluated later...");
// connection to cassandra
store = new DBCassandraAstyanaxImpl(scope);
@ -131,7 +138,7 @@ public class SocialDataIndexerPlugin extends Plugin<SocialDataIndexerPluginDecla
return;
}
logger.debug("Connection to ElasticSearch cluster done. Synchronization starts running...");
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