[HUDI-1105] Adding dedup support for Bulk Insert w/ Rows (#2206)
This commit is contained in:
committed by
GitHub
parent
8f7ad8b178
commit
16e90d30ea
@@ -71,6 +71,30 @@ public abstract class SparkHoodieIndex<T extends HoodieRecordPayload> extends Ho
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether index is global or not.
|
||||
* @param config HoodieWriteConfig to use.
|
||||
* @return {@code true} if index is a global one. else {@code false}.
|
||||
*/
|
||||
public static boolean isGlobalIndex(HoodieWriteConfig config) {
|
||||
switch (config.getIndexType()) {
|
||||
case HBASE:
|
||||
return true;
|
||||
case INMEMORY:
|
||||
return true;
|
||||
case BLOOM:
|
||||
return false;
|
||||
case GLOBAL_BLOOM:
|
||||
return true;
|
||||
case SIMPLE:
|
||||
return false;
|
||||
case GLOBAL_SIMPLE:
|
||||
return true;
|
||||
default:
|
||||
return createIndex(config).isGlobal();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@PublicAPIMethod(maturity = ApiMaturityLevel.STABLE)
|
||||
public abstract JavaRDD<WriteStatus> updateLocation(JavaRDD<WriteStatus> writeStatusRDD,
|
||||
|
||||
Reference in New Issue
Block a user