Skip to content

Conversation

lingjinjiang
Copy link
Contributor

When using flink with the HBASE_CONF_DIR env variable and don't install hbase, then will get the "hbase command not found" error.

https://issues.apache.org/jira/browse/FLINK-6286

@greghogan
Copy link
Contributor

Hi @lingjinjiang, I am not familiar with configuring HBase for Flink and we don't seem to have documentation on this. What does it mean to have HBASE_CONF_DIR set but not have hbase available?

@lingjinjiang
Copy link
Contributor Author

Hi @greghogan , In the config.sh, there is a if statement identifies whether HBASE_CONF_DIR is setted.
If the HBASE_CONF_DIR is setted, then will use the "hbase classpath" command to add the hbase's classpath to flink's classpath.
But it does not check whether the "hbase" command is existed before using it.
Then in the host where I'm using flink, another application need this env variable and there is no "hbase" command, then the error happen.

@greghogan
Copy link
Contributor

Would it be better to replace the outer if-statement (line 312) with the test for the presence of hbase? And to log a message that HBASE_CONF_DIR is defined but hbase was not found so no HBase jars are included on the classpath?

@lingjinjiang
Copy link
Contributor Author

@greghogan , I add some comments and log the message about hbase command not found.

Copy link
Contributor

@greghogan greghogan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure this is the best way to integrate the HBase classpath but +1 to fixing the error with a detailed log message.

# The hbase command is found, then setup the HBase classpath.
INTERNAL_HADOOP_CLASSPATHS="${INTERNAL_HADOOP_CLASSPATHS}:`${HBASE_IN_PATH} classpath`"
else
echo "The HBASE_IN_PATH is setted but can't setup HBase classpath. Please verify hbase command exists."
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps more like "HBASE_CONF_DIR="${HBASE_CONF_DIR}" is set but 'hbase' command was not found in "${HBASE_PATH}" so classpath could not be updated."? I assumed HBASE_PATH="${HBASE_HOME}/bin:$PATH" as a local variable.

@lingjinjiang
Copy link
Contributor Author

@greghogan, thanks for your suggestion. I have changed the log message.

@greghogan
Copy link
Contributor

@lingjinjiang thanks for your contribution! Merging ...

@lingjinjiang
Copy link
Contributor Author

@greghogan thanks for your review. I have another question, how can I assign the issue to myself ?

@greghogan
Copy link
Contributor

@fhueske can grant you Jira permissions.

@zentol
Copy link
Contributor

zentol commented Apr 18, 2017

@lingjinjiang You are now the proud owner of contributor permissions and can assign issues to yourself.

@lingjinjiang
Copy link
Contributor Author

@greghogan @zentol thanks. Can this pull request be merged or closed now ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants