You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by Aleksei Valikov <al...@gmail.com> on 2015/06/29 22:46:08 UTC
Classpath resource loading - should it work
Hi,
I'd like to use the "Zero deployment" feature (
https://apacheignite.readme.io/v1.1/docs/zero-deployment).
This works perfect for classes, but what I didn't manage to get working is
a simple classpath resource loading, like:
getClass().getResource(scriptResourceFileName)
This gives me a valid URL on the local node but null on remote nodes.
Before I dig myself neck-deep - is it supposed to work? Compared to the
distributed classloading, having the IGFS on board this seems to be fairly
simple.
I could surely opt to IGFS. It just has a certain appeal to use classpath
resources.
Thank you and best wishes,
Alexey
Re: Classpath resource loading - should it work
Posted by Aleksei Valikov <al...@gmail.com>.
Hi,
ok, so getResourceAsStream(...) should work - this would be enough for my
purposes. Thank you!
Many thanks and best wishes,
Alexey
On Tue, Jun 30, 2015 at 7:56 PM, Yakov Zhdanov <yz...@apache.org> wrote:
> Alex, this does not work. Moreover, I dont think it is possible to support
> this.
>
> I see that getResourceAsStream() should work. You can call it inside your
> job: getClass().getResourceAsStream(PATH) and it should get resource from
> remote node and return stream to you.
>
> --Yakov
>
> 2015-06-29 13:46 GMT-07:00 Aleksei Valikov <al...@gmail.com>:
>
>> Hi,
>>
>> I'd like to use the "Zero deployment" feature (
>> https://apacheignite.readme.io/v1.1/docs/zero-deployment).
>>
>> This works perfect for classes, but what I didn't manage to get working
>> is a simple classpath resource loading, like:
>>
>> getClass().getResource(scriptResourceFileName)
>>
>> This gives me a valid URL on the local node but null on remote nodes.
>>
>> Before I dig myself neck-deep - is it supposed to work? Compared to the
>> distributed classloading, having the IGFS on board this seems to be fairly
>> simple.
>> I could surely opt to IGFS. It just has a certain appeal to use classpath
>> resources.
>>
>> Thank you and best wishes,
>> Alexey
>>
>
>
Re: Classpath resource loading - should it work
Posted by Yakov Zhdanov <yz...@apache.org>.
Alex, this does not work. Moreover, I dont think it is possible to support
this.
I see that getResourceAsStream() should work. You can call it inside your
job: getClass().getResourceAsStream(PATH) and it should get resource from
remote node and return stream to you.
--Yakov
2015-06-29 13:46 GMT-07:00 Aleksei Valikov <al...@gmail.com>:
> Hi,
>
> I'd like to use the "Zero deployment" feature (
> https://apacheignite.readme.io/v1.1/docs/zero-deployment).
>
> This works perfect for classes, but what I didn't manage to get working is
> a simple classpath resource loading, like:
>
> getClass().getResource(scriptResourceFileName)
>
> This gives me a valid URL on the local node but null on remote nodes.
>
> Before I dig myself neck-deep - is it supposed to work? Compared to the
> distributed classloading, having the IGFS on board this seems to be fairly
> simple.
> I could surely opt to IGFS. It just has a certain appeal to use classpath
> resources.
>
> Thank you and best wishes,
> Alexey
>