uima-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lou DeGenaro <lou.degen...@gmail.com>
Subject Re: DUCC multi-valued parameter in job descriptor
Date Fri, 07 Jul 2017 14:06:37 GMT
In my CR xml I put:

...
            <configurationParameter>
                  <name>language</name>
                  <description>Language</description>
                  <type>String</type>
                  <multiValued>false</multiValued>
                  <mandatory>false</mandatory>
            </configurationParameter>

            <configurationParameter>
                  <name>patterns</name>
                  <description>Patterns</description>
                  <type>String</type>
                  <multiValued>false</multiValued>
                  <mandatory>false</mandatory>
            </configurationParameter>

            <configurationParameter>
                  <name>sourceLocation</name>
                  <description>Source Location</description>
                  <type>String</type>
                  <multiValued>false</multiValued>
                  <mandatory>false</mandatory>
            </configurationParameter>

...

In my submitted job spec I put:

--driver_descriptor_CR_overrides "sourceLocation=test/Books
patterns=[+]**/*.txt language=de"

In my CR.java I put in the initialize() method:

        String sourceLocation = ((String)
getConfigParameterValue("sourceLocation"));
        logger.log(Level.INFO, " ****** BB sourceLocation: " +
sourceLocation);
        String patterns = ((String) getConfigParameterValue("patterns"));
        logger.log(Level.INFO, " ****** BB patterns: " + patterns);
        String language = ((String) getConfigParameterValue("language"));
        logger.log(Level.INFO, " ****** BB language: " + language);

And in the log output I see:

Jul 07, 2017 9:51:04 AM org.apache.uima.ducc.test.randomsleep.CR initialize(90)
INFO:  ****** BB sourceLocation: test/Books
Jul 07, 2017 9:51:04 AM org.apache.uima.ducc.test.randomsleep.CR initialize(92)
INFO:  ****** BB patterns: [+]**/*.txt
Jul 07, 2017 9:51:04 AM org.apache.uima.ducc.test.randomsleep.CR initialize(94)
INFO:  ****** BB language: de

Lou.







On Fri, Jul 7, 2017 at 8:11 AM, Lou DeGenaro <lou.degenaro@gmail.com> wrote:

> --driver_descriptor_CR_overrides "key1=value1 key2=value2  key3=value3"
>
> Hope this helps.
>
> Lou.
>
> On Fri, Jul 7, 2017 at 5:37 AM, Wahed Hemati <hemati@em.uni-frankfurt.de>
> wrote:
>
>> Hi,
>> how do i pass a multi-valued parameter for driver_descriptor_CR_overrides
>> in my job descriptor.
>> the line looks currently like this:
>>
>> driver_descriptor_CR_overrides  sourceLocation=test/Books
>> patterns=[+]**/*.txt language=de
>>
>> I get the following exception:
>>
>> Caused by: org.apache.uima.resource.ResourceConfigurationException:
>> Configuration parameter "patterns" in component "reader.Reader" is
>> multi-valued and must be assigned an array for its value.
>>
>> -Best
>>
>> Wahed
>>
>>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message