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 06584200CD7 for ; Mon, 17 Jul 2017 20:11:06 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 04C16162855; Mon, 17 Jul 2017 18:11:06 +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 223F0163BDD for ; Mon, 17 Jul 2017 20:11:04 +0200 (CEST) Received: (qmail 38921 invoked by uid 500); 17 Jul 2017 18:11:04 -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 38763 invoked by uid 99); 17 Jul 2017 18:11:03 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 17 Jul 2017 18:11:03 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 2F43EC03A9 for ; Mon, 17 Jul 2017 18:11:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.202 X-Spam-Level: X-Spam-Status: No, score=-99.202 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id 6N0demTSIbUl for ; Mon, 17 Jul 2017 18:11:02 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 33DC95F613 for ; Mon, 17 Jul 2017 18:11:01 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 71EF0E0652 for ; Mon, 17 Jul 2017 18:11:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 1F9992475E for ; Mon, 17 Jul 2017 18:11:00 +0000 (UTC) Date: Mon, 17 Jul 2017 18:11:00 +0000 (UTC) From: "Mike Drob (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HBASE-18161) Incremental Load support for Multiple-Table HFileOutputFormat MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Mon, 17 Jul 2017 18:11:06 -0000 [ https://issues.apache.org/jira/browse/HBASE-18161?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16090204#comment-16090204 ] Mike Drob commented on HBASE-18161: ----------------------------------- This looks committed already, can you resolve the issue [~tedyu] with appropriate fix versions? > Incremental Load support for Multiple-Table HFileOutputFormat > ------------------------------------------------------------- > > Key: HBASE-18161 > URL: https://issues.apache.org/jira/browse/HBASE-18161 > Project: HBase > Issue Type: New Feature > Reporter: Densel Santhmayor > Assignee: Densel Santhmayor > Priority: Minor > Fix For: 3.0.0, 2.0.0-alpha-2 > > Attachments: MultiHFileOutputFormatSupport_HBASE_18161.patch, MultiHFileOutputFormatSupport_HBASE_18161_v10.patch, MultiHFileOutputFormatSupport_HBASE_18161_v11.patch, MultiHFileOutputFormatSupport_HBASE_18161_v2.patch, MultiHFileOutputFormatSupport_HBASE_18161_v3.patch, MultiHFileOutputFormatSupport_HBASE_18161_v4.patch, MultiHFileOutputFormatSupport_HBASE_18161_v5.patch, MultiHFileOutputFormatSupport_HBASE_18161_v6.patch, MultiHFileOutputFormatSupport_HBASE_18161_v7.patch, MultiHFileOutputFormatSupport_HBASE_18161_v8.patch, MultiHFileOutputFormatSupport_HBASE_18161_v9.patch > > > h2. Introduction > MapReduce currently supports the ability to write HBase records in bulk to HFiles for a single table. The file(s) can then be uploaded to the relevant RegionServers information with reasonable latency. This feature is useful to make a large set of data available for queries at the same time as well as provides a way to efficiently process very large input into HBase without affecting query latencies. > There is, however, no support to write variations of the same record key to HFiles belonging to multiple HBase tables from within the same MapReduce job. > h2. Goal > The goal of this JIRA is to extend HFileOutputFormat2 to support writing to HFiles for different tables within the same MapReduce job while single-table HFile features backwards-compatible. > For our use case, we needed to write a record key to a smaller HBase table for quicker access, and the same record key with a date appended to a larger table for longer term storage with chronological access. Each of these tables would have different TTL and other settings to support their respective access patterns. We also needed to be able to bulk write records to multiple tables with different subsets of very large input as efficiently as possible. Rather than run the MapReduce job multiple times (one for each table or record structure), it would be useful to be able to parse the input a single time and write to multiple tables simultaneously. > Additionally, we'd like to maintain backwards compatibility with the existing heavily-used HFileOutputFormat2 interface to allow benefits such as locality sensitivity (that was introduced long after we implemented support for multiple tables) to support both single table and multi table hfile writes. > h2. Proposal > * Backwards compatibility for existing single table support in HFileOutputFormat2 will be maintained and in this case, mappers will need to emit the table rowkey as before. However, a new class - MultiHFileOutputFormat - will provide a helper function to generate a rowkey for mappers that prefixes the desired tablename to the existing rowkey as well as provides configureIncrementalLoad support for multiple tables. > * HFileOutputFormat2 will be updated in the following way: > ** configureIncrementalLoad will now accept multiple table descriptor and region locator pairs, analogous to the single pair currently accepted by HFileOutputFormat2. > ** Compression, Block Size, Bloom Type and Datablock settings PER column family that are set in the Configuration object are now indexed and retrieved by tablename AND column family > ** getRegionStartKeys will now support multiple regionlocators and calculate split points and therefore partitions collectively for all tables. Similarly, now the eventual number of Reducers will be equal to the total number of partitions across all tables. > ** The RecordWriter class will be able to process rowkeys either with or without the tablename prepended depending on how configureIncrementalLoad was configured with MultiHFileOutputFormat or HFileOutputFormat2. > * The use of MultiHFileOutputFormat will write the output into HFiles which will match the output format of HFileOutputFormat2. However, while the default use case will keep the existing directory structure with column family name as the directory and HFiles within that directory, in the case of MultiHFileOutputFormat, it will output HFiles in the output directory with the following relative paths: > {noformat} > --table1 > --family1 > --HFiles > --table2 > --family1 > --family2 > --HFiles > {noformat} > This aims to be a comprehensive solution to the original tickets - HBASE-3727 and HBASE-16261. Thanks to [~clayb] for his support. This is a contribution from Bloomberg developers. > The patch will be attached shortly. -- This message was sent by Atlassian JIRA (v6.4.14#64029)