Examples of readFields()


Examples of com.salesforce.phoenix.query.KeyRange.readFields()

            List<KeyRange> orclause = Lists.newArrayListWithExpectedSize(orlen);
            slots.add(orclause);
            int maxSlotLength = 0;
            for (int j=0; j<orlen; j++) {
                KeyRange range = new KeyRange();
                range.readFields(in);
                if (range.getLowerRange().length > maxSlotLength) {
                    maxSlotLength = range.getLowerRange().length;
                }
                if (range.getUpperRange().length > maxSlotLength) {
                    maxSlotLength = range.getUpperRange().length;
View Full Code Here

Examples of com.salesforce.phoenix.schema.KeyValueSchema.readFields()

        }
        ByteArrayInputStream stream = new ByteArrayInputStream(proj);
        try {
            DataInputStream input = new DataInputStream(stream);
            KeyValueSchema schema = new KeyValueSchema();
            schema.readFields(input);
            int count = WritableUtils.readVInt(input);
            Expression[] expressions = new Expression[count];
            for (int i = 0; i < count; i++) {
              int ordinal = WritableUtils.readVInt(input);
              expressions[i] = ExpressionType.values()[ordinal].newInstance();
View Full Code Here

Examples of com.salesforce.phoenix.schema.PTable.readFields()

    private static PTable deserializeTable(byte[] b) {
        ByteArrayInputStream stream = new ByteArrayInputStream(b);
        try {
            DataInputStream input = new DataInputStream(stream);
            PTable table = new PTableImpl();
            table.readFields(input);
            return table;
        } catch (IOException e) {
            throw new RuntimeException(e);
        } finally {
            try {
View Full Code Here

Examples of com.salesforce.phoenix.schema.PTableImpl.readFields()

    private static PTable deserializeTable(byte[] b) {
        ByteArrayInputStream stream = new ByteArrayInputStream(b);
        try {
            DataInputStream input = new DataInputStream(stream);
            PTable table = new PTableImpl();
            table.readFields(input);
            return table;
        } catch (IOException e) {
            throw new RuntimeException(e);
        } finally {
            try {
View Full Code Here

Examples of com.salesforce.phoenix.schema.RowKeySchema.readFields()

    }

    @Override
    public void readFields(DataInput in) throws IOException {
        RowKeySchema schema = new RowKeySchema();
        schema.readFields(in);
        int maxLength = getTerminatorCount(schema);
        int andLen = in.readInt();
        List<List<KeyRange>> slots = Lists.newArrayListWithExpectedSize(andLen);
        for (int i=0; i<andLen; i++) {
            int orlen = in.readInt();
View Full Code Here

Examples of com.sematext.searchschemer.reader.elasticsearch.ElasticSearchFieldsDefinitionReader.readFields()

   * {@inheritDoc}
   */
  @Override
  public IndexStructure read(String file) throws IOException {
    ElasticSearchFieldsDefinitionReader reader = new ElasticSearchFieldsDefinitionReader(new File(file));
    List<FieldAttributes> fields = reader.readFields();
    IndexStructure structure = new BasicIndexStructure();
    for (FieldAttributes field : fields) {
      structure.addField(field.name(), field);
    }
    return structure;
View Full Code Here

Examples of com.sematext.searchschemer.reader.senseidb.SenseiDBFieldsDefinitionReader.readFields()

   */
  @Override
  public IndexStructure read(String file) throws IOException {
    SenseiDBFieldsDefinitionReader reader = new SenseiDBFieldsDefinitionReader(new File(file));
    try {
      List<FieldAttributes> fields = reader.readFields();
      IndexStructure structure = new BasicIndexStructure();
      for (FieldAttributes field : fields) {
        structure.addField(field.name(), field);
      }
      return structure;
View Full Code Here

Examples of com.sematext.searchschemer.reader.solr.SolrDynamicFieldsDefinitionReader.readFields()

  public IndexStructure read(String file) throws IOException {
    SolrStaticFieldsDefinitionReader reader = new SolrStaticFieldsDefinitionReader(new File(file));
    SolrDynamicFieldsDefinitionReader readerDynamic = new SolrDynamicFieldsDefinitionReader(new File(file));
    try {
      List<FieldAttributes> fields = reader.readFields();
      List<FieldAttributes> dynamicFields = readerDynamic.readFields();
      IndexStructure structure = new BasicIndexStructure();
      for (FieldAttributes field : fields) {
        structure.addField(field.name(), field);
      }
      for (FieldAttributes field : dynamicFields) {
View Full Code Here

Examples of com.sematext.searchschemer.reader.solr.SolrStaticFieldsDefinitionReader.readFields()

  @Override
  public IndexStructure read(String file) throws IOException {
    SolrStaticFieldsDefinitionReader reader = new SolrStaticFieldsDefinitionReader(new File(file));
    SolrDynamicFieldsDefinitionReader readerDynamic = new SolrDynamicFieldsDefinitionReader(new File(file));
    try {
      List<FieldAttributes> fields = reader.readFields();
      List<FieldAttributes> dynamicFields = readerDynamic.readFields();
      IndexStructure structure = new BasicIndexStructure();
      for (FieldAttributes field : fields) {
        structure.addField(field.name(), field);
      }
View Full Code Here

Examples of com.twitter.elephantbird.mapreduce.input.LuceneIndexInputFormat.LuceneIndexInputSplit.readFields()

    DataOutputStream dataOut = new DataOutputStream(bytesOut);

    orig.write(dataOut);

    LuceneIndexInputSplit deSerialized = new LuceneIndexInputSplit();
    deSerialized.readFields(new DataInputStream((new ByteArrayInputStream(bytesOut.toByteArray()))));

    assertEquals(orig.getIndexDirs(), deSerialized.getIndexDirs());
    assertEquals(orig.getLength(), deSerialized.getLength());

    assertEquals(0, orig.compareTo(deSerialized));
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.