[
https://issues.apache.org/jira/browse/AMBARI-22580?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16276758#comment-16276758
]
Unai P. Mendizabal commented on AMBARI-22580:
---------------------------------------------
Hi, [~adoroszlai]!
I think I haven't made myself clear. I'm working on an already working Ambari
cluster, which uses a working PostgreSQL database. The problem is the code of
the Streaming Analytics Manager (SAM) service. When setting it up, I must
choose a database for it to use. One of the options is PostgreSQL. I've tried
setting SAM up to use MySQL, and it worked. But it did not work with PostgreSQL.
The error points to the following piece of code, with the path I've given in
the previous comment:
{code:python}
if 'mysql' == streamline_storage_type:
jdbc_driver_jar = default("/hostLevelParams/custom_mysql_jdbc_name", None)
if jdbc_driver_jar == None:
# ...
if 'oracle' == streamline_storage_type:
jdbc_driver_jar = default("/hostLevelParams/custom_oracle_jdbc_name", None)
if jdbc_driver_jar == None:
# ...
connector_curl_source = format("{jdk_location}/{jdbc_driver_jar}") # <-- error
happens here
connector_download_dir=format("{streamline_home}/libs")
connector_bootstrap_download_dir=format("{streamline_home}/bootstrap/lib")
downloaded_custom_connector = format("{tmp_dir}/{jdbc_driver_jar}")
{code}
In the use cases in which I choose PostgreSQL, streamline_storage_type will
equal 'postgresql', thus variable jdbc_driver_jar will not be defined, and that
causes the error.
> Streaming Analytics Manager (SAM) not working with PostgreSQL
> -------------------------------------------------------------
>
> Key: AMBARI-22580
> URL: https://issues.apache.org/jira/browse/AMBARI-22580
> Project: Ambari
> Issue Type: Bug
> Components: ambari-server
> Reporter: Unai P. Mendizabal
>
> Hi!
> I was trying to install SAM on my Ambari cluster and trying to use the same
> PostgreSQL database I use for Ambari server. The installation fails though,
> with error "KeyError: 'jdbc_driver_jar" coming from the params.py file of the
> Streamline service. I dived into it and realized that variable
> 'jdbc_driver_jar' is never initialized for PostgreSQL databases, while it
> does when it comes to Oracle or MySQL.
> The file is
> /var/lib/ambari-server/resources/common-services/STREAMLINE/0.5.0/package/scripts/params.py,
> you can see the problem from line 192 on. As a workaround, I think it should
> be possible to manually set 'jdbc_driver_jar' to the path to the jdbc driver
> on that same file.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)