import org.openecomp.cl.eelf.LoggerFactory;
import org.openecomp.sparky.config.oxm.OxmEntityDescriptor;
import org.openecomp.sparky.dal.NetworkTransaction;
+import org.openecomp.sparky.dal.aai.config.ActiveInventoryConfig;
import org.openecomp.sparky.dal.elasticsearch.config.ElasticSearchConfig;
import org.openecomp.sparky.dal.rest.HttpMethod;
import org.openecomp.sparky.dal.rest.OperationResult;
oxmModelLoader.getSearchableEntityDescriptors());
this.esEntityStats.initializeCountersFromOxmEntityDescriptors(
oxmModelLoader.getSearchableEntityDescriptors());
+ this.syncDurationInMs = -1;
}
/**
*/
@Override
public OperationState doSync() {
+ this.syncDurationInMs = -1;
String txnID = NodeUtils.getRandomTxnId();
MdcContext.initialize(txnID, "SearchableEntitySynchronizer", "", "Sync", "");
if (jsonResult != null && jsonResult.length() > 0) {
SearchableEntity se = new SearchableEntity(oxmModelLoader);
- se.setLink( txn.getLink() );
+ se.setLink(ActiveInventoryConfig.extractResourcePath(txn.getLink()));
populateSearchableEntityDocument(se, jsonResult, txn.getDescriptor());
se.deriveFields();
*/
@Override
public String getStatReport(boolean showFinalReport) {
- return this.getStatReport(System.currentTimeMillis() - syncStartedTimeStampInMs,
- showFinalReport);
+ syncDurationInMs = System.currentTimeMillis() - syncStartedTimeStampInMs;
+ return this.getStatReport(syncDurationInMs, showFinalReport);
}
/* (non-Javadoc)