Class FileManager

    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String NAME  
    • Constructor Summary

      Constructors 
      Constructor Description
      FileManager()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close​(org.apache.hugegraph.computer.core.config.Config config)
      Close the resources used in the computation.
      java.util.List<java.lang.String> dirs()  
      void init​(org.apache.hugegraph.computer.core.config.Config config)
      Used to add the resources needed by the computation.
      java.lang.String name()
      The unique identify name.
      java.lang.String nextDirectory()
      Allocate a base directory each call.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • FileManager

        public FileManager()
    • Method Detail

      • name

        public java.lang.String name()
        Description copied from interface: Manager
        The unique identify name.
        Specified by:
        name in interface Manager
      • init

        public void init​(org.apache.hugegraph.computer.core.config.Config config)
        Description copied from interface: Manager
        Used to add the resources needed by the computation. Be called only one time before all supersteps start.
        Specified by:
        init in interface Manager
      • close

        public void close​(org.apache.hugegraph.computer.core.config.Config config)
        Description copied from interface: Manager
        Close the resources used in the computation. Be called only one time after all supersteps ended.
        Specified by:
        close in interface Manager
      • nextDirectory

        public java.lang.String nextDirectory()
        Description copied from interface: FileGenerator
        Allocate a base directory each call. There may be multi base directories configured by user, generally each base directory represent a disk, allocated by round mode. For example, the base directories configured ["/disk1/job_001/container_001", "/disk2/job_001/container_001"]. It indicates there are two base directories and each base directory for one disk. First call returns "/disk1/job_001/container_001", second call returns "/disk2/job_001/container_001" and third call returns "/disk1/job_001/container_001" and so on in round mode. Note: Can't request a directory and write many files into it, this will cause the io pressure can't distributed over several disks.
        Specified by:
        nextDirectory in interface FileGenerator
        Returns:
        The directory of allocated local base directory.
      • dirs

        public java.util.List<java.lang.String> dirs()
        Specified by:
        dirs in interface FileGenerator