Added more descriptive information to operator start/finish logs

git-svn-id: https://hyracks.googlecode.com/svn/trunk/hyracks@164 123451ca-8445-de46-9d55-352943316053
diff --git a/hyracks-api/src/main/java/edu/uci/ics/hyracks/api/dataflow/IOperatorNodePushable.java b/hyracks-api/src/main/java/edu/uci/ics/hyracks/api/dataflow/IOperatorNodePushable.java
index 5487832..62797ac 100644
--- a/hyracks-api/src/main/java/edu/uci/ics/hyracks/api/dataflow/IOperatorNodePushable.java
+++ b/hyracks-api/src/main/java/edu/uci/ics/hyracks/api/dataflow/IOperatorNodePushable.java
@@ -28,4 +28,6 @@
     public void setOutputFrameWriter(int index, IFrameWriter writer, RecordDescriptor recordDesc);
 
     public IFrameWriter getInputFrameWriter(int index);
+
+    public String getDisplayName();
 }
\ No newline at end of file
diff --git a/hyracks-control-nc/src/main/java/edu/uci/ics/hyracks/control/nc/Stagelet.java b/hyracks-control-nc/src/main/java/edu/uci/ics/hyracks/control/nc/Stagelet.java
index 3ffb39d..5631d58 100644
--- a/hyracks-control-nc/src/main/java/edu/uci/ics/hyracks/control/nc/Stagelet.java
+++ b/hyracks-control-nc/src/main/java/edu/uci/ics/hyracks/control/nc/Stagelet.java
@@ -114,12 +114,14 @@
                 }
                 try {
                     LOGGER.log(Level.INFO, joblet.getJobId() + ":" + stageId + ":" + opIId.getOperatorId() + ":"
-                            + opIId.getPartition() + "(" + hon + ")" + ": STARTING");
+                            + opIId.getPartition() + "(" + hon + ")" + ": STARTED");
                     hon.run();
                     LOGGER.log(Level.INFO, joblet.getJobId() + ":" + stageId + ":" + opIId.getOperatorId() + ":"
-                            + opIId.getPartition() + "(" + hon + ")" + ": TERMINATED");
+                            + opIId.getPartition() + "(" + hon + ")" + ": FINISHED");
                     notifyOperatorCompletion(opIId);
                 } catch (Exception e) {
+                    LOGGER.log(Level.INFO, joblet.getJobId() + ":" + stageId + ":" + opIId.getOperatorId() + ":"
+                            + opIId.getPartition() + "(" + hon + ")" + ": ABORTED");
                     e.printStackTrace();
                     // DO NOT UNCOMMENT THE FOLLOWING LINE.
                     // The failure of an operator triggers a re-attempt of the job at the CC. If the failure was non-transient,
diff --git a/hyracks-control-nc/src/main/java/edu/uci/ics/hyracks/control/nc/runtime/OperatorRunnable.java b/hyracks-control-nc/src/main/java/edu/uci/ics/hyracks/control/nc/runtime/OperatorRunnable.java
index 520c7b5..e1fcf12 100644
--- a/hyracks-control-nc/src/main/java/edu/uci/ics/hyracks/control/nc/runtime/OperatorRunnable.java
+++ b/hyracks-control-nc/src/main/java/edu/uci/ics/hyracks/control/nc/runtime/OperatorRunnable.java
@@ -77,6 +77,6 @@
 
     @Override
     public String toString() {
-        return "OperatorRunnable[" + opNode.getClass().getName() + "]";
+        return "OperatorRunnable[" + opNode.getDisplayName() + "]";
     }
 }
\ No newline at end of file
diff --git a/hyracks-dataflow-std/src/main/java/edu/uci/ics/hyracks/dataflow/std/base/AbstractUnaryInputOperatorNodePushable.java b/hyracks-dataflow-std/src/main/java/edu/uci/ics/hyracks/dataflow/std/base/AbstractUnaryInputOperatorNodePushable.java
index 182fa2a..c6ef746 100644
--- a/hyracks-dataflow-std/src/main/java/edu/uci/ics/hyracks/dataflow/std/base/AbstractUnaryInputOperatorNodePushable.java
+++ b/hyracks-dataflow-std/src/main/java/edu/uci/ics/hyracks/dataflow/std/base/AbstractUnaryInputOperatorNodePushable.java
@@ -15,11 +15,11 @@
 package edu.uci.ics.hyracks.dataflow.std.base;
 
 import edu.uci.ics.hyracks.api.comm.IFrameWriter;
-import edu.uci.ics.hyracks.api.dataflow.IOperatorNodePushable;
 import edu.uci.ics.hyracks.api.dataflow.value.RecordDescriptor;
 import edu.uci.ics.hyracks.api.exceptions.HyracksDataException;
 
-public abstract class AbstractUnaryInputOperatorNodePushable implements IOperatorNodePushable, IFrameWriter {
+public abstract class AbstractUnaryInputOperatorNodePushable extends AbstractOperatorNodePushable implements
+        IFrameWriter {
     protected IFrameWriter writer;
     protected RecordDescriptor recordDesc;
 
diff --git a/hyracks-dataflow-std/src/main/java/edu/uci/ics/hyracks/dataflow/std/base/AbstractUnaryOutputOperatorNodePushable.java b/hyracks-dataflow-std/src/main/java/edu/uci/ics/hyracks/dataflow/std/base/AbstractUnaryOutputOperatorNodePushable.java
index 8b97497e..1ce7281 100644
--- a/hyracks-dataflow-std/src/main/java/edu/uci/ics/hyracks/dataflow/std/base/AbstractUnaryOutputOperatorNodePushable.java
+++ b/hyracks-dataflow-std/src/main/java/edu/uci/ics/hyracks/dataflow/std/base/AbstractUnaryOutputOperatorNodePushable.java
@@ -15,11 +15,10 @@
 package edu.uci.ics.hyracks.dataflow.std.base;
 
 import edu.uci.ics.hyracks.api.comm.IFrameWriter;
-import edu.uci.ics.hyracks.api.dataflow.IOperatorNodePushable;
 import edu.uci.ics.hyracks.api.dataflow.value.RecordDescriptor;
 import edu.uci.ics.hyracks.api.exceptions.HyracksDataException;
 
-public abstract class AbstractUnaryOutputOperatorNodePushable implements IOperatorNodePushable {
+public abstract class AbstractUnaryOutputOperatorNodePushable extends AbstractOperatorNodePushable {
     protected IFrameWriter writer;
     protected RecordDescriptor recordDesc;
 
diff --git a/hyracks-dataflow-std/src/main/java/edu/uci/ics/hyracks/dataflow/std/util/DeserializedOperatorNodePushable.java b/hyracks-dataflow-std/src/main/java/edu/uci/ics/hyracks/dataflow/std/util/DeserializedOperatorNodePushable.java
index b348677..863d531 100644
--- a/hyracks-dataflow-std/src/main/java/edu/uci/ics/hyracks/dataflow/std/util/DeserializedOperatorNodePushable.java
+++ b/hyracks-dataflow-std/src/main/java/edu/uci/ics/hyracks/dataflow/std/util/DeserializedOperatorNodePushable.java
@@ -65,4 +65,9 @@
     @Override
     public void flush() throws HyracksDataException {
     }
+
+    @Override
+    public String getDisplayName() {
+        return "Deserialized(" + delegate + ")";
+    }
 }
\ No newline at end of file
diff --git a/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/dataflow/BTreeDropOperatorNodePushable.java b/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/dataflow/BTreeDropOperatorNodePushable.java
index 9903cdf..d2a73fb 100644
--- a/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/dataflow/BTreeDropOperatorNodePushable.java
+++ b/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/dataflow/BTreeDropOperatorNodePushable.java
@@ -3,71 +3,73 @@
 import java.io.File;
 
 import edu.uci.ics.hyracks.api.comm.IFrameWriter;
-import edu.uci.ics.hyracks.api.dataflow.IOperatorNodePushable;
 import edu.uci.ics.hyracks.api.dataflow.value.RecordDescriptor;
 import edu.uci.ics.hyracks.api.exceptions.HyracksDataException;
+import edu.uci.ics.hyracks.dataflow.std.base.AbstractOperatorNodePushable;
 import edu.uci.ics.hyracks.storage.common.file.FileManager;
 
-public class BTreeDropOperatorNodePushable implements IOperatorNodePushable {
-	
-	private String btreeFileName;
-	private IBTreeRegistryProvider btreeRegistryProvider;
-	private IBufferCacheProvider bufferCacheProvider;
-	private IFileMappingProviderProvider fileMappingProviderProvider;
-	
-	public BTreeDropOperatorNodePushable(IBufferCacheProvider bufferCacheProvider, IBTreeRegistryProvider btreeRegistryProvider, String btreeFileName, IFileMappingProviderProvider fileMappingProviderProvider) {
-		this.btreeFileName = btreeFileName;
-		this.fileMappingProviderProvider = fileMappingProviderProvider;
-		this.bufferCacheProvider = bufferCacheProvider;
-		this.btreeRegistryProvider = btreeRegistryProvider;
-	}
+public class BTreeDropOperatorNodePushable extends AbstractOperatorNodePushable {
 
-	@Override
-	public void deinitialize() throws HyracksDataException {		
-	}
-	
-	@Override
-	public int getInputArity() {
-		return 0;
-	}
-	
-	@Override
-	public IFrameWriter getInputFrameWriter(int index) {
-		return null;
-	}
+    private String btreeFileName;
+    private IBTreeRegistryProvider btreeRegistryProvider;
+    private IBufferCacheProvider bufferCacheProvider;
+    private IFileMappingProviderProvider fileMappingProviderProvider;
 
-	@Override
-	public void initialize() throws HyracksDataException {
-		
-		BTreeRegistry btreeRegistry = btreeRegistryProvider.getBTreeRegistry();		
-		FileManager fileManager = bufferCacheProvider.getFileManager();	
-		
-		String ncDataPath = System.getProperty("NodeControllerDataPath");       
+    public BTreeDropOperatorNodePushable(IBufferCacheProvider bufferCacheProvider,
+            IBTreeRegistryProvider btreeRegistryProvider, String btreeFileName,
+            IFileMappingProviderProvider fileMappingProviderProvider) {
+        this.btreeFileName = btreeFileName;
+        this.fileMappingProviderProvider = fileMappingProviderProvider;
+        this.bufferCacheProvider = bufferCacheProvider;
+        this.btreeRegistryProvider = btreeRegistryProvider;
+    }
+
+    @Override
+    public void deinitialize() throws HyracksDataException {
+    }
+
+    @Override
+    public int getInputArity() {
+        return 0;
+    }
+
+    @Override
+    public IFrameWriter getInputFrameWriter(int index) {
+        return null;
+    }
+
+    @Override
+    public void initialize() throws HyracksDataException {
+
+        BTreeRegistry btreeRegistry = btreeRegistryProvider.getBTreeRegistry();
+        FileManager fileManager = bufferCacheProvider.getFileManager();
+
+        String ncDataPath = System.getProperty("NodeControllerDataPath");
         String fileName = ncDataPath + btreeFileName;
-		
-        int btreeFileId = fileMappingProviderProvider.getFileMappingProvider().mapNameToFileId(fileName, false);        
-        
-		// unregister btree instance            
-		btreeRegistry.lock();
-		try {
-			btreeRegistry.unregister(btreeFileId);		
-		} finally {
-			btreeRegistry.unlock();
-		}
 
-		// unregister file
-		fileManager.unregisterFile(btreeFileId);				
-                        
+        int btreeFileId = fileMappingProviderProvider.getFileMappingProvider().mapNameToFileId(fileName, false);
+
+        // unregister btree instance            
+        btreeRegistry.lock();
+        try {
+            btreeRegistry.unregister(btreeFileId);
+        } finally {
+            btreeRegistry.unlock();
+        }
+
+        // unregister file
+        fileManager.unregisterFile(btreeFileId);
+
         File f = new File(fileName);
         if (f.exists()) {
-			f.delete();
-		}       
-        
+            f.delete();
+        }
+
         // remove name to id mapping
         fileMappingProviderProvider.getFileMappingProvider().unmapName(fileName);
-	}
+    }
 
-	@Override
-	public void setOutputFrameWriter(int index, IFrameWriter writer, RecordDescriptor recordDesc) {				
-	}		
+    @Override
+    public void setOutputFrameWriter(int index, IFrameWriter writer, RecordDescriptor recordDesc) {
+    }
 }