summaryrefslogtreecommitdiffstats
path: root/src/main/java/org
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/org')
-rw-r--r--src/main/java/org/openecomp/sparky/synchronizer/AggregationSynchronizer.java1
-rw-r--r--src/main/java/org/openecomp/sparky/synchronizer/CrossEntityReferenceSynchronizer.java7
-rw-r--r--src/main/java/org/openecomp/sparky/synchronizer/ElasticSearchIndexCleaner.java13
3 files changed, 14 insertions, 7 deletions
diff --git a/src/main/java/org/openecomp/sparky/synchronizer/AggregationSynchronizer.java b/src/main/java/org/openecomp/sparky/synchronizer/AggregationSynchronizer.java
index 2d7429c..2fd67c3 100644
--- a/src/main/java/org/openecomp/sparky/synchronizer/AggregationSynchronizer.java
+++ b/src/main/java/org/openecomp/sparky/synchronizer/AggregationSynchronizer.java
@@ -632,6 +632,7 @@ public class AggregationSynchronizer extends AbstractEntitySynchronizer
"Could not deserialize JSON (representing operation result) as node tree. " +
"Operation result = " + jsonResult + ". " + exc.getLocalizedMessage();
LOG.error(AaiUiMsgs.JSON_PROCESSING_ERROR, message);
+ return;
}
JsonNode resultData = rootNode.get("result-data");
diff --git a/src/main/java/org/openecomp/sparky/synchronizer/CrossEntityReferenceSynchronizer.java b/src/main/java/org/openecomp/sparky/synchronizer/CrossEntityReferenceSynchronizer.java
index c825040..1e3e85c 100644
--- a/src/main/java/org/openecomp/sparky/synchronizer/CrossEntityReferenceSynchronizer.java
+++ b/src/main/java/org/openecomp/sparky/synchronizer/CrossEntityReferenceSynchronizer.java
@@ -338,7 +338,10 @@ public class CrossEntityReferenceSynchronizer extends AbstractEntitySynchronizer
try {
rootNode = mapper.readTree(jsonResult);
} catch (IOException exc) {
- // TODO // TODO -> LOG, waht should be logged here?
+ String message = "Could not deserialize JSON (representing operation result) as node tree. "
+ + "Operation result = " + jsonResult + ". " + exc.getLocalizedMessage();
+ LOG.error(AaiUiMsgs.JSON_PROCESSING_ERROR, message);
+ return;
}
JsonNode resultData = rootNode.get("result-data");
@@ -576,7 +579,7 @@ public class CrossEntityReferenceSynchronizer extends AbstractEntitySynchronizer
}
} else {
- String message = "Entity sync failed because AAI query failed with error " + aaiQueryResult.getResult();
+ String message = "Entity sync failed because AAI query failed with error ";
LOG.error(AaiUiMsgs.ENTITY_SYNC_FAILED_QUERY_ERROR, message);
}
diff --git a/src/main/java/org/openecomp/sparky/synchronizer/ElasticSearchIndexCleaner.java b/src/main/java/org/openecomp/sparky/synchronizer/ElasticSearchIndexCleaner.java
index b23764c..9ef4fe6 100644
--- a/src/main/java/org/openecomp/sparky/synchronizer/ElasticSearchIndexCleaner.java
+++ b/src/main/java/org/openecomp/sparky/synchronizer/ElasticSearchIndexCleaner.java
@@ -521,11 +521,6 @@ public class ElasticSearchIndexCleaner implements IndexCleaner {
}
JsonNode rootNode = parseElasticSearchResult(opResult.getResult());
- boolean timedOut = Boolean.parseBoolean(getFieldValue(rootNode, "timed_out"));
- final String tookStr = getFieldValue(rootNode, "took");
- int tookInMs = (tookStr == null) ? 0 : Integer.parseInt(tookStr);
-
- JsonNode hitsNode = rootNode.get("hits");
/*
* Check the result for success / failure, and enumerate all the index ids that resulted in
@@ -533,6 +528,11 @@ public class ElasticSearchIndexCleaner implements IndexCleaner {
*/
if (rootNode != null) {
+ boolean timedOut = Boolean.parseBoolean(getFieldValue(rootNode, "timed_out"));
+ final String tookStr = getFieldValue(rootNode, "took");
+ int tookInMs = (tookStr == null) ? 0 : Integer.parseInt(tookStr);
+
+ JsonNode hitsNode = rootNode.get("hits");
if (timedOut) {
LOG.info(AaiUiMsgs.COLLECT_TIME_WITH_ERROR, "Scroll Context", String.valueOf(tookInMs));
@@ -576,6 +576,9 @@ public class ElasticSearchIndexCleaner implements IndexCleaner {
}
}
+ } else {
+ // scroll context get failed, nothing else to do
+ LOG.error(AaiUiMsgs.ERROR_GENERIC, opResult.toString());
}
return OperationState.OK;