[
https://issues.apache.org/jira/browse/BEAM-4260?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16468635#comment-16468635
]
Tim Robertson edited comment on BEAM-4260 at 5/9/18 9:53 AM:
-------------------------------------------------------------
I'm afraid I haven't been able to successfully use {{HCatalogIO}} for reading
in Cloudera 5 yet. My approach has been to try and build an app using 2.3 and
shading/relocating the hive / HCatalog packages but then talking over thrift to
a 1.1 server (running on Spark 2.3.0-cloudera2 and beam 2.4.0). I'm less
optimistic now that it can be done, and I suspect could prove fragile even if
some tests work with e.g {{ORCFile}} support which has been repackaged. I now
presume this would need code changes in {{HCatalogIO}} to support older
versions through shimming or possibly even multiple versions of {{HCatalogIO}}.
Before proceeding with further investigation I'd welcome further thoughts on
the merits of supporting 1.x at all - I could be alone in being affected.
I suggest we keep an eye on the forthcoming CDH release and ensure Beam is
indeed compatible with it. CDH 6 is [currently targeting
2.1.1|https://repository.cloudera.com/artifactory/cloudera-repos/org/apache/hive/hive/2.1.1-cdh6.x-SNAPSHOT/]
was (Author: timrobertson100):
I'm afraid I haven't been able to successfully use {{HCatalogIO}} for reading
in Cloudera 5 yet. My approach has been to try and build an app using 2.3 and
shading/relocating the hive / HCatalog packages but then talking over thrift to
a 1.1 server (running on Spark 2.3.0-cloudera2 and beam 2.4.0). I'm less
optimistic now that it can be done, and I suspect could prove fragile even if
some tests work with e.g {{ORCFile}} support which has been repackaged. I now
presume this would need code changes in {{HCatalogIO}} to support older
versions through shimming or possibly even multiple versions of {{HCatalogIO}}.
Before proceeding with further investigation I'd welcome further thoughts on
the merits of supporting 1.x at all - I could be alone in being affected.
I suggest we keep an eye on the CDH release and ensure it is compatible with
the forthcoming version which is [currently targeting
2.1.1|https://repository.cloudera.com/artifactory/cloudera-repos/org/apache/hive/hive/2.1.1-cdh6.x-SNAPSHOT/]
> Document usage for hcatalog 1.1.0
> ---------------------------------
>
> Key: BEAM-4260
> URL: https://issues.apache.org/jira/browse/BEAM-4260
> Project: Beam
> Issue Type: Improvement
> Components: io-java-hcatalog
> Affects Versions: 2.4.0
> Reporter: Tim Robertson
> Assignee: Tim Robertson
> Priority: Minor
>
> The {{HCatalogIO}} does not work with environments providing Hive Server 1.x
> which is in widespread use - as an example the latest Cloudera (5.14.2)
> provides 1.1.0.
>
> The {{HCatalogIO}} marks it's Hive dependencies as provided, so I believe the
> intention was to be open to multiple versions.
>
> The issues come from the following:
> - use of {{HCatUtil.getHiveMetastoreClient(hiveConf)}} while previous
> versions used the [now
> deprecated|https://github.com/apache/hive/blob/master/hcatalog/core/src/main/java/org/apache/hive/hcatalog/common/HCatUtil.java#L586]
> {{getHiveClient(HiveConf hiveConf)}}
> - Changes to the signature of {{RetryingMetaStoreClient.getProxy(...)}}
>
> Given this doesn't work in a major Hadoop distro, and will not until the next
> CDH release later in 2018 (i.e. widespread adoption only expected in 2019) I
> think it would be worthwhile providing a fix/workaround.
> I _think_ building for 2.3 and relocating in your own app might be a
> workaround although I'm still testing it. If that is successful I'd propose
> adding it to the project README or in a separate markdown file linked from
> the README.
> Does that sound like a reasonable approach please?
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)