如何启用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
最满意答案
m2e不是Maven。 POM文件错误说Eclipse的Maven插件(m2e)不知道如何处理“copy-dependencies”:“unpack”目标。 m2e的工作方式是它必须了解目标在pom文件中的作用,以便它可以在Eclipse构建中复制该行为。
您可以做两件事:
- 告诉Eclipse忽略目标 - 这将允许您不会收到错误。 在Eclipse增量构建期间,解包步骤永远不会发生,当您执行完整的Maven构建时,它仍然会发生。
- 安装一个“连接器”,告诉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:
- 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.
- 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.
相关问答
更多-
我设法通过将useSubDirectoryPerArtifact=true更改为useSubDirectoryPerArtifact=true来解决此问题 要覆盖的属性在此处的文档中标识为user.property 。 请注意,这可能与此属性的名称不同(因为它在这种情况下)。 I managed to solve this by changing useSubDirectoryPerArtifact=true to mdep.useSubDirectoryPerArtifact=true The prope ...
-
这似乎是一个已知的问题。 你可以指示m2e忽略这个。 选项1:pom.xml 在你的
标签中添加以下内容: org.eclipse.m2e lifecycle-mapping 您的主要问题是可能的,但如果插件因任何原因不适用于较新的代码,则可能无法正常工作。 一个插件可以拥有它自己的个人依赖项部分,并将使用标准的Maven依赖关系解决方案,并选择所需的最高版本。 所以,你可以做some.group.id some.artifact.id someversion ... 定义自定义生命周期可能对您有所帮助。 两年前,我更详细地分析了maven-release-plugin,并发现它们使用自己的生命周期。 在这里你可以找到他们的生命周期定义: http : //svn.apache.org/viewvc/maven/release/tags/maven-release-2.3.2/maven-release-manager/src/main/components-fragment.xml?视图=标记 另外,我在Sonatype的Mavenbook中找到了详细信息: http ...如果您同时安装了maven和eclipse maven插件,那就没问题了。 我只为其pom.xml文件编辑器使用eclipse maven插件。 我通过命令行执行有关maven的所有其他操作。 此外,我使用的插件(m2eclipse)有时会出现奇怪的依赖错误,尽管一切都很好。 因为当我为项目运行“mvn install”时,它已成功构建。 所以,我认为使用maven本身更可靠。 It is no problem if you have both maven and eclipse maven plugin ...你需要告诉maven应该编译哪个版本的java源代码org.apache.maven.plugins maven-compiler-plugin 2.3.2 1.5 ...只需包含Maven编译器插件即可maven-compiler-plugin 2.3.2 1.6 我认为com.google.gson不是日食氧气标准回购协议的一部分,因为它是第三方库。 Eclipse轨道回购维护这些库。m2e不是Maven。 POM文件错误说Eclipse的Maven插件(m2e)不知道如何处理“copy-dependencies”:“unpack”目标。 m2e的工作方式是它必须了解目标在pom文件中的作用,以便它可以在Eclipse构建中复制该行为。 您可以做两件事: 告诉Eclipse忽略目标 - 这将允许您不会收到错误。 在Eclipse增量构建期间,解包步骤永远不会发生,当您执行完整的Maven构建时,它仍然会发生。 安装一个“连接器”,告诉Eclipse遇到该目标时要做什么。 可以在此处找到此 ...我相信你可以使用以下依赖:com.atlassian.usercompatibility usercompatibility-confluence 2.1.4 相关文章
更多- Hadoop mapred(hive)执行目录 文件权限问题
- Hadoop 异常记录 Cannot delete /tmp/hadoop/mapred/system. Name node is in safe mode.
- Hadoop mapred-queue-acls 配置
- Hadoop HDFS 配置
- Hadoop工作日志-安装及挂载HDFS
- mapred streaming 脚本输出运行状态导致的奇怪问题
- Hadoop HDFS 编程
- Hadoop HDFS Wrong FS: hdfs:/ expected file:///
- 基于HDFS的FTP
- 使用WebDAV从Windows上传日志到HDFS
最新问答
更多- 您如何使用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)