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

ASF GitHub Bot logged work on HDFS-15549:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 15/Jan/21 05:13
            Start Date: 15/Jan/21 05:13
    Worklog Time Spent: 10m 
      Work Description: LeonGao91 commented on a change in pull request #2583:
URL: https://github.com/apache/hadoop/pull/2583#discussion_r557866220



##########
File path: 
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/HardLink.java
##########
@@ -152,12 +152,23 @@ void setLinkCountCmdTemplate(String[] template) {
    * ****************************************************
    */
 
+  /**
+   * Creates a hardlink without creating parent folder.
+   * @param file - existing source file
+   * @param linkName - desired target link file
+   */
+  public static void createHardLink(File file, File linkName)
+      throws IOException {
+    createHardLink(file, linkName, false);
+  }
+
   /**
    * Creates a hardlink 
    * @param file - existing source file
    * @param linkName - desired target link file
+   * @param p - Whether we need to create parents if not exists.
    */
-  public static void createHardLink(File file, File linkName) 
+  public static void createHardLink(File file, File linkName, boolean p)

Review comment:
       Make sense, I can put a check before creating links.




----------------------------------------------------------------
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:
us...@infra.apache.org


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

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

> Improve DISK/ARCHIVE movement if they are on same filesystem
> ------------------------------------------------------------
>
>                 Key: HDFS-15549
>                 URL: https://issues.apache.org/jira/browse/HDFS-15549
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: datanode
>            Reporter: Leon Gao
>            Assignee: Leon Gao
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 2h
>  Remaining Estimate: 0h
>
> When moving blocks between DISK/ARCHIVE, we should prefer the volume on the 
> same underlying filesystem and use "rename" instead of "copy" to save IO.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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

Reply via email to