List of usage examples for org.apache.hadoop.tools CopyListingFileStatus CopyListingFileStatus
public CopyListingFileStatus()
From source file:org.apache.falcon.replication.FilteredCopyListingTest.java
License:Apache License
private void verifyContents(Path listingPath, int expected) throws Exception { SequenceFile.Reader reader = new SequenceFile.Reader(FileSystem.getLocal(new Configuration()), listingPath, new Configuration()); Text key = new Text(); FileStatus value = new CopyListingFileStatus(); Map<String, String> actualValues = new HashMap<String, String>(); while (reader.next(key, value)) { actualValues.put(value.getPath().toString(), key.toString()); }//from w w w . jav a2 s . c o m Assert.assertEquals(actualValues.size(), expected == -1 ? EXPECTED_VALUES.size() : expected); for (Map.Entry<String, String> entry : actualValues.entrySet()) { Assert.assertEquals(entry.getValue(), EXPECTED_VALUES.get(entry.getKey())); } }