Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CPP].Does the CPP version support append writing? #252

Open
t59688 opened this issue Sep 24, 2024 · 1 comment
Open

[CPP].Does the CPP version support append writing? #252

t59688 opened this issue Sep 24, 2024 · 1 comment

Comments

@t59688
Copy link

t59688 commented Sep 24, 2024

Does the C++ version support appending to files? I haven't found any examples of appending in the test and sample code; it seems like the file is deleted and recreated each time, whereas the Java version does support appending。

C++

int TsFileWriter::open(const std::string &file_path, int flags, mode_t mode) {
    if (check_file_exist(file_path)) {
        return E_ALREADY_EXIST;
    }

java

    try (ForceAppendTsFileWriter fwriter = new ForceAppendTsFileWriter(f)) {
      fwriter.doTruncate();
      write(fwriter);
    } catch (Exception e) {
      LOGGER.error("ForceAppendTsFileWriter truncate or write error ", e);
    }
  }
@ColinLeeo
Copy link
Contributor

Currently, it is not supported, but it will be in the future. All features implemented on all Java versions will eventually be implemented on the CPP version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants