@Test public void testResourceSchedulingInProfile() throws Exception { AttemptObservers observers = AttemptObservers.of(observer); final NodeEndpoint endpoint = NodeEndpoint.newBuilder().setAddress("host1").setFabricPort(12345).build(); when(context.getCurrentEndpoint()).thenReturn(endpoint); QueryManager queryManager = new QueryManager(queryId, context, null, completionListener, new Pointer<>(), observers, true, true, catalog); ResourceSchedulingDecisionInfo result = new ResourceSchedulingDecisionInfo(); result.setQueueId("abcd"); result.setQueueName("queue.abcd"); observers.resourcesScheduled(result); UserBitShared.QueryProfile queryProfile = queryManager.getQueryProfile("my description", UserBitShared.QueryResult.QueryState.RUNNING, null, "some reason"); assertNotNull(queryProfile.getResourceSchedulingProfile()); assertEquals("abcd", queryProfile.getResourceSchedulingProfile().getQueueId()); assertEquals("queue.abcd", queryProfile.getResourceSchedulingProfile().getQueueName()); } }
dlb.addItem("Queue Name:", r.getQueueName());
jobInfo.setResourceSchedulingInfo(new ResourceSchedulingInfo()); jobInfo.getResourceSchedulingInfo().setQueueName(profile.getResourceSchedulingProfile().getQueueName()); jobInfo.getResourceSchedulingInfo().setQueueId(profile.getResourceSchedulingProfile().getQueueId());
@Override public void execStarted(QueryProfile profile) { try (TimedBlock b = Timer.time("execStarted")) { b.addID("attempt=" + attemptId); final JobInfo jobInfo = job.getJobAttempt().getInfo(); if(profile != null){ jobInfo.setStartTime(profile.getStart()); job.getJobAttempt().setState(JobState.RUNNING); final QueryProfileParser profileParser = new QueryProfileParser(jobId, profile); if (profile.getResourceSchedulingProfile() != null) { if (jobInfo.getResourceSchedulingInfo() == null) { jobInfo.setResourceSchedulingInfo(new ResourceSchedulingInfo()); } jobInfo.getResourceSchedulingInfo().setQueueName(profile.getResourceSchedulingProfile().getQueueName()); jobInfo.getResourceSchedulingInfo().setQueueId(profile.getResourceSchedulingProfile().getQueueId()); } job.getJobAttempt().setStats(profileParser.getJobStats()); job.getJobAttempt().setDetails(profileParser.getJobDetails()); storeJob(job); if (externalListenerManager != null) { externalListenerManager.queryUpdate(job); } } } catch (IOException e) { exception.addException(e); } }
public void writeTo(io.protostuff.Output output, com.dremio.exec.proto.UserBitShared.ResourceSchedulingProfile message) throws java.io.IOException { if(message.hasQueueName()) output.writeString(1, message.getQueueName(), false); if(message.hasQueueId()) output.writeString(2, message.getQueueId(), false); if(message.hasRuleContent()) output.writeString(3, message.getRuleContent(), false); if(message.hasRuleId()) output.writeString(4, message.getRuleId(), false); if(message.hasRuleName()) output.writeString(5, message.getRuleName(), false); if(message.hasRuleAction()) output.writeString(6, message.getRuleAction(), false); if(message.hasSchedulingProperties()) output.writeObject(7, message.getSchedulingProperties(), com.dremio.exec.proto.SchemaUserBitShared.ResourceSchedulingProperties.WRITE, false); if(message.hasResourceSchedulingStart()) output.writeInt64(8, message.getResourceSchedulingStart(), false); if(message.hasResourceSchedulingEnd()) output.writeInt64(9, message.getResourceSchedulingEnd(), false); } public boolean isInitialized(com.dremio.exec.proto.UserBitShared.ResourceSchedulingProfile message)
/** * <code>optional string queue_name = 1;</code> */ public Builder clearQueueName() { bitField0_ = (bitField0_ & ~0x00000001); queueName_ = getDefaultInstance().getQueueName(); onChanged(); return this; } /**