首页 \ 问答 \ 如何启用hdfs和mapred审计日志?(How to enable hdfs and mapred audit logs?)

如何启用hdfs和mapred审计日志?(How to enable hdfs and mapred audit logs?)

我是windows中的hadoop-2.6.0用户。 我想启用hdfs和mapred日志。 我可以通过在hadoop-env.cmd中设置以下属性来启用hdfs审核日志,但无法为mapred启用审核日志。

set HDFS_AUDIT_LOGGER=INFO,RFAAUDIT

如果我在hadoop-env.cmd中设置了上述变量,那么hdfs-audit.log文件存储在%HADOOP_LOG_DIR%中。

我想启用mapred审核日志记录。 在%HADOOP_HOME%\ etc \ hadoop中可用的log4j.properties中,我可以看到下面粘贴的mapred的日志属性

mapred审计日志记录

mapred.audit.logger=INFO,NullAppender
mapred.audit.log.maxfilesize=256MB
mapred.audit.log.maxbackupindex=20
log4j.logger.org.apache.hadoop.mapred.AuditLogger=${mapred.audit.logger}
log4j.additivity.org.apache.hadoop.mapred.AuditLogger=false
log4j.appender.MRAUDIT=org.apache.log4j.RollingFileAppender
log4j.appender.MRAUDIT.File=${hadoop.log.dir}/mapred-audit.log
log4j.appender.MRAUDIT.layout=org.apache.log4j.PatternLayout
log4j.appender.MRAUDIT.layout.ConversionPattern=%d{ISO8601} %p %c{2}: %m%n
log4j.appender.MRAUDIT.MaxFileSize=${mapred.audit.log.maxfilesize}
log4j.appender.MRAUDIT.MaxBackupIndex=${mapred.audit.log.maxbackupindex}

但无法启用mapred审核日志记录。 当我更改以下属性时,存储在%HADOOP_LOG_DIR%中的空文件mapred-audit.log

mapred.audit.logger=INFO,MRAUDIT
-
-
-
log4j.additivity.org.apache.hadoop.mapred.AuditLogger=true
-
-

如何启用mapred审核日志?

非常感谢帮助。


I am hadoop-2.6.0 user in windows. I want to enable hdfs and mapred logs. I could enable hdfs audit log by setting the following property in hadoop-env.cmd but cannot enabled audit log for mapred.

set HDFS_AUDIT_LOGGER=INFO,RFAAUDIT

If i set the above variable in hadoop-env.cmd then hdfs-audit.log file stored in the %HADOOP_LOG_DIR%.

I want to enable mapred audit logging. In log4j.properties available in the %HADOOP_HOME%\etc\hadoop, i could see the logging properties for mapred which is pasted below

mapred audit logging

mapred.audit.logger=INFO,NullAppender
mapred.audit.log.maxfilesize=256MB
mapred.audit.log.maxbackupindex=20
log4j.logger.org.apache.hadoop.mapred.AuditLogger=${mapred.audit.logger}
log4j.additivity.org.apache.hadoop.mapred.AuditLogger=false
log4j.appender.MRAUDIT=org.apache.log4j.RollingFileAppender
log4j.appender.MRAUDIT.File=${hadoop.log.dir}/mapred-audit.log
log4j.appender.MRAUDIT.layout=org.apache.log4j.PatternLayout
log4j.appender.MRAUDIT.layout.ConversionPattern=%d{ISO8601} %p %c{2}: %m%n
log4j.appender.MRAUDIT.MaxFileSize=${mapred.audit.log.maxfilesize}
log4j.appender.MRAUDIT.MaxBackupIndex=${mapred.audit.log.maxbackupindex}

But cannot enable mapred audit logging. When i change the following properties then an empty file mapred-audit.log stored in the %HADOOP_LOG_DIR%.

mapred.audit.logger=INFO,MRAUDIT
-
-
-
log4j.additivity.org.apache.hadoop.mapred.AuditLogger=true
-
-

How can i enable mapred audit logs?

Help would be greatly appreciated.


原文:https://stackoverflow.com/questions/30231524
更新时间:2024-04-23 14:04

最满意答案

m2e不是Maven。 POM文件错误说Eclipse的Maven插件(m2e)不知道如何处理“copy-dependencies”:“unpack”目标。 m2e的工作方式是它必须了解目标在pom文件中的作用,以便它可以在Eclipse构建中复制该行为。

您可以做两件事:

  1. 告诉Eclipse忽略目标 - 这将允许您不会收到错误。 在Eclipse增量构建期间,解包步骤永远不会发生,当您执行完整的Maven构建时,它仍然会发生。
  2. 安装一个“连接器”,告诉Eclipse遇到该目标时要做什么。 可以在此处找到此目标的连接器。

至于maven-resources-plugin,除了升级POM中指定的插件版本之外,我没有看到任何其他选项。 有错误说Eclipse的Maven插件无法使用旧的Maven插件。

我不知道导致文件未找到错误的原因是什么,但怀疑是因为该文件包含在Eclipse未解包的任何内容中。


m2e is not Maven. The POM file error is saying that Eclipse's Maven plugin (m2e) does not know what to do with the "copy-dependencies":"unpack" goal. The way m2e works it has to understand what a goal does in a pom file so that it can duplicate that behavior in the Eclipse build.

There are a two main things you can do:

  1. Tell Eclipse to ignore the goal - This will allow you to not get the error. That unpack step will never occur during Eclipse incremental builds, it will still happen when you do full Maven builds.
  2. Install a "connector" which tells Eclipse what to do when it encounters that goal. The connector for this goal can be found here.

As for the maven-resources-plugin I don't see any other option than upgrading the plugin version specified in the POM. The error there is saying that Eclipse's Maven plugin can't work with Maven plugins that old.

I have no idea what is causing the file not found error but suspect it is because that file is contained in whatever it is that Eclipse is not unpacking.

相关问答

更多

相关文章

更多

最新问答

更多
  • 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
  • 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
  • OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
  • 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
  • codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
  • 在计算机拍照在哪里进入
  • 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
  • No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
  • 单页应用程序:页面重新加载(Single Page Application: page reload)
  • 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
  • System.StackOverflow错误(System.StackOverflow error)
  • KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
  • 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
  • android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
  • TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
  • 企业安全培训的各项内容
  • 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
  • C#类名中允许哪些字符?(What characters are allowed in C# class name?)
  • NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
  • 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
  • 将多个行和可变行移动到列(moving multiple and variable rows to columns)
  • 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
  • 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
  • Angular $资源不会改变方法(Angular $resource doesn't change method)
  • 在Angular 5中不是一个函数(is not a function in Angular 5)
  • 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
  • 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
  • 常见的python rpc和cli接口(Common python rpc and cli interface)
  • Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
  • 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)