Package org.apache.hadoop.yarn.api.records.impl.pb

Examples of org.apache.hadoop.yarn.api.records.impl.pb.SerializedExceptionPBImpl.deSerialize()


  public void testDeserialize() throws Exception {
    Exception ex = new Exception("test exception");
    SerializedExceptionPBImpl pb = new SerializedExceptionPBImpl();

    try {
      pb.deSerialize();
      Assert.fail("deSerialze should throw YarnRuntimeException");
    } catch (YarnRuntimeException e) {
      Assert.assertEquals(ClassNotFoundException.class,
          e.getCause().getClass());
    }
View Full Code Here


      Assert.assertEquals(ClassNotFoundException.class,
          e.getCause().getClass());
    }

    pb.init(ex);
    Assert.assertEquals(ex.toString(), pb.deSerialize().toString());
  }

  @Test
  public void testBeforeInit() throws Exception {
    SerializedExceptionProto defaultProto =
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.