Search in sources :

Example 11 with CoderRegistry

use of org.apache.beam.sdk.coders.CoderRegistry in project beam by apache.

the class KafkaIOTest method testInferKeyCoderFailure.

@Test
public void testInferKeyCoderFailure() throws Exception {
    cannotInferException.expect(RuntimeException.class);
    CoderRegistry registry = CoderRegistry.createDefault();
    KafkaIO.inferCoder(registry, NonInferableObjectDeserializer.class);
}
Also used : CoderRegistry(org.apache.beam.sdk.coders.CoderRegistry) Test(org.junit.Test)

Aggregations

CoderRegistry (org.apache.beam.sdk.coders.CoderRegistry)11 Test (org.junit.Test)6 StateNamespace (org.apache.beam.runners.core.StateNamespace)1 StateNamespaceForTest (org.apache.beam.runners.core.StateNamespaceForTest)1 CannotProvideCoderException (org.apache.beam.sdk.coders.CannotProvideCoderException)1 InstantCoder (org.apache.beam.sdk.coders.InstantCoder)1 NullableCoder (org.apache.beam.sdk.coders.NullableCoder)1 StringUtf8Coder (org.apache.beam.sdk.coders.StringUtf8Coder)1 VarLongCoder (org.apache.beam.sdk.coders.VarLongCoder)1 InstantDeserializer (org.apache.beam.sdk.io.kafka.serialization.InstantDeserializer)1 CombiningState (org.apache.beam.sdk.state.CombiningState)1 Combine (org.apache.beam.sdk.transforms.Combine)1 DoFn (org.apache.beam.sdk.transforms.DoFn)1 HasDefaultTracker (org.apache.beam.sdk.transforms.splittabledofn.HasDefaultTracker)1 KV (org.apache.beam.sdk.values.KV)1 TimestampedValue (org.apache.beam.sdk.values.TimestampedValue)1 LongDeserializer (org.apache.kafka.common.serialization.LongDeserializer)1 StringDeserializer (org.apache.kafka.common.serialization.StringDeserializer)1