Commit 06a543e1 authored by Lukasz Waskiewicz's avatar Lukasz Waskiewicz
Browse files

refs #1472 parametryzowanie nazwy udf.jar per process

parent 62f5b211
......@@ -55,7 +55,7 @@ public class CocosImpalaImportTasklet extends CocosGenericImpalaImportTasklet {
@Autowired
private List<UdfFunctionDef> functionDefinitions;
@Value("${cocos.impala.udf.jar.name}")
@Value("#{jobParameters['impalaUdfJarName']?:'${cocos.impala.udf.jar.name}'}")
private String udfJarName;
@Value("#{jobParameters['partitionsCount']}")
......
......@@ -2,8 +2,15 @@ package pl.edu.icm.cocos.imports.utils.batch.generator;
import java.io.File;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;
@Component
@Scope("job")
public class CocosCompilationUnitNameGeneratorStaticImpl implements CocosCompilationUnitNameGenerator {
@Value("#{jobParameters['impalaUdfJarName']?:'${cocos.impala.udf.jar.name}'}")
private String compilationUnitName;
@Override
......
......@@ -233,9 +233,7 @@
</property>
</bean>
<bean id="compilationUnitNameGenerator" class="pl.edu.icm.cocos.imports.utils.batch.generator.CocosCompilationUnitNameGeneratorStaticImpl">
<property name="compilationUnitName" value="${cocos.impala.udf.jar.name}" />
</bean>
<bean id="compilationUnitNameGenerator" class="pl.edu.icm.cocos.imports.utils.batch.generator.CocosCompilationUnitNameGeneratorStaticImpl" scope="job" />
<bean class="pl.edu.icm.cocos.imports.impala.UdfFunctionDef">
<constructor-arg name="name" value="within_box"/>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment