Apache9 commented on code in PR #6450: URL: https://github.com/apache/hbase/pull/6450#discussion_r1836818467
########## hbase-asyncfs/src/main/java/org/apache/hadoop/hbase/io/asyncfs/FanOutOneBlockAsyncDFSOutput.java: ########## @@ -354,10 +364,24 @@ private void setupReceiver(int timeoutMs) { } } + private static final String DUMMY_DFS_OUTPUT_STREAM_CLASS = + "org.apache.hadoop.hdfs.DummyDFSOutputStream"; + + private DFSOutputStream tryCreateDummyDFSOutputStream(EnumSet<CreateFlag> createFlags) { + try { + return (DFSOutputStream) Class.forName(DUMMY_DFS_OUTPUT_STREAM_CLASS).getConstructors()[0] + .newInstance(this, client, src, stat, createFlags, summer); + } catch (Exception e) { + LOG.debug("can not instantiate DummyDFSOutputStream, should be hadoop 2.x", e); Review Comment: We could have a try to safe the constructor so we do not need to do this everytime. -- 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. To unsubscribe, e-mail: issues-unsubscr...@hbase.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org