From notifications-return-42082-archive-asf-public=cust-asf.ponee.io@accumulo.apache.org Mon Feb 12 18:07:05 2018 Return-Path: X-Original-To: archive-asf-public@eu.ponee.io Delivered-To: archive-asf-public@eu.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by mx-eu-01.ponee.io (Postfix) with ESMTP id D281C180652 for ; Mon, 12 Feb 2018 18:07:05 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id C2D84160C61; Mon, 12 Feb 2018 17:07:05 +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 E0F88160C31 for ; Mon, 12 Feb 2018 18:07:04 +0100 (CET) Received: (qmail 56326 invoked by uid 500); 12 Feb 2018 17:07:04 -0000 Mailing-List: contact notifications-help@accumulo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: jira@apache.org Delivered-To: mailing list notifications@accumulo.apache.org Received: (qmail 56311 invoked by uid 99); 12 Feb 2018 17:07:03 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 12 Feb 2018 17:07:03 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 8D3E91A0B66 for ; Mon, 12 Feb 2018 17:07:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -102.311 X-Spam-Level: X-Spam-Status: No, score=-102.311 tagged_above=-999 required=6.31 tests=[RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id FjbE_it1ZDoz for ; Mon, 12 Feb 2018 17:07: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 5D0355F522 for ; Mon, 12 Feb 2018 17:07: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 77269E0153 for ; Mon, 12 Feb 2018 17:07: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 3613C21E80 for ; Mon, 12 Feb 2018 17:07:00 +0000 (UTC) Date: Mon, 12 Feb 2018 17:07:00 +0000 (UTC) From: "Keith Turner (JIRA)" To: notifications@accumulo.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (ACCUMULO-4813) Accepting mapping file for bulk import MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/ACCUMULO-4813?page=3Dcom.atlass= ian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D1= 6361089#comment-16361089 ]=20 Keith Turner commented on ACCUMULO-4813: ---------------------------------------- Conceptually the contents of this special mapping file would something like= . {code:java} SortedMap> {code} The file would need a special file extension, not sure what it would be.=C2= =A0 Maybe .lm for load mapping? > Accepting mapping file for bulk import > -------------------------------------- > > Key: ACCUMULO-4813 > URL: https://issues.apache.org/jira/browse/ACCUMULO-4813 > Project: Accumulo > Issue Type: Sub-task > Reporter: Keith Turner > Priority: Major > Fix For: 2.0.0 > > > During bulk import, inspecting files to determine where they go is expens= ive and slow.=C2=A0 In order to spread the cost, Accumulo has an internal m= echanism to spread the work of inspecting files to random tablet servers.= =C2=A0 Because this internal process takes time and consumes resources on t= he cluster, users want control over it.=C2=A0 The best way to give this con= trol may be to externalize it by allowing bulk imports to have a mapping fi= le.=C2=A0 This mapping file would specify the ranges where files should be = loaded.=C2=A0 If Accumulo provided API to help produce this file, then that= work could be done in Map Reduce=C2=A0or Spark.=C2=A0 This would give user= s all the control they want over when and where this computation is done.= =C2=A0 This would naturally fit in the process used to create the bulk file= s.=C2=A0 > To make bulk import fast this mapping file should have the following prop= erties. > * Key in file is a range > * Value in file is a list of files > * Ranges are non overlapping > * File is sorted by range/key > * Has a mapping for every non-empty file in the bulk import directory. > If Accumulo provides APIs to do the following operation, then producing t= he file could written as a map/reduce job. > * For a given file produce a list of ranges > * Merge range,list of file pairs > * Serialize range,list of files pairs > With a mapping file, the bulk import algorithm could be written as follow= s.=C2=A0 This could all be executed in the master with no need to run inspe= ction task on random tablet servers. > * Sanity check file > ** Ensure in sorted order > ** Ensure ranges are non-overlapping > ** Ensure each file in directory has at least one entry in file > ** Ensure all splits in the file exist in the table. > * Since file is sorted can do a merged read of file and metadata table, = looping over the following operations for each tablet until all files are l= oaded. > ** Read the loaded files for the tablet > ** Read the files to load for the range > ** For any files not loaded, send an async load message to the tablet se= rver > The above algorithm can just keep scanning the metadata table and sending= async load messages until the bulk import is complete.=C2=A0 Since the loa= d messages are async, the bulk load could of a large number of files could = potentially be very fast. > The bulk load operation can easily handle the case of tablets splitting d= uring the operation by matching a single range in the file to multiple tabl= ets.=C2=A0 However attempting to handle merges would be a lot more tricky.= =C2=A0 It would probably be simplest to fail the operation if a merge is de= tected.=C2=A0 The nice thing is that this can be done in a very clean way.= =C2=A0 =C2=A0Once the bulk import operation has the table lock, merges can = not happen.=C2=A0 So after getting the table lock the bulk import operation= can ensure all splits in the file exist in the table. The operation can ab= ort if the condition is not met before doing any work.=C2=A0 If this condit= ion is not met, it indicates a merge happened between generating the mappin= g file an doing the bulk import. > Hopefully the mapping file plus the algorithm that sends async load messa= ges can dramatically speed up bulk import operations.=C2=A0 This may lessen= the need for other things like prioritizing bulk import.=C2=A0 To measure = this, it would be very useful create a bulk import performance test that ca= n create many files with very little data and measure the time it takes loa= d them. -- This message was sent by Atlassian JIRA (v7.6.3#76005)