Package org.apache.drill.exec.record

Examples of org.apache.drill.exec.record.VectorAccessible


      assertTrue("Trace file does not exist", fs.exists(path));
      FSDataInputStream in = fs.open(path);

      VectorAccessibleSerializable wrap = new VectorAccessibleSerializable(context.getAllocator());
      wrap.readFromStream(in);
      VectorAccessible container = wrap.get();

        /* Assert there are no selection vectors */
      assertTrue(wrap.getSv2() == null);

        /* Assert there is only one record */
        assertTrue(container.getRecordCount() == 1);

        /* Read the Integer value and ASSERT its Integer.MIN_VALUE */
        int value = (int) container.iterator().next().getValueVector().getAccessor().getObject(0);
        assertTrue(value == Integer.MIN_VALUE);
    }
View Full Code Here


    FSDataInputStream in = fs.open(path);
    VectorAccessibleSerializable newWrap = new VectorAccessibleSerializable(context.getAllocator());
    newWrap.readFromStream(in);
    fs.close();

    VectorAccessible newContainer = newWrap.get();
    for (VectorWrapper w : newContainer) {
      ValueVector vv = w.getValueVector();
      int values = vv.getAccessor().getValueCount();
      for (int i = 0; i < values; i++) {
        Object o = vv.getAccessor().getObject(i);
View Full Code Here

  }


  /* Get batch meta info : rows, selectedRows, dataSize */
  private BatchMetaInfo getBatchMetaInfo(VectorAccessibleSerializable vcSerializable) {
    VectorAccessible vectorContainer = vcSerializable.get();

    int rows =0;
    int selectedRows = 0;
    int totalDataSize = 0;

    rows = vectorContainer.getRecordCount();
    selectedRows = rows;

    if (vectorContainer.getSchema().getSelectionVectorMode() == SelectionVectorMode.TWO_BYTE) {
      selectedRows = vcSerializable.getSv2().getCount();
    }

    for (VectorWrapper w : vectorContainer) {
       totalDataSize += w.getValueVector().getBufferSize();
View Full Code Here

    mmap.put("vectors", wrap).get();

    for(int x =0; x < 2; x++){
      CachedVectorContainer newWrap = (CachedVectorContainer) mmap.get("vectors").iterator().next();

      VectorAccessible newContainer = newWrap.get();
      for (VectorWrapper<?> w : newContainer) {
        ValueVector vv = w.getValueVector();
        int values = vv.getAccessor().getValueCount();
        for (int i = 0; i < values; i++) {
          Object o = vv.getAccessor().getObject(i);
View Full Code Here

      assertTrue("Trace file does not exist", fs.exists(path));
      FSDataInputStream in = fs.open(path);

      VectorAccessibleSerializable wrap = new VectorAccessibleSerializable(context.getAllocator());
      wrap.readFromStream(in);
      VectorAccessible container = wrap.get();

        /* Assert there are no selection vectors */
      assertTrue(wrap.getSv2() == null);

        /* Assert there is only one record */
        assertTrue(container.getRecordCount() == 1);

        /* Read the Integer value and ASSERT its Integer.MIN_VALUE */
        int value = (int) container.iterator().next().getValueVector().getAccessor().getObject(0);
        assertTrue(value == Integer.MIN_VALUE);
    }
View Full Code Here

  }


  /* Get batch meta info : rows, selectedRows, dataSize */
  private BatchMetaInfo getBatchMetaInfo(VectorAccessibleSerializable vcSerializable) {
    VectorAccessible vectorContainer = vcSerializable.get();

    int rows =0;
    int selectedRows = 0;
    int totalDataSize = 0;

    rows = vectorContainer.getRecordCount();
    selectedRows = rows;

    if (vectorContainer.getSchema().getSelectionVectorMode() == SelectionVectorMode.TWO_BYTE) {
      selectedRows = vcSerializable.getSv2().getCount();
    }

    for (VectorWrapper w : vectorContainer) {
       totalDataSize += w.getValueVector().getBufferSize();
View Full Code Here

    FSDataInputStream in = fs.open(path);
    VectorAccessibleSerializable newWrap = new VectorAccessibleSerializable(context.getAllocator());
    newWrap.readFromStream(in);
    fs.close();

    VectorAccessible newContainer = newWrap.get();
    for (VectorWrapper w : newContainer) {
      ValueVector vv = w.getValueVector();
      int values = vv.getAccessor().getValueCount();
      for (int i = 0; i < values; i++) {
        Object o = vv.getAccessor().getObject(i);
View Full Code Here

TOP

Related Classes of org.apache.drill.exec.record.VectorAccessible

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.