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 8195E200C3A for ; Fri, 31 Mar 2017 13:11:47 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 80119160B8C; Fri, 31 Mar 2017 11:11:47 +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 C5313160B80 for ; Fri, 31 Mar 2017 13:11:46 +0200 (CEST) Received: (qmail 56821 invoked by uid 500); 31 Mar 2017 11:11:44 -0000 Mailing-List: contact dev-help@atlas.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@atlas.incubator.apache.org Delivered-To: mailing list dev@atlas.incubator.apache.org Received: (qmail 56686 invoked by uid 99); 31 Mar 2017 11:11:44 -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; Fri, 31 Mar 2017 11:11:44 +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 2C2F3188A06 for ; Fri, 31 Mar 2017 11:11:44 +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-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 7VPe0ANYSapn for ; Fri, 31 Mar 2017 11:11:43 +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 8622D5F666 for ; Fri, 31 Mar 2017 11:11:42 +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 D14AEE05BF for ; Fri, 31 Mar 2017 11:11:41 +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 879C121D63 for ; Fri, 31 Mar 2017 11:11:41 +0000 (UTC) Date: Fri, 31 Mar 2017 11:11:41 +0000 (UTC) From: "Nixon Rodrigues (JIRA)" To: dev@atlas.incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (ATLAS-1697) import-hive.sh script logs debug/info logs on console instead of import-hive.log log file. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Fri, 31 Mar 2017 11:11:47 -0000 [ https://issues.apache.org/jira/browse/ATLAS-1697?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Nixon Rodrigues updated ATLAS-1697: ----------------------------------- Attachment: import-hive.sh atlas-log4j.xml As suggested in #3 for workaround, i have updated the atlas-log4j.xml path in import-hive.log and uploaded this files to this jira. Follow below steps - cd /usr/hdp/current/atlas-server/hook-bin/ - Copy the import-hive.sh and atlas-log4.xml in hook-bin directory - Give executable permission to import-hive.sh file is needed. - Execute import-hive.sh script {noformat} [root@rs-atl-28-3 hook-bin]# ./import-hive.sh Using Hive configuration directory [/etc/hive/conf] Log file for import is /usr/hdp/current/atlas-server/logs/import-hive.log Enter username for atlas :- xxxx Enter password for atlas :- xxxx Hive Data Model imported successfully!!! {noformat} INFO logs will be appended to /usr/hdp/current/atlas-server/logs/import-hive.log > import-hive.sh script logs debug/info logs on console instead of import-hive.log log file. > ------------------------------------------------------------------------------------------- > > Key: ATLAS-1697 > URL: https://issues.apache.org/jira/browse/ATLAS-1697 > Project: Atlas > Issue Type: Bug > Affects Versions: 0.8-incubating > Reporter: Nixon Rodrigues > Assignee: Nixon Rodrigues > Fix For: 0.9-incubating > > Attachments: atlas-log4j.xml, import-hive.sh > > > Found the issue of hive import script logs not being appended to log file. > For import-hive the log file path of import-hive.log is configured in script and the logs should append to this log file. > Log file for import is /usr/hdp/current/atlas-server/logs/import-hive.log > But the atlas-log4j.xml referenced from class-path is from typesystem module in which it is mentioned to output debug logs on console and also do not not have file appender in it. > {noformat} > log4j: Using URL [jar:file:/grid/0/hdp/2.6.0.0-598/atlas/hook/hive/atlas-hive-plugin-impl/atlas-typesystem-0.8.0.2.6.0.0-598.jar!/atlas-log4j.xml] for automatic log4j configuration. > > > > > {noformat} > The fix for appending logs in /usr/hdp/current/atlas-server/logs/import-hive.log file. > # change the typesystem module atlas-log.xml and add log appender tag but it cannot be edited since it packaged in jar > # referer to /etc/atlas/conf/atlas-log4j.xml but macros *\{atlas.log.file\}* and *\{atlas.log.dir\}* in this file are already expanded and also the file may not be present on server where hive is running. > # Have a copy [atlas-log4j.xml|https://github.com/apache/incubator-atlas/blob/master/typesystem/src/main/resources/atlas-log4j.xml] for import hive and update path in import-hive.sh to use this atlas-log4j.xml [ This is workaround if hit by this issue ] > {noformat} > JAVA_PROPERTIES="$ATLAS_OPTS -Datlas.log.dir=$ATLAS_LOG_DIR -Datlas.log.file=import-hive.log -Dlog4j.configuration=atlas-log4j.xml" > {noformat} -- This message was sent by Atlassian JIRA (v6.3.15#6346)