Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
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);
Comment on lines +55 to +62
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@danny0405 Does Hudi on Flink support Global indexes by design?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flink does not support bloom filter index yet, but it is okey we fix the code now.

default:
throw new HoodieIndexException("Unsupported index type " + config.getIndexType());
}
Expand Down