[kepler-dev] SRB Put problems

Tristan King tristan.king at jcu.edu.au
Sun Feb 5 20:26:57 PST 2006


oops, forgot the attachment on the last email :)

On Mon, 2006-02-06 at 11:26 +1000, Tristan King wrote:
> Ok i got it working
> turned out it was the constant actor i was using to pass into the
> remoteDir input of the SPut actor that was breaking it. i changed this
> to the string constant (or the geon one from the workflow you supplied).
> 
> Now i've got another few problems (see attached workflow). 
> 
> Firstly, just a visual issue. If there is more than 1 file to be
> uploaded (i.e. Display2 shows: {"/home/tristan/kepler/test.data",
> "/home/tristan/kepler/test1.data", "/home/tristan/kepler/test2.data"})
> all the files get uploaded, but only one of the files gets listed in
> Display, i know this can be fixed by increasing the width of the
> relation between the ArrayToElements and Display actors, but is there
> some way to do this dynamically since there could (in theory) be an
> infinate number of lines needing to be displayed. (for now i'll just get
> rid of the ArrayToElements actor and make it print out the array)
> 
> The next problem is most likely a problem resulting from my actor.
> When using a PN directory, the SPut actor seems to break. The first
> iteration always works fine, cause there is always data needing to be
> put into SRB. However the subsiquent iteration there is no garantee that
> there is data needing to be SPut. It seems that executing SPut without
> any data on the filesToPut input breaks it.
> I get the following after i stop the workflow after it has run:
> ptolemy.kernel.util.IllegalActionException:   in .srb-dirpoll.SRB SPut
> 	at org.srb.SPut.fire(SPut.java:285)
> 	at ptolemy.actor.process.ProcessThread.run(ProcessThread.java:186)
> 
> I'll work on adding a trigger output to my DirectoryPoller actor so it
> can trigger the SRB Connect actor so that it wont trigger the SPut if
> there are no files to be put. (this is asuming that this is how the
> trigger functionality work, please correct me if i'm wrong).
> 
> Also, is there anything i have to do to add my own semantic type, or is
> it as simple as just adding it in the src/actors/actorname/actorname.xml
> file?
> 
> thanks
> --Tristan
> 
> 
> On Mon, 2006-02-06 at 10:41 +1000, Tristan King wrote:
> > Hi Nandita, 
> > 
> > sorry i should have mentioned that the settings in the SRBconnect wont
> > work for you because it connected to an SRB server on my local machine
> > (and the JCU firewall blocks incoming connections, i might have to look
> > into building an SRB server on a dedicated box and getting external
> > access allowed to it).
> > 
> > I've tried the workflow you attached using my SRB's values and it worked
> > flawlessly.
> > 
> > So there must be something wrong with how I've structured the workflow i
> > supplied, or with how my Actor outputs data.
> > 
> > It shouldn't need an ElementsToArray actor, as my actor outputs the data
> > as an ArrayToken containing StringTokens, the same as the
> > DirectoryListing actor (see fire() method in DirectoryPoller.java i
> > supplied in the previous email)
> > 
> > I'll keep playing with the workflow to see if I can figure it out. I'm
> > sure it'll just be something simple that i'm missing :)
> > 
> > thanks
> > 
> > --Tristan
> > 
> > On Fri, 2006-02-03 at 15:54 -0800, Nandita Mangal wrote:
> > > Also when you input Files to SRB Put actor ....do you use an 
> > > "ElementsToArray" actor <as the filesToPut port of SRBPut is
> > > expecting an Array {string} > Thought i asked as your exception is in 
> > > regards to ArrayToken.
> > > 
> > > Also could you test the simple SRB IO workflow which I have attached. 
> > > <kepler/workflows/srb/srbIO.xml> with your SRB
> > > account information?
> > > Let me know if you are to successfully upload n download SRB files.....
> > > thanks.
> > > nandita.
> > > 
> > > 
> > > Nandita Mangal wrote:
> > > 
> > > >Hi Tristan,
> > > >I can't connect to SRB with the information in the SRB Connect.
> > > >ptolemy.kernel.util.IllegalActionException: Could not create an SRB 
> > > >connection for channel 0: quiver.local
> > > >  in .<Unnamed Object>.SRB Connect
> > > >  in .<Unnamed Object>.SRB Connect
> > > >    at org.srb.SRBConnect.initialize(SRBConnect.java:182)
> > > >    at ptolemy.actor.process.ProcessThread.run(ProcessThread.java:133
> > > >Could you double-check the connection info?
> > > >
> > > >thanks,
> > > >nandita.
> > > >
> > > >Tristan King wrote:
> > > >
> > > >  
> > > >
> > > >>Hi again everyone
> > > >>
> > > >>I'm having some trouble figuring out the SRB SPut actor.
> > > >>
> > > >>I'm getting the following error when i try and run the SPut actor
> > > >>
> > > >>java.lang.ClassCastException: ptolemy.data.ArrayToken
> > > >>    at org.srb.SPut.fire(SPut.java:166)
> > > >>
> > > >>I've attached the code for my directory polling actor and my workflow
> > > >>xml for you all to play with. Just untar the tar into kepler/src/,
> > > >>you'll have to add <include name="au/**"/> to the build.xml in the copy
> > > >>src files section, line 339, if anyone can give me any info on how i
> > > >>should actually name my packages that'd be great (au.edu.dart is just a
> > > >>temporary thing till i find out about naming standards). You can always
> > > >>just ignore my stuff and switch the DirectoryPoller and Sleep actor with
> > > >>a constant containing an array of local file names in it (which i've
> > > >>also tried and received the same errors).
> > > >>
> > > >>I'm probably doing something wrong, but i'm buggered if i can figure out
> > > >>what :)
> > > >>
> > > >>thanks everyone
> > > >>--Tristan
> > > >>
> > > >> 
> > > >>
> > > >>------------------------------------------------------------------------
> > > >>
> > > >><?xml version="1.0" standalone="no"?>
> > > >><!DOCTYPE entity PUBLIC "-//UC Berkeley//DTD MoML 1//EN"
> > > >>   "http://ptolemy.eecs.berkeley.edu/xml/dtd/MoML_1.dtd">
> > > >><entity name="srb-dirpoll" class="ptolemy.actor.TypedCompositeActor">
> > > >>   <property name="_createdBy" class="ptolemy.kernel.attributes.VersionAttribute" value="5.1-alpha">
> > > >>   </property>
> > > >>   <property name="_windowProperties" class="ptolemy.actor.gui.WindowPropertiesAttribute" value="{bounds={227, 112, 855, 797}, maximized=false}">
> > > >>   </property>
> > > >>   <property name="_vergilSize" class="ptolemy.actor.gui.SizeAttribute" value="[600, 659]">
> > > >>   </property>
> > > >>   <property name="_vergilZoomFactor" class="ptolemy.data.expr.ExpertParameter" value="1.0">
> > > >>   </property>
> > > >>   <property name="_vergilCenter" class="ptolemy.data.expr.ExpertParameter" value="{276.0, 329.5}">
> > > >>   </property>
> > > >>   <property name="PN Director" class="ptolemy.domains.pn.kernel.PNDirector">
> > > >>       <property name="_svgIcon" class="ptolemy.kernel.util.ConfigurableAttribute">
> > > >>           <configure>../kepler-docs/dev/usability/graphics/svg/director.svg</configure>
> > > >>       </property>
> > > >>       <property name="_thumbnailRasterIcon" class="ptolemy.kernel.util.ConfigurableAttribute">
> > > >>           <configure>/actorthumbs/director-sm.gif</configure>
> > > >>       </property>
> > > >>       <property name="timeResolution" class="ptolemy.moml.SharedParameter" value="1E-10">
> > > >>       </property>
> > > >>       <property name="entityId" class="org.kepler.moml.NamedObjId" value="urn:lsid:kepler-project.org:director:2:1">
> > > >>       </property>
> > > >>       <property name="class" class="ptolemy.kernel.util.StringAttribute" value="ptolemy.domains.pn.kernel.PNDirector">
> > > >>           <property name="id" class="ptolemy.kernel.util.StringAttribute" value="urn:lsid:kepler-project.org:directorclass:2:1">
> > > >>           </property>
> > > >>       </property>
> > > >>       <property name="semanticType000" class="org.kepler.sms.SemanticType" value="urn:lsid:localhost:onto:1:1#Director">
> > > >>       </property>
> > > >>       <property name="_location" class="ptolemy.kernel.util.Location" value="{390, 145}">
> > > >>       </property>
> > > >>   </property>
> > > >>   <entity name="Display" class="ptolemy.actor.lib.gui.Display">
> > > >>       <property name="_svgIcon" class="ptolemy.kernel.util.ConfigurableAttribute">
> > > >>           <configure>../kepler-docs/dev/usability/graphics/svg/text_disp.svg</configure>
> > > >>       </property>
> > > >>       <property name="_thumbnailRasterIcon" class="ptolemy.kernel.util.ConfigurableAttribute">
> > > >>           <configure>/actorthumbs/text_disp-sm.gif</configure>
> > > >>       </property>
> > > >>       <property name="rowsDisplayed" class="ptolemy.data.expr.Parameter" value="10">
> > > >>       </property>
> > > >>       <property name="columnsDisplayed" class="ptolemy.data.expr.Parameter" value="40">
> > > >>       </property>
> > > >>       <property name="suppressBlankLines" class="ptolemy.data.expr.Parameter" value="false">
> > > >>       </property>
> > > >>       <property name="_windowProperties" class="ptolemy.actor.gui.WindowPropertiesAttribute" value="{bounds={541, 657, 428, 214}, maximized=false}">
> > > >>       </property>
> > > >>       <property name="entityId" class="org.kepler.moml.NamedObjId" value="urn:lsid:kepler-project.org:actor:7:1">
> > > >>       </property>
> > > >>       <property name="class" class="ptolemy.kernel.util.StringAttribute" value="ptolemy.actor.lib.gui.Display">
> > > >>           <property name="id" class="ptolemy.kernel.util.StringAttribute" value="urn:lsid:kepler-project.org:class:883:1">
> > > >>           </property>
> > > >>       </property>
> > > >>       <property name="semanticType000" class="org.kepler.sms.SemanticType" value="urn:lsid:localhost:onto:1:1#TextualOutputActor">
> > > >>       </property>
> > > >>       <property name="_location" class="ptolemy.kernel.util.Location" value="[525.0, 400.0]">
> > > >>       </property>
> > > >>   </entity>
> > > >>   <entity name="SRB Connect" class="org.srb.SRBConnect">
> > > >>       <property name="_svgIcon" class="ptolemy.kernel.util.ConfigurableAttribute">
> > > >>           <configure>../kepler-docs/dev/usability/graphics/svg/basic-actor.svg</configure>
> > > >>       </property>
> > > >>       <property name="_thumbnailRasterIcon" class="ptolemy.kernel.util.ConfigurableAttribute">
> > > >>           <configure>/actorthumbs/basic-actor-sm.gif</configure>
> > > >>       </property>
> > > >>       <property name="srbHost" class="ptolemy.kernel.util.StringAttribute" value="quiver.local">
> > > >>       </property>
> > > >>       <property name="srbPort" class="ptolemy.kernel.util.StringAttribute" value="5544">
> > > >>       </property>
> > > >>       <property name="srbUserName" class="ptolemy.kernel.util.StringAttribute" value="srbadmin">
> > > >>       </property>
> > > >>       <property name="srbPasswd" class="ptolemy.kernel.util.StringAttribute" value="d4r7r007">
> > > >>       </property>
> > > >>       <property name="srbHomeCollection" class="ptolemy.kernel.util.StringAttribute" value="/A/home/srbadmin.tristan-dart-test">
> > > >>       </property>
> > > >>       <property name="srbMdasDomainHome" class="ptolemy.kernel.util.StringAttribute" value="tristan-dart-test">
> > > >>       </property>
> > > >>       <property name="srbDefaultResource" class="ptolemy.kernel.util.StringAttribute" value="tristan-dart-test-res">
> > > >>       </property>
> > > >>       <property name="entityId" class="org.kepler.moml.NamedObjId" value="urn:lsid:kepler-project.org:actor:159:1">
> > > >>       </property>
> > > >>       <property name="class" class="ptolemy.kernel.util.StringAttribute" value="org.srb.SRBConnect">
> > > >>           <property name="id" class="ptolemy.kernel.util.StringAttribute" value="urn:lsid:kepler-project.org:class:1017:1">
> > > >>           </property>
> > > >>       </property>
> > > >>       <property name="semanticType000" class="org.kepler.sms.SemanticType" value="urn:lsid:localhost:onto:1:1#SRBExternalInputActor">
> > > >>       </property>
> > > >>       <property name="_location" class="ptolemy.kernel.util.Location" value="[45.0, 115.0]">
> > > >>       </property>
> > > >>   </entity>
> > > >>   <entity name="Constant" class="ptolemy.actor.lib.Const">
> > > >>       <property name="_svgIcon" class="ptolemy.kernel.util.ConfigurableAttribute">
> > > >>           <configure>../kepler-docs/dev/usability/graphics/svg/basic-actor.svg</configure>
> > > >>       </property>
> > > >>       <property name="_thumbnailRasterIcon" class="ptolemy.kernel.util.ConfigurableAttribute">
> > > >>           <configure>/actorthumbs/basic-actor-sm.gif</configure>
> > > >>       </property>
> > > >>       <property name="value" class="ptolemy.data.expr.Parameter" value="{&quot;/A/home/srbadmin.tristan-dart-test&quot;}">
> > > >>       </property>
> > > >>       <property name="entityId" class="org.kepler.moml.NamedObjId" value="urn:lsid:kepler-project.org:actor:1:1">
> > > >>       </property>
> > > >>       <property name="class" class="ptolemy.kernel.util.StringAttribute" value="ptolemy.actor.lib.Const">
> > > >>           <property name="id" class="ptolemy.kernel.util.StringAttribute" value="urn:lsid:kepler-project.org:class:877:1">
> > > >>           </property>
> > > >>       </property>
> > > >>       <property name="semanticType000" class="org.kepler.sms.SemanticType" value="urn:lsid:localhost:onto:1:1#ConstantActor">
> > > >>       </property>
> > > >>       <property name="_icon" class="ptolemy.vergil.icon.BoxedValueIcon">
> > > >>           <property name="attributeName" class="ptolemy.kernel.util.StringAttribute" value="value">
> > > >>           </property>
> > > >>           <property name="displayWidth" class="ptolemy.data.expr.Parameter" value="40">
> > > >>           </property>
> > > >>       </property>
> > > >>       <property name="_location" class="ptolemy.kernel.util.Location" value="[170.0, 405.0]">
> > > >>       </property>
> > > >>   </entity>
> > > >>   <entity name="SRB SPut" class="org.srb.SPut">
> > > >>       <property name="_svgIcon" class="ptolemy.kernel.util.ConfigurableAttribute">
> > > >>           <configure>../kepler-docs/dev/usability/graphics/svg/basic-actor.svg</configure>
> > > >>       </property>
> > > >>       <property name="_thumbnailRasterIcon" class="ptolemy.kernel.util.ConfigurableAttribute">
> > > >>           <configure>/actorthumbs/basic-actor-sm.gif</configure>
> > > >>       </property>
> > > >>       <property name="confirmOverwrite" class="ptolemy.data.expr.Parameter" value="false">
> > > >>       </property>
> > > >>       <property name="entityId" class="org.kepler.moml.NamedObjId" value="urn:lsid:kepler-project.org:actor:256:1">
> > > >>       </property>
> > > >>       <property name="class" class="ptolemy.kernel.util.StringAttribute" value="org.srb.SPut">
> > > >>           <property name="id" class="ptolemy.kernel.util.StringAttribute" value="urn:lsid:kepler-project.org:class:1082:1">
> > > >>           </property>
> > > >>       </property>
> > > >>       <property name="semanticType000" class="org.kepler.sms.SemanticType" value="urn:lsid:localhost:onto:1:1#SRBExternalInputActor">
> > > >>       </property>
> > > >>       <property name="_location" class="ptolemy.kernel.util.Location" value="[300.0, 300.0]">
> > > >>       </property>
> > > >>       <property name="_expertMode" class="ptolemy.kernel.util.SingletonAttribute">
> > > >>       </property>
> > > >>   </entity>
> > > >>   <entity name="DirectoryPoller" class="au.edu.dart.DirectoryPoller">
> > > >>       <property name="_svgIcon" class="ptolemy.kernel.util.ConfigurableAttribute">
> > > >>           <configure>../kepler-docs/dev/usability/graphics/svg/basic-actor.svg</configure>
> > > >>       </property>
> > > >>       <property name="_thumbnailRasterIcon" class="ptolemy.kernel.util.ConfigurableAttribute">
> > > >>           <configure>/actorthumbs/basic-actor-sm.gif</configure>
> > > >>       </property>
> > > >>       <property name="Directory" class="ptolemy.actor.parameters.FilePortParameter" value="/home/tristan/kepler">
> > > >>           <property name="allowFiles" class="ptolemy.data.expr.Parameter" value="false">
> > > >>           </property>
> > > >>           <property name="allowDirectories" class="ptolemy.data.expr.Parameter" value="true">
> > > >>           </property>
> > > >>       </property>
> > > >>       <property name="entityId" class="org.kepler.moml.NamedObjId" value="urn:lsid:kepler-project.org:actor:451:1">
> > > >>       </property>
> > > >>       <property name="class" class="ptolemy.kernel.util.StringAttribute" value="au.edu.dart.DirectoryPoller">
> > > >>           <property name="id" class="ptolemy.kernel.util.StringAttribute" value="urn:lsid:kepler-project.org:class:451:1">
> > > >>           </property>
> > > >>       </property>
> > > >>       <property name="semanticType000" class="org.kepler.sms.SemanticType" value="urn:lsid:localhost:onto:1:1#ConstantActor">
> > > >>       </property>
> > > >>       <property name="_location" class="ptolemy.kernel.util.Location" value="[-3.3345489501953125, 264.51841735839844]">
> > > >>       </property>
> > > >>   </entity>
> > > >>   <entity name="Sleep" class="ptolemy.actor.lib.Sleep">
> > > >>       <property name="_svgIcon" class="ptolemy.kernel.util.ConfigurableAttribute">
> > > >>           <configure>../kepler-docs/dev/usability/graphics/svg/basic-actor.svg</configure>
> > > >>       </property>
> > > >>       <property name="_thumbnailRasterIcon" class="ptolemy.kernel.util.ConfigurableAttribute">
> > > >>           <configure>/actorthumbs/basic-actor-sm.gif</configure>
> > > >>       </property>
> > > >>       <property name="sleepTime" class="ptolemy.actor.parameters.PortParameter" value="0L">
> > > >>       </property>
> > > >>       <property name="entityId" class="org.kepler.moml.NamedObjId" value="urn:lsid:kepler-project.org:actor:92:1">
> > > >>       </property>
> > > >>       <property name="class" class="ptolemy.kernel.util.StringAttribute" value="ptolemy.actor.lib.Sleep">
> > > >>           <property name="id" class="ptolemy.kernel.util.StringAttribute" value="urn:lsid:kepler-project.org:class:966:1">
> > > >>           </property>
> > > >>       </property>
> > > >>       <property name="semanticType000" class="org.kepler.sms.SemanticType" value="urn:lsid:localhost:onto:1:1#ControlActor">
> > > >>       </property>
> > > >>       <property name="_location" class="ptolemy.kernel.util.Location" value="{145, 315}">
> > > >>       </property>
> > > >>       <port name="sleepTime" class="ptolemy.actor.parameters.ParameterPort">
> > > >>           <property name="input"/>
> > > >>           <property name="_cardinal" class="ptolemy.kernel.util.StringAttribute" value="SOUTH">
> > > >>           </property>
> > > >>       </port>
> > > >>   </entity>
> > > >>   <relation name="relation3" class="ptolemy.actor.TypedIORelation">
> > > >>       <property name="width" class="ptolemy.data.expr.Parameter" value="1">
> > > >>       </property>
> > > >>   </relation>
> > > >>   <relation name="relation5" class="ptolemy.actor.TypedIORelation">
> > > >>       <property name="width" class="ptolemy.data.expr.Parameter" value="1">
> > > >>       </property>
> > > >>   </relation>
> > > >>   <relation name="relation4" class="ptolemy.actor.TypedIORelation">
> > > >>       <property name="width" class="ptolemy.data.expr.Parameter" value="1">
> > > >>       </property>
> > > >>   </relation>
> > > >>   <relation name="relation2" class="ptolemy.actor.TypedIORelation">
> > > >>       <property name="width" class="ptolemy.data.expr.Parameter" value="1">
> > > >>       </property>
> > > >>   </relation>
> > > >>   <relation name="relation" class="ptolemy.actor.TypedIORelation">
> > > >>       <property name="width" class="ptolemy.data.expr.Parameter" value="1">
> > > >>       </property>
> > > >>   </relation>
> > > >>   <relation name="relation6" class="ptolemy.actor.TypedIORelation">
> > > >>       <property name="width" class="ptolemy.data.expr.Parameter" value="1">
> > > >>       </property>
> > > >>   </relation>
> > > >>   <link port="Display.input" relation="relation5"/>
> > > >>   <link port="Display.input" relation="relation4"/>
> > > >>   <link port="SRB Connect.SRBFileSystem" relation="relation3"/>
> > > >>   <link port="Constant.output" relation="relation2"/>
> > > >>   <link port="SRB SPut.SRBFileSystem" relation="relation3"/>
> > > >>   <link port="SRB SPut.filesToPut" relation="relation6"/>
> > > >>   <link port="SRB SPut.uploadedFiles" relation="relation4"/>
> > > >>   <link port="SRB SPut.exitCode" relation="relation5"/>
> > > >>   <link port="SRB SPut.remoteDir" relation="relation2"/>
> > > >>   <link port="DirectoryPoller.output" relation="relation"/>
> > > >>   <link port="Sleep.input" relation="relation"/>
> > > >>   <link port="Sleep.output" relation="relation6"/>
> > > >></entity>
> > > >>
> > > >>------------------------------------------------------------------------
> > > >>
> > > >>_______________________________________________
> > > >>Kepler-dev mailing list
> > > >>Kepler-dev at ecoinformatics.org
> > > >>http://mercury.nceas.ucsb.edu/ecoinformatics/mailman/listinfo/kepler-dev
> > > >>
> > > >>    
> > > >>
> > > >
> > > >_______________________________________________
> > > >Kepler-dev mailing list
> > > >Kepler-dev at ecoinformatics.org
> > > >http://mercury.nceas.ucsb.edu/ecoinformatics/mailman/listinfo/kepler-dev
> > > >  
> > > >
> > > 
-- 
Tristan King                            | Ph: (07) 4781 6911
DART project team                       | Email: Tristan.King at jcu.edu.au
James Cook University                   | Web: http://dart.edu.au
Townsville QLD 4814                     | http://plone.jcu.edu.au/dart/
Australia                               |

-------------- next part --------------
A non-text attachment was scrubbed...
Name: srb-dirpoll.xml
Type: text/xml
Size: 15443 bytes
Desc: not available
Url : http://mercury.nceas.ucsb.edu/ecoinformatics/pipermail/kepler-dev/attachments/20060206/b096f26d/srb-dirpoll-0001.xml


More information about the Kepler-dev mailing list