[ 
https://issues.apache.org/jira/browse/CASSANDRA-7555?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14633426#comment-14633426
 ] 

Branimir Lambov commented on CASSANDRA-7555:
--------------------------------------------

I think having both a flag and destination directory is a bit too much 
configuration for this. Why not get rid of the flag and perform the operation 
when the directory is specified? Perhaps renaming to "copy_to" / "hard_link_to" 
to make it sound more like a directive?

Is there a reason not to [put the logic of the command into the 
type|http://allenlsy.com/NOTES-of-Effective-Java-5/#strategy-design-pattern-using-enum]
 to avoid the switch and repetition in {{maybeArchive}}? The initial 
configuration could also avoid some repetition if you use an enum instance 
field. (Feel free to ignore if you don't want to waste time on this.)

{{FILE_COPY_BUFFER_SIZE}} is not really a buffer size as a buffer of that size 
is not allocated (neither by us or the OS). To avoid surprises if someone tries 
to reuse the constant, I'd rename it to CHUNK or something similar. Do we need 
both stream and channel in {{FileUtils.copyFile}}?

> Support copy and link for commitlog archiving without forking the jvm
> ---------------------------------------------------------------------
>
>                 Key: CASSANDRA-7555
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-7555
>             Project: Cassandra
>          Issue Type: Improvement
>            Reporter: Nick Bailey
>            Assignee: Joshua McKenzie
>            Priority: Minor
>             Fix For: 3.x
>
>
> Right now for commitlog archiving the user specifies a command to run and c* 
> forks the jvm to run that command. The most common operations will be either 
> copy or link (hard or soft). Since we can do all of these operations without 
> forking the jvm, which is very expensive, we should have special cases for 
> those.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to