hudi-client/src/main/java/org/apache/hudi/index/bloom/HoodieBloomIndex.java
/**
   * Returns an RDD mapping each HoodieKey with a partitionPath/fileID which contains it. Option.Empty if the key is not
   * found.
   *
   * @param hoodieKeys  keys to lookup
   * @param jsc         spark context
   * @param hoodieTable hoodie table object
   */
Returns an RDD mapping each HoodieKey with a partitionPath/fileID which contains it. Option.Empty if the key is not
found.

@param hoodieKeys  keys to lookup
@param jsc         spark context
@param hoodieTable hoodie table object
Returns an RDD mapping each HoodieKey with a partitionPath / fileID which contains it . Option . Empty if the key is not found . @param hoodieKeys keys to lookup @param jsc spark context @param hoodieTable hoodie table object
@Override
  public JavaPairRDD<HoodieKey, Option<Pair<String, String>>> fetchRecordLocation(JavaRDD<HoodieKey> hoodieKeys,
                                                                                  JavaSparkContext jsc, HoodieTable<T> hoodieTable) {
    JavaPairRDD<String, String> partitionRecordKeyPairRDD =
        hoodieKeys.mapToPair(key -> new Tuple2<>(key.getPartitionPath(), key.getRecordKey()));
    JavaPairRDD<HoodieKey, HoodieRecordLocation> recordKeyLocationRDD =
        lookupIndex(partitionRecordKeyPairRDD, jsc, hoodieTable);
    JavaPairRDD<HoodieKey, String> keyHoodieKeyPairRDD = hoodieKeys.mapToPair(key -> new Tuple2<>(key, null));
    return keyHoodieKeyPairRDD.leftOuterJoin(recordKeyLocationRDD).mapToPair(keyLoc -> {
      Option<Pair<String, String>> partitionPathFileidPair;
      if (keyLoc._2._2.isPresent()) {
        partitionPathFileidPair = Option.of(Pair.of(keyLoc._1().getPartitionPath(), keyLoc._2._2.get().getFileId()));
      } else {
        partitionPathFileidPair = Option.empty();
      }
      return new Tuple2<>(keyLoc._1, partitionPathFileidPair);
    });
  }
@ Override public JavaPairRDD < HoodieKey , Option < Pair < String , String > > > fetchRecordLocation ( JavaRDD < HoodieKey > hoodieKeys , JavaSparkContext jsc , HoodieTable < T > hoodieTable ) { JavaPairRDD < String , String > partitionRecordKeyPairRDD = hoodieKeys . mapToPair ( key -> new Tuple2 < > ( key . getPartitionPath ( ) , key . getRecordKey ( ) ) ) ; JavaPairRDD < HoodieKey , HoodieRecordLocation > recordKeyLocationRDD = lookupIndex ( partitionRecordKeyPairRDD , jsc , hoodieTable ) ; JavaPairRDD < HoodieKey , String > keyHoodieKeyPairRDD = hoodieKeys . mapToPair ( key -> new Tuple2 < > ( key , null ) ) ; return keyHoodieKeyPairRDD . leftOuterJoin ( recordKeyLocationRDD ) . mapToPair ( keyLoc -> { Option < Pair < String , String > > partitionPathFileidPair ; if ( keyLoc . _2 . _2 . isPresent ( ) ) { partitionPathFileidPair = Option . of ( Pair . of ( keyLoc . _1 ( ) . getPartitionPath ( ) , keyLoc . _2 . _2 . get ( ) . getFileId ( ) ) ) ; } else { partitionPathFileidPair = Option . empty ( ) ; } return new Tuple2 < > ( keyLoc . _1 , partitionPathFileidPair ) ; } ) ; }
Returns an RDD mapping each HoodieKey with a partitionPath/fileID which contains it.
Returns an RDD mapping each HoodieKey with a partitionPath / fileID which contains it .
// Lookup indexes for all the partition/recordkey pair