{"action":"created","issue":{"url":"https://api.github.com/repos/websudos/phantom/issues/402","labels_url":"https://api.github.com/repos/websudos/phantom/issues/402/labels{/name}","comments_url":"https://api.github.com/repos/websudos/phantom/issues/402/comments","events_url":"https://api.github.com/repos/websudos/phantom/issues/402/events","html_url":"https://github.com/websudos/phantom/issues/402","id":127297967,"number":402,"title":"Not able to configure LeveledCompactionStrategy subproperties","user":{"login":"dbakarcic","id":2651442,"avatar_url":"https://avatars.githubusercontent.com/u/2651442?v=3","gravatar_id":"","url":"https://api.github.com/users/dbakarcic","html_url":"https://github.com/dbakarcic","followers_url":"https://api.github.com/users/dbakarcic/followers","following_url":"https://api.github.com/users/dbakarcic/following{/other_user}","gists_url":"https://api.github.com/users/dbakarcic/gists{/gist_id}","starred_url":"https://api.github.com/users/dbakarcic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dbakarcic/subscriptions","organizations_url":"https://api.github.com/users/dbakarcic/orgs","repos_url":"https://api.github.com/users/dbakarcic/repos","events_url":"https://api.github.com/users/dbakarcic/events{/privacy}","received_events_url":"https://api.github.com/users/dbakarcic/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-01-18T19:47:43Z","updated_at":"2016-01-19T11:31:28Z","closed_at":"2016-01-19T11:31:28Z","body":"Hi there, \r\n I wanted to configure some specific subproperties for the `LeveledCompactionStrategy` (LCS) at table creation time, but looking at the docs or the source code I didn't find a way to do so. The only options I found are for the `SizeTieredCompactionStrategy` (STCS), and the implementation is the following:\r\n\r\n```\r\nsealed class SizeTieredCompactionStrategy(override val qb: CQLQuery) extends CompactionStrategy(qb) {\r\n    def min_sstable_size(unit: StorageUnit): SizeTieredCompactionStrategy = {\r\n      new SizeTieredCompactionStrategy(QueryBuilder.Create.min_sstable_size(qb, unit.toHuman()))\r\n    }\r\n\r\n    def sstable_size_in_mb(unit: StorageUnit): SizeTieredCompactionStrategy = {\r\n      new SizeTieredCompactionStrategy(QueryBuilder.Create.sstable_size_in_mb(qb, unit.toHuman()))\r\n    }\r\n\r\n    def bucket_high(size: Double): SizeTieredCompactionStrategy = {\r\n      new SizeTieredCompactionStrategy(QueryBuilder.Create.bucket_high(qb, size))\r\n    }\r\n\r\n    def bucket_low(size: Double): SizeTieredCompactionStrategy = {\r\n      new SizeTieredCompactionStrategy(QueryBuilder.Create.bucket_low(qb, size))\r\n    }\r\n  }\r\n```\r\n\r\nThe first thing that comes to my mind is offering a similar implementation for the LCS, with the right subproperties of course.\r\n\r\nAnother thing I noticed is that on the STCS you offer the `sstable_size_in_mb` option which I don't see on the [Cassandra docs](https://docs.datastax.com/en/cql/3.1/cql/cql_reference/compactSubprop.html) as a valid subproperty for that strategy, which appears to be only available for the LCS.\r\n\r\nI would appreciate if you would point me in the right direction in case I'm missing some way to configure the subproperties for the LCS. Otherwise I'll be happy to contribute a PR with the proposed implementation.\r\n\r\nThanks,\r\nDamián."},"comment":{"url":"https://api.github.com/repos/websudos/phantom/issues/comments/172823533","html_url":"https://github.com/websudos/phantom/issues/402#issuecomment-172823533","issue_url":"https://api.github.com/repos/websudos/phantom/issues/402","id":172823533,"user":{"login":"alexflav23","id":1645142,"avatar_url":"https://avatars.githubusercontent.com/u/1645142?v=3","gravatar_id":"","url":"https://api.github.com/users/alexflav23","html_url":"https://github.com/alexflav23","followers_url":"https://api.github.com/users/alexflav23/followers","following_url":"https://api.github.com/users/alexflav23/following{/other_user}","gists_url":"https://api.github.com/users/alexflav23/gists{/gist_id}","starred_url":"https://api.github.com/users/alexflav23/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexflav23/subscriptions","organizations_url":"https://api.github.com/users/alexflav23/orgs","repos_url":"https://api.github.com/users/alexflav23/repos","events_url":"https://api.github.com/users/alexflav23/events{/privacy}","received_events_url":"https://api.github.com/users/alexflav23/received_events","type":"User","site_admin":false},"created_at":"2016-01-19T11:31:28Z","updated_at":"2016-01-19T11:31:28Z","body":"Hi @dbakarcic,\r\n\r\nAll fixed in `1.21.2`, should be on Bintray in the next hour, just waiting for CI to finish.\r\n\r\nRegards."}}