Skip to content

Commit 87ec68a

Browse files
Add specific protobuf version for GCS connector
1 parent 8ee2957 commit 87ec68a

File tree

3 files changed

+12
-67
lines changed

3 files changed

+12
-67
lines changed

hadoop-project/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@
8686

8787
<!-- Protobuf version for backward compatibility -->
8888
<!-- This is used in hadoop-common for compilation only -->
89-
<protobuf.version>3.25.3</protobuf.version>
89+
<protobuf.version>2.5.0</protobuf.version>
9090
<!-- Protobuf scope in hadoop common -->
9191
<!-- set to "provided" so protobuf2 is no longer exported as a dependency -->
9292
<common.protobuf2.scope>provided</common.protobuf2.scope>

hadoop-tools/hadoop-gcp/dev-support/findbugs-exclude.xml

Lines changed: 2 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -15,75 +15,11 @@
1515
limitations under the License.
1616
-->
1717
<FindBugsFilter>
18-
19-
<!-- same code as in FileSystem is triggering the same warning. -->
20-
<Match>
21-
<Class name="org.apache.hadoop.fs.s3native.S3xLoginHelper" />
22-
<Method name="checkPath" />
23-
<Bug pattern="ES_COMPARING_STRINGS_WITH_EQ" />
24-
</Match>
2518
<!-- Redundant null check makes code clearer, future-proof here. -->
2619
<Match>
27-
<Class name="org.apache.hadoop.fs.s3a.S3AFileSystem" />
28-
<Method name="s3Exists" />
20+
<Class name="org.apache.hadoop.fs.gs.GoogleCloudStorage" />
21+
<Method name="createItemInfoForBlob" />
2922
<Bug pattern="RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE" />
3023
</Match>
31-
<!-- we are using completable futures, so ignore the Future which submit() returns -->
32-
<Match>
33-
<Class name="org.apache.hadoop.fs.s3a.impl.InputStreamCallbacksImpl" />
34-
<Bug pattern="RV_RETURN_VALUE_IGNORED_BAD_PRACTICE" />
35-
</Match>
3624

37-
<!--
38-
findbugs gets confused by lambda expressions in synchronized methods
39-
and considers references to fields to be unsynchronized.
40-
As you can't disable the methods individually, we have to disable
41-
them for the entire class.
42-
-->
43-
<Match>
44-
<Class name="org.apache.hadoop.fs.s3a.S3AInputStream"/>
45-
<Bug pattern="IS2_INCONSISTENT_SYNC"/>
46-
</Match>
47-
<!--
48-
findbugs reporting RV ignored. Not true.
49-
"Return value of S3AReadOpContext.getReadInvoker() ignored,
50-
but method has no side effect"
51-
-->
52-
<Match>
53-
<Class name="org.apache.hadoop.fs.s3a.S3AInputStream"/>
54-
<Method name="reopen"/>
55-
<Bug pattern="RV_RETURN_VALUE_IGNORED_NO_SIDE_EFFECT"/>
56-
</Match>
57-
<Match>
58-
<Class name="org.apache.hadoop.fs.s3a.S3AFileSystem"/>
59-
<Method name="openFileWithOptions"/>
60-
<Bug pattern="RV_RETURN_VALUE_IGNORED_BAD_PRACTICE"/>
61-
</Match>
62-
<Match>
63-
<Class name="org.apache.hadoop.fs.s3a.S3AFileSystem"/>
64-
<Field name="futurePool"/>
65-
<Bug pattern="IS2_INCONSISTENT_SYNC"/>
66-
</Match>
67-
<Match>
68-
<Class name="org.apache.hadoop.fs.s3a.s3guard.S3GuardTool$BucketInfo"/>
69-
<Method name="run"/>
70-
<Bug pattern="SF_SWITCH_FALLTHROUGH"/>
71-
</Match>
72-
73-
<!--
74-
Some of the S3A Instrumentation classes increment volatile references from
75-
within synchronized contexts; they use volatile to keep the cost
76-
of these updates and reading them down.
77-
-->
78-
<Match>
79-
<Class name="org.apache.hadoop.fs.s3a.S3AInstrumentation$InputStreamStatisticsImpl"/>
80-
<Bug pattern="VO_VOLATILE_INCREMENT"/>
81-
</Match>
82-
83-
<!-- Ignore return value from this method call -->
84-
<Match>
85-
<Class name="org.apache.hadoop.fs.s3a.impl.StoreContext"/>
86-
<Method name="submit"/>
87-
<Bug pattern="RV_RETURN_VALUE_IGNORED_BAD_PRACTICE"/>
88-
</Match>
8925
</FindBugsFilter>

hadoop-tools/hadoop-gcp/pom.xml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -462,6 +462,15 @@
462462
<dependency>
463463
<groupId>com.google.protobuf</groupId>
464464
<artifactId>protobuf-java</artifactId>
465+
<!--
466+
We're using a specific Protobuf version to ensure compatibility with the
467+
Google Cloud Storage (GCS) client. The GCS client often relies on
468+
particular Long-Term Support (LTS) versions of Protobuf. When we upgrade
469+
the GCS client, we'll likely need to update Protobuf too. To prevent
470+
dependency conflicts, Protobuf will be shaded within the GCS connector's
471+
fat JAR.
472+
-->
473+
<version>3.25.3</version>
465474
</dependency>
466475

467476
</dependencies>

0 commit comments

Comments
 (0)