Java Code Examples for com.klarna.hiverunner.builder.HiveShellBuilder#putAllProperties()

The following examples show how to use com.klarna.hiverunner.builder.HiveShellBuilder#putAllProperties() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: FlinkStandaloneHiveRunner.java    From flink with Apache License 2.0 5 votes vote down vote up
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));
	}
}
 
Example 2
Source File: FlinkStandaloneHiveRunner.java    From flink with Apache License 2.0 5 votes vote down vote up
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));
	}
}
 
Example 3
Source File: HiveRunnerCore.java    From HiveRunner with Apache License 2.0 5 votes vote down vote up
private void loadAnnotatedProperties(Object testCase, HiveShellBuilder workFlowBuilder) {
  for (Field hivePropertyField : ReflectionUtils.getAllFields(testCase.getClass(),
      withAnnotation(HiveProperties.class))) {
    Preconditions.checkState(ReflectionUtils.isOfType(hivePropertyField, Map.class),
        "Field annotated with @HiveProperties should be of type Map<String, String>");
    workFlowBuilder.putAllProperties(
        ReflectionUtils.getFieldValue(testCase, hivePropertyField.getName(), Map.class));
  }
}