[
https://issues.apache.org/jira/browse/CASSANDRA-10358?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14957142#comment-14957142
]
Sylvain Lebresne commented on CASSANDRA-10358:
----------------------------------------------
I don't think we should do this because the use of
{{AbstractSSTableSimpleWriter}} by {{CQLSSTableWriter.Builder}} is really an
implementation detail and doing this would make that detail part of the
{{CQLSSTableWriter}} API, which would drastically limit potential refactor. In
fact, {{AbstractSSTableSimpleWriter}} is deprecated in 2.2 and removed in 3.0.
So while I understand that this doesn't have the same generality, I think we'd
rather address your 2 concerns, namely:
bq. The available implementations of AbstractSSTableSimpleWriter do not provide
a way to specify the filename (or rather revision) of the sstable.
Adding an option to the builder to get greater control over the generated file
name sounds totally reasonable to me.
bq. I discovered a problem with SSTableSimpleUnsortedWriter where it creates
invalid level-compaction-style sstables; It allows a partition to span 2
sstables which violates the "no overlap of token ranges" constraint of level
compaction.
That sounds like a bug and something we really should fix, not provide
customization points to get around our bugs.
> Allow CQLSSTableWriter.Builder to use custom AbstractSSTableSimpleWriter
> -------------------------------------------------------------------------
>
> Key: CASSANDRA-10358
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10358
> Project: Cassandra
> Issue Type: Improvement
> Components: Core
> Reporter: Andre Turgeon
> Priority: Minor
> Attachments: patch.txt
>
>
> I've created a patch for your consideration.
> This change to CQLSSTableWriter allows for a custom
> AbstractSSTableSimpleWriter to be specified.
> I needed this for a bulkload process I wrote. I believe the change would be
> beneficial for other people as well.
> Below are the reasons I needed a custom implementation of
> AbstractSSTableSimpleWriter:
> 1) The available implementations of AbstractSSTableSimpleWriter do not
> provide a way to specify the filename (or rather revision) of the sstable. I
> needed to control the name because my bulkload process write sstables in
> parallel (on multiple machines) and I wish to avoid name collisions.
> 2) I discovered a problem with SSTableSimpleUnsortedWriter where it creates
> invalid level-compaction-style sstables; It allows a partition to span 2
> sstables which violates the "no overlap of token ranges" constraint of level
> compaction.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)