Changeset 6154 for SRUAggregator
- Timestamp:
- 04/22/15 08:25:01 (9 years ago)
- Location:
- SRUAggregator/trunk
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
SRUAggregator/trunk/aggregator.yml
r6132 r6154 14 14 15 15 SEARCH_MAX_CONCURRENT_REQUESTS_PER_ENDPOINT: 4 16 SEARCH_MAX_CONCURRENT_REQUESTS_PER_SLOW_ENDPOINT: 216 SEARCH_MAX_CONCURRENT_REQUESTS_PER_SLOW_ENDPOINT: 1 17 17 slowEndpoints: 18 18 - http://cqlservlet.mpi.nl/ 19 19 20 ENDPOINTS_SCAN_TIMEOUT_MS: 60000 20 ENDPOINTS_SCAN_TIMEOUT_MS: 600000 21 21 ENDPOINTS_SEARCH_TIMEOUT_MS: 30000 22 22 EXECUTOR_SHUTDOWN_TIMEOUT_MS: 1000 -
SRUAggregator/trunk/aggregator_devel.yml
r6132 r6154 14 14 15 15 SEARCH_MAX_CONCURRENT_REQUESTS_PER_ENDPOINT: 4 16 SEARCH_MAX_CONCURRENT_REQUESTS_PER_SLOW_ENDPOINT: 216 SEARCH_MAX_CONCURRENT_REQUESTS_PER_SLOW_ENDPOINT: 1 17 17 slowEndpoints: 18 18 - http://cqlservlet.mpi.nl/ -
SRUAggregator/trunk/build.sh
r6153 r6154 80 80 then 81 81 echo; echo "---- run devel" 82 JAR=`find target -iname ' Aggregator2-*.jar'`83 echo java -cp src/main/resources:$JAR eu.clarin.sru.fcs.aggregator.app.Aggregator server aggregator_devel opment.yml84 java -cp src/main/resources:$JAR eu.clarin.sru.fcs.aggregator.app.Aggregator server aggregator_devel opment.yml82 JAR=`find target -iname 'aggregator-*.jar'` 83 echo java -cp src/main/resources:$JAR eu.clarin.sru.fcs.aggregator.app.Aggregator server aggregator_devel.yml 84 java -cp src/main/resources:$JAR eu.clarin.sru.fcs.aggregator.app.Aggregator server aggregator_devel.yml 85 85 fi 86 86 … … 88 88 then 89 89 echo; echo "---- run production" 90 JAR=`find target -iname ' Aggregator2-*.jar'`90 JAR=`find target -iname 'aggregator-*.jar'` 91 91 echo java -jar $JAR server aggregator.yml 92 92 java -jar $JAR server aggregator.yml -
SRUAggregator/trunk/pom.xml
r6153 r6154 8 8 <groupId>eu.clarin.sru.fcs</groupId> 9 9 <artifactId>aggregator</artifactId> 10 <version>2.0.0-beta- 39</version>10 <version>2.0.0-beta-40</version> 11 11 <name>FCS Aggregator</name> 12 12 -
SRUAggregator/trunk/src/main/java/eu/clarin/sru/fcs/aggregator/search/Result.java
r6153 r6154 3 3 import eu.clarin.sru.client.SRUDiagnostic; 4 4 import eu.clarin.sru.client.SRURecord; 5 import eu.clarin.sru.client.SRUSearchRetrieveRequest;6 5 import eu.clarin.sru.fcs.aggregator.scan.Corpus; 7 6 import eu.clarin.sru.client.SRUSearchRetrieveResponse; … … 37 36 private final Corpus corpus; 38 37 private AtomicBoolean inProgress = new AtomicBoolean(true); 39 private AtomicInteger endpointReturnedRecords = new AtomicInteger();38 private AtomicInteger nextRecordPosition = new AtomicInteger(1); 40 39 private AtomicReference<JsonException> exception = new AtomicReference<JsonException>(); 41 40 private List<Diagnostic> diagnostics = Collections.synchronizedList(new ArrayList<Diagnostic>()); … … 69 68 } 70 69 } 70 if (response.getNextRecordPosition() > 0) { 71 nextRecordPosition.set(response.getNextRecordPosition()); 72 } 71 73 } 72 74 73 75 void addRecord(SRURecord record) { 74 // TODO(edima): use response.getNextRecordPosition() 75 endpointReturnedRecords.getAndIncrement(); 76 nextRecordPosition.incrementAndGet(); 76 77 if (record.isRecordSchema(ClarinFCSRecordData.RECORD_SCHEMA)) { 77 78 ClarinFCSRecordData rd = (ClarinFCSRecordData) record.getRecordData(); … … 144 145 } 145 146 146 public int get EndpointReturnedRecords() {147 return endpointReturnedRecords.get();147 public int getNextRecordPosition() { 148 return nextRecordPosition.get(); 148 149 } 149 150 -
SRUAggregator/trunk/src/main/java/eu/clarin/sru/fcs/aggregator/search/Search.java
r6153 r6154 63 63 for (Result r : results) { 64 64 if (r.getCorpus().getId().equals(corpusId)) { 65 executeSearch(r, query, r.get EndpointReturnedRecords() + 1, maxRecords);65 executeSearch(r, query, r.getNextRecordPosition(), maxRecords); 66 66 return true; 67 67 } -
SRUAggregator/trunk/src/main/resources/assets/js/main.js
r6153 r6154 3 3 "use strict"; 4 4 5 var VERSION = window.MyAggregator.VERSION = "VERSION 2.0.0-beta- 38";5 var VERSION = window.MyAggregator.VERSION = "VERSION 2.0.0-beta-40"; 6 6 7 7 var URLROOT = window.MyAggregator.URLROOT = -
SRUAggregator/trunk/src/main/resources/assets/js/main.jsx
r6153 r6154 3 3 "use strict"; 4 4 5 var VERSION = window.MyAggregator.VERSION = "VERSION 2.0.0-beta- 39";5 var VERSION = window.MyAggregator.VERSION = "VERSION 2.0.0-beta-40"; 6 6 7 7 var URLROOT = window.MyAggregator.URLROOT = -
SRUAggregator/trunk/src/main/resources/assets/js/search.js
r6153 r6154 763 763 } 764 764 return React.createElement("div", {className: "alert alert-warning", key: key}, 765 React.createElement("div", null, "Diagnostic: ",d.message)765 React.createElement("div", null, d.message) 766 766 ); 767 767 }, … … 878 878 getInitialState: function() { 879 879 return { 880 inProgress: false,880 forceUpdate: 1, // hack to force an update, used when searching for next results 881 881 }; 882 882 }, 883 883 884 componentWillReceiveProps: function() {885 this.setState({inProgress: false});886 },887 888 884 nextResults: function(e) { 889 this.setState({inProgress: true}); 885 this.props.corpusHit.inProgress = true; 886 this.setState({forceUpdate: this.state.forceUpdate+1}); 890 887 this.props.nextResults(this.props.corpusHit.corpus.id); 891 888 }, … … 899 896 900 897 renderMoreResults:function(){ 901 if (this. state.inProgress || this.props.corpusHit.inProgress)898 if (this.props.corpusHit.inProgress) 902 899 return React.createElement("span", {style: {fontStyle:'italic'}}, "Retrieving results, please wait..."); 903 900 -
SRUAggregator/trunk/src/main/resources/assets/js/search.jsx
r6153 r6154 763 763 } 764 764 return <div className="alert alert-warning" key={key}> 765 <div> Diagnostic:{d.message}</div>765 <div>{d.message}</div> 766 766 </div>; 767 767 }, … … 878 878 getInitialState: function() { 879 879 return { 880 inProgress: false,880 forceUpdate: 1, // hack to force an update, used when searching for next results 881 881 }; 882 882 }, 883 883 884 componentWillReceiveProps: function() {885 this.setState({inProgress: false});886 },887 888 884 nextResults: function(e) { 889 this.setState({inProgress: true}); 885 this.props.corpusHit.inProgress = true; 886 this.setState({forceUpdate: this.state.forceUpdate+1}); 890 887 this.props.nextResults(this.props.corpusHit.corpus.id); 891 888 }, … … 899 896 900 897 renderMoreResults:function(){ 901 if (this. state.inProgress || this.props.corpusHit.inProgress)898 if (this.props.corpusHit.inProgress) 902 899 return <span style={{fontStyle:'italic'}}>Retrieving results, please wait...</span>; 903 900
Note: See TracChangeset
for help on using the changeset viewer.