Oozie coordinator done flag with variable in uri-template - oozie

I need a done flag with variable in uri.
According to documentation: https://oozie.apache.org/docs/3.1.3-incubating/CoordinatorFunctionalSpec.html#a5.1._Synchronous_Datasets it is possible.
My uri looks like
<uri-template>
hdfs://foo:9000/app/logs/${YEAR}${MONTH}/${DAY}/${hour_int}
</uri-template>
and I defined ${hour_int} variable in Advanced settings/Workflow properties.
I get error:
E1004: Expression language evaluation error, Unable to evaluate :hdfs://foo:9000/app/logs/${YEAR}${MONTH}/${DAY}/${hour_int}:
Need help on where am going wrong ...

Related

Eslint complaining about hyphens in variable name

So I have to use a specific variable name (g-recaptcha-response) in my form post in order to pass a captcha process using google recaptcha V2. The thing is eslint will always complaint about the variable name wit the error "Parsing error: Const declarations require an initialization value". I know the problem it's because of the hyphenated name convention but I can't find anywhere the way to bypass this rule and I have to use that name since it's a re-captcha parameter that needs to be send with the form.
const g-recaptcha-response = await this.$recaptcha.getResponse(),
I need to make something like that work within an eslint /& vue-3 template with composition API, any feedback will be really appreciated.

TYPO3 Symfony Expression: isset() for Query Parameters?

I am using several Symfony expressions in my TypoScript checking for query parameters such as this:
[request.getQueryParams()['tx_news_pi1']['news'] > 0]
do something
[END]
This is working well – as long as the query parameter exists. If it doesn’t, the following error message is written into the log file:
Unable to get an item on a non-array.
In PHP I would use isset() to check whether the query parameter exists – but I could not find a similar way for Symfony expressions in TypoScript. I have tried
[request.getQueryParams()['tx_news_pi1']['news']]
which works the same, meaning: it does what it’s supposed to do, but logs an error message if the query parameter does not exist.
Is there anything like isset() for the Symfony Expression Language in TYPO3?
The is_defined() or isset() I was looking for will be returned by the condition
[request.getQueryParams()['tx_news_pi1']]
instead of
[request.getQueryParams()['tx_news_pi1']['news']]
In my use case this would even be enough. If you need to be more precise (e.g. to differentiate between different query parameters within the same plugin), go for
[request.getQueryParams()['tx_news_pi1'] && request.getQueryParams()['tx_news_pi1']['news'] > 0]
The solution was provided as a reply to a bug report on forge.typo3.org
Try this:
[request.getQueryParams()['tx_news_pi1']['news'] = ]
do something
[END]

Reading values from a memory address in Ada

I am trying to write a procedure that given a memory address and data type, will display the value of the data at that memory location.
I'm thinking that the best way to do this would be to use the To_Pointer function in the generic package Address_To_Access_Conversions, but every time I try to use it I get an error:
invalid prefix in selected component "Address_To_Access_Conversions"
I've ben unable to find any examples of how the Address_To_Access_Conversions is actually used. And I may be on the totally wrong track.
Does anyone know how to use the above package to convert an Address to an Access type and more importantly, a good way to access data at a given address to display to console?
Edit
The solution I found most in my research was to use something like the following:
for X'Address use dummy_address;
The only problem was that at that point in the code, I hadn't calculated what the dummy address was and that statement would only work at declaration, before 'begin' I found a way around this though with block programming:
dummy_address := base_address + offset;
Dummy_String:
declare
subtype Xdummy is Integer;
S : Xdummy;
for S'Address use dummy_address;
begin
--More code here
end Dummy_String;

How does one create optional command line arguments in oozie workflow xml

Please bear in mind that I'm a complete rookie with oozie. I know that one can specify command line arguments in the oozie workflow xml by using the arg tag. I wondered how it is possible to specify an optional command line argument such that oozie will not complain that a required parameter is missing if the user doesn't specify it?
Many thanks in advance. If the information I've given is not specific enough, I can provide a concrete example when I log into my work machine tomorrow. We use apache commons CLI options to parse the options.
E.g. I want to make the following argument optional:
-e${endDateTime}
In your workflow wherever you would use ${myparam}, replace it with ${firstNotNull(wf:conf('myparam'), 'mydefaultvalue')}
In theory you should be able to use a "config-default.xml" file next to your "workflow.xml" file to give default values to the params in the workflow (see https://oozie.apache.org/docs/3.2.0-incubating/WorkflowFunctionalSpec.html) but I couldn't get it working.

What is job.get() and job.getBoolean() in mapreduce

I am working on pdf document clustering over hadoop so I am learning mapreduce by reading some examples on internet.In wordcount examples have lines
job.get("map.input.file")
job.getboolean()
What is function of these functions?what is exactly map.input.file where is it to set? or is it just a name given to input folder?
Please post answer if anyone know.
For code see the following link
wordcount 2.0 example=http://hadoop.apache.org/docs/r1.0.4/mapred_tutorial.html
These are job configurations. i.e. set of configurations which are passed on to each mapper and reducer. Now, these configurations consist of well defined mapreduce/hadoop related configurations as well as user-defined configurations.
In your case, map.input.file is a pre-defined configuration and yes it is set to a comma separated list of all the paths you have set as input path.
While wordcount.skip.patterns is a custom configuration which is set as per user's input, and you may see this configuration to be set in run() as follows:
conf.setBoolean("wordcount.skip.patterns", true);
As for when to use get and when to use getBoolean, it should be self-explanatory, as whenever you want to set a value of type boolean you will use getBoolean and setBoolean to get and set the specific config value respectively. Similarly you have specific methods for other data types as well. If it is string then you may use get().

Resources