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 7382F200C3F for ; Wed, 8 Mar 2017 01:43:22 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 720D3160B74; Wed, 8 Mar 2017 00:43:22 +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 BC228160B68 for ; Wed, 8 Mar 2017 01:43:21 +0100 (CET) Received: (qmail 50086 invoked by uid 500); 8 Mar 2017 00:43:20 -0000 Mailing-List: contact dev-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hbase.apache.org Delivered-To: mailing list dev@hbase.apache.org Received: (qmail 50074 invoked by uid 99); 8 Mar 2017 00:43:20 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 08 Mar 2017 00:43:20 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 101111804C1 for ; Wed, 8 Mar 2017 00:43:20 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.679 X-Spam-Level: * X-Spam-Status: No, score=1.679 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id ATu0nZdLhep2 for ; Wed, 8 Mar 2017 00:43:18 +0000 (UTC) Received: from mail-qk0-f174.google.com (mail-qk0-f174.google.com [209.85.220.174]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 34C605F1F4 for ; Wed, 8 Mar 2017 00:43:18 +0000 (UTC) Received: by mail-qk0-f174.google.com with SMTP id v125so35063200qkh.2 for ; Tue, 07 Mar 2017 16:43:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=uk5E8ZRWbkJDuAjzaBNnZaSRy01ohhojY+99BB7mHa8=; b=NnM79Zlp7baX9znxVJSyceAiRAm+vVVUEUToth/5WdiE4kFvrMPZJxjfJ5r+ZWaiAU bisCtIu/XS1ZOFB/0L4WsnYbZGQCuKgDEAGKLGL4yF1mpHWtILMCCz6xNcXcz5Rd/ja8 xDdXXUssrbTfNfe5BQxgPyJ07aMOt+KxtiyWlxIpIoQTRUEAPXfY9o32+AinjiwW3tkk HOGlNQ7DY7yfzCPri4gdKZN26HNtaqBr6mPfFFfjVNmmDFAU6CLt3pjtPTt/axV1GXcs VdQw3QV+VbxgRBTX537KABZkvhsIUaMfr25qwRDPbBeBYzfZoCdpiPgboI1R5dou0g0Z wEjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=uk5E8ZRWbkJDuAjzaBNnZaSRy01ohhojY+99BB7mHa8=; b=aCR5IPRYZvxkN/wZd/xKe4nj7hfLxUGzi/pBzHizAegEcR4pBdhVWctWkBDk/CyOFX 2qLvLG+AB506dGHxCBDmWGiflv7G4rCdh0Kg+iuy+0033R2dSEoD7xl2pj2wk3thIWtd 8AksvD2TTaCCDQGNolBaUSiT6M37tUpqnVzE9BNSNtQ1Ydwnns0l29aQDHKxEcvAWvWg JC6uk20iclzXBoJQwbLiqp1RNu/lStR/zs9XEvi5owyxNdss4qzDhEIRWZjJBYOTE9V8 cPGNM/yO8Kh7jzVitVFZwWQ0Y1ZwsIYnLpRcJk8SQq0qWb3XObBgU/iLTwBPWwrv8Y9W a6Sg== X-Gm-Message-State: AFeK/H1iSXOjIPeFKbvqcCfYeybt4DeOGPbT4GIperxt/ONG7bnZOGl7SB0yrkGtIOFPiwikVpZ6L4B9orFrcw== X-Received: by 10.55.3.147 with SMTP id 141mr4329364qkd.213.1488933796926; Tue, 07 Mar 2017 16:43:16 -0800 (PST) MIME-Version: 1.0 Received: by 10.140.22.74 with HTTP; Tue, 7 Mar 2017 16:43:16 -0800 (PST) In-Reply-To: References: From: Xi Yang Date: Tue, 7 Mar 2017 16:43:16 -0800 Message-ID: Subject: Re: What if I want to write another table in MasterObserver.preModifyColumnFamily ? To: dev@hbase.apache.org Content-Type: multipart/alternative; boundary=001a114c907e0fa649054a2d6a33 archived-at: Wed, 08 Mar 2017 00:43:22 -0000 --001a114c907e0fa649054a2d6a33 Content-Type: text/plain; charset=UTF-8 Requirement: I want to record every change of modify columnFamily by using preModifyColumnFamily(). Now I have a table "my_ddl_log" which used to record the change of columnFamily. For example: If jack change the TTL of columnFamily "primary" in table "employee". Then we should add a put to "my_ddl_log" like this record: log:name= 'jack' log:updateTime= '2017-03-07 12:12 GMT-08:00' log:change= ''Change TTL of Table: employee ColumnFamily: primary' I try to use preModifyColumnFamily to do this stuff. Thanks, Alex 2017-03-07 12:12 GMT-08:00 Ted Yu : > Describing your use case would allow people to give better answer. > > What kind of data do you write to other table in preModifyColumnFamily() ? > > Cross server call within observer is not good idea. > > Take a look at ConnectionUtils.createShortCircuitConnection(). > > Cheers > > On Tue, Mar 7, 2017 at 11:42 AM, Xi Yang wrote: > > > All the articles I've ever seen are talking about add increment or > > change put/get status or pinrt out logs. what if I want to write some > data > > to another table in Observer? For > > example, MasterObserver.preModifyColumnFamily()? Seems Observer is > runing > > at server side, so use connection is unneccessary and might raise some > > problem. > > I know this might be a stupid question, so if you can just give some > > links let me to learn without explain in email, I will be grateful to you > > for your help > > > > Thanks, > > Alex > > > --001a114c907e0fa649054a2d6a33--