Package org.apache.cassandra.thrift

Examples of org.apache.cassandra.thrift.UnavailableException$UnavailableExceptionTupleSchemeFactory


            if (localdc.equals(snitch.getDatacenter(endpoint)))
                localEndpoints++;
        }
       
        if(localEndpoints < blockfor)
            throw new UnavailableException();
    }
View Full Code Here


        for (InetAddress endpoint : endpoints)
        {
            if (FailureDetector.instance.isAlive(endpoint))
                return endpoint;
        }
        throw new UnavailableException(); // no nodes that could contain key are alive
    }
View Full Code Here

        // Throw exception if any of the DC doesn't have livenodes to accept write.
        for (String dc: strategy.getDatacenters())
        {
          if (dcEndpoints.get(dc).get() != responses.get(dc).get())
                throw new UnavailableException();
        }
    }
View Full Code Here

    {
        if (consistencyLevel == ConsistencyLevel.ANY)
        {
            // ensure there are blockFor distinct living nodes (hints are ok).
            if (hintedEndpoints.keySet().size() < responses.get())
                throw new UnavailableException();
        }

        // count destinations that are part of the desired target set
        int liveNodes = 0;
        for (InetAddress destination : hintedEndpoints.keySet())
        {
            if (writeEndpoints.contains(destination))
                liveNodes++;
        }
        if (liveNodes < responses.get())
        {
            throw new UnavailableException();
        }
    }
View Full Code Here

        // Throw exception if any of the DC doesn't have livenodes to accept write.
        for (String dc: strategy.getDatacenters())
        {
          if (dcEndpoints.get(dc).get() < responses.get(dc).get())
                throw new UnavailableException();
        }
    }
View Full Code Here

                liveNodes++;
        }

        if (liveNodes < responses.get())
        {
            throw new UnavailableException();
        }
    }
View Full Code Here

                }
                builder.append("] are insufficient to satisfy LOCAL_QUORUM requirement of ").append(blockfor).append(" live nodes in '").append(localdc).append("'");
                logger.debug(builder.toString());
            }

            throw new UnavailableException();
        }
    }
View Full Code Here

    {
        if (endpoints.size() < blockfor)
        {
            logger.debug("Live nodes {} do not satisfy ConsistencyLevel ({} required)",
                         StringUtils.join(endpoints, ", "), blockfor);
            throw new UnavailableException();
        }
    }
View Full Code Here

        // Throw exception if any of the DC doesn't have livenodes to accept write.
        for (String dc: strategy.getDatacenters())
        {
          if (dcEndpoints.get(dc).get() < responses.get(dc).get())
                throw new UnavailableException();
        }
    }
View Full Code Here

    {
        if (consistencyLevel == ConsistencyLevel.ANY)
        {
            // ensure there are blockFor distinct living nodes (hints are ok).
            if (hintedEndpoints.keySet().size() < responses.get())
                throw new UnavailableException();
            return;
        }

        // count destinations that are part of the desired target set
        int liveNodes = 0;
        for (InetAddress destination : hintedEndpoints.keySet())
        {
            if (writeEndpoints.contains(destination))
                liveNodes++;
        }
        if (liveNodes < responses.get())
        {
            throw new UnavailableException();
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.cassandra.thrift.UnavailableException$UnavailableExceptionTupleSchemeFactory

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.