BELUGA BEHR commented on HIVE-14788:

The current option, as I understand it:

# Copy target JAR file to each host into Hive auxiliary directory
# Restart one HiveServer2 instance
# Connect directly to that one HiveServer2 instance
# Create the function
# Restart the rest of the HiveServer2 instances

Restarting the rest of the HiveServer2 instances will cause them to pick up the 
new JAR file from the auxiliary directory and also re-load the list of 
functions from the HMS.

This can perhaps be improved with a read-through cache for functions, with a 
timeout for each entry (TTL).  When a function is encountered, if it is not in 
the cache, HS2 can attempt to grab the function information from the HMS.  The 
timeout is important because if a user is to drop a function, that function 
needs a way to be dropped from the HS2 caches.

With this setup, the process for adding a function is simplified:

# Copy target JAR file to each host into Hive auxiliary directory
# Restart all HiveServer2 instances
# Connect to any HiveServer2 instance through the load balancer
# Create the function

> Investigate how to access permanent function with restarting HS2 if load 
> balancer is configured
> -----------------------------------------------------------------------------------------------
>                 Key: HIVE-14788
>                 URL: https://issues.apache.org/jira/browse/HIVE-14788
>             Project: Hive
>          Issue Type: Improvement
>          Components: HiveServer2
>            Reporter: Aihua Xu
>            Assignee: Aihua Xu
> When load balancer is configured for multiple HS2 servers, seems we need to 
> restart each HS2 server to get permanent function to work. Since the command 
> "reload function" issued from the client to refresh the global registry may 
> is not targeted to a specific HS2 server, some servers may not get refreshed 
> and ClassNotFoundException may be thrown later.
> Investigate if it's an issue and a good solution for it.

This message was sent by Atlassian JIRA

Reply via email to