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;
|
break;
|
||||||
case XMLEvent.CHARACTERS:
|
case XMLEvent.CHARACTERS:
|
||||||
String val = XMLUtils.
|
String val = XMLUtils.
|
||||||
unmangleXmlString(ev.asCharacters().getData(), true);
|
unmangleXmlString(ev.asCharacters().getData(), false);
|
||||||
parent.setVal(val);
|
parent.setVal(parent.getVal() + val);
|
||||||
events.nextEvent();
|
events.nextEvent();
|
||||||
break;
|
break;
|
||||||
case XMLEvent.ATTRIBUTE:
|
case XMLEvent.ATTRIBUTE:
|
||||||
|
@ -194,10 +194,15 @@ public static void createOriginalFSImage() throws IOException {
|
|||||||
dirCount++;
|
dirCount++;
|
||||||
writtenFiles.put(emptydir.toString(), hdfs.getFileStatus(emptydir));
|
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");
|
Path invalidXMLDir = new Path("/dirContainingInvalidXMLChar\u0000here");
|
||||||
hdfs.mkdirs(invalidXMLDir);
|
hdfs.mkdirs(invalidXMLDir);
|
||||||
dirCount++;
|
dirCount++;
|
||||||
|
Path entityRefXMLDir = new Path("/dirContainingEntityRef&here");
|
||||||
|
hdfs.mkdirs(entityRefXMLDir);
|
||||||
|
dirCount++;
|
||||||
|
writtenFiles.put(entityRefXMLDir.toString(),
|
||||||
|
hdfs.getFileStatus(entityRefXMLDir));
|
||||||
|
|
||||||
//Create a directory with sticky bits
|
//Create a directory with sticky bits
|
||||||
Path stickyBitDir = new Path("/stickyBit");
|
Path stickyBitDir = new Path("/stickyBit");
|
||||||
|
Loading…
Reference in New Issue
Block a user