Package org.apache.avro.util

Examples of org.apache.avro.util.Utf8$Utf8Converter


    }
  }
   
  @Override
  public Utf8 readString(Utf8 old) throws IOException {
    return new Utf8(readString());
  }
View Full Code Here


        Set<String> keyspaces = DatabaseDescriptor.getTables();
        Schema schema = Schema.createArray(Schema.create(Schema.Type.STRING));
        GenericArray<CharSequence> avroResults = new GenericData.Array<CharSequence>(keyspaces.size(), schema);
       
        for (String ksp : keyspaces)
            avroResults.add(new Utf8(ksp));
       
        return avroResults;
    }
View Full Code Here

        return avroResults;
    }

    public Utf8 describe_cluster_name() throws AvroRemoteException
    {
        return new Utf8(DatabaseDescriptor.getClusterName());
    }
View Full Code Here

   
    // FIXME: could use method in ThriftValidation
    static void validateKeyspace(String keyspace) throws KeyspaceNotDefinedException
    {
        if (!DatabaseDescriptor.getTables().contains(keyspace))
            throw new KeyspaceNotDefinedException(new Utf8("Keyspace " + keyspace + " does not exist in this schema."));
    }
View Full Code Here

    }

    public static ColumnPath newColumnPath(String cfName, ByteBuffer superColumn, ByteBuffer column)
    {
        ColumnPath cPath = new ColumnPath();
        cPath.column_family = new Utf8(cfName);
        cPath.super_column = superColumn;
        cPath.column = column;
        return cPath;
    }
View Full Code Here

    }

    public static ColumnParent newColumnParent(String cfName, byte[] superColumn)
    {
        ColumnParent cp = new ColumnParent();
        cp.column_family = new Utf8(cfName);
        if (superColumn != null)
            cp.super_column = ByteBuffer.wrap(superColumn);
        return cp;
    }
View Full Code Here

        return exception;
    }
   
    static InvalidRequestException newInvalidRequestException(String why)
    {
        return newInvalidRequestException(new Utf8(why));
    }
View Full Code Here

        return exception;
    }
   
    static NotFoundException newNotFoundException(String why)
    {
        return newNotFoundException(new Utf8(why));
    }
View Full Code Here

        return newNotFoundException(new Utf8(why));
    }
   
    static NotFoundException newNotFoundException()
    {
        return newNotFoundException(new Utf8());
    }
View Full Code Here

        return exception;
    }
   
    static TimedOutException newTimedOutException(String why)
    {
        return newTimedOutException(new Utf8(why));
    }
View Full Code Here

TOP

Related Classes of org.apache.avro.util.Utf8$Utf8Converter

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.