Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1195,51 +1195,8 @@ public ArrowBuf reallocIfNeeded(final long size) {
}
}

/**
* Following are wrapper methods to keep this backward compatible.
*/
@Deprecated
public void release() {
referenceManager.release();
}

@Deprecated
public void release(int decrement) {
referenceManager.release(decrement);
}

@Deprecated
public void retain() {
referenceManager.retain();
}

@Deprecated
public void retain(int increment) {
referenceManager.retain(increment);
}

@Deprecated
public ArrowBuf clear() {
this.readerIndex = this.writerIndex = 0;
return this;
}

/**
* Initialize the reader and writer index.
* @param readerIndex index to read from
* @param writerIndex index to write to
* @return this
*/
@Deprecated
public ArrowBuf setIndex(int readerIndex, int writerIndex) {
if (readerIndex >= 0 && readerIndex <= writerIndex && writerIndex <= this.capacity()) {
this.readerIndex = readerIndex;
this.writerIndex = writerIndex;
return this;
} else {
throw new IndexOutOfBoundsException(String.format("readerIndex: %d, writerIndex: %d " +
"(expected:0 <= readerIndex <= writerIndex <= capacity(%d))", readerIndex, writerIndex, this.capacity()));
}
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ private void writeFromVectorIntoJson(Field field, FieldVector vector) throws IOE
ArrowBuf vectorBufferTmp = vector.getAllocator().buffer(4);
vectorBufferTmp.setInt(0, 0);
writeValueToGenerator(bufferType, vectorBufferTmp, null, vector, i);
vectorBufferTmp.release();
vectorBufferTmp.close();
} else {
writeValueToGenerator(bufferType, vectorBuffer, null, vector, i);
}
Expand Down