public ScalingOperationReport scaleUp()

in src/main/java/com/amazonaws/services/kinesis/scaling/StreamScaler.java [192:212]


	public ScalingOperationReport scaleUp(String streamName, double byPct, Integer minShards, Integer maxShards,
			boolean waitForCompletion) throws Exception {
		if (byPct < 0)
			throw new Exception(streamName + ": Scaling Percent should be a positive number");
		int currentSize = StreamScalingUtils.getOpenShardCount(kinesisClient, streamName);

		// if byPct is smaller than 1, assume that the user meant to go larger by that
		// pct
		double scalePct = byPct;
		if (byPct < 1) {
			scalePct = 1 + byPct;
		}

		int newSize = new Double(Math.ceil(currentSize + (currentSize * scalePct))).intValue();

		if (newSize > 0) {
			return doResize(streamName, newSize, minShards, maxShards, waitForCompletion);
		} else {
			return null;
		}
	}