Class/Object

com.astrolabsoftware.spark3d.spatial3DRDD

Point3DRDD

Related Docs: object Point3DRDD | package spatial3DRDD

Permalink

class Point3DRDD extends Shape3DRDD[Point3D]

Linear Supertypes
Shape3DRDD[Point3D], Serializable, Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Point3DRDD
  2. Shape3DRDD
  3. Serializable
  4. Serializable
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Point3DRDD(spark: SparkSession, filename: String, colnames: String, isSpherical: Boolean, format: String, options: HashMap[String, String])

    Permalink

    Constructor of Point3DRDD which is suitable for py4j.

    Constructor of Point3DRDD which is suitable for py4j. It calls Point3DRDDFromV2PythonHelper instead of Point3DRDDFromV2. All args are the same but options which is a java.util.HashMap, and storageLevel which is removed and set to StorageLevel.MEMORY_ONLY (user cannot set the storage level in pyspark3d for the moment).

  2. new Point3DRDD(spark: SparkSession, filename: String, colnames: String, isSpherical: Boolean, format: String, options: Map[String, String] = Map("" -> ""), storageLevel: StorageLevel = StorageLevel.NONE)

    Permalink

    Construct a RDD[Point3D] from whatever data source registered in Spark.

    Construct a RDD[Point3D] from whatever data source registered in Spark. For more information about available official connectors: https://spark-packages.org/?q=tags%3A%22Data%20Sources%22

    We currently include: CSV, JSON, TXT, FITS, ROOT, HDF5, Avro, Parquet...

    // Here is an example with a CSV file containing
    // 3 spherical coordinates columns labeled Z_COSMO,RA,Dec.
    
    // Filename
    val fn = "path/to/file.csv"
    // Spark datasource
    val format = "csv"
    // Options to pass to the DataFrameReader - optional
    val options = Map("header" -> "true")
    
    // Load the data as RDD[Point3D]
    val rdd = new Point3DRDD(spark, fn, "Z_COSMO,RA,Dec", true, format, options)
    spark

    : (SparkSession) The spark session

    filename

    : (String) File name where the data is stored.

    colnames

    : (String) Comma-separated names of (x, y, z) columns. Example: "Z_COSMO,RA,Dec".

    isSpherical

    : (Boolean) If true, it assumes that the coordinates of the Point3D are (r, theta, phi). Otherwise, it assumes cartesian coordinates (x, y, z).

    format

    : (String) The name of the data source as registered in Spark. For example:

    • text
    • csv
    • json
    • com.astrolabsoftware.sparkfits or fits
    • org.dianahep.sparkroot
    • gov.llnl.spark.hdf or hdf5
    options

    : (Map[String, String]) Options to pass to the DataFrameReader. Default is no options.

    storageLevel

    : (StorageLevel) Storage level for the raw RDD (unpartitioned). Default is StorageLevel.NONE. See https://spark.apache.org/docs/latest/rdd-programming-guide.html#rdd-persistence for more information.

    returns

    (RDD[Point3D])

  3. new Point3DRDD(rdd: RDD[Point3D], isSpherical: Boolean, storageLevel: StorageLevel)

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. var boundary: BoxEnvelope

    Permalink
    Definition Classes
    Shape3DRDD
  6. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  8. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  9. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  10. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  11. def getDataEnvelope(): BoxEnvelope

    Permalink
    Definition Classes
    Shape3DRDD
  12. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  13. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  14. val isSpherical: Boolean

    Permalink
    Definition Classes
    Point3DRDDShape3DRDD
  15. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  16. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  17. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  18. def partition(partitioner: SpatialPartitioner)(implicit c: ClassTag[Point3D]): RDD[Point3D]

    Permalink

    Repartion a RDD[T] according to a custom partitioner.

    Repartion a RDD[T] according to a custom partitioner.

    partitioner

    : (SpatialPartitioner) Instance of SpatialPartitioner or any extension of it.

    returns

    (RDD[T]) Repartitioned RDD[T].

    Definition Classes
    Shape3DRDD
  19. val rawRDD: RDD[Point3D]

    Permalink

    RDD containing the initial data formated as T.

    RDD containing the initial data formated as T.

    Definition Classes
    Point3DRDDShape3DRDD
  20. def spatialPartitioning(gridtype: GridType, numPartitions: Int = 1)(implicit c: ClassTag[Point3D]): RDD[Point3D]

    Permalink

    Apply a spatial partitioning to this.rawRDD, and return a RDD[T] with the new partitioning.

    Apply a spatial partitioning to this.rawRDD, and return a RDD[T] with the new partitioning. The list of available partitioning can be found in utils/GridType. By default, the outgoing level of parallelism is the same as the incoming one (i.e. same number of partitions).

    gridtype

    : (GridType) Type of partitioning to apply. See utils/GridType.

    numPartitions

    : (Int) Number of partitions for the partitioned RDD. By default (-1), the number of partitions is that of the raw RDD. You can force it to be different by setting manually this parameter. Be aware of shuffling though...

    returns

    (RDD[T]) RDD whose elements are T (Point3D, Sphere, etc...)

    Definition Classes
    Shape3DRDD
  21. def spatialPartitioning(partitioner: SpatialPartitioner)(implicit c: ClassTag[Point3D]): RDD[Point3D]

    Permalink

    Apply any Spatial Partitioner to this.rawRDD[T], and return a RDD[T] with the new partitioning.

    Apply any Spatial Partitioner to this.rawRDD[T], and return a RDD[T] with the new partitioning.

    partitioner

    : (SpatialPartitioner) Spatial partitioner as defined in utils.GridType

    returns

    (RDD[T]) RDD whose elements are T (Point3D, Sphere, etc...)

    Definition Classes
    Shape3DRDD
  22. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  23. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  24. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  25. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  26. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Shape3DRDD[Point3D]

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped