Java 类org.apache.hadoop.yarn.api.records.impl.pb.SerializedExceptionPBImpl 实例源码

项目:hadoop    文件:TestSerializedExceptionPBImpl.java   
@Test
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());
  }

  pb.init(ex);
  Assert.assertEquals(ex.toString(), pb.deSerialize().toString());
}
项目:hadoop    文件:LocalResourceStatusPBImpl.java   
private void mergeLocalToBuilder() {
  if (this.resource != null &&
      !((LocalResourcePBImpl)this.resource).getProto()
        .equals(builder.getResource())) {
    builder.setResource(convertToProtoFormat(this.resource));
  }
  if (this.localPath != null &&
      !((URLPBImpl)this.localPath).getProto()
        .equals(builder.getLocalPath())) {
    builder.setLocalPath(convertToProtoFormat(this.localPath));
  }
  if (this.exception != null &&
      !((SerializedExceptionPBImpl)this.exception).getProto()
        .equals(builder.getException())) {
    builder.setException(convertToProtoFormat(this.exception));
  }
}
项目:aliyun-oss-hadoop-fs    文件:LocalResourceStatusPBImpl.java   
private void mergeLocalToBuilder() {
  if (this.resource != null &&
      !((LocalResourcePBImpl)this.resource).getProto()
        .equals(builder.getResource())) {
    builder.setResource(convertToProtoFormat(this.resource));
  }
  if (this.localPath != null &&
      !((URLPBImpl)this.localPath).getProto()
        .equals(builder.getLocalPath())) {
    builder.setLocalPath(convertToProtoFormat(this.localPath));
  }
  if (this.exception != null &&
      !((SerializedExceptionPBImpl)this.exception).getProto()
        .equals(builder.getException())) {
    builder.setException(convertToProtoFormat(this.exception));
  }
}
项目:big-c    文件:TestSerializedExceptionPBImpl.java   
@Test
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());
  }

  pb.init(ex);
  Assert.assertEquals(ex.toString(), pb.deSerialize().toString());
}
项目:big-c    文件:LocalResourceStatusPBImpl.java   
private void mergeLocalToBuilder() {
  if (this.resource != null &&
      !((LocalResourcePBImpl)this.resource).getProto()
        .equals(builder.getResource())) {
    builder.setResource(convertToProtoFormat(this.resource));
  }
  if (this.localPath != null &&
      !((URLPBImpl)this.localPath).getProto()
        .equals(builder.getLocalPath())) {
    builder.setLocalPath(convertToProtoFormat(this.localPath));
  }
  if (this.exception != null &&
      !((SerializedExceptionPBImpl)this.exception).getProto()
        .equals(builder.getException())) {
    builder.setException(convertToProtoFormat(this.exception));
  }
}
项目:hadoop-2.6.0-cdh5.4.3    文件:TestSerializedExceptionPBImpl.java   
@Test
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());
  }

  pb.init(ex);
  Assert.assertEquals(ex.toString(), pb.deSerialize().toString());
}
项目:hadoop-2.6.0-cdh5.4.3    文件:LocalResourceStatusPBImpl.java   
private void mergeLocalToBuilder() {
  if (this.resource != null &&
      !((LocalResourcePBImpl)this.resource).getProto()
        .equals(builder.getResource())) {
    builder.setResource(convertToProtoFormat(this.resource));
  }
  if (this.localPath != null &&
      !((URLPBImpl)this.localPath).getProto()
        .equals(builder.getLocalPath())) {
    builder.setLocalPath(convertToProtoFormat(this.localPath));
  }
  if (this.exception != null &&
      !((SerializedExceptionPBImpl)this.exception).getProto()
        .equals(builder.getException())) {
    builder.setException(convertToProtoFormat(this.exception));
  }
}
项目:hadoop-plus    文件:LocalResourceStatusPBImpl.java   
private void mergeLocalToBuilder() {
  if (this.resource != null &&
      !((LocalResourcePBImpl)this.resource).getProto()
        .equals(builder.getResource())) {
    builder.setResource(convertToProtoFormat(this.resource));
  }
  if (this.localPath != null &&
      !((URLPBImpl)this.localPath).getProto()
        .equals(builder.getLocalPath())) {
    builder.setLocalPath(convertToProtoFormat(this.localPath));
  }
  if (this.exception != null &&
      !((SerializedExceptionPBImpl)this.exception).getProto()
        .equals(builder.getException())) {
    builder.setException(convertToProtoFormat(this.exception));
  }
}
项目:hops    文件:LocalResourceStatusPBImpl.java   
private void mergeLocalToBuilder() {
  if (this.resource != null &&
      !((LocalResourcePBImpl)this.resource).getProto()
        .equals(builder.getResource())) {
    builder.setResource(convertToProtoFormat(this.resource));
  }
  if (this.localPath != null &&
      !((URLPBImpl)this.localPath).getProto()
        .equals(builder.getLocalPath())) {
    builder.setLocalPath(convertToProtoFormat(this.localPath));
  }
  if (this.exception != null &&
      !((SerializedExceptionPBImpl)this.exception).getProto()
        .equals(builder.getException())) {
    builder.setException(convertToProtoFormat(this.exception));
  }
}
项目:hadoop-TCP    文件:LocalResourceStatusPBImpl.java   
private void mergeLocalToBuilder() {
  if (this.resource != null &&
      !((LocalResourcePBImpl)this.resource).getProto()
        .equals(builder.getResource())) {
    builder.setResource(convertToProtoFormat(this.resource));
  }
  if (this.localPath != null &&
      !((URLPBImpl)this.localPath).getProto()
        .equals(builder.getLocalPath())) {
    builder.setLocalPath(convertToProtoFormat(this.localPath));
  }
  if (this.exception != null &&
      !((SerializedExceptionPBImpl)this.exception).getProto()
        .equals(builder.getException())) {
    builder.setException(convertToProtoFormat(this.exception));
  }
}
项目:hardfs    文件:LocalResourceStatusPBImpl.java   
private void mergeLocalToBuilder() {
  if (this.resource != null &&
      !((LocalResourcePBImpl)this.resource).getProto()
        .equals(builder.getResource())) {
    builder.setResource(convertToProtoFormat(this.resource));
  }
  if (this.localPath != null &&
      !((URLPBImpl)this.localPath).getProto()
        .equals(builder.getLocalPath())) {
    builder.setLocalPath(convertToProtoFormat(this.localPath));
  }
  if (this.exception != null &&
      !((SerializedExceptionPBImpl)this.exception).getProto()
        .equals(builder.getException())) {
    builder.setException(convertToProtoFormat(this.exception));
  }
}
项目:hadoop-on-lustre2    文件:LocalResourceStatusPBImpl.java   
private void mergeLocalToBuilder() {
  if (this.resource != null &&
      !((LocalResourcePBImpl)this.resource).getProto()
        .equals(builder.getResource())) {
    builder.setResource(convertToProtoFormat(this.resource));
  }
  if (this.localPath != null &&
      !((URLPBImpl)this.localPath).getProto()
        .equals(builder.getLocalPath())) {
    builder.setLocalPath(convertToProtoFormat(this.localPath));
  }
  if (this.exception != null &&
      !((SerializedExceptionPBImpl)this.exception).getProto()
        .equals(builder.getException())) {
    builder.setException(convertToProtoFormat(this.exception));
  }
}
项目:hadoop    文件:TestSerializedExceptionPBImpl.java   
@Test
public void testSerializedException() throws Exception {
  SerializedExceptionPBImpl orig = new SerializedExceptionPBImpl();
  orig.init(new Exception("test exception"));
  SerializedExceptionProto proto = orig.getProto();
  SerializedExceptionPBImpl deser = new SerializedExceptionPBImpl(proto);
  Assert.assertEquals(orig, deser);
  Assert.assertEquals(orig.getMessage(), deser.getMessage());
  Assert.assertEquals(orig.getRemoteTrace(), deser.getRemoteTrace());
  Assert.assertEquals(orig.getCause(), deser.getCause());
}
项目:hadoop    文件:TestSerializedExceptionPBImpl.java   
@Test
public void testBeforeInit() throws Exception {
  SerializedExceptionProto defaultProto =
      SerializedExceptionProto.newBuilder().build();

  SerializedExceptionPBImpl pb1 = new SerializedExceptionPBImpl();
  Assert.assertNull(pb1.getCause());

  SerializedExceptionPBImpl pb2 = new SerializedExceptionPBImpl();
  Assert.assertEquals(defaultProto, pb2.getProto());

  SerializedExceptionPBImpl pb3 = new SerializedExceptionPBImpl();
  Assert.assertEquals(defaultProto.getTrace(), pb3.getRemoteTrace());
}
项目:big-c    文件:TestSerializedExceptionPBImpl.java   
@Test
public void testSerializedException() throws Exception {
  SerializedExceptionPBImpl orig = new SerializedExceptionPBImpl();
  orig.init(new Exception("test exception"));
  SerializedExceptionProto proto = orig.getProto();
  SerializedExceptionPBImpl deser = new SerializedExceptionPBImpl(proto);
  Assert.assertEquals(orig, deser);
  Assert.assertEquals(orig.getMessage(), deser.getMessage());
  Assert.assertEquals(orig.getRemoteTrace(), deser.getRemoteTrace());
  Assert.assertEquals(orig.getCause(), deser.getCause());
}
项目:big-c    文件:TestSerializedExceptionPBImpl.java   
@Test
public void testBeforeInit() throws Exception {
  SerializedExceptionProto defaultProto =
      SerializedExceptionProto.newBuilder().build();

  SerializedExceptionPBImpl pb1 = new SerializedExceptionPBImpl();
  Assert.assertNull(pb1.getCause());

  SerializedExceptionPBImpl pb2 = new SerializedExceptionPBImpl();
  Assert.assertEquals(defaultProto, pb2.getProto());

  SerializedExceptionPBImpl pb3 = new SerializedExceptionPBImpl();
  Assert.assertEquals(defaultProto.getTrace(), pb3.getRemoteTrace());
}
项目:hadoop-2.6.0-cdh5.4.3    文件:TestSerializedExceptionPBImpl.java   
@Test
public void testSerializedException() throws Exception {
  SerializedExceptionPBImpl orig = new SerializedExceptionPBImpl();
  orig.init(new Exception("test exception"));
  SerializedExceptionProto proto = orig.getProto();
  SerializedExceptionPBImpl deser = new SerializedExceptionPBImpl(proto);
  Assert.assertEquals(orig, deser);
  Assert.assertEquals(orig.getMessage(), deser.getMessage());
  Assert.assertEquals(orig.getRemoteTrace(), deser.getRemoteTrace());
  Assert.assertEquals(orig.getCause(), deser.getCause());
}
项目:hadoop-2.6.0-cdh5.4.3    文件:TestSerializedExceptionPBImpl.java   
@Test
public void testBeforeInit() throws Exception {
  SerializedExceptionProto defaultProto =
      SerializedExceptionProto.newBuilder().build();

  SerializedExceptionPBImpl pb1 = new SerializedExceptionPBImpl();
  Assert.assertNull(pb1.getCause());

  SerializedExceptionPBImpl pb2 = new SerializedExceptionPBImpl();
  Assert.assertEquals(defaultProto, pb2.getProto());

  SerializedExceptionPBImpl pb3 = new SerializedExceptionPBImpl();
  Assert.assertEquals(defaultProto.getTrace(), pb3.getRemoteTrace());
}
项目:hadoop    文件:StopContainersResponsePBImpl.java   
private SerializedExceptionPBImpl convertFromProtoFormat(
    SerializedExceptionProto p) {
  return new SerializedExceptionPBImpl(p);
}
项目:hadoop    文件:StopContainersResponsePBImpl.java   
private SerializedExceptionProto convertToProtoFormat(SerializedException t) {
  return ((SerializedExceptionPBImpl) t).getProto();
}
项目:hadoop    文件:GetContainerStatusesResponsePBImpl.java   
private SerializedExceptionPBImpl convertFromProtoFormat(
    SerializedExceptionProto p) {
  return new SerializedExceptionPBImpl(p);
}
项目:hadoop    文件:GetContainerStatusesResponsePBImpl.java   
private SerializedExceptionProto convertToProtoFormat(SerializedException t) {
  return ((SerializedExceptionPBImpl) t).getProto();
}
项目:hadoop    文件:StartContainersResponsePBImpl.java   
private SerializedExceptionPBImpl convertFromProtoFormat(
    SerializedExceptionProto p) {
  return new SerializedExceptionPBImpl(p);
}
项目:hadoop    文件:StartContainersResponsePBImpl.java   
private SerializedExceptionProto convertToProtoFormat(SerializedException t) {
  return ((SerializedExceptionPBImpl) t).getProto();
}
项目:hadoop    文件:LocalResourceStatusPBImpl.java   
private SerializedExceptionPBImpl convertFromProtoFormat(SerializedExceptionProto p) {
  return new SerializedExceptionPBImpl(p);
}
项目:hadoop    文件:LocalResourceStatusPBImpl.java   
private SerializedExceptionProto convertToProtoFormat(SerializedException t) {
  return ((SerializedExceptionPBImpl)t).getProto();
}
项目:aliyun-oss-hadoop-fs    文件:StopContainersResponsePBImpl.java   
private SerializedExceptionPBImpl convertFromProtoFormat(
    SerializedExceptionProto p) {
  return new SerializedExceptionPBImpl(p);
}
项目:aliyun-oss-hadoop-fs    文件:StopContainersResponsePBImpl.java   
private SerializedExceptionProto convertToProtoFormat(SerializedException t) {
  return ((SerializedExceptionPBImpl) t).getProto();
}
项目:aliyun-oss-hadoop-fs    文件:GetContainerStatusesResponsePBImpl.java   
private SerializedExceptionPBImpl convertFromProtoFormat(
    SerializedExceptionProto p) {
  return new SerializedExceptionPBImpl(p);
}
项目:aliyun-oss-hadoop-fs    文件:GetContainerStatusesResponsePBImpl.java   
private SerializedExceptionProto convertToProtoFormat(SerializedException t) {
  return ((SerializedExceptionPBImpl) t).getProto();
}
项目:aliyun-oss-hadoop-fs    文件:IncreaseContainersResourceResponsePBImpl.java   
private SerializedExceptionPBImpl convertFromProtoFormat(
        SerializedExceptionProto p) {
  return new SerializedExceptionPBImpl(p);
}
项目:aliyun-oss-hadoop-fs    文件:IncreaseContainersResourceResponsePBImpl.java   
private SerializedExceptionProto convertToProtoFormat(SerializedException t) {
  return ((SerializedExceptionPBImpl) t).getProto();
}
项目:aliyun-oss-hadoop-fs    文件:StartContainersResponsePBImpl.java   
private SerializedExceptionPBImpl convertFromProtoFormat(
    SerializedExceptionProto p) {
  return new SerializedExceptionPBImpl(p);
}
项目:aliyun-oss-hadoop-fs    文件:StartContainersResponsePBImpl.java   
private SerializedExceptionProto convertToProtoFormat(SerializedException t) {
  return ((SerializedExceptionPBImpl) t).getProto();
}
项目:aliyun-oss-hadoop-fs    文件:TestPBImplRecords.java   
@Test
public void testSerializedExceptionPBImpl() throws Exception {
  validatePBImplRecord(SerializedExceptionPBImpl.class,
      SerializedExceptionProto.class);
}
项目:aliyun-oss-hadoop-fs    文件:LocalResourceStatusPBImpl.java   
private SerializedExceptionPBImpl convertFromProtoFormat(SerializedExceptionProto p) {
  return new SerializedExceptionPBImpl(p);
}
项目:aliyun-oss-hadoop-fs    文件:LocalResourceStatusPBImpl.java   
private SerializedExceptionProto convertToProtoFormat(SerializedException t) {
  return ((SerializedExceptionPBImpl)t).getProto();
}
项目:big-c    文件:StopContainersResponsePBImpl.java   
private SerializedExceptionPBImpl convertFromProtoFormat(
    SerializedExceptionProto p) {
  return new SerializedExceptionPBImpl(p);
}
项目:big-c    文件:StopContainersResponsePBImpl.java   
private SerializedExceptionProto convertToProtoFormat(SerializedException t) {
  return ((SerializedExceptionPBImpl) t).getProto();
}
项目:big-c    文件:GetContainerStatusesResponsePBImpl.java   
private SerializedExceptionPBImpl convertFromProtoFormat(
    SerializedExceptionProto p) {
  return new SerializedExceptionPBImpl(p);
}