library/src/main/java/com/kdgregory/aws/utils/kinesis/KinesisReader.java
/**
     *  Called when we reach the end of a parent shard, to load iterators for its
     *  children. If unable to do so, will silently ignore
     */
Called when we reach the end of a parent shard, to load iterators for its
children. If unable to do so, will silently ignore
Called when we reach the end of a parent shard to load iterators for its children . If unable to do so will silently ignore
private void retrieveChildIterators(String parentShardId)
    {
        if (logger.isDebugEnabled())
        {
            logger.debug("retrieveChildIterators: stream = " + streamName + ", parentShardId = " + parentShardId);
        }
        long timeoutAt = System.currentTimeMillis() + timeout;
        describeShards();
        if (shards == null)
            return;
        List<Shard> children = shardsByParentId.get(parentShardId);
        if (children == null)
        {
            logger.warn("retrieveChildIterators: did not find any children; stream = " + streamName + ", parentShardId = " + parentShardId);
            return;
        }
        Map<String,ShardIteratorType> itxTypes = new TreeMap<String,ShardIteratorType>();
        for (Shard shard : children)
        {
            itxTypes.put(shard.getShardId(), ShardIteratorType.TRIM_HORIZON);
        }
        if (retrieveIterators(itxTypes, timeoutAt))
        {
            if (logger.isDebugEnabled())
            {
                logger.debug("retrieveChildIterators: replacing shard with children; stream = " + streamName 
                             + ", parentShardId = " + parentShardId + ", child shard IDs = " + itxTypes.keySet());
            }
            shardIterators.remove(parentShardId);
        }
    }
private void retrieveChildIterators ( String parentShardId ) { if ( logger . isDebugEnabled ( ) ) { logger . debug ( "retrieveChildIterators: stream = " + streamName + ", parentShardId = " + parentShardId ) ; } long timeoutAt = System . currentTimeMillis ( ) + timeout ; describeShards ( ) ; if ( shards == null ) return ; List < Shard > children = shardsByParentId . get ( parentShardId ) ; if ( children == null ) { logger . warn ( "retrieveChildIterators: did not find any children; stream = " + streamName + ", parentShardId = " + parentShardId ) ; return ; } Map < String , ShardIteratorType > itxTypes = new TreeMap < String , ShardIteratorType > ( ) ; for ( Shard shard : children ) { itxTypes . put ( shard . getShardId ( ) , ShardIteratorType . TRIM_HORIZON ) ; } if ( retrieveIterators ( itxTypes , timeoutAt ) ) { if ( logger . isDebugEnabled ( ) ) { logger . debug ( "retrieveChildIterators: replacing shard with children; stream = " + streamName + ", parentShardId = " + parentShardId + ", child shard IDs = " + itxTypes . keySet ( ) ) ; } shardIterators . remove ( parentShardId ) ; } }
Called when we reach the end of a parent shard, to load iterators for its
  children.
Called when we reach the end of a parent shard to load iterators for its children .