@Test public void testGoodCodec() { HHXORErasureCodec codec = new HHXORErasureCodec(schema); ErasureCoder encoder = codec.createEncoder(); assertEquals(10, encoder.getNumDataUnits()); assertEquals(4, encoder.getNumParityUnits()); ErasureCoder decoder = codec.createDecoder(); assertEquals(10, decoder.getNumDataUnits()); assertEquals(4, decoder.getNumParityUnits()); }
@Override public ErasureCoder createEncoder() { return new XORErasureEncoder(getSchema()); }
@Override public ErasureCoder createDecoder() { return new XORErasureDecoder(getSchema()); }
@Override public ErasureCoder createEncoder() { return new RSErasureEncoder(getSchema()); }
@Override public ErasureCoder createDecoder() { return new RSErasureDecoder(getSchema()); }
@Override public ErasureCoder createEncoder() { return new HHXORErasureEncoder(getSchema()); }
@Override public ErasureCoder createDecoder() { return new HHXORErasureDecoder(getSchema()); }
/** * Create Erasure Encoder * @return erasure encoder */ public ErasureCoder createEncoder();
/** * Create Erasure Decoder * @return erasure decoder */ public ErasureCoder createDecoder();