Skip to content

Commit

Permalink
[ADH-5385] Remove smart.action.copy.truncate.wait.ms option
Browse files Browse the repository at this point in the history
  • Loading branch information
tigrulya-exe committed Dec 4, 2024
1 parent d7b993e commit b97a828
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 24 deletions.
7 changes: 0 additions & 7 deletions conf/smart-default.xml
Original file line number Diff line number Diff line change
Expand Up @@ -760,11 +760,4 @@
</description>
</property>

<property>
<name>smart.action.copy.truncate.wait.ms</name>
<value>100</value>
<description>
The iteration time interval to wait for truncate operation completion.
</description>
</property>
</configuration>
Original file line number Diff line number Diff line change
Expand Up @@ -286,10 +286,6 @@ public class SmartConfKeys {
"smart.action.client.cache.ttl";
public static final String SMART_ACTION_CLIENT_CACHE_TTL_DEFAULT = "10m";

public static final String SMART_ACTION_COPY_TRUNCATE_WAIT_MS_KEY =
"smart.action.copy.truncate.wait.ms";
public static final long SMART_ACTION_COPY_TRUNCATE_WAIT_MS_DEFAULT = 100L;

public static final String ACCESS_EVENT_SOURCE_KEY = "smart.data.file.event.source";
public static final String ACCESS_EVENT_SOURCE_DEFAULT =
SmartServerAccessEventSource.class.getName();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@
import java.util.Optional;
import java.util.Set;

import static org.smartdata.conf.SmartConfKeys.SMART_ACTION_COPY_TRUNCATE_WAIT_MS_DEFAULT;
import static org.smartdata.conf.SmartConfKeys.SMART_ACTION_COPY_TRUNCATE_WAIT_MS_KEY;
import static org.smartdata.hdfs.action.CopyPreservedAttributesAction.PreserveAttribute.GROUP;
import static org.smartdata.hdfs.action.CopyPreservedAttributesAction.PreserveAttribute.OWNER;
import static org.smartdata.hdfs.action.CopyPreservedAttributesAction.PreserveAttribute.PERMISSIONS;
Expand Down Expand Up @@ -65,6 +63,7 @@ public class CopyFileAction extends CopyPreservedAttributesAction {
public static final String COPY_CONTENT = "-copyContent";
public static final String FORCE = "-force";
public static final String TRUNCATE_WAIT_MS = "-truncateWaitMs";
public static final long SMART_ACTION_COPY_TRUNCATE_WAIT_MS_DEFAULT = 100L;
public static final Set<PreserveAttribute> DEFAULT_PRESERVE_ATTRIBUTES
= Sets.newHashSet(OWNER, GROUP, PERMISSIONS);

Expand Down Expand Up @@ -111,10 +110,7 @@ public void init(Map<String, String> args) {

truncateWaitMs = Optional.ofNullable(args.get(TRUNCATE_WAIT_MS))
.map(Long::parseLong)
.orElseGet(() -> getContext()
.getConf()
.getLong(SMART_ACTION_COPY_TRUNCATE_WAIT_MS_KEY,
SMART_ACTION_COPY_TRUNCATE_WAIT_MS_DEFAULT));
.orElse(SMART_ACTION_COPY_TRUNCATE_WAIT_MS_DEFAULT);

fullCopyAppend = args.containsKey(FORCE);
}
Expand Down
7 changes: 0 additions & 7 deletions supports/tools/docker/multihost/conf/smart-default.xml
Original file line number Diff line number Diff line change
Expand Up @@ -685,11 +685,4 @@
</description>
</property>

<property>
<name>smart.action.copy.truncate.wait.ms</name>
<value>100</value>
<description>
The iteration time interval to wait for truncate operation completion.
</description>
</property>
</configuration>

0 comments on commit b97a828

Please sign in to comment.