You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@hive.apache.org by "slachiewicz (via GitHub)" <gi...@apache.org> on 2026/09/28 17:00:36 UTC

[PR] HIVE-30098: Vendor fb303.thrift so hive_metastore.thrift compiles without a separate fb303 install [hive]

slachiewicz opened a new pull request, #6826:
URL: https://github.com/apache/hive/pull/6826

   ### What changes were proposed in this pull request?
   Adds Thrift's `contrib/fb303/if/fb303.thrift` as `standalone-metastore/metastore-common/include/share/fb303/if/fb303.thrift`. The metastore-common Thrift execution already passes `-I ${basedir}/include`, so `include "share/fb303/if/fb303.thrift"` resolves there with no change to the IDL or the POM.
   
   ### Why are the changes needed?
   The include currently resolves only through `-I ${thrift.home}`, which requires fb303 to have been installed separately into the Thrift prefix. Thrift no longer installs it and declined to ([THRIFT-6389](https://issues.apache.org/jira/browse/THRIFT-6389)), so regenerating the metastore bindings needs a manual download first. Dropping `FacebookService` itself is [HIVE-18249](https://issues.apache.org/jira/browse/HIVE-18249).
   
   ### Does this PR introduce _any_ user-facing change?
   No. The file is identical in Thrift 0.16.0 (the pinned `libthrift.version`), 0.24.0 and master.
   
   ### How was this patch tested?
   Verified: `thrift -strict --gen java:beans,generated_annotations=undated --gen cpp --gen php --gen py --gen rb` on `hive_metastore.thrift` → 1327 files, `diff -r`-identical to the same run resolving fb303 through a `thrift.home`-style prefix; without the file it fails with `Could not find include file`. Run with Thrift 0.24.0; I have not run the `thriftif` Maven profile with 0.16.0.
   


-- 
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: gitbox-unsubscribe@hive.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


Re: [PR] HIVE-30098: Vendor fb303.thrift so hive_metastore.thrift compiles without a separate fb303 install [hive]

Posted by "slachiewicz (via GitHub)" <gi...@apache.org>.
slachiewicz commented on code in PR #6826:
URL: https://github.com/apache/hive/pull/6826#discussion_r4132312832


##########
standalone-metastore/metastore-common/include/share/fb303/if/fb303.thrift:
##########
@@ -0,0 +1,113 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/**
+ * fb303.thrift
+ */
+
+namespace java com.facebook.fb303

Review Comment:
   I'd keep `com.facebook.fb303` here. The wire format wouldn't change, but the namespace becomes the Java supertype of `ThriftHiveMetastore.Iface` (`@Public @Stable`) and the return type of `getStatus()`, so existing implementers of `Iface` would stop compiling. This PR only makes the IDL resolvable without changing any generated output.



-- 
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: gitbox-unsubscribe@hive.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


Re: [PR] HIVE-30098: Vendor fb303.thrift so hive_metastore.thrift compiles without a separate fb303 install [hive]

Posted by "slachiewicz (via GitHub)" <gi...@apache.org>.
slachiewicz commented on PR #6826:
URL: https://github.com/apache/hive/pull/6826#issuecomment-5888318622

   libfb303 still has to supply the Java classes: the generated `ThriftHiveMetastore` extends `com.facebook.fb303.FacebookService`, and `BaseHandler` extends `FacebookBase`, which is hand-written in that jar. Renaming the package is wire-compatible, but it changes the supertype of `ThriftHiveMetastore.Iface` (`@Public @Stable`) and the return type of `getStatus()`, so implementers such as [waggle-dance's `FederatedHMSHandler`](https://github.com/ExpediaGroup/waggle-dance/blob/main/waggle-dance-core/src/main/java/com/hotels/bdp/waggledance/server/FederatedHMSHandler.java) and [metacat's `CatalogThriftHiveMetastore`](https://github.com/Netflix/metacat/blob/master/metacat-thrift/src/main/java/com/netflix/metacat/thrift/CatalogThriftHiveMetastore.java) would stop compiling. I'd rather keep this PR output-neutral and drop libfb303 together with `FacebookService` in [HIVE-18249](https://issues.apache.org/jira/browse/HIVE-18249) for a major release. Happy to do that follow-up.


-- 
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: gitbox-unsubscribe@hive.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


Re: [PR] HIVE-30098: Vendor fb303.thrift so hive_metastore.thrift compiles without a separate fb303 install [hive]

Posted by "dengzhhu653 (via GitHub)" <gi...@apache.org>.
dengzhhu653 commented on PR #6826:
URL: https://github.com/apache/hive/pull/6826#issuecomment-5887125981

   can we remove the `libfb303` dependency from root pom and the `standalone-metastore` pom?


-- 
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: gitbox-unsubscribe@hive.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


Re: [PR] HIVE-30098: Vendor fb303.thrift so hive_metastore.thrift compiles without a separate fb303 install [hive]

Posted by "dengzhhu653 (via GitHub)" <gi...@apache.org>.
dengzhhu653 commented on code in PR #6826:
URL: https://github.com/apache/hive/pull/6826#discussion_r4131602421


##########
standalone-metastore/metastore-common/include/share/fb303/if/fb303.thrift:
##########
@@ -0,0 +1,113 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/**
+ * fb303.thrift
+ */
+
+namespace java com.facebook.fb303

Review Comment:
   nit: can we change the namespace to `org.apache.hive.com.facebook.fb303` ? per my understanding, it should be compatible with old clients.
   



-- 
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: gitbox-unsubscribe@hive.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


Re: [PR] HIVE-30098: Vendor fb303.thrift so hive_metastore.thrift compiles without a separate fb303 install [hive]

Posted by "InvisibleProgrammer (via GitHub)" <gi...@apache.org>.
InvisibleProgrammer commented on PR #6826:
URL: https://github.com/apache/hive/pull/6826#issuecomment-5890415172

   It is only half way of the work. I faced with the same working on the thrift upgrade and made the same conclusion at my thrift upgrade PR here: https://github.com/apache/hive/pull/6653
   
   Let me draw your attention on this commit specifically: https://github.com/apache/hive/pull/6653/changes/8aadf78fcb00d69d2bfa307568df68dd63cf5428
   It is not only adds the thrift file but also removes the existing dependencies as well. 
   
   And I think this change is required too: https://github.com/apache/hive/pull/6653/changes#diff-deb369624f92d4833d1c243ccd5f97cac71a281cf39b7326bda9a1013fac728aL25
   


-- 
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: gitbox-unsubscribe@hive.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


Re: [PR] HIVE-30098: Vendor fb303.thrift so hive_metastore.thrift compiles without a separate fb303 install [hive]

Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #6826:
URL: https://github.com/apache/hive/pull/6826#issuecomment-5875550478

   ## [![Quality Gate Passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/qg-passed-20px.png 'Quality Gate Passed')](https://sonarcloud.io/dashboard?id=apache_hive&pullRequest=6826) **Quality Gate passed**  
   Issues  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 New issues](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=6826&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/accepted-16px.png '') [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=6826&issueStatuses=ACCEPTED)
   
   Measures  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_hive&pullRequest=6826&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=6826&metric=new_coverage&view=list)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=6826&metric=new_duplicated_lines_density&view=list)  
     
   <!-- sqra-placement-anchor -->
   [See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_hive&pullRequest=6826)
   
   


-- 
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: gitbox-unsubscribe@hive.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


Re: [PR] HIVE-30098: Vendor fb303.thrift so hive_metastore.thrift compiles without a separate fb303 install [hive]

Posted by "slachiewicz (via GitHub) via gitbox" <gi...@hive.apache.org>.
slachiewicz commented on PR #6826:
URL: https://github.com/apache/hive/pull/6826#issuecomment-6876532785

   Closing as superseded. [#6893](https://github.com/apache/hive/pull/6893) added `fb303.thrift` under `src/main/thrift` and switched the include to `include "fb303.thrift"`, so master no longer needs a separately installed fb303. Removing the `libfb303` dependency is covered by [#6938](https://github.com/apache/hive/pull/6938) (HIVE-30237).


-- 
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: gitbox-unsubscribe@hive.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


Re: [PR] HIVE-30098: Vendor fb303.thrift so hive_metastore.thrift compiles without a separate fb303 install [hive]

Posted by "slachiewicz (via GitHub) via gitbox" <gi...@hive.apache.org>.
slachiewicz closed pull request #6826: HIVE-30098: Vendor fb303.thrift so hive_metastore.thrift compiles without a separate fb303 install
URL: https://github.com/apache/hive/pull/6826


-- 
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: gitbox-unsubscribe@hive.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org