-
Notifications
You must be signed in to change notification settings - Fork 28.6k
[SPARK-30272][SQL][CORE] Remove usage of Guava that breaks in 27; replace with workalikes #26911
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
a2b37f7
d0e09f8
4a8d35b
078b645
3760149
a6de24a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,9 +26,10 @@ | |
import java.nio.channels.FileChannel; | ||
import java.nio.file.StandardOpenOption; | ||
|
||
import com.google.common.base.Objects; | ||
import com.google.common.io.ByteStreams; | ||
import io.netty.channel.DefaultFileRegion; | ||
import org.apache.commons.lang3.builder.ToStringBuilder; | ||
import org.apache.commons.lang3.builder.ToStringStyle; | ||
|
||
import org.apache.spark.network.util.JavaUtils; | ||
import org.apache.spark.network.util.LimitedInputStream; | ||
|
@@ -144,10 +145,10 @@ public Object convertToNetty() throws IOException { | |
|
||
@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) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The format of the toString is a bit different after this. Before (Guava): |
||
.append("file", file) | ||
.append("offset", offset) | ||
.append("length", length) | ||
.toString(); | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,8 +17,11 @@ | |
|
||
package org.apache.spark.network.protocol; | ||
|
||
import com.google.common.base.Objects; | ||
import java.util.Objects; | ||
|
||
import io.netty.buffer.ByteBuf; | ||
import org.apache.commons.lang3.builder.ToStringBuilder; | ||
import org.apache.commons.lang3.builder.ToStringStyle; | ||
|
||
/** | ||
* Response to {@link ChunkFetchRequest} when there is an error fetching the chunk. | ||
|
@@ -54,7 +57,7 @@ public static ChunkFetchFailure decode(ByteBuf buf) { | |
|
||
@Override | ||
public int hashCode() { | ||
return Objects.hashCode(streamChunkId, errorString); | ||
return Objects.hash(streamChunkId, errorString); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Work-alikes from java.util; should do the same thing as it calls Arrays.hashCode in both cases |
||
} | ||
|
||
@Override | ||
|
@@ -68,9 +71,9 @@ public boolean equals(Object other) { | |
|
||
@Override | ||
public String toString() { | ||
return Objects.toStringHelper(this) | ||
.add("streamChunkId", streamChunkId) | ||
.add("errorString", errorString) | ||
return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE) | ||
.append("streamChunkId", streamChunkId) | ||
.append("errorString", errorString) | ||
.toString(); | ||
} | ||
} |
Uh oh!
There was an error while loading. Please reload this page.