You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tez.apache.org by je...@apache.org on 2021/06/22 20:43:19 UTC
[tez] branch master updated: TEZ-4298: ShuffleHandler is not source
compatible with Hadoop 3.3.0 (#129)
This is an automated email from the ASF dual-hosted git repository.
jeagles pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tez.git
The following commit(s) were added to refs/heads/master by this push:
new d443ae2 TEZ-4298: ShuffleHandler is not source compatible with Hadoop 3.3.0 (#129)
d443ae2 is described below
commit d443ae2b30fae8a80c98e9e16ec98313ae14dca1
Author: Bodor Laszlo <bo...@gmail.com>
AuthorDate: Tue Jun 22 22:43:08 2021 +0200
TEZ-4298: ShuffleHandler is not source compatible with Hadoop 3.3.0 (#129)
---
tez-plugins/tez-aux-services/findbugs-exclude.xml | 7 ++++++-
.../src/main/java/org/apache/tez/auxservices/ShuffleHandler.java | 6 +++---
2 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/tez-plugins/tez-aux-services/findbugs-exclude.xml b/tez-plugins/tez-aux-services/findbugs-exclude.xml
index 5b11308..adfd704 100644
--- a/tez-plugins/tez-aux-services/findbugs-exclude.xml
+++ b/tez-plugins/tez-aux-services/findbugs-exclude.xml
@@ -12,5 +12,10 @@
limitations under the License. See accompanying LICENSE file.
-->
<FindBugsFilter>
-
+ <!-- TEZ-4298 -->
+ <Match>
+ <Class name="org.apache.tez.auxservices.ShuffleHandler"/>
+ <Method name="recordJobShuffleInfo"/>
+ <Bug pattern="RV_RETURN_VALUE_IGNORED_NO_SIDE_EFFECT"/>
+ </Match>
</FindBugsFilter>
diff --git a/tez-plugins/tez-aux-services/src/main/java/org/apache/tez/auxservices/ShuffleHandler.java b/tez-plugins/tez-aux-services/src/main/java/org/apache/tez/auxservices/ShuffleHandler.java
index e73805a..fb28a0f 100644
--- a/tez-plugins/tez-aux-services/src/main/java/org/apache/tez/auxservices/ShuffleHandler.java
+++ b/tez-plugins/tez-aux-services/src/main/java/org/apache/tez/auxservices/ShuffleHandler.java
@@ -153,7 +153,6 @@ import com.google.common.cache.LoadingCache;
import com.google.common.cache.RemovalListener;
import com.google.common.cache.RemovalNotification;
import com.google.common.cache.Weigher;
-import com.google.protobuf.ByteString;
public class ShuffleHandler extends AuxiliaryService {
@@ -796,9 +795,10 @@ public class ShuffleHandler extends AuxiliaryService {
private void recordJobShuffleInfo(JobID jobId, String user,
Token<JobTokenIdentifier> jobToken) throws IOException {
if (stateDb != null) {
+ // Discover type instead of assuming ByteString to allow for shading.
TokenProto tokenProto = TokenProto.newBuilder()
- .setIdentifier(ByteString.copyFrom(jobToken.getIdentifier()))
- .setPassword(ByteString.copyFrom(jobToken.getPassword()))
+ .setIdentifier(TokenProto.getDefaultInstance().getIdentifier().copyFrom(jobToken.getIdentifier()))
+ .setPassword(TokenProto.getDefaultInstance().getPassword().copyFrom(jobToken.getPassword()))
.setKind(jobToken.getKind().toString())
.setService(jobToken.getService().toString())
.build();