Creating a Stream

Use a StreamDescriptor to set the attributes for the stream that you plan to create. You can reuse the StreamDescriptor when creating subsequent streams.

public StreamDescriptor createStreamDescriptor(int numPartitions, String adminUsers, String producerUsers, String consumerUsers, String copyUsers, String topicUsers) {
	StreamDescriptor desc = Streams.newStreamDescriptor();
	desc.setDefaultPartitions(numPartitions);
	desc.setCompressionAlgo("zlib");
	desc.setAutoCreateTopics(false);
	desc.setAdminPerms(adminUsers);
	desc.setConsumePerms(consumerUsers);
	desc.setCopyPerms(copyUsers);
	desc.setTopicPerms(topicUsers);

	return desc;
}
Then, use the Admin.createStream(String streamPathAndName, StreamDescriptor desc) method to create a stream, as in this example:
public void createStreamUtilFunction(String streamPathAndName, StreamDescriptor desc) throws IllegalArgumentException, IOException{
	Admin streamAdmin = Streams.newAdmin(conf);
	streamAdmin.createStream(streamPathAndName, desc);
	streamAdmin.close();
}

The Javadoc is located here.