[ 
https://issues.apache.org/jira/browse/HADOOP-17998?focusedWorklogId=683753&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-683753
 ]

ASF GitHub Bot logged work on HADOOP-17998:
-------------------------------------------

                Author: ASF GitHub Bot
            Created on: 19/Nov/21 02:48
            Start Date: 19/Nov/21 02:48
    Worklog Time Spent: 10m 
      Work Description: smarthanwang commented on a change in pull request 
#3645:
URL: https://github.com/apache/hadoop/pull/3645#discussion_r752825112



##########
File path: 
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/CopyCommandWithMultiThread.java
##########
@@ -0,0 +1,157 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.hadoop.fs.shell;
+
+import java.io.IOException;
+import java.util.LinkedList;
+import java.util.concurrent.ArrayBlockingQueue;
+import java.util.concurrent.ThreadPoolExecutor;
+import java.util.concurrent.TimeUnit;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import org.apache.hadoop.classification.VisibleForTesting;
+
+/**
+ * Abstract command to enable sub copy commands run with multi-thread.
+ */
+public abstract class CopyCommandWithMultiThread
+    extends CommandWithDestination {
+
+  private int threadCount = 1;
+  private ThreadPoolExecutor executor = null;
+  private int threadPoolQueueSize = DEFAULT_QUEUE_SIZE;
+
+  public static final int DEFAULT_QUEUE_SIZE = 1024;
+  public static final int MAX_THREAD_COUNT =
+      Runtime.getRuntime().availableProcessors() * 2;

Review comment:
       I agree with you, no limit is the best way. I set the limit just for 
keep same  with the original limit. I will cancel it.




-- 
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: common-issues-unsubscr...@hadoop.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 683753)
    Time Spent: 2h  (was: 1h 50m)

> Enable get command run with multi-thread
> ----------------------------------------
>
>                 Key: HADOOP-17998
>                 URL: https://issues.apache.org/jira/browse/HADOOP-17998
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: fs
>    Affects Versions: 3.3.1
>            Reporter: Chengwei Wang
>            Priority: Major
>              Labels: pull-request-available
>         Attachments: HADOOP-17998.001.patch, HADOOP-17998.002.patch
>
>          Time Spent: 2h
>  Remaining Estimate: 0h
>
> CopyFromLocal/Put is enabled to run with multi-thread with HDFS-11786 and 
> HADOOP-14698, and make put dirs or multiple files faster.
> So, It's necessary to enable get and copyToLocal command run with 
> multi-thread.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org

Reply via email to