hama-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From edwardy...@apache.org
Subject svn commit: r1557899 - in /hama/trunk: c++/src/main/native/examples/conf/ core/src/main/java/org/apache/hama/bsp/message/ core/src/main/java/org/apache/hama/bsp/message/queue/ core/src/test/java/org/apache/hama/bsp/ core/src/test/java/org/apache/hama/b...
Date Tue, 14 Jan 2014 01:05:45 GMT
Author: edwardyoon
Date: Tue Jan 14 01:05:44 2014
New Revision: 1557899

URL: http://svn.apache.org/r1557899
Log:
HAMA-844: Renaming queue implementations consistently

Added:
    hama/trunk/core/src/main/java/org/apache/hama/bsp/message/queue/DiskQueueTransfer.java
      - copied, changed from r1557890, hama/trunk/core/src/main/java/org/apache/hama/bsp/message/queue/DiskTransferProtocolQueue.java
    hama/trunk/core/src/main/java/org/apache/hama/bsp/message/queue/MemoryQueueTransfer.java
      - copied, changed from r1557890, hama/trunk/core/src/main/java/org/apache/hama/bsp/message/queue/MemoryTransferProtocol.java
    hama/trunk/core/src/main/java/org/apache/hama/bsp/message/queue/MessageTransferProtocol.java
      - copied, changed from r1557890, hama/trunk/core/src/main/java/org/apache/hama/bsp/message/queue/MessageTransferQueue.java
    hama/trunk/core/src/main/java/org/apache/hama/bsp/message/queue/SortedMemoryQueue.java
      - copied, changed from r1557890, hama/trunk/core/src/main/java/org/apache/hama/bsp/message/queue/SortedMessageQueue.java
    hama/trunk/core/src/main/java/org/apache/hama/bsp/message/queue/SortedMemoryQueueTransfer.java
      - copied, changed from r1557890, hama/trunk/core/src/main/java/org/apache/hama/bsp/message/queue/SortedMessageTransferProtocol.java
    hama/trunk/core/src/main/java/org/apache/hama/bsp/message/queue/SpillingQueueTransfer.java
      - copied, changed from r1557890, hama/trunk/core/src/main/java/org/apache/hama/bsp/message/queue/SpillingQueueTransferProtocol.java
Removed:
    hama/trunk/core/src/main/java/org/apache/hama/bsp/message/queue/DiskTransferProtocolQueue.java
    hama/trunk/core/src/main/java/org/apache/hama/bsp/message/queue/MemoryTransferProtocol.java
    hama/trunk/core/src/main/java/org/apache/hama/bsp/message/queue/MessageTransferQueue.java
    hama/trunk/core/src/main/java/org/apache/hama/bsp/message/queue/SortedMessageQueue.java
    hama/trunk/core/src/main/java/org/apache/hama/bsp/message/queue/SortedMessageTransferProtocol.java
    hama/trunk/core/src/main/java/org/apache/hama/bsp/message/queue/SpillingQueueTransferProtocol.java
Modified:
    hama/trunk/c++/src/main/native/examples/conf/matrixmultiplication.xml
    hama/trunk/core/src/main/java/org/apache/hama/bsp/message/MessageTransferQueueFactory.java
    hama/trunk/core/src/main/java/org/apache/hama/bsp/message/queue/SpillingQueue.java
    hama/trunk/core/src/test/java/org/apache/hama/bsp/TestPersistQueue.java
    hama/trunk/core/src/test/java/org/apache/hama/bsp/message/TestHamaMessageManager.java
    hama/trunk/core/src/test/java/org/apache/hama/pipes/TestPipes.java
    hama/trunk/graph/src/main/java/org/apache/hama/graph/GraphJob.java

Modified: hama/trunk/c++/src/main/native/examples/conf/matrixmultiplication.xml
URL: http://svn.apache.org/viewvc/hama/trunk/c%2B%2B/src/main/native/examples/conf/matrixmultiplication.xml?rev=1557899&r1=1557898&r2=1557899&view=diff
==============================================================================
--- hama/trunk/c++/src/main/native/examples/conf/matrixmultiplication.xml (original)
+++ hama/trunk/c++/src/main/native/examples/conf/matrixmultiplication.xml Tue Jan 14 01:05:44
2014
@@ -59,7 +59,7 @@
   </property>
   <property>
     <name>hama.messenger.xfer.queue.class</name>
-    <value>org.apache.hama.bsp.message.queue.SortedMessageTransferProtocol</value>
+    <value>org.apache.hama.bsp.message.queue.SortedMemoryQueueTransfer</value>
   </property>
   <property>
     <name>bsp.input.partitioner.class</name>

Modified: hama/trunk/core/src/main/java/org/apache/hama/bsp/message/MessageTransferQueueFactory.java
URL: http://svn.apache.org/viewvc/hama/trunk/core/src/main/java/org/apache/hama/bsp/message/MessageTransferQueueFactory.java?rev=1557899&r1=1557898&r2=1557899&view=diff
==============================================================================
--- hama/trunk/core/src/main/java/org/apache/hama/bsp/message/MessageTransferQueueFactory.java
(original)
+++ hama/trunk/core/src/main/java/org/apache/hama/bsp/message/MessageTransferQueueFactory.java
Tue Jan 14 01:05:44 2014
@@ -20,7 +20,7 @@ package org.apache.hama.bsp.message;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hama.bsp.message.queue.MemoryQueue;
 import org.apache.hama.bsp.message.queue.MessageQueue;
-import org.apache.hama.bsp.message.queue.MessageTransferQueue;
+import org.apache.hama.bsp.message.queue.MessageTransferProtocol;
 import org.apache.hama.util.ReflectionUtils;
 
 /**
@@ -31,7 +31,7 @@ import org.apache.hama.util.ReflectionUt
 public class MessageTransferQueueFactory<M> {
 
   private static class DefaultMessageTransferQueue<M> implements
-      MessageTransferQueue<M> {
+      MessageTransferProtocol<M> {
 
     @SuppressWarnings("unchecked")
     @Override
@@ -52,10 +52,10 @@ public class MessageTransferQueueFactory
   }
 
   @SuppressWarnings("rawtypes")
-  public static MessageTransferQueue getMessageTransferQueue(Configuration conf) {
-    return (MessageTransferQueue) ReflectionUtils.newInstance(conf.getClass(
+  public static MessageTransferProtocol getMessageTransferQueue(Configuration conf) {
+    return (MessageTransferProtocol) ReflectionUtils.newInstance(conf.getClass(
         MessageManager.TRANSFER_QUEUE_TYPE_CLASS,
-        DefaultMessageTransferQueue.class, MessageTransferQueue.class));
+        DefaultMessageTransferQueue.class, MessageTransferProtocol.class));
 
   }
 }

Copied: hama/trunk/core/src/main/java/org/apache/hama/bsp/message/queue/DiskQueueTransfer.java
(from r1557890, hama/trunk/core/src/main/java/org/apache/hama/bsp/message/queue/DiskTransferProtocolQueue.java)
URL: http://svn.apache.org/viewvc/hama/trunk/core/src/main/java/org/apache/hama/bsp/message/queue/DiskQueueTransfer.java?p2=hama/trunk/core/src/main/java/org/apache/hama/bsp/message/queue/DiskQueueTransfer.java&p1=hama/trunk/core/src/main/java/org/apache/hama/bsp/message/queue/DiskTransferProtocolQueue.java&r1=1557890&r2=1557899&rev=1557899&view=diff
==============================================================================
--- hama/trunk/core/src/main/java/org/apache/hama/bsp/message/queue/DiskTransferProtocolQueue.java
(original)
+++ hama/trunk/core/src/main/java/org/apache/hama/bsp/message/queue/DiskQueueTransfer.java
Tue Jan 14 01:05:44 2014
@@ -25,8 +25,8 @@ import org.apache.hadoop.io.Writable;
  *
  * @param <M>
  */
-public class DiskTransferProtocolQueue<M extends Writable> implements
-    MessageTransferQueue<M> {
+public class DiskQueueTransfer<M extends Writable> implements
+    MessageTransferProtocol<M> {
 
   @Override
   public MessageQueue<M> getSenderQueue(Configuration conf) {

Copied: hama/trunk/core/src/main/java/org/apache/hama/bsp/message/queue/MemoryQueueTransfer.java
(from r1557890, hama/trunk/core/src/main/java/org/apache/hama/bsp/message/queue/MemoryTransferProtocol.java)
URL: http://svn.apache.org/viewvc/hama/trunk/core/src/main/java/org/apache/hama/bsp/message/queue/MemoryQueueTransfer.java?p2=hama/trunk/core/src/main/java/org/apache/hama/bsp/message/queue/MemoryQueueTransfer.java&p1=hama/trunk/core/src/main/java/org/apache/hama/bsp/message/queue/MemoryTransferProtocol.java&r1=1557890&r2=1557899&rev=1557899&view=diff
==============================================================================
--- hama/trunk/core/src/main/java/org/apache/hama/bsp/message/queue/MemoryTransferProtocol.java
(original)
+++ hama/trunk/core/src/main/java/org/apache/hama/bsp/message/queue/MemoryQueueTransfer.java
Tue Jan 14 01:05:44 2014
@@ -25,8 +25,8 @@ import org.apache.hadoop.io.Writable;
  *
  * @param <M>
  */
-public class MemoryTransferProtocol<M extends Writable> implements
-    MessageTransferQueue<M> {
+public class MemoryQueueTransfer<M extends Writable> implements
+    MessageTransferProtocol<M> {
 
   @Override
   public MessageQueue<M> getSenderQueue(Configuration conf) {

Copied: hama/trunk/core/src/main/java/org/apache/hama/bsp/message/queue/MessageTransferProtocol.java
(from r1557890, hama/trunk/core/src/main/java/org/apache/hama/bsp/message/queue/MessageTransferQueue.java)
URL: http://svn.apache.org/viewvc/hama/trunk/core/src/main/java/org/apache/hama/bsp/message/queue/MessageTransferProtocol.java?p2=hama/trunk/core/src/main/java/org/apache/hama/bsp/message/queue/MessageTransferProtocol.java&p1=hama/trunk/core/src/main/java/org/apache/hama/bsp/message/queue/MessageTransferQueue.java&r1=1557890&r2=1557899&rev=1557899&view=diff
==============================================================================
--- hama/trunk/core/src/main/java/org/apache/hama/bsp/message/queue/MessageTransferQueue.java
(original)
+++ hama/trunk/core/src/main/java/org/apache/hama/bsp/message/queue/MessageTransferProtocol.java
Tue Jan 14 01:05:44 2014
@@ -24,7 +24,7 @@ import org.apache.hadoop.conf.Configurat
  * 
  * @param <M>
  */
-public interface MessageTransferQueue<M> {
+public interface MessageTransferProtocol<M> {
   
   /**
    * Instantiate a sender queue.

Copied: hama/trunk/core/src/main/java/org/apache/hama/bsp/message/queue/SortedMemoryQueue.java
(from r1557890, hama/trunk/core/src/main/java/org/apache/hama/bsp/message/queue/SortedMessageQueue.java)
URL: http://svn.apache.org/viewvc/hama/trunk/core/src/main/java/org/apache/hama/bsp/message/queue/SortedMemoryQueue.java?p2=hama/trunk/core/src/main/java/org/apache/hama/bsp/message/queue/SortedMemoryQueue.java&p1=hama/trunk/core/src/main/java/org/apache/hama/bsp/message/queue/SortedMessageQueue.java&r1=1557890&r2=1557899&rev=1557899&view=diff
==============================================================================
--- hama/trunk/core/src/main/java/org/apache/hama/bsp/message/queue/SortedMessageQueue.java
(original)
+++ hama/trunk/core/src/main/java/org/apache/hama/bsp/message/queue/SortedMemoryQueue.java
Tue Jan 14 01:05:44 2014
@@ -30,7 +30,7 @@ import org.apache.hama.bsp.message.bundl
  * Heap (Java's priority queue) based message queue implementation that supports
  * sorted receive and send.
  */
-public final class SortedMessageQueue<M extends WritableComparable<M>>
+public final class SortedMemoryQueue<M extends WritableComparable<M>>
     implements MessageQueue<M>, BSPMessageInterface<M> {
 
   private final PriorityQueue<M> queue = new PriorityQueue<M>();

Copied: hama/trunk/core/src/main/java/org/apache/hama/bsp/message/queue/SortedMemoryQueueTransfer.java
(from r1557890, hama/trunk/core/src/main/java/org/apache/hama/bsp/message/queue/SortedMessageTransferProtocol.java)
URL: http://svn.apache.org/viewvc/hama/trunk/core/src/main/java/org/apache/hama/bsp/message/queue/SortedMemoryQueueTransfer.java?p2=hama/trunk/core/src/main/java/org/apache/hama/bsp/message/queue/SortedMemoryQueueTransfer.java&p1=hama/trunk/core/src/main/java/org/apache/hama/bsp/message/queue/SortedMessageTransferProtocol.java&r1=1557890&r2=1557899&rev=1557899&view=diff
==============================================================================
--- hama/trunk/core/src/main/java/org/apache/hama/bsp/message/queue/SortedMessageTransferProtocol.java
(original)
+++ hama/trunk/core/src/main/java/org/apache/hama/bsp/message/queue/SortedMemoryQueueTransfer.java
Tue Jan 14 01:05:44 2014
@@ -25,17 +25,17 @@ import org.apache.hadoop.io.WritableComp
  *
  * @param <M>
  */
-public class SortedMessageTransferProtocol<M extends WritableComparable<M>> implements
-    MessageTransferQueue<M> {
+public class SortedMemoryQueueTransfer<M extends WritableComparable<M>> implements
+    MessageTransferProtocol<M> {
 
   @Override
-  public SortedMessageQueue<M> getSenderQueue(Configuration conf) {
-    return new SortedMessageQueue<M>();
+  public SortedMemoryQueue<M> getSenderQueue(Configuration conf) {
+    return new SortedMemoryQueue<M>();
   }
 
   @Override
-  public SortedMessageQueue<M> getReceiverQueue(Configuration conf) {
-    return new SortedMessageQueue<M>();
+  public SortedMemoryQueue<M> getReceiverQueue(Configuration conf) {
+    return new SortedMemoryQueue<M>();
   }
 
 }

Modified: hama/trunk/core/src/main/java/org/apache/hama/bsp/message/queue/SpillingQueue.java
URL: http://svn.apache.org/viewvc/hama/trunk/core/src/main/java/org/apache/hama/bsp/message/queue/SpillingQueue.java?rev=1557899&r1=1557898&r2=1557899&view=diff
==============================================================================
--- hama/trunk/core/src/main/java/org/apache/hama/bsp/message/queue/SpillingQueue.java (original)
+++ hama/trunk/core/src/main/java/org/apache/hama/bsp/message/queue/SpillingQueue.java Tue
Jan 14 01:05:44 2014
@@ -46,7 +46,7 @@ import org.apache.hama.bsp.message.io.Sp
  * @param <M>
  */
 public class SpillingQueue<M extends Writable> extends ByteArrayMessageQueue<M>
-    implements MessageTransferQueue<M> {
+    implements MessageTransferProtocol<M> {
 
   private static final Log LOG = LogFactory.getLog(SpillingQueue.class);
 

Copied: hama/trunk/core/src/main/java/org/apache/hama/bsp/message/queue/SpillingQueueTransfer.java
(from r1557890, hama/trunk/core/src/main/java/org/apache/hama/bsp/message/queue/SpillingQueueTransferProtocol.java)
URL: http://svn.apache.org/viewvc/hama/trunk/core/src/main/java/org/apache/hama/bsp/message/queue/SpillingQueueTransfer.java?p2=hama/trunk/core/src/main/java/org/apache/hama/bsp/message/queue/SpillingQueueTransfer.java&p1=hama/trunk/core/src/main/java/org/apache/hama/bsp/message/queue/SpillingQueueTransferProtocol.java&r1=1557890&r2=1557899&rev=1557899&view=diff
==============================================================================
--- hama/trunk/core/src/main/java/org/apache/hama/bsp/message/queue/SpillingQueueTransferProtocol.java
(original)
+++ hama/trunk/core/src/main/java/org/apache/hama/bsp/message/queue/SpillingQueueTransfer.java
Tue Jan 14 01:05:44 2014
@@ -25,8 +25,8 @@ import org.apache.hadoop.io.Writable;
  *
  * @param <M> The message type.
  */
-public class SpillingQueueTransferProtocol<M extends Writable> implements
-    MessageTransferQueue<M> {
+public class SpillingQueueTransfer<M extends Writable> implements
+    MessageTransferProtocol<M> {
 
   @Override
   public MessageQueue<M> getSenderQueue(Configuration conf) {

Modified: hama/trunk/core/src/test/java/org/apache/hama/bsp/TestPersistQueue.java
URL: http://svn.apache.org/viewvc/hama/trunk/core/src/test/java/org/apache/hama/bsp/TestPersistQueue.java?rev=1557899&r1=1557898&r2=1557899&view=diff
==============================================================================
--- hama/trunk/core/src/test/java/org/apache/hama/bsp/TestPersistQueue.java (original)
+++ hama/trunk/core/src/test/java/org/apache/hama/bsp/TestPersistQueue.java Tue Jan 14 01:05:44
2014
@@ -40,7 +40,7 @@ public class TestPersistQueue extends Te
   public void testDiskQueue() throws Exception {
     BSPJob bsp = getNewJobConf();
     bsp.set(MessageManager.TRANSFER_QUEUE_TYPE_CLASS,
-        "org.apache.hama.bsp.message.queue.DiskTransferProtocolQueue");
+        "org.apache.hama.bsp.message.queue.DiskQueueTransfer");
 
     assertTrue(bsp.waitForCompletion(true));
   }
@@ -48,7 +48,7 @@ public class TestPersistQueue extends Te
   public void testMemoryQueue() throws Exception {
     BSPJob bsp = getNewJobConf();
     bsp.set(MessageManager.TRANSFER_QUEUE_TYPE_CLASS,
-        "org.apache.hama.bsp.message.queue.MemoryTransferProtocol");
+        "org.apache.hama.bsp.message.queue.MemoryQueueTransfer");
 
     assertTrue(bsp.waitForCompletion(true));
   }
@@ -56,7 +56,7 @@ public class TestPersistQueue extends Te
   public void testSortedQueue() throws Exception {
     BSPJob bsp = getNewJobConf();
     bsp.set(MessageManager.TRANSFER_QUEUE_TYPE_CLASS,
-        "org.apache.hama.bsp.message.queue.SortedMessageTransferProtocol");
+        "org.apache.hama.bsp.message.queue.SortedMemoryQueueTransfer");
 
     assertTrue(bsp.waitForCompletion(true));
   }
@@ -64,7 +64,7 @@ public class TestPersistQueue extends Te
   public void testSpillingQueue() throws Exception {
     BSPJob bsp = getNewJobConf();
     bsp.set(MessageManager.TRANSFER_QUEUE_TYPE_CLASS,
-        "org.apache.hama.bsp.message.queue.SpillingQueueTransferProtocol");
+        "org.apache.hama.bsp.message.queue.SpillingQueueTransfer");
 
     assertTrue(bsp.waitForCompletion(true));
   }

Modified: hama/trunk/core/src/test/java/org/apache/hama/bsp/message/TestHamaMessageManager.java
URL: http://svn.apache.org/viewvc/hama/trunk/core/src/test/java/org/apache/hama/bsp/message/TestHamaMessageManager.java?rev=1557899&r1=1557898&r2=1557899&view=diff
==============================================================================
--- hama/trunk/core/src/test/java/org/apache/hama/bsp/message/TestHamaMessageManager.java
(original)
+++ hama/trunk/core/src/test/java/org/apache/hama/bsp/message/TestHamaMessageManager.java
Tue Jan 14 01:05:44 2014
@@ -34,10 +34,10 @@ import org.apache.hama.bsp.BSPPeerImpl;
 import org.apache.hama.bsp.Counters;
 import org.apache.hama.bsp.TaskAttemptID;
 import org.apache.hama.bsp.message.queue.DiskQueue;
-import org.apache.hama.bsp.message.queue.DiskTransferProtocolQueue;
-import org.apache.hama.bsp.message.queue.MemoryTransferProtocol;
+import org.apache.hama.bsp.message.queue.DiskQueueTransfer;
+import org.apache.hama.bsp.message.queue.MemoryQueueTransfer;
 import org.apache.hama.bsp.message.queue.MessageQueue;
-import org.apache.hama.bsp.message.queue.MessageTransferQueue;
+import org.apache.hama.bsp.message.queue.MessageTransferProtocol;
 import org.apache.hama.util.BSPNetUtils;
 
 public class TestHamaMessageManager extends TestCase {
@@ -50,7 +50,7 @@ public class TestHamaMessageManager exte
   public void testMemoryMessaging() throws Exception {
     HamaConfiguration conf = new HamaConfiguration();
     conf.setClass(MessageManager.TRANSFER_QUEUE_TYPE_CLASS,
-        MemoryTransferProtocol.class, MessageTransferQueue.class);
+        MemoryQueueTransfer.class, MessageTransferProtocol.class);
     conf.set(DiskQueue.DISK_QUEUE_PATH_KEY, TMP_OUTPUT_PATH);
     messagingInternal(conf);
   }
@@ -59,7 +59,7 @@ public class TestHamaMessageManager exte
     HamaConfiguration conf = new HamaConfiguration();
     conf.set(DiskQueue.DISK_QUEUE_PATH_KEY, TMP_OUTPUT_PATH);
     conf.setClass(MessageManager.TRANSFER_QUEUE_TYPE_CLASS,
-        DiskTransferProtocolQueue.class, MessageTransferQueue.class);
+        DiskQueueTransfer.class, MessageTransferProtocol.class);
     messagingInternal(conf);
   }
 

Modified: hama/trunk/core/src/test/java/org/apache/hama/pipes/TestPipes.java
URL: http://svn.apache.org/viewvc/hama/trunk/core/src/test/java/org/apache/hama/pipes/TestPipes.java?rev=1557899&r1=1557898&r2=1557899&view=diff
==============================================================================
--- hama/trunk/core/src/test/java/org/apache/hama/pipes/TestPipes.java (original)
+++ hama/trunk/core/src/test/java/org/apache/hama/pipes/TestPipes.java Tue Jan 14 01:05:44
2014
@@ -255,7 +255,7 @@ public class TestPipes extends HamaClust
 
     // sort sent messages
     bsp.set(MessageManager.TRANSFER_QUEUE_TYPE_CLASS,
-        "org.apache.hama.bsp.message.queue.SortedMessageTransferProtocol");
+        "org.apache.hama.bsp.message.queue.SortedMemoryQueueTransfer");
     bsp.set("hama.mat.mult.B.path", transposedMatrixB.toString());
     return bsp;
   }

Modified: hama/trunk/graph/src/main/java/org/apache/hama/graph/GraphJob.java
URL: http://svn.apache.org/viewvc/hama/trunk/graph/src/main/java/org/apache/hama/graph/GraphJob.java?rev=1557899&r1=1557898&r2=1557899&view=diff
==============================================================================
--- hama/trunk/graph/src/main/java/org/apache/hama/graph/GraphJob.java (original)
+++ hama/trunk/graph/src/main/java/org/apache/hama/graph/GraphJob.java Tue Jan 14 01:05:44
2014
@@ -32,8 +32,8 @@ import org.apache.hama.bsp.Partitioner;
 import org.apache.hama.bsp.PartitioningRunner.RecordConverter;
 import org.apache.hama.bsp.message.MessageManager;
 import org.apache.hama.bsp.message.queue.MessageQueue;
-import org.apache.hama.bsp.message.queue.MessageTransferQueue;
-import org.apache.hama.bsp.message.queue.SortedMessageTransferProtocol;
+import org.apache.hama.bsp.message.queue.MessageTransferProtocol;
+import org.apache.hama.bsp.message.queue.SortedMemoryQueueTransfer;
 
 import com.google.common.base.Preconditions;
 
@@ -198,7 +198,7 @@ public class GraphJob extends BSPJob {
 
     // add the default message queue to the sorted one
     this.getConfiguration().setClass(MessageManager.TRANSFER_QUEUE_TYPE_CLASS,
-        SortedMessageTransferProtocol.class, MessageTransferQueue.class);
+        SortedMemoryQueueTransfer.class, MessageTransferProtocol.class);
 
     super.submit();
   }



Mime
View raw message