class_docstr: Implements the external storage interface using the ray storage API.
class_docstr_tok: ["Implements","the","external","storage","interface","using","the","ray","storage","API","."]
code: def __init__(
      self,
      session_name: str,
      # For remote spilling, at least 1MB is recommended.
      buffer_size=1024 * 1024,
      # Override the storage config for unit tests.
      _force_storage_for_testing: Optional[str] = None,
  ):
      from ray._private import storage
  
      if _force_storage_for_testing:
          storage._reset()
          storage._init_storage(_force_storage_for_testing, True)
  
      self._fs, storage_prefix = storage._get_filesystem_internal()
      self._buffer_size = buffer_size
      self._prefix = os.path.join(
          storage_prefix, "spilled_objects", session_name
      )
      self._fs.create_dir(self._prefix)
  
imports: import abc
  import logging
  import os
  import random
  import shutil
  import time
  import urllib
  import uuid
  from collections import namedtuple
  from typing import IO, List, Optional, Tuple
  import ray
  from ray._private.ray_constants import DEFAULT_OBJECT_PREFIX
  from ray._raylet import ObjectRef
label_desc: Use image node_id 1 to create a new ExternalStorageRayStorageImpl object from inherited base classes: ExternalStorage with example: obj = ExternalStorageRayStorageImpl(session_name, buffer_size, _force_storage_for_testing)