use of org.apache.accumulo.core.file.rfile.bcfile.Compression.Algorithm in project accumulo by apache.
the class CompressionTest method testSingle.
@Test
public void testSingle() throws IOException {
for (final Algorithm al : Algorithm.values()) {
if (isSupported.get(al) != null && isSupported.get(al)) {
// first call to issupported should be true
Assert.assertTrue(al + " is not supported, but should be", al.isSupported());
Assert.assertNotNull(al + " should have a non-null codec", al.getCodec());
Assert.assertNotNull(al + " should have a non-null codec", al.getCodec());
}
}
}
use of org.apache.accumulo.core.file.rfile.bcfile.Compression.Algorithm in project accumulo by apache.
the class CompressionTest method testSingleNoSideEffect.
@Test
public void testSingleNoSideEffect() throws IOException {
for (final Algorithm al : Algorithm.values()) {
if (isSupported.get(al) != null && isSupported.get(al)) {
Assert.assertTrue(al + " is not supported, but should be", al.isSupported());
Assert.assertNotNull(al + " should have a non-null codec", al.getCodec());
// assert that additional calls to create will not create
// additional codecs
Assert.assertNotEquals(al + " should have created a new codec, but did not", System.identityHashCode(al.getCodec()), al.createNewCodec(88 * 1024));
}
}
}