com.amazonaws.services.kinesis.model.Record.setPartitionKey()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(2.1k)|赞(0)|评价(0)|浏览(89)

本文整理了Java中com.amazonaws.services.kinesis.model.Record.setPartitionKey方法的一些代码示例,展示了Record.setPartitionKey的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Record.setPartitionKey方法的具体详情如下:
包路径:com.amazonaws.services.kinesis.model.Record
类名称:Record
方法名:setPartitionKey

Record.setPartitionKey介绍

[英]Identifies which shard in the stream the data record is assigned to.
[中]标识数据记录分配给流中的哪个碎片。

代码示例

代码示例来源:origin: aws/aws-sdk-java

/**
 * <p>
 * Identifies which shard in the stream the data record is assigned to.
 * </p>
 * 
 * @param partitionKey
 *        Identifies which shard in the stream the data record is assigned to.
 * @return Returns a reference to this object so that method calls can be chained together.
 */
public Record withPartitionKey(String partitionKey) {
  setPartitionKey(partitionKey);
  return this;
}

代码示例来源:origin: aws/aws-sdk-java

record.setPartitionKey(context.getUnmarshaller(String.class).unmarshall(context));

代码示例来源:origin: com.amazonaws/aws-java-sdk-kinesis

/**
 * <p>
 * Identifies which shard in the stream the data record is assigned to.
 * </p>
 * 
 * @param partitionKey
 *        Identifies which shard in the stream the data record is assigned to.
 * @return Returns a reference to this object so that method calls can be chained together.
 */
public Record withPartitionKey(String partitionKey) {
  setPartitionKey(partitionKey);
  return this;
}

代码示例来源:origin: aws-amplify/aws-sdk-android

.unmarshall(context));
} else if (name.equals("PartitionKey")) {
  record.setPartitionKey(StringJsonUnmarshaller.getInstance()
      .unmarshall(context));
} else if (name.equals("EncryptionType")) {

代码示例来源:origin: amazon-archives/kinesis-storm-spout

/**
 * Creates a copy of the record so we don't get interference from bolts that execute in the same JVM.
 * We invoke ByteBuffer.duplicate() so the ByteBuffer state is decoupled.
 * 
 * @param record Kinesis record
 * @return Copied record.
 */
private Record copyRecord(Record record) {
  Record duplicate = new Record();
  duplicate.setPartitionKey(record.getPartitionKey());
  duplicate.setSequenceNumber(record.getSequenceNumber());
  duplicate.setData(record.getData().duplicate());
  return duplicate;
}

代码示例来源:origin: com.amazonaws/aws-java-sdk-kinesis

record.setPartitionKey(context.getUnmarshaller(String.class).unmarshall(context));

相关文章