Example usage for com.amazonaws.services.kinesis.model StreamDescription getRetentionPeriodHours

List of usage examples for com.amazonaws.services.kinesis.model StreamDescription getRetentionPeriodHours

Introduction

In this page you can find the example usage for com.amazonaws.services.kinesis.model StreamDescription getRetentionPeriodHours.

Prototype


public Integer getRetentionPeriodHours() 

Source Link

Document

The current retention period, in hours.

Usage

From source file:org.lendingclub.mercator.aws.KinesisScanner.java

License:Apache License

private void project(StreamDescription description) {

    ObjectNode n = mapper.createObjectNode();
    n.put("aws_account", getAccountId());
    n.put("aws_region", getRegion().getName());
    n.put("aws_arn", description.getStreamARN());
    n.put("name", description.getStreamName());
    n.put("aws_name", description.getStreamName());
    n.put("aws_status", description.getStreamStatus());
    n.put("aws_streamCreationTimestamp", description.getStreamCreationTimestamp().getTime());
    n.put("aws_retentionPeriodHours", description.getRetentionPeriodHours());
    n.put("aws_shardCount", description.getShards().size());

    incrementEntityCount();//from  w  w  w  .j  ava 2s .  c  om
    String cypher = "merge (k:AwsKinesisStream {aws_arn:{aws_arn}}) set k+={props}, k.updateTs=timestamp() return k";

    getNeoRxClient().execCypher(cypher, "aws_arn", n.path("aws_arn").asText(), "props", n);

    cypher = "match (a:AwsAccount {aws_account:{account}}), (k:AwsKinesisStream {aws_account:{account}}) MERGE (a)-[r:OWNS]->(k) set r.updateTs=timestamp()";

    getNeoRxClient().execCypher(cypher, "account", getAccountId());

}