hama-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Suraj Menon (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HAMA-764) In SpillingQueue, spilling thread dos not start when messages number less than threshold
Date Thu, 20 Jun 2013 02:56:20 GMT

    [ https://issues.apache.org/jira/browse/HAMA-764?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13688815#comment-13688815
] 

Suraj Menon commented on HAMA-764:
----------------------------------

numBuffers has to be greater than one. The idea for spilling queue is that we have a circular
array of ByteBuffers. once a buffer is full the spilling queue works on it. The processing
to be done by spilling thread is defined by the SpilledDataProcessor. If only one buffer is
to be used, we can use SyncFlushByteBufferOutputStream.
                
> In SpillingQueue, spilling thread dos not start when messages number less than threshold
> ----------------------------------------------------------------------------------------
>
>                 Key: HAMA-764
>                 URL: https://issues.apache.org/jira/browse/HAMA-764
>             Project: Hama
>          Issue Type: Bug
>          Components: bsp core
>    Affects Versions: 0.7.0
>            Reporter: MaoYuan Xian
>         Attachments: HAMA-764.patch
>
>
> In the SpillingDataOutputBuffer.SpillingStream, we can find the following implementations
to starting the spilling thread.
> {code}
>    private void checkSpillStart() throws IOException {
>       if (bytesWritten_ >= thresholdSize_) {
>         try {
>           startSpilling();
>         } catch (InterruptedException e) {
>           throw new IOException("Internal error occured writing to buffer.", e);
>         }
>       }
>     }
> {code}
> But I encountered the message loss, when total bytes written number is less than thresholdSize.
Because the spilling thread is not invoked, and handleSpilledBuffer method of SpilledDataProcessor
can not get the chance to run.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message