cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mck SembWever (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CASSANDRA-2388) ColumnFamilyRecordReader fails for a given split because a host is down, even if records could reasonably be read from other replica.
Date Mon, 13 Jun 2011 16:41:51 GMT

    [ https://issues.apache.org/jira/browse/CASSANDRA-2388?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13048641#comment-13048641
] 

Mck SembWever commented on CASSANDRA-2388:
------------------------------------------

Just make sure i understand you T Jake, you would rather something like this in CassandraServer.java?
(I've renamed from the previous commit get_endpoints_in_same_datacenter(..) to sort_endpoints_by_proximity(..))
{noformat}
    public String[] sort_endpoints_by_proximity(String endpoint, String[] endpoints, boolean
restrictToSameDC) throws TException, InvalidRequestException
    {
        try
        {
            List<String> results = new ArrayList<String>();
            InetAddress address = InetAddress.getByName(endpoint);
            String datacenter = DatabaseDescriptor.getEndpointSnitch().getDatacenter(address);
            List<InetAddress> addresses = new ArrayList<InetAddress>();
            for(String ep : endpoints)
            {
                addresses.add(InetAddress.getByName(endpoint));
            }
            DatabaseDescriptor.getEndpointSnitch().sortByProximity(address, addresses);
            for(InetAddress ep : addresses)
            {
                String dc = DatabaseDescriptor.getEndpointSnitch().getDatacenter(ep);
                if(FailureDetector.instance.isAlive(ep) && (!restrictToSameDC || datacenter.equals(dc)))
                {
                    results.add(ep.getHostName());
                }
            }
            return results.toArray(new String[results.size()]);
        }
        catch (UnknownHostException e)
        {
            throw new InvalidRequestException(e.getMessage());
        }
    }
{noformat}

> ColumnFamilyRecordReader fails for a given split because a host is down, even if records
could reasonably be read from other replica.
> -------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-2388
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2388
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Hadoop
>            Reporter: Eldon Stegall
>            Assignee: Mck SembWever
>              Labels: hadoop, inputformat
>             Fix For: 0.8.1
>
>         Attachments: 0002_On_TException_try_next_split.patch, CASSANDRA-2388.patch, CASSANDRA-2388.patch
>
>
> ColumnFamilyRecordReader only tries the first location for a given split. We should try
multiple locations for a given split.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message