[ https://issues.apache.org/jira/browse/ATLAS-1697?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Nixon Rodrigues updated ATLAS-1697: ----------------------------------- Description: 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. <logger name="org.apache.atlas" additivity="false"> <level value="debug"/> <appender-ref ref="console"/> </logger> {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=<path>atlas-log4j.xml" {noformat} was: 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. <logger name="org.apache.atlas" additivity="false"> <level value="debug"/> <appender-ref ref="console"/> </logger> {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 {noformat} JAVA_PROPERTIES="$ATLAS_OPTS -Datlas.log.dir=$ATLAS_LOG_DIR -Datlas.log.file=import-hive.log -Dlog4j.configuration=<path>atlas-log4j.xml" {noformat} > 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 > > > 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. > <logger name="org.apache.atlas" additivity="false"> > <level value="debug"/> > <appender-ref ref="console"/> > </logger> > {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=<path>atlas-log4j.xml" > {noformat} -- This message was sent by Atlassian JIRA (v6.3.15#6346)