You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by "vogievetsky (via GitHub)" <gi...@apache.org> on 2024/06/11 22:58:40 UTC
[PR] Web console: expose handoff API (druid)
vogievetsky opened a new pull request, #16586:
URL: https://github.com/apache/druid/pull/16586
Expose handoff API added in https://github.com/apache/druid/pull/16310
<img width="1223" alt="image" src="https://github.com/apache/druid/assets/177816/2c9dbfea-f5a4-430a-8f87-c84f1d01392f">
<img width="482" alt="image" src="https://github.com/apache/druid/assets/177816/48ae5f20-20dd-4dc4-ac24-59b6cc18dedd">
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
Re: [PR] Web console: expose handoff API (druid)
Posted by "johnImply (via GitHub)" <gi...@apache.org>.
johnImply commented on PR #16586:
URL: https://github.com/apache/druid/pull/16586#issuecomment-2162725381
Where on the UI are the Task Group IDs found?
If this is the "Group ID" value from the Tasks tab, then would it make more sense to implement the "Early Handoff" option on the Tasks tab instead of the Supervisor tab?
I understand it is the Supervisor that needs the direct instruction and not the Task ... but from a user perspective it is the task that I am cycling, not the Supervisor.
Thanks. John
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
Re: [PR] Web console: expose handoff API (druid)
Posted by "ektravel (via GitHub)" <gi...@apache.org>.
ektravel commented on code in PR #16586:
URL: https://github.com/apache/druid/pull/16586#discussion_r1636805777
##########
web-console/src/dialogs/supervisor-handoff-dialog/supervisor-handoff-dialog.tsx:
##########
@@ -0,0 +1,64 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { FormGroup, Intent, Tag } from '@blueprintjs/core';
+import React, { useState } from 'react';
+
+import { ArrayInput } from '../../components';
+import { Api } from '../../singletons';
+import { AsyncActionDialog } from '../async-action-dialog/async-action-dialog';
+
+export interface SupervisorHandoffDialogProps {
+ supervisorId: string;
+ onSuccess(): void;
+ onClose(): void;
+}
+
+export function SupervisorHandoffDialog(props: SupervisorHandoffDialogProps) {
+ const { supervisorId, onSuccess, onClose } = props;
+ const [groupIds, setGroupIds] = useState<string[]>([]);
+
+ return (
+ <AsyncActionDialog
+ action={async () => {
+ const resp = await Api.instance.post(
+ `/druid/indexer/v1/supervisor/${Api.encodePath(supervisorId)}/taskGroups/handoff`,
+ { taskGroupIds: groupIds.map(x => parseInt(x, 10)) },
+ );
+ return resp.data;
+ }}
+ confirmButtonText="Handoff supervisor"
+ successText="Supervisor handoff has been inititated"
+ failText="Could not initiate handoff for supervisor"
+ intent={Intent.PRIMARY}
+ onClose={onClose}
+ onSuccess={onSuccess}
+ >
+ <p>
+ Are you sure you want initiate handoff for the supervisor <Tag minimal>{supervisorId}</Tag>?
Review Comment:
```suggestion
Are you sure you want to initiate handoff for the supervisor <Tag minimal>{supervisorId}</Tag>?
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
Re: [PR] Web console: expose handoff API (druid)
Posted by "georgew5656 (via GitHub)" <gi...@apache.org>.
georgew5656 commented on PR #16586:
URL: https://github.com/apache/druid/pull/16586#issuecomment-2163195792
> Where on the UI are the Task Group IDs found?
>
> If this is the "Group ID" value from the Tasks tab, then would it make more sense to implement the "Early Handoff" option on the Tasks tab instead of the Supervisor tab?
>
> I understand it is the Supervisor that needs the direct instruction and not the Task ... but from a user perspective it is the task that I am cycling, not the Supervisor.
>
> Thanks. John
the task's taskGroupId is under the streaming task -> ioConfig -> taskGroupId. i think it still makes sense to have it on the supervisor (since you can specify multiple tasks to handoff, and like you said the api is operating on the supervisor). it would be nice to have a more explicit group -> task_id mapping available somewhere in the superivsor though.
i have observed that the Statistics tab for the supervisor already shows tasks by ascending group id (1,2,3,4,5, etc) so maybe it could be there, or alternatively just in the status page
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
Re: [PR] Web console: expose handoff API (druid)
Posted by "ektravel (via GitHub)" <gi...@apache.org>.
ektravel commented on code in PR #16586:
URL: https://github.com/apache/druid/pull/16586#discussion_r1636797295
##########
web-console/src/dialogs/supervisor-handoff-dialog/supervisor-handoff-dialog.tsx:
##########
@@ -0,0 +1,64 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { FormGroup, Intent, Tag } from '@blueprintjs/core';
+import React, { useState } from 'react';
+
+import { ArrayInput } from '../../components';
+import { Api } from '../../singletons';
+import { AsyncActionDialog } from '../async-action-dialog/async-action-dialog';
+
+export interface SupervisorHandoffDialogProps {
+ supervisorId: string;
+ onSuccess(): void;
+ onClose(): void;
+}
+
+export function SupervisorHandoffDialog(props: SupervisorHandoffDialogProps) {
+ const { supervisorId, onSuccess, onClose } = props;
+ const [groupIds, setGroupIds] = useState<string[]>([]);
+
+ return (
+ <AsyncActionDialog
+ action={async () => {
+ const resp = await Api.instance.post(
+ `/druid/indexer/v1/supervisor/${Api.encodePath(supervisorId)}/taskGroups/handoff`,
+ { taskGroupIds: groupIds.map(x => parseInt(x, 10)) },
+ );
+ return resp.data;
+ }}
+ confirmButtonText="Handoff supervisor"
+ successText="Supervisor handoff has been inititated"
Review Comment:
```suggestion
successText="Supervisor handoff has been initiated"
```
OR (if you want to match the style of `failText`
```suggestion
successText="Initiated handoff for the supervisor"
```
##########
web-console/src/dialogs/supervisor-handoff-dialog/supervisor-handoff-dialog.tsx:
##########
@@ -0,0 +1,64 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { FormGroup, Intent, Tag } from '@blueprintjs/core';
+import React, { useState } from 'react';
+
+import { ArrayInput } from '../../components';
+import { Api } from '../../singletons';
+import { AsyncActionDialog } from '../async-action-dialog/async-action-dialog';
+
+export interface SupervisorHandoffDialogProps {
+ supervisorId: string;
+ onSuccess(): void;
+ onClose(): void;
+}
+
+export function SupervisorHandoffDialog(props: SupervisorHandoffDialogProps) {
+ const { supervisorId, onSuccess, onClose } = props;
+ const [groupIds, setGroupIds] = useState<string[]>([]);
+
+ return (
+ <AsyncActionDialog
+ action={async () => {
+ const resp = await Api.instance.post(
+ `/druid/indexer/v1/supervisor/${Api.encodePath(supervisorId)}/taskGroups/handoff`,
+ { taskGroupIds: groupIds.map(x => parseInt(x, 10)) },
+ );
+ return resp.data;
+ }}
+ confirmButtonText="Handoff supervisor"
+ successText="Supervisor handoff has been inititated"
Review Comment:
```suggestion
successText="Supervisor handoff has been initiated"
```
OR (if you want to match the style of `failText`)
```suggestion
successText="Initiated handoff for the supervisor"
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
Re: [PR] Web console: expose handoff API (druid)
Posted by "johnImply (via GitHub)" <gi...@apache.org>.
johnImply commented on PR #16586:
URL: https://github.com/apache/druid/pull/16586#issuecomment-2163556061
Verbiage ... do we need to make a distinction between "supervisor handoff" and "task group handoff"?
I thought a "supervisor handoff" involved cycling all tasks for the supervisor ... this is what we can do by "Open in Data Loader" and then Submit without making any changes to the supervisor spec.
If there is any ambiguity here it might be safer to always reference "task group(s)" as the thing being handed off. My understanding is that Supervisor is merely the orchestrator here.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
Re: [PR] Web console: expose handoff API (druid)
Posted by "ektravel (via GitHub)" <gi...@apache.org>.
ektravel commented on code in PR #16586:
URL: https://github.com/apache/druid/pull/16586#discussion_r1636797295
##########
web-console/src/dialogs/supervisor-handoff-dialog/supervisor-handoff-dialog.tsx:
##########
@@ -0,0 +1,64 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { FormGroup, Intent, Tag } from '@blueprintjs/core';
+import React, { useState } from 'react';
+
+import { ArrayInput } from '../../components';
+import { Api } from '../../singletons';
+import { AsyncActionDialog } from '../async-action-dialog/async-action-dialog';
+
+export interface SupervisorHandoffDialogProps {
+ supervisorId: string;
+ onSuccess(): void;
+ onClose(): void;
+}
+
+export function SupervisorHandoffDialog(props: SupervisorHandoffDialogProps) {
+ const { supervisorId, onSuccess, onClose } = props;
+ const [groupIds, setGroupIds] = useState<string[]>([]);
+
+ return (
+ <AsyncActionDialog
+ action={async () => {
+ const resp = await Api.instance.post(
+ `/druid/indexer/v1/supervisor/${Api.encodePath(supervisorId)}/taskGroups/handoff`,
+ { taskGroupIds: groupIds.map(x => parseInt(x, 10)) },
+ );
+ return resp.data;
+ }}
+ confirmButtonText="Handoff supervisor"
+ successText="Supervisor handoff has been inititated"
Review Comment:
```suggestion
successText="Supervisor handoff has been initiated"
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
Re: [PR] Web console: expose handoff API (druid)
Posted by "ektravel (via GitHub)" <gi...@apache.org>.
ektravel commented on code in PR #16586:
URL: https://github.com/apache/druid/pull/16586#discussion_r1636796046
##########
web-console/src/dialogs/supervisor-handoff-dialog/supervisor-handoff-dialog.tsx:
##########
@@ -0,0 +1,64 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { FormGroup, Intent, Tag } from '@blueprintjs/core';
+import React, { useState } from 'react';
+
+import { ArrayInput } from '../../components';
+import { Api } from '../../singletons';
+import { AsyncActionDialog } from '../async-action-dialog/async-action-dialog';
+
+export interface SupervisorHandoffDialogProps {
+ supervisorId: string;
+ onSuccess(): void;
+ onClose(): void;
+}
+
+export function SupervisorHandoffDialog(props: SupervisorHandoffDialogProps) {
+ const { supervisorId, onSuccess, onClose } = props;
+ const [groupIds, setGroupIds] = useState<string[]>([]);
+
+ return (
+ <AsyncActionDialog
+ action={async () => {
+ const resp = await Api.instance.post(
+ `/druid/indexer/v1/supervisor/${Api.encodePath(supervisorId)}/taskGroups/handoff`,
+ { taskGroupIds: groupIds.map(x => parseInt(x, 10)) },
+ );
+ return resp.data;
+ }}
+ confirmButtonText="Handoff supervisor"
+ successText="Supervisor handoff has been inititated"
+ failText="Could not initiate handoff for supervisor"
Review Comment:
```suggestion
failText="Could not initiate handoff for the supervisor"
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
Re: [PR] Web console: expose handoff API (druid)
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #16586:
URL: https://github.com/apache/druid/pull/16586#issuecomment-2282943831
This pull request has been marked as stale due to 60 days of inactivity.
It will be closed in 4 weeks if no further activity occurs. If you think
that's incorrect or this pull request should instead be reviewed, please simply
write any comment. Even if closed, you can still revive the PR at any time or
discuss it on the dev@druid.apache.org list.
Thank you for your contributions.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
Re: [PR] Web console: expose handoff API (druid)
Posted by "vogievetsky (via GitHub)" <gi...@apache.org>.
vogievetsky merged PR #16586:
URL: https://github.com/apache/druid/pull/16586
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org