public synchronized Storage getStorage() {
    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 DataStoreStorage(context);
      }
    }
    return storageInstance;
  }
Get storage instance. If one is not created, creates instance.
@return storage instance
contrib/views/pig/src/main/java/org/apache/ambari/view/pig/persistence/utils/StorageUtil.java