You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@helix.apache.org by "Imran S. Shah" <im...@gmail.com> on 2020/06/12 11:41:36 UTC

Question: How to transition from Master to Error

Hello

I have implemented a standard Master-Slave model. Now let's say my
partitions are in Master state, but however due to some errors (out of disk
space for a particular partition on the participant), I would like the
participant to transition the state to error. However, looking at the
documentation it doesn't look like there is a method that I could call.
Updating the state on the model just updates the local variable and doesn't
notify the controller.

Any pointers or examples would be appreciated.

Thanks,
Imran

Re: Question: How to transition from Master to Error

Posted by Xue Junkai <jx...@apache.org>.
Thanks Akshesh. Disconnecting participants is one way to achieve the goal.
But it could impact the all replicas on that participant.

I would suggest Imran to disable the partition for that instance. So it
will trigger it from Master -> Slave. Then you can throw exception during
the process to make it to ERROR state. Or just peacefully shut it down.

Best,

Junkai

On Sat, Jun 27, 2020 at 6:17 AM Akshesh Doshi <ak...@gmail.com>
wrote:

> Hi Imran
>
> I am not sure if you can mark it as ERROR or not (since the transition
> S->M has already completed successfully) but if you just care about this
> replica going down and spawning a master on another node you can just stop
> this replica by stopping this process or *disconnecting
> <https://github.com/apache/helix/blob/master/helix-core/src/main/java/org/apache/helix/examples/Quickstart.java#L258>*
> this replica from Helix.
>
>
> HTH
> Regards
> Akshesh Doshi
>
>
> On Fri, 19 Jun 2020 at 18:37, Imran S. Shah <im...@gmail.com> wrote:
>
>> Hi Lei,
>>
>> The partition is already in M state as transition was completed quite
>> sometime back. Now, only 1 partition in the participant needs to be moved
>> to ERROR state as some I/O exception has happened. So is there any API that
>> the participant could call to mark this particular partition in ERROR so
>> helix controller can start doing reassignments?
>>
>> Thanks
>> Imran
>>
>> On Mon, Jun 15, 2020 at 7:55 AM Lei Xia <xi...@gmail.com> wrote:
>>
>>> Hi, Imran
>>>
>>>    You can simply throw out an exception from your M->S state
>>> transition, then Helix will mark it as ERROR.
>>>
>>>
>>> Lei
>>>
>>> On Fri, Jun 12, 2020 at 4:41 AM Imran S. Shah <im...@gmail.com>
>>> wrote:
>>>
>>>> Hello
>>>>
>>>> I have implemented a standard Master-Slave model. Now let's say my
>>>> partitions are in Master state, but however due to some errors (out of disk
>>>> space for a particular partition on the participant), I would like the
>>>> participant to transition the state to error. However, looking at the
>>>> documentation it doesn't look like there is a method that I could call.
>>>> Updating the state on the model just updates the local variable and doesn't
>>>> notify the controller.
>>>>
>>>> Any pointers or examples would be appreciated.
>>>>
>>>> Thanks,
>>>> Imran
>>>>
>>>
>>>
>>> --
>>> Lei Xia
>>>
>>

Re: Question: How to transition from Master to Error

Posted by Akshesh Doshi <ak...@gmail.com>.
Hi Imran

I am not sure if you can mark it as ERROR or not (since the transition S->M
has already completed successfully) but if you just care about this replica
going down and spawning a master on another node you can just stop this
replica by stopping this process or *disconnecting
<https://github.com/apache/helix/blob/master/helix-core/src/main/java/org/apache/helix/examples/Quickstart.java#L258>*
this replica from Helix.


HTH
Regards
Akshesh Doshi


On Fri, 19 Jun 2020 at 18:37, Imran S. Shah <im...@gmail.com> wrote:

> Hi Lei,
>
> The partition is already in M state as transition was completed quite
> sometime back. Now, only 1 partition in the participant needs to be moved
> to ERROR state as some I/O exception has happened. So is there any API that
> the participant could call to mark this particular partition in ERROR so
> helix controller can start doing reassignments?
>
> Thanks
> Imran
>
> On Mon, Jun 15, 2020 at 7:55 AM Lei Xia <xi...@gmail.com> wrote:
>
>> Hi, Imran
>>
>>    You can simply throw out an exception from your M->S state transition,
>> then Helix will mark it as ERROR.
>>
>>
>> Lei
>>
>> On Fri, Jun 12, 2020 at 4:41 AM Imran S. Shah <im...@gmail.com>
>> wrote:
>>
>>> Hello
>>>
>>> I have implemented a standard Master-Slave model. Now let's say my
>>> partitions are in Master state, but however due to some errors (out of disk
>>> space for a particular partition on the participant), I would like the
>>> participant to transition the state to error. However, looking at the
>>> documentation it doesn't look like there is a method that I could call.
>>> Updating the state on the model just updates the local variable and doesn't
>>> notify the controller.
>>>
>>> Any pointers or examples would be appreciated.
>>>
>>> Thanks,
>>> Imran
>>>
>>
>>
>> --
>> Lei Xia
>>
>

Re: Question: How to transition from Master to Error

Posted by "Imran S. Shah" <im...@gmail.com>.
Hi Lei,

The partition is already in M state as transition was completed quite
sometime back. Now, only 1 partition in the participant needs to be moved
to ERROR state as some I/O exception has happened. So is there any API that
the participant could call to mark this particular partition in ERROR so
helix controller can start doing reassignments?

Thanks
Imran

On Mon, Jun 15, 2020 at 7:55 AM Lei Xia <xi...@gmail.com> wrote:

> Hi, Imran
>
>    You can simply throw out an exception from your M->S state transition,
> then Helix will mark it as ERROR.
>
>
> Lei
>
> On Fri, Jun 12, 2020 at 4:41 AM Imran S. Shah <im...@gmail.com>
> wrote:
>
>> Hello
>>
>> I have implemented a standard Master-Slave model. Now let's say my
>> partitions are in Master state, but however due to some errors (out of disk
>> space for a particular partition on the participant), I would like the
>> participant to transition the state to error. However, looking at the
>> documentation it doesn't look like there is a method that I could call.
>> Updating the state on the model just updates the local variable and doesn't
>> notify the controller.
>>
>> Any pointers or examples would be appreciated.
>>
>> Thanks,
>> Imran
>>
>
>
> --
> Lei Xia
>

Re: Question: How to transition from Master to Error

Posted by Lei Xia <xi...@gmail.com>.
Hi, Imran

   You can simply throw out an exception from your M->S state transition,
then Helix will mark it as ERROR.


Lei

On Fri, Jun 12, 2020 at 4:41 AM Imran S. Shah <im...@gmail.com> wrote:

> Hello
>
> I have implemented a standard Master-Slave model. Now let's say my
> partitions are in Master state, but however due to some errors (out of disk
> space for a particular partition on the participant), I would like the
> participant to transition the state to error. However, looking at the
> documentation it doesn't look like there is a method that I could call.
> Updating the state on the model just updates the local variable and doesn't
> notify the controller.
>
> Any pointers or examples would be appreciated.
>
> Thanks,
> Imran
>


-- 
Lei Xia

AW: Question: How to transition from Master to Error

Posted by Diot Sébastien <s....@eurodata.de>.
Hello,

In light of recent events, I thought I should point out, that we now live in the “1984” universe,
and some words and expressions have become taboo/forbidden; this is what I mean:

Go has removed all uses of blacklist/whitelist and master/slave
https://go-review.googlesource.com/c/go/+/236857/

All I’m saying is, you have to start being careful what you say,
if you don’t want to get in trouble with a certain community (which I’m not part of).

Regards,

Sébastien Diot
Softwareentwickler
Softwareentwicklung edlohn

eurodata AG | Großblittersdorfer Str. 257-259 | D-66119 Saarbrücken
Telefon +49 681 8808 768 | Telefax +49 681 8808 787 | s.diot@eurodata.de | www.eurodata.de
HRB 101336 Amtsgericht Saarbrücken | USt-IdNr. DE 182634634
Aufsichtsratsvorsitzender: Franz-Josef Wernze
Vorstand: Dieter Leinen und Dr. Dirk Goldner

[cid:image001.png@01D642FF.613CDA40]<https://www.eurodata.de/>
   [cid:image002.png@01D642FF.613CDA40] <https://www.facebook.com/eurodata.de>  [cid:image003.png@01D642FF.613CDA40] <https://www.xing.com/companies/eurodataag>  [cid:image004.png@01D642FF.613CDA40] <https://www.youtube.com/user/eurodataITSolutions>
Von: Imran S. Shah <im...@gmail.com>
Gesendet: Freitag, 12. Juni 2020 13:42
An: user@helix.apache.org
Betreff: Question: How to transition from Master to Error

Hello

I have implemented a standard Master-Slave model. Now let's say my partitions are in Master state, but however due to some errors (out of disk space for a particular partition on the participant), I would like the participant to transition the state to error. However, looking at the documentation it doesn't look like there is a method that I could call. Updating the state on the model just updates the local variable and doesn't notify the controller.

Any pointers or examples would be appreciated.

Thanks,
Imran