Package com.foundationdb.server.error

Examples of com.foundationdb.server.error.AkibanInternalException


        if (old != null) {
            logger.error("CAST({} AS {}): {} replaced by {} ", new Object[]{
                    source, target,  old.getClass(), cast.getClass()
            });
            if (duplicates == null)
                throw new AkibanInternalException("multiple casts defined from " + source + " to " + target);
            duplicates.add(new TCastIdentifier(source, target));
        }
    }
View Full Code Here


                    output.putString(String.format("%02d:%02d:%02d",
                                                   hours, minutes, seconds),
                                     null);
                    break;
                default:
                    throw new AkibanInternalException("unexpected argument: " + stType);
            }
        }
View Full Code Here

    }
   
    private static TClass checkType (TClass input, UnderlyingType expected)
    {
        if (input.underlyingType() != expected)
            throw new AkibanInternalException("Expected " + expected + " but got " + input.underlyingType());
        return input;
    }
View Full Code Here

        ex.clear().append(S_K_META_VERSION).fetch();
        if(!ex.getValue().isDefined()) {
            // Can only be empty if there is no data here
            ex.clear();
            if(ex.hasNext()) {
                throw new AkibanInternalException("Unsupported data volume (no metadata version key)");
            } else {
                // No data in this volume at all.
                return;
            }
        }
        long metaVersion = ex.getValue().getLong();
        if(CURRENT_META_VERSION != metaVersion) {
            throw new AkibanInternalException(String.format("Unsupported data volume meta version %d, current %d",
                                                            metaVersion, CURRENT_META_VERSION));
        }

        ex.clear().append(S_K_DATA_VERSION).fetch();
        assert ex.getValue().isDefined() : "No data version";
        long dataVersion = ex.getValue().getLong();
        if(CURRENT_DATA_VERSION != dataVersion) {
            throw new AkibanInternalException(String.format("Unsupported data volume data version %d, current %d",
                                                            dataVersion, CURRENT_DATA_VERSION));
        }

        ex.clear().append(S_K_PROTOBUF);
        loadProtobufChildren(ex, reader, skipSchemas);
View Full Code Here

        }

        @Override
        int compute(long[] arg0, long[] arg1, TExecutionContext context)
        {
            throw new AkibanInternalException("Not Used.");
        }
View Full Code Here

        }
        else if (underlying == UnderlyingType.STRING) {
            try {
                bytes = in.getString().getBytes("utf8");
            } catch (UnsupportedEncodingException e) {
                throw new AkibanInternalException("while converting to bytes: " + in.getString(), e);
            }
        }
        else {
            throw new AkibanInternalException("couldn't convert to byte[]: " + in);
        }

        int expectedLength = context.outputType().attribute(Attrs.LENGTH);
        if (bytes.length > expectedLength)
        {
View Full Code Here

            String charsetName = StringFactory.Charset.values()[charsetId].name();
            byte[] bytes;
            try {
                bytes = string.getBytes(charsetName);
            } catch (UnsupportedEncodingException e) {
                throw new AkibanInternalException("while decoding string using " + charsetName, e);
            }
            putBytes(context, out, bytes);
        }
View Full Code Here

    // state
    private TInstance(TClass tclass, Class<?> enumClass, int nAttrs, int attr0, int attr1, int attr2, int attr3,
              boolean isNullable)
    {
        if (tclass.nAttributes() != nAttrs) {
            throw new AkibanInternalException(tclass.name() + " requires "+ tclass.nAttributes()
                    + " attributes, saw " + nAttrs);
        }
        // normalize inputs past nattrs
        switch (nAttrs) {
        case 0:
View Full Code Here

            Set<TCastIdentifier> results = new HashSet<>(targets.length * sources.length);
            for (TClass source :sources) {
                for (TClass target : targets) {
                    TCastIdentifier identifier = new TCastIdentifier(source, target);
                    if (!results.add(identifier))
                        throw new AkibanInternalException("duplicate strong cast identifier: " + identifier);
                }
            }
            return results;
        }
View Full Code Here

        if (errors > 0) {
            StringBuilder sb = new StringBuilder("Found ").append(errors).append(" error");
            if (errors != 1)
                sb.append('s');
            sb.append(" while collecting scalar functions. Check logs for details.");
            throw new AkibanInternalException(sb.toString());
        }

        ArrayListMultimap<String, ScalarsGroup<V>> results = ArrayListMultimap.create();
        for (Map.Entry<String, Collection<V>> entry : overloadsByName.asMap().entrySet()) {
            String overloadName = entry.getKey();
View Full Code Here

TOP

Related Classes of com.foundationdb.server.error.AkibanInternalException

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.