hama-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Edward J. Yoon (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HAMA-568) Add faster synchronized collections for message queues
Date Mon, 10 Mar 2014 01:48:43 GMT

     [ https://issues.apache.org/jira/browse/HAMA-568?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Edward J. Yoon updated HAMA-568:

    Attachment: HAMA-568.patch

Attach my patch. Memory-based queues are now use concurrent queue. So, synchronize() method
will return the queue itself if it is mem-based queue. 

   * static constructor methods to be type safe
  public static <T> SynchronizedQueue<T> synchronize(MessageQueue<T> queue)
    if(queue.isMemoryBasedQueue()) {
      return (SynchronizedQueue<T>) queue;
    return new SingleLockQueue<T>(queue);

.... if no-one objects within three days, I'll assume lazy consensus and commit it.

> Add faster synchronized collections for message queues
> ------------------------------------------------------
>                 Key: HAMA-568
>                 URL: https://issues.apache.org/jira/browse/HAMA-568
>             Project: Hama
>          Issue Type: Sub-task
>            Reporter: Thomas Jungblut
>            Assignee: Edward J. Yoon
>             Fix For: 0.7.0
>         Attachments: HAMA-568.patch, HAMA-568_1.patch, HAMA-568_2.patch
> Currently the synchronized messaging (accessed concurrently via RPC) is done with a single
mutex object. See org.apache.hama.bsp.message.SynchronizedQueue.
> This can be improved for memory queue by adding the ConcurrentLinkedQueue from Java since
it has higher throughput. 
> Needless to say, we should add some custom synchronized version of a queue, maybe through
a factory class in the normal version.

This message was sent by Atlassian JIRA

View raw message