本文整理了Java中com.amazonaws.services.kinesis.model.Record.setPartitionKey
方法的一些代码示例,展示了Record.setPartitionKey
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Record.setPartitionKey
方法的具体详情如下:
包路径:com.amazonaws.services.kinesis.model.Record
类名称: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));
内容来源于网络,如有侵权,请联系作者删除!