HDFS-12828. OIV ReverseXML Processor fails with escaped characters
Signed-off-by: Akira Ajisaka <aajisaka@apache.org>
This commit is contained in:
parent
bcb57b1f89
commit
2d9e791a90
@ -385,8 +385,8 @@ private void loadNodeChildrenHelper(Node parent, String expected,
|
||||
break;
|
||||
case XMLEvent.CHARACTERS:
|
||||
String val = XMLUtils.
|
||||
unmangleXmlString(ev.asCharacters().getData(), true);
|
||||
parent.setVal(val);
|
||||
unmangleXmlString(ev.asCharacters().getData(), false);
|
||||
parent.setVal(parent.getVal() + val);
|
||||
events.nextEvent();
|
||||
break;
|
||||
case XMLEvent.ATTRIBUTE:
|
||||
|
@ -194,10 +194,15 @@ public static void createOriginalFSImage() throws IOException {
|
||||
dirCount++;
|
||||
writtenFiles.put(emptydir.toString(), hdfs.getFileStatus(emptydir));
|
||||
|
||||
//Create a directory whose name should be escaped in XML
|
||||
//Create directories whose name should be escaped in XML
|
||||
Path invalidXMLDir = new Path("/dirContainingInvalidXMLChar\u0000here");
|
||||
hdfs.mkdirs(invalidXMLDir);
|
||||
dirCount++;
|
||||
Path entityRefXMLDir = new Path("/dirContainingEntityRef&here");
|
||||
hdfs.mkdirs(entityRefXMLDir);
|
||||
dirCount++;
|
||||
writtenFiles.put(entityRefXMLDir.toString(),
|
||||
hdfs.getFileStatus(entityRefXMLDir));
|
||||
|
||||
//Create a directory with sticky bits
|
||||
Path stickyBitDir = new Path("/stickyBit");
|
||||
|
Loading…
Reference in New Issue
Block a user