Examples of AvroFormat


Examples of avrobase.AvroFormat

    try {
      ResultSet rs = session.find(new String[]{new String(row)});
      if (rs.next()) {
        int schema_id = rs.getInt(1);
        long version = rs.getLong(2);
        AvroFormat format = AvroFormat.values()[rs.getByte(3)];
        byte[] avro = rs.getBytes(4);
        Schema schema = getSchema(schema_id);
        if (schema != null) {
          return new Row<T, K>(readValue(avro, schema, format), keytx.fromBytes(row), version);
        } else {
View Full Code Here

Examples of avrobase.AvroFormat

      int dataOffset = -1;
      int dataLength = 0;

      long version = -1;
      Schema schema = null;
      AvroFormat format = AvroFormat.BINARY;

      KeyValue[] raw = result.raw();
      for (KeyValue kv : raw) {
        byte[] buffer = kv.getBuffer();
        int offset = kv.getValueOffset();
View Full Code Here

Examples of avrobase.AvroFormat

      public Row<T, K> execute(ResultSet rs) throws AvroBaseException, SQLException {
        if (rs.next()) {
          int schema_id = rs.getInt(1);
          long version = rs.getLong(2);
          AvroFormat format = AvroFormat.values()[rs.getByte(3)];
          byte[] avro = rs.getBytes(4);
          Schema schema = getSchema(schema_id);
          if (schema != null) {
            return new Row<T, K>(readValue(avro, schema, format), keytx.fromBytes(row), version);
          } else {
View Full Code Here

Examples of avrobase.AvroFormat

                    maxBuffer.set(false);
                    while (rs.next()) {
                      byte[] row = rs.getBytes(1);
                      int schema_id = rs.getInt(2);
                      long version = rs.getLong(3);
                      AvroFormat format = AvroFormat.values()[rs.getByte(4)];
                      byte[] avro = rs.getBytes(5);
                      Schema schema = getSchema(schema_id);
                      if (schema != null) {
                        Row<T, K> newrow = new Row<T, K>(readValue(avro, schema, format), keytx.fromBytes(row), version);
                        synchronized (queue) {
View Full Code Here

Examples of com.linkedin.databus2.core.schema.tools.AvroConverter.AvroFormat

      case 1: Logger.getRootLogger().setLevel(Level.INFO); break;
      case 2: Logger.getRootLogger().setLevel(Level.DEBUG); break;
      default: Logger.getRootLogger().setLevel(Level.ALL); break;
    }

    AvroFormat inputFormat = cli.getInputFormat(AvroFormat.JSON);
    LOG.info("Using input format: " + inputFormat);

    AvroFormat outputFormat = cli.getOutputFormat(AvroFormat.JSON);
    LOG.info("Using output format: " + outputFormat);

    String inputSchemaName = cli.getInputSchema(null);
    if (null == inputSchemaName)
    {
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.