@@ -221,6 +221,18 @@ public void end(DFSClient client, long inodeId) {
221221 };
222222 }
223223
224+ private static FileCreator createFileCreator3_3 () throws NoSuchMethodException {
225+ Method createMethod = ClientProtocol .class .getMethod ("create" , String .class , FsPermission .class ,
226+ String .class , EnumSetWritable .class , boolean .class , short .class , long .class ,
227+ CryptoProtocolVersion [].class , String .class , String .class );
228+
229+ return (instance , src , masked , clientName , flag , createParent , replication , blockSize ,
230+ supportedVersions ) -> {
231+ return (HdfsFileStatus ) createMethod .invoke (instance , src , masked , clientName , flag ,
232+ createParent , replication , blockSize , supportedVersions , null , null );
233+ };
234+ }
235+
224236 private static FileCreator createFileCreator3 () throws NoSuchMethodException {
225237 Method createMethod = ClientProtocol .class .getMethod ("create" , String .class , FsPermission .class ,
226238 String .class , EnumSetWritable .class , boolean .class , short .class , long .class ,
@@ -246,6 +258,12 @@ private static FileCreator createFileCreator2() throws NoSuchMethodException {
246258 }
247259
248260 private static FileCreator createFileCreator () throws NoSuchMethodException {
261+ try {
262+ return createFileCreator3_3 ();
263+ } catch (NoSuchMethodException e ) {
264+ LOG .debug ("ClientProtocol::create wrong number of arguments, should be hadoop 3.2 or below" );
265+ }
266+
249267 try {
250268 return createFileCreator3 ();
251269 } catch (NoSuchMethodException e ) {
0 commit comments