You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2021/04/13 13:40:00 UTC
[jira] [Work logged] (HIVE-25006) Commit Iceberg writes in
HiveMetaHook instead of TezAM
[ https://issues.apache.org/jira/browse/HIVE-25006?focusedWorklogId=581779&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-581779 ]
ASF GitHub Bot logged work on HIVE-25006:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 13/Apr/21 13:39
Start Date: 13/Apr/21 13:39
Worklog Time Spent: 10m
Work Description: marton-bod commented on a change in pull request #2161:
URL: https://github.com/apache/hive/pull/2161#discussion_r612455851
##########
File path: ql/src/java/org/apache/hadoop/hive/ql/exec/tez/TezTask.java
##########
@@ -250,9 +255,32 @@ public int execute() {
this.setException(new HiveException(monitor.getDiagnostics()));
}
- // fetch the counters
try {
Set<StatusGetOpts> statusGetOpts = EnumSet.of(StatusGetOpts.GET_COUNTERS);
+ // save useful commit information into session conf, e.g. for custom commit hooks
+ List<BaseWork> allWork = work.getAllWork();
+ boolean hasReducer = allWork.stream().map(workToVertex::get).anyMatch(v -> v.getName().startsWith("Reducer"));
+ for (BaseWork baseWork : allWork) {
+ Vertex vertex = workToVertex.get(baseWork);
+ if (!hasReducer || vertex.getName().startsWith("Reducer")) {
+ // construct the parsable job id
+ VertexStatus status = dagClient.getVertexStatus(vertex.getName(), statusGetOpts);
+ String[] jobIdParts = status.getId().split("_");
+ // status.getId() returns something like: vertex_1617722404520_0001_1_00
+ // this should be transformed to a parsable JobID: job_16177224045200_0001
+ int vertexId = Integer.parseInt(jobIdParts[jobIdParts.length - 1]);
+ String jobId = String.format("job_%s%d_%s", jobIdParts[1], vertexId, jobIdParts[2]);
+ // prefix with table name (for multi-table inserts), if available
+ String tableName = Optional.ofNullable(workToConf.get(baseWork)).map(c -> c.get("name")).orElse(null);
+ String jobIdKey = HIVE_TEZ_COMMIT_JOB_ID + (tableName == null ? "" : "." + tableName);;
+ String taskCountKey = HIVE_TEZ_COMMIT_TASK_COUNT + (tableName == null ? "" : "." + tableName);
+ // save info into session conf
+ HiveConf sessionConf = SessionState.get().getConf();
+ sessionConf.set(jobIdKey, jobId);
+ sessionConf.setInt(taskCountKey, status.getProgress().getSucceededTaskCount());
Review comment:
I'll look into this in the following PR, once we've replaced the temporary listing solution with the permanent one and upgraded the Tez dependency.
--
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:
users@infra.apache.org
Issue Time Tracking
-------------------
Worklog Id: (was: 581779)
Remaining Estimate: 0h
Time Spent: 10m
> Commit Iceberg writes in HiveMetaHook instead of TezAM
> ------------------------------------------------------
>
> Key: HIVE-25006
> URL: https://issues.apache.org/jira/browse/HIVE-25006
> Project: Hive
> Issue Type: Task
> Reporter: Marton Bod
> Assignee: Marton Bod
> Priority: Major
> Time Spent: 10m
> Remaining Estimate: 0h
>
> Trigger the write commits in the HiveIcebergStorageHandler#commitInsertTable. This will enable us to implement insert overwrites for iceberg tables.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)