1
0

Adding canIndexLogFiles(), isImplicitWithStorage(), isGlobal() to HoodieIndex

This commit is contained in:
Vinoth Chandar
2017-09-28 09:57:28 -07:00
committed by vinoth chandar
parent 6230e15191
commit 9f98ae643b
6 changed files with 154 additions and 1 deletions

View File

@@ -50,6 +50,8 @@ import scala.Tuple2;
* - Could increase write amplification on copy-on-write storage since inserts always rewrite files
* - Not global.
*
*
*
*/
public class BucketedIndex<T extends HoodieRecordPayload> extends HoodieIndex<T> {
@@ -88,4 +90,35 @@ public class BucketedIndex<T extends HoodieRecordPayload> extends HoodieIndex<T>
// nothing to rollback in the index.
return true;
}
/**
* Bucketing is still done within each partition.
*
* @return
*/
@Override
public boolean isGlobal() {
return false;
}
/**
* Since indexing is just a deterministic hash, we can identify file group correctly even without an index
* on the actual log file.
*
* @return
*/
@Override
public boolean canIndexLogFiles() {
return true;
}
/**
* Indexing is just a hash function.
*
* @return
*/
@Override
public boolean isImplicitWithStorage() {
return true;
}
}