public function processAllRanges() { $this->_statsReporter->resetCounters(); while (true) { $range = $this->_claimNextFreeRange(); if (!$range) { Log::notice('No more ranges to process'); break; } $this->processRange($range); } }
public function processAll() { Log::info('Cassandra Processor started'); $this->_statsReporter->resetCounters(); while (true) { $range = $this->claimNextFreeRange(); if (!$range) { Log::notice('Ran out of ranges to process'); break; } // Refresh the keys for this range try { $this->refreshKeysForRange($range); $success = true; } catch (CassandraException $e) { $success = false; } if ($success && ($range->firstKey != "" || $range->lastKey != "") && !starts_with($range->lastKey, 'empty:') && $range->firstKey != $range->lastKey) { $this->processRange($range); } else { // Re-queue the range if there was an error getting the keys Log::error('Error getting the keys for range ' . $range->id()); $range->error = 'Error getting keys for range'; $this->_requeueRange($range); } } }