Package org.apache.hadoop.yarn.proto.YarnProtos

Examples of org.apache.hadoop.yarn.proto.YarnProtos.ContainerResourceDecreaseProto


    Resource resource = Resource.newInstance(1023, 3);
    ContainerResourceDecrease ctx = ContainerResourceDecrease.newInstance(
        containerId, resource);

    // get proto and recover to ctx
    ContainerResourceDecreaseProto proto =
        ((ContainerResourceDecreasePBImpl) ctx).getProto();
    ctx = new ContainerResourceDecreasePBImpl(proto);

    // check values
    Assert.assertEquals(ctx.getCapability(), resource);
View Full Code Here


  public void testResourceDecreaseContextWithNull() {
    ContainerResourceDecrease ctx = ContainerResourceDecrease.newInstance(null,
        null);
   
    // get proto and recover to ctx;
    ContainerResourceDecreaseProto proto =
        ((ContainerResourceDecreasePBImpl) ctx).getProto();
    ctx = new ContainerResourceDecreasePBImpl(proto);

    // check values
    Assert.assertNull(ctx.getCapability());
View Full Code Here

    Resource resource = Resource.newInstance(1023, 3);
    ContainerResourceDecrease ctx = ContainerResourceDecrease.newInstance(
        containerId, resource);

    // get proto and recover to ctx
    ContainerResourceDecreaseProto proto =
        ((ContainerResourceDecreasePBImpl) ctx).getProto();
    ctx = new ContainerResourceDecreasePBImpl(proto);

    // check values
    Assert.assertEquals(ctx.getCapability(), resource);
View Full Code Here

  public void testResourceDecreaseContextWithNull() {
    ContainerResourceDecrease ctx = ContainerResourceDecrease.newInstance(null,
        null);
   
    // get proto and recover to ctx;
    ContainerResourceDecreaseProto proto =
        ((ContainerResourceDecreasePBImpl) ctx).getProto();
    ctx = new ContainerResourceDecreasePBImpl(proto);

    // check values
    Assert.assertNull(ctx.getCapability());
View Full Code Here

TOP

Related Classes of org.apache.hadoop.yarn.proto.YarnProtos.ContainerResourceDecreaseProto

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.