Revision 7815
Added by ben leinfelder almost 11 years ago
IndexGenerator.java | ||
---|---|---|
30 | 30 |
import java.io.FileNotFoundException; |
31 | 31 |
import java.io.InputStream; |
32 | 32 |
import java.util.ArrayList; |
33 |
import java.util.Calendar; |
|
34 | 33 |
import java.util.Date; |
35 | 34 |
import java.util.List; |
36 | 35 |
import java.util.TimerTask; |
37 |
import java.util.Vector; |
|
38 | 36 |
|
39 | 37 |
import org.apache.commons.logging.Log; |
40 | 38 |
import org.apache.commons.logging.LogFactory; |
41 | 39 |
import org.apache.solr.client.solrj.SolrServerException; |
42 |
import org.dataone.client.MNode; |
|
43 | 40 |
import org.dataone.configuration.Settings; |
44 | 41 |
import org.dataone.service.exceptions.InvalidRequest; |
45 | 42 |
import org.dataone.service.exceptions.InvalidToken; |
... | ... | |
48 | 45 |
import org.dataone.service.exceptions.ServiceFailure; |
49 | 46 |
import org.dataone.service.types.v1.Identifier; |
50 | 47 |
import org.dataone.service.types.v1.ObjectFormatIdentifier; |
51 |
import org.dataone.service.types.v1.ObjectInfo; |
|
52 |
import org.dataone.service.types.v1.ObjectList; |
|
53 | 48 |
import org.dataone.service.types.v1.SystemMetadata; |
54 | 49 |
|
55 | 50 |
import com.hazelcast.core.IMap; |
... | ... | |
223 | 218 |
} |
224 | 219 |
|
225 | 220 |
//add the failedPids |
226 |
List<String> failedPids = EventlogFactory.createIndexEventLog().getFailedPids();
|
|
221 |
List<IndexEvent> failedEvents = EventlogFactory.createIndexEventLog().getEvents(null, null, null, null);
|
|
227 | 222 |
List<String> failedOtherIds = new ArrayList<String>(); |
228 | 223 |
List<String> failedResourceMapIds = new ArrayList<String>(); |
229 |
if(failedPids != null) { |
|
230 |
for(String id : failedPids) { |
|
224 |
if(failedEvents != null) { |
|
225 |
for(IndexEvent event : failedEvents) { |
|
226 |
String id = event.getIdentifier().getValue(); |
|
231 | 227 |
SystemMetadata sysmeta = getSystemMetadata(id); |
232 | 228 |
if(sysmeta != null && !sysmeta.getArchived()) { |
233 | 229 |
ObjectFormatIdentifier formatId =sysmeta.getFormatId(); |
Also available in: Unified diff
refactor IndexEventLog a bit to simplify type/action information. prep for serializing IndexEvent objects to Metacat. https://projects.ecoinformatics.org/ecoinfo/issues/5944