| 471 | } |
| 472 | |
| 473 | DefaultCompactStrategyFactory::DefaultCompactStrategyFactory(const TableSchema& schema) |
| 474 | : schema_(schema), |
| 475 | raw_key_operator_(GetRawKeyOperatorFromSchema(schema_)), |
| 476 | cmp_(NewRowKeyComparator(raw_key_operator_)) { |
| 477 | // build index at tablet io loading |
| 478 | for (int32_t i = 0; i < schema_.column_families_size(); ++i) { |
| 479 | const std::string& name = schema_.column_families(i).name(); |
| 480 | cf_indexs_[name] = i; |
| 481 | } |
| 482 | } |
| 483 | |
| 484 | DefaultCompactStrategyFactory::~DefaultCompactStrategyFactory() { delete cmp_; } |
| 485 |
nothing calls this directly
no test coverage detected