-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🐞 Destination databricks: update jdbc driver to patch log4j #7622
Changes from all commits
45d3c79
8bc3e9c
eb4d03a
e83feb8
4970475
d863236
dea916c
9bcacee
a200f2e
e92e582
3b8b2bf
7b71fef
6b5d420
e2c2b3e
a37a2a6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -77,7 +77,7 @@ public StandardCheckConnectionOutput run(final StandardCheckConnectionInput inpu | |
LOGGER.debug("Check connection job received output: {}", output); | ||
return output; | ||
} else { | ||
throw new WorkerException("Error while getting checking connection."); | ||
throw new WorkerException(String.format("Error checking connection, status: %s, exit code: %d", status, exitCode)); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @jrhizor, a check operation failed in the acceptance test. I added more information to the exception message and saw this:
Do you know what might be the root cause behind this exit code? Could it be related to the recent change in There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think the gentle close changes look related. Are you sure this docker container isn't actually outputting an error code? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Here is what happens:
So the root cause is that we must always close the database at the end for Databricks, which was not the case in the default check command implementation in |
||
} | ||
|
||
} catch (final Exception e) { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/usr/bin/env bash | ||
|
||
. tools/lib/lib.sh | ||
|
||
# Whoever runs this script must accept the following terms & conditions: | ||
# https://databricks.com/jdbc-odbc-driver-license | ||
_get_databricks_jdbc_driver() { | ||
local driver_zip="SimbaSparkJDBC42-2.6.21.1039.zip" | ||
local driver_file="SparkJDBC42.jar" | ||
local driver_url="https://databricks-bi-artifacts.s3.us-east-2.amazonaws.com/simbaspark-drivers/jdbc/2.6.21/${driver_zip}" | ||
local connector_path="airbyte-integrations/connectors/destination-databricks" | ||
|
||
if [[ -f "${connector_path}/lib/${driver_file}" ]] ; then | ||
echo "[Databricks] Spark JDBC driver already exists" | ||
else | ||
echo "[Databricks] Downloading Spark JDBC driver..." | ||
curl -o "${connector_path}/lib/${driver_zip}" "${driver_url}" | ||
|
||
echo "[Databricks] Extracting Spark JDBC driver..." | ||
unzip "${connector_path}/lib/${driver_zip}" "${driver_file}" | ||
mv "${driver_file}" "${connector_path}/lib/" | ||
rm "${connector_path}/lib/${driver_zip}" | ||
fi | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cgardens, @sherifnada, I found that if we don't close the database connection here, the Databricks destination acceptance test will stuck. This is a new issue. Previously it was not the case.
Do you know any recent change that may lead to this new issue? If not, the only alternative explanation I can think of is that we upgraded the Spark JDBC Driver. However, nothing in the release note seems related.