You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Jackson Chung (Created) (JIRA)" <ji...@apache.org> on 2012/01/05 23:43:40 UTC

[jira] [Created] (CASSANDRA-3703) log Compaction Active tasks in StatusLogger instead of n/a

log Compaction Active tasks in StatusLogger instead of n/a
----------------------------------------------------------

                 Key: CASSANDRA-3703
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3703
             Project: Cassandra
          Issue Type: Improvement
            Reporter: Jackson Chung
            Priority: Minor


currently StatusLogger log:
{noformat}
logger.info(String.format("%-25s%10s%10s",
                                  "CompactionManager", "n/a", CompactionManager.instance.getPendingTasks()));
{noformat}

It'd be great if it could actually log the number of active tasks being processed. Without looking into the code, I thought there was no compaction running when reading the log.


{code: title=CompactionManager.java}
    public int getActiveCompactions()
    {
        return CompactionExecutor.compactions.size();
    }
{code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CASSANDRA-3703) log Compaction Active tasks in StatusLogger instead of n/a

Posted by "Sylvain Lebresne (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-3703?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13183938#comment-13183938 ] 

Sylvain Lebresne commented on CASSANDRA-3703:
---------------------------------------------

I believe we should add the tasks of the validationExecutor to the active tasks too.
                
> log Compaction Active tasks in StatusLogger instead of n/a
> ----------------------------------------------------------
>
>                 Key: CASSANDRA-3703
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3703
>             Project: Cassandra
>          Issue Type: Improvement
>            Reporter: Jackson Chung
>            Assignee: Jonathan Ellis
>            Priority: Minor
>              Labels: compaction
>             Fix For: 1.0.7
>
>         Attachments: 3703.txt
>
>
> currently StatusLogger log:
> {noformat}
> logger.info(String.format("%-25s%10s%10s",
>                                   "CompactionManager", "n/a", CompactionManager.instance.getPendingTasks()));
> {noformat}
> It'd be great if it could actually log the number of active tasks being processed. Without looking into the code, I thought there was no compaction running when reading the log.
> {code: title=CompactionManager.java}
>     public int getActiveCompactions()
>     {
>         return CompactionExecutor.compactions.size();
>     }
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CASSANDRA-3703) log Compaction Active tasks in StatusLogger instead of n/a

Posted by "Jonathan Ellis (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-3703?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jonathan Ellis updated CASSANDRA-3703:
--------------------------------------

    Attachment: 3703.txt

patch attached
                
> log Compaction Active tasks in StatusLogger instead of n/a
> ----------------------------------------------------------
>
>                 Key: CASSANDRA-3703
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3703
>             Project: Cassandra
>          Issue Type: Improvement
>            Reporter: Jackson Chung
>            Priority: Minor
>              Labels: compaction
>             Fix For: 1.0.7
>
>         Attachments: 3703.txt
>
>
> currently StatusLogger log:
> {noformat}
> logger.info(String.format("%-25s%10s%10s",
>                                   "CompactionManager", "n/a", CompactionManager.instance.getPendingTasks()));
> {noformat}
> It'd be great if it could actually log the number of active tasks being processed. Without looking into the code, I thought there was no compaction running when reading the log.
> {code: title=CompactionManager.java}
>     public int getActiveCompactions()
>     {
>         return CompactionExecutor.compactions.size();
>     }
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CASSANDRA-3703) log Compaction Active tasks in StatusLogger instead of n/a

Posted by "Jonathan Ellis (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-3703?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13194243#comment-13194243 ] 

Jonathan Ellis commented on CASSANDRA-3703:
-------------------------------------------

bq. it could make some sense to log CM.getActiveCompactions() instead 

Oops, I thought that's what I was doing.  Yes, I think that's what we want -- a compaction waiting on the lock isn't really active, IMO.

Committed w/ change to that method.
                
> log Compaction Active tasks in StatusLogger instead of n/a
> ----------------------------------------------------------
>
>                 Key: CASSANDRA-3703
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3703
>             Project: Cassandra
>          Issue Type: Improvement
>            Reporter: Jackson Chung
>            Assignee: Jonathan Ellis
>            Priority: Minor
>              Labels: compaction
>             Fix For: 1.0.8
>
>         Attachments: 3703.txt
>
>
> currently StatusLogger log:
> {noformat}
> logger.info(String.format("%-25s%10s%10s",
>                                   "CompactionManager", "n/a", CompactionManager.instance.getPendingTasks()));
> {noformat}
> It'd be great if it could actually log the number of active tasks being processed. Without looking into the code, I thought there was no compaction running when reading the log.
> {code: title=CompactionManager.java}
>     public int getActiveCompactions()
>     {
>         return CompactionExecutor.compactions.size();
>     }
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CASSANDRA-3703) log Compaction Active tasks in StatusLogger instead of n/a

Posted by "Jonathan Ellis (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-3703?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13185106#comment-13185106 ] 

Jonathan Ellis commented on CASSANDRA-3703:
-------------------------------------------

validationexecutor extends compactionexecutor and inherits the behavior we want.  (note that CE.compactions is static for just this reason.)
                
> log Compaction Active tasks in StatusLogger instead of n/a
> ----------------------------------------------------------
>
>                 Key: CASSANDRA-3703
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3703
>             Project: Cassandra
>          Issue Type: Improvement
>            Reporter: Jackson Chung
>            Assignee: Jonathan Ellis
>            Priority: Minor
>              Labels: compaction
>             Fix For: 1.0.8
>
>         Attachments: 3703.txt
>
>
> currently StatusLogger log:
> {noformat}
> logger.info(String.format("%-25s%10s%10s",
>                                   "CompactionManager", "n/a", CompactionManager.instance.getPendingTasks()));
> {noformat}
> It'd be great if it could actually log the number of active tasks being processed. Without looking into the code, I thought there was no compaction running when reading the log.
> {code: title=CompactionManager.java}
>     public int getActiveCompactions()
>     {
>         return CompactionExecutor.compactions.size();
>     }
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CASSANDRA-3703) log Compaction Active tasks in StatusLogger instead of n/a

Posted by "Sylvain Lebresne (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-3703?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13193700#comment-13193700 ] 

Sylvain Lebresne commented on CASSANDRA-3703:
---------------------------------------------

Yeah but in CompactionManager, executor refers only to the compactionExecutor. And getActiveCount() is a method from ThreadPoolExecutor, so it'll reference the tasks on the compaction executor only. Basically what I'm saying is that we should have:
{noformat}
public int getActiveTasks()
{
    return executor.getActiveCount() + validationExecutor.getActiveCount();
}
{noformat}

That being said, it could make some sense to log CM.getActiveCompactions() instead (which does uses CE.compactions and thus relate to both compaction and validation). The difference being that getActiveCompactions will return tasks actively compacting (by opposition to including those waiting on the compaction lock).
                
> log Compaction Active tasks in StatusLogger instead of n/a
> ----------------------------------------------------------
>
>                 Key: CASSANDRA-3703
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3703
>             Project: Cassandra
>          Issue Type: Improvement
>            Reporter: Jackson Chung
>            Assignee: Jonathan Ellis
>            Priority: Minor
>              Labels: compaction
>             Fix For: 1.0.8
>
>         Attachments: 3703.txt
>
>
> currently StatusLogger log:
> {noformat}
> logger.info(String.format("%-25s%10s%10s",
>                                   "CompactionManager", "n/a", CompactionManager.instance.getPendingTasks()));
> {noformat}
> It'd be great if it could actually log the number of active tasks being processed. Without looking into the code, I thought there was no compaction running when reading the log.
> {code: title=CompactionManager.java}
>     public int getActiveCompactions()
>     {
>         return CompactionExecutor.compactions.size();
>     }
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CASSANDRA-3703) log Compaction Active tasks in StatusLogger instead of n/a

Posted by "Jonathan Ellis (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-3703?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jonathan Ellis updated CASSANDRA-3703:
--------------------------------------

    Reviewer: slebresne  (was: cywjackson)
    
> log Compaction Active tasks in StatusLogger instead of n/a
> ----------------------------------------------------------
>
>                 Key: CASSANDRA-3703
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3703
>             Project: Cassandra
>          Issue Type: Improvement
>            Reporter: Jackson Chung
>            Assignee: Jonathan Ellis
>            Priority: Minor
>              Labels: compaction
>             Fix For: 1.0.8
>
>         Attachments: 3703.txt
>
>
> currently StatusLogger log:
> {noformat}
> logger.info(String.format("%-25s%10s%10s",
>                                   "CompactionManager", "n/a", CompactionManager.instance.getPendingTasks()));
> {noformat}
> It'd be great if it could actually log the number of active tasks being processed. Without looking into the code, I thought there was no compaction running when reading the log.
> {code: title=CompactionManager.java}
>     public int getActiveCompactions()
>     {
>         return CompactionExecutor.compactions.size();
>     }
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira