hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Zephyr Guo (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HBASE-14490) [RpcServer] reuse buffer and more stricter code
Date Fri, 25 Sep 2015 08:47:04 GMT

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

Zephyr Guo updated HBASE-14490:
-------------------------------
    Attachment: HBASE-14490-v1.patch

> [RpcServer] reuse buffer and more stricter code
> -----------------------------------------------
>
>                 Key: HBASE-14490
>                 URL: https://issues.apache.org/jira/browse/HBASE-14490
>             Project: HBase
>          Issue Type: Improvement
>          Components: IPC/RPC
>            Reporter: Zephyr Guo
>            Assignee: Zephyr Guo
>         Attachments: HBASE-14490-v1.patch, Test.java
>
>
> 1.Reuse buffer to read request.
> It's not necessary free data's buffer for each request.
> 2.There are hidden trouble in socket IO with non-blocking mode.
> We just use *channel.read(byteBuffer)* to read data of request(byteBuffer.limit=dataLength).We
need *dataLength* bytes but read maybe not fill the *byteBuffer*.
> The link is the *read(byteBuffer)* method describe:http://docs.oracle.com/javase/7/docs/api/java/nio/channels/SocketChannel.html#read(java.nio.ByteBuffer)
> I write a sample to test it(Test.java).
> 3.*channelIO()* method return value
> More stricter return value.
> So I rewrite *channelIO*.It can work well with non-blocking and back small IO(size<NIO_BUFFER_LIMIT)
or large.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message