-
Notifications
You must be signed in to change notification settings - Fork 246
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
Update deprecated usages of SequenceFile.createWriter() #2499
base: integration
Are you sure you want to change the base?
Conversation
Update several deprecated calls to SequenceFile.createWriter() to use SequenceFile.createWriter(Configuration conf, SequenceFile.Writer.Option... opts) instead. Part of #2443
@@ -594,7 +595,9 @@ public void close(TaskAttemptContext context) throws IOException, InterruptedExc | |||
if (generateMapFileRowKeys && !shardMapFileRowKeys.isEmpty()) { | |||
log.info("Writing mapFileRowKeys"); | |||
Path shardMapFilePath = new Path(workDir, getUniqueFile(context, "mapFileRowKeys", ".lst")); | |||
try (SequenceFile.Writer output = SequenceFile.createWriter(fs, conf, shardMapFilePath, Text.class, Text.class)) { | |||
Path qualifiedShardMapFilePath = fs.makeQualified(shardMapFilePath); |
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.
Why call fs.makeQualified? I was looking through the deprecated code of SequenceFile.createWriter and I do not see that being called? Perhaps I missed something however.
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.
If I recall correctly, I believe I did it following the example of other calls to SequenceFile.createWriter(Configuration conf, Writer.Option... opts)
, but you're correct that it is not called in the deprecated code of SequenceFile.createWriter()
. I have removed the unnecessary calls to fs.makeQualified()
.
4a47207
Update several deprecated calls to SequenceFile.createWriter() to use SequenceFile.createWriter(Configuration conf,
SequenceFile.Writer.Option... opts) instead.
Part of #2443