code: public static <T> T loadInstance(Configuration conf, Class<T> objClass, String fileName, boolean callSetConf)
        throws IOException {
  
      Path path = InstancesDistributor.locateFileInCache(conf, fileName);
      T obj;
      ObjectInput in;
      if (path == null) {
        throw new IOException("Path is null");
      }
      in = new ObjectInputStream(FileSystem.get(conf).open(path));
  
      try {
        obj = objClass.cast(in.readObject());
      } catch (ClassNotFoundException e) {
        throw new RuntimeException(e);
      }
      in.close();
      if (obj instanceof Configurable && callSetConf) {
        ((Configurable) obj).setConf(conf);
      }
      return obj;
    }
docs: Given a Hadoop Configuration property and an Class, this method can
  re-instantiate an Object instance that was previously distributed using *
  {@link InstancesDistributor#distribute(Object, String, Configuration)}.
  
  @param <T>
  The object type.
  @param conf
  The Hadoop Configuration.
  @param objClass
  The object type class.
  @param fileName
  The file name to locate the instance
  @param callSetConf
  If true, will call setConf() if deserialized instance is
  {@link Configurable}
  @throws IOException