kadirozde commented on PR #5545: URL: https://github.com/apache/hbase/pull/5545#issuecomment-1962788373
> In general, I think this is a good improvement. > > But for me, I think we should still keep the architecture clean, so I do not think we should introduce a new 'DualFileWriter' and replace StoreFileWriter in the 'Default'Compactor, and seems we still keep the StoreFileWriter? Where do we use it after this PR? > > Thanks. Initially, I introduced a separate store engine for this, called DualFileStoreEngine that came with its own compactor (DualFileCompactor), writer (DualFileWriter) and store file manager (DualFileStoreManager). The reason I did that DefaultCompactor is a single file writer compactor while DualFileCompactor was a multi file writer like DateTierCompactor and StripeCompactor. Both DateTierStoreEngine and StripeStoreEngine do not inherit from DefaultStoreEngine and so I thought architecturally DualFileCompactor should have had its own store engine. It was a clean solution. However, the reviewers asked me to either make DualFileCompactor inherit from DefaultStoreCompactor or refactor DefaultStoreCompactor to embed the dual file writer functionality. Inheritance did not work and so I went for refactoring DefaultStoreCompactor and I had to change DefaultStoreCompactor to use DualFileWriter instead of StoreFileWriter. You can see all that from the earlier commits. Are you suggesting that we should have a separate store engine for dual file compaction as I did in the beginning? To answer your question on StoreFileWriter, yes StoreFileWriter is used by all writers including DualFileWriter, StripeMultiFileWriter, DateTieredMultiFileWriter. Please see the implementation of WriterFactory interface defined in AbstractMultiFileWriter all these writers inherit. These implementations indirectly calls StoreEngine#createWriter which then indirectly calls StoreFileTrackerBase#createWriter where a StoreFileWriter is created using StoreFileWriter#Builder. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@hbase.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org