code: private boolean waitForFileCompleted(AlluxioURI uri) {
      try {
        CommonUtils.waitFor("file completed", () -> {
          try {
            return mFileSystem.getStatus(uri).isCompleted();
          } catch (Exception e) {
            throw new RuntimeException(e);
          }
        }, WaitForOptions.defaults().setTimeoutMs(MAX_OPEN_WAITTIME_MS));
        return true;
      } catch (InterruptedException ie) {
        Thread.currentThread().interrupt();
        return false;
      } catch (TimeoutException te) {
        return false;
      }
    }
docs: Waits for the file to complete before opening it.
  
  @param uri the file path to check
  @return whether the file is completed or not