use of com.klarna.hiverunner.annotations.HiveProperties in project flink by apache.
the class FlinkEmbeddedHiveRunner method loadAnnotatedProperties.
private void loadAnnotatedProperties(Class testClass, HiveShellBuilder workFlowBuilder) {
for (Field hivePropertyField : ReflectionUtils.getAllFields(testClass, withAnnotation(HiveProperties.class))) {
Preconditions.checkState(ReflectionUtils.isOfType(hivePropertyField, Map.class), "Field annotated with @HiveProperties should be of type Map<String, String>");
workFlowBuilder.putAllProperties(ReflectionUtils.getStaticFieldValue(testClass, hivePropertyField.getName(), Map.class));
}
}
Aggregations