Index: metacat-index/src/main/java/edu/ucsb/nceas/metacat/index/event/IndexEvent.java
===================================================================
--- metacat-index/src/main/java/edu/ucsb/nceas/metacat/index/event/IndexEvent.java	(revision 7814)
+++ metacat-index/src/main/java/edu/ucsb/nceas/metacat/index/event/IndexEvent.java	(revision 7815)
@@ -23,6 +23,7 @@
 
 import java.util.Date;
 
+import org.dataone.service.types.v1.Event;
 import org.dataone.service.types.v1.Identifier;
 
 
@@ -33,34 +34,25 @@
  */
 public class IndexEvent {
     
-    public static final int SUCCESSINSERT = 0;
-    public static final int FAILUREINSERT = 6;
-    public static final int SUCCESSDELETE = 12;
-    public static final int FAILUREDELETE = 18;
-    public static final int STARTTIMEDINDEX = 24;
-    public static final int FINISHTIMEDINDEX = 30;
-    private int type = -1;
+    private Event action = null;
     private Date date = null;
-    private Identifier pid = null;
+    private Identifier identifier = null;
     private String description = null;
     
-    
-  
-
     /**
-     * Get the type of the event.
-     * @return the type of the event
+     * Get the action of the event.
+     * @return the action of the event
      */
-    public int getType() {
-        return this.type;
+    public Event getAction() {
+        return this.action;
     }
     
     /**
-     * Set the type of the event
-     * @param type
+     * Set the action of the event
+     * @param action
      */
-    public void setType(int type) {
-        this.type = type;
+    public void setAction(Event action) {
+        this.action = action;
     }
     
     /**
@@ -83,8 +75,8 @@
      * Get the identifier of the data object involving the event
      * @return
      */
-    public Identifier getPid() {
-        return pid;
+    public Identifier getIdentifier() {
+        return identifier;
     }
     
     /**
@@ -91,8 +83,8 @@
      * Set the identifier of the data object involving the event.
      * @param pid
      */
-    public void setPid(Identifier pid) {
-        this.pid = pid;
+    public void setIdentifier(Identifier pid) {
+        this.identifier = pid;
     }
     
     /**
Index: metacat-index/src/main/java/edu/ucsb/nceas/metacat/index/event/HazelcastIndexEventLog.java
===================================================================
--- metacat-index/src/main/java/edu/ucsb/nceas/metacat/index/event/HazelcastIndexEventLog.java	(nonexistent)
+++ metacat-index/src/main/java/edu/ucsb/nceas/metacat/index/event/HazelcastIndexEventLog.java	(revision 7815)
@@ -0,0 +1,97 @@
+/**
+ *  '$RCSfile$'
+ *    Purpose: A class which creates a instance of an IndexEventLog.
+ *    Copyright: 2013 Regents of the University of California and the
+ *             National Center for Ecological Analysis and Synthesis
+ *    Authors: Leinfelder
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+package edu.ucsb.nceas.metacat.index.event;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+import org.dataone.service.types.v1.Event;
+import org.dataone.service.types.v1.Identifier;
+
+import edu.ucsb.nceas.metacat.index.DistributedMapsFactory;
+
+/**
+ * @author leinfelder
+ *
+ */
+public class HazelcastIndexEventLog implements IndexEventLog {
+
+	/* (non-Javadoc)
+	 * @see edu.ucsb.nceas.metacat.index.event.IndexEventLog#write(edu.ucsb.nceas.metacat.index.event.IndexEvent)
+	 */
+	@Override
+	public void write(IndexEvent event) throws IndexEventLogException {
+		// write to the map
+		try {
+			DistributedMapsFactory.getIndexEventMap().put(event.getIdentifier(), event);
+		} catch (Exception e) {
+			throw new IndexEventLogException("Could not write to event map", e);
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see edu.ucsb.nceas.metacat.index.event.IndexEventLog#remove(java.lang.String)
+	 */
+	@Override
+	public void remove(Identifier identifier) throws IndexEventLogException {
+		// remove from the map
+		try {
+			DistributedMapsFactory.getIndexEventMap().remove(identifier);
+		} catch (Exception e) {
+			throw new IndexEventLogException("Could not remove from event map", e);
+		}
+
+	}
+
+	/* (non-Javadoc)
+	 * @see edu.ucsb.nceas.metacat.index.event.IndexEventLog#getEvents(int, org.dataone.service.types.v1.Identifier, java.util.Date, java.util.Date)
+	 */
+	@Override
+	public List<IndexEvent> getEvents(Event action, Identifier pid, Date start, Date end) throws IndexEventLogException {
+		try {
+			// TODO: query the map using the parameters
+			return new ArrayList<IndexEvent>(DistributedMapsFactory.getIndexEventMap().values());
+		} catch (Exception e) {
+			throw new IndexEventLogException("Could not remove from event map", e);
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see edu.ucsb.nceas.metacat.index.event.IndexEventLog#getLastProcessDate()
+	 */
+	@Override
+	public Date getLastProcessDate() throws IndexEventLogException {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	/* (non-Javadoc)
+	 * @see edu.ucsb.nceas.metacat.index.event.IndexEventLog#setLastProcessDate(java.util.Date)
+	 */
+	@Override
+	public void setLastProcessDate(Date date) throws IndexEventLogException {
+		// TODO Auto-generated method stub
+
+	}
+
+}

Property changes on: metacat-index/src/main/java/edu/ucsb/nceas/metacat/index/event/HazelcastIndexEventLog.java
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Revision
\ No newline at end of property
Index: metacat-index/src/main/java/edu/ucsb/nceas/metacat/index/event/IndexEventFileLog.java
===================================================================
--- metacat-index/src/main/java/edu/ucsb/nceas/metacat/index/event/IndexEventFileLog.java	(revision 7814)
+++ metacat-index/src/main/java/edu/ucsb/nceas/metacat/index/event/IndexEventFileLog.java	(revision 7815)
@@ -33,6 +33,7 @@
 
 import org.apache.commons.io.FileUtils;
 import org.dataone.configuration.Settings;
+import org.dataone.service.types.v1.Event;
 import org.dataone.service.types.v1.Identifier;
 
 
@@ -83,14 +84,14 @@
             Vector<String> lines = new Vector<String>();
             StringBuffer lineBuffer = new StringBuffer();
             lineBuffer.append("\""+index+"\""+FIELDSEPERATOR);
-            int type = event.getType();
-            lineBuffer.append("\""+type+"\""+FIELDSEPERATOR);
+            Event type = event.getAction();
+            lineBuffer.append("\"" + type.xmlValue() + "\"" + FIELDSEPERATOR);
             Date date = event.getDate();
             if(date != null) {
                 DateFormat formate = new SimpleDateFormat();
                 lineBuffer.append("\""+formate.format(date)+"\""+FIELDSEPERATOR);
             }
-            Identifier id = event.getPid();
+            Identifier id = event.getIdentifier();
             if(id != null) {
                 lineBuffer.append("\""+id.getValue()+"\""+FIELDSEPERATOR);
             }
@@ -120,7 +121,7 @@
     
     /**
      * Gets the list of IndexEvent matching the specified set of filters. The filter parameters can be null
-     * @param type  the type of the event
+     * @param action  the action of the event
      * @param pid   the identifier of the data object in the event
      * @param start the start time of the time range for query
      * @param end   the end time of the time range for query
@@ -127,22 +128,12 @@
      * @return
      * @throws IndexEventLogException
      */
-    public List<IndexEvent> getEvents(int type, Identifier pid, Date start, Date end) throws IndexEventLogException {
+    public List<IndexEvent> getEvents(Event action, Identifier pid, Date start, Date end) throws IndexEventLogException {
         List<IndexEvent> list = null;
         return list;
     }
     
-   
-    /**
-     * Get the list of identifiers which were failed to build the solr index since the 
-     * previous timed indexing (including the ones in the timed indexing).
-     * @return the list of failure identifiers. The null will be returned if no failure. 
-     */
-    public List<String> getFailedPids() throws IndexEventLogException {
-        return null;
-    }
     
-    
     /**
      * Get the latest SystemMetadata modification Date of the objects that were built
      * the solr index during the previous timed indexing process.
@@ -182,7 +173,7 @@
     }
     
 	@Override
-	public void remove(String identifier) throws IndexEventLogException {
+	public void remove(Identifier identifier) throws IndexEventLogException {
 		// TODO Auto-generated method stub
 		
 	}
Index: metacat-index/src/main/java/edu/ucsb/nceas/metacat/index/event/IndexEventLog.java
===================================================================
--- metacat-index/src/main/java/edu/ucsb/nceas/metacat/index/event/IndexEventLog.java	(revision 7814)
+++ metacat-index/src/main/java/edu/ucsb/nceas/metacat/index/event/IndexEventLog.java	(revision 7815)
@@ -24,6 +24,7 @@
 import java.util.Date;
 import java.util.List;
 
+import org.dataone.service.types.v1.Event;
 import org.dataone.service.types.v1.Identifier;
 
 /**
@@ -46,9 +47,8 @@
      * @param identifier
      * @throws IndexEventLogException
      */
-    public void remove(String identifier) throws IndexEventLogException;
+    public void remove(Identifier identifier) throws IndexEventLogException;
     
-    
     /**
      * Gets the list of IndexEvent matching the specified set of filters. The filter parameters can be null
      * @param type  the type of the event
@@ -58,17 +58,9 @@
      * @return
      * @throws IndexEventLogException
      */
-    public List<IndexEvent> getEvents(int type, Identifier pid, Date start, Date end) throws IndexEventLogException;
+    public List<IndexEvent> getEvents(Event action, Identifier pid, Date start, Date end) throws IndexEventLogException;
     
     /**
-     * Get the list of identifiers which were failed to build the solr index since the 
-     * previous timed indexing (including the ones in the timed indexing).
-     * @return the list of failure identifiers. The null will be returned if no failure. 
-     */
-    public List<String> getFailedPids() throws IndexEventLogException;
-    
-    
-    /**
      * Get the latest SystemMetadata modification Date of the objects that were built
      * the solr index during the previous timed indexing process.
      * @return the date. The null will be returned if there is no such date.
Index: metacat-index/src/main/java/edu/ucsb/nceas/metacat/index/SolrIndex.java
===================================================================
--- metacat-index/src/main/java/edu/ucsb/nceas/metacat/index/SolrIndex.java	(revision 7814)
+++ metacat-index/src/main/java/edu/ucsb/nceas/metacat/index/SolrIndex.java	(revision 7815)
@@ -58,8 +58,6 @@
 import org.apache.solr.common.SolrDocument;
 import org.apache.solr.common.SolrDocumentList;
 import org.apache.solr.common.SolrInputDocument;
-import org.apache.solr.common.util.NamedList;
-
 import org.dataone.cn.indexer.XMLNamespaceConfig;
 import org.dataone.cn.indexer.parser.IDocumentSubprocessor;
 import org.dataone.cn.indexer.parser.SolrField;
@@ -66,18 +64,17 @@
 import org.dataone.cn.indexer.resourcemap.ResourceEntry;
 import org.dataone.cn.indexer.resourcemap.ResourceMap;
 import org.dataone.cn.indexer.solrhttp.SolrDoc;
-import org.dataone.cn.indexer.solrhttp.SolrElementAdd;
 import org.dataone.cn.indexer.solrhttp.SolrElementField;
 import org.dataone.service.exceptions.NotFound;
 import org.dataone.service.exceptions.NotImplemented;
 import org.dataone.service.exceptions.ServiceFailure;
 import org.dataone.service.exceptions.UnsupportedType;
+import org.dataone.service.types.v1.Event;
 import org.dataone.service.types.v1.Identifier;
 import org.dataone.service.types.v1.SystemMetadata;
 import org.dataone.service.util.TypeMarshaller;
 import org.jibx.runtime.JiBXException;
 import org.w3c.dom.Document;
-import org.w3c.dom.NameList;
 import org.xml.sax.SAXException;
 
 import edu.ucsb.nceas.metacat.index.event.EventlogFactory;
@@ -397,7 +394,7 @@
                 event.setDate(Calendar.getInstance().getTime());
                 Identifier pid = new Identifier();
                 pid.setValue(doc.getIdentifier());
-                event.setPid(pid);
+                event.setIdentifier(pid);
                 try {
                     UpdateResponse response = solrServer.add(solrDoc);
                     solrServer.commit();
@@ -409,7 +406,7 @@
                         log.error("SolrIndex.insertToIndex - IndexEventLog can't log the index inserting event :"+e.getMessage());
                     }*/
                 } catch (SolrServerException e) {
-                    event.setType(IndexEvent.FAILUREINSERT);
+                    event.setAction(Event.CREATE);
                     event.setDescription("Failed to insert the solr index for the id "+pid.getValue()+" since "+e.getMessage());
                     try {
                         EventlogFactory.createIndexEventLog().write(event);
@@ -418,7 +415,7 @@
                     }
                     throw e;
                 } catch (IOException e) {
-                    event.setType(IndexEvent.FAILUREINSERT);
+                    event.setAction(Event.CREATE);
                     event.setDescription("Failed to insert the solr index for the id "+pid.getValue()+" since "+e.getMessage());
                     try {
                         EventlogFactory.createIndexEventLog().write(event);
@@ -628,7 +625,7 @@
             event.setDate(Calendar.getInstance().getTime());
             Identifier identifier = new Identifier();
             identifier.setValue(pid);
-            event.setPid(identifier);
+            event.setIdentifier(identifier);
             try {
                 solrServer.deleteById(pid);
                 solrServer.commit();
@@ -640,7 +637,7 @@
                     log.error("SolrIndex.removeFromIndex - IndexEventLog can't log the index deleting event :"+e.getMessage());
                 }*/
             } catch (SolrServerException e) {
-                event.setType(IndexEvent.FAILUREDELETE);
+                event.setAction(Event.DELETE);
                 event.setDescription("Failurely remove the solr index for the id "+identifier.getValue()+" since "+e.getMessage());
                 try {
                     EventlogFactory.createIndexEventLog().write(event);
@@ -650,7 +647,7 @@
                 throw e;
                 
             } catch (IOException e) {
-                event.setType(IndexEvent.FAILUREDELETE);
+                event.setAction(Event.DELETE);
                 event.setDescription("Failurely remove the solr index for the id "+identifier.getValue()+" since "+e.getMessage());
                 try {
                     EventlogFactory.createIndexEventLog().write(event);
Index: metacat-index/src/main/java/edu/ucsb/nceas/metacat/index/DistributedMapsFactory.java
===================================================================
--- metacat-index/src/main/java/edu/ucsb/nceas/metacat/index/DistributedMapsFactory.java	(revision 7814)
+++ metacat-index/src/main/java/edu/ucsb/nceas/metacat/index/DistributedMapsFactory.java	(revision 7815)
@@ -44,7 +44,9 @@
 import com.hazelcast.core.IMap;
 import com.hazelcast.core.ISet;
 
+import edu.ucsb.nceas.metacat.index.event.IndexEvent;
 
+
 /**
  * A factory to get distributed maps from the haszel cast client.
  * @author tao
@@ -69,7 +71,11 @@
     /* The Hazelcast distributed identifiers set */
     private static ISet<Identifier> identifiersSet = null;
     
-    /*
+    // for sending index events to metacat 
+    private static String hzIndexEventMap = null;
+    private static IMap<Identifier, IndexEvent> indexEventMap = null;
+    
+    /**
      * Start the hazel cast client
      */
     private static void startHazelCastClient() throws FileNotFoundException, ServiceFailure{
@@ -92,6 +98,9 @@
         // the index queue name to listen to
         hzIndexQueue = Settings.getConfiguration().getString("index.hazelcast.indexqueue");        
         
+        // the index event map name to send events to
+        hzIndexEventMap = Settings.getConfiguration().getString("index.hazelcast.indexeventmap");
+        
         // get config values
         hzSystemMetadata = Settings.getConfiguration().getString(
                 "dataone.hazelcast.storageCluster.systemMetadataMap");
@@ -251,4 +260,18 @@
         return indexQueue;
     }
     
+    /**
+     * Get the index event map
+     * @return the index event map for writing/reading events
+     * @throws FileNotFoundException
+     * @throws ServiceFailure
+     */
+    public static IMap<Identifier, IndexEvent> getIndexEventMap() throws FileNotFoundException, ServiceFailure {
+        if(hzClient == null) {
+            startHazelCastClient();
+        }
+        indexEventMap = hzClient.getMap(hzIndexEventMap);
+        return indexEventMap;
+    }
+    
 }
Index: metacat-index/src/main/java/edu/ucsb/nceas/metacat/index/IndexGenerator.java
===================================================================
--- metacat-index/src/main/java/edu/ucsb/nceas/metacat/index/IndexGenerator.java	(revision 7814)
+++ metacat-index/src/main/java/edu/ucsb/nceas/metacat/index/IndexGenerator.java	(revision 7815)
@@ -30,16 +30,13 @@
 import java.io.FileNotFoundException;
 import java.io.InputStream;
 import java.util.ArrayList;
-import java.util.Calendar;
 import java.util.Date;
 import java.util.List;
 import java.util.TimerTask;
-import java.util.Vector;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.solr.client.solrj.SolrServerException;
-import org.dataone.client.MNode;
 import org.dataone.configuration.Settings;
 import org.dataone.service.exceptions.InvalidRequest;
 import org.dataone.service.exceptions.InvalidToken;
@@ -48,8 +45,6 @@
 import org.dataone.service.exceptions.ServiceFailure;
 import org.dataone.service.types.v1.Identifier;
 import org.dataone.service.types.v1.ObjectFormatIdentifier;
-import org.dataone.service.types.v1.ObjectInfo;
-import org.dataone.service.types.v1.ObjectList;
 import org.dataone.service.types.v1.SystemMetadata;
 
 import com.hazelcast.core.IMap;
@@ -223,11 +218,12 @@
         }
         
         //add the failedPids 
-        List<String> failedPids = EventlogFactory.createIndexEventLog().getFailedPids();
+        List<IndexEvent> failedEvents = EventlogFactory.createIndexEventLog().getEvents(null, null, null, null);
         List<String> failedOtherIds = new ArrayList<String>();
         List<String> failedResourceMapIds = new ArrayList<String>();
-        if(failedPids != null) {
-            for(String id : failedPids) {
+        if(failedEvents != null) {
+            for(IndexEvent event : failedEvents) {
+            	String id = event.getIdentifier().getValue();
                 SystemMetadata sysmeta = getSystemMetadata(id);
                 if(sysmeta != null && !sysmeta.getArchived()) {
                     ObjectFormatIdentifier formatId =sysmeta.getFormatId();
Index: lib/metacat.properties
===================================================================
--- lib/metacat.properties	(revision 7814)
+++ lib/metacat.properties	(revision 7815)
@@ -596,6 +596,7 @@
 index.regenerate.interval=7200000
 index.eventlog.classname=edu.ucsb.nceas.metacat.index.event.IndexEventFileLog
 index.hazelcast.indexqueue=hzIndexQueue
+index.hazelcast.indexeventmap=hzIndexEventMap
 
 ############# SOLR Search Section ###########################################
 #Embedded (default):
