-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Spark: Deprecate SparkAppenderFactory #11076
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
Conversation
| * @deprecated since 1.7.0, will be removed in 1.8.0; use {@link SparkFileWriterFactory} instead. | ||
| */ | ||
| @Deprecated | ||
| class SparkAppenderFactory implements FileAppenderFactory<InternalRow> { |
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.
While working on partition stats, I came across FileWriterFactory and AppenderFactory. After digging a bit, found that Spark was using AppenderFactory before but now uses FileWriterFactory. But the implementation of AppenderFactory still exist and confusing for users. Hence, deprecating it before removal in the next version.
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.
Also, this class is not used by the Spark engine integration. Hence, we can safely remove it.
Looking more into it, we might have lost metrics related function in FileWriterFactory that was present in AppenderFactory. Maybe I can work on it in the future for FileWriterFactory.
amoghjaha-db
left a comment
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.
Since the class is package private do we want to just remove it upfront? It looks like it's currently used in some JMH benchmarks WritersBenchmark, and TestSparkMergingMetrics would need to be updated to test the SparkFileWriterFactory class instead.
I did get this thought initially and checked how we handled previously for other classes in this module. The package private classes like
As I mentioned in one of the comments, |
|
This is indeed our legacy writers. We can deprecate and then remove to be safe. |
|
Thanks, @ajantha-bhat! |

It is unused currently and Spark integration uses
SparkFileWriterFactoryinstead of this.