code: @Override
      public Set<Capability> getCapabilities(FileSystem fs, Path path) {
          if (logger.isDebugEnabled()) {
              logger.debug("orc file path: " + path.toUri().getPath());
          }
  
          Reader orcReader = null;
          RecordReader recordReader = null;
          try {
              // no need to close orcreader
              orcReader = OrcFile.createReader(fs, path);
              recordReader = orcReader.rows(null);
          } catch (Exception e) {
              if (logger.isDebugEnabled()) {
                  logger.debug(path.toUri().getPath() + " is not a ORC file.");
                  logger.debug("Error in opening ORC file: "
                      + e.getLocalizedMessage());
              }
              return EnumSet.noneOf(Capability.class);
          } finally {
              if (recordReader != null) {
                  try {
                      recordReader.close();
                  } catch (IOException e) {
                      logger.error(e);
                  }
              }
          }
          return EnumSet.of(Capability.READ, Capability.SCHEMA);
      }
docs: Get ORCFileViewer functionalities. Currently schema and read are
  supported. {@inheritDoc}
  
  @see HdfsFileViewer#getCapabilities(org.apache.hadoop.fs.FileSystem,
  org.apache.hadoop.fs.Path)