Examples of AkibanInternalException


Examples of com.foundationdb.server.error.AkibanInternalException

        results = null;
        try {
            searcherManager.release(searcher);
        }
        catch (IOException ex) {
            throw new AkibanInternalException("Error releasing searcher", ex);
        }
        searcher = null;
    }
View Full Code Here

Examples of com.foundationdb.server.error.AkibanInternalException

        catch (InterruptedException ex)
        {
            output.putNull();
            if (context.getQueryContext().getSession().isCurrentQueryCanceled())
                throw new QueryCanceledException(context.getQueryContext().getSession());
            throw new AkibanInternalException("InteruptedException " + ex);
        }
    }
View Full Code Here

Examples of com.foundationdb.server.error.AkibanInternalException

            String str;
            if (value instanceof byte[]) {
                try {
                    str = new String((byte[]) value, "UTF-8");
                } catch (UnsupportedEncodingException e) {
                    throw new AkibanInternalException("while decoding binary", e);
                }
            }
            else {
                str = value.toString();
            }
View Full Code Here

Examples of com.foundationdb.server.error.AkibanInternalException

            if (isNegative)
                string = string.substring(1);
            string = preParse(string);
            Matcher matcher = regex.matcher(string);
            if (!matcher.matches())
                throw new AkibanInternalException("couldn't parse string as " + onBehalfOf.name() + ": " + string);
            long result = 0;
            for (int i = 0, len = matcher.groupCount(); i < len; ++i) {
                String group = matcher.group(i+1);
                @SuppressWarnings("unchecked")
                U unit = (U) units[i];
                String preparsedGroup = preParseSegment(group, unit);
                Long longValue = Long.parseLong(preparsedGroup);
                int max = maxes[i];
                if (longValue > max)
                    throw new AkibanInternalException("out of range: " + group + " while parsing " + onBehalfOf);
                long parsed = parseLong(longValue, unit);
                result = LongMath.checkedAdd(result, parsed);
            }
            return isNegative ? -result : result;
        }
View Full Code Here

Examples of com.foundationdb.server.error.AkibanInternalException

        return load(file, false);
    }

    protected void parseStatistics(Object obj, Map<Index,IndexStatistics> result, boolean statsIgnoreMissingIndexes) {
        if (!(obj instanceof Map))
            throw new AkibanInternalException("Document not in expected format");
        Map<?,?> map = (Map<?,?>)obj;
        TableName tableName = TableName.create(defaultSchema,
                                               (String)map.get(TABLE_NAME_KEY));
        Table table = ais.getTable(tableName);
        if (table == null)
View Full Code Here

Examples of com.foundationdb.server.error.AkibanInternalException

        result.put(index, stats);
    }

    protected Histogram parseHistogram(Object obj, Index index, int firstColumn, int columnCount) {
        if (!(obj instanceof Iterable))
            throw new AkibanInternalException("Histogram not in expected format");
        List<HistogramEntry> entries = new ArrayList<>();
        for (Object eobj : (Iterable)obj) {
            if (!(eobj instanceof Map))
                throw new AkibanInternalException("Entry not in expected format");
            Map<?,?> emap = (Map<?,?>)eobj;
            Key key = encodeKey(index, firstColumn, columnCount,
                                (List<?>)emap.get(HISTOGRAM_KEY_ARRAY_KEY));
            String keyString = key.toString();
            byte[] keyBytes = new byte[key.getEncodedSize()];
View Full Code Here

Examples of com.foundationdb.server.error.AkibanInternalException

        return new Histogram(firstColumn, columnCount, entries);
    }

    protected Key encodeKey(Index index, int firstColumn, int columnCount, List<?> values) {
        if (values.size() != columnCount)
            throw new AkibanInternalException("Key values do not match column count");
        int firstSpatialColumn = Integer.MAX_VALUE;
        if (index.isSpatial()) {
            firstSpatialColumn = index.firstSpatialArgument();
        }
        key.clear();
View Full Code Here

Examples of com.foundationdb.server.error.AkibanInternalException

        FullTextIndexInfo index = getIndex(context.getSession(), name, null);
        try {
            return index.getSearcher().search(context, index.getHKeyRowType(),  query, limit);
        }
        catch (IOException ex) {
            throw new AkibanInternalException("Error searching index", ex);
        }
    }
View Full Code Here

Examples of com.foundationdb.server.error.AkibanInternalException

    @Override
    public void start() {
        indexPath = new File(configService.getProperty(INDEX_PATH_PROPERTY));
        boolean success = indexPath.mkdirs();
        if(!success && !indexPath.exists()) {
            throw new AkibanInternalException("Could not create indexPath directories: " + indexPath);
        }

        registerSystemTables();
        listenerService.registerTableListener(this);
        listenerService.registerRowListener(this);
View Full Code Here

Examples of com.foundationdb.server.error.AkibanInternalException

                    }
                }
            });
            success = true;
        } catch(IOException e) {
            throw new AkibanInternalException("Error populating index " + index, e);
        } finally {
            if(!success) {
                try {
                    indexInfo.rollbackIndexer();
                } catch(IOException e) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.