diff --git common/src/java/org/apache/hadoop/hive/common/JavaUtils.java common/src/java/org/apache/hadoop/hive/common/JavaUtils.java index 7894ec101e..45abd2fb30 100644 --- common/src/java/org/apache/hadoop/hive/common/JavaUtils.java +++ common/src/java/org/apache/hadoop/hive/common/JavaUtils.java @@ -188,39 +188,26 @@ public static Long extractWriteId(Path file) { public static class IdPathFilter implements PathFilter { private String baseDirName, deltaDirName; - private final boolean isMatch, isIgnoreTemp, isDeltaPrefix; + private final boolean isDeltaPrefix; - public IdPathFilter(long writeId, int stmtId, boolean isMatch) { - this(writeId, stmtId, isMatch, false); - } - - public IdPathFilter(long writeId, int stmtId, boolean isMatch, boolean isIgnoreTemp) { + public IdPathFilter(long writeId, int stmtId) { String deltaDirName = null; deltaDirName = DELTA_PREFIX + "_" + String.format(DELTA_DIGITS, writeId) + "_" + - String.format(DELTA_DIGITS, writeId) + "_"; + String.format(DELTA_DIGITS, writeId); isDeltaPrefix = (stmtId < 0); if (!isDeltaPrefix) { - deltaDirName += String.format(STATEMENT_DIGITS, stmtId); + deltaDirName += "_" + String.format(STATEMENT_DIGITS, stmtId); } this.baseDirName = BASE_PREFIX + "_" + String.format(DELTA_DIGITS, writeId); this.deltaDirName = deltaDirName; - this.isMatch = isMatch; - this.isIgnoreTemp = isIgnoreTemp; } @Override public boolean accept(Path path) { String name = path.getName(); - if (name.equals(baseDirName) || (isDeltaPrefix && name.startsWith(deltaDirName)) - || (!isDeltaPrefix && name.equals(deltaDirName))) { - return isMatch; - } - if (isIgnoreTemp && name.length() > 0) { - char c = name.charAt(0); - if (c == '.' || c == '_') return false; // Regardless of isMatch, ignore this. - } - return !isMatch; + return name.equals(baseDirName) || (isDeltaPrefix && name.startsWith(deltaDirName)) + || (!isDeltaPrefix && name.equals(deltaDirName)); } } diff --git itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/history/TestHiveHistory.java itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/history/TestHiveHistory.java index 0168472bdc..9b50fd4f30 100644 --- itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/history/TestHiveHistory.java +++ itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/history/TestHiveHistory.java @@ -107,7 +107,7 @@ protected void setUp() { db.createTable(src, cols, null, TextInputFormat.class, IgnoreKeyTextOutputFormat.class); db.loadTable(hadoopDataFile[i], src, - LoadFileType.KEEP_EXISTING, false, false, false, false, null, 0); + LoadFileType.KEEP_EXISTING, false, false, false, false, null, 0, false); i++; } diff --git itests/src/test/resources/testconfiguration.properties itests/src/test/resources/testconfiguration.properties index d26f0ccb17..fa3880578b 100644 --- itests/src/test/resources/testconfiguration.properties +++ itests/src/test/resources/testconfiguration.properties @@ -583,6 +583,7 @@ minillaplocal.query.files=\ mapjoin_emit_interval.q,\ mergejoin_3way.q,\ mm_exim.q,\ + mm_loaddata.q,\ mrr.q,\ multiMapJoin1.q,\ multiMapJoin2.q,\ diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/MoveTask.java ql/src/java/org/apache/hadoop/hive/ql/exec/MoveTask.java index 6fff7e7421..dbda5fdef4 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/MoveTask.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/MoveTask.java @@ -372,7 +372,7 @@ public int execute(DriverContext driverContext) { } db.loadTable(tbd.getSourcePath(), tbd.getTable().getTableName(), tbd.getLoadFileType(), work.isSrcLocal(), isSkewedStoredAsDirs(tbd), isFullAcidOp, hasFollowingStatsTask(), - tbd.getWriteId(), tbd.getStmtId()); + tbd.getWriteId(), tbd.getStmtId(), tbd.isInsertOverwrite()); if (work.getOutputs() != null) { DDLTask.addIfAbsentByName(new WriteEntity(table, getWriteType(tbd, work.getLoadTableWork().getWriteType())), work.getOutputs()); @@ -467,12 +467,14 @@ private DataContainer handleStaticParts(Hive db, Table table, LoadTableDesc tbd, Utilities.FILE_OP_LOGGER.trace("loadPartition called from " + tbd.getSourcePath() + " into " + tbd.getTable().getTableName()); } - db.loadPartition(tbd.getSourcePath(), tbd.getTable().getTableName(), - tbd.getPartitionSpec(), tbd.getLoadFileType(), - tbd.getInheritTableSpecs(), isSkewedStoredAsDirs(tbd), work.isSrcLocal(), - work.getLoadTableWork().getWriteType() != AcidUtils.Operation.NOT_ACID && + + db.loadPartition(tbd.getSourcePath(), db.getTable(tbd.getTable().getTableName()), + tbd.getPartitionSpec(), tbd.getLoadFileType(), tbd.getInheritTableSpecs(), + isSkewedStoredAsDirs(tbd), work.isSrcLocal(), + work.getLoadTableWork().getWriteType() != AcidUtils.Operation.NOT_ACID && !tbd.isMmTable(), - hasFollowingStatsTask(), tbd.getWriteId(), tbd.getStmtId()); + hasFollowingStatsTask(), + tbd.getWriteId(), tbd.getStmtId(), tbd.isInsertOverwrite()); Partition partn = db.getPartition(table, tbd.getPartitionSpec(), false); // See the comment inside updatePartitionBucketSortColumns. diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/Utilities.java ql/src/java/org/apache/hadoop/hive/ql/exec/Utilities.java index 5fbe045df5..6395c31ec7 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/Utilities.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/Utilities.java @@ -4076,7 +4076,7 @@ private static void tryDelete(FileSystem fs, Path path) { Boolean isBaseDir) throws IOException { int skipLevels = dpLevels + lbLevels; if (filter == null) { - filter = new JavaUtils.IdPathFilter(writeId, stmtId, true, false); + filter = new JavaUtils.IdPathFilter(writeId, stmtId); } if (skipLevels == 0) { return statusToPath(fs.listStatus(path, filter)); @@ -4250,7 +4250,7 @@ public static void handleMmTableFinalPath(Path specPath, String unionSuffix, Con FileSystem fs = specPath.getFileSystem(hconf); Path manifestDir = getManifestDir(specPath, writeId, stmtId, unionSuffix, isInsertOverwrite); if (!success) { - JavaUtils.IdPathFilter filter = new JavaUtils.IdPathFilter(writeId, stmtId, true); + JavaUtils.IdPathFilter filter = new JavaUtils.IdPathFilter(writeId, stmtId); tryDeleteAllMmFiles(fs, specPath, manifestDir, dpLevels, lbLevels, filter, writeId, stmtId, hconf); return; @@ -4275,7 +4275,7 @@ public static void handleMmTableFinalPath(Path specPath, String unionSuffix, Con } Utilities.FILE_OP_LOGGER.debug("Looking for files in: {}", specPath); - JavaUtils.IdPathFilter filter = new JavaUtils.IdPathFilter(writeId, stmtId, true, false); + JavaUtils.IdPathFilter filter = new JavaUtils.IdPathFilter(writeId, stmtId); if (isMmCtas && !fs.exists(specPath)) { Utilities.FILE_OP_LOGGER.info("Creating table directory for CTAS with no output at {}", specPath); FileUtils.mkdir(fs, specPath, hconf); diff --git ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java index 009a890888..5729f6af37 100644 --- ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java +++ ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java @@ -1617,31 +1617,6 @@ public Database getDatabaseCurrent() throws HiveException { } /** - * @param loadPath - * @param tableName - * @param partSpec - * @param loadFileType - * @param inheritTableSpecs - * @param isSkewedStoreAsSubdir - * @param isSrcLocal - * @param isAcid - * @param hasFollowingStatsTask - * @param writeId - * @param stmtId - * @return - * @throws HiveException - */ - public void loadPartition(Path loadPath, String tableName, - Map partSpec, LoadFileType loadFileType, boolean inheritTableSpecs, - boolean isSkewedStoreAsSubdir, boolean isSrcLocal, boolean isAcid, - boolean hasFollowingStatsTask, Long writeId, int stmtId) - throws HiveException { - Table tbl = getTable(tableName); - loadPartition(loadPath, tbl, partSpec, loadFileType, inheritTableSpecs, - isSkewedStoreAsSubdir, isSrcLocal, isAcid, hasFollowingStatsTask, writeId, stmtId); - } - - /** * Load a directory into a Hive Table Partition - Alters existing content of * the partition with the contents of loadPath. - If the partition does not * exist - one is created - files in loadPath are moved into Hive. But the @@ -1666,16 +1641,18 @@ public void loadPartition(Path loadPath, String tableName, * true if there is a following task which updates the stats, so, this method need not update. * @param writeId write ID allocated for the current load operation * @param stmtId statement ID of the current load statement + * @param isInsertOverwrite * @return Partition object being loaded with data */ public Partition loadPartition(Path loadPath, Table tbl, Map partSpec, LoadFileType loadFileType, boolean inheritTableSpecs, boolean isSkewedStoreAsSubdir, - boolean isSrcLocal, boolean isAcidIUDoperation, boolean hasFollowingStatsTask, Long writeId, int stmtId) - throws HiveException { + boolean isSrcLocal, boolean isAcidIUDoperation, boolean hasFollowingStatsTask, Long writeId, + int stmtId, boolean isInsertOverwrite) throws HiveException { Path tblDataLocationPath = tbl.getDataLocation(); boolean isMmTableWrite = AcidUtils.isInsertOnlyTable(tbl.getParameters()); assert tbl.getPath() != null : "null==getPath() for " + tbl.getTableName(); boolean isFullAcidTable = AcidUtils.isFullAcidTable(tbl); + boolean isTxnTable = AcidUtils.isTransactionalTable(tbl); try { // Get the partition object if it already exists Partition oldPart = getPartition(tbl, partSpec, false); @@ -1742,35 +1719,31 @@ public Partition loadPartition(Path loadPath, Table tbl, Map par } } else { // Either a non-MM query, or a load into MM table from an external source. - PathFilter filter = FileUtils.HIDDEN_FILES_PATH_FILTER; Path destPath = newPartPath; if (isMmTableWrite) { - // We will load into MM directory, and delete from the parent if needed. - // TODO: this looks invalid after ACID integration. What about base dirs? - destPath = new Path(destPath, AcidUtils.deltaSubdir(writeId, writeId, stmtId)); - // TODO: loadFileType for MM table will no longer be REPLACE_ALL - filter = (loadFileType == LoadFileType.REPLACE_ALL) - ? new JavaUtils.IdPathFilter(writeId, stmtId, false, true) : filter; + assert !isAcidIUDoperation; + // We will load into MM directory, and hide previous directories if needed. + destPath = new Path(destPath, isInsertOverwrite + ? AcidUtils.baseDir(writeId) : AcidUtils.deltaSubdir(writeId, writeId, stmtId)); } - else if(!isAcidIUDoperation && isFullAcidTable) { + if (!isAcidIUDoperation && isFullAcidTable) { destPath = fixFullAcidPathForLoadData(loadFileType, destPath, writeId, stmtId, tbl); } if (Utilities.FILE_OP_LOGGER.isTraceEnabled()) { Utilities.FILE_OP_LOGGER.trace("moving " + loadPath + " to " + destPath); } - //todo: why is "&& !isAcidIUDoperation" needed here? - if (!isFullAcidTable && ((loadFileType == LoadFileType.REPLACE_ALL) || (oldPart == null && !isAcidIUDoperation))) { + // TODO: why is "&& !isAcidIUDoperation" needed here? + if (!isTxnTable && ((loadFileType == LoadFileType.REPLACE_ALL) || (oldPart == null && !isAcidIUDoperation))) { //for fullAcid tables we don't delete files for commands with OVERWRITE - we create a new // base_x. (there is Insert Overwrite and Load Data Overwrite) boolean isAutoPurge = "true".equalsIgnoreCase(tbl.getProperty("auto.purge")); - // TODO: this should never run for MM tables anymore. Remove the flag, and maybe the filter? - replaceFiles(tbl.getPath(), loadPath, destPath, oldPartPath, getConf(), - isSrcLocal, isAutoPurge, newFiles, filter, isMmTableWrite, !tbl.isTemporary()); + replaceFiles(tbl.getPath(), loadPath, destPath, oldPartPath, getConf(), isSrcLocal, + isAutoPurge, newFiles, FileUtils.HIDDEN_FILES_PATH_FILTER, !tbl.isTemporary()); } else { FileSystem fs = tbl.getDataLocation().getFileSystem(conf); copyFiles(conf, loadPath, destPath, fs, isSrcLocal, isAcidIUDoperation, - (loadFileType == LoadFileType.OVERWRITE_EXISTING), newFiles, tbl.getNumBuckets() > 0, - isFullAcidTable); + (loadFileType == LoadFileType.OVERWRITE_EXISTING), newFiles, + tbl.getNumBuckets() > 0, isFullAcidTable); } } perfLogger.PerfLogEnd("MoveTask", "FileMoves"); @@ -1814,7 +1787,7 @@ else if(!isAcidIUDoperation && isFullAcidTable) { } // Note: we are creating a brand new the partition, so this is going to be valid for ACID. List filesForStats = null; - if (isFullAcidTable || isMmTableWrite) { + if (isTxnTable) { filesForStats = AcidUtils.getAcidFilesForStats( newTPart.getTable(), newPartPath, conf, null); } else { @@ -2149,8 +2122,8 @@ private void constructOneLBLocationMap(FileStatus fSta, public Map, Partition> loadDynamicPartitions(final Path loadPath, final String tableName, final Map partSpec, final LoadFileType loadFileType, final int numDP, final int numLB, final boolean isAcid, final long writeId, final int stmtId, - final boolean hasFollowingStatsTask, final AcidUtils.Operation operation, boolean isInsertOverwrite) - throws HiveException { + final boolean hasFollowingStatsTask, final AcidUtils.Operation operation, + boolean isInsertOverwrite) throws HiveException { final Map, Partition> partitionsMap = Collections.synchronizedMap(new LinkedHashMap, Partition>()); @@ -2197,9 +2170,9 @@ public Void call() throws Exception { LOG.info("New loading path = " + partPath + " with partSpec " + fullPartSpec); // load the partition - Partition newPartition = loadPartition(partPath, tbl, fullPartSpec, - loadFileType, true, numLB > 0, - false, isAcid, hasFollowingStatsTask, writeId, stmtId); + Partition newPartition = loadPartition(partPath, tbl, fullPartSpec, loadFileType, + true, numLB > 0, false, isAcid, hasFollowingStatsTask, writeId, stmtId, + isInsertOverwrite); partitionsMap.put(fullPartSpec, newPartition); if (inPlaceEligible) { @@ -2290,13 +2263,15 @@ public Void call() throws Exception { * @param isAcidIUDoperation true if this is an ACID based Insert [overwrite]/update/delete * @param writeId write ID allocated for the current load operation * @param stmtId statement ID of the current load statement + * @param b */ public void loadTable(Path loadPath, String tableName, LoadFileType loadFileType, boolean isSrcLocal, boolean isSkewedStoreAsSubdir, boolean isAcidIUDoperation, boolean hasFollowingStatsTask, - Long writeId, int stmtId) throws HiveException { + Long writeId, int stmtId, boolean isInsertOverwrite) throws HiveException { List newFiles = null; Table tbl = getTable(tableName); assert tbl.getPath() != null : "null==getPath() for " + tbl.getTableName(); + boolean isTxnTable = AcidUtils.isTransactionalTable(tbl); boolean isMmTable = AcidUtils.isInsertOnlyTable(tbl); boolean isFullAcidTable = AcidUtils.isFullAcidTable(tbl); HiveConf sessionConf = SessionState.getSessionConf(); @@ -2320,34 +2295,28 @@ public void loadTable(Path loadPath, String tableName, LoadFileType loadFileType // Either a non-MM query, or a load into MM table from an external source. Path tblPath = tbl.getPath(); Path destPath = tblPath; - PathFilter filter = FileUtils.HIDDEN_FILES_PATH_FILTER; if (isMmTable) { assert !isAcidIUDoperation; - // We will load into MM directory, and delete from the parent if needed. - // TODO: this looks invalid after ACID integration. What about base dirs? - destPath = new Path(destPath, AcidUtils.deltaSubdir(writeId, writeId, stmtId)); - // TODO: loadFileType for MM table will no longer be REPLACE_ALL - filter = loadFileType == LoadFileType.REPLACE_ALL - ? new JavaUtils.IdPathFilter(writeId, stmtId, false, true) : filter; + // We will load into MM directory, and hide previous directories if needed. + destPath = new Path(destPath, isInsertOverwrite + ? AcidUtils.baseDir(writeId) : AcidUtils.deltaSubdir(writeId, writeId, stmtId)); } - else if(!isAcidIUDoperation && isFullAcidTable) { + if (!isAcidIUDoperation && isFullAcidTable) { destPath = fixFullAcidPathForLoadData(loadFileType, destPath, writeId, stmtId, tbl); } Utilities.FILE_OP_LOGGER.debug("moving " + loadPath + " to " + tblPath + " (replace = " + loadFileType + ")"); - if (loadFileType == LoadFileType.REPLACE_ALL && !isFullAcidTable) { + if (loadFileType == LoadFileType.REPLACE_ALL && !isTxnTable) { //for fullAcid we don't want to delete any files even for OVERWRITE see HIVE-14988/HIVE-17361 - //todo: should probably do the same for MM IOW boolean isAutopurge = "true".equalsIgnoreCase(tbl.getProperty("auto.purge")); - // TODO: this should never run for MM tables anymore. Remove the flag, and maybe the filter? - replaceFiles(tblPath, loadPath, destPath, tblPath, - sessionConf, isSrcLocal, isAutopurge, newFiles, filter, isMmTable?true:false, !tbl.isTemporary()); + replaceFiles(tblPath, loadPath, destPath, tblPath, sessionConf, isSrcLocal, isAutopurge, + newFiles, FileUtils.HIDDEN_FILES_PATH_FILTER, !tbl.isTemporary()); } else { try { FileSystem fs = tbl.getDataLocation().getFileSystem(sessionConf); copyFiles(sessionConf, loadPath, destPath, fs, isSrcLocal, isAcidIUDoperation, - loadFileType == LoadFileType.OVERWRITE_EXISTING, newFiles, - tbl.getNumBuckets() > 0 ? true : false, isFullAcidTable); + loadFileType == LoadFileType.OVERWRITE_EXISTING, newFiles, + tbl.getNumBuckets() > 0 ? true : false, isFullAcidTable); } catch (IOException e) { throw new HiveException("addFiles: filesystem error in check phase", e); } @@ -4007,7 +3976,7 @@ private static void moveAcidFiles(String deltaFileType, PathFilter pathFilter, F */ protected void replaceFiles(Path tablePath, Path srcf, Path destf, Path oldPath, HiveConf conf, boolean isSrcLocal, boolean purge, List newFiles, PathFilter deletePathFilter, - boolean isMmTableOverwrite, boolean isNeedRecycle) throws HiveException { + boolean isNeedRecycle) throws HiveException { try { FileSystem destFs = destf.getFileSystem(conf); @@ -4026,9 +3995,7 @@ protected void replaceFiles(Path tablePath, Path srcf, Path destf, Path oldPath, } if (oldPath != null) { - // Note: we assume lbLevels is 0 here. Same as old code for non-MM. - // For MM tables, this can only be a LOAD command. Does LOAD even support LB? - deleteOldPathForReplace(destf, oldPath, conf, purge, deletePathFilter, isMmTableOverwrite, 0, isNeedRecycle); + deleteOldPathForReplace(destf, oldPath, conf, purge, deletePathFilter, isNeedRecycle); } // first call FileUtils.mkdir to make sure that destf directory exists, if not, it creates @@ -4074,7 +4041,7 @@ protected void replaceFiles(Path tablePath, Path srcf, Path destf, Path oldPath, } private void deleteOldPathForReplace(Path destPath, Path oldPath, HiveConf conf, boolean purge, - PathFilter pathFilter, boolean isMmTableOverwrite, int lbLevels, boolean isNeedRecycle) throws HiveException { + PathFilter pathFilter, boolean isNeedRecycle) throws HiveException { Utilities.FILE_OP_LOGGER.debug("Deleting old paths for replace in " + destPath + " and old path " + oldPath); boolean isOldPathUnderDestf = false; @@ -4086,13 +4053,11 @@ private void deleteOldPathForReplace(Path destPath, Path oldPath, HiveConf conf, // But not sure why we changed not to delete the oldPath in HIVE-8750 if it is // not the destf or its subdir? isOldPathUnderDestf = isSubDir(oldPath, destPath, oldFs, destFs, false); - if (isOldPathUnderDestf || isMmTableOverwrite) { - if (lbLevels == 0 || !isMmTableOverwrite) { - cleanUpOneDirectoryForReplace(oldPath, oldFs, pathFilter, conf, purge, isNeedRecycle); - } + if (isOldPathUnderDestf) { + cleanUpOneDirectoryForReplace(oldPath, oldFs, pathFilter, conf, purge, isNeedRecycle); } } catch (IOException e) { - if (isOldPathUnderDestf || isMmTableOverwrite) { + if (isOldPathUnderDestf) { // if oldPath is a subdir of destf but it could not be cleaned throw new HiveException("Directory " + oldPath.toString() + " could not be cleaned up.", e); diff --git ql/src/java/org/apache/hadoop/hive/ql/parse/LoadSemanticAnalyzer.java ql/src/java/org/apache/hadoop/hive/ql/parse/LoadSemanticAnalyzer.java index df2098b0dd..cc231b292f 100644 --- ql/src/java/org/apache/hadoop/hive/ql/parse/LoadSemanticAnalyzer.java +++ ql/src/java/org/apache/hadoop/hive/ql/parse/LoadSemanticAnalyzer.java @@ -319,7 +319,6 @@ public void analyzeInternal(ASTNode ast) throws SemanticException { ensureFileFormatsMatch(ts, files, fromURI); } inputs.add(toReadEntity(new Path(fromURI))); - Task rTask = null; // create final load/move work @@ -355,7 +354,8 @@ public void analyzeInternal(ASTNode ast) throws SemanticException { Long writeId = null; int stmtId = -1; - if (AcidUtils.isTransactionalTable(ts.tableHandle)) { + boolean isTxnTable = AcidUtils.isTransactionalTable(ts.tableHandle); + if (isTxnTable) { try { writeId = getTxnMgr().getTableWriteId(ts.tableHandle.getDbName(), ts.tableHandle.getTableName()); @@ -368,10 +368,11 @@ public void analyzeInternal(ASTNode ast) throws SemanticException { // Note: this sets LoadFileType incorrectly for ACID; is that relevant for load? // See setLoadFileType and setIsAcidIow calls elsewhere for an example. LoadTableDesc loadTableWork = new LoadTableDesc(new Path(fromURI), - Utilities.getTableDesc(ts.tableHandle), partSpec, - isOverWrite ? LoadFileType.REPLACE_ALL : LoadFileType.KEEP_EXISTING, writeId); + Utilities.getTableDesc(ts.tableHandle), partSpec, (isOverWrite && !isTxnTable) + ? LoadFileType.REPLACE_ALL : LoadFileType.KEEP_EXISTING, writeId); loadTableWork.setStmtId(stmtId); - if (preservePartitionSpecs){ + loadTableWork.setInsertOverwrite(isOverWrite); + if (preservePartitionSpecs) { // Note : preservePartitionSpecs=true implies inheritTableSpecs=false but // but preservePartitionSpecs=false(default) here is not sufficient enough // info to set inheritTableSpecs=true @@ -382,13 +383,8 @@ public void analyzeInternal(ASTNode ast) throws SemanticException { new MoveWork(getInputs(), getOutputs(), loadTableWork, null, true, isLocal) ); - if (rTask != null) { - rTask.addDependentTask(childTask); - } else { - rTask = childTask; - } - rootTasks.add(rTask); + rootTasks.add(childTask); // The user asked for stats to be collected. // Some stats like number of rows require a scan of the data diff --git ql/src/test/org/apache/hadoop/hive/ql/exec/TestExecDriver.java ql/src/test/org/apache/hadoop/hive/ql/exec/TestExecDriver.java index b0dfc48165..e108684660 100644 --- ql/src/test/org/apache/hadoop/hive/ql/exec/TestExecDriver.java +++ ql/src/test/org/apache/hadoop/hive/ql/exec/TestExecDriver.java @@ -142,7 +142,7 @@ db.createTable(src, cols, null, TextInputFormat.class, HiveIgnoreKeyTextOutputFormat.class); db.loadTable(hadoopDataFile[i], src, LoadFileType.KEEP_EXISTING, - true, false, false, false, null, 0); + true, false, false, false, null, 0, false); i++; } diff --git ql/src/test/results/clientpositive/mm_loaddata.q.out ql/src/test/results/clientpositive/llap/mm_loaddata.q.out similarity index 100% rename from ql/src/test/results/clientpositive/mm_loaddata.q.out rename to ql/src/test/results/clientpositive/llap/mm_loaddata.q.out