本文整理汇总了Java中org.apache.hadoop.yarn.api.protocolrecords.MoveApplicationAcrossQueuesRequest类的典型用法代码示例。如果您正苦于以下问题:Java MoveApplicationAcrossQueuesRequest类的具体用法?Java MoveApplicationAcrossQueuesRequest怎么用?Java MoveApplicationAcrossQueuesRequest使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
MoveApplicationAcrossQueuesRequest类属于org.apache.hadoop.yarn.api.protocolrecords包,在下文中一共展示了MoveApplicationAcrossQueuesRequest类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: testMoveRejectedByScheduler
import org.apache.hadoop.yarn.api.protocolrecords.MoveApplicationAcrossQueuesRequest; //导入依赖的package包/类
@Test
public void testMoveRejectedByScheduler() throws Exception {
failMove = true;
// Submit application
Application application = new Application("user1", resourceManager);
application.submit();
// Wait for app to be accepted
RMApp app = resourceManager.rmContext.getRMApps()
.get(application.getApplicationId());
while (app.getState() != RMAppState.ACCEPTED) {
Thread.sleep(100);
}
ClientRMService clientRMService = resourceManager.getClientRMService();
try {
// FIFO scheduler does not support moves
clientRMService.moveApplicationAcrossQueues(
MoveApplicationAcrossQueuesRequest.newInstance(
application.getApplicationId(), "newqueue"));
fail("Should have hit exception");
} catch (YarnException ex) {
assertEquals("Move not supported", ex.getCause().getMessage());
}
}
开发者ID:naver,项目名称:hadoop,代码行数:27,代码来源:TestMoveApplication.java
示例2: testMoveSuccessful
import org.apache.hadoop.yarn.api.protocolrecords.MoveApplicationAcrossQueuesRequest; //导入依赖的package包/类
@Test (timeout = 10000)
public
void testMoveSuccessful() throws Exception {
MockRM rm1 = new MockRM(conf);
rm1.start();
RMApp app = rm1.submitApp(1024);
ClientRMService clientRMService = rm1.getClientRMService();
// FIFO scheduler does not support moves
clientRMService
.moveApplicationAcrossQueues(MoveApplicationAcrossQueuesRequest
.newInstance(app.getApplicationId(), "newqueue"));
RMApp rmApp = rm1.getRMContext().getRMApps().get(app.getApplicationId());
assertEquals("newqueue", rmApp.getQueue());
rm1.stop();
}
开发者ID:naver,项目名称:hadoop,代码行数:17,代码来源:TestMoveApplication.java
示例3: testMoveRejectedByPermissions
import org.apache.hadoop.yarn.api.protocolrecords.MoveApplicationAcrossQueuesRequest; //导入依赖的package包/类
@Test
public void testMoveRejectedByPermissions() throws Exception {
failMove = true;
// Submit application
final Application application = new Application("user1", resourceManager);
application.submit();
final ClientRMService clientRMService = resourceManager.getClientRMService();
try {
UserGroupInformation.createRemoteUser("otheruser").doAs(
new PrivilegedExceptionAction<MoveApplicationAcrossQueuesResponse>() {
@Override
public MoveApplicationAcrossQueuesResponse run() throws Exception {
return clientRMService.moveApplicationAcrossQueues(
MoveApplicationAcrossQueuesRequest.newInstance(
application.getApplicationId(), "newqueue"));
}
});
fail("Should have hit exception");
} catch (Exception ex) {
assertEquals(AccessControlException.class, ex.getCause().getCause().getClass());
}
}
开发者ID:naver,项目名称:hadoop,代码行数:26,代码来源:TestMoveApplication.java
示例4: testMoveRejectedByScheduler
import org.apache.hadoop.yarn.api.protocolrecords.MoveApplicationAcrossQueuesRequest; //导入依赖的package包/类
@Test
public void testMoveRejectedByScheduler() throws Exception {
failMove = true;
// Submit application
Application application = new Application("user1", resourceManager);
application.submit();
ClientRMService clientRMService = resourceManager.getClientRMService();
try {
// FIFO scheduler does not support moves
clientRMService.moveApplicationAcrossQueues(
MoveApplicationAcrossQueuesRequest.newInstance(
application.getApplicationId(), "newqueue"));
fail("Should have hit exception");
} catch (YarnException ex) {
assertEquals("Move not supported", ex.getCause().getMessage());
}
}
开发者ID:Seagate,项目名称:hadoop-on-lustre2,代码行数:20,代码来源:TestMoveApplication.java
示例5: testMoveSuccessful
import org.apache.hadoop.yarn.api.protocolrecords.MoveApplicationAcrossQueuesRequest; //导入依赖的package包/类
@Test (timeout = 5000)
public void testMoveSuccessful() throws Exception {
// Submit application
Application application = new Application("user1", resourceManager);
ApplicationId appId = application.getApplicationId();
application.submit();
// Wait for app to be accepted
RMApp app = resourceManager.rmContext.getRMApps().get(appId);
while (app.getState() != RMAppState.ACCEPTED) {
Thread.sleep(100);
}
ClientRMService clientRMService = resourceManager.getClientRMService();
// FIFO scheduler does not support moves
clientRMService.moveApplicationAcrossQueues(
MoveApplicationAcrossQueuesRequest.newInstance(appId, "newqueue"));
RMApp rmApp = resourceManager.getRMContext().getRMApps().get(appId);
assertEquals("newqueue", rmApp.getQueue());
}
开发者ID:Seagate,项目名称:hadoop-on-lustre2,代码行数:22,代码来源:TestMoveApplication.java
示例6: moveApplicationAcrossQueues
import org.apache.hadoop.yarn.api.protocolrecords.MoveApplicationAcrossQueuesRequest; //导入依赖的package包/类
@Override
public MoveApplicationAcrossQueuesResponse moveApplicationAcrossQueues(
MoveApplicationAcrossQueuesRequest request) throws YarnException {
resetStartFailoverFlag(true);
// make sure failover has been triggered
Assert.assertTrue(waittingForFailOver());
return Records.newRecord(MoveApplicationAcrossQueuesResponse.class);
}
开发者ID:naver,项目名称:hadoop,代码行数:11,代码来源:ProtocolHATestBase.java
示例7: moveApplicationAcrossQueues
import org.apache.hadoop.yarn.api.protocolrecords.MoveApplicationAcrossQueuesRequest; //导入依赖的package包/类
@Override
public MoveApplicationAcrossQueuesResponse moveApplicationAcrossQueues(
MoveApplicationAcrossQueuesRequest request) throws YarnException,
IOException {
MoveApplicationAcrossQueuesRequestProto requestProto =
((MoveApplicationAcrossQueuesRequestPBImpl) request).getProto();
try {
return new MoveApplicationAcrossQueuesResponsePBImpl(
proxy.moveApplicationAcrossQueues(null, requestProto));
} catch (ServiceException e) {
RPCUtil.unwrapAndThrowException(e);
return null;
}
}
开发者ID:naver,项目名称:hadoop,代码行数:16,代码来源:ApplicationClientProtocolPBClientImpl.java
示例8: testMoveTooLate
import org.apache.hadoop.yarn.api.protocolrecords.MoveApplicationAcrossQueuesRequest; //导入依赖的package包/类
@Test (timeout = 10000)
public void testMoveTooLate() throws Exception {
// Submit application
Application application = new Application("user1", resourceManager);
ApplicationId appId = application.getApplicationId();
application.submit();
ClientRMService clientRMService = resourceManager.getClientRMService();
// Kill the application
clientRMService.forceKillApplication(
KillApplicationRequest.newInstance(appId));
RMApp rmApp = resourceManager.getRMContext().getRMApps().get(appId);
// wait until it's dead
while (rmApp.getState() != RMAppState.KILLED) {
Thread.sleep(100);
}
try {
clientRMService.moveApplicationAcrossQueues(
MoveApplicationAcrossQueuesRequest.newInstance(appId, "newqueue"));
fail("Should have hit exception");
} catch (YarnException ex) {
assertEquals(YarnException.class,
ex.getClass());
assertEquals("App in KILLED state cannot be moved.", ex.getMessage());
}
}
开发者ID:naver,项目名称:hadoop,代码行数:28,代码来源:TestMoveApplication.java
示例9: testMoveAbsentApplication
import org.apache.hadoop.yarn.api.protocolrecords.MoveApplicationAcrossQueuesRequest; //导入依赖的package包/类
@Test (expected = ApplicationNotFoundException.class)
public void testMoveAbsentApplication() throws YarnException {
RMContext rmContext = mock(RMContext.class);
when(rmContext.getRMApps()).thenReturn(
new ConcurrentHashMap<ApplicationId, RMApp>());
ClientRMService rmService = new ClientRMService(rmContext, null, null,
null, null, null);
ApplicationId applicationId =
BuilderUtils.newApplicationId(System.currentTimeMillis(), 0);
MoveApplicationAcrossQueuesRequest request =
MoveApplicationAcrossQueuesRequest.newInstance(applicationId, "newqueue");
rmService.moveApplicationAcrossQueues(request);
}
开发者ID:naver,项目名称:hadoop,代码行数:14,代码来源:TestClientRMService.java
示例10: moveApplicationAcrossQueues
import org.apache.hadoop.yarn.api.protocolrecords.MoveApplicationAcrossQueuesRequest; //导入依赖的package包/类
@Override
public void moveApplicationAcrossQueues(ApplicationId appId,
String queue) throws YarnException, IOException {
MoveApplicationAcrossQueuesRequest request =
MoveApplicationAcrossQueuesRequest.newInstance(appId, queue);
rmClient.moveApplicationAcrossQueues(request);
}
开发者ID:naver,项目名称:hadoop,代码行数:8,代码来源:YarnClientImpl.java
示例11: moveApplicationAcrossQueues
import org.apache.hadoop.yarn.api.protocolrecords.MoveApplicationAcrossQueuesRequest; //导入依赖的package包/类
@Override
public MoveApplicationAcrossQueuesResponse moveApplicationAcrossQueues(
MoveApplicationAcrossQueuesRequest request) throws YarnException,
IOException {
return RecordFactoryProvider.getRecordFactory(null).newRecordInstance(
MoveApplicationAcrossQueuesResponse.class);
}
开发者ID:intel-hpdd,项目名称:scheduling-connector-for-hadoop,代码行数:8,代码来源:HPCApplicationClientProtocolImpl.java
注:本文中的org.apache.hadoop.yarn.api.protocolrecords.MoveApplicationAcrossQueuesRequest类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论