gpt4 book ai didi

org.apache.hadoop.yarn.exceptions.YarnRuntimeException.printStackTrace()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-17 18:18:40 27 4
gpt4 key购买 nike

本文整理了Java中org.apache.hadoop.yarn.exceptions.YarnRuntimeException.printStackTrace()方法的一些代码示例,展示了YarnRuntimeException.printStackTrace()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YarnRuntimeException.printStackTrace()方法的具体详情如下:
包路径:org.apache.hadoop.yarn.exceptions.YarnRuntimeException
类名称:YarnRuntimeException
方法名:printStackTrace

YarnRuntimeException.printStackTrace介绍

暂无

代码示例

代码示例来源:origin: org.apache.hadoop/hadoop-yarn-server-common

@Test
public void testPbRecordFactory() {
 RecordFactory pbRecordFactory = RecordFactoryPBImpl.get();
 try {
  NodeHeartbeatRequest request = pbRecordFactory.newRecordInstance(NodeHeartbeatRequest.class);
  Assert.assertEquals(NodeHeartbeatRequestPBImpl.class, request.getClass());
 } catch (YarnRuntimeException e) {
  e.printStackTrace();
  Assert.fail("Failed to crete record");
 }
 
}

代码示例来源:origin: org.apache.hadoop/hadoop-yarn-common

@Test
public void testPbRecordFactory() {
 RecordFactory pbRecordFactory = RecordFactoryPBImpl.get();
 
 try {
  AllocateResponse response =
    pbRecordFactory.newRecordInstance(AllocateResponse.class);
  Assert.assertEquals(AllocateResponsePBImpl.class, response.getClass());
 } catch (YarnRuntimeException e) {
  e.printStackTrace();
  Assert.fail("Failed to crete record");
 }
 
 try {
  AllocateRequest response =
    pbRecordFactory.newRecordInstance(AllocateRequest.class);
  Assert.assertEquals(AllocateRequestPBImpl.class, response.getClass());
 } catch (YarnRuntimeException e) {
  e.printStackTrace();
  Assert.fail("Failed to crete record");
 }
}

代码示例来源:origin: io.hops/hadoop-yarn-common

@Test
public void testPbRecordFactory() {
 RecordFactory pbRecordFactory = RecordFactoryPBImpl.get();
 
 try {
  AllocateResponse response =
    pbRecordFactory.newRecordInstance(AllocateResponse.class);
  Assert.assertEquals(AllocateResponsePBImpl.class, response.getClass());
 } catch (YarnRuntimeException e) {
  e.printStackTrace();
  Assert.fail("Failed to crete record");
 }
 
 try {
  AllocateRequest response =
    pbRecordFactory.newRecordInstance(AllocateRequest.class);
  Assert.assertEquals(AllocateRequestPBImpl.class, response.getClass());
 } catch (YarnRuntimeException e) {
  e.printStackTrace();
  Assert.fail("Failed to crete record");
 }
}

代码示例来源:origin: org.apache.hadoop/hadoop-yarn-common

private void testPbClientFactory() {
 InetSocketAddress addr = new InetSocketAddress(0);
 System.err.println(addr.getHostName() + addr.getPort());
 Configuration conf = new Configuration();
 ApplicationMasterProtocol instance = new AMRMProtocolTestImpl();
 Server server = null;
 try {
  server = 
   RpcServerFactoryPBImpl.get().getServer(
     ApplicationMasterProtocol.class, instance, addr, conf, null, 1);
  server.start();
  System.err.println(server.getListenerAddress());
  System.err.println(NetUtils.getConnectAddress(server));
  ApplicationMasterProtocol amrmClient = null;
  try {
   amrmClient = (ApplicationMasterProtocol) RpcClientFactoryPBImpl.get().getClient(ApplicationMasterProtocol.class, 1, NetUtils.getConnectAddress(server), conf);
  } catch (YarnRuntimeException e) {
   e.printStackTrace();
   Assert.fail("Failed to create client");
  }
  
 } catch (YarnRuntimeException e) {
  e.printStackTrace();
  Assert.fail("Failed to create server");
 } finally {
  if (server != null) {
   server.stop();
  }
 }     
}

代码示例来源:origin: ch.cern.hadoop/hadoop-yarn-common

@Test
public void testPbRecordFactory() {
 RecordFactory pbRecordFactory = RecordFactoryPBImpl.get();
 
 try {
  AllocateResponse response =
    pbRecordFactory.newRecordInstance(AllocateResponse.class);
  Assert.assertEquals(AllocateResponsePBImpl.class, response.getClass());
 } catch (YarnRuntimeException e) {
  e.printStackTrace();
  Assert.fail("Failed to crete record");
 }
 
 try {
  AllocateRequest response =
    pbRecordFactory.newRecordInstance(AllocateRequest.class);
  Assert.assertEquals(AllocateRequestPBImpl.class, response.getClass());
 } catch (YarnRuntimeException e) {
  e.printStackTrace();
  Assert.fail("Failed to crete record");
 }
}

代码示例来源:origin: io.hops/hadoop-yarn-common

private void testPbServerFactory() {
 InetSocketAddress addr = new InetSocketAddress(0);
 Configuration conf = new Configuration();
 ApplicationMasterProtocol instance = new AMRMProtocolTestImpl();
 Server server = null;
 try {
  server = 
   RpcServerFactoryPBImpl.get().getServer(
     ApplicationMasterProtocol.class, instance, addr, conf, null, 1);
  server.start();
 } catch (YarnRuntimeException e) {
  e.printStackTrace();
  Assert.fail("Failed to create server");
 } finally {
  if (server != null) {
   server.stop();
  }
 }
}

代码示例来源:origin: org.apache.hadoop/hadoop-yarn-common

private void testPbServerFactory() {
 InetSocketAddress addr = new InetSocketAddress(0);
 Configuration conf = new Configuration();
 ApplicationMasterProtocol instance = new AMRMProtocolTestImpl();
 Server server = null;
 try {
  server = 
   RpcServerFactoryPBImpl.get().getServer(
     ApplicationMasterProtocol.class, instance, addr, conf, null, 1);
  server.start();
 } catch (YarnRuntimeException e) {
  e.printStackTrace();
  Assert.fail("Failed to create server");
 } finally {
  if (server != null) {
   server.stop();
  }
 }
}

代码示例来源:origin: org.apache.hadoop/hadoop-yarn-server-common

private void testPbServerFactory() {
 InetSocketAddress addr = new InetSocketAddress(0);
 Configuration conf = new Configuration();
 ResourceTracker instance = new ResourceTrackerTestImpl();
 Server server = null;
 try {
  server = 
   RpcServerFactoryPBImpl.get().getServer(
     ResourceTracker.class, instance, addr, conf, null, 1);
  server.start();
 } catch (YarnRuntimeException e) {
  e.printStackTrace();
  Assert.fail("Failed to create server");
 } finally {
  server.stop();
 }
}

代码示例来源:origin: org.apache.hadoop/hadoop-yarn-server-common

private void testPbClientFactory() {
 InetSocketAddress addr = new InetSocketAddress(0);
 System.err.println(addr.getHostName() + addr.getPort());
 Configuration conf = new Configuration();
 ResourceTracker instance = new ResourceTrackerTestImpl();
 Server server = null;
 try {
  server = 
   RpcServerFactoryPBImpl.get().getServer(
     ResourceTracker.class, instance, addr, conf, null, 1);
  server.start();
  System.err.println(server.getListenerAddress());
  System.err.println(NetUtils.getConnectAddress(server));
  ResourceTracker client = null;
  try {
   client = (ResourceTracker) RpcClientFactoryPBImpl.get().getClient(ResourceTracker.class, 1, NetUtils.getConnectAddress(server), conf);
  } catch (YarnRuntimeException e) {
   e.printStackTrace();
   Assert.fail("Failed to create client");
  }
  
 } catch (YarnRuntimeException e) {
  e.printStackTrace();
  Assert.fail("Failed to create server");
 } finally {
  server.stop();
 }     
}

代码示例来源:origin: ch.cern.hadoop/hadoop-yarn-common

private void testPbClientFactory() {
 InetSocketAddress addr = new InetSocketAddress(0);
 System.err.println(addr.getHostName() + addr.getPort());
 Configuration conf = new Configuration();
 ApplicationMasterProtocol instance = new AMRMProtocolTestImpl();
 Server server = null;
 try {
  server = 
   RpcServerFactoryPBImpl.get().getServer(
     ApplicationMasterProtocol.class, instance, addr, conf, null, 1);
  server.start();
  System.err.println(server.getListenerAddress());
  System.err.println(NetUtils.getConnectAddress(server));
  ApplicationMasterProtocol amrmClient = null;
  try {
   amrmClient = (ApplicationMasterProtocol) RpcClientFactoryPBImpl.get().getClient(ApplicationMasterProtocol.class, 1, NetUtils.getConnectAddress(server), conf);
  } catch (YarnRuntimeException e) {
   e.printStackTrace();
   Assert.fail("Failed to create client");
  }
  
 } catch (YarnRuntimeException e) {
  e.printStackTrace();
  Assert.fail("Failed to create server");
 } finally {
  if (server != null) {
   server.stop();
  }
 }     
}

代码示例来源:origin: io.hops/hadoop-yarn-common

private void testPbClientFactory() {
 InetSocketAddress addr = new InetSocketAddress(0);
 System.err.println(addr.getHostName() + addr.getPort());
 Configuration conf = new Configuration();
 ApplicationMasterProtocol instance = new AMRMProtocolTestImpl();
 Server server = null;
 try {
  server = 
   RpcServerFactoryPBImpl.get().getServer(
     ApplicationMasterProtocol.class, instance, addr, conf, null, 1);
  server.start();
  System.err.println(server.getListenerAddress());
  System.err.println(NetUtils.getConnectAddress(server));
  ApplicationMasterProtocol amrmClient = null;
  try {
   amrmClient = (ApplicationMasterProtocol) RpcClientFactoryPBImpl.get().getClient(ApplicationMasterProtocol.class, 1, NetUtils.getConnectAddress(server), conf);
  } catch (YarnRuntimeException e) {
   e.printStackTrace();
   Assert.fail("Failed to create client");
  }
  
 } catch (YarnRuntimeException e) {
  e.printStackTrace();
  Assert.fail("Failed to create server");
 } finally {
  if (server != null) {
   server.stop();
  }
 }     
}

代码示例来源:origin: ch.cern.hadoop/hadoop-yarn-common

private void testPbServerFactory() {
 InetSocketAddress addr = new InetSocketAddress(0);
 Configuration conf = new Configuration();
 ApplicationMasterProtocol instance = new AMRMProtocolTestImpl();
 Server server = null;
 try {
  server = 
   RpcServerFactoryPBImpl.get().getServer(
     ApplicationMasterProtocol.class, instance, addr, conf, null, 1);
  server.start();
 } catch (YarnRuntimeException e) {
  e.printStackTrace();
  Assert.fail("Failed to create server");
 } finally {
  if (server != null) {
   server.stop();
  }
 }
}

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com