@@ -56,7 +56,7 @@ public final class ArrowBuf extends AbstractByteBuf implements AutoCloseable {
56
56
private final boolean isEmpty ;
57
57
private volatile int length ;
58
58
private final HistoricalLog historicalLog = BaseAllocator .DEBUG ?
59
- new HistoricalLog (BaseAllocator .DEBUG_LOG_LENGTH , "DrillBuf [%d]" , id ) : null ;
59
+ new HistoricalLog (BaseAllocator .DEBUG_LOG_LENGTH , "ArrowBuf [%d]" , id ) : null ;
60
60
61
61
public ArrowBuf (
62
62
final AtomicInteger refCnt ,
@@ -155,18 +155,18 @@ private void ensure(int width) {
155
155
}
156
156
157
157
/**
158
- * Create a new DrillBuf that is associated with an alternative allocator for the purposes of memory ownership and
159
- * accounting. This has no impact on the reference counting for the current DrillBuf except in the situation where the
158
+ * Create a new ArrowBuf that is associated with an alternative allocator for the purposes of memory ownership and
159
+ * accounting. This has no impact on the reference counting for the current ArrowBuf except in the situation where the
160
160
* passed in Allocator is the same as the current buffer.
161
161
*
162
- * This operation has no impact on the reference count of this DrillBuf . The newly created DrillBuf with either have a
162
+ * This operation has no impact on the reference count of this ArrowBuf . The newly created ArrowBuf with either have a
163
163
* reference count of 1 (in the case that this is the first time this memory is being associated with the new
164
164
* allocator) or the current value of the reference count + 1 for the other AllocationManager/BufferLedger combination
165
165
* in the case that the provided allocator already had an association to this underlying memory.
166
166
*
167
167
* @param target
168
168
* The target allocator to create an association with.
169
- * @return A new DrillBuf which shares the same underlying memory as this DrillBuf .
169
+ * @return A new ArrowBuf which shares the same underlying memory as this ArrowBuf .
170
170
*/
171
171
public ArrowBuf retain (BufferAllocator target ) {
172
172
@@ -178,17 +178,17 @@ public ArrowBuf retain(BufferAllocator target) {
178
178
historicalLog .recordEvent ("retain(%s)" , target .getName ());
179
179
}
180
180
final BufferLedger otherLedger = this .ledger .getLedgerForAllocator (target );
181
- return otherLedger .newDrillBuf (offset , length , null );
181
+ return otherLedger .newArrowBuf (offset , length , null );
182
182
}
183
183
184
184
/**
185
- * Transfer the memory accounting ownership of this DrillBuf to another allocator. This will generate a new DrillBuf
186
- * that carries an association with the underlying memory of this DrillBuf . If this DrillBuf is connected to the
185
+ * Transfer the memory accounting ownership of this ArrowBuf to another allocator. This will generate a new ArrowBuf
186
+ * that carries an association with the underlying memory of this ArrowBuf . If this ArrowBuf is connected to the
187
187
* owning BufferLedger of this memory, that memory ownership/accounting will be transferred to the taret allocator. If
188
- * this DrillBuf does not currently own the memory underlying it (and is only associated with it), this does not
189
- * transfer any ownership to the newly created DrillBuf .
188
+ * this ArrowBuf does not currently own the memory underlying it (and is only associated with it), this does not
189
+ * transfer any ownership to the newly created ArrowBuf .
190
190
*
191
- * This operation has no impact on the reference count of this DrillBuf . The newly created DrillBuf with either have a
191
+ * This operation has no impact on the reference count of this ArrowBuf . The newly created ArrowBuf with either have a
192
192
* reference count of 1 (in the case that this is the first time this memory is being associated with the new
193
193
* allocator) or the current value of the reference count for the other AllocationManager/BufferLedger combination in
194
194
* the case that the provided allocator already had an association to this underlying memory.
@@ -203,7 +203,7 @@ public ArrowBuf retain(BufferAllocator target) {
203
203
* @param target
204
204
* The allocator to transfer ownership to.
205
205
* @return A new transfer result with the impact of the transfer (whether it was overlimit) as well as the newly
206
- * created DrillBuf .
206
+ * created ArrowBuf .
207
207
*/
208
208
public TransferResult transferOwnership (BufferAllocator target ) {
209
209
@@ -212,7 +212,7 @@ public TransferResult transferOwnership(BufferAllocator target) {
212
212
}
213
213
214
214
final BufferLedger otherLedger = this .ledger .getLedgerForAllocator (target );
215
- final ArrowBuf newBuf = otherLedger .newDrillBuf (offset , length , null );
215
+ final ArrowBuf newBuf = otherLedger .newArrowBuf (offset , length , null );
216
216
final boolean allocationFit = this .ledger .transferBalance (otherLedger );
217
217
return new TransferResult (allocationFit , newBuf );
218
218
}
@@ -267,7 +267,7 @@ public boolean release(int decrement) {
267
267
268
268
if (refCnt < 0 ) {
269
269
throw new IllegalStateException (
270
- String .format ("DrillBuf [%d] refCnt has gone negative. Buffer Info: %s" , id , toVerboseString ()));
270
+ String .format ("ArrowBuf [%d] refCnt has gone negative. Buffer Info: %s" , id , toVerboseString ()));
271
271
}
272
272
273
273
return refCnt == 0 ;
@@ -370,7 +370,7 @@ public ArrowBuf slice(int index, int length) {
370
370
* Re the behavior of reference counting, see http://netty.io/wiki/reference-counted-objects.html#wiki-h3-5, which
371
371
* explains that derived buffers share their reference count with their parent
372
372
*/
373
- final ArrowBuf newBuf = ledger .newDrillBuf (offset + index , length );
373
+ final ArrowBuf newBuf = ledger .newArrowBuf (offset + index , length );
374
374
newBuf .writerIndex (length );
375
375
return newBuf ;
376
376
}
@@ -437,7 +437,7 @@ public long memoryAddress() {
437
437
438
438
@ Override
439
439
public String toString () {
440
- return String .format ("DrillBuf [%d], udle: [%d %d..%d]" , id , udle .id , offset , offset + capacity ());
440
+ return String .format ("ArrowBuf [%d], udle: [%d %d..%d]" , id , udle .id , offset , offset + capacity ());
441
441
}
442
442
443
443
@ Override
@@ -782,7 +782,7 @@ public void close() {
782
782
}
783
783
784
784
/**
785
- * Returns the possible memory consumed by this DrillBuf in the worse case scenario. (not shared, connected to larger
785
+ * Returns the possible memory consumed by this ArrowBuf in the worse case scenario. (not shared, connected to larger
786
786
* underlying buffer of allocated memory)
787
787
*
788
788
* @return Size in bytes.
@@ -833,7 +833,7 @@ public String toHexString(final int start, final int length) {
833
833
}
834
834
835
835
/**
836
- * Get the integer id assigned to this DrillBuf for debugging purposes.
836
+ * Get the integer id assigned to this ArrowBuf for debugging purposes.
837
837
*
838
838
* @return integer id
839
839
*/
0 commit comments