hadoop - 如何使用Spring Batch Yarn Application重新启动Map Reduce Hadoop作业?

标签 hadoop mapreduce spring-data spring-batch restart

我有Map Reduce应用程序,我想使用Spring Batch Yarn逻辑。
就像下面链接中提到的那样。

https://spring.io/guides/gs/yarn-batch-restart/

但我希望它真的很具体,因为通常我们在hadoop map减少工作中拥有。
仅查找Spring Batch Yarn的类和配置。考虑到我的hadoop map减少逻辑已经就位并且可以正常工作。

提前致谢 !!

最佳答案

这是您正在寻找的ApplicationContext配置

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:util="http://www.springframework.org/schema/util"
    xmlns:context="http://www.springframework.org/schema/context"
    xmlns:hdp="http://www.springframework.org/schema/hadoop" xmlns:batch="http://www.springframework.org/schema/batch"
    xsi:schemaLocation="
    http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
    http://www.springframework.org/schema/hadoop http://www.springframework.org/schema/hadoop/spring-hadoop.xsd
     http://www.springframework.org/schema/context  http://www.springframework.org/schema/context/spring-context.xsd
     http://www.springframework.org/schema/batch http://www.springframework.org/schema/batch/spring-batch.xsd
    http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-4.2.xsd">

    <context:property-placeholder location="classpath:application.properties" />
    <hdp:configuration namenode-principal="hdfs://xx.yy.com" rm-manager-uri="xx.yy.com"
        security-method="kerb" user-keytab="location" rm-manager-principal="username"
        user-principal="username">
        fs.default.name=${fs.default.name}
        mapred.job.tracker=${mapred.job.tracker}
    </hdp:configuration>

    <hdp:job id="wordCountJobId" input-path="${input.path}"
        output-path="${output.path}" jar-by-class="com.xx.poc.Application"
        mapper="com.xx.poc.Map" reducer="com.xx.poc.Reduce" />

    <hdp:job-runner id="wordCountJobRunner" job-ref="wordCountJobId"
        run-at-startup="true" />
</beans>

关于hadoop - 如何使用Spring Batch Yarn Application重新启动Map Reduce Hadoop作业?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39904271/

相关文章:

Hadoop 自定义分区程序问题

hadoop - 如何使hadoop mapreduce的输出作为静态api的输入?

hadoop - 单个 map 中的多种输出格式减少

java - Spring 数据 JDBC : Conversion of compound domain types

spring - Joda 时间和 hibernate 4

hadoop - 如何检查我的集群中使用的 hadoop 发行版?

hadoop - Hive PAM 无法使用 JDBC 打开客户端传输

hadoop - 使用来自Pig的EShadoop将Geoshape存储到Elasticsearch

java - Spring 数据 Neo4j : do I need a index for each inherited class?

hadoop - Hadoop 中的伪分布式和完全分布式模式之间是否存在显着的性能差异?