/** * Return the uncompressed size of this field */ public long getSerializedSize() { if (rawBytesField == null) { return 0; } return rawBytesField.getLength(); }
/** {@inheritDoc} */ @Override public int compareTo(BytesRefWritable other) { if (other == null) { throw new IllegalArgumentException("Argument can not be null."); } if (this == other) { return 0; } try { return WritableComparator.compareBytes(getData(), start, getLength(), other.getData(), other.start, other.getLength()); } catch (IOException e) { throw new RuntimeException(e); } }
/** * Print record to string builder * @param value * @param buf * @throws IOException */ private void printRecord(BytesRefArrayWritable value, StringBuilder buf) throws IOException { int n = value.size(); if (n > 0) { BytesRefWritable v = value.unCheckedGet(0); ByteBuffer bb = ByteBuffer.wrap(v.getData(), v.getStart(), v.getLength()); buf.append(decoder.decode(bb)); for (int i = 1; i < n; i++) { // do not put the TAB for the last column buf.append(RCFileCat.TAB); v = value.unCheckedGet(i); bb = ByteBuffer.wrap(v.getData(), v.getStart(), v.getLength()); buf.append(decoder.decode(bb)); } buf.append(RCFileCat.NEWLINE); } }
public void append(BytesRefWritable data) throws IOException { data.writeDataTo(columnValBuffer); int currentLen = data.getLength(); if (prevValueLength < 0) { startNewGroup(currentLen); return; } if (currentLen != prevValueLength) { flushGroup(); startNewGroup(currentLen); } else { runLength++; } }
public void append(BytesRefWritable data) throws IOException { data.writeDataTo(columnValBuffer); int currentLen = data.getLength(); if (prevValueLength < 0) { startNewGroup(currentLen); return; } if (currentLen != prevValueLength) { flushGroup(); startNewGroup(currentLen); } else { runLength++; } }
for (int i = 0; i < size; i++) { BytesRefWritable cu = columns.get(i); int plainLen = cu.getLength(); columnBufferSize += plainLen; columnValuePlainLength[i] += plainLen;
for (int i = 0; i < size; i++) { BytesRefWritable cu = columns.get(i); int plainLen = cu.getLength(); columnBufferSize += plainLen; columnValuePlainLength[i] += plainLen;
brw = result.get(row); int start = brw.getStart(); int len = brw.getLength(); byte[] actualData = Arrays.copyOfRange(brw.getData(), start, start + len); byte[] expectedData = (row == 0) ? record_1[col] : record_2[col];
/** * Return the uncompressed size of this field */ public long getSerializedSize() { if (rawBytesField == null) { return 0; } return rawBytesField.getLength(); }
/** * Return the uncompressed size of this field */ public long getSerializedSize() { if (rawBytesField == null) { return 0; } return rawBytesField.getLength(); }
/** * Return the uncompressed size of this field */ public long getSerializedSize() { if (rawBytesField == null) { return 0; } return rawBytesField.getLength(); }
/** * Return the uncompressed size of this field */ public long getSerializedSize() { if (rawBytesField == null) { return 0; } return rawBytesField.getLength(); }
/** {@inheritDoc} */ @Override public int compareTo(BytesRefWritable other) { if (other == null) { throw new IllegalArgumentException("Argument can not be null."); } if (this == other) { return 0; } try { return WritableComparator.compareBytes(getData(), start, getLength(), other.getData(), other.start, other.getLength()); } catch (IOException e) { throw new RuntimeException(e); } }
/** {@inheritDoc} */ @Override public int compareTo(BytesRefWritable other) { if (other == null) { throw new IllegalArgumentException("Argument can not be null."); } if (this == other) { return 0; } try { return WritableComparator.compareBytes(getData(), start, getLength(), other.getData(), other.start, other.getLength()); } catch (IOException e) { throw new RuntimeException(e); } }
/** {@inheritDoc} */ @Override public int compareTo(BytesRefWritable other) { if (other == null) { throw new IllegalArgumentException("Argument can not be null."); } if (this == other) { return 0; } try { return WritableComparator.compareBytes(getData(), start, getLength(), other.getData(), other.start, other.getLength()); } catch (IOException e) { throw new RuntimeException(e); } }
/** {@inheritDoc} */ @Override public int compareTo(BytesRefWritable other) { if (other == null) { throw new IllegalArgumentException("Argument can not be null."); } if (this == other) { return 0; } try { return WritableComparator.compareBytes(getData(), start, getLength(), other.getData(), other.start, other.getLength()); } catch (IOException e) { throw new RuntimeException(e); } }
public void append(BytesRefWritable data) throws IOException { data.writeDataTo(columnValBuffer); int currentLen = data.getLength(); if (prevValueLength < 0) { startNewGroup(currentLen); return; } if (currentLen != prevValueLength) { flushGroup(); startNewGroup(currentLen); } else { runLength++; } }
public void append(BytesRefWritable data) throws IOException { data.writeDataTo(columnValBuffer); int currentLen = data.getLength(); if (prevValueLength < 0) { startNewGroup(currentLen); return; } if (currentLen != prevValueLength) { flushGroup(); startNewGroup(currentLen); } else { runLength++; } }
public void append(BytesRefWritable data) throws IOException { data.writeDataTo(columnValBuffer); int currentLen = data.getLength(); if (prevValueLength < 0) { startNewGroup(currentLen); return; } if (currentLen != prevValueLength) { flushGroup(); startNewGroup(currentLen); } else { runLength++; } }