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