[jira] [Updated] (CASSANDRA-7840) Refactor static state functions into static singletons

2015-01-28 Thread Brandon Williams (JIRA)

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

Brandon Williams updated CASSANDRA-7840:

Labels:   (was: patch)

 Refactor static state  functions into static singletons
 

 Key: CASSANDRA-7840
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7840
 Project: Cassandra
  Issue Type: Sub-task
Reporter: Blake Eggleston
Assignee: Blake Eggleston
 Fix For: 3.0

 Attachments: 
 0001-splitting-StorageService-executors-into-a-separate-c.patch, 
 0002-making-DatabaseDescriptor-a-singleton.patch, 
 0003-refactoring-StorageService-static-methods.patch, 
 0004-making-StorageProxy-a-singleton.patch, 
 0005-making-MigrationManager-a-singleton.patch, 
 0006-making-SystemKeyspace-a-singleton.patch, 
 0007-making-Auth-a-singleton.patch, 
 0008-removing-static-methods-and-initialization-from-Comp.patch, 
 0009-making-SinkManager-a-singleton.patch, 
 0010-making-DefsTables-a-singleton.patch, 
 0011-making-StageManager-a-singleton.patch, 
 0012-making-MessagingService-a-singleton.patch, 
 0013-making-QueryProcessor-a-singleton.patch, 
 0014-refactoring-static-methods-on-Tracing.patch, 
 0015-removing-static-state-from-BatchlogManager.patch, 
 0016-removing-static-method-from-CommitLog.patch, 
 0017-OutboundTcpConnection-removing-singleton-access-from.patch, 
 0018-FBUtilities-removing-getLocalAddress-getBroadcastAdd.patch, 
 0019-PendingRangeCalculatorService-removing-singleton-acc.patch, 
 0020-ActiveRepairService-removing-static-members-and-meth.patch, 
 0021-RowDataResolver-removing-static-singleton-access-fro.patch, 
 0022-AbstractReadExecutor-removing-static-method.patch, 
 0023-StorageServiceAccessor-removing-static-singleton-acc.patch, 
 0024-FileUtils-removing-static-singleton-accesses-from-st.patch, 
 0025-ResourceWatcher-removing-static-singleton-access-fro.patch, 
 0026-TokenMetadata-removing-static-singleton-access-from-.patch, 
 0027-OutboundTcpConnectionPool-removing-static-singleton-.patch, 
 0028-Cassandra-PasswordAuthenticator-making-static-method.patch, 
 0029-CompactionMetrics-making-static-method-instance-meth.patch, 
 0030-ClientState-splitting-configured-QueryHandler-instan.patch, 
 0031-SSTableReader-splitting-static-factory-methods-into-.patch, 
 0032-Keyspace-splitting-static-factory-methods-and-state-.patch, 
 0033-ColumnFamilyStore-splitting-static-factory-methods-a.patch, 
 0034-TriggerDefinition-removing-static-singleton-access-f.patch, 
 0035-CFMetaData-splitting-off-static-factory-methods-onto.patch, 
 0036-KSMetaData-splitting-off-static-factory-methods-onto.patch, 
 0037-SystemKeyspace-moving-system-keyspace-definitions-on.patch, 
 0038-UTMetaData-refactoring-static-singleton-accesses-for.patch, 
 0039-CounterId-removing-static-singleton-accesses-from-st.patch, 
 0040-AtomicBtreeColumns-replacing-SystemKeyspace-CFMetaDa.patch


 1st step of CASSANDRA-7837.
 Things like DatabaseDescriptor.getPartitioner() should become 
 DatabaseDescriptor.instance.getPartitioner(). In cases where there is a mix 
 of instance state and static functionality (Keyspace  ColumnFamilyStore 
 classes), the static portion should be split off into singleton factory 
 classes.



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


[jira] [Updated] (CASSANDRA-7840) Refactor static state functions into static singletons

2014-09-03 Thread Yuki Morishita (JIRA)

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

Yuki Morishita updated CASSANDRA-7840:
--
 Reviewer: Yuki Morishita
Fix Version/s: 3.0
 Assignee: Blake Eggleston

 Refactor static state  functions into static singletons
 

 Key: CASSANDRA-7840
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7840
 Project: Cassandra
  Issue Type: Sub-task
Reporter: Blake Eggleston
Assignee: Blake Eggleston
  Labels: patch
 Fix For: 3.0

 Attachments: 
 0001-splitting-StorageService-executors-into-a-separate-c.patch, 
 0002-making-DatabaseDescriptor-a-singleton.patch, 
 0003-refactoring-StorageService-static-methods.patch, 
 0004-making-StorageProxy-a-singleton.patch, 
 0005-making-MigrationManager-a-singleton.patch, 
 0006-making-SystemKeyspace-a-singleton.patch, 
 0007-making-Auth-a-singleton.patch, 
 0008-removing-static-methods-and-initialization-from-Comp.patch, 
 0009-making-SinkManager-a-singleton.patch, 
 0010-making-DefsTables-a-singleton.patch, 
 0011-making-StageManager-a-singleton.patch, 
 0012-making-MessagingService-a-singleton.patch, 
 0013-making-QueryProcessor-a-singleton.patch, 
 0014-refactoring-static-methods-on-Tracing.patch, 
 0015-removing-static-state-from-BatchlogManager.patch, 
 0016-removing-static-method-from-CommitLog.patch, 
 0017-OutboundTcpConnection-removing-singleton-access-from.patch, 
 0018-FBUtilities-removing-getLocalAddress-getBroadcastAdd.patch, 
 0019-PendingRangeCalculatorService-removing-singleton-acc.patch, 
 0020-ActiveRepairService-removing-static-members-and-meth.patch, 
 0021-RowDataResolver-removing-static-singleton-access-fro.patch, 
 0022-AbstractReadExecutor-removing-static-method.patch, 
 0023-StorageServiceAccessor-removing-static-singleton-acc.patch, 
 0024-FileUtils-removing-static-singleton-accesses-from-st.patch, 
 0025-ResourceWatcher-removing-static-singleton-access-fro.patch, 
 0026-TokenMetadata-removing-static-singleton-access-from-.patch, 
 0027-OutboundTcpConnectionPool-removing-static-singleton-.patch, 
 0028-Cassandra-PasswordAuthenticator-making-static-method.patch, 
 0029-CompactionMetrics-making-static-method-instance-meth.patch, 
 0030-ClientState-splitting-configured-QueryHandler-instan.patch, 
 0031-SSTableReader-splitting-static-factory-methods-into-.patch, 
 0032-Keyspace-splitting-static-factory-methods-and-state-.patch, 
 0033-ColumnFamilyStore-splitting-static-factory-methods-a.patch, 
 0034-TriggerDefinition-removing-static-singleton-access-f.patch, 
 0035-CFMetaData-splitting-off-static-factory-methods-onto.patch, 
 0036-KSMetaData-splitting-off-static-factory-methods-onto.patch, 
 0037-SystemKeyspace-moving-system-keyspace-definitions-on.patch, 
 0038-UTMetaData-refactoring-static-singleton-accesses-for.patch, 
 0039-CounterId-removing-static-singleton-accesses-from-st.patch, 
 0040-AtomicBtreeColumns-replacing-SystemKeyspace-CFMetaDa.patch


 1st step of CASSANDRA-7837.
 Things like DatabaseDescriptor.getPartitioner() should become 
 DatabaseDescriptor.instance.getPartitioner(). In cases where there is a mix 
 of instance state and static functionality (Keyspace  ColumnFamilyStore 
 classes), the static portion should be split off into singleton factory 
 classes.



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


[jira] [Updated] (CASSANDRA-7840) Refactor static state functions into static singletons

2014-08-29 Thread Blake Eggleston (JIRA)

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

Blake Eggleston updated CASSANDRA-7840:
---

Attachment: 0040-AtomicBtreeColumns-replacing-SystemKeyspace-CFMetaDa.patch
0039-CounterId-removing-static-singleton-accesses-from-st.patch
0038-UTMetaData-refactoring-static-singleton-accesses-for.patch
0037-SystemKeyspace-moving-system-keyspace-definitions-on.patch
0036-KSMetaData-splitting-off-static-factory-methods-onto.patch
0035-CFMetaData-splitting-off-static-factory-methods-onto.patch
0034-TriggerDefinition-removing-static-singleton-access-f.patch
0033-ColumnFamilyStore-splitting-static-factory-methods-a.patch
0032-Keyspace-splitting-static-factory-methods-and-state-.patch
0031-SSTableReader-splitting-static-factory-methods-into-.patch
0030-ClientState-splitting-configured-QueryHandler-instan.patch
0029-CompactionMetrics-making-static-method-instance-meth.patch
0028-Cassandra-PasswordAuthenticator-making-static-method.patch
0027-OutboundTcpConnectionPool-removing-static-singleton-.patch
0026-TokenMetadata-removing-static-singleton-access-from-.patch
0025-ResourceWatcher-removing-static-singleton-access-fro.patch
0024-FileUtils-removing-static-singleton-accesses-from-st.patch
0023-StorageServiceAccessor-removing-static-singleton-acc.patch
0022-AbstractReadExecutor-removing-static-method.patch
0021-RowDataResolver-removing-static-singleton-access-fro.patch
0020-ActiveRepairService-removing-static-members-and-meth.patch
0019-PendingRangeCalculatorService-removing-singleton-acc.patch
0018-FBUtilities-removing-getLocalAddress-getBroadcastAdd.patch
0017-OutboundTcpConnection-removing-singleton-access-from.patch
0016-removing-static-method-from-CommitLog.patch
0015-removing-static-state-from-BatchlogManager.patch
0014-refactoring-static-methods-on-Tracing.patch

Uploading the second round of patches. Unless I've missed something, this 
should complete the first step.

Static methods that access static singletons have been converted to instance 
methods where appropriate, or are now taking their singleton dependencies as 
arguments. In some cases, they were split off into factory classes. The ones 
that were split off into factory classes will end up passing dependencies into 
the classes they're instantiating. Having a factory is easier than passing a 
ton of arguments in each time, and a few of them have a small amount of state 
that was static.

I've also moved the system keyspace CFMetaData instances into the 
SystemKeyspace class. I did this because the CFMetaData can be compiled using 
just a QueryProcessor instance, and rolling it into the CFMetaDataFactory would 
likely ended up in a dependency loop, because it depends on singletons that 
depend on the SystemKeyspace.

Finally, the AtomicBTreeColumns class was using the system's IndexCf to 
estimate it's empty size, so I switched it to a throwaway CFMetaData instance. 
I'm assuming that the IndexCf was being used out of convenience, but let me 
know if I'm wrong, and I'll rework it.

 Refactor static state  functions into static singletons
 

 Key: CASSANDRA-7840
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7840
 Project: Cassandra
  Issue Type: Sub-task
Reporter: Blake Eggleston
  Labels: patch
 Attachments: 
 0001-splitting-StorageService-executors-into-a-separate-c.patch, 
 0002-making-DatabaseDescriptor-a-singleton.patch, 
 0003-refactoring-StorageService-static-methods.patch, 
 0004-making-StorageProxy-a-singleton.patch, 
 0005-making-MigrationManager-a-singleton.patch, 
 0006-making-SystemKeyspace-a-singleton.patch, 
 0007-making-Auth-a-singleton.patch, 
 0008-removing-static-methods-and-initialization-from-Comp.patch, 
 0009-making-SinkManager-a-singleton.patch, 
 0010-making-DefsTables-a-singleton.patch, 
 0011-making-StageManager-a-singleton.patch, 
 0012-making-MessagingService-a-singleton.patch, 
 0013-making-QueryProcessor-a-singleton.patch, 
 0014-refactoring-static-methods-on-Tracing.patch, 
 0014-refactoring-static-methods-on-Tracing.patch, 
 0015-removing-static-state-from-BatchlogManager.patch, 
 0016-removing-static-method-from-CommitLog.patch, 
 0017-OutboundTcpConnection-removing-singleton-access-from.patch, 
 0018-FBUtilities-removing-getLocalAddress-getBroadcastAdd.patch, 
 0019-PendingRangeCalculatorService-removing-singleton-acc.patch, 
 

[jira] [Updated] (CASSANDRA-7840) Refactor static state functions into static singletons

2014-08-29 Thread Blake Eggleston (JIRA)

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

Blake Eggleston updated CASSANDRA-7840:
---

Attachment: (was: 0014-refactoring-static-methods-on-Tracing.patch)

 Refactor static state  functions into static singletons
 

 Key: CASSANDRA-7840
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7840
 Project: Cassandra
  Issue Type: Sub-task
Reporter: Blake Eggleston
  Labels: patch
 Attachments: 
 0001-splitting-StorageService-executors-into-a-separate-c.patch, 
 0002-making-DatabaseDescriptor-a-singleton.patch, 
 0003-refactoring-StorageService-static-methods.patch, 
 0004-making-StorageProxy-a-singleton.patch, 
 0005-making-MigrationManager-a-singleton.patch, 
 0006-making-SystemKeyspace-a-singleton.patch, 
 0007-making-Auth-a-singleton.patch, 
 0008-removing-static-methods-and-initialization-from-Comp.patch, 
 0009-making-SinkManager-a-singleton.patch, 
 0010-making-DefsTables-a-singleton.patch, 
 0011-making-StageManager-a-singleton.patch, 
 0012-making-MessagingService-a-singleton.patch, 
 0013-making-QueryProcessor-a-singleton.patch, 
 0014-refactoring-static-methods-on-Tracing.patch, 
 0015-removing-static-state-from-BatchlogManager.patch, 
 0016-removing-static-method-from-CommitLog.patch, 
 0017-OutboundTcpConnection-removing-singleton-access-from.patch, 
 0018-FBUtilities-removing-getLocalAddress-getBroadcastAdd.patch, 
 0019-PendingRangeCalculatorService-removing-singleton-acc.patch, 
 0020-ActiveRepairService-removing-static-members-and-meth.patch, 
 0021-RowDataResolver-removing-static-singleton-access-fro.patch, 
 0022-AbstractReadExecutor-removing-static-method.patch, 
 0023-StorageServiceAccessor-removing-static-singleton-acc.patch, 
 0024-FileUtils-removing-static-singleton-accesses-from-st.patch, 
 0025-ResourceWatcher-removing-static-singleton-access-fro.patch, 
 0026-TokenMetadata-removing-static-singleton-access-from-.patch, 
 0027-OutboundTcpConnectionPool-removing-static-singleton-.patch, 
 0028-Cassandra-PasswordAuthenticator-making-static-method.patch, 
 0029-CompactionMetrics-making-static-method-instance-meth.patch, 
 0030-ClientState-splitting-configured-QueryHandler-instan.patch, 
 0031-SSTableReader-splitting-static-factory-methods-into-.patch, 
 0032-Keyspace-splitting-static-factory-methods-and-state-.patch, 
 0033-ColumnFamilyStore-splitting-static-factory-methods-a.patch, 
 0034-TriggerDefinition-removing-static-singleton-access-f.patch, 
 0035-CFMetaData-splitting-off-static-factory-methods-onto.patch, 
 0036-KSMetaData-splitting-off-static-factory-methods-onto.patch, 
 0037-SystemKeyspace-moving-system-keyspace-definitions-on.patch, 
 0038-UTMetaData-refactoring-static-singleton-accesses-for.patch, 
 0039-CounterId-removing-static-singleton-accesses-from-st.patch, 
 0040-AtomicBtreeColumns-replacing-SystemKeyspace-CFMetaDa.patch


 1st step of CASSANDRA-7837.
 Things like DatabaseDescriptor.getPartitioner() should become 
 DatabaseDescriptor.instance.getPartitioner(). In cases where there is a mix 
 of instance state and static functionality (Keyspace  ColumnFamilyStore 
 classes), the static portion should be split off into singleton factory 
 classes.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Updated] (CASSANDRA-7840) Refactor static state functions into static singletons

2014-08-28 Thread Blake Eggleston (JIRA)

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

Blake Eggleston updated CASSANDRA-7840:
---

Attachment: 0014-refactoring-static-methods-on-Tracing.patch
0013-making-QueryProcessor-a-singleton.patch
0012-making-MessagingService-a-singleton.patch
0011-making-StageManager-a-singleton.patch
0010-making-DefsTables-a-singleton.patch
0009-making-SinkManager-a-singleton.patch
0008-removing-static-methods-and-initialization-from-Comp.patch
0007-making-Auth-a-singleton.patch
0006-making-SystemKeyspace-a-singleton.patch
0005-making-MigrationManager-a-singleton.patch
0004-making-StorageProxy-a-singleton.patch
0003-refactoring-StorageService-static-methods.patch
0002-making-DatabaseDescriptor-a-singleton.patch
0001-splitting-StorageService-executors-into-a-separate-c.patch

 Refactor static state  functions into static singletons
 

 Key: CASSANDRA-7840
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7840
 Project: Cassandra
  Issue Type: Sub-task
Reporter: Blake Eggleston
  Labels: patch
 Attachments: 
 0001-splitting-StorageService-executors-into-a-separate-c.patch, 
 0002-making-DatabaseDescriptor-a-singleton.patch, 
 0003-refactoring-StorageService-static-methods.patch, 
 0004-making-StorageProxy-a-singleton.patch, 
 0005-making-MigrationManager-a-singleton.patch, 
 0006-making-SystemKeyspace-a-singleton.patch, 
 0007-making-Auth-a-singleton.patch, 
 0008-removing-static-methods-and-initialization-from-Comp.patch, 
 0009-making-SinkManager-a-singleton.patch, 
 0010-making-DefsTables-a-singleton.patch, 
 0011-making-StageManager-a-singleton.patch, 
 0012-making-MessagingService-a-singleton.patch, 
 0013-making-QueryProcessor-a-singleton.patch, 
 0014-refactoring-static-methods-on-Tracing.patch


 1st step of CASSANDRA-7837.
 Things like DatabaseDescriptor.getPartitioner() should become 
 DatabaseDescriptor.instance.getPartitioner(). In cases where there is a mix 
 of instance state and static functionality (Keyspace  ColumnFamilyStore 
 classes), the static portion should be split off into singleton factory 
 classes.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Updated] (CASSANDRA-7840) Refactor static state functions into static singletons

2014-08-27 Thread Blake Eggleston (JIRA)

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

Blake Eggleston updated CASSANDRA-7840:
---

Description: 
1st step of CASSANDRA-7837.

Things like DatabaseDescriptor.getPartitioner() should become 
DatabaseDescriptor.instance.getPartitioner(). In cases where there is a mix of 
instance state and static functionality (Keyspace  ColumnFamilyStore classes), 
the static portion should be split off into singleton factory classes.

  was:
1st step of CASSANDRA-7837.

Things lik DatabaseDescriptor.getPartitioner() should become 
DatabaseDescriptor.instance.getPartitioner(). In cases where there is a mix of 
instance state and static functionality (Keyspace  ColumnFamilyStore classes), 
the static portion should be split off into singleton factory classes.


 Refactor static state  functions into static singletons
 

 Key: CASSANDRA-7840
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7840
 Project: Cassandra
  Issue Type: Improvement
Reporter: Blake Eggleston

 1st step of CASSANDRA-7837.
 Things like DatabaseDescriptor.getPartitioner() should become 
 DatabaseDescriptor.instance.getPartitioner(). In cases where there is a mix 
 of instance state and static functionality (Keyspace  ColumnFamilyStore 
 classes), the static portion should be split off into singleton factory 
 classes.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Updated] (CASSANDRA-7840) Refactor static state functions into static singletons

2014-08-27 Thread Blake Eggleston (JIRA)

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

Blake Eggleston updated CASSANDRA-7840:
---

Issue Type: Sub-task  (was: Improvement)
Parent: CASSANDRA-7837

 Refactor static state  functions into static singletons
 

 Key: CASSANDRA-7840
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7840
 Project: Cassandra
  Issue Type: Sub-task
Reporter: Blake Eggleston

 1st step of CASSANDRA-7837.
 Things like DatabaseDescriptor.getPartitioner() should become 
 DatabaseDescriptor.instance.getPartitioner(). In cases where there is a mix 
 of instance state and static functionality (Keyspace  ColumnFamilyStore 
 classes), the static portion should be split off into singleton factory 
 classes.



--
This message was sent by Atlassian JIRA
(v6.2#6252)