Permalink
Browse files

Make MemPipeline consistent w/MRPipeline for reading missing files

  • Loading branch information...
1 parent 7397d98 commit 5eec5ad92c8847a70b7e7ce4557e0bc475c7a0f1 @jwills jwills committed Jul 4, 2012
@@ -118,11 +118,11 @@ public Configuration getConfiguration() {
return new MemCollection<T>(iterable, source.getType(), source.toString());
} catch (IOException e) {
LOG.error("Exception reading source: " + source.toString(), e);
- return null;
+ throw new IllegalStateException(e);
}
}
LOG.error("Source " + source + " is not readable");
- return null;
+ throw new IllegalStateException("Source " + source + " is not readable");
}
@Override
@@ -133,11 +133,11 @@ public Configuration getConfiguration() {
return new MemTable<K, V>(iterable, source.getTableType(), source.toString());
} catch (IOException e) {
LOG.error("Exception reading source: " + source.toString(), e);
- return null;
+ throw new IllegalStateException(e);
}
}
LOG.error("Source " + source + " is not readable");
- return null;
+ throw new IllegalStateException("Source " + source + " is not readable");
}
@Override
@@ -89,7 +89,6 @@ public void testGetSizeOfEmptyIntermediatePCollection_NoSave_MRPipeline() throws
}
@Test
- @Ignore("MemPipeline implementation is inconsistent with the MRPipeline")
public void testGetSizeOfEmptyIntermediatePCollection_MemPipeline() {
PCollection<String> emptyIntermediate = createPesistentEmptyIntermediate(MemPipeline.getInstance());
@@ -106,7 +105,6 @@ public void testMaterializeOfEmptyIntermediatePCollection_MRPipeline() throws IO
}
@Test
- @Ignore("MemPipelien impelmentation is inconsistent with the MRPipelien")
public void testMaterializeOfEmptyIntermediatePCollection_MemPipeline() {
PCollection<String> emptyIntermediate = createPesistentEmptyIntermediate(MemPipeline.getInstance());
@@ -133,7 +131,6 @@ public void testExpectExceptionForGettingSizeOfNonExistingFile_MRPipeline() thro
}
@Test(expected = IllegalStateException.class)
- @Ignore("MemPipelien impelmentation is inconsistent with the MRPipelien")
public void testExpectExceptionForGettingSizeOfNonExistingFile_MemPipeline() {
MemPipeline.getInstance().readTextFile("non_existing.file").getSize();
}

0 comments on commit 5eec5ad

Please sign in to comment.