YARN-6542. Fix the logger in TestAlignedPlanner and TestGreedyReservationAgent.

This commit is contained in:
Subru Krishnan 2017-05-01 18:10:07 -07:00
parent 1058b40843
commit e514fc432a
2 changed files with 12 additions and 4 deletions

View File

@ -52,12 +52,16 @@
import org.apache.hadoop.yarn.util.resource.DefaultResourceCalculator; import org.apache.hadoop.yarn.util.resource.DefaultResourceCalculator;
import org.apache.hadoop.yarn.util.resource.ResourceCalculator; import org.apache.hadoop.yarn.util.resource.ResourceCalculator;
import org.apache.hadoop.yarn.util.resource.Resources; import org.apache.hadoop.yarn.util.resource.Resources;
import org.eclipse.jetty.util.log.Log;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class TestAlignedPlanner { public class TestAlignedPlanner {
private static final Logger LOG = LoggerFactory
.getLogger(TestAlignedPlanner.class);
private ReservationAgent agentRight; private ReservationAgent agentRight;
private ReservationAgent agentLeft; private ReservationAgent agentLeft;
private InMemoryPlan plan; private InMemoryPlan plan;
@ -1030,7 +1034,7 @@ public void setup() throws Exception {
// Initialize random seed // Initialize random seed
long seed = rand.nextLong(); long seed = rand.nextLong();
rand.setSeed(seed); rand.setSeed(seed);
Log.getLog().info("Running with seed: " + seed); LOG.info("Running with seed: " + seed);
// Set cluster parameters // Set cluster parameters
long timeWindow = 1000000L; long timeWindow = 1000000L;

View File

@ -55,16 +55,20 @@
import org.apache.hadoop.yarn.util.resource.DefaultResourceCalculator; import org.apache.hadoop.yarn.util.resource.DefaultResourceCalculator;
import org.apache.hadoop.yarn.util.resource.ResourceCalculator; import org.apache.hadoop.yarn.util.resource.ResourceCalculator;
import org.apache.hadoop.yarn.util.resource.Resources; import org.apache.hadoop.yarn.util.resource.Resources;
import org.eclipse.jetty.util.log.Log;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.junit.runners.Parameterized; import org.junit.runners.Parameterized;
import org.junit.runners.Parameterized.Parameters; import org.junit.runners.Parameterized.Parameters;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@RunWith(Parameterized.class) @RunWith(Parameterized.class)
public class TestGreedyReservationAgent { public class TestGreedyReservationAgent {
private static final Logger LOG = LoggerFactory
.getLogger(TestGreedyReservationAgent.class);
ReservationAgent agent; ReservationAgent agent;
InMemoryPlan plan; InMemoryPlan plan;
Resource minAlloc = Resource.newInstance(1024, 1); Resource minAlloc = Resource.newInstance(1024, 1);
@ -89,7 +93,7 @@ public void setup() throws Exception {
long seed = rand.nextLong(); long seed = rand.nextLong();
rand.setSeed(seed); rand.setSeed(seed);
Log.getLog().info("Running with seed: " + seed); LOG.info("Running with seed: " + seed);
// setting completely loose quotas // setting completely loose quotas
long timeWindow = 1000000L; long timeWindow = 1000000L;