[jira] [Issue Comment Edited] (CONNECTORS-313) An example multi-process properties.xml delivered to the "dist" folder would be very helpful

2011-12-12 Thread Karl Wright (Issue Comment Edited) (JIRA)

[ 
https://issues.apache.org/jira/browse/CONNECTORS-313?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13167421#comment-13167421
 ] 

Karl Wright edited comment on CONNECTORS-313 at 12/12/11 9:17 AM:
--

Hi Abe-san,

connectors.xml is read by the QuickStart java startup class only at this time.  
You have two choices:

(1) Modify the main build.xml to dynamically build your register.sh script, in 
a manner similar to the way it dynamically builds connectors.xml;
(2) Create a new command class in 
framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler, which parses 
a connectors.xml and performs the corresponding modification (and nothing 
else), and then call that command class from your script.  You may be able to 
move the code for this from framework/jettyrunner, and change the jettyrunner 
code so it is not duplicated.

I'm not sure which is better.  It depends on how people typically deploy the 
multiprocess version.

  was (Author: kwri...@metacarta.com):
Hi Abe-san,

connectors.xml is read by the QuickStart java startup class only at this time.  
You have two choices:

(1) Modify the main build.xml to dynamically build your register.sh script, in 
a manner similar to the way it dynamically builds connectors.xml;
(2) Create a new command class in 
framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler, which parses 
a connectors.xml and performs the corresponding modification (and nothing 
else).  You may be able to move the code for this from framework/jettyrunner, 
and change the jettyrunner code so it is not duplicated.

I'm not sure which is better.  It depends on how people typically deploy the 
multiprocess version.
  
> An example multi-process properties.xml delivered to the "dist" folder would 
> be very helpful
> 
>
> Key: CONNECTORS-313
> URL: https://issues.apache.org/jira/browse/CONNECTORS-313
> Project: ManifoldCF
>  Issue Type: Improvement
>  Components: Build
>Affects Versions: ManifoldCF 0.4
>Reporter: Shinichiro Abe
>Assignee: Shinichiro Abe
>Priority: Minor
> Fix For: ManifoldCF next
>
> Attachments: CONNECTOR-313.patch, CONNECTOR-313.patch, 
> register-draft.sh
>
>
> The multiprocess setup does not have an example properties.xml file.  We 
> should deliver one, in the right place so that all the scripts find it (the 
> "dist" directory).  It would also be helpful to deliver into this directory 
> scripts for:
> - Registering all the connectors that were built
> - Starting the agents process

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Issue Comment Edited] (CONNECTORS-313) An example multi-process properties.xml delivered to the "dist" folder would be very helpful

2011-12-14 Thread Karl Wright (Issue Comment Edited) (JIRA)

[ 
https://issues.apache.org/jira/browse/CONNECTORS-313?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13169181#comment-13169181
 ] 

Karl Wright edited comment on CONNECTORS-313 at 12/14/11 8:36 AM:
--

Do you think we should also have a script delivered in dist/multi that does all 
of the setup, such as setting MCF_HOME and calling all the right commands to 
initialize the database?  For MCF_HOME, it could check whether 
'./properties.xml' existed, and if it did set MCF_HOME to the value of '.', for 
instance.  It should also optionally accept the database superuser name and 
superuser password (just like the DBCreate command), and perform the following 
command steps:

- DBCreate
- Initialize
- RegisterAgent
- RegisterAll

The script can be located in: framework/example-multiprocess.  What do you 
think?

By the way, I also noticed that one of the Register commands you checked in is 
misspelled: Regsiter(?)



  was (Author: kwri...@metacarta.com):
Do you think we should also have a script delivered in dist/multi that does 
all of the setup, such as setting MCF_HOME and calling all the right commands 
to initialize the database?

  
> An example multi-process properties.xml delivered to the "dist" folder would 
> be very helpful
> 
>
> Key: CONNECTORS-313
> URL: https://issues.apache.org/jira/browse/CONNECTORS-313
> Project: ManifoldCF
>  Issue Type: Improvement
>  Components: Build
>Affects Versions: ManifoldCF 0.4
>Reporter: Shinichiro Abe
>Assignee: Shinichiro Abe
>Priority: Minor
> Fix For: ManifoldCF next
>
> Attachments: CONNECTOR-313.patch, CONNECTOR-313.patch, 
> register-draft.sh
>
>
> The multiprocess setup does not have an example properties.xml file.  We 
> should deliver one, in the right place so that all the scripts find it (the 
> "dist" directory).  It would also be helpful to deliver into this directory 
> scripts for:
> - Registering all the connectors that were built
> - Starting the agents process

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Issue Comment Edited] (CONNECTORS-313) An example multi-process properties.xml delivered to the "dist" folder would be very helpful

2011-12-14 Thread Karl Wright (Issue Comment Edited) (JIRA)

[ 
https://issues.apache.org/jira/browse/CONNECTORS-313?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13169916#comment-13169916
 ] 

Karl Wright edited comment on CONNECTORS-313 at 12/15/11 2:05 AM:
--

I think I see the problem.  The class extends 
TransactionalCrawlerInitializationCommand, which presumes that the database 
instance already exists.  I don't think you'll be able to extend that class if 
you are attempting database creation.

I don't think it is necessary to do everything in one class anyway.  The only 
new command functionality is the part that reads connectors.xml and registers 
the connectors.  If you create a command that does just that, and a script that 
calls DBCreate, Initialize, RegisterAgent, and that, I think that would be fine.


  was (Author: kwri...@metacarta.com):
I think I see the problem.  The class extends 
TransactionalCrawlerInitializationCommand, which presumes that the database 
instance already exists.  I don't think you'll be able to extend that class.

I don't think it is necessary to do everything in one class anyway.  The only 
new command functionality is the part that reads connectors.xml and registers 
the connectors.  If you create a command that does just that, and a script that 
calls DBCreate, Initialize, RegisterAgent, and that, I think that would be fine.

  
> An example multi-process properties.xml delivered to the "dist" folder would 
> be very helpful
> 
>
> Key: CONNECTORS-313
> URL: https://issues.apache.org/jira/browse/CONNECTORS-313
> Project: ManifoldCF
>  Issue Type: Improvement
>  Components: Build
>Affects Versions: ManifoldCF 0.4
>Reporter: Shinichiro Abe
>Assignee: Shinichiro Abe
>Priority: Minor
> Fix For: ManifoldCF 0.4
>
> Attachments: CONNECTOR-313.patch, CONNECTOR-313.patch, 
> register-draft.sh
>
>
> The multiprocess setup does not have an example properties.xml file.  We 
> should deliver one, in the right place so that all the scripts find it (the 
> "dist" directory).  It would also be helpful to deliver into this directory 
> scripts for:
> - Registering all the connectors that were built
> - Starting the agents process

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Issue Comment Edited] (CONNECTORS-313) An example multi-process properties.xml delivered to the "dist" folder would be very helpful

2011-12-14 Thread Karl Wright (Issue Comment Edited) (JIRA)

[ 
https://issues.apache.org/jira/browse/CONNECTORS-313?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13169916#comment-13169916
 ] 

Karl Wright edited comment on CONNECTORS-313 at 12/15/11 2:06 AM:
--

I think I see the problem.  The class extends 
TransactionalCrawlerInitializationCommand, which presumes that the database 
instance already exists and puts everything in a single transaction.  I don't 
think you'll be able to extend that class if you are attempting database 
creation.

I don't think it is necessary to do everything in one class anyway.  The only 
new command functionality is the part that reads connectors.xml and registers 
the connectors.  If you create a command that does just that, and a script that 
calls DBCreate, Initialize, RegisterAgent, and that, I think that would be fine.


  was (Author: kwri...@metacarta.com):
I think I see the problem.  The class extends 
TransactionalCrawlerInitializationCommand, which presumes that the database 
instance already exists.  I don't think you'll be able to extend that class if 
you are attempting database creation.

I don't think it is necessary to do everything in one class anyway.  The only 
new command functionality is the part that reads connectors.xml and registers 
the connectors.  If you create a command that does just that, and a script that 
calls DBCreate, Initialize, RegisterAgent, and that, I think that would be fine.

  
> An example multi-process properties.xml delivered to the "dist" folder would 
> be very helpful
> 
>
> Key: CONNECTORS-313
> URL: https://issues.apache.org/jira/browse/CONNECTORS-313
> Project: ManifoldCF
>  Issue Type: Improvement
>  Components: Build
>Affects Versions: ManifoldCF 0.4
>Reporter: Shinichiro Abe
>Assignee: Shinichiro Abe
>Priority: Minor
> Fix For: ManifoldCF 0.4
>
> Attachments: CONNECTOR-313.patch, CONNECTOR-313.patch, 
> register-draft.sh
>
>
> The multiprocess setup does not have an example properties.xml file.  We 
> should deliver one, in the right place so that all the scripts find it (the 
> "dist" directory).  It would also be helpful to deliver into this directory 
> scripts for:
> - Registering all the connectors that were built
> - Starting the agents process

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Issue Comment Edited] (CONNECTORS-313) An example multi-process properties.xml delivered to the "dist" folder would be very helpful

2011-12-14 Thread Karl Wright (Issue Comment Edited) (JIRA)

[ 
https://issues.apache.org/jira/browse/CONNECTORS-313?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13169950#comment-13169950
 ] 

Karl Wright edited comment on CONNECTORS-313 at 12/15/11 3:12 AM:
--

Oh, noticed one other thing.  There's no un-registration of connectors.  This 
is necessary because otherwise it is impossible to remove a connector using 
just RegisterAll.  If you look at what the single process example does, it 
first deregisters all connectors before registering the new ones, for this 
reason.

You may think that this is never going to happen with RegisterAll, but actually 
RegisterAll will be called not just for fresh installs but also for upgrades.


  was (Author: kwri...@metacarta.com):
Oh, noticed one other thing.  There's no un-registration of connectors.  
This is necessary because otherwise it is impossible to remove a connector 
using just RegisterAll.  If you look at what the single process example does, 
it first deregisters all connectors before registering the new ones, for this 
reason.

  
> An example multi-process properties.xml delivered to the "dist" folder would 
> be very helpful
> 
>
> Key: CONNECTORS-313
> URL: https://issues.apache.org/jira/browse/CONNECTORS-313
> Project: ManifoldCF
>  Issue Type: Improvement
>  Components: Build
>Affects Versions: ManifoldCF 0.4
>Reporter: Shinichiro Abe
>Assignee: Shinichiro Abe
>Priority: Minor
> Fix For: ManifoldCF 0.4
>
> Attachments: CONNECTOR-313.patch, CONNECTOR-313.patch, 
> register-draft.sh
>
>
> The multiprocess setup does not have an example properties.xml file.  We 
> should deliver one, in the right place so that all the scripts find it (the 
> "dist" directory).  It would also be helpful to deliver into this directory 
> scripts for:
> - Registering all the connectors that were built
> - Starting the agents process

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira