MAPREDUCE-6818. Remove direct reference to TimelineClientImpl. Contributed by Li Lu.
This commit is contained in:
parent
ecbc8d4816
commit
8499299740
@ -37,7 +37,6 @@
|
|||||||
import org.apache.hadoop.yarn.api.records.ApplicationId;
|
import org.apache.hadoop.yarn.api.records.ApplicationId;
|
||||||
import org.apache.hadoop.yarn.api.records.timeline.TimelineEntity;
|
import org.apache.hadoop.yarn.api.records.timeline.TimelineEntity;
|
||||||
import org.apache.hadoop.yarn.client.api.TimelineClient;
|
import org.apache.hadoop.yarn.client.api.TimelineClient;
|
||||||
import org.apache.hadoop.yarn.client.api.impl.TimelineClientImpl;
|
|
||||||
import org.apache.hadoop.yarn.exceptions.YarnException;
|
import org.apache.hadoop.yarn.exceptions.YarnException;
|
||||||
|
|
||||||
|
|
||||||
@ -54,7 +53,7 @@ class JobHistoryFileReplayMapperV1 extends
|
|||||||
|
|
||||||
public void map(IntWritable key, IntWritable val, Context context) throws IOException {
|
public void map(IntWritable key, IntWritable val, Context context) throws IOException {
|
||||||
// collect the apps it needs to process
|
// collect the apps it needs to process
|
||||||
TimelineClient tlc = new TimelineClientImpl();
|
TimelineClient tlc = TimelineClient.createTimelineClient();
|
||||||
TimelineEntityConverterV1 converter = new TimelineEntityConverterV1();
|
TimelineEntityConverterV1 converter = new TimelineEntityConverterV1();
|
||||||
JobHistoryFileReplayHelper helper = new JobHistoryFileReplayHelper(context);
|
JobHistoryFileReplayHelper helper = new JobHistoryFileReplayHelper(context);
|
||||||
int replayMode = helper.getReplayMode();
|
int replayMode = helper.getReplayMode();
|
||||||
|
@ -32,7 +32,6 @@
|
|||||||
import org.apache.hadoop.yarn.api.records.timeline.TimelineEntity;
|
import org.apache.hadoop.yarn.api.records.timeline.TimelineEntity;
|
||||||
import org.apache.hadoop.yarn.api.records.timeline.TimelineEvent;
|
import org.apache.hadoop.yarn.api.records.timeline.TimelineEvent;
|
||||||
import org.apache.hadoop.yarn.client.api.TimelineClient;
|
import org.apache.hadoop.yarn.client.api.TimelineClient;
|
||||||
import org.apache.hadoop.yarn.client.api.impl.TimelineClientImpl;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds simple entities with random string payload, events, metrics, and
|
* Adds simple entities with random string payload, events, metrics, and
|
||||||
@ -46,7 +45,7 @@ class SimpleEntityWriterV1
|
|||||||
|
|
||||||
public void map(IntWritable key, IntWritable val, Context context)
|
public void map(IntWritable key, IntWritable val, Context context)
|
||||||
throws IOException {
|
throws IOException {
|
||||||
TimelineClient tlc = new TimelineClientImpl();
|
TimelineClient tlc = TimelineClient.createTimelineClient();
|
||||||
Configuration conf = context.getConfiguration();
|
Configuration conf = context.getConfiguration();
|
||||||
|
|
||||||
final int kbs = conf.getInt(KBS_SENT, KBS_SENT_DEFAULT);
|
final int kbs = conf.getInt(KBS_SENT, KBS_SENT_DEFAULT);
|
||||||
|
Loading…
Reference in New Issue
Block a user