Alessandro Pieve 2016-07-29 13:25:30 +00:00
parent e446bed8b4
commit dc3804ae7f
3 changed files with 32 additions and 7 deletions

26
pom.xml
View File

@ -34,6 +34,7 @@
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>org.gcube.vremanagement</groupId>
@ -43,9 +44,23 @@
</dependency>
<dependency>
<groupId>org.gcube.common</groupId>
<artifactId>common-authorization</artifactId>
</dependency>
<dependency>
<groupId>org.gcube.common</groupId>
<artifactId>authorization-client</artifactId>
</dependency>
<dependency>
<groupId>org.gcube.core</groupId>
<artifactId>common-scope</artifactId>
<scope>provided</scope>
</dependency>
<!-- Home Library -->
<dependency>
@ -61,7 +76,7 @@
<scope>compile</scope>
</dependency>
<!-- END Home Library -->
<dependency>
<groupId>org.gcube.common</groupId>
<artifactId>common-authorization</artifactId>
@ -70,6 +85,7 @@
<dependency>
<groupId>org.gcube.common</groupId>
<artifactId>authorization-client</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
@ -92,19 +108,21 @@
</dependency>
<!-- END CouchBase libraries -->
<!-- Document Store and accounting lib -->
<dependency>
<dependency>
<groupId>org.gcube.data.publishing</groupId>
<artifactId>document-store-lib-couchbase</artifactId>
<version>[1.0.1-SNAPSHOT, 2.0.0-SNAPSHOT)</version>
</dependency>
<dependency>
<artifactId>document-store-lib</artifactId>
<groupId>org.gcube.data.publishing</groupId>
<scope>provided</scope>
<groupId>org.gcube.data.publishing</groupId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.gcube.accounting</groupId>
<artifactId>accounting-lib</artifactId>
<version>[2.2.0-SNAPSHOT,2.3.0-SNAPSHOT)</version>
<scope>provided</scope>
</dependency>
<dependency>

View File

@ -90,6 +90,9 @@ public class AccountingAggregatorPlugin extends Plugin<AccountingAggregatorPlugi
@Override
public void launch(Map<String, Object> inputs) throws Exception {
countInsert=0;
countDelete=0;
if(inputs == null || inputs.isEmpty()){
logger.debug("{} inputs {}", this.getClass().getSimpleName(), inputs);
throw new Exception("Inputs null");
@ -127,6 +130,8 @@ public class AccountingAggregatorPlugin extends Plugin<AccountingAggregatorPlugi
//String scopeDebug="/gcube/devNext";
//ScopeProvider.instance.set(scopeDebug);
// END FOR DEBUG
logger.trace("Launch with Type:{}, Interval:{}, startTime:{}, Scope:{}, Recovery:{}",aggType.toString(),interval,inputStartTime,scope,RecoveryMode);
//Get Configuration from service end point
@ -155,7 +160,7 @@ public class AccountingAggregatorPlugin extends Plugin<AccountingAggregatorPlugi
throw e;
}
Cluster cluster = CouchbaseCluster.create(ENV, url);
//Define a type for aggregate

View File

@ -33,9 +33,11 @@ public class Tests {
//change to time
inputs.put("startTime", 10);
//specify bucket
inputs.put("bucket","accounting_service");
//inputs.put("bucket","accounting_service");
//current scope
inputs.put("currentScope",false);
inputs.put("currentScope",true);
//specify user for save to workspace
//specify a recovery 0 default recovery and aggregate, 1 only aggregate, 2 only recovery