Re: [DISCUSS] Adding the generation of sboms to our build?

2023-07-14 Thread Xiangdong Huang
Hi Chris,

Look forward! SBOM has also received a lot of attention in China.
Which kind of  format/standard it will obey?

Best,
---
Xiangdong Huang

Christofer Dutz  于2023年7月14日周五 21:28写道:
>
> Hi all,
>
> here in Europe we’re currently preparing for quite a bit of an earthquake 
> caused by the Cyber-Resiliency-Act. In some projects I’m involved in (Mainly 
> PLC4X) I’ve started initiating small changes which could make us come out 
> without too many problems.
>
> One thing that seems to be coming up in both the EU as well as the US acts, 
> are the requirement to publish SBOM information (Software Bill Of Material). 
> As we are also using Maven as a build tool, I’ve got a configuration in our 
> poms that ensures an Apache release also produces an SBOM, that we will be 
> able to deploy.
>
> Are we interested in adding that to the IoTDB build?
>
> Chris


Re: Usage of Singleton pattern?

2023-07-14 Thread Xiangdong Huang
+1, too.
---
Xiangdong Huang


Jialin Qiao  于2023年7月14日周五 21:30写道:
>
> +1 for cleaning it
> —
> Jialin Qiao
> Apache IoTDB PMC
>
> Yuan Tian  于2023年7月14日周五 21:28写道:
> >
> > Sure! Do as you want! We would love to see these refactoring prs.
> >
> >
> > Best,
> > --
> > Yuan Tian
> >
> > On Fri, Jul 14, 2023 at 9:20 PM Christofer Dutz
> >  wrote:
> > >
> > > Aaah cool,
> > >
> > > and sorry for asking so much … much of IoTDBs history is not recorded and 
> > > I’m just starting to get my hands dirty.
> > > I am afraid, that I’ll probably have more questions like this as they 
> > > come up.
> > >
> > > But that means, if I see something that can be refactored quickly, I can 
> > > create PRs for stuff like that?
> > >
> > > Just asking, cause I like to do simple maintenance tasks in order to 
> > > think about other problems.
> > > In PLC4X I usually did cleanups regularly for such reasons.
> > >
> > > Chris
> > >
> > >
> > > Von: Yuan Tian 
> > > Datum: Freitag, 14. Juli 2023 um 13:58
> > > An: dev@iotdb.apache.org 
> > > Betreff: Re: Usage of Singleton pattern?
> > > Hi Chris,
> > >
> > > Actually, most of the existing  Singleton pattern Class is just for
> > > simplifying things during development. And we did run into trouble
> > > when writing some UTs(In such case, I will change related Singleton
> > > pattern Class ).
> > > But there are always higher priority tasks, so there is no time to
> > > change all these singletons. Good news is that we have strictly
> > > controlled the use of singletons in the new PRs, so there should be no
> > > more new ones.
> > >
> > > Best,
> > > 
> > > Yuan Tian
> > >
> > > On Fri, Jul 14, 2023 at 7:14 PM Christofer Dutz
> > >  wrote:
> > > >
> > > > Hi all,
> > > >
> > > > as I’m digging into IoTDB more and more, I noticed a quite excessive 
> > > > usage of the Singleton pattern … some times even for things where it 
> > > > doesn’t really make much sense. For example in SystemFileFactory, the 
> > > > methods don’t really have much state and simply fire RuntimeExceptions 
> > > > if fsType is initialized with HDFS.
> > > >
> > > > Singletons make it a bit tricky to run tests in parallel and to do 
> > > > dynamic reloading of modules (like in OSGI). Most projects I’ve worked 
> > > > on try to limit the use of singletons to an absolute minimum due to 
> > > > these problems.
> > > >
> > > > I guess embedding IoTDB in an OSGI environment hasn’t been a use-case 
> > > > yet, but I could imagine that random test failures while running tests 
> > > > in parallel probably could have caused some issues.
> > > >
> > > > Was this a design decision that is based on some real-world necessity, 
> > > > or for simplifying things during development?
> > > > I don’t want to put too much effort into proposing cleaning up things, 
> > > > if there was a conscious decision to do things otherwise.
> > > >
> > > > Chris
> > > >


Re: [DISCUSS] Setup Sonarcloud for IoTDB?

2023-07-14 Thread Xiangdong Huang
+1 for renaming.

BTW, seems IoTDB's sonar setting has some errors that test  code
coverage can not be catched.

Best,
---
Xiangdong Huang
School of Software, Tsinghua University

 黄向东
清华大学 软件学院

Yuan Tian  于2023年7月15日周六 09:50写道:
>
> We would like to  see that for sure.
>
>
> Best,
> --
> Yuan Tian
>
> On Fri, Jul 14, 2023 at 10:13 PM Christofer Dutz
>  wrote:
> >
> > We have to file a Jira ticket for Infra … but wanted to know, if it would 
> > be ok for you folks for me to do that.
> >
> > Chris
> >
> > Von: Yuan Tian 
> > Datum: Freitag, 14. Juli 2023 um 15:40
> > An: dev@iotdb.apache.org 
> > Betreff: Re: [DISCUSS] Setup Sonarcloud for IoTDB?
> > Aha, that's right. Do you know how to change that name? I didn't find
> > where to change that name before.
> >
> > Best,
> > 
> > Yuan Tian
> >
> > On Fri, Jul 14, 2023 at 9:31 PM Christofer Dutz
> >  wrote:
> > >
> > > Hehe … ok … so because of the “incubator” in there, I didn’t find it ;-)
> > >
> > > Chris
> > >
> > >
> > > Von: Jialin Qiao 
> > > Datum: Freitag, 14. Juli 2023 um 15:29
> > > An: dev@iotdb.apache.org 
> > > Betreff: Re: [DISCUSS] Setup Sonarcloud for IoTDB?
> > > Hi,
> > >
> > > We have the sonar cloud:
> > > https://sonarcloud.io/project/overview?id=apache_incubator-iotdb
> > > But it is only for committers: https://github.com/apache/iotdb/pull/10548
> > >
> > > Thanks,
> > > —
> > > Jialin Qiao
> > > Apache IoTDB PMC
> > >
> > > Christofer Dutz  于2023年7月14日周五 21:24写道:
> > > >
> > > > Hi folks,
> > > >
> > > > I just had a look and noticed that we currently don’t have Sonarcloud 
> > > > analysis setup.
> > > > At apache we have free access to using it for open-soucre and I’d like 
> > > > to suggest to start using it. Some of the things it reports are 
> > > > definitely going to be false positives, but it also spots a lot of 
> > > > things that could cause problems before anyone has to file a bug report.
> > > >
> > > > What are your thoughts on this?
> > > >
> > > > Chris
> > > >


[BUILD-FAILURE]: Job 'IoTDB/IoTDB-pip-new/master [master] [288]'

2023-07-14 Thread Apache Jenkins Server
BUILD-FAILURE: Job 'IoTDB/IoTDB-pip-new/master [master] [288]':

Check console output at "https://ci-builds.apache.org/job/IoTDB/job/IoTDB-pip-new/job/master/288/;>IoTDB/IoTDB-pip-new/master
 [master] [288]"

Re: [DISCUSS] Setup Sonarcloud for IoTDB?

2023-07-14 Thread Yuan Tian
We would like to  see that for sure.


Best,
--
Yuan Tian

On Fri, Jul 14, 2023 at 10:13 PM Christofer Dutz
 wrote:
>
> We have to file a Jira ticket for Infra … but wanted to know, if it would be 
> ok for you folks for me to do that.
>
> Chris
>
> Von: Yuan Tian 
> Datum: Freitag, 14. Juli 2023 um 15:40
> An: dev@iotdb.apache.org 
> Betreff: Re: [DISCUSS] Setup Sonarcloud for IoTDB?
> Aha, that's right. Do you know how to change that name? I didn't find
> where to change that name before.
>
> Best,
> 
> Yuan Tian
>
> On Fri, Jul 14, 2023 at 9:31 PM Christofer Dutz
>  wrote:
> >
> > Hehe … ok … so because of the “incubator” in there, I didn’t find it ;-)
> >
> > Chris
> >
> >
> > Von: Jialin Qiao 
> > Datum: Freitag, 14. Juli 2023 um 15:29
> > An: dev@iotdb.apache.org 
> > Betreff: Re: [DISCUSS] Setup Sonarcloud for IoTDB?
> > Hi,
> >
> > We have the sonar cloud:
> > https://sonarcloud.io/project/overview?id=apache_incubator-iotdb
> > But it is only for committers: https://github.com/apache/iotdb/pull/10548
> >
> > Thanks,
> > —
> > Jialin Qiao
> > Apache IoTDB PMC
> >
> > Christofer Dutz  于2023年7月14日周五 21:24写道:
> > >
> > > Hi folks,
> > >
> > > I just had a look and noticed that we currently don’t have Sonarcloud 
> > > analysis setup.
> > > At apache we have free access to using it for open-soucre and I’d like to 
> > > suggest to start using it. Some of the things it reports are definitely 
> > > going to be false positives, but it also spots a lot of things that could 
> > > cause problems before anyone has to file a bug report.
> > >
> > > What are your thoughts on this?
> > >
> > > Chris
> > >


AW: [DISCUSS] Setup Sonarcloud for IoTDB?

2023-07-14 Thread Christofer Dutz
We have to file a Jira ticket for Infra … but wanted to know, if it would be ok 
for you folks for me to do that.

Chris

Von: Yuan Tian 
Datum: Freitag, 14. Juli 2023 um 15:40
An: dev@iotdb.apache.org 
Betreff: Re: [DISCUSS] Setup Sonarcloud for IoTDB?
Aha, that's right. Do you know how to change that name? I didn't find
where to change that name before.

Best,

Yuan Tian

On Fri, Jul 14, 2023 at 9:31 PM Christofer Dutz
 wrote:
>
> Hehe … ok … so because of the “incubator” in there, I didn’t find it ;-)
>
> Chris
>
>
> Von: Jialin Qiao 
> Datum: Freitag, 14. Juli 2023 um 15:29
> An: dev@iotdb.apache.org 
> Betreff: Re: [DISCUSS] Setup Sonarcloud for IoTDB?
> Hi,
>
> We have the sonar cloud:
> https://sonarcloud.io/project/overview?id=apache_incubator-iotdb
> But it is only for committers: https://github.com/apache/iotdb/pull/10548
>
> Thanks,
> —
> Jialin Qiao
> Apache IoTDB PMC
>
> Christofer Dutz  于2023年7月14日周五 21:24写道:
> >
> > Hi folks,
> >
> > I just had a look and noticed that we currently don’t have Sonarcloud 
> > analysis setup.
> > At apache we have free access to using it for open-soucre and I’d like to 
> > suggest to start using it. Some of the things it reports are definitely 
> > going to be false positives, but it also spots a lot of things that could 
> > cause problems before anyone has to file a bug report.
> >
> > What are your thoughts on this?
> >
> > Chris
> >


Re: [DISCUSS] Setup Sonarcloud for IoTDB?

2023-07-14 Thread Yuan Tian
Aha, that's right. Do you know how to change that name? I didn't find
where to change that name before.

Best,

Yuan Tian

On Fri, Jul 14, 2023 at 9:31 PM Christofer Dutz
 wrote:
>
> Hehe … ok … so because of the “incubator” in there, I didn’t find it ;-)
>
> Chris
>
>
> Von: Jialin Qiao 
> Datum: Freitag, 14. Juli 2023 um 15:29
> An: dev@iotdb.apache.org 
> Betreff: Re: [DISCUSS] Setup Sonarcloud for IoTDB?
> Hi,
>
> We have the sonar cloud:
> https://sonarcloud.io/project/overview?id=apache_incubator-iotdb
> But it is only for committers: https://github.com/apache/iotdb/pull/10548
>
> Thanks,
> —
> Jialin Qiao
> Apache IoTDB PMC
>
> Christofer Dutz  于2023年7月14日周五 21:24写道:
> >
> > Hi folks,
> >
> > I just had a look and noticed that we currently don’t have Sonarcloud 
> > analysis setup.
> > At apache we have free access to using it for open-soucre and I’d like to 
> > suggest to start using it. Some of the things it reports are definitely 
> > going to be false positives, but it also spots a lot of things that could 
> > cause problems before anyone has to file a bug report.
> >
> > What are your thoughts on this?
> >
> > Chris
> >


AW: [DISCUSS] Setup Sonarcloud for IoTDB?

2023-07-14 Thread Christofer Dutz
Hi all,

Any objections to rename the project from “incubator-iotdb” to “iotdb”?
It seems that we’d need to file an infra ticket and they’d rename it for us.

Chris

Von: Christofer Dutz 
Datum: Freitag, 14. Juli 2023 um 15:34
An: dev@iotdb.apache.org 
Betreff: AW: [DISCUSS] Setup Sonarcloud for IoTDB?
So, we’re currently running it in GitHub Actions?
In PLC4X we’re running it as part of our Jenkins build.
But I guess there too it’s only for committers … but that makes sense as I 
think even running it on multiple branches would mix up the results, right?

Chris

Von: Jialin Qiao 
Datum: Freitag, 14. Juli 2023 um 15:29
An: dev@iotdb.apache.org 
Betreff: Re: [DISCUSS] Setup Sonarcloud for IoTDB?
Hi,

We have the sonar cloud:
https://sonarcloud.io/project/overview?id=apache_incubator-iotdb
But it is only for committers: https://github.com/apache/iotdb/pull/10548

Thanks,
―
Jialin Qiao
Apache IoTDB PMC

Christofer Dutz  于2023年7月14日周五 21:24写道:
>
> Hi folks,
>
> I just had a look and noticed that we currently don’t have Sonarcloud 
> analysis setup.
> At apache we have free access to using it for open-soucre and I’d like to 
> suggest to start using it. Some of the things it reports are definitely going 
> to be false positives, but it also spots a lot of things that could cause 
> problems before anyone has to file a bug report.
>
> What are your thoughts on this?
>
> Chris
>


AW: [DISCUSS] Setup Sonarcloud for IoTDB?

2023-07-14 Thread Christofer Dutz
So, we’re currently running it in GitHub Actions?
In PLC4X we’re running it as part of our Jenkins build.
But I guess there too it’s only for committers … but that makes sense as I 
think even running it on multiple branches would mix up the results, right?

Chris

Von: Jialin Qiao 
Datum: Freitag, 14. Juli 2023 um 15:29
An: dev@iotdb.apache.org 
Betreff: Re: [DISCUSS] Setup Sonarcloud for IoTDB?
Hi,

We have the sonar cloud:
https://sonarcloud.io/project/overview?id=apache_incubator-iotdb
But it is only for committers: https://github.com/apache/iotdb/pull/10548

Thanks,
―
Jialin Qiao
Apache IoTDB PMC

Christofer Dutz  于2023年7月14日周五 21:24写道:
>
> Hi folks,
>
> I just had a look and noticed that we currently don’t have Sonarcloud 
> analysis setup.
> At apache we have free access to using it for open-soucre and I’d like to 
> suggest to start using it. Some of the things it reports are definitely going 
> to be false positives, but it also spots a lot of things that could cause 
> problems before anyone has to file a bug report.
>
> What are your thoughts on this?
>
> Chris
>


AW: [DISCUSS] Setup Sonarcloud for IoTDB?

2023-07-14 Thread Christofer Dutz
Hehe … ok … so because of the “incubator” in there, I didn’t find it ;-)

Chris


Von: Jialin Qiao 
Datum: Freitag, 14. Juli 2023 um 15:29
An: dev@iotdb.apache.org 
Betreff: Re: [DISCUSS] Setup Sonarcloud for IoTDB?
Hi,

We have the sonar cloud:
https://sonarcloud.io/project/overview?id=apache_incubator-iotdb
But it is only for committers: https://github.com/apache/iotdb/pull/10548

Thanks,
―
Jialin Qiao
Apache IoTDB PMC

Christofer Dutz  于2023年7月14日周五 21:24写道:
>
> Hi folks,
>
> I just had a look and noticed that we currently don’t have Sonarcloud 
> analysis setup.
> At apache we have free access to using it for open-soucre and I’d like to 
> suggest to start using it. Some of the things it reports are definitely going 
> to be false positives, but it also spots a lot of things that could cause 
> problems before anyone has to file a bug report.
>
> What are your thoughts on this?
>
> Chris
>


Re: Usage of Singleton pattern?

2023-07-14 Thread Jialin Qiao
+1 for cleaning it
—
Jialin Qiao
Apache IoTDB PMC

Yuan Tian  于2023年7月14日周五 21:28写道:
>
> Sure! Do as you want! We would love to see these refactoring prs.
>
>
> Best,
> --
> Yuan Tian
>
> On Fri, Jul 14, 2023 at 9:20 PM Christofer Dutz
>  wrote:
> >
> > Aaah cool,
> >
> > and sorry for asking so much … much of IoTDBs history is not recorded and 
> > I’m just starting to get my hands dirty.
> > I am afraid, that I’ll probably have more questions like this as they come 
> > up.
> >
> > But that means, if I see something that can be refactored quickly, I can 
> > create PRs for stuff like that?
> >
> > Just asking, cause I like to do simple maintenance tasks in order to think 
> > about other problems.
> > In PLC4X I usually did cleanups regularly for such reasons.
> >
> > Chris
> >
> >
> > Von: Yuan Tian 
> > Datum: Freitag, 14. Juli 2023 um 13:58
> > An: dev@iotdb.apache.org 
> > Betreff: Re: Usage of Singleton pattern?
> > Hi Chris,
> >
> > Actually, most of the existing  Singleton pattern Class is just for
> > simplifying things during development. And we did run into trouble
> > when writing some UTs(In such case, I will change related Singleton
> > pattern Class ).
> > But there are always higher priority tasks, so there is no time to
> > change all these singletons. Good news is that we have strictly
> > controlled the use of singletons in the new PRs, so there should be no
> > more new ones.
> >
> > Best,
> > 
> > Yuan Tian
> >
> > On Fri, Jul 14, 2023 at 7:14 PM Christofer Dutz
> >  wrote:
> > >
> > > Hi all,
> > >
> > > as I’m digging into IoTDB more and more, I noticed a quite excessive 
> > > usage of the Singleton pattern … some times even for things where it 
> > > doesn’t really make much sense. For example in SystemFileFactory, the 
> > > methods don’t really have much state and simply fire RuntimeExceptions if 
> > > fsType is initialized with HDFS.
> > >
> > > Singletons make it a bit tricky to run tests in parallel and to do 
> > > dynamic reloading of modules (like in OSGI). Most projects I’ve worked on 
> > > try to limit the use of singletons to an absolute minimum due to these 
> > > problems.
> > >
> > > I guess embedding IoTDB in an OSGI environment hasn’t been a use-case 
> > > yet, but I could imagine that random test failures while running tests in 
> > > parallel probably could have caused some issues.
> > >
> > > Was this a design decision that is based on some real-world necessity, or 
> > > for simplifying things during development?
> > > I don’t want to put too much effort into proposing cleaning up things, if 
> > > there was a conscious decision to do things otherwise.
> > >
> > > Chris
> > >


Re: [DISCUSS] Setup Sonarcloud for IoTDB?

2023-07-14 Thread Jialin Qiao
Hi,

We have the sonar cloud:
https://sonarcloud.io/project/overview?id=apache_incubator-iotdb
But it is only for committers: https://github.com/apache/iotdb/pull/10548

Thanks,
—
Jialin Qiao
Apache IoTDB PMC

Christofer Dutz  于2023年7月14日周五 21:24写道:
>
> Hi folks,
>
> I just had a look and noticed that we currently don’t have Sonarcloud 
> analysis setup.
> At apache we have free access to using it for open-soucre and I’d like to 
> suggest to start using it. Some of the things it reports are definitely going 
> to be false positives, but it also spots a lot of things that could cause 
> problems before anyone has to file a bug report.
>
> What are your thoughts on this?
>
> Chris
>


Re: Usage of Singleton pattern?

2023-07-14 Thread Yuan Tian
Sure! Do as you want! We would love to see these refactoring prs.


Best,
--
Yuan Tian

On Fri, Jul 14, 2023 at 9:20 PM Christofer Dutz
 wrote:
>
> Aaah cool,
>
> and sorry for asking so much … much of IoTDBs history is not recorded and I’m 
> just starting to get my hands dirty.
> I am afraid, that I’ll probably have more questions like this as they come up.
>
> But that means, if I see something that can be refactored quickly, I can 
> create PRs for stuff like that?
>
> Just asking, cause I like to do simple maintenance tasks in order to think 
> about other problems.
> In PLC4X I usually did cleanups regularly for such reasons.
>
> Chris
>
>
> Von: Yuan Tian 
> Datum: Freitag, 14. Juli 2023 um 13:58
> An: dev@iotdb.apache.org 
> Betreff: Re: Usage of Singleton pattern?
> Hi Chris,
>
> Actually, most of the existing  Singleton pattern Class is just for
> simplifying things during development. And we did run into trouble
> when writing some UTs(In such case, I will change related Singleton
> pattern Class ).
> But there are always higher priority tasks, so there is no time to
> change all these singletons. Good news is that we have strictly
> controlled the use of singletons in the new PRs, so there should be no
> more new ones.
>
> Best,
> 
> Yuan Tian
>
> On Fri, Jul 14, 2023 at 7:14 PM Christofer Dutz
>  wrote:
> >
> > Hi all,
> >
> > as I’m digging into IoTDB more and more, I noticed a quite excessive usage 
> > of the Singleton pattern … some times even for things where it doesn’t 
> > really make much sense. For example in SystemFileFactory, the methods don’t 
> > really have much state and simply fire RuntimeExceptions if fsType is 
> > initialized with HDFS.
> >
> > Singletons make it a bit tricky to run tests in parallel and to do dynamic 
> > reloading of modules (like in OSGI). Most projects I’ve worked on try to 
> > limit the use of singletons to an absolute minimum due to these problems.
> >
> > I guess embedding IoTDB in an OSGI environment hasn’t been a use-case yet, 
> > but I could imagine that random test failures while running tests in 
> > parallel probably could have caused some issues.
> >
> > Was this a design decision that is based on some real-world necessity, or 
> > for simplifying things during development?
> > I don’t want to put too much effort into proposing cleaning up things, if 
> > there was a conscious decision to do things otherwise.
> >
> > Chris
> >


[DISCUSS] Adding the generation of sboms to our build?

2023-07-14 Thread Christofer Dutz
Hi all,

here in Europe we’re currently preparing for quite a bit of an earthquake 
caused by the Cyber-Resiliency-Act. In some projects I’m involved in (Mainly 
PLC4X) I’ve started initiating small changes which could make us come out 
without too many problems.

One thing that seems to be coming up in both the EU as well as the US acts, are 
the requirement to publish SBOM information (Software Bill Of Material). As we 
are also using Maven as a build tool, I’ve got a configuration in our poms that 
ensures an Apache release also produces an SBOM, that we will be able to deploy.

Are we interested in adding that to the IoTDB build?

Chris


[DISCUSS] Setup Sonarcloud for IoTDB?

2023-07-14 Thread Christofer Dutz
Hi folks,

I just had a look and noticed that we currently don’t have Sonarcloud analysis 
setup.
At apache we have free access to using it for open-soucre and I’d like to 
suggest to start using it. Some of the things it reports are definitely going 
to be false positives, but it also spots a lot of things that could cause 
problems before anyone has to file a bug report.

What are your thoughts on this?

Chris



AW: Usage of Singleton pattern?

2023-07-14 Thread Christofer Dutz
Aaah cool,

and sorry for asking so much … much of IoTDBs history is not recorded and I’m 
just starting to get my hands dirty.
I am afraid, that I’ll probably have more questions like this as they come up.

But that means, if I see something that can be refactored quickly, I can create 
PRs for stuff like that?

Just asking, cause I like to do simple maintenance tasks in order to think 
about other problems.
In PLC4X I usually did cleanups regularly for such reasons.

Chris


Von: Yuan Tian 
Datum: Freitag, 14. Juli 2023 um 13:58
An: dev@iotdb.apache.org 
Betreff: Re: Usage of Singleton pattern?
Hi Chris,

Actually, most of the existing  Singleton pattern Class is just for
simplifying things during development. And we did run into trouble
when writing some UTs(In such case, I will change related Singleton
pattern Class ).
But there are always higher priority tasks, so there is no time to
change all these singletons. Good news is that we have strictly
controlled the use of singletons in the new PRs, so there should be no
more new ones.

Best,

Yuan Tian

On Fri, Jul 14, 2023 at 7:14 PM Christofer Dutz
 wrote:
>
> Hi all,
>
> as I’m digging into IoTDB more and more, I noticed a quite excessive usage of 
> the Singleton pattern … some times even for things where it doesn’t really 
> make much sense. For example in SystemFileFactory, the methods don’t really 
> have much state and simply fire RuntimeExceptions if fsType is initialized 
> with HDFS.
>
> Singletons make it a bit tricky to run tests in parallel and to do dynamic 
> reloading of modules (like in OSGI). Most projects I’ve worked on try to 
> limit the use of singletons to an absolute minimum due to these problems.
>
> I guess embedding IoTDB in an OSGI environment hasn’t been a use-case yet, 
> but I could imagine that random test failures while running tests in parallel 
> probably could have caused some issues.
>
> Was this a design decision that is based on some real-world necessity, or for 
> simplifying things during development?
> I don’t want to put too much effort into proposing cleaning up things, if 
> there was a conscious decision to do things otherwise.
>
> Chris
>


Re: Usage of Singleton pattern?

2023-07-14 Thread Yuan Tian
Hi Chris,

Actually, most of the existing  Singleton pattern Class is just for
simplifying things during development. And we did run into trouble
when writing some UTs(In such case, I will change related Singleton
pattern Class ).
But there are always higher priority tasks, so there is no time to
change all these singletons. Good news is that we have strictly
controlled the use of singletons in the new PRs, so there should be no
more new ones.

Best,

Yuan Tian

On Fri, Jul 14, 2023 at 7:14 PM Christofer Dutz
 wrote:
>
> Hi all,
>
> as I’m digging into IoTDB more and more, I noticed a quite excessive usage of 
> the Singleton pattern … some times even for things where it doesn’t really 
> make much sense. For example in SystemFileFactory, the methods don’t really 
> have much state and simply fire RuntimeExceptions if fsType is initialized 
> with HDFS.
>
> Singletons make it a bit tricky to run tests in parallel and to do dynamic 
> reloading of modules (like in OSGI). Most projects I’ve worked on try to 
> limit the use of singletons to an absolute minimum due to these problems.
>
> I guess embedding IoTDB in an OSGI environment hasn’t been a use-case yet, 
> but I could imagine that random test failures while running tests in parallel 
> probably could have caused some issues.
>
> Was this a design decision that is based on some real-world necessity, or for 
> simplifying things during development?
> I don’t want to put too much effort into proposing cleaning up things, if 
> there was a conscious decision to do things otherwise.
>
> Chris
>


Usage of Singleton pattern?

2023-07-14 Thread Christofer Dutz
Hi all,

as I’m digging into IoTDB more and more, I noticed a quite excessive usage of 
the Singleton pattern … some times even for things where it doesn’t really make 
much sense. For example in SystemFileFactory, the methods don’t really have 
much state and simply fire RuntimeExceptions if fsType is initialized with HDFS.

Singletons make it a bit tricky to run tests in parallel and to do dynamic 
reloading of modules (like in OSGI). Most projects I’ve worked on try to limit 
the use of singletons to an absolute minimum due to these problems.

I guess embedding IoTDB in an OSGI environment hasn’t been a use-case yet, but 
I could imagine that random test failures while running tests in parallel 
probably could have caused some issues.

Was this a design decision that is based on some real-world necessity, or for 
simplifying things during development?
I don’t want to put too much effort into proposing cleaning up things, if there 
was a conscious decision to do things otherwise.

Chris



AW: What are all the empty "ext" directories for?

2023-07-14 Thread Christofer Dutz
Ok … so having had a look, it seems as if this happens in the 
UDFExecutableManager
Class (And the matching other Manager components. The “SystemFileFactory
.makeDirIfNecessary” are the ones creating them.
Possibly worth investigating if they really need to exist, of if we could 
change the Managers to check if they exist.

Chris


Von: Xiangdong Huang 
Datum: Freitag, 14. Juli 2023 um 09:15
An: dev@iotdb.apache.org 
Betreff: Re: What are all the empty "ext" directories for?
> I can imagine what it’s used for … I was more just asking, why it’s creating 
> these directories locally instead of just looking if they exist. Always feels 
> a bit odd, if loads of empty directories are in my filesystem.

agree with that feeling... this can be indeed an improvement if it
does not bring too much complexity.

Best,
---
Xiangdong Huang

Christofer Dutz  于2023年7月14日周五 14:30写道:
>
> Hi Xiangdong,
>
> I can imagine what it’s used for … I was more just asking, why it’s creating 
> these directories locally instead of just looking if they exist. Always feels 
> a bit odd, if loads of empty directories are in my filesystem.
>
> Chris
>
> Von: Xiangdong Huang 
> Datum: Freitag, 14. Juli 2023 um 07:51
> An: dev@iotdb.apache.org 
> Betreff: Re: What are all the empty "ext" directories for?
> "ext" refers to "extension", and its subfolder:
> - trigger, similar with trigger in RDBMS.
> - udf, user define functions.
> - PIPE, a new function for ETL or data subscription.
>
> All the above need to users claiming their data processing logic using
> jar files.
> So as Trevor said, you can put your jar files there.
>
>
> Best,
> ---
> Xiangdong Huang
>
> 18110526...@163.com <18110526...@163.com> 于2023年7月14日周五 08:55写道:
> >
> > We have written the relevant documentation, you can see 
> > https://apache-iotdb.feishu.cn/docx/SG1DdQklco67oaxSLbYcghWxnkc.
> > > 2023年7月12日 20:45,Christofer Dutz  写道:
> > >
> > > Hi,
> > >
> > > so playing around with IoTDB running in embedded mode, I noticed that it 
> > > creates a directory “data” which totally makes sense to me, as it 
> > > contains all the data.
> > > However it also creates a whole tree under “ext” which just seems to 
> > > contain loads of empty directories.
> > > What’s the purpose of these and could we prevent them from being created, 
> > > if they are not needed?
> > >
> > > ext
> > >   /pipe
> > >  /install
> > >  /tmp
> > >/trigger
> > >  /install
> > >  /tmp
> > >/udf
> > >  /install
> > >  /tmp
> > >
> > >
> > > Chris
> >


Re: What are all the empty "ext" directories for?

2023-07-14 Thread Xiangdong Huang
> I can imagine what it’s used for … I was more just asking, why it’s creating 
> these directories locally instead of just looking if they exist. Always feels 
> a bit odd, if loads of empty directories are in my filesystem.

agree with that feeling... this can be indeed an improvement if it
does not bring too much complexity.

Best,
---
Xiangdong Huang

Christofer Dutz  于2023年7月14日周五 14:30写道:
>
> Hi Xiangdong,
>
> I can imagine what it’s used for … I was more just asking, why it’s creating 
> these directories locally instead of just looking if they exist. Always feels 
> a bit odd, if loads of empty directories are in my filesystem.
>
> Chris
>
> Von: Xiangdong Huang 
> Datum: Freitag, 14. Juli 2023 um 07:51
> An: dev@iotdb.apache.org 
> Betreff: Re: What are all the empty "ext" directories for?
> "ext" refers to "extension", and its subfolder:
> - trigger, similar with trigger in RDBMS.
> - udf, user define functions.
> - PIPE, a new function for ETL or data subscription.
>
> All the above need to users claiming their data processing logic using
> jar files.
> So as Trevor said, you can put your jar files there.
>
>
> Best,
> ---
> Xiangdong Huang
>
> 18110526...@163.com <18110526...@163.com> 于2023年7月14日周五 08:55写道:
> >
> > We have written the relevant documentation, you can see 
> > https://apache-iotdb.feishu.cn/docx/SG1DdQklco67oaxSLbYcghWxnkc.
> > > 2023年7月12日 20:45,Christofer Dutz  写道:
> > >
> > > Hi,
> > >
> > > so playing around with IoTDB running in embedded mode, I noticed that it 
> > > creates a directory “data” which totally makes sense to me, as it 
> > > contains all the data.
> > > However it also creates a whole tree under “ext” which just seems to 
> > > contain loads of empty directories.
> > > What’s the purpose of these and could we prevent them from being created, 
> > > if they are not needed?
> > >
> > > ext
> > >   /pipe
> > >  /install
> > >  /tmp
> > >/trigger
> > >  /install
> > >  /tmp
> > >/udf
> > >  /install
> > >  /tmp
> > >
> > >
> > > Chris
> >


AW: What are all the empty "ext" directories for?

2023-07-14 Thread Christofer Dutz
Hi Xiangdong,

I can imagine what it’s used for … I was more just asking, why it’s creating 
these directories locally instead of just looking if they exist. Always feels a 
bit odd, if loads of empty directories are in my filesystem.

Chris

Von: Xiangdong Huang 
Datum: Freitag, 14. Juli 2023 um 07:51
An: dev@iotdb.apache.org 
Betreff: Re: What are all the empty "ext" directories for?
"ext" refers to "extension", and its subfolder:
- trigger, similar with trigger in RDBMS.
- udf, user define functions.
- PIPE, a new function for ETL or data subscription.

All the above need to users claiming their data processing logic using
jar files.
So as Trevor said, you can put your jar files there.


Best,
---
Xiangdong Huang

18110526...@163.com <18110526...@163.com> 于2023年7月14日周五 08:55写道:
>
> We have written the relevant documentation, you can see 
> https://apache-iotdb.feishu.cn/docx/SG1DdQklco67oaxSLbYcghWxnkc.
> > 2023年7月12日 20:45,Christofer Dutz  写道:
> >
> > Hi,
> >
> > so playing around with IoTDB running in embedded mode, I noticed that it 
> > creates a directory “data” which totally makes sense to me, as it contains 
> > all the data.
> > However it also creates a whole tree under “ext” which just seems to 
> > contain loads of empty directories.
> > What’s the purpose of these and could we prevent them from being created, 
> > if they are not needed?
> >
> > ext
> >   /pipe
> >  /install
> >  /tmp
> >/trigger
> >  /install
> >  /tmp
> >/udf
> >  /install
> >  /tmp
> >
> >
> > Chris
>


AW: What are all the empty "ext" directories for?

2023-07-14 Thread Christofer Dutz
(With my Apache Member Hat on)

This relevant information should also be available to all without needing to 
request access.

Chris

Von: 18110526...@163.com <18110526...@163.com>
Datum: Freitag, 14. Juli 2023 um 02:55
An: dev@iotdb.apache.org 
Betreff: Re: What are all the empty "ext" directories for?
We have written the relevant documentation, you can see 
https://apache-iotdb.feishu.cn/docx/SG1DdQklco67oaxSLbYcghWxnkc.
> 2023年7月12日 20:45,Christofer Dutz  写道:
>
> Hi,
>
> so playing around with IoTDB running in embedded mode, I noticed that it 
> creates a directory “data” which totally makes sense to me, as it contains 
> all the data.
> However it also creates a whole tree under “ext” which just seems to contain 
> loads of empty directories.
> What’s the purpose of these and could we prevent them from being created, if 
> they are not needed?
>
> ext
>   /pipe
>  /install
>  /tmp
>/trigger
>  /install
>  /tmp
>/udf
>  /install
>  /tmp
>
>
> Chris