Skip to content

Commit

Permalink
Updated Apache Tez to version 0.10.2.
Browse files Browse the repository at this point in the history
This required a new method DAGClient#getWebUIAddress to be implemented.
  • Loading branch information
cwensel committed Jul 20, 2023
1 parent a8935d3 commit f847fa8
Show file tree
Hide file tree
Showing 4 changed files with 85 additions and 74 deletions.
2 changes: 2 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ Cascading Change Log

4.5.1 [unreleased]

Updated Apache Tez to version 0.10.2.

Updated Apache Hadoop to version 3.3.6.

Updated c.p.AppProps#getApplicationJarClass to test if property is a j.l.Class instance in order to retain
Expand Down
2 changes: 1 addition & 1 deletion cascading-hadoop3-tez-stats/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
*/

ext.hadoop3Version = '3.3.6'
ext.tezVersion = '0.10.1'
ext.tezVersion = '0.10.2'

if ( System.properties [ 'hadoop3.release.final'] )
hadoop3Version = System.properties[ 'hadoop3.release.final' ]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* Copyright (c) 2007-2017 Xplenty, Inc. All Rights Reserved.
* Copyright (c) 2007-2023 The Cascading Authors. All Rights Reserved.
*
* Project and contact information: http://www.cascading.org/
* Project and contact information: https://cascading.wensel.net/
*
* This file is part of the Cascading project.
*
Expand All @@ -21,129 +21,138 @@
package cascading.stats.tez.util;

import java.io.IOException;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.Set;
import javax.annotation.Nullable;

import cascading.CascadingException;
import org.apache.hadoop.yarn.api.records.ApplicationId;
import org.apache.hadoop.yarn.api.records.ApplicationReport;
import org.apache.tez.client.FrameworkClient;
import org.apache.tez.common.ATSConstants;
import org.apache.tez.dag.api.TezConfiguration;
import org.apache.tez.dag.api.TezException;
import org.apache.tez.dag.api.client.DAGClient;
import org.apache.tez.dag.api.client.DAGClientTimelineImpl;
import org.apache.tez.dag.api.client.DAGStatus;
import org.apache.tez.dag.api.client.StatusGetOpts;
import org.apache.tez.dag.api.client.VertexStatus;
import org.codehaus.jettison.json.JSONArray;
import org.codehaus.jettison.json.JSONException;
import org.codehaus.jettison.json.JSONObject;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import static org.apache.tez.common.ATSConstants.*;
import static org.apache.tez.dag.history.logging.EntityTypes.TEZ_TASK_ID;

/**
* TezTimelineClient is currently just a proxy around DAGClient that pretends to
* implement TimelineClient (throws errors on all methods).
*
* <p>
* When TEZ-3369 is implemented, TezTimelineClient can be replaced by a pure DAGClient usage. Until then,
* FlowStats is non-functional.
*/
public class TezTimelineClient extends DAGClient implements TimelineClient {
public class TezTimelineClient extends DAGClient implements TimelineClient
{
private final String dagId;
private final FrameworkClient frameworkClient;
private final DAGClient dagClient;

private final String dagId;
private final FrameworkClient frameworkClient;
private final DAGClient dagClient;

public TezTimelineClient(ApplicationId appId, String dagId, TezConfiguration conf, FrameworkClient frameworkClient, DAGClient dagClient) throws TezException {
this.dagId = dagId;
this.frameworkClient = frameworkClient;
this.dagClient = dagClient;
public TezTimelineClient( ApplicationId appId, String dagId, TezConfiguration conf, FrameworkClient frameworkClient, DAGClient dagClient ) throws TezException
{
this.dagId = dagId;
this.frameworkClient = frameworkClient;
this.dagClient = dagClient;
}

public DAGClient getDAGClient() {
return dagClient;
public DAGClient getDAGClient()
{
return dagClient;
}

public FrameworkClient getFrameworkClient() {
return frameworkClient;
public FrameworkClient getFrameworkClient()
{
return frameworkClient;
}

@Override
public DAGStatus getDAGStatus( @Nullable Set<StatusGetOpts> statusOptions ) throws IOException, TezException
{
return dagClient.getDAGStatus( statusOptions );
}

@Override
public DAGStatus getDAGStatus(@Nullable Set<StatusGetOpts> statusOptions) throws IOException, TezException {
return dagClient.getDAGStatus(statusOptions);
@Override
public DAGStatus getDAGStatus( @Nullable Set<StatusGetOpts> statusOptions, long timeout ) throws IOException, TezException
{
return dagClient.getDAGStatus( statusOptions, timeout );
}

@Override
public DAGStatus getDAGStatus(@Nullable Set<StatusGetOpts> statusOptions, long timeout) throws IOException, TezException {
return dagClient.getDAGStatus(statusOptions, timeout);
@Override
public VertexStatus getVertexStatus( String vertexName, Set<StatusGetOpts> statusOptions ) throws IOException, TezException
{
return dagClient.getVertexStatus( vertexName, statusOptions );
}

@Override
public VertexStatus getVertexStatus(String vertexName, Set<StatusGetOpts> statusOptions) throws IOException, TezException {
return dagClient.getVertexStatus(vertexName, statusOptions);
@Override
public void tryKillDAG() throws IOException, TezException
{
dagClient.tryKillDAG();
}

@Override
public void tryKillDAG() throws IOException, TezException {
dagClient.tryKillDAG();
@Override
public DAGStatus waitForCompletion() throws IOException, TezException, InterruptedException
{
return dagClient.waitForCompletion();
}

@Override
public DAGStatus waitForCompletion() throws IOException, TezException, InterruptedException {
return dagClient.waitForCompletion();
@Override
public void close() throws IOException
{
dagClient.close();
}

@Override
public void close() throws IOException {
dagClient.close();
@Override
public DAGStatus waitForCompletionWithStatusUpdates( @Nullable Set<StatusGetOpts> statusOpts ) throws IOException, TezException, InterruptedException
{
return dagClient.waitForCompletionWithStatusUpdates( statusOpts );
}

@Override
public DAGStatus waitForCompletionWithStatusUpdates(@Nullable Set<StatusGetOpts> statusOpts) throws IOException, TezException, InterruptedException {
return dagClient.waitForCompletionWithStatusUpdates(statusOpts);
@Override
public String getWebUIAddress() throws IOException, TezException
{
return dagClient.getWebUIAddress();
}

@Override
public String getSessionIdentifierString() {
return dagClient.getSessionIdentifierString();
@Override
public String getSessionIdentifierString()
{
return dagClient.getSessionIdentifierString();
}

@Override
public String getDagIdentifierString() {
return dagClient.getDagIdentifierString();
@Override
public String getDagIdentifierString()
{
return dagClient.getDagIdentifierString();
}

@Override
public String getExecutionContext() {
return dagClient.getExecutionContext();
@Override
public String getExecutionContext()
{
return dagClient.getExecutionContext();
}

@Override
public String getVertexID(String vertexName) throws IOException, TezException {
throw new TezException("reporting API is temporarily disabled on TEZ-3369 implementation");
@Override
public String getVertexID( String vertexName ) throws IOException, TezException
{
throw new TezException( "reporting API is temporarily disabled on TEZ-3369 implementation" );
}

@Override
public Iterator<TaskStatus> getVertexChildren(String vertexID, int limit, String startTaskID) throws IOException, TezException {
throw new TezException("reporting API is temporarily disabled on TEZ-3369 implementation");
@Override
public Iterator<TaskStatus> getVertexChildren( String vertexID, int limit, String startTaskID ) throws IOException, TezException
{
throw new TezException( "reporting API is temporarily disabled on TEZ-3369 implementation" );
}

@Override
public TaskStatus getVertexChild(String taskID) throws TezException {
throw new TezException("reporting API is temporarily disabled on TEZ-3369 implementation");
@Override
public TaskStatus getVertexChild( String taskID ) throws TezException
{
throw new TezException( "reporting API is temporarily disabled on TEZ-3369 implementation" );
}

@Override
protected ApplicationReport getApplicationReportInternal() {
return null; // not implemented
@Override
protected ApplicationReport getApplicationReportInternal()
{
return null; // not implemented
}

}
}
2 changes: 1 addition & 1 deletion cascading-hadoop3-tez/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
apply from: '../etc/testingPlatform.gradle'

ext.hadoop3Version = '3.3.6'
ext.tezVersion = '0.10.1'
ext.tezVersion = '0.10.2'

if ( System.properties [ 'hadoop3.release.final'] )
hadoop3Version = System.properties[ 'hadoop3.release.final' ]
Expand Down

0 comments on commit f847fa8

Please sign in to comment.