org.apache.beam.sdk.coders.CoderProvider Java Examples

The following examples show how to use org.apache.beam.sdk.coders.CoderProvider. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: PubsubCoderProviderRegistrar.java    From beam with Apache License 2.0 5 votes vote down vote up
@Override
public List<CoderProvider> getCoderProviders() {
  return ImmutableList.of(
      CoderProviders.forCoder(
          TypeDescriptor.of(PubsubMessage.class), PubsubMessageWithAttributesCoder.of()),
      CoderProviders.forCoder(
          TypeDescriptor.of(PubsubMessage.class), PubsubMessageWithMessageIdCoder.of()),
      CoderProviders.forCoder(
          TypeDescriptor.of(PubsubMessage.class),
          PubsubMessageWithAttributesAndMessageIdCoder.of()));
}
 
Example #2
Source File: JavaBinCodecCoder.java    From beam with Apache License 2.0 5 votes vote down vote up
@Override
public List<CoderProvider> getCoderProviders() {
  return Arrays.asList(
      CoderProviders.forCoder(
          TypeDescriptor.of(SolrDocument.class), JavaBinCodecCoder.of(SolrDocument.class)),
      CoderProviders.forCoder(
          TypeDescriptor.of(SolrInputDocument.class),
          JavaBinCodecCoder.of(SolrInputDocument.class)));
}
 
Example #3
Source File: ProtobufCoderProviderRegistrar.java    From beam with Apache License 2.0 4 votes vote down vote up
@Override
public List<CoderProvider> getCoderProviders() {
  return ImmutableList.of(
      CoderProviders.forCoder(TypeDescriptor.of(ByteString.class), ByteStringCoder.of()),
      ProtoCoder.getCoderProvider());
}
 
Example #4
Source File: LazyAvroCoderProviderRegistrar.java    From components with Apache License 2.0 4 votes vote down vote up
@Override
public List<CoderProvider> getCoderProviders() {
    return ImmutableList.of(LazyAvroCoder.getCoderProvider());
}
 
Example #5
Source File: BigQueryCoderProviderRegistrar.java    From beam with Apache License 2.0 4 votes vote down vote up
@Override
public List<CoderProvider> getCoderProviders() {
  return ImmutableList.of(
      CoderProviders.forCoder(TypeDescriptor.of(TableRow.class), TableRowJsonCoder.of()));
}
 
Example #6
Source File: BigtableWriteResultCoder.java    From beam with Apache License 2.0 4 votes vote down vote up
public static CoderProvider getCoderProvider() {
  return CoderProviders.forCoder(
      TypeDescriptor.of(BigtableWriteResult.class), BigtableWriteResultCoder.of());
}
 
Example #7
Source File: WritableCoder.java    From beam with Apache License 2.0 4 votes vote down vote up
@Override
public List<CoderProvider> getCoderProviders() {
  return Collections.singletonList(getCoderProvider());
}
 
Example #8
Source File: SnsCoderProviderRegistrar.java    From beam with Apache License 2.0 4 votes vote down vote up
@Override
public List<CoderProvider> getCoderProviders() {
  return ImmutableList.of(
      CoderProviders.forCoder(
          TypeDescriptor.of(PublishResult.class), PublishResultCoders.defaultPublishResult()));
}
 
Example #9
Source File: AttributeValueCoderProviderRegistrar.java    From beam with Apache License 2.0 4 votes vote down vote up
@Override
public List<CoderProvider> getCoderProviders() {
  return ImmutableList.of(
      CoderProviders.forCoder(TypeDescriptor.of(AttributeValue.class), AttributeValueCoder.of()));
}
 
Example #10
Source File: HBaseCoderProviderRegistrar.java    From beam with Apache License 2.0 4 votes vote down vote up
@Override
public List<CoderProvider> getCoderProviders() {
  return ImmutableList.of(
      HBaseMutationCoder.getCoderProvider(),
      CoderProviders.forCoder(TypeDescriptor.of(Result.class), HBaseResultCoder.of()));
}
 
Example #11
Source File: AmqpMessageCoderProviderRegistrar.java    From beam with Apache License 2.0 4 votes vote down vote up
@Override
public List<CoderProvider> getCoderProviders() {
  return ImmutableList.of(
      CoderProviders.forCoder(TypeDescriptor.of(Message.class), AmqpMessageCoder.of()));
}
 
Example #12
Source File: MessageCoderRegistrar.java    From beam with Apache License 2.0 4 votes vote down vote up
@Override
public List<CoderProvider> getCoderProviders() {
  return ImmutableList.of(
      CoderProviders.forCoder(TypeDescriptor.of(Message.class), MessageCoder.of()));
}
 
Example #13
Source File: SendMessageRequestCoderRegistrar.java    From beam with Apache License 2.0 4 votes vote down vote up
@Override
public List<CoderProvider> getCoderProviders() {
  return ImmutableList.of(
      CoderProviders.forCoder(
          TypeDescriptor.of(SendMessageRequest.class), SendMessageRequestCoder.of()));
}
 
Example #14
Source File: SnsCoderProviderRegistrar.java    From beam with Apache License 2.0 4 votes vote down vote up
@Override
public List<CoderProvider> getCoderProviders() {
  return ImmutableList.of(
      CoderProviders.forCoder(
          TypeDescriptor.of(PublishResponse.class), PublishResponseCoder.of()));
}
 
Example #15
Source File: LazyAvroCoder.java    From components with Apache License 2.0 2 votes vote down vote up
/**
 * Returns a {@link CoderProvider} which uses the {@link LazyAvroCoderProvider} if possible for all types.
 *
 * <p>
 * This method is invoked reflectively from {@link DefaultCoder}.
 */
@SuppressWarnings("unused")
public static CoderProvider getCoderProvider() {
    return new LazyAvroCoderProvider();
}
 
Example #16
Source File: HBaseMutationCoder.java    From beam with Apache License 2.0 2 votes vote down vote up
/**
 * Returns a {@link CoderProvider} which uses the {@link HBaseMutationCoder} for {@link Mutation
 * mutations}.
 */
static CoderProvider getCoderProvider() {
  return HBASE_MUTATION_CODER_PROVIDER;
}
 
Example #17
Source File: WritableCoder.java    From beam with Apache License 2.0 2 votes vote down vote up
/**
 * Returns a {@link CoderProvider} which uses the {@link WritableCoder} for Hadoop {@link Writable
 * writable types}.
 *
 * <p>This method is invoked reflectively from {@link DefaultCoder}.
 */
@SuppressWarnings("WeakerAccess")
public static CoderProvider getCoderProvider() {
  return new WritableCoderProvider();
}
 
Example #18
Source File: DynamicProtoCoder.java    From beam with Apache License 2.0 2 votes vote down vote up
/**
 * Returns a {@link CoderProvider} which uses the {@link DynamicProtoCoder} for {@link Message
 * proto messages}.
 *
 * <p>This method is invoked reflectively from {@link DefaultCoder}.
 */
public static CoderProvider getCoderProvider() {
  return new ProtoCoderProvider();
}
 
Example #19
Source File: ProtoCoder.java    From beam with Apache License 2.0 2 votes vote down vote up
/**
 * Returns a {@link CoderProvider} which uses the {@link ProtoCoder} for {@link Message proto
 * messages}.
 *
 * <p>This method is invoked reflectively from {@link DefaultCoder}.
 */
public static CoderProvider getCoderProvider() {
  return new ProtoCoderProvider();
}