@SuppressWarnings("unchecked")
	@Override
	protected HdfsStoreMessageHandler createHandler() {
		Assert.notNull(storeWriter, "Writer cannot be null for this factory");
		HdfsStoreMessageHandler handler = null;
		if (storeWriter instanceof PartitionDataStoreWriter) {
			handler = new HdfsPartitionDataStoreMessageHandler((PartitionDataStoreWriter) storeWriter);
		}
		else {
			handler = new HdfsDataStoreMessageHandler(storeWriter);
		}
		handler.setAutoStartup(autoStartup);
		return handler;
	}
Sets the store writer.

@param storeWriter the new store writer
spring-xd-hadoop/src/main/java/org/springframework/xd/integration/hadoop/config/HdfsStoreMessageHandlerFactoryBean.java