Fokko commented on code in PR #5391: URL: https://github.com/apache/iceberg/pull/5391#discussion_r933976937
########## python/vendor/README.md: ########## @@ -0,0 +1,29 @@ +# Vendor packages + +Some packages we want to maintain in the repository itself, because there is no good 3rd party alternative. + +## FB303 Thrift client + +fb303 is a base Thrift service and a common set of functionality for querying stats, options, and other information from a service. + +```bash +rm -f /tmp/fb303.thrift +rm -rf fb303 +curl https://raw.githubusercontent.com/apache/thrift/master/contrib/fb303/if/fb303.thrift > /tmp/fb303.thrift +rm -rf /tmp/gen-py/ +thrift -gen py -o /tmp/ /tmp/fb303.thrift +mv /tmp/gen-py/fb303 fb303 +``` + +# Hive Metastore Thrift definition + +The thrift definition require the fb303 service as a dependency + +```bash +rm -rf /tmp/hive +mkdir -p /tmp/hive/share/fb303/if/ +curl https://raw.githubusercontent.com/apache/thrift/master/contrib/fb303/if/fb303.thrift > /tmp/hive/share/fb303/if/fb303.thrift +curl https://raw.githubusercontent.com/apache/hive/master/standalone-metastore/metastore-common/src/main/thrift/hive_metastore.thrift > /tmp/hive/hive_metastore.thrift Review Comment: Yes, we need to include this one as well: https://github.com/apache/hive/blob/rel/release-3.1.3/standalone-metastore/src/main/thrift/hive_metastore.thrift#L25 If you omit it, you will get an error: ```bash ➜ vendor git:(fd-add-hive-support) ✗ rm -rf /tmp/hive ➜ vendor git:(fd-add-hive-support) ✗ mkdir -p /tmp/hive/share/fb303/if/ ➜ vendor git:(fd-add-hive-support) ✗ curl -s https://raw.githubusercontent.com/apache/hive/master/standalone-metastore/metastore-common/src/main/thrift/hive_metastore.thrift > /tmp/hive/hive_metastore.thrift ➜ vendor git:(fd-add-hive-support) ✗ thrift -gen py -o /tmp/hive /tmp/hive/hive_metastore.thrift [WARNING:/private/tmp/hive/hive_metastore.thrift:25] Could not find include file share/fb303/if/fb303.thrift [WARNING:/private/tmp/hive/hive_metastore.thrift:32] The "byte" type is a compatibility alias for "i8". Use "i8" to emphasize the signedness of this type. [WARNING:/private/tmp/hive/hive_metastore.thrift:2431] No field key specified for ifNotExists, resulting protocol may have conflicts or not be backwards compatible! [WARNING:/private/tmp/hive/hive_metastore.thrift:2431] No field key specified for checkReferences, resulting protocol may have conflicts or not be backwards compatible! [ERROR:/private/tmp/hive/hive_metastore.thrift:2409] (last token was 'fb303.FacebookService') Service "fb303.FacebookService" has not been defined. ``` -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
