Class MatrixIndexingSPInstruction

    • Method Detail

      • isSingleBlockLookup

        public static boolean isSingleBlockLookup​(DataCharacteristics mcIn,
                                                  IndexRange ixrange)
        Indicates if the given index range only covers a single blocks of the inputs matrix. In this case, we perform a key lookup which is very efficient in case of existing partitioner, especially for out-of-core datasets.
        Parameters:
        mcIn - matrix characteristics
        ixrange - index range
        Returns:
        true if index range covers a single block of the input matrix
      • isMultiBlockLookup

        public static boolean isMultiBlockLookup​(org.apache.spark.api.java.JavaPairRDD<?,​?> in,
                                                 DataCharacteristics mcIn,
                                                 DataCharacteristics mcOut,
                                                 IndexRange ixrange)
        Indicates if the given index range and input matrix exhibit the following properties: (1) existing hash partitioner, (2) out-of-core input matrix (larger than aggregated memory), (3) aligned indexing range (which does not required aggregation), and (4) the output fits twice in memory (in order to collect the result).
        Parameters:
        in - input matrix
        mcIn - input matrix characteristics
        mcOut - output matrix characteristics
        ixrange - index range
        Returns:
        true if index range requires a multi-block lookup