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 DD770200CCB for ; Thu, 6 Jul 2017 00:58:03 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id DB044164B48; Wed, 5 Jul 2017 22:58:03 +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 2B6F5164B46 for ; Thu, 6 Jul 2017 00:58:03 +0200 (CEST) Received: (qmail 45592 invoked by uid 500); 5 Jul 2017 22:58:02 -0000 Mailing-List: contact issues-help@ambari.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ambari.apache.org Delivered-To: mailing list issues@ambari.apache.org Received: (qmail 45583 invoked by uid 99); 5 Jul 2017 22:58:02 -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; Wed, 05 Jul 2017 22:58:02 +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 CECD9C27A1 for ; Wed, 5 Jul 2017 22:58:01 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.211 X-Spam-Level: X-Spam-Status: No, score=-99.211 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id uJTq70IS7w-Q for ; Wed, 5 Jul 2017 22:58:01 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id D2DB55F4EC for ; Wed, 5 Jul 2017 22:58:00 +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 519EBE0059 for ; Wed, 5 Jul 2017 22:58: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 09C5624632 for ; Wed, 5 Jul 2017 22:58:00 +0000 (UTC) Date: Wed, 5 Jul 2017 22:58:00 +0000 (UTC) From: "Hadoop QA (JIRA)" To: issues@ambari.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (AMBARI-17382) Migrate AMS queries to use ROW_TIMESTAMP instead of native timerange hint MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Wed, 05 Jul 2017 22:58:04 -0000 [ https://issues.apache.org/jira/browse/AMBARI-17382?page=3Dcom.atlassi= an.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D16= 075582#comment-16075582 ]=20 Hadoop QA commented on AMBARI-17382: ------------------------------------ {color:red}-1 overall{color}. Here are the results of testing the latest a= ttachment=20 http://issues.apache.org/jira/secure/attachment/12873539/AMBARI-17382-1.p= atch against trunk revision . {color:red}-1 patch{color}. The patch command could not apply the patc= h. Console output: https://builds.apache.org/job/Ambari-trunk-test-patch/11718= //console This message is automatically generated. > Migrate AMS queries to use ROW_TIMESTAMP instead of native timerange hint > ------------------------------------------------------------------------- > > Key: AMBARI-17382 > URL: https://issues.apache.org/jira/browse/AMBARI-17382 > Project: Ambari > Issue Type: Bug > Affects Versions: 2.4.0 > Reporter: Aravindan Vijayan > Assignee: Aravindan Vijayan > Priority: Critical > Labels: ambari-metrics > Fix For: 3.0.0 > > Attachments: AMBARI-17382-1.patch > > > With PHOENIX-914, there is a change in implementation , As earlier, times= tamp range was passed as a hint to the query to get advantage of native tim= erange optimization in hbase but with new implementation we can mark the ti= mestamp column in the schema as a ROW_TIMESTAMP and pass timestamp range wi= th =E2=80=9Cwhere=E2=80=9D clause only to achieve equivalent performance an= d better accuracy. > For eq:- > With earlier implementation , AMS forms query like this:- > SELECT /*+ NATIVE_TIME_RANGE(1448029523000) */ METRIC_NAME, APP_ID, INSTA= NCE_ID, SERVER_TIME, UNITS, METRIC_SUM, HOSTS_COUNT, METRIC_MAX, METRIC_MIN= FROM METRIC_AGGREGATE WHERE (METRIC_NAME IN ('regionserver.Server.totalReq= uestCount', 'regionserver.Server.blockCacheCountHitPercent', 'regionserver.= Server.regionCount', 'regionserver.Server.compactionQueueLength', 'regionse= rver.Server.storeFileCount', 'master.Server.averageLoad')) AND APP_ID =3D '= ams-hbase' AND SERVER_TIME >=3D 1448029643000 AND SERVER_TIME < 1448033243 = ORDER BY METRIC_NAME, SERVER_TIME LIMIT 11520 > But with PHOENIX-914 :- > Declare SERVER_TIME as ROW_TIMESTAMP in schema:- > CREATE TABLE DESTINATION_METRICS_TABLE (SERVER_TIME DATE not null, METRIC= _ID CHAR(15) not null, METRIC_VALUE bigint =E2=80=A6 CONSTRAINT PK PRIMARY= KEY(CREATED_DATE ROW_TIMESTAMP, METRIC_ID=E2=80=A6)) =E2=80=A6; > And remove hint from the query:- > SELECT METRIC_NAME, APP_ID, INSTANCE_ID, SERVER_TIME, UNITS, METRIC_SUM,= HOSTS_COUNT, METRIC_MAX, METRIC_MIN FROM METRIC_AGGREGATE WHERE (METRIC_NA= ME IN ('regionserver.Server.totalRequestCount', 'regionserver.Server.blockC= acheCountHitPercent', 'regionserver.Server.regionCount', 'regionserver.Serv= er.compactionQueueLength', 'regionserver.Server.storeFileCount', 'master.Se= rver.averageLoad')) AND APP_ID =3D 'ams-hbase' AND SERVER_TIME >=3D 1448029= 643000 AND SERVER_TIME < 1448033243 ORDER BY METRIC_NAME, SERVER_TIME LIMIT= 11520 -- This message was sent by Atlassian JIRA (v6.4.14#64029)