Examples of readFields()


Examples of org.apache.hadoop.hbase.HTableDescriptor.readFields()

    }
    FSDataInputStream fsDataInputStream = fs.open(status.getPath());
    HTableDescriptor hTableDescriptor = null;
    try {
      hTableDescriptor = new HTableDescriptor();
      hTableDescriptor.readFields(fsDataInputStream);
    } finally {
      fsDataInputStream.close();
    }
    return new TableDescriptorModtime(status.getModificationTime(), hTableDescriptor);
  }
View Full Code Here

Examples of org.apache.hadoop.hbase.KeyValue.readFields()

      byte [] family = Bytes.readByteArray(in);
      int numColumns = in.readInt();
      List<KeyValue> list = new ArrayList<KeyValue>(numColumns);
      for(int j=0;j<numColumns;j++) {
      KeyValue kv = new KeyValue();
      kv.readFields(in);
      list.add(kv);
      }
      this.familyMap.put(family, list);
    }
    if (version > 1) {
View Full Code Here

Examples of org.apache.hadoop.hbase.client.Scan.readFields()

   */
  static Scan convertStringToScan(String base64) throws IOException {
    ByteArrayInputStream bis = new ByteArrayInputStream(Base64.decode(base64));
    DataInputStream dis = new DataInputStream(bis);
    Scan scan = new Scan();
    scan.readFields(dis);
    return scan;
  }

  /**
   * Use this before submitting a TableReduce job. It will
View Full Code Here

Examples of org.apache.hadoop.hbase.client.coprocessor.Exec.readFields()

    DataInputBuffer dib = new DataInputBuffer();
    dib.reset(dob.getData(), dob.getLength());

    Exec after = new Exec();
    after.setConf(HBaseConfiguration.create());
    after.readFields(dib);
    // no error thrown
    assertEquals(after.getProtocolName(), protocolName);
    assertEquals(after.getMethodName(), methodName);
  }
View Full Code Here

Examples of org.apache.hadoop.hbase.client.idx.exp.Comparison.readFields()

    DataInputBuffer dataInputBuffer = new DataInputBuffer();
    dataInputBuffer.reset(dataOutputBuffer.getData(), dataOutputBuffer.getLength());

    Expression clonedExpression = new Comparison();
    clonedExpression.readFields(dataInputBuffer);

    Assert.assertEquals("The expression was not the same after being written and read", expression, clonedExpression);
  }
}
View Full Code Here

Examples of org.apache.hadoop.hbase.client.idx.exp.Expression.readFields()

    DataInputBuffer dataInputBuffer = new DataInputBuffer();
    dataInputBuffer.reset(dataOutputBuffer.getData(), dataOutputBuffer.getLength());

    Expression clonedExpression = new Comparison();
    clonedExpression.readFields(dataInputBuffer);

    Assert.assertEquals("The expression was not the same after being written and read", expression, clonedExpression);
  }
}
View Full Code Here

Examples of org.apache.hadoop.hbase.client.metrics.ScanMetrics.readFields()

    }

    DataInputBuffer in = new DataInputBuffer();
    in.reset(serializedMetrics, 0, serializedMetrics.length);
    ScanMetrics scanMetrics = new ScanMetrics();
    scanMetrics.readFields(in);
    MetricsTimeVaryingLong[] mlvs =
      scanMetrics.getMetricsTimeVaryingLongArray();

    try {
      for (MetricsTimeVaryingLong mlv : mlvs) {
View Full Code Here

Examples of org.apache.hadoop.hbase.client.tableindexed.IndexSpecification.readFields()

      return;
    }
    int numIndexes = in.readInt();
    for (int i = 0; i < numIndexes; i++) {
      IndexSpecification index = new IndexSpecification();
      index.readFields(in);
      addIndex(index);
    }
  }

  public void write(DataOutput out) throws IOException {
View Full Code Here

Examples of org.apache.hadoop.hbase.filter.Filter.readFields()

      }
    }
    Filter filter = (Filter)WritableFactories.newInstance(
      (Class<? extends Filter>)instanceClass, conf);
    try {
      filter.readFields(in);
    } catch (IOException io) {
      LOG.error("Error in readFields", io);
      throw io;
    } catch (Exception e) {
      LOG.error("Error in readFields", e);
View Full Code Here

Examples of org.apache.hadoop.hbase.index.ColumnQualifier.readFields()

      dos.flush();
      byte[] byteArray = bos.toByteArray();
      bis = new ByteArrayInputStream(byteArray);
      dis = new DataInputStream(bis);
      ColumnQualifier c = new ColumnQualifier();
      c.readFields(dis);
      assertTrue("ColumnQualifier state mismatch.", c.equals(cq));
    } finally {
      if (null != bos) {
        bos.close();
      }
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.