code: public static Properties fileToProperties(String fileName, Configuration conf)
        throws IOException, ConfigurationException {
  
      PropertiesConfiguration propsConfig = new PropertiesConfiguration();
      Path filePath = new Path(fileName);
      URI fileURI = filePath.toUri();
  
      if (fileURI.getScheme() == null && fileURI.getAuthority() == null) {
        propsConfig.load(FileSystem.getLocal(conf).open(filePath));
      } else {
        propsConfig.load(filePath.getFileSystem(conf).open(filePath));
      }
      return ConfigurationConverter.getProperties(propsConfig);
    }
docs: Load the properties from the specified file into a {@link Properties} object.
  
  @param fileName the name of the file to load properties from
  @param conf configuration object to determine the file system to be used
  @return a new {@link Properties} instance