Skip to content
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

Open
wants to merge 8 commits into
base: integration
Choose a base branch
from

Conversation

lbschanno
Copy link
Collaborator

Update several deprecated calls to SequenceFile.createWriter() to use SequenceFile.createWriter(Configuration conf,
SequenceFile.Writer.Option... opts) instead.

Part of #2443

Update several deprecated calls to SequenceFile.createWriter() to use
SequenceFile.createWriter(Configuration conf,
SequenceFile.Writer.Option... opts) instead.

Part of #2443
apmoriarty
apmoriarty previously approved these changes Aug 6, 2024
avgAGB
avgAGB previously approved these changes Aug 6, 2024
ivakegg
ivakegg previously approved these changes Sep 4, 2024
@ivakegg ivakegg added the MXTC label Oct 31, 2024
@@ -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);
Copy link
Collaborator

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.

Copy link
Collaborator Author

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().

@lbschanno lbschanno dismissed stale reviews from avgAGB, apmoriarty, and ivakegg via 4a47207 November 5, 2024 05:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants