if (storageInstance == null) {
String fileName = context.getProperties().get("dataworker.storagePath");
if (fileName != null) {
LOG.debug("Using local storage in " + fileName + " to store data");
// If specifed, use LocalKeyValueStorage - key-value file based storage
storageInstance = new LocalKeyValueStorage(context);
} else {
LOG.debug("Using Persistence API to store data");
// If not specifed, use ambari-views Persistence API
storageInstance = new InstanceKeyValueStorage(context);
}