From dev-return-1685-apmail-tephra-dev-archive=tephra.apache.org@tephra.incubator.apache.org Thu Sep 14 16:45:04 2017 Return-Path: X-Original-To: apmail-tephra-dev-archive@minotaur.apache.org Delivered-To: apmail-tephra-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 269321A6CE for ; Thu, 14 Sep 2017 16:45:04 +0000 (UTC) Received: (qmail 7168 invoked by uid 500); 14 Sep 2017 16:45:04 -0000 Delivered-To: apmail-tephra-dev-archive@tephra.apache.org Received: (qmail 7133 invoked by uid 500); 14 Sep 2017 16:45:04 -0000 Mailing-List: contact dev-help@tephra.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@tephra.incubator.apache.org Delivered-To: mailing list dev@tephra.incubator.apache.org Received: (qmail 7121 invoked by uid 99); 14 Sep 2017 16:45:04 -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; Thu, 14 Sep 2017 16:45: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 661931A5B07 for ; Thu, 14 Sep 2017 16:45:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-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 (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id vX_0DLdBtLr7 for ; Thu, 14 Sep 2017 16:45: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 A2AE060E1B for ; Thu, 14 Sep 2017 16:45: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 AC914E0E22 for ; Thu, 14 Sep 2017 16:45: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 693BF25386 for ; Thu, 14 Sep 2017 16:45:00 +0000 (UTC) Date: Thu, 14 Sep 2017 16:45:00 +0000 (UTC) From: =?utf-8?Q?Micael_Capit=C3=A3o_=28JIRA=29?= To: dev@tephra.incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (TEPHRA-99) Make "long running" transactions usable with TransactionContext 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/TEPHRA-99?page=3Dcom.atlassian.= jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D16166= 560#comment-16166560 ]=20 Micael Capit=C3=A3o commented on TEPHRA-99: -------------------------------------- "I have a use case that does not require long running write transactions bu= t does require a "long running read transaction". In my use case I am serving HBase data through a REST API. The data is serv= ed to the user in pages (to simplify we can think of it as just a full tabl= e scan, served in pages). On each request I have a "pageInfo" that has, ess= entially, the last row for that page and the encoded transaction. With the = last row information I can resume the scan but I have no way of injecting b= ack the encoded transaction so I cannot have a checkpoint isolated view tha= t is consistent throughout all the pages. Digging Tephra's code it seems there isn't really any impediment to achieve= this. The only impediment is that functionality not being exposed to the c= lient facing API. One possible solution would be to just use the TransactionContext for the f= irst page and extract the transaction; and on the subsequent calls complete= ly forget about TransactionContext and inject the transaction directly on t= he Scan (scan.setAttribute(TxConstants.TX_OPERATION_ATTRIBUTE_KEY, )). I can workaround with something like that but it seems a bit od= d. > Make "long running" transactions usable with TransactionContext > --------------------------------------------------------------- > > Key: TEPHRA-99 > URL: https://issues.apache.org/jira/browse/TEPHRA-99 > Project: Tephra > Issue Type: Improvement > Components: core > Reporter: Gary Helmling > Assignee: Gary Helmling > > "Long running" transactions (type =3D=3D LONG) are supported by the Tephr= a {{TransactionManager}}, but {{TransactionContext}} does not expose any wa= y for clients to interact with them. I think this will require a couple ch= anges: > * add a {{startLong()}} method to TransactionContext > * add a constructor to TransactionContext that takes an existing {{Transa= ction}} instance. Since long running transactions are often used in map re= duce processing, the process committing the transaction may be different fr= om the process that started the transaction. In this situation, we need a = way to pass the serialized transaction all the way through to the other pro= cess. > Regarding map reduce support, we could use additional utilities or suppor= t in place to make transactions easier to use with map reduce. But this wo= uld at least serve as a first step. -- This message was sent by Atlassian JIRA (v6.4.14#64029)