HDFS-5937. Fix TestOfflineEditsViewer on HDFS-4685 branch. Contributed by Chris Nauroth.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/HDFS-4685@1567986 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Chris Nauroth 2014-02-13 17:52:26 +00:00
parent 9ee7c2a077
commit e291c7905f
4 changed files with 12 additions and 1 deletions

View File

@ -3491,6 +3491,9 @@ protected void toXml(ContentHandler contentHandler) throws SAXException {
void fromXml(Stanza st) throws InvalidXmlException {
src = st.getValue("SRC");
aclEntries = readAclEntriesFromXml(st);
if (aclEntries == null) {
aclEntries = Lists.newArrayList();
}
}
}

View File

@ -96,6 +96,7 @@ public void startCluster(String dfsDir) throws IOException {
"RULE:[2:$1@$0](JobTracker@.*FOO.COM)s/@.*//" + "DEFAULT");
config.setBoolean(
DFSConfigKeys.DFS_NAMENODE_DELEGATION_TOKEN_ALWAYS_USE_KEY, true);
config.setBoolean(DFSConfigKeys.DFS_NAMENODE_ACLS_ENABLED_KEY, true);
cluster =
new MiniDFSCluster.Builder(config).manageNameDfsDirs(false).build();
cluster.waitClusterUp();

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<EDITS>
<EDITS_VERSION>-52</EDITS_VERSION>
<EDITS_VERSION>-53</EDITS_VERSION>
<RECORD>
<OPCODE>OP_START_LOG_SEGMENT</OPCODE>
<DATA>
@ -922,4 +922,11 @@
<TXID>72</TXID>
</DATA>
</RECORD>
<RECORD>
<OPCODE>OP_SET_ACL</OPCODE>
<DATA>
<TXID>73</TXID>
<SRC>/file_set_acl</SRC>
</DATA>
</RECORD>
</EDITS>