[jira] [Commented] (HIVE-16143) Improve msck repair batching
[ https://issues.apache.org/jira/browse/HIVE-16143?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16307698#comment-16307698 ] Lefty Leverenz commented on HIVE-16143: --- Doc note: This adds *hive.msck.repair.batch.max.retries* and revises the description of *hive.msck.repair.batch.size* in release 2.4.0, so the wiki needs to be updated. * [Configuration Properties -- hive.msck.repair.batch.size | https://cwiki.apache.org/confluence/display/Hive/Configuration+Properties#ConfigurationProperties-hive.msck.repair.batch.size] * [Configuration Properties -- hive.msck.repair.batch.max.retries | https://cwiki.apache.org/confluence/display/Hive/Configuration+Properties#ConfigurationProperties-hive.msck.repair.batch.max.retries] (this link won't work until the parameter is documented) Added a TODOC2.4 label. (Please add your own TODOC labels and doc notes from now on. I no longer monitor Hive email for doc issues.) > Improve msck repair batching > > > Key: HIVE-16143 > URL: https://issues.apache.org/jira/browse/HIVE-16143 > Project: Hive > Issue Type: Improvement >Reporter: Vihang Karajgaonkar >Assignee: Vihang Karajgaonkar > Labels: TODOC2.4 > Fix For: 3.0.0, 2.4.0 > > Attachments: HIVE-16143.01.patch, HIVE-16143.02.patch, > HIVE-16143.03.patch, HIVE-16143.04.patch, HIVE-16143.05.patch, > HIVE-16143.06.patch, HIVE-16143.07.patch, HIVE-16143.08.patch, > HIVE-16143.09.patch, HIVE-16143.10-branch-2.patch, > HIVE-16143.10-branch-2.patch > > > Currently, the {{msck repair table}} command batches the number of partitions > created in the metastore using the config {{HIVE_MSCK_REPAIR_BATCH_SIZE}}. > Following snippet shows the batching logic. There can be couple of > improvements to this batching logic: > {noformat} > int batch_size = conf.getIntVar(ConfVars.HIVE_MSCK_REPAIR_BATCH_SIZE); > if (batch_size > 0 && partsNotInMs.size() > batch_size) { > int counter = 0; > for (CheckResult.PartitionResult part : partsNotInMs) { > counter++; > > apd.addPartition(Warehouse.makeSpecFromName(part.getPartitionName()), null); > repairOutput.add("Repair: Added partition to metastore " + > msckDesc.getTableName() > + ':' + part.getPartitionName()); > if (counter % batch_size == 0 || counter == > partsNotInMs.size()) { > db.createPartitions(apd); > apd = new AddPartitionDesc(table.getDbName(), > table.getTableName(), false); > } > } > } else { > for (CheckResult.PartitionResult part : partsNotInMs) { > > apd.addPartition(Warehouse.makeSpecFromName(part.getPartitionName()), null); > repairOutput.add("Repair: Added partition to metastore " + > msckDesc.getTableName() > + ':' + part.getPartitionName()); > } > db.createPartitions(apd); > } > } catch (Exception e) { > LOG.info("Could not bulk-add partitions to metastore; trying one by > one", e); > repairOutput.clear(); > msckAddPartitionsOneByOne(db, table, partsNotInMs, repairOutput); > } > {noformat} > 1. If the batch size is too aggressive the code falls back to adding > partitions one by one which is almost always very slow. It is easily possible > that users increase the batch size to higher value to make the command run > faster but end up with a worse performance because code falls back to adding > one by one. Users are then expected to determine the tuned value of batch > size which works well for their environment. I think the code could handle > this situation better by exponentially decaying the batch size instead of > falling back to one by one. > 2. The other issue with this implementation is if lets say first batch > succeeds and the second one fails, the code tries to add all the partitions > one by one irrespective of whether some of the were successfully added or > not. If we need to fall back to one by one we should atleast remove the ones > which we know for sure are already added successfully. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (HIVE-16143) Improve msck repair batching
[ https://issues.apache.org/jira/browse/HIVE-16143?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16191649#comment-16191649 ] Vihang Karajgaonkar commented on HIVE-16143: change merged to branch-2 as well. > Improve msck repair batching > > > Key: HIVE-16143 > URL: https://issues.apache.org/jira/browse/HIVE-16143 > Project: Hive > Issue Type: Improvement >Reporter: Vihang Karajgaonkar >Assignee: Vihang Karajgaonkar > Fix For: 3.0.0 > > Attachments: HIVE-16143.01.patch, HIVE-16143.02.patch, > HIVE-16143.03.patch, HIVE-16143.04.patch, HIVE-16143.05.patch, > HIVE-16143.06.patch, HIVE-16143.07.patch, HIVE-16143.08.patch, > HIVE-16143.09.patch, HIVE-16143.10-branch-2.patch, > HIVE-16143.10-branch-2.patch > > > Currently, the {{msck repair table}} command batches the number of partitions > created in the metastore using the config {{HIVE_MSCK_REPAIR_BATCH_SIZE}}. > Following snippet shows the batching logic. There can be couple of > improvements to this batching logic: > {noformat} > int batch_size = conf.getIntVar(ConfVars.HIVE_MSCK_REPAIR_BATCH_SIZE); > if (batch_size > 0 && partsNotInMs.size() > batch_size) { > int counter = 0; > for (CheckResult.PartitionResult part : partsNotInMs) { > counter++; > > apd.addPartition(Warehouse.makeSpecFromName(part.getPartitionName()), null); > repairOutput.add("Repair: Added partition to metastore " + > msckDesc.getTableName() > + ':' + part.getPartitionName()); > if (counter % batch_size == 0 || counter == > partsNotInMs.size()) { > db.createPartitions(apd); > apd = new AddPartitionDesc(table.getDbName(), > table.getTableName(), false); > } > } > } else { > for (CheckResult.PartitionResult part : partsNotInMs) { > > apd.addPartition(Warehouse.makeSpecFromName(part.getPartitionName()), null); > repairOutput.add("Repair: Added partition to metastore " + > msckDesc.getTableName() > + ':' + part.getPartitionName()); > } > db.createPartitions(apd); > } > } catch (Exception e) { > LOG.info("Could not bulk-add partitions to metastore; trying one by > one", e); > repairOutput.clear(); > msckAddPartitionsOneByOne(db, table, partsNotInMs, repairOutput); > } > {noformat} > 1. If the batch size is too aggressive the code falls back to adding > partitions one by one which is almost always very slow. It is easily possible > that users increase the batch size to higher value to make the command run > faster but end up with a worse performance because code falls back to adding > one by one. Users are then expected to determine the tuned value of batch > size which works well for their environment. I think the code could handle > this situation better by exponentially decaying the batch size instead of > falling back to one by one. > 2. The other issue with this implementation is if lets say first batch > succeeds and the second one fails, the code tries to add all the partitions > one by one irrespective of whether some of the were successfully added or > not. If we need to fall back to one by one we should atleast remove the ones > which we know for sure are already added successfully. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (HIVE-16143) Improve msck repair batching
[ https://issues.apache.org/jira/browse/HIVE-16143?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16011101#comment-16011101 ] Aihua Xu commented on HIVE-16143: - [~vihangk1] Patch pushed to master, but there is a build issue with branch-2. Can you provide a patch for branch-2? > Improve msck repair batching > > > Key: HIVE-16143 > URL: https://issues.apache.org/jira/browse/HIVE-16143 > Project: Hive > Issue Type: Improvement >Reporter: Vihang Karajgaonkar >Assignee: Vihang Karajgaonkar > Attachments: HIVE-16143.01.patch, HIVE-16143.02.patch, > HIVE-16143.03.patch, HIVE-16143.04.patch, HIVE-16143.05.patch, > HIVE-16143.06.patch, HIVE-16143.07.patch, HIVE-16143.08.patch, > HIVE-16143.09.patch > > > Currently, the {{msck repair table}} command batches the number of partitions > created in the metastore using the config {{HIVE_MSCK_REPAIR_BATCH_SIZE}}. > Following snippet shows the batching logic. There can be couple of > improvements to this batching logic: > {noformat} > int batch_size = conf.getIntVar(ConfVars.HIVE_MSCK_REPAIR_BATCH_SIZE); > if (batch_size > 0 && partsNotInMs.size() > batch_size) { > int counter = 0; > for (CheckResult.PartitionResult part : partsNotInMs) { > counter++; > > apd.addPartition(Warehouse.makeSpecFromName(part.getPartitionName()), null); > repairOutput.add("Repair: Added partition to metastore " + > msckDesc.getTableName() > + ':' + part.getPartitionName()); > if (counter % batch_size == 0 || counter == > partsNotInMs.size()) { > db.createPartitions(apd); > apd = new AddPartitionDesc(table.getDbName(), > table.getTableName(), false); > } > } > } else { > for (CheckResult.PartitionResult part : partsNotInMs) { > > apd.addPartition(Warehouse.makeSpecFromName(part.getPartitionName()), null); > repairOutput.add("Repair: Added partition to metastore " + > msckDesc.getTableName() > + ':' + part.getPartitionName()); > } > db.createPartitions(apd); > } > } catch (Exception e) { > LOG.info("Could not bulk-add partitions to metastore; trying one by > one", e); > repairOutput.clear(); > msckAddPartitionsOneByOne(db, table, partsNotInMs, repairOutput); > } > {noformat} > 1. If the batch size is too aggressive the code falls back to adding > partitions one by one which is almost always very slow. It is easily possible > that users increase the batch size to higher value to make the command run > faster but end up with a worse performance because code falls back to adding > one by one. Users are then expected to determine the tuned value of batch > size which works well for their environment. I think the code could handle > this situation better by exponentially decaying the batch size instead of > falling back to one by one. > 2. The other issue with this implementation is if lets say first batch > succeeds and the second one fails, the code tries to add all the partitions > one by one irrespective of whether some of the were successfully added or > not. If we need to fall back to one by one we should atleast remove the ones > which we know for sure are already added successfully. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (HIVE-16143) Improve msck repair batching
[ https://issues.apache.org/jira/browse/HIVE-16143?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16010973#comment-16010973 ] Vihang Karajgaonkar commented on HIVE-16143: Thanks for the review [~aihuaxu] [~stakiar] and [~leftylev]. Can we commit this patch in master and branch-2? > Improve msck repair batching > > > Key: HIVE-16143 > URL: https://issues.apache.org/jira/browse/HIVE-16143 > Project: Hive > Issue Type: Improvement >Reporter: Vihang Karajgaonkar >Assignee: Vihang Karajgaonkar > Attachments: HIVE-16143.01.patch, HIVE-16143.02.patch, > HIVE-16143.03.patch, HIVE-16143.04.patch, HIVE-16143.05.patch, > HIVE-16143.06.patch, HIVE-16143.07.patch, HIVE-16143.08.patch, > HIVE-16143.09.patch > > > Currently, the {{msck repair table}} command batches the number of partitions > created in the metastore using the config {{HIVE_MSCK_REPAIR_BATCH_SIZE}}. > Following snippet shows the batching logic. There can be couple of > improvements to this batching logic: > {noformat} > int batch_size = conf.getIntVar(ConfVars.HIVE_MSCK_REPAIR_BATCH_SIZE); > if (batch_size > 0 && partsNotInMs.size() > batch_size) { > int counter = 0; > for (CheckResult.PartitionResult part : partsNotInMs) { > counter++; > > apd.addPartition(Warehouse.makeSpecFromName(part.getPartitionName()), null); > repairOutput.add("Repair: Added partition to metastore " + > msckDesc.getTableName() > + ':' + part.getPartitionName()); > if (counter % batch_size == 0 || counter == > partsNotInMs.size()) { > db.createPartitions(apd); > apd = new AddPartitionDesc(table.getDbName(), > table.getTableName(), false); > } > } > } else { > for (CheckResult.PartitionResult part : partsNotInMs) { > > apd.addPartition(Warehouse.makeSpecFromName(part.getPartitionName()), null); > repairOutput.add("Repair: Added partition to metastore " + > msckDesc.getTableName() > + ':' + part.getPartitionName()); > } > db.createPartitions(apd); > } > } catch (Exception e) { > LOG.info("Could not bulk-add partitions to metastore; trying one by > one", e); > repairOutput.clear(); > msckAddPartitionsOneByOne(db, table, partsNotInMs, repairOutput); > } > {noformat} > 1. If the batch size is too aggressive the code falls back to adding > partitions one by one which is almost always very slow. It is easily possible > that users increase the batch size to higher value to make the command run > faster but end up with a worse performance because code falls back to adding > one by one. Users are then expected to determine the tuned value of batch > size which works well for their environment. I think the code could handle > this situation better by exponentially decaying the batch size instead of > falling back to one by one. > 2. The other issue with this implementation is if lets say first batch > succeeds and the second one fails, the code tries to add all the partitions > one by one irrespective of whether some of the were successfully added or > not. If we need to fall back to one by one we should atleast remove the ones > which we know for sure are already added successfully. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (HIVE-16143) Improve msck repair batching
[ https://issues.apache.org/jira/browse/HIVE-16143?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16009545#comment-16009545 ] Aihua Xu commented on HIVE-16143: - +1. The new patch looks good to me . > Improve msck repair batching > > > Key: HIVE-16143 > URL: https://issues.apache.org/jira/browse/HIVE-16143 > Project: Hive > Issue Type: Improvement >Reporter: Vihang Karajgaonkar >Assignee: Vihang Karajgaonkar > Attachments: HIVE-16143.01.patch, HIVE-16143.02.patch, > HIVE-16143.03.patch, HIVE-16143.04.patch, HIVE-16143.05.patch, > HIVE-16143.06.patch, HIVE-16143.07.patch, HIVE-16143.08.patch, > HIVE-16143.09.patch > > > Currently, the {{msck repair table}} command batches the number of partitions > created in the metastore using the config {{HIVE_MSCK_REPAIR_BATCH_SIZE}}. > Following snippet shows the batching logic. There can be couple of > improvements to this batching logic: > {noformat} > int batch_size = conf.getIntVar(ConfVars.HIVE_MSCK_REPAIR_BATCH_SIZE); > if (batch_size > 0 && partsNotInMs.size() > batch_size) { > int counter = 0; > for (CheckResult.PartitionResult part : partsNotInMs) { > counter++; > > apd.addPartition(Warehouse.makeSpecFromName(part.getPartitionName()), null); > repairOutput.add("Repair: Added partition to metastore " + > msckDesc.getTableName() > + ':' + part.getPartitionName()); > if (counter % batch_size == 0 || counter == > partsNotInMs.size()) { > db.createPartitions(apd); > apd = new AddPartitionDesc(table.getDbName(), > table.getTableName(), false); > } > } > } else { > for (CheckResult.PartitionResult part : partsNotInMs) { > > apd.addPartition(Warehouse.makeSpecFromName(part.getPartitionName()), null); > repairOutput.add("Repair: Added partition to metastore " + > msckDesc.getTableName() > + ':' + part.getPartitionName()); > } > db.createPartitions(apd); > } > } catch (Exception e) { > LOG.info("Could not bulk-add partitions to metastore; trying one by > one", e); > repairOutput.clear(); > msckAddPartitionsOneByOne(db, table, partsNotInMs, repairOutput); > } > {noformat} > 1. If the batch size is too aggressive the code falls back to adding > partitions one by one which is almost always very slow. It is easily possible > that users increase the batch size to higher value to make the command run > faster but end up with a worse performance because code falls back to adding > one by one. Users are then expected to determine the tuned value of batch > size which works well for their environment. I think the code could handle > this situation better by exponentially decaying the batch size instead of > falling back to one by one. > 2. The other issue with this implementation is if lets say first batch > succeeds and the second one fails, the code tries to add all the partitions > one by one irrespective of whether some of the were successfully added or > not. If we need to fall back to one by one we should atleast remove the ones > which we know for sure are already added successfully. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (HIVE-16143) Improve msck repair batching
[ https://issues.apache.org/jira/browse/HIVE-16143?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16009219#comment-16009219 ] Hive QA commented on HIVE-16143: Here are the results of testing the latest attachment: https://issues.apache.org/jira/secure/attachment/12867859/HIVE-16143.09.patch {color:green}SUCCESS:{color} +1 due to 9 test(s) being added or modified. {color:red}ERROR:{color} -1 due to 2 failed/errored test(s), 10714 tests executed *Failed tests:* {noformat} org.apache.hadoop.hive.cli.TestMiniLlapCliDriver.testCliDriver[table_nonprintable] (batchId=140) org.apache.hadoop.hive.cli.TestMiniLlapLocalCliDriver.testCliDriver[vector_if_expr] (batchId=144) {noformat} Test results: https://builds.apache.org/job/PreCommit-HIVE-Build/5245/testReport Console output: https://builds.apache.org/job/PreCommit-HIVE-Build/5245/console Test logs: http://104.198.109.242/logs/PreCommit-HIVE-Build-5245/ Messages: {noformat} Executing org.apache.hive.ptest.execution.TestCheckPhase Executing org.apache.hive.ptest.execution.PrepPhase Executing org.apache.hive.ptest.execution.ExecutionPhase Executing org.apache.hive.ptest.execution.ReportingPhase Tests exited with: TestsFailedException: 2 tests failed {noformat} This message is automatically generated. ATTACHMENT ID: 12867859 - PreCommit-HIVE-Build > Improve msck repair batching > > > Key: HIVE-16143 > URL: https://issues.apache.org/jira/browse/HIVE-16143 > Project: Hive > Issue Type: Improvement >Reporter: Vihang Karajgaonkar >Assignee: Vihang Karajgaonkar > Attachments: HIVE-16143.01.patch, HIVE-16143.02.patch, > HIVE-16143.03.patch, HIVE-16143.04.patch, HIVE-16143.05.patch, > HIVE-16143.06.patch, HIVE-16143.07.patch, HIVE-16143.08.patch, > HIVE-16143.09.patch > > > Currently, the {{msck repair table}} command batches the number of partitions > created in the metastore using the config {{HIVE_MSCK_REPAIR_BATCH_SIZE}}. > Following snippet shows the batching logic. There can be couple of > improvements to this batching logic: > {noformat} > int batch_size = conf.getIntVar(ConfVars.HIVE_MSCK_REPAIR_BATCH_SIZE); > if (batch_size > 0 && partsNotInMs.size() > batch_size) { > int counter = 0; > for (CheckResult.PartitionResult part : partsNotInMs) { > counter++; > > apd.addPartition(Warehouse.makeSpecFromName(part.getPartitionName()), null); > repairOutput.add("Repair: Added partition to metastore " + > msckDesc.getTableName() > + ':' + part.getPartitionName()); > if (counter % batch_size == 0 || counter == > partsNotInMs.size()) { > db.createPartitions(apd); > apd = new AddPartitionDesc(table.getDbName(), > table.getTableName(), false); > } > } > } else { > for (CheckResult.PartitionResult part : partsNotInMs) { > > apd.addPartition(Warehouse.makeSpecFromName(part.getPartitionName()), null); > repairOutput.add("Repair: Added partition to metastore " + > msckDesc.getTableName() > + ':' + part.getPartitionName()); > } > db.createPartitions(apd); > } > } catch (Exception e) { > LOG.info("Could not bulk-add partitions to metastore; trying one by > one", e); > repairOutput.clear(); > msckAddPartitionsOneByOne(db, table, partsNotInMs, repairOutput); > } > {noformat} > 1. If the batch size is too aggressive the code falls back to adding > partitions one by one which is almost always very slow. It is easily possible > that users increase the batch size to higher value to make the command run > faster but end up with a worse performance because code falls back to adding > one by one. Users are then expected to determine the tuned value of batch > size which works well for their environment. I think the code could handle > this situation better by exponentially decaying the batch size instead of > falling back to one by one. > 2. The other issue with this implementation is if lets say first batch > succeeds and the second one fails, the code tries to add all the partitions > one by one irrespective of whether some of the were successfully added or > not. If we need to fall back to one by one we should atleast remove the ones > which we know for sure are already added successfully. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (HIVE-16143) Improve msck repair batching
[ https://issues.apache.org/jira/browse/HIVE-16143?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16007566#comment-16007566 ] Lefty Leverenz commented on HIVE-16143: --- I left some minor doc comments on the review board. > Improve msck repair batching > > > Key: HIVE-16143 > URL: https://issues.apache.org/jira/browse/HIVE-16143 > Project: Hive > Issue Type: Improvement >Reporter: Vihang Karajgaonkar >Assignee: Vihang Karajgaonkar > Attachments: HIVE-16143.01.patch, HIVE-16143.02.patch, > HIVE-16143.03.patch, HIVE-16143.04.patch, HIVE-16143.05.patch, > HIVE-16143.06.patch, HIVE-16143.07.patch, HIVE-16143.08.patch > > > Currently, the {{msck repair table}} command batches the number of partitions > created in the metastore using the config {{HIVE_MSCK_REPAIR_BATCH_SIZE}}. > Following snippet shows the batching logic. There can be couple of > improvements to this batching logic: > {noformat} > int batch_size = conf.getIntVar(ConfVars.HIVE_MSCK_REPAIR_BATCH_SIZE); > if (batch_size > 0 && partsNotInMs.size() > batch_size) { > int counter = 0; > for (CheckResult.PartitionResult part : partsNotInMs) { > counter++; > > apd.addPartition(Warehouse.makeSpecFromName(part.getPartitionName()), null); > repairOutput.add("Repair: Added partition to metastore " + > msckDesc.getTableName() > + ':' + part.getPartitionName()); > if (counter % batch_size == 0 || counter == > partsNotInMs.size()) { > db.createPartitions(apd); > apd = new AddPartitionDesc(table.getDbName(), > table.getTableName(), false); > } > } > } else { > for (CheckResult.PartitionResult part : partsNotInMs) { > > apd.addPartition(Warehouse.makeSpecFromName(part.getPartitionName()), null); > repairOutput.add("Repair: Added partition to metastore " + > msckDesc.getTableName() > + ':' + part.getPartitionName()); > } > db.createPartitions(apd); > } > } catch (Exception e) { > LOG.info("Could not bulk-add partitions to metastore; trying one by > one", e); > repairOutput.clear(); > msckAddPartitionsOneByOne(db, table, partsNotInMs, repairOutput); > } > {noformat} > 1. If the batch size is too aggressive the code falls back to adding > partitions one by one which is almost always very slow. It is easily possible > that users increase the batch size to higher value to make the command run > faster but end up with a worse performance because code falls back to adding > one by one. Users are then expected to determine the tuned value of batch > size which works well for their environment. I think the code could handle > this situation better by exponentially decaying the batch size instead of > falling back to one by one. > 2. The other issue with this implementation is if lets say first batch > succeeds and the second one fails, the code tries to add all the partitions > one by one irrespective of whether some of the were successfully added or > not. If we need to fall back to one by one we should atleast remove the ones > which we know for sure are already added successfully. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (HIVE-16143) Improve msck repair batching
[ https://issues.apache.org/jira/browse/HIVE-16143?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16006259#comment-16006259 ] Hive QA commented on HIVE-16143: Here are the results of testing the latest attachment: https://issues.apache.org/jira/secure/attachment/12867471/HIVE-16143.08.patch {color:green}SUCCESS:{color} +1 due to 9 test(s) being added or modified. {color:red}ERROR:{color} -1 due to 2 failed/errored test(s), 10697 tests executed *Failed tests:* {noformat} org.apache.hadoop.hive.cli.TestMiniLlapCliDriver.testCliDriver[table_nonprintable] (batchId=140) org.apache.hadoop.hive.cli.TestMiniLlapLocalCliDriver.testCliDriver[vector_if_expr] (batchId=144) {noformat} Test results: https://builds.apache.org/job/PreCommit-HIVE-Build/5189/testReport Console output: https://builds.apache.org/job/PreCommit-HIVE-Build/5189/console Test logs: http://104.198.109.242/logs/PreCommit-HIVE-Build-5189/ Messages: {noformat} Executing org.apache.hive.ptest.execution.TestCheckPhase Executing org.apache.hive.ptest.execution.PrepPhase Executing org.apache.hive.ptest.execution.ExecutionPhase Executing org.apache.hive.ptest.execution.ReportingPhase Tests exited with: TestsFailedException: 2 tests failed {noformat} This message is automatically generated. ATTACHMENT ID: 12867471 - PreCommit-HIVE-Build > Improve msck repair batching > > > Key: HIVE-16143 > URL: https://issues.apache.org/jira/browse/HIVE-16143 > Project: Hive > Issue Type: Improvement >Reporter: Vihang Karajgaonkar >Assignee: Vihang Karajgaonkar > Attachments: HIVE-16143.01.patch, HIVE-16143.02.patch, > HIVE-16143.03.patch, HIVE-16143.04.patch, HIVE-16143.05.patch, > HIVE-16143.06.patch, HIVE-16143.07.patch, HIVE-16143.08.patch, > HIVE-16143.08.patch > > > Currently, the {{msck repair table}} command batches the number of partitions > created in the metastore using the config {{HIVE_MSCK_REPAIR_BATCH_SIZE}}. > Following snippet shows the batching logic. There can be couple of > improvements to this batching logic: > {noformat} > int batch_size = conf.getIntVar(ConfVars.HIVE_MSCK_REPAIR_BATCH_SIZE); > if (batch_size > 0 && partsNotInMs.size() > batch_size) { > int counter = 0; > for (CheckResult.PartitionResult part : partsNotInMs) { > counter++; > > apd.addPartition(Warehouse.makeSpecFromName(part.getPartitionName()), null); > repairOutput.add("Repair: Added partition to metastore " + > msckDesc.getTableName() > + ':' + part.getPartitionName()); > if (counter % batch_size == 0 || counter == > partsNotInMs.size()) { > db.createPartitions(apd); > apd = new AddPartitionDesc(table.getDbName(), > table.getTableName(), false); > } > } > } else { > for (CheckResult.PartitionResult part : partsNotInMs) { > > apd.addPartition(Warehouse.makeSpecFromName(part.getPartitionName()), null); > repairOutput.add("Repair: Added partition to metastore " + > msckDesc.getTableName() > + ':' + part.getPartitionName()); > } > db.createPartitions(apd); > } > } catch (Exception e) { > LOG.info("Could not bulk-add partitions to metastore; trying one by > one", e); > repairOutput.clear(); > msckAddPartitionsOneByOne(db, table, partsNotInMs, repairOutput); > } > {noformat} > 1. If the batch size is too aggressive the code falls back to adding > partitions one by one which is almost always very slow. It is easily possible > that users increase the batch size to higher value to make the command run > faster but end up with a worse performance because code falls back to adding > one by one. Users are then expected to determine the tuned value of batch > size which works well for their environment. I think the code could handle > this situation better by exponentially decaying the batch size instead of > falling back to one by one. > 2. The other issue with this implementation is if lets say first batch > succeeds and the second one fails, the code tries to add all the partitions > one by one irrespective of whether some of the were successfully added or > not. If we need to fall back to one by one we should atleast remove the ones > which we know for sure are already added successfully. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (HIVE-16143) Improve msck repair batching
[ https://issues.apache.org/jira/browse/HIVE-16143?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16005603#comment-16005603 ] Hive QA commented on HIVE-16143: Here are the results of testing the latest attachment: https://issues.apache.org/jira/secure/attachment/12867397/HIVE-16143.07.patch {color:green}SUCCESS:{color} +1 due to 9 test(s) being added or modified. {color:red}ERROR:{color} -1 due to 3 failed/errored test(s), 10680 tests executed *Failed tests:* {noformat} org.apache.hadoop.hive.cli.TestMiniLlapCliDriver.testCliDriver[table_nonprintable] (batchId=140) org.apache.hadoop.hive.cli.TestMiniLlapLocalCliDriver.testCliDriver[vector_if_expr] (batchId=144) org.apache.hadoop.hive.ql.exec.TestMsckCreatePartitionsInBatches.testZeroMaxRetries (batchId=272) {noformat} Test results: https://builds.apache.org/job/PreCommit-HIVE-Build/5175/testReport Console output: https://builds.apache.org/job/PreCommit-HIVE-Build/5175/console Test logs: http://104.198.109.242/logs/PreCommit-HIVE-Build-5175/ Messages: {noformat} Executing org.apache.hive.ptest.execution.TestCheckPhase Executing org.apache.hive.ptest.execution.PrepPhase Executing org.apache.hive.ptest.execution.ExecutionPhase Executing org.apache.hive.ptest.execution.ReportingPhase Tests exited with: TestsFailedException: 3 tests failed {noformat} This message is automatically generated. ATTACHMENT ID: 12867397 - PreCommit-HIVE-Build > Improve msck repair batching > > > Key: HIVE-16143 > URL: https://issues.apache.org/jira/browse/HIVE-16143 > Project: Hive > Issue Type: Improvement >Reporter: Vihang Karajgaonkar >Assignee: Vihang Karajgaonkar > Attachments: HIVE-16143.01.patch, HIVE-16143.02.patch, > HIVE-16143.03.patch, HIVE-16143.04.patch, HIVE-16143.05.patch, > HIVE-16143.06.patch, HIVE-16143.07.patch > > > Currently, the {{msck repair table}} command batches the number of partitions > created in the metastore using the config {{HIVE_MSCK_REPAIR_BATCH_SIZE}}. > Following snippet shows the batching logic. There can be couple of > improvements to this batching logic: > {noformat} > int batch_size = conf.getIntVar(ConfVars.HIVE_MSCK_REPAIR_BATCH_SIZE); > if (batch_size > 0 && partsNotInMs.size() > batch_size) { > int counter = 0; > for (CheckResult.PartitionResult part : partsNotInMs) { > counter++; > > apd.addPartition(Warehouse.makeSpecFromName(part.getPartitionName()), null); > repairOutput.add("Repair: Added partition to metastore " + > msckDesc.getTableName() > + ':' + part.getPartitionName()); > if (counter % batch_size == 0 || counter == > partsNotInMs.size()) { > db.createPartitions(apd); > apd = new AddPartitionDesc(table.getDbName(), > table.getTableName(), false); > } > } > } else { > for (CheckResult.PartitionResult part : partsNotInMs) { > > apd.addPartition(Warehouse.makeSpecFromName(part.getPartitionName()), null); > repairOutput.add("Repair: Added partition to metastore " + > msckDesc.getTableName() > + ':' + part.getPartitionName()); > } > db.createPartitions(apd); > } > } catch (Exception e) { > LOG.info("Could not bulk-add partitions to metastore; trying one by > one", e); > repairOutput.clear(); > msckAddPartitionsOneByOne(db, table, partsNotInMs, repairOutput); > } > {noformat} > 1. If the batch size is too aggressive the code falls back to adding > partitions one by one which is almost always very slow. It is easily possible > that users increase the batch size to higher value to make the command run > faster but end up with a worse performance because code falls back to adding > one by one. Users are then expected to determine the tuned value of batch > size which works well for their environment. I think the code could handle > this situation better by exponentially decaying the batch size instead of > falling back to one by one. > 2. The other issue with this implementation is if lets say first batch > succeeds and the second one fails, the code tries to add all the partitions > one by one irrespective of whether some of the were successfully added or > not. If we need to fall back to one by one we should atleast remove the ones > which we know for sure are already added successfully. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (HIVE-16143) Improve msck repair batching
[ https://issues.apache.org/jira/browse/HIVE-16143?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15994321#comment-15994321 ] Hive QA commented on HIVE-16143: Here are the results of testing the latest attachment: https://issues.apache.org/jira/secure/attachment/12866074/HIVE-16143.06.patch {color:green}SUCCESS:{color} +1 due to 9 test(s) being added or modified. {color:red}ERROR:{color} -1 due to 3 failed/errored test(s), 10650 tests executed *Failed tests:* {noformat} org.apache.hadoop.hive.cli.TestAccumuloCliDriver.testCliDriver[accumulo_index] (batchId=225) org.apache.hadoop.hive.cli.TestMiniLlapCliDriver.testCliDriver[table_nonprintable] (batchId=139) org.apache.hadoop.hive.cli.TestMiniLlapLocalCliDriver.testCliDriver[columnstats_part_coltype] (batchId=155) {noformat} Test results: https://builds.apache.org/job/PreCommit-HIVE-Build/5013/testReport Console output: https://builds.apache.org/job/PreCommit-HIVE-Build/5013/console Test logs: http://104.198.109.242/logs/PreCommit-HIVE-Build-5013/ Messages: {noformat} Executing org.apache.hive.ptest.execution.TestCheckPhase Executing org.apache.hive.ptest.execution.PrepPhase Executing org.apache.hive.ptest.execution.ExecutionPhase Executing org.apache.hive.ptest.execution.ReportingPhase Tests exited with: TestsFailedException: 3 tests failed {noformat} This message is automatically generated. ATTACHMENT ID: 12866074 - PreCommit-HIVE-Build > Improve msck repair batching > > > Key: HIVE-16143 > URL: https://issues.apache.org/jira/browse/HIVE-16143 > Project: Hive > Issue Type: Improvement >Reporter: Vihang Karajgaonkar >Assignee: Vihang Karajgaonkar > Attachments: HIVE-16143.01.patch, HIVE-16143.02.patch, > HIVE-16143.03.patch, HIVE-16143.04.patch, HIVE-16143.05.patch, > HIVE-16143.06.patch > > > Currently, the {{msck repair table}} command batches the number of partitions > created in the metastore using the config {{HIVE_MSCK_REPAIR_BATCH_SIZE}}. > Following snippet shows the batching logic. There can be couple of > improvements to this batching logic: > {noformat} > int batch_size = conf.getIntVar(ConfVars.HIVE_MSCK_REPAIR_BATCH_SIZE); > if (batch_size > 0 && partsNotInMs.size() > batch_size) { > int counter = 0; > for (CheckResult.PartitionResult part : partsNotInMs) { > counter++; > > apd.addPartition(Warehouse.makeSpecFromName(part.getPartitionName()), null); > repairOutput.add("Repair: Added partition to metastore " + > msckDesc.getTableName() > + ':' + part.getPartitionName()); > if (counter % batch_size == 0 || counter == > partsNotInMs.size()) { > db.createPartitions(apd); > apd = new AddPartitionDesc(table.getDbName(), > table.getTableName(), false); > } > } > } else { > for (CheckResult.PartitionResult part : partsNotInMs) { > > apd.addPartition(Warehouse.makeSpecFromName(part.getPartitionName()), null); > repairOutput.add("Repair: Added partition to metastore " + > msckDesc.getTableName() > + ':' + part.getPartitionName()); > } > db.createPartitions(apd); > } > } catch (Exception e) { > LOG.info("Could not bulk-add partitions to metastore; trying one by > one", e); > repairOutput.clear(); > msckAddPartitionsOneByOne(db, table, partsNotInMs, repairOutput); > } > {noformat} > 1. If the batch size is too aggressive the code falls back to adding > partitions one by one which is almost always very slow. It is easily possible > that users increase the batch size to higher value to make the command run > faster but end up with a worse performance because code falls back to adding > one by one. Users are then expected to determine the tuned value of batch > size which works well for their environment. I think the code could handle > this situation better by exponentially decaying the batch size instead of > falling back to one by one. > 2. The other issue with this implementation is if lets say first batch > succeeds and the second one fails, the code tries to add all the partitions > one by one irrespective of whether some of the were successfully added or > not. If we need to fall back to one by one we should atleast remove the ones > which we know for sure are already added successfully. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (HIVE-16143) Improve msck repair batching
[ https://issues.apache.org/jira/browse/HIVE-16143?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15994263#comment-15994263 ] Hive QA commented on HIVE-16143: Here are the results of testing the latest attachment: https://issues.apache.org/jira/secure/attachment/12866074/HIVE-16143.06.patch {color:green}SUCCESS:{color} +1 due to 9 test(s) being added or modified. {color:red}ERROR:{color} -1 due to 3 failed/errored test(s), 10650 tests executed *Failed tests:* {noformat} org.apache.hadoop.hive.cli.TestAccumuloCliDriver.testCliDriver[accumulo_index] (batchId=225) org.apache.hadoop.hive.cli.TestMiniLlapCliDriver.testCliDriver[table_nonprintable] (batchId=139) org.apache.hadoop.hive.cli.TestMiniLlapLocalCliDriver.testCliDriver[vector_join30] (batchId=148) {noformat} Test results: https://builds.apache.org/job/PreCommit-HIVE-Build/5011/testReport Console output: https://builds.apache.org/job/PreCommit-HIVE-Build/5011/console Test logs: http://104.198.109.242/logs/PreCommit-HIVE-Build-5011/ Messages: {noformat} Executing org.apache.hive.ptest.execution.TestCheckPhase Executing org.apache.hive.ptest.execution.PrepPhase Executing org.apache.hive.ptest.execution.ExecutionPhase Executing org.apache.hive.ptest.execution.ReportingPhase Tests exited with: TestsFailedException: 3 tests failed {noformat} This message is automatically generated. ATTACHMENT ID: 12866074 - PreCommit-HIVE-Build > Improve msck repair batching > > > Key: HIVE-16143 > URL: https://issues.apache.org/jira/browse/HIVE-16143 > Project: Hive > Issue Type: Improvement >Reporter: Vihang Karajgaonkar >Assignee: Vihang Karajgaonkar > Attachments: HIVE-16143.01.patch, HIVE-16143.02.patch, > HIVE-16143.03.patch, HIVE-16143.04.patch, HIVE-16143.05.patch, > HIVE-16143.06.patch > > > Currently, the {{msck repair table}} command batches the number of partitions > created in the metastore using the config {{HIVE_MSCK_REPAIR_BATCH_SIZE}}. > Following snippet shows the batching logic. There can be couple of > improvements to this batching logic: > {noformat} > int batch_size = conf.getIntVar(ConfVars.HIVE_MSCK_REPAIR_BATCH_SIZE); > if (batch_size > 0 && partsNotInMs.size() > batch_size) { > int counter = 0; > for (CheckResult.PartitionResult part : partsNotInMs) { > counter++; > > apd.addPartition(Warehouse.makeSpecFromName(part.getPartitionName()), null); > repairOutput.add("Repair: Added partition to metastore " + > msckDesc.getTableName() > + ':' + part.getPartitionName()); > if (counter % batch_size == 0 || counter == > partsNotInMs.size()) { > db.createPartitions(apd); > apd = new AddPartitionDesc(table.getDbName(), > table.getTableName(), false); > } > } > } else { > for (CheckResult.PartitionResult part : partsNotInMs) { > > apd.addPartition(Warehouse.makeSpecFromName(part.getPartitionName()), null); > repairOutput.add("Repair: Added partition to metastore " + > msckDesc.getTableName() > + ':' + part.getPartitionName()); > } > db.createPartitions(apd); > } > } catch (Exception e) { > LOG.info("Could not bulk-add partitions to metastore; trying one by > one", e); > repairOutput.clear(); > msckAddPartitionsOneByOne(db, table, partsNotInMs, repairOutput); > } > {noformat} > 1. If the batch size is too aggressive the code falls back to adding > partitions one by one which is almost always very slow. It is easily possible > that users increase the batch size to higher value to make the command run > faster but end up with a worse performance because code falls back to adding > one by one. Users are then expected to determine the tuned value of batch > size which works well for their environment. I think the code could handle > this situation better by exponentially decaying the batch size instead of > falling back to one by one. > 2. The other issue with this implementation is if lets say first batch > succeeds and the second one fails, the code tries to add all the partitions > one by one irrespective of whether some of the were successfully added or > not. If we need to fall back to one by one we should atleast remove the ones > which we know for sure are already added successfully. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (HIVE-16143) Improve msck repair batching
[ https://issues.apache.org/jira/browse/HIVE-16143?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15993905#comment-15993905 ] Vihang Karajgaonkar commented on HIVE-16143: [~spena] [~stakiar] Can you please review? > Improve msck repair batching > > > Key: HIVE-16143 > URL: https://issues.apache.org/jira/browse/HIVE-16143 > Project: Hive > Issue Type: Improvement >Reporter: Vihang Karajgaonkar >Assignee: Vihang Karajgaonkar > Attachments: HIVE-16143.01.patch, HIVE-16143.02.patch, > HIVE-16143.03.patch, HIVE-16143.04.patch, HIVE-16143.05.patch, > HIVE-16143.06.patch > > > Currently, the {{msck repair table}} command batches the number of partitions > created in the metastore using the config {{HIVE_MSCK_REPAIR_BATCH_SIZE}}. > Following snippet shows the batching logic. There can be couple of > improvements to this batching logic: > {noformat} > int batch_size = conf.getIntVar(ConfVars.HIVE_MSCK_REPAIR_BATCH_SIZE); > if (batch_size > 0 && partsNotInMs.size() > batch_size) { > int counter = 0; > for (CheckResult.PartitionResult part : partsNotInMs) { > counter++; > > apd.addPartition(Warehouse.makeSpecFromName(part.getPartitionName()), null); > repairOutput.add("Repair: Added partition to metastore " + > msckDesc.getTableName() > + ':' + part.getPartitionName()); > if (counter % batch_size == 0 || counter == > partsNotInMs.size()) { > db.createPartitions(apd); > apd = new AddPartitionDesc(table.getDbName(), > table.getTableName(), false); > } > } > } else { > for (CheckResult.PartitionResult part : partsNotInMs) { > > apd.addPartition(Warehouse.makeSpecFromName(part.getPartitionName()), null); > repairOutput.add("Repair: Added partition to metastore " + > msckDesc.getTableName() > + ':' + part.getPartitionName()); > } > db.createPartitions(apd); > } > } catch (Exception e) { > LOG.info("Could not bulk-add partitions to metastore; trying one by > one", e); > repairOutput.clear(); > msckAddPartitionsOneByOne(db, table, partsNotInMs, repairOutput); > } > {noformat} > 1. If the batch size is too aggressive the code falls back to adding > partitions one by one which is almost always very slow. It is easily possible > that users increase the batch size to higher value to make the command run > faster but end up with a worse performance because code falls back to adding > one by one. Users are then expected to determine the tuned value of batch > size which works well for their environment. I think the code could handle > this situation better by exponentially decaying the batch size instead of > falling back to one by one. > 2. The other issue with this implementation is if lets say first batch > succeeds and the second one fails, the code tries to add all the partitions > one by one irrespective of whether some of the were successfully added or > not. If we need to fall back to one by one we should atleast remove the ones > which we know for sure are already added successfully. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (HIVE-16143) Improve msck repair batching
[ https://issues.apache.org/jira/browse/HIVE-16143?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15991584#comment-15991584 ] Hive QA commented on HIVE-16143: Here are the results of testing the latest attachment: https://issues.apache.org/jira/secure/attachment/12865799/HIVE-16143.04.patch {color:green}SUCCESS:{color} +1 due to 2 test(s) being added or modified. {color:red}ERROR:{color} -1 due to 4 failed/errored test(s), 10640 tests executed *Failed tests:* {noformat} org.apache.hadoop.hive.cli.TestAccumuloCliDriver.testCliDriver[accumulo_index] (batchId=225) org.apache.hadoop.hive.cli.TestBlobstoreCliDriver.testCliDriver[create_like] (batchId=237) org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver[msck_repair_batchsize] (batchId=64) org.apache.hadoop.hive.cli.TestMiniLlapLocalCliDriver.testCliDriver[vector_if_expr] (batchId=143) {noformat} Test results: https://builds.apache.org/job/PreCommit-HIVE-Build/4966/testReport Console output: https://builds.apache.org/job/PreCommit-HIVE-Build/4966/console Test logs: http://104.198.109.242/logs/PreCommit-HIVE-Build-4966/ Messages: {noformat} Executing org.apache.hive.ptest.execution.TestCheckPhase Executing org.apache.hive.ptest.execution.PrepPhase Executing org.apache.hive.ptest.execution.ExecutionPhase Executing org.apache.hive.ptest.execution.ReportingPhase Tests exited with: TestsFailedException: 4 tests failed {noformat} This message is automatically generated. ATTACHMENT ID: 12865799 - PreCommit-HIVE-Build > Improve msck repair batching > > > Key: HIVE-16143 > URL: https://issues.apache.org/jira/browse/HIVE-16143 > Project: Hive > Issue Type: Improvement >Reporter: Vihang Karajgaonkar >Assignee: Vihang Karajgaonkar > Attachments: HIVE-16143.01.patch, HIVE-16143.02.patch, > HIVE-16143.03.patch, HIVE-16143.04.patch > > > Currently, the {{msck repair table}} command batches the number of partitions > created in the metastore using the config {{HIVE_MSCK_REPAIR_BATCH_SIZE}}. > Following snippet shows the batching logic. There can be couple of > improvements to this batching logic: > {noformat} > int batch_size = conf.getIntVar(ConfVars.HIVE_MSCK_REPAIR_BATCH_SIZE); > if (batch_size > 0 && partsNotInMs.size() > batch_size) { > int counter = 0; > for (CheckResult.PartitionResult part : partsNotInMs) { > counter++; > > apd.addPartition(Warehouse.makeSpecFromName(part.getPartitionName()), null); > repairOutput.add("Repair: Added partition to metastore " + > msckDesc.getTableName() > + ':' + part.getPartitionName()); > if (counter % batch_size == 0 || counter == > partsNotInMs.size()) { > db.createPartitions(apd); > apd = new AddPartitionDesc(table.getDbName(), > table.getTableName(), false); > } > } > } else { > for (CheckResult.PartitionResult part : partsNotInMs) { > > apd.addPartition(Warehouse.makeSpecFromName(part.getPartitionName()), null); > repairOutput.add("Repair: Added partition to metastore " + > msckDesc.getTableName() > + ':' + part.getPartitionName()); > } > db.createPartitions(apd); > } > } catch (Exception e) { > LOG.info("Could not bulk-add partitions to metastore; trying one by > one", e); > repairOutput.clear(); > msckAddPartitionsOneByOne(db, table, partsNotInMs, repairOutput); > } > {noformat} > 1. If the batch size is too aggressive the code falls back to adding > partitions one by one which is almost always very slow. It is easily possible > that users increase the batch size to higher value to make the command run > faster but end up with a worse performance because code falls back to adding > one by one. Users are then expected to determine the tuned value of batch > size which works well for their environment. I think the code could handle > this situation better by exponentially decaying the batch size instead of > falling back to one by one. > 2. The other issue with this implementation is if lets say first batch > succeeds and the second one fails, the code tries to add all the partitions > one by one irrespective of whether some of the were successfully added or > not. If we need to fall back to one by one we should atleast remove the ones > which we know for sure are already added successfully. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (HIVE-16143) Improve msck repair batching
[ https://issues.apache.org/jira/browse/HIVE-16143?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15989862#comment-15989862 ] Hive QA commented on HIVE-16143: Here are the results of testing the latest attachment: https://issues.apache.org/jira/secure/attachment/12865599/HIVE-16143.03.patch {color:green}SUCCESS:{color} +1 due to 2 test(s) being added or modified. {color:red}ERROR:{color} -1 due to 5 failed/errored test(s), 10647 tests executed *Failed tests:* {noformat} org.apache.hadoop.hive.cli.TestAccumuloCliDriver.testCliDriver[accumulo_index] (batchId=225) org.apache.hadoop.hive.cli.TestBlobstoreCliDriver.testCliDriver[create_like] (batchId=237) org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver[msck_repair_batchsize] (batchId=64) org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver[repair] (batchId=32) org.apache.hadoop.hive.cli.TestMiniLlapLocalCliDriver.testCliDriver[vector_if_expr] (batchId=143) {noformat} Test results: https://builds.apache.org/job/PreCommit-HIVE-Build/4943/testReport Console output: https://builds.apache.org/job/PreCommit-HIVE-Build/4943/console Test logs: http://104.198.109.242/logs/PreCommit-HIVE-Build-4943/ Messages: {noformat} Executing org.apache.hive.ptest.execution.TestCheckPhase Executing org.apache.hive.ptest.execution.PrepPhase Executing org.apache.hive.ptest.execution.ExecutionPhase Executing org.apache.hive.ptest.execution.ReportingPhase Tests exited with: TestsFailedException: 5 tests failed {noformat} This message is automatically generated. ATTACHMENT ID: 12865599 - PreCommit-HIVE-Build > Improve msck repair batching > > > Key: HIVE-16143 > URL: https://issues.apache.org/jira/browse/HIVE-16143 > Project: Hive > Issue Type: Improvement >Reporter: Vihang Karajgaonkar >Assignee: Vihang Karajgaonkar > Attachments: HIVE-16143.01.patch, HIVE-16143.02.patch, > HIVE-16143.03.patch > > > Currently, the {{msck repair table}} command batches the number of partitions > created in the metastore using the config {{HIVE_MSCK_REPAIR_BATCH_SIZE}}. > Following snippet shows the batching logic. There can be couple of > improvements to this batching logic: > {noformat} > int batch_size = conf.getIntVar(ConfVars.HIVE_MSCK_REPAIR_BATCH_SIZE); > if (batch_size > 0 && partsNotInMs.size() > batch_size) { > int counter = 0; > for (CheckResult.PartitionResult part : partsNotInMs) { > counter++; > > apd.addPartition(Warehouse.makeSpecFromName(part.getPartitionName()), null); > repairOutput.add("Repair: Added partition to metastore " + > msckDesc.getTableName() > + ':' + part.getPartitionName()); > if (counter % batch_size == 0 || counter == > partsNotInMs.size()) { > db.createPartitions(apd); > apd = new AddPartitionDesc(table.getDbName(), > table.getTableName(), false); > } > } > } else { > for (CheckResult.PartitionResult part : partsNotInMs) { > > apd.addPartition(Warehouse.makeSpecFromName(part.getPartitionName()), null); > repairOutput.add("Repair: Added partition to metastore " + > msckDesc.getTableName() > + ':' + part.getPartitionName()); > } > db.createPartitions(apd); > } > } catch (Exception e) { > LOG.info("Could not bulk-add partitions to metastore; trying one by > one", e); > repairOutput.clear(); > msckAddPartitionsOneByOne(db, table, partsNotInMs, repairOutput); > } > {noformat} > 1. If the batch size is too aggressive the code falls back to adding > partitions one by one which is almost always very slow. It is easily possible > that users increase the batch size to higher value to make the command run > faster but end up with a worse performance because code falls back to adding > one by one. Users are then expected to determine the tuned value of batch > size which works well for their environment. I think the code could handle > this situation better by exponentially decaying the batch size instead of > falling back to one by one. > 2. The other issue with this implementation is if lets say first batch > succeeds and the second one fails, the code tries to add all the partitions > one by one irrespective of whether some of the were successfully added or > not. If we need to fall back to one by one we should atleast remove the ones > which we know for sure are already added successfully. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (HIVE-16143) Improve msck repair batching
[ https://issues.apache.org/jira/browse/HIVE-16143?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15989827#comment-15989827 ] Hive QA commented on HIVE-16143: Here are the results of testing the latest attachment: https://issues.apache.org/jira/secure/attachment/12865599/HIVE-16143.03.patch {color:green}SUCCESS:{color} +1 due to 2 test(s) being added or modified. {color:red}ERROR:{color} -1 due to 4 failed/errored test(s), 10647 tests executed *Failed tests:* {noformat} org.apache.hadoop.hive.cli.TestAccumuloCliDriver.testCliDriver[accumulo_index] (batchId=225) org.apache.hadoop.hive.cli.TestBlobstoreCliDriver.testCliDriver[create_like] (batchId=237) org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver[msck_repair_batchsize] (batchId=64) org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver[repair] (batchId=32) {noformat} Test results: https://builds.apache.org/job/PreCommit-HIVE-Build/4939/testReport Console output: https://builds.apache.org/job/PreCommit-HIVE-Build/4939/console Test logs: http://104.198.109.242/logs/PreCommit-HIVE-Build-4939/ Messages: {noformat} Executing org.apache.hive.ptest.execution.TestCheckPhase Executing org.apache.hive.ptest.execution.PrepPhase Executing org.apache.hive.ptest.execution.ExecutionPhase Executing org.apache.hive.ptest.execution.ReportingPhase Tests exited with: TestsFailedException: 4 tests failed {noformat} This message is automatically generated. ATTACHMENT ID: 12865599 - PreCommit-HIVE-Build > Improve msck repair batching > > > Key: HIVE-16143 > URL: https://issues.apache.org/jira/browse/HIVE-16143 > Project: Hive > Issue Type: Improvement >Reporter: Vihang Karajgaonkar >Assignee: Vihang Karajgaonkar > Attachments: HIVE-16143.01.patch, HIVE-16143.02.patch, > HIVE-16143.03.patch > > > Currently, the {{msck repair table}} command batches the number of partitions > created in the metastore using the config {{HIVE_MSCK_REPAIR_BATCH_SIZE}}. > Following snippet shows the batching logic. There can be couple of > improvements to this batching logic: > {noformat} > int batch_size = conf.getIntVar(ConfVars.HIVE_MSCK_REPAIR_BATCH_SIZE); > if (batch_size > 0 && partsNotInMs.size() > batch_size) { > int counter = 0; > for (CheckResult.PartitionResult part : partsNotInMs) { > counter++; > > apd.addPartition(Warehouse.makeSpecFromName(part.getPartitionName()), null); > repairOutput.add("Repair: Added partition to metastore " + > msckDesc.getTableName() > + ':' + part.getPartitionName()); > if (counter % batch_size == 0 || counter == > partsNotInMs.size()) { > db.createPartitions(apd); > apd = new AddPartitionDesc(table.getDbName(), > table.getTableName(), false); > } > } > } else { > for (CheckResult.PartitionResult part : partsNotInMs) { > > apd.addPartition(Warehouse.makeSpecFromName(part.getPartitionName()), null); > repairOutput.add("Repair: Added partition to metastore " + > msckDesc.getTableName() > + ':' + part.getPartitionName()); > } > db.createPartitions(apd); > } > } catch (Exception e) { > LOG.info("Could not bulk-add partitions to metastore; trying one by > one", e); > repairOutput.clear(); > msckAddPartitionsOneByOne(db, table, partsNotInMs, repairOutput); > } > {noformat} > 1. If the batch size is too aggressive the code falls back to adding > partitions one by one which is almost always very slow. It is easily possible > that users increase the batch size to higher value to make the command run > faster but end up with a worse performance because code falls back to adding > one by one. Users are then expected to determine the tuned value of batch > size which works well for their environment. I think the code could handle > this situation better by exponentially decaying the batch size instead of > falling back to one by one. > 2. The other issue with this implementation is if lets say first batch > succeeds and the second one fails, the code tries to add all the partitions > one by one irrespective of whether some of the were successfully added or > not. If we need to fall back to one by one we should atleast remove the ones > which we know for sure are already added successfully. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (HIVE-16143) Improve msck repair batching
[ https://issues.apache.org/jira/browse/HIVE-16143?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15988629#comment-15988629 ] Hive QA commented on HIVE-16143: Here are the results of testing the latest attachment: https://issues.apache.org/jira/secure/attachment/12865438/HIVE-16143.01.patch {color:green}SUCCESS:{color} +1 due to 2 test(s) being added or modified. {color:red}ERROR:{color} -1 due to 9 failed/errored test(s), 10647 tests executed *Failed tests:* {noformat} org.apache.hadoop.hive.cli.TestAccumuloCliDriver.testCliDriver[accumulo_index] (batchId=225) org.apache.hadoop.hive.cli.TestBlobstoreCliDriver.testCliDriver[create_like] (batchId=237) org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver[msck_repair_0] (batchId=75) org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver[msck_repair_1] (batchId=76) org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver[msck_repair_2] (batchId=56) org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver[msck_repair_3] (batchId=39) org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver[msck_repair_batchsize] (batchId=64) org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver[repair] (batchId=32) org.apache.hadoop.hive.cli.TestMiniLlapLocalCliDriver.testCliDriver[vector_if_expr] (batchId=143) {noformat} Test results: https://builds.apache.org/job/PreCommit-HIVE-Build/4917/testReport Console output: https://builds.apache.org/job/PreCommit-HIVE-Build/4917/console Test logs: http://104.198.109.242/logs/PreCommit-HIVE-Build-4917/ Messages: {noformat} Executing org.apache.hive.ptest.execution.TestCheckPhase Executing org.apache.hive.ptest.execution.PrepPhase Executing org.apache.hive.ptest.execution.ExecutionPhase Executing org.apache.hive.ptest.execution.ReportingPhase Tests exited with: TestsFailedException: 9 tests failed {noformat} This message is automatically generated. ATTACHMENT ID: 12865438 - PreCommit-HIVE-Build > Improve msck repair batching > > > Key: HIVE-16143 > URL: https://issues.apache.org/jira/browse/HIVE-16143 > Project: Hive > Issue Type: Improvement >Reporter: Vihang Karajgaonkar >Assignee: Vihang Karajgaonkar > Attachments: HIVE-16143.01.patch > > > Currently, the {{msck repair table}} command batches the number of partitions > created in the metastore using the config {{HIVE_MSCK_REPAIR_BATCH_SIZE}}. > Following snippet shows the batching logic. There can be couple of > improvements to this batching logic: > {noformat} > int batch_size = conf.getIntVar(ConfVars.HIVE_MSCK_REPAIR_BATCH_SIZE); > if (batch_size > 0 && partsNotInMs.size() > batch_size) { > int counter = 0; > for (CheckResult.PartitionResult part : partsNotInMs) { > counter++; > > apd.addPartition(Warehouse.makeSpecFromName(part.getPartitionName()), null); > repairOutput.add("Repair: Added partition to metastore " + > msckDesc.getTableName() > + ':' + part.getPartitionName()); > if (counter % batch_size == 0 || counter == > partsNotInMs.size()) { > db.createPartitions(apd); > apd = new AddPartitionDesc(table.getDbName(), > table.getTableName(), false); > } > } > } else { > for (CheckResult.PartitionResult part : partsNotInMs) { > > apd.addPartition(Warehouse.makeSpecFromName(part.getPartitionName()), null); > repairOutput.add("Repair: Added partition to metastore " + > msckDesc.getTableName() > + ':' + part.getPartitionName()); > } > db.createPartitions(apd); > } > } catch (Exception e) { > LOG.info("Could not bulk-add partitions to metastore; trying one by > one", e); > repairOutput.clear(); > msckAddPartitionsOneByOne(db, table, partsNotInMs, repairOutput); > } > {noformat} > 1. If the batch size is too aggressive the code falls back to adding > partitions one by one which is almost always very slow. It is easily possible > that users increase the batch size to higher value to make the command run > faster but end up with a worse performance because code falls back to adding > one by one. Users are then expected to determine the tuned value of batch > size which works well for their environment. I think the code could handle > this situation better by exponentially decaying the batch size instead of > falling back to one by one. > 2. The other issue with this implementation is if lets say first batch > succeeds and the second one fails, the code tries to add all the partitions > one by one irrespective of whether some of the were successfully added or > not. If we need to fall back to one by one we should atleast remove the ones > which we kn