Hadoop Module

These functions are in the http://xmlns.oracle.com/hadoop/xquery namespace. The oxh prefix is predeclared and the module is automatically imported.

The Hadoop module is described in the following topic:

  • Hadoop Functions

Built-in Functions for Using Hadoop

The following functions are built in to Oracle XQuery for Hadoop:

oxh:find

Returns a sequence of file paths that match a pattern.

Signature

oxh:find($pattern as xs:string?) as xs:string*

Parameters

$pattern: The file pattern to search for

See Also:

For the file pattern, the globStatus method in the Apache Hadoop API at

http://hadoop.apache.org/docs/current/api/org/apache/hadoop/fs/FileSystem.html#globStatus(org.apache.hadoop.fs.Path)

oxh:increment-counter

Increments a user-defined MapReduce job counter. The default increment is one (1).

Signature

oxh:increment-counter($groupName as xs:string, $counterName as xs:string, $value as xs:integer

oxh:increment-counter($groupName as xs:string, $counterName as xs:string

Parameters

$groupName: The group of counters that this counter belongs to.

$counterName: The name of a user-defined counter

$value: The amount to increment the counter

oxh:property

Returns the value of a Hadoop configuration property.

Signature

oxh:property($name as xs:string?) as xs:string?

Parameters

$name: The configuration property