Repository navigation
build: remove Guava dependency #7000
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
base: main
Are you sure you want to change the base?
Changes from all commits
38feaad
45dfb0c
255d7d9
12275be
d3a8c67
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 |
|---|---|---|
|
|
@@ -61,8 +61,6 @@ | |
| import org.apache.spark.storage.TempShuffleBlockId; | ||
| import org.apache.spark.util.Utils; | ||
|
|
||
| import com.google.common.io.Closeables; | ||
|
|
||
| import org.apache.comet.CometConf$; | ||
| import org.apache.comet.Native; | ||
|
|
||
|
|
@@ -364,36 +362,19 @@ private long[] writePartitionedData(ShuffleMapOutputWriter mapOutputWriter) thro | |
|
|
||
| private void writePartitionedDataWithChannel(File file, WritableByteChannelWrapper outputChannel) | ||
| throws IOException { | ||
| boolean copyThrewException = true; | ||
| try { | ||
| FileInputStream in = new FileInputStream(file); | ||
| try (FileChannel inputChannel = in.getChannel()) { | ||
| Utils.copyFileStreamNIO(inputChannel, outputChannel.channel(), 0L, inputChannel.size()); | ||
| copyThrewException = false; | ||
| } finally { | ||
| Closeables.close(in, copyThrewException); | ||
| } | ||
| } finally { | ||
| Closeables.close(outputChannel, copyThrewException); | ||
| try (FileInputStream in = new FileInputStream(file); | ||
| WritableByteChannelWrapper ignored = outputChannel) { | ||
|
Comment on lines
+365
to
+366
Contributor
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. If try (WritableByteChannelWrapper ignored = outputChannel;
FileInputStream in = new FileInputStream(file)) {The window is small since |
||
| FileChannel inputChannel = in.getChannel(); | ||
| Utils.copyFileStreamNIO(inputChannel, outputChannel.channel(), 0L, inputChannel.size()); | ||
| } | ||
| } | ||
|
|
||
| private void writePartitionedDataWithStream(File file, ShufflePartitionWriter writer) | ||
| throws IOException { | ||
| boolean copyThrewException = true; | ||
| FileInputStream in = new FileInputStream(file); | ||
| OutputStream outputStream; | ||
| try { | ||
| outputStream = blockManager.serializerManager().wrapForEncryption(writer.openStream()); | ||
|
|
||
| try { | ||
| Utils.copyStream(in, outputStream, false, false); | ||
| copyThrewException = false; | ||
| } finally { | ||
| Closeables.close(outputStream, copyThrewException); | ||
| } | ||
| } finally { | ||
| Closeables.close(in, copyThrewException); | ||
| try (FileInputStream in = new FileInputStream(file); | ||
| OutputStream outputStream = | ||
| blockManager.serializerManager().wrapForEncryption(writer.openStream())) { | ||
| Utils.copyStream(in, outputStream, false, false); | ||
| } | ||
| } | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This re-pins Guava at
33.2.1-jrehere and incontrib/delta-spark/pom.xml, whilemainis on33.7.1-jreafter #7259, so resolving the rootpom.xmlconflict by deleting the property would revert that bump. Could the root keepguava.versionwith itsdependencyManagemententry moved to test scope? Then this pom could drop its local version, and the delta pom, which already uses${guava.version}, would not need to change.