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 5CBA6200CB5 for ; Wed, 28 Jun 2017 05:48:09 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 5AFD6160BF6; Wed, 28 Jun 2017 03:48:09 +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 A7DB7160BDC for ; Wed, 28 Jun 2017 05:48:08 +0200 (CEST) Received: (qmail 36141 invoked by uid 500); 28 Jun 2017 03:48:07 -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 36130 invoked by uid 99); 28 Jun 2017 03:48:07 -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, 28 Jun 2017 03:48:07 +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 B208F181944 for ; Wed, 28 Jun 2017 03:48:06 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-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-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id W6QXEUmxPRxv for ; Wed, 28 Jun 2017 03:48:05 +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 50AB25FD0C for ; Wed, 28 Jun 2017 03:48:05 +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 65A85E09F4 for ; Wed, 28 Jun 2017 03:48:04 +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 971002415E for ; Wed, 28 Jun 2017 03:48:02 +0000 (UTC) Date: Wed, 28 Jun 2017 03:48:02 +0000 (UTC) From: "Hadoop QA (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HBASE-18273) hbase_rotate_log in hbase-daemon.sh script not working for some JDK MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Wed, 28 Jun 2017 03:48:09 -0000 [ https://issues.apache.org/jira/browse/HBASE-18273?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16065882#comment-16065882 ] Hadoop QA commented on HBASE-18273: ----------------------------------- | (/) *{color:green}+1 overall{color}* | \\ \\ || Vote || Subsystem || Runtime || Comment || | {color:blue}0{color} | {color:blue} reexec {color} | {color:blue} 0m 8s{color} | {color:blue} Docker mode activated. {color} | | {color:blue}0{color} | {color:blue} shelldocs {color} | {color:blue} 0m 4s{color} | {color:blue} Shelldocs was not available. {color} | | {color:green}+1{color} | {color:green} @author {color} | {color:green} 0m 0s{color} | {color:green} The patch does not contain any @author tags. {color} | | {color:green}+1{color} | {color:green} shellcheck {color} | {color:green} 0m 3s{color} | {color:green} There were no new shellcheck issues. {color} | | {color:green}+1{color} | {color:green} whitespace {color} | {color:green} 0m 0s{color} | {color:green} The patch has no whitespace issues. {color} | | {color:green}+1{color} | {color:green} hadoopcheck {color} | {color:green} 28m 49s{color} | {color:green} Patch does not cause any errors with Hadoop 2.6.1 2.6.2 2.6.3 2.6.4 2.6.5 2.7.1 2.7.2 2.7.3 or 3.0.0-alpha3. {color} | | {color:green}+1{color} | {color:green} asflicense {color} | {color:green} 0m 14s{color} | {color:green} The patch does not generate ASF License warnings. {color} | | {color:black}{color} | {color:black} {color} | {color:black} 29m 26s{color} | {color:black} {color} | \\ \\ || Subsystem || Report/Notes || | Docker | Client=1.12.3 Server=1.12.3 Image:yetus/hbase:757bf37 | | JIRA Issue | HBASE-18273 | | JIRA Patch URL | https://issues.apache.org/jira/secure/attachment/12874799/HBASE-18273.2.patch | | Optional Tests | asflicense shellcheck shelldocs | | uname | Linux 3b078ec6d7d8 3.13.0-119-generic #166-Ubuntu SMP Wed May 3 12:18:55 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux | | Build tool | maven | | Personality | /home/jenkins/jenkins-slave/workspace/PreCommit-HBASE-Build/component/dev-support/hbase-personality.sh | | git revision | master / b313043 | | shellcheck | v0.4.6 | | modules | C: . U: . | | Console output | https://builds.apache.org/job/PreCommit-HBASE-Build/7372/console | | Powered by | Apache Yetus 0.4.0 http://yetus.apache.org | This message was automatically generated. > hbase_rotate_log in hbase-daemon.sh script not working for some JDK > ------------------------------------------------------------------- > > Key: HBASE-18273 > URL: https://issues.apache.org/jira/browse/HBASE-18273 > Project: HBase > Issue Type: Bug > Components: hbase > Affects Versions: 1.2.6, 1.1.11, 2.0.0-alpha-1 > Reporter: Fangyuan Deng > Assignee: Fangyuan Deng > Fix For: 2.0.0-beta-2 > > Attachments: HBASE-18273.0.patch, HBASE-18273.1.patch, HBASE-18273.2.patch > > > When restarting a hbase process, hbase_rotate_log $HBASE_LOGGC will rotate GC logs. > the code looks like this, > if [ -f "$log" ]; then # rotate logs > while [ $num -gt 1 ]; do > prev=`expr $num - 1` > [ -f "$log.$prev" ] && mv -f "$log.$prev" "$log.$num" > num=$prev > done > But, some version JDK will add a suffix (.0) to the gc file, like hbase-xxx.gc.0, rather than hbase-xxx.gc. > So I add a check before rotate, > if [ ! -f "$log" ]; then #for some jdk, gc log has a postfix 0 > if [ -f "$log.0" ]; then > mv -f "$log.0" "$log"; > fi > fi -- This message was sent by Atlassian JIRA (v6.4.14#64029)