[
https://issues.apache.org/jira/browse/CASSANDRA-13010?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15900600#comment-15900600
]
Jon Haddad commented on CASSANDRA-13010:
----------------------------------------
I don't believe this line does what it's supposed to:
{code}
ci.setTargetDirectory(cfs.getDirectories().getDirectoryForNewSSTables().getPath());
{code}
First off, getDirectoryForNewSSTables returns *any* directory that's available
to be written to. The call {{getDirectoryForNewSSTables}} has this comment:
{code}
/**
* Basically the same as calling {@link #getWriteableLocationAsFile(long)}
with an unknown size ({@code -1L}),
* which may return any non-blacklisted directory - even a data directory
that has no usable space.
* Do not use this method in production code.
*
* @throws FSWriteError if all directories are blacklisted.
*/
public File getDirectoryForNewSSTables()
{
return getWriteableLocationAsFile(-1L);
}
{code}
I believe a better way to approach this would be to use
{{SSTableWriter.descriptor}} to pull out the target directory.
> nodetool compactionstats should say which disk a compaction is writing to
> -------------------------------------------------------------------------
>
> Key: CASSANDRA-13010
> URL: https://issues.apache.org/jira/browse/CASSANDRA-13010
> Project: Cassandra
> Issue Type: New Feature
> Reporter: Jon Haddad
> Assignee: Alex Lourie
> Labels: lhf
>
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)