Java 类org.apache.hadoop.yarn.proto.YarnProtos.SerializedExceptionProto 实例源码

项目: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());
}
项目:aliyun-oss-hadoop-fs    文件: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());
}
项目:aliyun-oss-hadoop-fs    文件: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());
}
项目:hops    文件: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());
}
项目:hops    文件: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    文件:SerializedExceptionPBImpl.java   
public SerializedExceptionPBImpl(SerializedExceptionProto proto) {
  this.proto = proto;
  viaProto = true;
}
项目:hadoop    文件:SerializedExceptionPBImpl.java   
public SerializedExceptionProto getProto() {
  proto = viaProto ? proto : builder.build();
  viaProto = true;
  return proto;
}
项目:hadoop    文件:SerializedExceptionPBImpl.java   
private void maybeInitBuilder() {
  if (viaProto || builder == null) {
    builder = SerializedExceptionProto.newBuilder(proto);
  }
  viaProto = false;
}
项目: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    文件:SerializedExceptionPBImpl.java   
public SerializedExceptionPBImpl(SerializedExceptionProto proto) {
  this.proto = proto;
  viaProto = true;
}
项目:aliyun-oss-hadoop-fs    文件:SerializedExceptionPBImpl.java   
public SerializedExceptionProto getProto() {
  proto = viaProto ? proto : builder.build();
  viaProto = true;
  return proto;
}
项目:aliyun-oss-hadoop-fs    文件:SerializedExceptionPBImpl.java   
private void maybeInitBuilder() {
  if (viaProto || builder == null) {
    builder = SerializedExceptionProto.newBuilder(proto);
  }
  viaProto = false;
}
项目: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);
}
项目:big-c    文件:GetContainerStatusesResponsePBImpl.java   
private SerializedExceptionProto convertToProtoFormat(SerializedException t) {
  return ((SerializedExceptionPBImpl) t).getProto();
}
项目:big-c    文件:StartContainersResponsePBImpl.java   
private SerializedExceptionPBImpl convertFromProtoFormat(
    SerializedExceptionProto p) {
  return new SerializedExceptionPBImpl(p);
}