You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ratis.apache.org by Mukul Kumar Singh <mk...@gmail.com> on 2019/12/03 15:05:41 UTC
Re: How to instance Message outside ratis project
Hi Tison,
In Ozone the proto files are compiled using the maven plugin.
Please find usage in the following file
https://github.com/apache/hadoop-ozone/blob/master/hadoop-hdds/common/pom.xml#L178.
Thanks,
Mukul
On 30/11/19 4:13 pm, tison wrote:
> Hello here again,
>
> I'm not sure how "Ozone uses the shaded ByteString version". Could you
> please show me the way for doing so?
>
> Best,
> tison.
>
>
> tison <wander4096@gmail.com <ma...@gmail.com>>
> 于2019年11月14日周四 上午11:20写道:
>
> Thanks for your information Mukul!
>
> I have one more question. Even if I want to use the shaded
> ByteString version when
> compile with protoc it requires protobuf-java deps. How can I
> configure protoc use
> the shaded version to generate codes?
>
> Best,
> tison.
>
>
> Mukul Kumar Singh <mksingh.apache@gmail.com
> <ma...@gmail.com>> 于2019年11月14日周四
> 上午11:15写道:
>
> Hi Tison,
>
> Thanks for the interest in Ratis. There are 2 options as you
> have already noticed.
>
> a) Ozone which is a consumer of Ratis, we have used the shaded
> ByteString version in the Ozone codebase.
>
> b) We can have a utility for conversion as you have already
> pointed out.
>
>
> Thanks,
> Mukul
>
>
> On 13/11/19 8:28 pm, tison wrote:
>> Well I find a way to write a utility for convertion.
>>
>> Best,
>> tison.
>>
>>
>> tison <wander4096@gmail.com <ma...@gmail.com>>
>> 于2019年11月13日周三 下午10:46写道:
>>
>> Hi devs,
>>
>> I am trying to develop a filesystem-view storage on
>> ratis, and here is the problem I meet:
>>
>> When I trying to reply within `StateMachine#query` while
>> generating Message, compiler fails on
>> ByteString is not compatible with ByteString. I think it
>> is because ratis use shaded protobuf deps.
>>
>> However, how can I instance Message outside ratis
>> project? Shall I also depends on
>> ratis-thirdparty-misc? Is there a workaround? Or will
>> ratis provides its own abstraction for
>> resolving dep issues?
>>
>> Best,
>> tison.
>>
Re: How to instance Message outside ratis project
Posted by tison <wa...@gmail.com>.
Thanks! I finally use com.google.code.maven-replacer-plugin for generating
my protos as used in ratis-proto and it works well.
Best,
tison.
Mukul Kumar Singh <mk...@gmail.com> 于2019年12月3日周二 下午11:05写道:
> Hi Tison,
>
> In Ozone the proto files are compiled using the maven plugin.
>
> Please find usage in the following file
> https://github.com/apache/hadoop-ozone/blob/master/hadoop-hdds/common/pom.xml#L178
> .
>
>
> Thanks,
>
> Mukul
>
>
> On 30/11/19 4:13 pm, tison wrote:
>
> Hello here again,
>
> I'm not sure how "Ozone uses the shaded ByteString version". Could you
> please show me the way for doing so?
>
> Best,
> tison.
>
>
> tison <wa...@gmail.com> 于2019年11月14日周四 上午11:20写道:
>
>> Thanks for your information Mukul!
>>
>> I have one more question. Even if I want to use the shaded ByteString
>> version when
>> compile with protoc it requires protobuf-java deps. How can I configure
>> protoc use
>> the shaded version to generate codes?
>>
>> Best,
>> tison.
>>
>>
>> Mukul Kumar Singh <mk...@gmail.com> 于2019年11月14日周四 上午11:15写道:
>>
>>> Hi Tison,
>>>
>>> Thanks for the interest in Ratis. There are 2 options as you have
>>> already noticed.
>>>
>>> a) Ozone which is a consumer of Ratis, we have used the shaded
>>> ByteString version in the Ozone codebase.
>>>
>>> b) We can have a utility for conversion as you have already pointed out.
>>>
>>>
>>> Thanks,
>>> Mukul
>>>
>>>
>>> On 13/11/19 8:28 pm, tison wrote:
>>>
>>> Well I find a way to write a utility for convertion.
>>>
>>> Best,
>>> tison.
>>>
>>>
>>> tison <wa...@gmail.com> 于2019年11月13日周三 下午10:46写道:
>>>
>>>> Hi devs,
>>>>
>>>> I am trying to develop a filesystem-view storage on ratis, and here is
>>>> the problem I meet:
>>>>
>>>> When I trying to reply within `StateMachine#query` while generating
>>>> Message, compiler fails on
>>>> ByteString is not compatible with ByteString. I think it is because
>>>> ratis use shaded protobuf deps.
>>>>
>>>> However, how can I instance Message outside ratis project? Shall I also
>>>> depends on
>>>> ratis-thirdparty-misc? Is there a workaround? Or will ratis provides
>>>> its own abstraction for
>>>> resolving dep issues?
>>>>
>>>> Best,
>>>> tison.
>>>>
>>>