class_docstr: A collection of data which can be pre-processed in parallel on Spark.
class_docstr_tok: ["A","collection","of","data","which","can","be","pre-processed","in","parallel","on","Spark","."]
code: def __init__(
      self,
      rdd: Union["PipelinedRDD", "RDD"],
      transient: bool = False,
      class_name: Optional[str] = None,
  ) -> None:
      self.rdd = rdd
      self.user_caching = self.rdd.is_cached
      if transient:
          self.eager = False
      else:
          self.eager = OrcaContext._eager_mode
          self.rdd.cache()
      if self.eager:
          self.compute()
          self.is_lazy = False
      else:
          self.is_lazy = True
      self.type = {}
      if class_name:
          self.type["class_name"] = class_name
  
imports: from py4j.protocol import Py4JError
  from bigdl.orca.data.utils import *
  from bigdl.orca import OrcaContext
  from bigdl.dllib.utils.common import get_node_and_core_number, get_spark_sql_context, get_spark_context
  from bigdl.dllib.utils import nest
  from bigdl.dllib.utils.log4Error import invalidInputError
  import numpy
  from typing import TYPE_CHECKING, Any
  from typing import Callable, Dict, List, Optional, Tuple, Union
label_desc: Use image node_id 1 to create a new SparkXShards object from inherited base classes: XShards with example: obj = SparkXShards(rdd, transient, class_name)