Project

General

Profile

« Previous | Next » 

Revision 9988

Added by Jing Tao about 8 years ago

Add more log information.

View differences:

src/edu/ucsb/nceas/metacat/index/MetacatSolrIndex.java
178 178
    	IndexTask task = new IndexTask();
179 179
    	task.setSystemMetadata(systemMetadata);
180 180
    	task.setFields(fields);
181
    	if(pid != null) {
182
    	    log.debug("MetacatSolrIndex.submit - will put the pid "+pid.getValue()+" into the index queue on hazelcast service.");
183
    	}
184
    	
181 185
		HazelcastService.getInstance().getIndexQueue().put(pid, task);
182 186
		
187
		if(pid != null) {
188
            log.info("MetacatSolrIndex.submit - put the pid "+pid.getValue()+" into the index queue on hazelcast service successfully.");
189
        }
190
		
183 191
		// submit older revisions recursively otherwise they stay in the index!
184 192
		if (followRevisions && systemMetadata != null && systemMetadata.getObsoletes() != null) {
185 193
			Identifier obsoletedPid = systemMetadata.getObsoletes();
186 194
			SystemMetadata obsoletedSysMeta = HazelcastService.getInstance().getSystemMetadataMap().get(obsoletedPid);
187 195
		    Map<String, List<Object>> obsoletedFields = EventLog.getInstance().getIndexFields(obsoletedPid, Event.READ.xmlValue());
196
		    if(obsoletedPid != null && pid != null) {
197
	            log.debug("MetacatSolrIndex.submit - We will index the old version  "+obsoletedPid.getValue()+" of the object "+ pid.getValue() +
198
	                    " as well. So we put "+obsoletedPid.getValue()+" into the index queue on hazelcast service.");
199
	        }
188 200
			this.submit(obsoletedPid, obsoletedSysMeta , obsoletedFields, followRevisions);
189 201
		}
190 202
    }

Also available in: Unified diff