Skip to content

Commit

Permalink
bump guava from 14.0.1 to 27.0-jre
Browse files Browse the repository at this point in the history
  • Loading branch information
cfmcgrady committed Nov 13, 2023
1 parent eb1be3f commit aac129d
Show file tree
Hide file tree
Showing 22 changed files with 228 additions and 107 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
import java.nio.ByteBuffer;
import java.nio.channels.FileChannel;
import java.nio.file.StandardOpenOption;

import com.google.common.base.Objects;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.google.common.io.ByteStreams;
import io.netty.channel.DefaultFileRegion;

Expand Down Expand Up @@ -145,10 +145,10 @@ public long getLength() {

@Override
public String toString() {
return Objects.toStringHelper(this)
.add("file", file)
.add("offset", offset)
.add("length", length)
return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE)
.append("file", file)
.append("offset", offset)
.append("length", length)
.toString();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,11 @@
package org.apache.celeborn.common.network.buffer;

import java.io.IOException;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import java.io.InputStream;
import java.nio.ByteBuffer;

import com.google.common.base.Objects;
import io.netty.buffer.ByteBuf;
import io.netty.buffer.ByteBufInputStream;
import io.netty.buffer.Unpooled;
Expand Down Expand Up @@ -77,6 +78,8 @@ public Object convertToNetty() throws IOException {

@Override
public String toString() {
return Objects.toStringHelper(this).add("buf", buf).toString();
return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE)
.append("buf", buf)
.toString();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,11 @@
package org.apache.celeborn.common.network.buffer;

import java.io.IOException;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import java.io.InputStream;
import java.nio.ByteBuffer;

import com.google.common.base.Objects;
import io.netty.buffer.ByteBufInputStream;
import io.netty.buffer.Unpooled;

Expand Down Expand Up @@ -65,6 +66,8 @@ public Object convertToNetty() throws IOException {

@Override
public String toString() {
return Objects.toStringHelper(this).add("buf", buf).toString();
return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE)
.append("buf", buf)
.toString();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,15 @@
package org.apache.celeborn.common.network.client;

import java.io.Closeable;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import java.io.IOException;
import java.net.SocketAddress;
import java.nio.ByteBuffer;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicLong;

import com.google.common.annotations.VisibleForTesting;
import com.google.common.base.Objects;
import com.google.common.base.Preconditions;
import com.google.common.util.concurrent.SettableFuture;
import io.netty.channel.Channel;
Expand Down Expand Up @@ -314,10 +315,10 @@ public void close() {

@Override
public String toString() {
return Objects.toStringHelper(this)
.add("remoteAddress", channel.remoteAddress())
.add("isActive", isActive())
.toString();
return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE)
.append("remoteAdress", channel.remoteAddress())
.append("isActive", isActive())
.toString();
}

private static final AtomicLong counter = new AtomicLong();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@

package org.apache.celeborn.common.network.protocol;

import com.google.common.base.Objects;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import java.util.Objects;
import io.netty.buffer.ByteBuf;

import org.apache.celeborn.common.protocol.PbChunkFetchRequest;
Expand Down Expand Up @@ -56,7 +58,7 @@ public static ChunkFetchFailure decode(ByteBuf buf) {

@Override
public int hashCode() {
return Objects.hashCode(streamChunkSlice, errorString);
return Objects.hash(streamChunkSlice, errorString);
}

@Override
Expand All @@ -70,9 +72,9 @@ public boolean equals(Object other) {

@Override
public String toString() {
return Objects.toStringHelper(this)
.add("streamChunkId", streamChunkSlice)
.add("errorString", errorString)
return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE)
.append("streamChunkId", streamChunkSlice)
.append("errorString", errorString)
.toString();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@

package org.apache.celeborn.common.network.protocol;

import com.google.common.base.Objects;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import io.netty.buffer.ByteBuf;

/**
Expand Down Expand Up @@ -67,6 +68,8 @@ public boolean equals(Object other) {

@Override
public String toString() {
return Objects.toStringHelper(this).add("streamChunkId", streamChunkSlice).toString();
return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE)
.append("streamChunkId", streamChunkSlice)
.toString();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@

package org.apache.celeborn.common.network.protocol;

import com.google.common.base.Objects;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import java.util.Objects;
import io.netty.buffer.ByteBuf;

import org.apache.celeborn.common.network.buffer.ManagedBuffer;
Expand Down Expand Up @@ -76,7 +78,7 @@ public static ChunkFetchSuccess decode(ByteBuf buf, boolean decodeBody) {

@Override
public int hashCode() {
return Objects.hashCode(streamChunkSlice, body());
return Objects.hash(streamChunkSlice, body());
}

@Override
Expand All @@ -90,9 +92,9 @@ public boolean equals(Object other) {

@Override
public String toString() {
return Objects.toStringHelper(this)
.add("streamChunkId", streamChunkSlice)
.add("buffer", body())
return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE)
.append("streamChunkId", streamChunkSlice)
.append("buffer", body())
.toString();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

import java.nio.ByteBuffer;

import com.google.common.base.Objects;
import java.util.Objects;
import io.netty.buffer.ByteBuf;
import io.netty.buffer.Unpooled;

Expand Down Expand Up @@ -56,7 +56,7 @@ public boolean needCopyOut() {
}

protected boolean equals(Message other) {
return Objects.equal(body, other.body);
return Objects.equals(body, other.body);
}

public ByteBuffer toByteBuffer() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@

package org.apache.celeborn.common.network.protocol;

import com.google.common.base.Objects;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import java.util.Objects;
import io.netty.buffer.ByteBuf;

import org.apache.celeborn.common.network.buffer.ManagedBuffer;
Expand Down Expand Up @@ -66,7 +68,7 @@ public static OneWayMessage decode(ByteBuf buf, boolean decodeBody) {

@Override
public int hashCode() {
return Objects.hashCode(body());
return Objects.hash(body());
}

@Override
Expand All @@ -80,6 +82,8 @@ public boolean equals(Object other) {

@Override
public String toString() {
return Objects.toStringHelper(this).add("body", body()).toString();
return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE)
.append("body", body())
.toString();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@
import java.nio.charset.StandardCharsets;
import java.util.Arrays;

import com.google.common.base.Objects;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import java.util.Objects;
import io.netty.buffer.ByteBuf;

/**
Expand Down Expand Up @@ -81,7 +83,7 @@ public static OpenStream decode(ByteBuf buf) {

@Override
public int hashCode() {
return Objects.hashCode(
return Objects.hash(
Arrays.hashCode(shuffleKey), Arrays.hashCode(fileName), startMapIndex, endMapIndex);
}

Expand All @@ -99,11 +101,11 @@ public boolean equals(Object other) {

@Override
public String toString() {
return Objects.toStringHelper(this)
.add("shuffleKey", new String(shuffleKey, StandardCharsets.UTF_8))
.add("fileName", new String(fileName, StandardCharsets.UTF_8))
.add("startMapIndex", startMapIndex)
.add("endMapIndex", endMapIndex)
return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE)
.append("shuffleKey", new String(shuffleKey, StandardCharsets.UTF_8))
.append("fileName", new String(fileName, StandardCharsets.UTF_8))
.append("startMapIndex", startMapIndex)
.append("endMapIndex", endMapIndex)
.toString();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@

package org.apache.celeborn.common.network.protocol;

import com.google.common.base.Objects;
import java.util.Objects;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import io.netty.buffer.ByteBuf;

import org.apache.celeborn.common.network.buffer.ManagedBuffer;
Expand Down Expand Up @@ -86,7 +88,7 @@ public static PushData decode(ByteBuf buf, boolean decodeBody) {

@Override
public int hashCode() {
return Objects.hashCode(requestId, mode, shuffleKey, partitionUniqueId, body());
return Objects.hash(requestId, mode, shuffleKey, partitionUniqueId, body());
}

@Override
Expand All @@ -104,12 +106,12 @@ public boolean equals(Object other) {

@Override
public String toString() {
return Objects.toStringHelper(this)
.add("requestId", requestId)
.add("mode", mode)
.add("shuffleKey", shuffleKey)
.add("partitionUniqueId", partitionUniqueId)
.add("body size", body().size())
return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE)
.append("requestId", requestId)
.append("mode", mode)
.append("shuffleKey", shuffleKey)
.append("partitionUniqueId", partitionUniqueId)
.append("body size", body().size())
.toString();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@

package org.apache.celeborn.common.network.protocol;

import com.google.common.base.Objects;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import java.util.Objects;
import io.netty.buffer.ByteBuf;

@Deprecated
Expand Down Expand Up @@ -83,7 +85,7 @@ public static PushDataHandShake decode(ByteBuf buf) {

@Override
public int hashCode() {
return Objects.hashCode(
return Objects.hash(
mode, shuffleKey, partitionUniqueId, attemptId, numPartitions, bufferSize);
}

Expand All @@ -104,13 +106,13 @@ public boolean equals(Object other) {

@Override
public String toString() {
return Objects.toStringHelper(this)
.add("mode", mode)
.add("shuffleKey", shuffleKey)
.add("partitionUniqueId", partitionUniqueId)
.add("attemptId", attemptId)
.add("numSubPartitions", numPartitions)
.add("bufferSize", bufferSize)
return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE)
.append("mode", mode)
.append("shuffleKey", shuffleKey)
.append("partitionUniqueId", partitionUniqueId)
.append("attemptId", attemptId)
.append("numSubPartitions", numPartitions)
.append("bufferSize", bufferSize)
.toString();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@

import java.util.Arrays;

import com.google.common.base.Objects;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import java.util.Objects;
import io.netty.buffer.ByteBuf;

import org.apache.celeborn.common.network.buffer.ManagedBuffer;
Expand Down Expand Up @@ -99,7 +101,7 @@ public static PushMergedData decode(ByteBuf buf, boolean decodeBody) {

@Override
public int hashCode() {
return Objects.hashCode(requestId, mode, shuffleKey);
return Objects.hash(requestId, mode, shuffleKey);
}

@Override
Expand All @@ -118,13 +120,13 @@ public boolean equals(Object other) {

@Override
public String toString() {
return Objects.toStringHelper(this)
.add("requestId", requestId)
.add("mode", mode)
.add("shuffleKey", shuffleKey)
.add("partitionIds", Arrays.toString(partitionUniqueIds))
.add("batchOffsets", Arrays.toString(batchOffsets))
.add("body size", body().size())
return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE)
.append("requestId", requestId)
.append("mode", mode)
.append("shuffleKey", shuffleKey)
.append("partitionIds", Arrays.toString(partitionUniqueIds))
.append("batchOffsets", Arrays.toString(batchOffsets))
.append("body size", body().size())
.toString();
}
}
Loading

0 comments on commit aac129d

Please sign in to comment.