added check on identifier, before indexing
This commit is contained in:
parent
899f3eb4d9
commit
665a717ca0
|
@ -398,6 +398,9 @@ public class GraphDBClient {
|
|||
public String indexOnESByIdentifier(String datasource, String collectionId, String resourceType, String identifier) throws AriadnePlusPublisherException {
|
||||
String report = "";
|
||||
try {
|
||||
if (StringUtils.isBlank(identifier)) {
|
||||
return "empty identifier";
|
||||
}
|
||||
List <String> identifiers = Arrays.asList(identifier);
|
||||
log.info("Start indexing from "+ datasource + " " + collectionId);
|
||||
runSPQRLQuery.setupConnection( getWriterUser(), getWriterPwd(), this.graphDBServerUrl, getRepository());
|
||||
|
|
|
@ -163,7 +163,11 @@ public class RunSPARQLQueryService {
|
|||
return bulkUpload.index(resourceManager, isCollection);
|
||||
} catch (HTTPQueryEvaluationException qe) {
|
||||
log.error(qe);
|
||||
return -5;
|
||||
if (qe.getMessage()!=null &&
|
||||
qe.getMessage().contains("Insufficient free Heap Memory")) {
|
||||
return -5;
|
||||
}
|
||||
return -6;
|
||||
} catch(Exception e){
|
||||
log.error(e);
|
||||
return -1;
|
||||
|
|
Loading…
Reference in New Issue