removed old dts filter
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/content-management/storage-manager-trigger@134085 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
1a700634da
commit
d6ef341506
2
pom.xml
2
pom.xml
|
@ -8,7 +8,7 @@
|
|||
</parent>
|
||||
<groupId>org.gcube.contentmanagement</groupId>
|
||||
<artifactId>storage-manager-trigger</artifactId>
|
||||
<version>1.5.0-SNAPSHOT</version>
|
||||
<version>1.6.0-SNAPSHOT</version>
|
||||
<scm>
|
||||
<connection>scm:svn:http://svn.d4science.research-infrastructures.eu/gcube/trunk/content-management/${project.artifactId}</connection>
|
||||
<developerConnection>scm:svn:https://svn.d4science.research-infrastructures.eu/gcube/trunk/content-management/${project.artifactId}</developerConnection>
|
||||
|
|
|
@ -69,19 +69,21 @@ public class UserAccountingConsumer extends Thread{
|
|||
}
|
||||
|
||||
public void run() {
|
||||
logger.info("Sniffing is started ");
|
||||
while(true){
|
||||
DBObject x=null;
|
||||
MongoDB mongo=null;
|
||||
try{
|
||||
logger.info("Waiting next record... ");
|
||||
x=c.get();
|
||||
logger.debug("Consumer #" + this.number + " got: " + x);
|
||||
logger.info("Consumer #" + this.number + " got: " + x);
|
||||
op = (String) x.get("op");
|
||||
// retrieve object fields
|
||||
DBObject obj=(DBObject)x.get("o");
|
||||
OpLogRemoteObject record=retrieveObjectFields(obj);
|
||||
// set object dimension
|
||||
|
||||
logger.debug("[recordCheck] operation: "+op+" name: "+record.getName()+" type: "+record.getType()+" path: "+record.getFilename()+" dir Path: "+record.getDir()+" length: "+record.getLength()+" owner: "+record.getOwner()+ " lastOperation "+record.getLastOperation()+" lastUser: "+record.getLastUser()+" lastAccess: "+record.getLastAccess());
|
||||
logger.info("[recordCheck] operation: "+op+" name: "+record.getName()+" type: "+record.getType()+" path: "+record.getFilename()+" dir Path: "+record.getDir()+" length: "+record.getLength()+" owner: "+record.getOwner()+ " lastOperation "+record.getLastOperation()+" lastUser: "+record.getLastUser()+" lastAccess: "+record.getLastAccess());
|
||||
if(((record.getLength() >0) && (((record.getFilename() !=null) && (record.getFilename().length()>0) && (record.getDir().length()>0)&& (record.getDir().contains("/"))) || (record.getLinkCount() > 0)))){
|
||||
//convert from byte to kb
|
||||
record.setLength(record.getLength()/1024);
|
||||
|
@ -155,8 +157,8 @@ public class UserAccountingConsumer extends Thread{
|
|||
}
|
||||
|
||||
}catch(Exception e){
|
||||
e.printStackTrace();
|
||||
logger.error("ERROR Processing record: "+x+" Exception throws: "+e.getStackTrace());
|
||||
logger.error(" "+e.getCause().getLocalizedMessage());
|
||||
logger.error("ERROR Processing record: "+x+" Exception throws: "+e.getMessage());
|
||||
logger.info("skip to next record ");
|
||||
if(mongo!=null)
|
||||
mongo.close();
|
||||
|
|
|
@ -14,13 +14,13 @@ public class ValidationUtils {
|
|||
private static final Logger logger = LoggerFactory.getLogger(ValidationUtils.class);
|
||||
|
||||
public static boolean validationScope(String scope){
|
||||
logger.debug("scope Validation for scope "+scope);
|
||||
logger.info("scope Validation for scope "+scope);
|
||||
ScopeBean scopeBean=new ScopeBean(scope);
|
||||
if((scopeBean.is(Type.VRE)))
|
||||
scope=scopeBean.enclosingScope().toString();
|
||||
Set<String> scopeSet=new ServiceMapScannerMediator().getScopeKeySet();
|
||||
for(String scopeItem : scopeSet){
|
||||
logger.debug("scope scanned: "+scopeItem);
|
||||
logger.info("scope scanned: "+scopeItem);
|
||||
if(scope.equals(scopeItem))
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -35,11 +35,7 @@ public class Startup {
|
|||
}
|
||||
scope=args[0];
|
||||
String oplogServer= args[1];
|
||||
// if(args.length == 4){
|
||||
// user=args[2];
|
||||
// password=args[3];
|
||||
// }
|
||||
Configuration cfg=new Configuration(scope, true);
|
||||
Configuration cfg=new Configuration(scope, false);
|
||||
String[] server=retrieveServerConfiguration(cfg);
|
||||
|
||||
List<String> dtsHosts=retrieveDTSConfiguration(cfg);
|
||||
|
|
|
@ -80,6 +80,7 @@ public class MongoDB {
|
|||
|
||||
|
||||
public StorageStatusObject updateUserVolume(StorageStatusObject ssRecord, String operation){
|
||||
logger.debug("updating user volume");
|
||||
ssRecord= ssOperationManager.updateUser(ssRecord, operation);
|
||||
close();
|
||||
return ssRecord;
|
||||
|
|
Loading…
Reference in New Issue