You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "romanstreamsets (via GitHub)" <gi...@apache.org> on 2023/02/12 23:15:37 UTC

[GitHub] [iceberg] romanstreamsets opened a new issue, #6814: Extra unnecessary Hadoop Config setting is required when using Hive Catalog

romanstreamsets opened a new issue, #6814:
URL: https://github.com/apache/iceberg/issues/6814

   ### Apache Iceberg version
   
   1.1.0 (latest release)
   
   ### Query engine
   
   None
   
   ### Please describe the bug 🐞
   
   I'm trying to write into an Iceberg table using Iceberg libraries in a Groovy code with Hive Catalog. File storage is Azure Datalake Gen2.
   
   The following Hadoop configuration should be sufficient (and it was sufficient when using JDBC Catalog for Iceberg):
   ```
   hadoopConf.set("fs.azure.account.auth.type.foostorage.dfs.core.windows.net", "OAuth");
   hadoopConf.set("fs.azure.account.oauth.provider.type.foostorage.dfs.core.windows.net", "org.apache.hadoop.fs.azurebfs.oauth2.ClientCredsTokenProvider");
   // App ID
   hadoopConf.set("fs.azure.account.oauth2.client.id.foostorage.dfs.core.windows.net", constants.clientID);
   // Secret
   hadoopConf.set("org.apache.hadoop.fs.azure.account.oauth2.client.secret." + constants.accountName+ ".dfs.core.windows.net",constants.clientSecret);
   // Tenant ID
   hadoopConf.set("fs.azure.account.oauth2.client.endpoint.foostorage.dfs.core.windows.net", "https://login.microsoftonline.com/"+constants.tenantID +"/oauth2/token");
   ```
   However, when trying to create a table in a Hive catalog using this hadoop config, the following error is returned:
   ```
   org.apache.iceberg.exceptions.RuntimeIOException: Failed to get file system for path: abfss://iceberg@foostorage.dfs.core.windows.net/mytable4/metadata/00000-2be48b6e-b64b-4313-a5a5-941ac39384ee.metadata.json
           at org.apache.iceberg.hadoop.Util.getFs(Util.java:54)
           at org.apache.iceberg.hadoop.HadoopOutputFile.fromPath(HadoopOutputFile.java:53)
           at org.apache.iceberg.hadoop.HadoopFileIO.newOutputFile(HadoopFileIO.java:83)
           at org.apache.iceberg.BaseMetastoreTableOperations.writeNewMetadata(BaseMetastoreTableOperations.java:159)
           at org.apache.iceberg.hive.HiveTableOperations.doCommit(HiveTableOperations.java:252)
           at org.apache.iceberg.BaseMetastoreTableOperations.commit(BaseMetastoreTableOperations.java:135)
           at org.apache.iceberg.BaseMetastoreCatalog$BaseMetastoreCatalogTableBuilder.create(BaseMetastoreCatalog.java:196)
           at org.apache.iceberg.catalog.Catalog.createTable(Catalog.java:75)
           at org.apache.iceberg.catalog.Catalog.createTable(Catalog.java:106)
           at org.apache.iceberg.catalog.Catalog$createTable$1.call(Unknown Source)
           at icehive.run(icehive.groovy:101).  // my program
   ...        
   Caused by: Unable to load OAuth token provider class.Configuration property fs.azure.account.oauth2.client.secret not found.
   ```
   It gets fixed by adding the following line to the hadoopConf:
   `hadoopConf.set("fs.azure.account.oauth2.client.secret", constants.clientSecret);`
   
   However, I shouldn’t be having to add that line, as per [MS documentation](https://learn.microsoft.com/en-us/azure/databricks/storage/azure-storage#access-adls-gen2-directly)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] github-actions[bot] commented on issue #6814: Extra unnecessary Hadoop Config setting is required when using Hive Catalog

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #6814:
URL: https://github.com/apache/iceberg/issues/6814#issuecomment-1675550694

   This issue has been automatically marked as stale because it has been open for 180 days with no activity. It will be closed in next 14 days if no further activity occurs. To permanently prevent this issue from being considered stale, add the label 'not-stale', but commenting on the issue is preferred when possible.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [I] Extra unnecessary Hadoop Config setting is required when using Hive Catalog [iceberg]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #6814:
URL: https://github.com/apache/iceberg/issues/6814#issuecomment-1880238848

   This issue has been closed because it has not received any activity in the last 14 days since being marked as 'stale'


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [I] Extra unnecessary Hadoop Config setting is required when using Hive Catalog [iceberg]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed issue #6814: Extra unnecessary Hadoop Config setting is required when using Hive Catalog
URL: https://github.com/apache/iceberg/issues/6814


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org