Skip to content

Commit

Permalink
[HUDI-4628] Hudi-flink support GLOBAL_BLOOM,GLOBAL_SIMPLE,BUCKET inde…
Browse files Browse the repository at this point in the history
…x type (apache#6406)

Co-authored-by: xiaoxingstack <xiaoxingstack@didiglobal.com>
  • Loading branch information
TJX2014 and xiaoxingstack committed Sep 14, 2022
1 parent ddda7fa commit c7c64a7
Showing 1 changed file with 9 additions and 0 deletions.
Expand Up @@ -25,7 +25,10 @@
import org.apache.hudi.config.HoodieWriteConfig;
import org.apache.hudi.exception.HoodieIndexException;
import org.apache.hudi.index.bloom.HoodieBloomIndex;
import org.apache.hudi.index.bloom.HoodieGlobalBloomIndex;
import org.apache.hudi.index.bloom.ListBasedHoodieBloomIndexHelper;
import org.apache.hudi.index.bucket.HoodieSimpleBucketIndex;
import org.apache.hudi.index.simple.HoodieGlobalSimpleIndex;
import org.apache.hudi.index.simple.HoodieSimpleIndex;
import org.apache.hudi.index.state.FlinkInMemoryStateIndex;

Expand All @@ -49,8 +52,14 @@ public static HoodieIndex createIndex(HoodieFlinkEngineContext context, HoodieWr
return new FlinkInMemoryStateIndex(context, config);
case BLOOM:
return new HoodieBloomIndex(config, ListBasedHoodieBloomIndexHelper.getInstance());
case GLOBAL_BLOOM:
return new HoodieGlobalBloomIndex(config, ListBasedHoodieBloomIndexHelper.getInstance());
case SIMPLE:
return new HoodieSimpleIndex(config, Option.empty());
case GLOBAL_SIMPLE:
return new HoodieGlobalSimpleIndex(config, Option.empty());
case BUCKET:
return new HoodieSimpleBucketIndex(config);
default:
throw new HoodieIndexException("Unsupported index type " + config.getIndexType());
}
Expand Down

0 comments on commit c7c64a7

Please sign in to comment.