aasha commented on a change in pull request #1529:
URL: https://github.com/apache/hive/pull/1529#discussion_r510112281
##########
File path: ql/src/java/org/apache/hadoop/hive/ql/exec/ReplCopyTask.java
##########
@@ -224,54 +220,19 @@ public String getName() {
}
- public static Task<?> getLoadCopyTask(ReplicationSpec replicationSpec, Path
srcPath, Path dstPath,
- HiveConf conf, boolean isAutoPurge,
boolean needRecycle,
- boolean readSourceAsFileList) {
- return getLoadCopyTask(replicationSpec, srcPath, dstPath, conf,
isAutoPurge, needRecycle,
- readSourceAsFileList, false);
- }
-
public static Task<?> getLoadCopyTask(ReplicationSpec replicationSpec, Path
srcPath, Path dstPath,
HiveConf conf, boolean isAutoPurge,
boolean needRecycle,
boolean readSourceAsFileList, String
dumpDirectory,
ReplicationMetricCollector
metricCollector) {
return getLoadCopyTask(replicationSpec, srcPath, dstPath, conf,
isAutoPurge, needRecycle,
- readSourceAsFileList, false, dumpDirectory, metricCollector);
+ readSourceAsFileList, false, true, dumpDirectory, metricCollector);
}
- private static Task<?> getLoadCopyTask(ReplicationSpec replicationSpec, Path
srcPath, Path dstPath,
- HiveConf conf, boolean isAutoPurge,
boolean needRecycle,
- boolean readSourceAsFileList,
- boolean overWrite) {
- Task<?> copyTask = null;
- LOG.debug("ReplCopyTask:getLoadCopyTask: {}=>{}", srcPath, dstPath);
- if ((replicationSpec != null) && replicationSpec.isInReplicationScope()){
- ReplCopyWork rcwork = new ReplCopyWork(srcPath, dstPath, false,
overWrite);
- rcwork.setReadSrcAsFilesList(readSourceAsFileList);
- if (replicationSpec.isReplace() &&
(conf.getBoolVar(REPL_ENABLE_MOVE_OPTIMIZATION))) {
- rcwork.setDeleteDestIfExist(true);
- rcwork.setAutoPurge(isAutoPurge);
- rcwork.setNeedRecycle(needRecycle);
- }
- // For replace case, duplicate check should not be done. The new base
directory will automatically make the older
- // data invisible. Doing duplicate check and ignoring copy will cause
consistency issue if there are multiple
- // replace events getting replayed in the first incremental load.
- rcwork.setCheckDuplicateCopy(replicationSpec.needDupCopyCheck() &&
!replicationSpec.isReplace());
- LOG.debug("ReplCopyTask:\trcwork");
- String distCpDoAsUser =
conf.getVar(HiveConf.ConfVars.HIVE_DISTCP_DOAS_USER);
- rcwork.setDistCpDoAsUser(distCpDoAsUser);
- copyTask = TaskFactory.get(rcwork, conf);
- } else {
- LOG.debug("ReplCopyTask:\tcwork");
- copyTask = TaskFactory.get(new CopyWork(srcPath, dstPath, false), conf);
- }
- return copyTask;
- }
private static Task<?> getLoadCopyTask(ReplicationSpec replicationSpec, Path
srcPath, Path dstPath,
HiveConf conf, boolean isAutoPurge,
boolean needRecycle,
boolean readSourceAsFileList,
- boolean overWrite,
+ boolean overWrite, boolean autoPurge,
Review comment:
renamed
----------------------------------------------------------------
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:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]