@Override
public Set<InstanceMetaData> getMetaData(String hash) {
Stack stack = stackRepository.findStackByHash(hash);
if (stack != null) {
if (!stack.isMetadataReady()) {
throw new MetadataIncompleteException("Instance metadata is incomplete.");
}
if (!stack.getInstanceMetaData().isEmpty()) {
return stack.getInstanceMetaData();
}
}