Return-Path: X-Original-To: apmail-hbase-issues-archive@www.apache.org Delivered-To: apmail-hbase-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id BC27B17775 for ; Thu, 20 Nov 2014 23:23:37 +0000 (UTC) Received: (qmail 65534 invoked by uid 500); 20 Nov 2014 23:23:37 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 65490 invoked by uid 500); 20 Nov 2014 23:23:37 -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 65473 invoked by uid 99); 20 Nov 2014 23:23:37 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 Nov 2014 23:23:37 +0000 Date: Thu, 20 Nov 2014 23:23:37 +0000 (UTC) From: "Andrew Purtell (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HBASE-10378) Divide HLog interface into User and Implementor specific interfaces MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HBASE-10378?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14220206#comment-14220206 ] Andrew Purtell commented on HBASE-10378: ---------------------------------------- Yes, thanks, the issue is fixed > Divide HLog interface into User and Implementor specific interfaces > ------------------------------------------------------------------- > > Key: HBASE-10378 > URL: https://issues.apache.org/jira/browse/HBASE-10378 > Project: HBase > Issue Type: Sub-task > Components: wal > Reporter: Himanshu Vashishtha > Assignee: Sean Busbey > Fix For: 2.0.0 > > Attachments: 10378-1.patch, 10378-2.patch, HBASE-10378.3.patch.txt, HBASE-10378.4.patch.txt, HBASE-10378.5.patch.txt, HBASE-10378.addendum.patch > > > HBASE-5937 introduces the HLog interface as a first step to support multiple WAL implementations. This interface is a good start, but has some limitations/drawbacks in its current state, such as: > 1) There is no clear distinction b/w User and Implementor APIs, and it provides APIs both for WAL users (append, sync, etc) and also WAL implementors (Reader/Writer interfaces, etc). There are APIs which are very much implementation specific (getFileNum, etc) and a user such as a RegionServer shouldn't know about it. > 2) There are about 14 methods in FSHLog which are not present in HLog interface but are used at several places in the unit test code. These tests typecast HLog to FSHLog, which makes it very difficult to test multiple WAL implementations without doing some ugly checks. > I'd like to propose some changes in HLog interface that would ease the multi WAL story: > 1) Have two interfaces WAL and WALService. WAL provides APIs for implementors. WALService provides APIs for users (such as RegionServer). > 2) A skeleton implementation of the above two interface as the base class for other WAL implementations (AbstractWAL). It provides required fields for all subclasses (fs, conf, log dir, etc). Make a minimal set of test only methods and add this set in AbstractWAL. > 3) HLogFactory returns a WALService reference when creating a WAL instance; if a user need to access impl specific APIs (there are unit tests which get WAL from a HRegionServer and then call impl specific APIs), use AbstractWAL type casting, > 4) Make TestHLog abstract and let all implementors provide their respective test class which extends TestHLog (TestFSHLog, for example). -- This message was sent by Atlassian JIRA (v6.3.4#6332)