[ 
https://issues.apache.org/jira/browse/HBASE-27670?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17696614#comment-17696614
 ] 

Hudson commented on HBASE-27670:
--------------------------------

Results for branch master
        [build #787 on 
builds.a.o|https://ci-hbase.apache.org/job/HBase%20Nightly/job/master/787/]: 
(/) *{color:green}+1 overall{color}*
----
details (if available):

(/) {color:green}+1 general checks{color}
-- For more information [see general 
report|https://ci-hbase.apache.org/job/HBase%20Nightly/job/master/787/General_20Nightly_20Build_20Report/]




(/) {color:green}+1 jdk8 hadoop3 checks{color}
-- For more information [see jdk8 (hadoop3) 
report|https://ci-hbase.apache.org/job/HBase%20Nightly/job/master/787/JDK8_20Nightly_20Build_20Report_20_28Hadoop3_29/]


(/) {color:green}+1 jdk11 hadoop3 checks{color}
-- For more information [see jdk11 
report|https://ci-hbase.apache.org/job/HBase%20Nightly/job/master/787/JDK11_20Nightly_20Build_20Report_20_28Hadoop3_29/]


(/) {color:green}+1 source release artifact{color}
-- See build output for details.


(/) {color:green}+1 client integration test{color}


> Improve FSUtils to directly obtain FSDataOutputStream
> -----------------------------------------------------
>
>                 Key: HBASE-27670
>                 URL: https://issues.apache.org/jira/browse/HBASE-27670
>             Project: HBase
>          Issue Type: Improvement
>          Components: Filesystem Integration
>         Environment: HBase version: 2.2.3
>            Reporter: alan.zhao
>            Assignee: alan.zhao
>            Priority: Major
>             Fix For: 2.6.0, 3.0.0-alpha-4, 2.4.17, 2.5.4
>
>
> hbase interacts with hdfs and obtains FSDataOutputStream to generate HFiles. 
> In order to support favoredNodes, reflection is used. The 
> DistributedFileSystem has a more direct way to get the FSDataOutputStream,for 
> example:dfs.createFile(path).permission(perm).create()...;  this API allows 
> you to set various parameters, including favoredNodes. I think avoiding 
> reflection can improve performance, and if you agree with me, I can optimize 
> this part of the code;
> Model:hbase-server
> class:FSUtils
>  
> {code:java}
> public static FSDataOutputStream create(Configuration conf, FileSystem fs, 
> Path path,
> FsPermission perm, InetSocketAddress[] favoredNodes) throws IOException {
> if (fs instanceof HFileSystem) {
> FileSystem backingFs = ((HFileSystem) fs).getBackingFs();
> if (backingFs instanceof DistributedFileSystem) {
> // Try to use the favoredNodes version via reflection to allow backwards-
> // compatibility.
> short replication = 
> Short.parseShort(conf.get(ColumnFamilyDescriptorBuilder.DFS_REPLICATION,
> String.valueOf(ColumnFamilyDescriptorBuilder.DEFAULT_DFS_REPLICATION)));
> try {
> return (FSDataOutputStream) (DistributedFileSystem.class
> .getDeclaredMethod("create", Path.class, FsPermission.class, boolean.class, 
> int.class,
> short.class, long.class, Progressable.class, InetSocketAddress[].class)
> .invoke(backingFs, path, perm, true, 
> CommonFSUtils.getDefaultBufferSize(backingFs),
> replication > 0 ? replication : 
> CommonFSUtils.getDefaultReplication(backingFs, path),
> CommonFSUtils.getDefaultBlockSize(backingFs, path), null, 
> favoredNodes));{code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to