Package com.foundationdb.protobuf

Examples of com.foundationdb.protobuf.ProtobufDecompiler


                throw new InvalidParameterValueException("group does not use STORAGE_FORMAT protobuf");
            FileDescriptorProto fileProto = ((ProtobufStorageDescription)storage).getFileProto();
            try {
                tempFile = File.createTempFile("group", ".proto");
                try (FileWriter writer = new FileWriter(tempFile)) {
                    new ProtobufDecompiler(writer).decompile(fileProto);
                }
                reader = new BufferedReader(new FileReader(tempFile));
            }
            catch (IOException ex) {
                throw new AkibanInternalException("decompiling error", ex);
View Full Code Here


    protected ProtobufRowDataConverter converter(Group g) throws Exception {
        AISToProtobuf a2p = new AISToProtobuf(ProtobufRowFormat.Type.GROUP_MESSAGE);
        a2p.addGroup(g);
        FileDescriptorSet set = a2p.build();
        if (false) {
            new ProtobufDecompiler((Appendable)System.out).decompile(set);
        }
        FileDescriptor gdesc = FileDescriptor.buildFrom(set.getFile(0),
                                                        ProtobufStorageDescriptionHelper.DEPENDENCIES);
        return ProtobufRowDataConverter.forGroup(g, gdesc);
    }
View Full Code Here

                    ais2p.addGroup(group);
                }
            }
            set = ais2p.build();
            StringBuilder proto = new StringBuilder();
            new ProtobufDecompiler(proto).decompile(set);
            String actual = proto.toString();
            String expected = null;
            File expectedFile = changeSuffix(file, ".proto");
            if (expectedFile.exists()) {
                expected = fileContents(expectedFile);
View Full Code Here

TOP

Related Classes of com.foundationdb.protobuf.ProtobufDecompiler

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.