From 83e2827e4af044aea78f6443665d9ae655d7d0b2 Mon Sep 17 00:00:00 2001 From: goodb Date: Fri, 28 Feb 2020 15:40:52 -0800 Subject: [PATCH] require golr server specification for command line run defaulting to hammering the public golr endpoint not a great idea. --- .../minerva/cli/CommandLineInterface.java | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/minerva-cli/src/main/java/org/geneontology/minerva/cli/CommandLineInterface.java b/minerva-cli/src/main/java/org/geneontology/minerva/cli/CommandLineInterface.java index 40f4d950..defe6af8 100644 --- a/minerva-cli/src/main/java/org/geneontology/minerva/cli/CommandLineInterface.java +++ b/minerva-cli/src/main/java/org/geneontology/minerva/cli/CommandLineInterface.java @@ -294,7 +294,11 @@ public static void main(String[] args) { String golr_server = null; if(cmd.hasOption("golr")) { golr_server = cmd.getOptionValue("golr"); - } + } + if(golr_server==null) { + System.err.println("Need to specify a golr server - should be a local instance for any large batch run. e.g. -golr http://127.0.0.1:8080/solr/"); + System.exit(-1); + } validateGoCams(input, basicOutputFile, explanationOutputFile, ontologyIRI, catalog, modelIdPrefix, modelIdcurie, shexpath, shapemappath, travisMode, shouldFail, checkShex, golr_server, gorules_json_output_file); }else if(cmd.hasOption("update-gene-product-types")) { Options options = new Options(); @@ -680,9 +684,13 @@ public static void validateGoCams(String input, String basicOutputFile, String e org.apache.commons.io.FileUtils.copyURLToFile(shex_map_url, shex_map_file); System.err.println("-m .No shape map file provided, using: "+goshapemapFileUrl); } - String golr_url = "http://noctua-golr.berkeleybop.org/"; + //don't want to hammer the public golr server.. + //String golr_url = "http://noctua-golr.berkeleybop.org/"; + String golr_url = null; if(golr_server!=null) { golr_url = golr_server; + }else { + System.err.println("Need to specify a golr server - should be a local instance for any large batch run. e.g. -golr http://127.0.0.1:8080/solr/"); } ExternalLookupService externalLookupService = new GolrExternalLookupService(golr_url, curieHandler, false); LOGGER.info("making shex validator: "+shexpath+" "+shapemappath+" "+curieHandler+" ");