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

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

Introduction

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

Prototype


public java.util.Date getStreamCreationTimestamp() 

Source Link

Document

The approximate time that the stream was created.

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();//w  w  w.  j a v a2 s.c o  m
    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());

}