title: How to pass configurations from hive script to UDF
body: <p>In pig, you can pass a configuration from your pig script to pig UDF via <code>UDFContext</code>. For example,</p>
  
  <pre><code>// in pig script
  SET my.conf dummy-conf
  
  // in UDF java code
  Configuration conf = UDFContext.getUDFContext().getJobConf();
  String myConf = conf.get("my.conf");
  </code></pre>
  
  <p>So, is there a similar way to pass configuration from a hive script to a hive UDF? For example, if I have <code>set MY_CONF='foobar'</code> in a hive script, how can I retrieve that in a java UDF, which needs to consume the value of <code>MY_CONF</code>?</p>