Skip to content

Commit

Permalink
TEZ-4298: ShuffleHandler is not source compatible with Hadoop 3.3.0 (#…
Browse files Browse the repository at this point in the history
…129)

(cherry picked from commit d443ae2)
  • Loading branch information
abstractdog authored and Jonathan Eagles committed Jun 25, 2021
1 parent 46e2d98 commit d328d01
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
7 changes: 6 additions & 1 deletion tez-plugins/tez-aux-services/findbugs-exclude.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,6 @@
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 {

Expand Down Expand Up @@ -790,9 +789,10 @@ private void recoverJobShuffleInfo(String jobIdStr, byte[] data)
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();
Expand Down

0 comments on commit d328d01

Please sign in to comment.