Make sure that JAVA_HOME in the current environment is specified and is valid.

Raises:ConfigurationException if JAVA_HOME is not set or does not contain java

Search the PATH for the given executable filename

Parameters:fname – the filename to check
Returns:the path that contains the filename
Raises:ConfigurationException if the filename cannot be found, or if it is not executable

Find the Kafka admin utilities, either from the provided arg or the PATH.

Parameters:tools_path – the path to use for locating the Kafka admin utilities.
Returns:the path that contains Kafka admin utilities
Raises:ConfigurationException if the path cannot be determined

Check if the given filename is a regular file and is executable.

Parameters:fname – the filename to check.
Returns:True if the filename given exists and is executable, False otherwise

Load the provided string as JSON data. Make sure to try the python2 way and the python3 way

Parameters:json_str – The JSON encoded string
Returns:The decoded JSON object

Decorator that synchronizes access to the instance method it decorates using a preexisting lock in the _lock attribute of the instance