Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 7BD0F200BBE for ; Thu, 27 Oct 2016 15:13:00 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 7ACE8160AE4; Thu, 27 Oct 2016 13:13:00 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id C7647160AF6 for ; Thu, 27 Oct 2016 15:12:59 +0200 (CEST) Received: (qmail 7661 invoked by uid 500); 27 Oct 2016 13:12:58 -0000 Mailing-List: contact issues-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@hbase.apache.org Received: (qmail 7619 invoked by uid 99); 27 Oct 2016 13:12:58 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 27 Oct 2016 13:12:58 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 75F282C2A67 for ; Thu, 27 Oct 2016 13:12:58 +0000 (UTC) Date: Thu, 27 Oct 2016 13:12:58 +0000 (UTC) From: "Duo Zhang (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HBASE-16891) Try copying to the Netty ByteBuf directly from the WALEdit MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 27 Oct 2016 13:13:00 -0000 [ https://issues.apache.org/jira/browse/HBASE-16891?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15611828#comment-15611828 ] Duo Zhang commented on HBASE-16891: ----------------------------------- I do not think this is a good idea. You should follow the semantic of OutputStream as the you just use OutputStream as the CellEncoder's parameter, not a subclass of OutputStream. I think most implementations of OutputStream will only write a byte, not an int... > Try copying to the Netty ByteBuf directly from the WALEdit > ---------------------------------------------------------- > > Key: HBASE-16891 > URL: https://issues.apache.org/jira/browse/HBASE-16891 > Project: HBase > Issue Type: Sub-task > Components: wal > Affects Versions: 2.0.0 > Reporter: ramkrishna.s.vasudevan > Assignee: ramkrishna.s.vasudevan > Fix For: 2.0.0 > > Attachments: HBASE-16891.patch > > > -> The FanOutOneBlockAsyncDFSOutput is a much sophisticated dfs client model that works with Netty ByteBuf. Here we hold on connection to the datanodes using > Netty Channels. And the idea is to write data direclty to these channels. > AsyncHLog gets an append call. The AysncWAL uses the HBase's ByteArrayOutputSTream and so the content of the cell is written to this BAOS and that is again > copied to the netty Bytebuf in the FanOutOneBlockAsyncDFSOutput. > So when the sync call happens this FanoutDFSoutput does the checksum calcualtion itself and then writes the content of this buffer direclty to the DN channel. > -> In case of FSHLOg this is different. When an append call comes we direclty write the content to the FSDataOutputStream (it is copied to this stream). > Then here internally there is a checkSum calculation that happens. when a sync call happens there is noth ing to do except to notify the NN to flush the latest > data. > AS we can see from the above that there are two copies in AsyncWAL > -> From the Cell to the BAOS > -> From the BAOS to the Netty byte buf > -> On sync() call, do check sum and finally flush the netty byte buf to the DN channel > In case of FSHLog > -> From cell to the FSDataoutputstream. data is copied. Check sum happens here. > -> Sync call just tries to notify the NN. -- This message was sent by Atlassian JIRA (v6.3.4#6332)