You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Allow pass through of catalog options to the Hadoop configuration #2607
We have users who are trying to use multiple catalogs, but because Spark treats the session catalog differently (and we pull the Hadoop configuration off of the active spark session), users cannot pass things like different kerberos principals (even though we do allow for some catalog overrides that users can
If users wanted to access data from one HDFS cluster to another that had a different authority, they would not be able to do so because we pull the underlying Hadoop configuration from the spark session.
Some example configurations that users cannot currently override include:
This might be a spark specific issue (as the problem is pulling the Hadoop configuration from the spark session), outside of the currently allowed overrides like numClientConnections and uris.
@marton-bod or @pvary have you run into this? My thought was we could just propagate Catalog Options into the Hadoop configuration. We currently just move through the URIS and ClientConnections
@RussellSpitzer: Do I understand correctly that the proposed solution would be to copy the catalog specific configurations to the HiveConf when trying to access the underlying Iceberg table?
I like this. Maybe a simplification could be to collect all the key-value pairs we want to push under a single key? That way we wouldn't need to iterate through the whole conf object to find these.
Based on the previous example: iceberg.catalog.other_catalog.configs_to_push=hive.metastore.sasl.enabled=true,hive.metastore.kerberos.principal=aaa,hive.metastore.sasl.enabled=true
Then if we know our catalog name is other_catalog, all we'd need to do is look for this special set of configs under iceberg.catalog.other_catalog.configs_to_push (if any) and nothing else.
I personally prefer to avoid concatenation because this would lead to parsing problems down the line which I would like to avoid.
Another option could the to add a key which contains the list of keys we want to push. Parsing a list of keys is more straightforward, but then it is more complicated to configure...
When looking at this, I too was thinking that it would be anything from hadoop.*, as Russell mentioned. This way it's in line with the SparkConf.
So iceberg.catalog.other_catalog.hadoop.hive.metastore.connect.retries -> parsed out per catalog and mapped to hive.metastore.connect.retries in Spark.
I'm much less familiar with the Hive codebase, but I imagine the same issue would also come up?
For reference, the places in the code where this issue comes up that I can see (at least for Spark) are here for the core Catalog code
I'm much less familiar with the Hive codebase, but I imagine the same issue would also come up?
Yes this will be definitely a problem for Hive as well.
When looking at this, I too was thinking that it would be anything from hadoop.*, as Russell mentioned. This way it's in line with the SparkConf.
That would look quite awkward for a Hive user. It would be strange that a config starting with hadoop will be put to the HiveConf.
Ok. I somewhat pictured that. Given that this will be a problem for several people, another idea that I've had floating around in my head (that might not be a good one so feel free to say so) would be to have possibly multiple hive-site.xml / whatever hive conf files and have THOSE be pointed to as table properties?
Admittedly even just typing it out, I don't love it. But I'd be curious to hear what you think (and why it's as bad of an idea as I suspect it is).
Ok. I somewhat pictured that. Given that this will be a problem for several people, another idea that I've had floating around in my head (that might not be a good one so feel free to say so) would be to have possibly multiple hive-site.xml / whatever hive conf files and have THOSE be pointed to as table properties?
In hive you very rarely want to touch the local FS or even the remote FS directly. Not that it is not possible, but again something that would be strange.
Currently I still would prefer the ...catalog_in_different_authority.config_to_push.hive... solution, but I also admit it is not perfect (adding secrets to the public config and making sure everything is hidden correctly seems like a wish for disaster)
In hive you very rarely want to touch the local FS or even the remote FS directly. Not that it is not possible, but again something that would be strange.
Thanks for helping me understand better. I've never had much practical experience with Hive (other than for small scale stuff or for some simple stuff where it was easier for whatever reason, e.g. queries against small datasets in the Airflow UI).
Currently I still would prefer the ...catalog_in_different_authority.config_to_push.hive... solution, but I also admit it is not perfect (adding secrets to the public config and making sure everything is hidden correctly seems like a wish for disaster)
Yeah. I can see your point with respect to the secrets in the public config. That does seem like a headache.
I also don't necessarily have an idea for a "great" universal solution.
As we have users who do need this, I think I'm going to give it an initial attempt using the idea that @RussellSpitzer and I had (for just the Spark catalogue at least), to at least see what the pain points are in general and then maybe something better will come to me / us when we've taken a look at the details of it in practice. 👍
The idea of using hadoop.* properties from the catalog config to set Hadoop conf properties makes sense to me. Sounds like the argument against this is that it would be weird in Hive, but isn't this proposed for Spark where it has a precedent? We could find some other prefix for Hive, like override.* maybe? Or just live with hadoop.*. I don't think it would be that odd.
@rdblue: The specific examples above are for HiveConf configuration values and they have nothing to do with hadoop from the user point of view. Also there are plenty of other configuration values which might be good to set for a catalogs, so I think it would be good to find a general solution. Also we try to keep the same syntax for spark/hive/impala so the users could move seamlessly between the systems.
I think the best solution would be to have a general override.* prefix for all of the catalog configurations.
Activity
kbendick commentedon May 18, 2021
cc @RussellSpitzer
RussellSpitzer commentedon May 18, 2021
@marton-bod or @pvary have you run into this? My thought was we could just propagate Catalog Options into the Hadoop configuration. We currently just move through the URIS and ClientConnections
pvary commentedon May 19, 2021
@RussellSpitzer: Do I understand correctly that the proposed solution would be to copy the catalog specific configurations to the HiveConf when trying to access the underlying Iceberg table?
So for example:
Should be pushed to the HiveConf used to connect to metastore, like:
RussellSpitzer commentedon May 19, 2021
That's why I was thinking at the moment unless we have another way of doing so or there is another solution I haven't imagined
pvary commentedon May 19, 2021
Seems reasonable to me, and I do not know about other possibilities ATM
marton-bod commentedon May 19, 2021
I like this. Maybe a simplification could be to collect all the key-value pairs we want to push under a single key? That way we wouldn't need to iterate through the whole conf object to find these.
Based on the previous example:
iceberg.catalog.other_catalog.configs_to_push=hive.metastore.sasl.enabled=true,hive.metastore.kerberos.principal=aaa,hive.metastore.sasl.enabled=trueThen if we know our catalog name is
other_catalog, all we'd need to do is look for this special set of configs undericeberg.catalog.other_catalog.configs_to_push(if any) and nothing else.pvary commentedon May 19, 2021
I personally prefer to avoid concatenation because this would lead to parsing problems down the line which I would like to avoid.
Another option could the to add a key which contains the list of keys we want to push. Parsing a list of keys is more straightforward, but then it is more complicated to configure...
RussellSpitzer commentedon May 19, 2021
Since this is spark specific, I think i would just want it to be like the SparkConf and just have anything set as hadoop.* propagated (without hadoop)
kbendick commentedon May 19, 2021
When looking at this, I too was thinking that it would be anything from
hadoop.*, as Russell mentioned. This way it's in line with the SparkConf.So
iceberg.catalog.other_catalog.hadoop.hive.metastore.connect.retries-> parsed out per catalog and mapped tohive.metastore.connect.retriesin Spark.I'm much less familiar with the Hive codebase, but I imagine the same issue would also come up?
For reference, the places in the code where this issue comes up that I can see (at least for Spark) are here for the core Catalog code
iceberg/core/src/main/java/org/apache/iceberg/CatalogUtil.java
Lines 179 to 181 in 90225d6
iceberg/spark3/src/main/java/org/apache/iceberg/spark/SparkCatalog.java
Lines 96 to 101 in 98011e1
pvary commentedon May 20, 2021
Yes this will be definitely a problem for Hive as well.
That would look quite awkward for a Hive user. It would be strange that a config starting with hadoop will be put to the HiveConf.
kbendick commentedon May 20, 2021
Ok. I somewhat pictured that. Given that this will be a problem for several people, another idea that I've had floating around in my head (that might not be a good one so feel free to say so) would be to have possibly multiple hive-site.xml / whatever hive conf files and have THOSE be pointed to as table properties?
Admittedly even just typing it out, I don't love it. But I'd be curious to hear what you think (and why it's as bad of an idea as I suspect it is).
pvary commentedon May 21, 2021
In hive you very rarely want to touch the local FS or even the remote FS directly. Not that it is not possible, but again something that would be strange.
Currently I still would prefer the
...catalog_in_different_authority.config_to_push.hive...solution, but I also admit it is not perfect (adding secrets to the public config and making sure everything is hidden correctly seems like a wish for disaster)kbendick commentedon May 31, 2021
Thanks for helping me understand better. I've never had much practical experience with Hive (other than for small scale stuff or for some simple stuff where it was easier for whatever reason, e.g. queries against small datasets in the Airflow UI).
Yeah. I can see your point with respect to the secrets in the public config. That does seem like a headache.
I also don't necessarily have an idea for a "great" universal solution.
As we have users who do need this, I think I'm going to give it an initial attempt using the idea that @RussellSpitzer and I had (for just the Spark catalogue at least), to at least see what the pain points are in general and then maybe something better will come to me / us when we've taken a look at the details of it in practice. 👍
kbendick commentedon May 31, 2021
When I do that, I'll also try to check out the feasibility of the approaches mentioned by both of you, @pvary @marton-bod 👍.
Thanks for your input thus far.
rdblue commentedon Jun 12, 2021
The idea of using
hadoop.*properties from the catalog config to set Hadoop conf properties makes sense to me. Sounds like the argument against this is that it would be weird in Hive, but isn't this proposed for Spark where it has a precedent? We could find some other prefix for Hive, likeoverride.*maybe? Or just live withhadoop.*. I don't think it would be that odd.pvary commentedon Jun 21, 2021
@rdblue: The specific examples above are for HiveConf configuration values and they have nothing to do with
hadoopfrom the user point of view. Also there are plenty of other configuration values which might be good to set for a catalogs, so I think it would be good to find a general solution. Also we try to keep the same syntax for spark/hive/impala so the users could move seamlessly between the systems.I think the best solution would be to have a general
override.*prefix for all of the catalog configurations.What do you think?
Thanks,
Peter