You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by Fabian Lange <fa...@codecentric.de> on 2015/12/11 09:05:31 UTC

Add Feature to Felix Fileinstall for Different Handling of Nested Directories

Hia,
as an Apache Karaf user I was today surprised to see fileinstalls behaviour
in a Profiler

I am using the feature to provide multiple directories.
I am using karaf/etc,karaf/etc/mystuff

What I did learn is that "mystuff" is already scanned but treated as jar
file. Sadly thats a big performance hog with a small update interval,
because it creates temp files and copies the whole directory into it.
I have actually not figured out how I would use that feature to be honest.

What I however propose to do is to add a

felix.fileinstall.subdirectory.mode = jar | recurese | skip
Would this break any current functionality? when set to recurse or skip?

How would be the process to integrate my changes? I could provide a diff.

And if somebody minds, please tell me how that jar thing is supposed to
work :)

Best regards,
Fabian

--
Fabian Lange | Performance Expert
mobil: +49 (0) 160.3673393

codecentric AG | Merscheider Straße 1 | 42699 Solingen | Deutschland

Sitz der Gesellschaft: Solingen | HRB 25917| Amtsgericht Wuppertal
Vorstand: Michael Hochgürtel . Mirko Novakovic . Rainer Vehns
Aufsichtsrat: Patric Fedlmeier (Vorsitzender) . Klaus Jäger . Jürgen Schütz

Re: Add Feature to Felix Fileinstall for Different Handling of Nested Directories

Posted by Raymond Auge <ra...@liferay.com>.
Isn't the filter already enough to handle this?

- Ray
On Dec 11, 2015 07:40, "Fabian Lange" <fa...@codecentric.de> wrote:

> Hi Guillaume,
> thanks for the reply.
> I have implemented a proposal
>
> https://github.com/CodingFabian/felix/commit/3d9d9b17ede1e480b4f52d8a43d0f946694a47b4
>
> I also replace SecureRandom with Random, because thats just overkill for
> avoiding temp file collisions:
>
>
> https://github.com/CodingFabian/felix/commit/69fce7ce5292d6287477debee384841402f51718
>
> I do not know how I can find the JIRA you mentioned. Would you take care of
> the bookkeeping for me?
> Thank you
>
> Fabian
>
> On Fri, Dec 11, 2015 at 10:56 AM, Guillaume Nodet <gn...@apache.org>
> wrote:
>
> > If the default mode is the same as before, this should keep
> compatibility.
> > I don't have any problem adding a flag to disable directory processing,
> and
> > the proposed solution looks good to me (jar | recurse | skip).
> > The way to go would be to create a JIRA (actually, I think one already
> > exists for that) and attach a patch or provide a github pull request.
> >
> > 2015-12-11 9:05 GMT+01:00 Fabian Lange <fa...@codecentric.de>:
> >
> > > Hia,
> > > as an Apache Karaf user I was today surprised to see fileinstalls
> > behaviour
> > > in a Profiler
> > >
> > > I am using the feature to provide multiple directories.
> > > I am using karaf/etc,karaf/etc/mystuff
> > >
> > > What I did learn is that "mystuff" is already scanned but treated as
> jar
> > > file. Sadly thats a big performance hog with a small update interval,
> > > because it creates temp files and copies the whole directory into it.
> > > I have actually not figured out how I would use that feature to be
> > honest.
> > >
> > > What I however propose to do is to add a
> > >
> > > felix.fileinstall.subdirectory.mode = jar | recurese | skip
> > > Would this break any current functionality? when set to recurse or
> skip?
> > >
> > > How would be the process to integrate my changes? I could provide a
> diff.
> > >
> > > And if somebody minds, please tell me how that jar thing is supposed to
> > > work :)
> > >
> > > Best regards,
> > > Fabian
> > >
> > > --
> > > Fabian Lange | Performance Expert
> > > mobil: +49 (0) 160.3673393
> > >
> > > codecentric AG | Merscheider Straße 1 | 42699 Solingen | Deutschland
> > >
> > > Sitz der Gesellschaft: Solingen | HRB 25917| Amtsgericht Wuppertal
> > > Vorstand: Michael Hochgürtel . Mirko Novakovic . Rainer Vehns
> > > Aufsichtsrat: Patric Fedlmeier (Vorsitzender) . Klaus Jäger . Jürgen
> > Schütz
> > >
> >
>

Re: Add Feature to Felix Fileinstall for Different Handling of Nested Directories

Posted by Fabian Lange <fa...@codecentric.de>.
Hi Guillaume,
thanks for the reply.
I have implemented a proposal
https://github.com/CodingFabian/felix/commit/3d9d9b17ede1e480b4f52d8a43d0f946694a47b4

I also replace SecureRandom with Random, because thats just overkill for
avoiding temp file collisions:

https://github.com/CodingFabian/felix/commit/69fce7ce5292d6287477debee384841402f51718

I do not know how I can find the JIRA you mentioned. Would you take care of
the bookkeeping for me?
Thank you

Fabian

On Fri, Dec 11, 2015 at 10:56 AM, Guillaume Nodet <gn...@apache.org> wrote:

> If the default mode is the same as before, this should keep compatibility.
> I don't have any problem adding a flag to disable directory processing, and
> the proposed solution looks good to me (jar | recurse | skip).
> The way to go would be to create a JIRA (actually, I think one already
> exists for that) and attach a patch or provide a github pull request.
>
> 2015-12-11 9:05 GMT+01:00 Fabian Lange <fa...@codecentric.de>:
>
> > Hia,
> > as an Apache Karaf user I was today surprised to see fileinstalls
> behaviour
> > in a Profiler
> >
> > I am using the feature to provide multiple directories.
> > I am using karaf/etc,karaf/etc/mystuff
> >
> > What I did learn is that "mystuff" is already scanned but treated as jar
> > file. Sadly thats a big performance hog with a small update interval,
> > because it creates temp files and copies the whole directory into it.
> > I have actually not figured out how I would use that feature to be
> honest.
> >
> > What I however propose to do is to add a
> >
> > felix.fileinstall.subdirectory.mode = jar | recurese | skip
> > Would this break any current functionality? when set to recurse or skip?
> >
> > How would be the process to integrate my changes? I could provide a diff.
> >
> > And if somebody minds, please tell me how that jar thing is supposed to
> > work :)
> >
> > Best regards,
> > Fabian
> >
> > --
> > Fabian Lange | Performance Expert
> > mobil: +49 (0) 160.3673393
> >
> > codecentric AG | Merscheider Straße 1 | 42699 Solingen | Deutschland
> >
> > Sitz der Gesellschaft: Solingen | HRB 25917| Amtsgericht Wuppertal
> > Vorstand: Michael Hochgürtel . Mirko Novakovic . Rainer Vehns
> > Aufsichtsrat: Patric Fedlmeier (Vorsitzender) . Klaus Jäger . Jürgen
> Schütz
> >
>

Re: Add Feature to Felix Fileinstall for Different Handling of Nested Directories

Posted by Guillaume Nodet <gn...@apache.org>.
If the default mode is the same as before, this should keep compatibility.
I don't have any problem adding a flag to disable directory processing, and
the proposed solution looks good to me (jar | recurse | skip).
The way to go would be to create a JIRA (actually, I think one already
exists for that) and attach a patch or provide a github pull request.

2015-12-11 9:05 GMT+01:00 Fabian Lange <fa...@codecentric.de>:

> Hia,
> as an Apache Karaf user I was today surprised to see fileinstalls behaviour
> in a Profiler
>
> I am using the feature to provide multiple directories.
> I am using karaf/etc,karaf/etc/mystuff
>
> What I did learn is that "mystuff" is already scanned but treated as jar
> file. Sadly thats a big performance hog with a small update interval,
> because it creates temp files and copies the whole directory into it.
> I have actually not figured out how I would use that feature to be honest.
>
> What I however propose to do is to add a
>
> felix.fileinstall.subdirectory.mode = jar | recurese | skip
> Would this break any current functionality? when set to recurse or skip?
>
> How would be the process to integrate my changes? I could provide a diff.
>
> And if somebody minds, please tell me how that jar thing is supposed to
> work :)
>
> Best regards,
> Fabian
>
> --
> Fabian Lange | Performance Expert
> mobil: +49 (0) 160.3673393
>
> codecentric AG | Merscheider Straße 1 | 42699 Solingen | Deutschland
>
> Sitz der Gesellschaft: Solingen | HRB 25917| Amtsgericht Wuppertal
> Vorstand: Michael Hochgürtel . Mirko Novakovic . Rainer Vehns
> Aufsichtsrat: Patric Fedlmeier (Vorsitzender) . Klaus Jäger . Jürgen Schütz
>