Skip to content

Commit

Permalink
Apply patch
Browse files Browse the repository at this point in the history
Co-authored-by: TengHuo <teng_huo@outlook.com>
Co-authored-by: yuzhao.cyz <yuzhao.cyz@gmail.com>
  • Loading branch information
3 people committed Sep 26, 2022
1 parent 70a24df commit dcd1d5d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Expand Up @@ -341,7 +341,7 @@ private static void initMetadataTable(HoodieFlinkWriteClient<?> writeClient) {

private static CkpMetadata initCkpMetadata(HoodieTableMetaClient metaClient) throws IOException {
CkpMetadata ckpMetadata = CkpMetadata.getInstance(metaClient.getFs(), metaClient.getBasePath());
ckpMetadata.bootstrap(metaClient);
ckpMetadata.bootstrap();
return ckpMetadata;
}

Expand Down
Expand Up @@ -94,7 +94,7 @@ public void close() {
*
* <p>This expects to be called by the driver.
*/
public void bootstrap(HoodieTableMetaClient metaClient) throws IOException {
public void bootstrap() throws IOException {
fs.delete(path, true);
fs.mkdirs(path);
}
Expand Down Expand Up @@ -173,8 +173,8 @@ private void load() {
@Nullable
public String lastPendingInstant() {
load();
for (int i = this.messages.size() - 1; i >= 0; i--) {
CkpMessage ckpMsg = this.messages.get(i);
if (this.messages.size() > 0) {
CkpMessage ckpMsg = this.messages.get(this.messages.size() - 1);
// consider 'aborted' as pending too to reuse the instant
if (!ckpMsg.isComplete()) {
return ckpMsg.getInstant();
Expand Down

0 comments on commit dcd1d5d

Please sign in to comment.