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

Fix State transition err when hdfs ccm feature is used #77

Closed
Closed
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 @@ -52,6 +52,16 @@ class XMLParser {
* @return {@code BlockInfo}s for any blocks found.
*/
List<BlockInfo> parseLine(String line) throws IOException {
// Centralized Cache Management compatibility
// if CCM feature is open, fsimage xml may include
// <directive><id>8963</id><path>/user/some/path</path><replication>3</replication>
// <pool>cache_other_pool</pool><expiration><millis>1544454142310</millis><relatilve>false</relatilve></expiration>
// these lines need to be filtered
if (line.contains("<directive><id>")) {
System.out.println("this line is for Centralized Cache Management, ignore, line:" + line);
return new ArrayList<>();
}

if (line.contains("<inode>")) {
transitionTo(State.INODE);
}
Expand Down