code: private boolean isSparkOrigin(String objectKey) {
      LOG.debug("check spark origin for {}", objectKey);
      if (!objectKey.endsWith("/")) {
        LOG.debug("Key {} has no slash. Return false", objectKey);
        return false;
      } else {
        objectKey = objectKey.substring(0, objectKey.length() - 1);
      }
  
      if (mCachedSparkOriginated.containsKey(objectKey)) {
        boolean res = mCachedSparkOriginated.get(objectKey).booleanValue();
        LOG.debug("found cached for spark origin for {}. Status {}", objectKey, res);
        return res;
      }
      String key = getRealKey(objectKey);
      Boolean sparkOriginated = Boolean.FALSE;
      ObjectMetadata objMetadata = getObjectMetadata(key);
      if (objMetadata != null) {
        Object sparkOrigin = objMetadata.getUserMetaDataOf("data-origin");
        if (sparkOrigin != null) {
          String tmp = (String) sparkOrigin;
          if (tmp.equals("stocator")) {
            sparkOriginated = Boolean.TRUE;
          }
        }
      }
      mCachedSparkOriginated.put(key, sparkOriginated);
      LOG.debug("spark origin for {} is {} non cached", objectKey, sparkOriginated.booleanValue());
      return sparkOriginated.booleanValue();
    }
docs: Checks if container/object exists and verifies that it contains
  Data-Origin=stocator metadata If so, object was created by Spark.
  
  @param objectKey the key of the object
  @return boolean if object was created by Spark