Skip to content

Commit c9ea8b2

Browse files
liyafan82kou
authored andcommitted
ARROW-13544 [Java]: Remove APIs that have been deprecated for long (Changes to ArrowBuf)
See https://issues.apache.org/jira/browse/ARROW-13544 According to the discussion in apache/arrow#10864 (comment), we want to split the task into multiple parts. This PR is for the changes related to `ArrowBuf` Closes #10901 from liyafan82/fly_0810_dep Authored-by: liyafan82 <fan_li_ya@foxmail.com> Signed-off-by: Micah Kornfield <emkornfield@gmail.com>
1 parent 89a596c commit c9ea8b2

File tree

2 files changed

+1
-44
lines changed

2 files changed

+1
-44
lines changed

memory/memory-core/src/main/java/org/apache/arrow/memory/ArrowBuf.java

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1195,51 +1195,8 @@ public ArrowBuf reallocIfNeeded(final long size) {
11951195
}
11961196
}
11971197

1198-
/**
1199-
* Following are wrapper methods to keep this backward compatible.
1200-
*/
1201-
@Deprecated
1202-
public void release() {
1203-
referenceManager.release();
1204-
}
1205-
1206-
@Deprecated
1207-
public void release(int decrement) {
1208-
referenceManager.release(decrement);
1209-
}
1210-
1211-
@Deprecated
1212-
public void retain() {
1213-
referenceManager.retain();
1214-
}
1215-
1216-
@Deprecated
1217-
public void retain(int increment) {
1218-
referenceManager.retain(increment);
1219-
}
1220-
1221-
@Deprecated
12221198
public ArrowBuf clear() {
12231199
this.readerIndex = this.writerIndex = 0;
12241200
return this;
12251201
}
1226-
1227-
/**
1228-
* Initialize the reader and writer index.
1229-
* @param readerIndex index to read from
1230-
* @param writerIndex index to write to
1231-
* @return this
1232-
*/
1233-
@Deprecated
1234-
public ArrowBuf setIndex(int readerIndex, int writerIndex) {
1235-
if (readerIndex >= 0 && readerIndex <= writerIndex && writerIndex <= this.capacity()) {
1236-
this.readerIndex = readerIndex;
1237-
this.writerIndex = writerIndex;
1238-
return this;
1239-
} else {
1240-
throw new IndexOutOfBoundsException(String.format("readerIndex: %d, writerIndex: %d " +
1241-
"(expected:0 <= readerIndex <= writerIndex <= capacity(%d))", readerIndex, writerIndex, this.capacity()));
1242-
}
1243-
}
1244-
12451202
}

vector/src/main/java/org/apache/arrow/vector/ipc/JsonFileWriter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ private void writeFromVectorIntoJson(Field field, FieldVector vector) throws IOE
232232
ArrowBuf vectorBufferTmp = vector.getAllocator().buffer(4);
233233
vectorBufferTmp.setInt(0, 0);
234234
writeValueToGenerator(bufferType, vectorBufferTmp, null, vector, i);
235-
vectorBufferTmp.release();
235+
vectorBufferTmp.close();
236236
} else {
237237
writeValueToGenerator(bufferType, vectorBuffer, null, vector, i);
238238
}

0 commit comments

Comments
 (0)