openinx commented on a change in pull request #318: HBASE-22598 Deprecated the
hbase.ipc.server.reservoir.initial.buffer.…
URL: https://github.com/apache/hbase/pull/318#discussion_r294253616
##########
File path:
hbase-common/src/main/java/org/apache/hadoop/hbase/io/ByteBuffAllocator.java
##########
@@ -129,6 +145,13 @@
* @return ByteBuffAllocator to manage the byte buffers.
*/
public static ByteBuffAllocator create(Configuration conf, boolean
reservoirEnabled) {
+ if (conf.get(DEPRECATED_BUFFER_SIZE_KEY) != null
+ || conf.get(DEPRECATED_MAX_BUFFER_COUNT_KEY) != null) {
+ LOG.warn("The config keys {} and {} are deprecated now, instead please
use {} and {}. In "
+ + "future release we will remove the two deprecated configs.",
+ DEPRECATED_BUFFER_SIZE_KEY, DEPRECATED_MAX_BUFFER_COUNT_KEY,
BUFFER_SIZE_KEY,
+ MAX_BUFFER_COUNT_KEY);
+ }
int poolBufSize = conf.getInt(BUFFER_SIZE_KEY, DEFAULT_BUFFER_SIZE);
Review comment:
> Shouldn't we use conf.getInt(DEPRECATED_BUFFER_SIZE_KEY), and put in if
branch above?
No need to do that, because the Configuration#getInt have implement this
logic internal, you can see the code.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services