Package com.amazonaws.services.kinesis.model

Examples of com.amazonaws.services.kinesis.model.PutRecordResult


        for (int j = 0; j < 10; j++) {
            PutRecordRequest putRecordRequest = new PutRecordRequest();
            putRecordRequest.setStreamName(myStreamName);
            putRecordRequest.setData(ByteBuffer.wrap(String.format("testData-%d", j).getBytes()));
            putRecordRequest.setPartitionKey(String.format("partitionKey-%d", j));
            PutRecordResult putRecordResult = kinesisClient.putRecord(putRecordRequest);
            System.out.println("Successfully putrecord, partition key : " + putRecordRequest.getPartitionKey()
                    + ", ShardID : " + putRecordResult.getShardId());
        }

        // Delete the stream.
        LOG.info("Deleting stream : " + myStreamName);
        DeleteStreamRequest deleteStreamRequest = new DeleteStreamRequest();
View Full Code Here


        putRecordRequest.setSequenceNumberForOrdering(exclusiveMinimumSequenceNumber);
        putRecordRequest.setExplicitHashKey(explicitHashKey);
        putRecordRequest.setPartitionKey(partitionKey);
        putRecordRequest.setData(data);

        final PutRecordResult response = client.putRecord(putRecordRequest);
        return response;
    }
View Full Code Here

            String partitionKey,
            ByteBuffer data) throws ResourceNotFoundException, InvalidArgumentException {
        long startTime = System.currentTimeMillis();
        boolean success = false;
        try {
            PutRecordResult response = other.put(sequenceNumberForOrdering, explicitHashKey, partitionKey, data);
            success = true;
            return response;
        } finally {
            MetricsHelper.addSuccessAndLatency(putRecordMetric, startTime, success);
        }
View Full Code Here

        putRecordRequest.setSequenceNumberForOrdering(exclusiveMinimumSequenceNumber);
        putRecordRequest.setExplicitHashKey(explicitHashKey);
        putRecordRequest.setPartitionKey(partitionKey);
        putRecordRequest.setData(data);

        final PutRecordResult response = client.putRecord(putRecordRequest);
        return response;
    }
View Full Code Here

TOP

Related Classes of com.amazonaws.services.kinesis.model.PutRecordResult

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.