[HUDI-1890] FlinkCreateHandle and FlinkAppendHandle canWrite should always return true (#2933)
The method #canWrite should always return true because they can already write based on file size, e.g. the BucketAssigner.
This commit is contained in:
@@ -75,6 +75,11 @@ public class FlinkAppendHandle<T extends HoodieRecordPayload, I, K, O> extends H
|
|||||||
&& hoodieRecord.getCurrentLocation().getInstantTime().equals("U");
|
&& hoodieRecord.getCurrentLocation().getInstantTime().equals("U");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean canWrite(HoodieRecord record) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns whether there is need to bootstrap this file handle.
|
* Returns whether there is need to bootstrap this file handle.
|
||||||
* E.G. the first time that the handle is created.
|
* E.G. the first time that the handle is created.
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ package org.apache.hudi.io;
|
|||||||
import org.apache.hudi.client.WriteStatus;
|
import org.apache.hudi.client.WriteStatus;
|
||||||
import org.apache.hudi.common.engine.TaskContextSupplier;
|
import org.apache.hudi.common.engine.TaskContextSupplier;
|
||||||
import org.apache.hudi.common.fs.FSUtils;
|
import org.apache.hudi.common.fs.FSUtils;
|
||||||
|
import org.apache.hudi.common.model.HoodieRecord;
|
||||||
import org.apache.hudi.common.model.HoodieRecordPayload;
|
import org.apache.hudi.common.model.HoodieRecordPayload;
|
||||||
import org.apache.hudi.common.util.HoodieTimer;
|
import org.apache.hudi.common.util.HoodieTimer;
|
||||||
import org.apache.hudi.common.util.collection.Pair;
|
import org.apache.hudi.common.util.collection.Pair;
|
||||||
@@ -123,6 +124,11 @@ public class FlinkCreateHandle<T extends HoodieRecordPayload, I, K, O>
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean canWrite(HoodieRecord record) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Use the writeToken + "-" + rollNumber as the new writeToken of a mini-batch write.
|
* Use the writeToken + "-" + rollNumber as the new writeToken of a mini-batch write.
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user