/** * Initializes the log file, opening a file writer. Clients calling {@code init()} should ensure that they * also call {@link HDFSTransactionLog#close()}. * @throws java.io.IOException If an error is encountered initializing the file writer. */ public synchronized void init() throws IOException { if (initialized) { return; } this.writer = createWriter(); this.initialized = true; }
/** * Initializes the log file, opening a file writer. Clients calling {@code init()} should ensure that they * also call {@link HDFSTransactionLog#close()}. * @throws java.io.IOException If an error is encountered initializing the file writer. */ public synchronized void init() throws IOException { if (initialized) { return; } this.writer = createWriter(); this.initialized = true; }