Spring-Hadoop use spring object from mapper class

2013-05-08T19:10:54

I use spring-hadoop version 1. I am trying to use a Spring initialized singleton from the mapper class.

The start of the class is listed below

public class Map extends
    Mapper<LongWritable, Text, Text, IntWritable> 


@Autowired 
MyObject myObject;

The problem is that it is not initialized. I checked also in the log of spring that the myObject bean is initialized but it is not autowired.

After searching the web i found the link

http://forum.springsource.org/showthread.php?128572-Using-spring-context-in-mapper-how-to-autowire

I did not understand what the solution was there.

Copyright License:
Author:「David Michael Gang」,Reproduced under the CC 4.0 BY-SA copyright license with link to original source & disclaimer.
Link to:https://stackoverflow.com/questions/16439146/spring-hadoop-use-spring-object-from-mapper-class

About “Spring-Hadoop use spring object from mapper class” questions

I use spring-hadoop version 1. I am trying to use a Spring initialized singleton from the mapper class. The start of the class is listed below public class Map extends Mapper&lt;LongWritable,...
I'm writing an application/test with spring-batch, containing hadoop mapreduce jobs. For the spring-batch container everything is fine: I'm loading the Applicationcontext specific configurations b...
I was developing a hadoop application. And now I want to migrate it into a spring-hadoop project. The thing is in my mapreduce job. I was using MultiOutputFormat from the HCatalog API as I want to ...
According to the README in spring-hadoop, the project has reached an End-Of-Life: NOTICE: The Spring for Apache Hadoop project has reached End-Of-Life status on April 5th, 2019. The final Spring for
I'm facing some difficulties while trying to use Mapper annotation functionality of spring. I would like to use the mapper to map an object of Map in java as follows: HostCounters : @Data @
Previously in version 3 of Spring Data Elasticsearch, the Jackson mapper was used by default, but could be overridden to use the Metamodel object mapper, as documented here: https://docs.spring.io/...
We're trying to upgrade our system to use Java 8 instead of Java 7. On some process configuration in our Spring-Hadoop xml, we have a definition of a pre-action that is actually a javascript scrip...
We have a Spring Boot application that should access stored procedures from two different databases, DB2 and Oracle, through MyBatis mappers We have created two DB2 context classes, e.g. for DB2 @
@Data public class FilesDTO { private int issue; private String uniqueStr; private StorageDomain xml; private StorageDomain pdf; private StorageDomain stop; } @Data public class
Inside a web application, I'm using dozer mapper (5.3.2) to perform some object to object mappings. DozerBeanMapper is instantiated using spring bean definition. Mapping file is provided as pr...

Copyright License:Reproduced under the CC 4.0 BY-SA copyright license with link to original source & disclaimer.