Package org.apache.avro

Examples of org.apache.avro.Schema$Parser


    : p.createMessage(name, null, request, response, errors);}
    throw new Error("Missing return statement in function");
  }

  final public void ErrorList(List<Schema> errors) throws ParseException {
  Schema s;
    s = ReferenceType();
                        errors.add(s);
    label_10:
    while (true) {
      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
View Full Code Here


    {if (true) return Schema.createRecord(fields);}
    throw new Error("Missing return statement in function");
  }

  final public void FormalParameter(List<Field> fields) throws ParseException {
  Schema type;
    type = Type();
    VariableDeclarator(type, fields);
  }
View Full Code Here

    type = Type();
    VariableDeclarator(type, fields);
  }

  final public Schema Type() throws ParseException {
  Schema s;
    if (jj_2_2(2)) {
      s = ReferenceType();
    } else {
      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
      case BOOLEAN:
View Full Code Here

    {if (true) return s;}
    throw new Error("Missing return statement in function");
  }

  final public Schema ArrayType() throws ParseException {
  Schema elemSchema;
    jj_consume_token(ARRAY);
    jj_consume_token(LT);
    elemSchema = Type();
    jj_consume_token(GT);
    {if (true) return Schema.createArray(elemSchema);}
View Full Code Here

    {if (true) return Schema.createArray(elemSchema);}
    throw new Error("Missing return statement in function");
  }

  final public Schema MapType() throws ParseException {
  Schema elemSchema;
    jj_consume_token(MAP);
    jj_consume_token(LT);
    elemSchema = Type();
    jj_consume_token(GT);
    {if (true) return Schema.createMap(elemSchema);}
View Full Code Here

                                 sb.append(".").append(tok.image);
    }
    String name = sb.toString();
    if ((name.indexOf('.') == -1) && namespace != null)
      name = namespace + "." + name;
    Schema type = names.get(name);
    if (type == null)
      {if (true) throw error("Undefined name '" + name + "'", token);}
    {if (true) return type;}
    throw new Error("Missing return statement in function");
  }
View Full Code Here

/**
* Result types are like other types, except we provide "void" as
* an alias of "null"
*/
  final public Schema ResultType() throws ParseException {
  Schema schema;
    if (jj_2_3(2)) {
      jj_consume_token(VOID);
                      {if (true) return Schema.create(Type.NULL);}
    } else {
      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
View Full Code Here

    List<RegisterResponseEntry> res =
        objMapper.readValue(in, new TypeReference<List<RegisterResponseEntry>>(){});
    assertNotNull("no result", res);
    assertEquals("expected one source", 1, res.size());
    assertEquals("expected correct source id", 3002, res.get(0).getId());
    Schema resSchema = Schema.parse(res.get(0).getSchema());
    assertEquals("expected correct source schema", "test3.source2_v1", resSchema.getFullName());
  }
View Full Code Here

    {
      LOG.debug("/register response:" + new String(respHandler.getReceivedBytes()));
    }
    assertEquals("expected two sources", 2, res.size());
    assertEquals("expected correct source id", 4001, res.get(0).getId());
    Schema resSchema = Schema.parse(res.get(0).getSchema());
    assertEquals("expected correct source schema", "test4.source1_v1", resSchema.getFullName());
    assertEquals("expected correct source id", 4002, res.get(1).getId());
    resSchema = Schema.parse(res.get(1).getSchema());
    assertEquals("expected correct source schema", "test4.source2_v1", resSchema.getFullName());
  }
View Full Code Here

               obj.get("version") instanceof Integer);
    RegisterResponseEntry rre = new RegisterResponseEntry((Integer)obj.get("id"),
                                                          ((Integer)obj.get("version")).shortValue(),
                                                          (String)obj.get("schema"));
    assertEquals("unexpected source id", 4002, rre.getId());
    Schema resSchema = Schema.parse(rre.getSchema());
    assertEquals("unexpected source-schema name for source id 4002", "test4.source2_v1", resSchema.getFullName());

    // There's no guarantee of a metadataSchemas entry in general, but we pre-stuffed our
    // VersionedSchemaSetBackedRegistryService with one in the test's constructor, so we
    // expect the relay to hand it back to us.  Or else.
/* disabled for now since simplistic relay implementation has been disabled; reenable/update/modify as part of DDSDBUS-2093/2096 (TODO)
View Full Code Here

TOP

Related Classes of org.apache.avro.Schema$Parser

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.