@Override
    public Collection<Locator> getLocators(long shard) throws IOException {
    """
	Returns the locators for a shard, i.e. those that should be rolled up, for a given shard.
	'Should' means:
	1) A locator is capable of rollup.
	2) A locator has had new data in the past LOCATOR_TTL seconds.
	
	@param shard Number of the shard you want the locators for. 0-127 inclusive.
	@return Collection of locators
	@throws IOException
    """
        Timer.Context ctx = Instrumentation.getReadTimerContext(CassandraModel.CF_METRICS_LOCATOR_NAME);
        try {
            RowQuery<Long, Locator> query = AstyanaxIO.getKeyspace()
                    .prepareQuery(CassandraModel.CF_METRICS_LOCATOR)
                    .getKey(shard);
            if (LOG.isTraceEnabled())
                LOG.trace("ALocatorIO.getLocators() executing: select * from \"" + CassandraModel.KEYSPACE + "\"." + CassandraModel.CF_METRICS_LOCATOR_NAME + " where key=" + Long.toString(shard));
            return query.execute().getResult().getColumnNames();
        } catch (NotFoundException e) {
            Instrumentation.markNotFound(CassandraModel.CF_METRICS_LOCATOR_NAME);
            return Collections.emptySet();
        } catch (ConnectionException ex) {
            Instrumentation.markReadError(ex);
            LOG.error("Connection exception during getLocators(" + Long.toString(shard) + ")", ex);
            throw new IOException("Error reading locators", ex);
        } finally {
            ctx.stop();
        }
    }
@Override
    public Collection<Locator> getLocators(long shard) throws IOException {
        Timer.Context ctx = Instrumentation.getReadTimerContext(CassandraModel.CF_METRICS_LOCATOR_NAME);
        try {
            RowQuery<Long, Locator> query = AstyanaxIO.getKeyspace()
                    .prepareQuery(CassandraModel.CF_METRICS_LOCATOR)
                    .getKey(shard);
            if (LOG.isTraceEnabled())
                LOG.trace("ALocatorIO.getLocators() executing: select * from \"" + CassandraModel.KEYSPACE + "\"." + CassandraModel.CF_METRICS_LOCATOR_NAME + " where key=" + Long.toString(shard));
            return query.execute().getResult().getColumnNames();
        } catch (NotFoundException e) {
            Instrumentation.markNotFound(CassandraModel.CF_METRICS_LOCATOR_NAME);
            return Collections.emptySet();
        } catch (ConnectionException ex) {
            Instrumentation.markReadError(ex);
            LOG.error("Connection exception during getLocators(" + Long.toString(shard) + ")", ex);
            throw new IOException("Error reading locators", ex);
        } finally {
            ctx.stop();
        }
    }
@ Override public Collection < Locator > getLocators ( long shard ) throws IOException { Timer . Context ctx = Instrumentation . getReadTimerContext ( CassandraModel . CF_METRICS_LOCATOR_NAME ) ; try { RowQuery < Long , Locator > query = AstyanaxIO . getKeyspace ( ) . prepareQuery ( CassandraModel . CF_METRICS_LOCATOR ) . getKey ( shard ) ; if ( LOG . isTraceEnabled ( ) ) LOG . trace ( "ALocatorIO.getLocators() executing: select * from \"" + CassandraModel . KEYSPACE + "\"." + CassandraModel . CF_METRICS_LOCATOR_NAME + " where key=" + Long . toString ( shard ) ) ; return query . execute ( ) . getResult ( ) . getColumnNames ( ) ; } catch ( NotFoundException e ) { Instrumentation . markNotFound ( CassandraModel . CF_METRICS_LOCATOR_NAME ) ; return Collections . emptySet ( ) ; } catch ( ConnectionException ex ) { Instrumentation . markReadError ( ex ) ; LOG . error ( "Connection exception during getLocators(" + Long . toString ( shard ) + ")" , ex ) ; throw new IOException ( "Error reading locators" , ex ) ; } finally { ctx . stop ( ) ; } }
Returns the locators for a shard, i.e. those that should be rolled up, for a given shard.
'Should' means:
1) A locator is capable of rollup.
2) A locator has had new data in the past LOCATOR_TTL seconds.

@param shard Number of the shard you want the locators for. 0-127 inclusive.
@return Collection of locators
@throws IOException
Returns the locators for a shard i . e . those that should be rolled up for a given shard . Should means : 1 ) A locator is capable of rollup . 2 ) A locator has had new data in the past LOCATOR_TTL seconds .