possible ways to get configuration data in hive udf
Hi guys,
How to get user specified configuration data in hive udf? what is your solution?
i think there are basically three ways to achieve this goal:
1. use a hdfs file to store the configuration data in xml/json/txt format, and then read the hdfs file in udf, users need to change the hdfs file when they want to change specific configuration parms;
2. use a local xml/json/txt file and pack it into the udf jar, then read the local file in udf, users need to change the local file and repack it into the udf jar when they want to change specific configuration parms;
3. use a hive table to store the configuration data, then read the table using hive sql dml statements in the udf (I know this sounds strange, normally we don't issue sql queries to hiveserver2 in udf, but this should also be possble), users can use hive sql dml to change specific configuration parms when they need to.
4. use a hive table to store the configuration data, then read the underneath hdfs file to get configuration details in the udf (of course, you need the configuration hive table to be in text format like csv ), users can use hive sql dml to change specific configuration parms when they need to.
What is your way of achieving this? Has anyway used method 3 above?

