Package io.crate.exceptions

Examples of io.crate.exceptions.UnhandledServerException


                docIndexMetaData = docIndexMetaData.merge(
                        buildDocIndexMetaData(concreteIndices[i]),
                        transportPutIndexTemplateAction,
                        createdFromTemplate);
            } catch (IOException e) {
                throw new UnhandledServerException("Unable to merge/build new DocIndexMetaData", e);
            }
        }
        return docIndexMetaData;
    }
View Full Code Here


    private DocIndexMetaData buildDocIndexMetaData(String index) {
        DocIndexMetaData docIndexMetaData;
        try {
            docIndexMetaData = new DocIndexMetaData(metaData.index(index), ident);
        } catch (IOException e) {
            throw new UnhandledServerException("Unable to build DocIndexMetaData", e);
        }
        return docIndexMetaData.build();
    }
View Full Code Here

            // default values
            builder.numberOfShards(settings.getAsInt(SETTING_NUMBER_OF_SHARDS, 5));
            builder.numberOfReplicas(settings.getAsInt(SETTING_NUMBER_OF_REPLICAS, 1));
            docIndexMetaData = new DocIndexMetaData(builder.build(), ident);
        } catch (IOException e) {
            throw new UnhandledServerException("Unable to build DocIndexMetaData from template", e);
        }
        return docIndexMetaData.build();
    }
View Full Code Here

    public DocTableInfo getTableInfo(String name) {
        // TODO: implement index based tables
        try {
            return cache.get(name);
        } catch (ExecutionException e) {
            throw new UnhandledServerException("Failed to get TableInfo", e.getCause());
        }
    }
View Full Code Here

    private DocIndexMetaData buildDocIndexMetaData(String index) {
        DocIndexMetaData docIndexMetaData;
        try {
            docIndexMetaData = new DocIndexMetaData(metaData.index(index), ident);
        } catch (IOException e) {
            throw new UnhandledServerException("Unable to build DocIndexMetaData", e);
        }
        return docIndexMetaData.build();
    }
View Full Code Here

    @Override
    public BlobTableInfo getTableInfo(String name) {
        try {
            return cache.get(name);
        } catch (ExecutionException e) {
            throw new UnhandledServerException("Failed to get TableInfo", e.getCause());
        }
    }
View Full Code Here

            } else {
                // shard or doc level
                return handleShardCollect(collectNode);
            }
        }
        throw new UnhandledServerException("unsupported routing");
    }
View Full Code Here

                            collectNode,
                            projectorChain
                    );
                    shardCollectors.add(collector);
                } catch (IndexShardMissingException e) {
                    throw new UnhandledServerException(
                            String.format("unknown shard id %d on index '%s'",
                                    shardId, entry.getKey()), e);
                } catch (Exception e) {
                    logger.error("Error while getting collector", e);
                    throw new UnhandledServerException(e);
                }
            }
        }

        // start the projection
View Full Code Here

                    context.collectExpressions.add((CollectExpression<?>) impl);
                }
                result = (Input<?>) impl;
            } else {
                // same or lower granularity and not found means unknown
                throw new UnhandledServerException(SymbolFormatter.format("Unknown Reference %s", symbol));
            }
            context.setMaxGranularity(symbol.info().granularity());
        } else {
            throw new UnhandledServerException(SymbolFormatter.format("Cannot handle Reference %s", symbol));
        }
        return result;
    }
View Full Code Here

                try {
                    partitionName = PartitionName.fromString(
                            index.name(),
                            tableName);
                } catch (IllegalArgumentException e) {
                    throw new UnhandledServerException(
                            String.format(Locale.ENGLISH,
                                    "Unable to load PARTITIONED BY columns from partition %s",
                                    index.name()),
                            e
                    );
View Full Code Here

TOP

Related Classes of io.crate.exceptions.UnhandledServerException

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.