You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Joshua McKenzie (JIRA)" <ji...@apache.org> on 2016/06/16 19:46:05 UTC

[jira] [Updated] (CASSANDRA-12019) Platform independent implementation of DirectorySizeCalculator and refactor

     [ https://issues.apache.org/jira/browse/CASSANDRA-12019?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Joshua McKenzie updated CASSANDRA-12019:
----------------------------------------
    Summary: Platform independent implementation of DirectorySizeCalculator and refactor  (was: Platform independent implementation of DirectorySizeCalculator)

> Platform independent implementation of DirectorySizeCalculator and refactor
> ---------------------------------------------------------------------------
>
>                 Key: CASSANDRA-12019
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-12019
>             Project: Cassandra
>          Issue Type: Sub-task
>            Reporter: Joshua McKenzie
>            Assignee: Joshua McKenzie
>            Priority: Minor
>
> On linux, simplify to {{Arrays.stream(path.listFiles()).mapToLong(File::length).sum();}}
> It's simpler and performs better, however is much slower on Windows.
> See discussion on CASSANDRA-8844.
> Also:
> bq. I don't get the DirectorySizeCalculator. Why the alive and visited sets, the listFiles step? Either list the files and just loop through them, or do the walkFileTree operation – you are now doing the same work twice. Use a plain long instead of the atomic as the class is still thread-unsafe.
> So the existing class could use a refactor as well.



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