Thanks for the reply.
I tried to use CustomResourceLoaderRegistrar like you mentioned but now I am getting BeanCreationException in multiResourceReader.
Code:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'scopedTarget.multiResourceReader' defined in URL: Initialization of bean failed; nested exception is java.lang.NullPointerException
My hadoopconfiguration is as follows
Code:
<hdp:configuration resources="classpath:/core-site.xml">
fs.default.name=${hdfs_address}
</hdp:configuration>
<hdp:resource-loader id="hadoopResourceLoader" />
<bean id="customResourceLoader"
class="org.springframework.data.hadoop.fs.CustomResourceLoaderRegistrar"
p:loader-ref="hadoopResourceLoader" />
The value of hdfs_address is
Code:
hdfs_address=hdfs://localhost:9000
My MultiResourceItemReader configuration is as follows
Code:
<bean id="multiResourceReader"
class="org.springframework.batch.item.file.MultiResourceItemReader"
scope="step">
<property name="resources" value="${hdfs_address}/${hdfs_dir}/*.txt" />
<property name="delegate" ref="hdfsItemReader" />
<property name="strict" value="true"/>
</bean>
Am I missing something that is causing the BeanCreationException?