Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

'Enable Interactive Query' throws an error: Invalid method name: 'get_all_functions'

'Enable Interactive Query' throws an error: Invalid method name: 'get_all_functions'

Rising Star

I'm trying to enable LLAP on my cluster. After checking the 'Enable Interactive Query' box in Ambari and restarting the requisite services, the following error was thrown when Ambari tried to start the 'HiveServer2 Interactive' component:

Traceback (most recent call last):
  File "/var/lib/ambari-agent/cache/common-services/HIVE/0.12.0.2.0/package/scripts/hive_server_interactive.py", line 535, in <module>
    HiveServerInteractive().execute()
  File "/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py", line 280, in execute
    method(env)
  File "/var/lib/ambari-agent/cache/common-services/HIVE/0.12.0.2.0/package/scripts/hive_server_interactive.py", line 121, in start
    status = self._llap_start(env)
  File "/var/lib/ambari-agent/cache/common-services/HIVE/0.12.0.2.0/package/scripts/hive_server_interactive.py", line 279, in _llap_start
    code, output, error = shell.checked_call(cmd, user=params.hive_user, stderr=subprocess.PIPE, logoutput=True)
  File "/usr/lib/python2.6/site-packages/resource_management/core/shell.py", line 71, in inner
    result = function(command, **kwargs)
  File "/usr/lib/python2.6/site-packages/resource_management/core/shell.py", line 93, in checked_call
    tries=tries, try_sleep=try_sleep)
  File "/usr/lib/python2.6/site-packages/resource_management/core/shell.py", line 141, in _call_wrapper
    result = _call(command, **kwargs_copy)
  File "/usr/lib/python2.6/site-packages/resource_management/core/shell.py", line 294, in _call
    raise Fail(err_msg)
resource_management.core.exceptions.Fail: Execution of '/usr/hdp/current/hive-server2-hive2/bin/hive --service llap --instances 1 --slider-am-container-mb 2048 --size 6144m  --cache 1536m --xmx 3686m --loglevel INFO --output /var/lib/ambari-agent/tmp/llap-slider2016-11-16_22-28-14 --args " -XX:+AlwaysPreTouch -XX:+UseG1GC -XX:TLABSize=8m -XX:+ResizeTLAB -XX:+UseNUMA -XX:+AggressiveOpts -XX:MetaspaceSize=1024m -XX:InitiatingHeapOccupancyPercent=80 -XX:MaxGCPauseMillis=200"' returned 3. SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/usr/hdp/2.5.0.0-1245/hive2/lib/log4j-slf4j-impl-2.6.2.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/hdp/2.5.0.0-1245/hadoop/lib/slf4j-log4j12-1.7.10.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.apache.logging.slf4j.Log4jLoggerFactory]
INFO cli.LlapServiceDriver: LLAP service driver invoked with arguments=--hiveconf
INFO conf.HiveConf: Found configuration file file:/etc/hive2/2.5.0.0-1245/0/conf.server/hive-site.xml
WARN conf.HiveConf: HiveConf of name hive.llap.daemon.allow.permanent.fns does not exist
WARN conf.HiveConf: HiveConf hive.llap.daemon.vcpus.per.instance expects INT type value
WARN cli.LlapServiceDriver: Ignoring unknown llap server parameter: [hive.aux.jars.path]
WARN conf.HiveConf: HiveConf of name hive.llap.daemon.allow.permanent.fns does not exist
WARN conf.HiveConf: HiveConf hive.llap.daemon.vcpus.per.instance expects INT type value
INFO hive.metastore: Trying to connect to metastore with URI thrift://hadoop02.woolford.io:9083
INFO hive.metastore: Opened a connection to metastore, current connections: 1
INFO hive.metastore: Connected to metastore.
Failed: org.apache.thrift.TApplicationException: Invalid method name: 'get_all_functions'
org.apache.hadoop.hive.ql.metadata.HiveException: org.apache.thrift.TApplicationException: Invalid method name: 'get_all_functions'
    at org.apache.hadoop.hive.ql.metadata.Hive.getAllFunctions(Hive.java:3643)
    at org.apache.hadoop.hive.llap.cli.LlapServiceDriver.downloadPermanentFunctions(LlapServiceDriver.java:526)
    at org.apache.hadoop.hive.llap.cli.LlapServiceDriver.run(LlapServiceDriver.java:389)
    at org.apache.hadoop.hive.llap.cli.LlapServiceDriver.main(LlapServiceDriver.java:104)

There are two versions of Hive in HDP 2.5: 1.2.1 (hive) and 2.1.0 (hive2). According to this Jira, the `get_all_functions` method was introduced in Hive versions 1.3.0 and 2.0.0: https://issues.apache.org/jira/browse/HIVE-10319

This means that the metastore jar that's currently included with Hive 1.2.1 does not contain this method, whereas the metastore jar that's included with Hive 2.1.0 does contain this method.

I verified the versions:

locate hive-metastore.jar

unzip -q -c /usr/hdp/2.5.0.0-1245/hive/lib/hive-metastore.jar META-INF/MANIFEST.MF
Specification-Title: Hive Metastore
Specification-Version: 1.2.1000.2.5.0.0-1245
[...]
unzip -q -c /usr/hdp/2.5.0.0-1245/hive2/lib/hive-metastore.jar META-INF/MANIFEST.MF
Specification-Title: Hive Metastore
Specification-Version: 2.1.0.2.5.0.0-1245
[...]

I'm not sure why, but it seems like the metastore jar that's associated with hive2, at least on my cluster, is the old version that does not have the `get_all_functions` method. This is despite the new version being in the `/usr/hdp/2.5.0.0-1245/hive2/lib/` folder.

Has anyone else experienced this? Any suggestions on how to resolve it?

1 REPLY 1
Highlighted

Re: 'Enable Interactive Query' throws an error: Invalid method name: 'get_all_functions'

Cloudera Employee

hive.llap.daemon.allow.permanent.fns=false will resolve the issue. But this will prevent LLAP daemon from localizing the resources for permanent UDFs.