Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -582,6 +582,9 @@ protected void doTestRead(Configuration conf, MiniDFSCluster cluster,

// restart the namenode to allow DFSClient to re-fetch tokens
cluster.restartNameNode(0);
// Reopen closed streams
in1 = fs.open(fileToRead);
in3 = fs.open(fileToRead);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your works here. Not familiar with this unit test, just confused where are this input stream closed? Thanks.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your review. The exceptions happen in the 2 assertFalse(checkFile()) lines right above and the streams were closed during exception handling.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, try to explore the code but not see any explicit close stream operation, anything I skipped? Thanks.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it. +1.

// verify blockSeekTo() works again (by transparently re-fetching
// tokens from namenode)
in1.seek(0);
Expand Down
Loading