Skip to main content

%HadoopGateway.Config

This class is used to set and get configuration options which control the behavior of the Hadoop Gateway. Options can be set at three possible scopes: globally (applying in all contexts), namespace (applying only within a specified namespace), and class/table (applying only to operations on a specified class/table). Some options can be specified at more than one scope, others only at one scope. All options have defaults. For options that can be specified at both class/table and global scope, if an option is not specified at class/table scope, it defaults to its value at global scope.

Options set using methods of this class are persistent and apply by default to all connections. Options may be over-ridden for a particular connection by calling the %SetOption, %SetClassOption, and %SetNamespaceOption methods of %HadoopGateway.Connection.

Option names are case-insensitive strings. Option values are case-sensitive strings. Passing no value for an option to a set method causes that option to revert to its default value for the scope in question.

To set an option at global scope, use %SetOption(). To get the value of an option at global scope, use %GetOption().

To set and get the value of an option at namespace scope, use %SetNamespaceOption() and %GetNamespaceOption(), respectively. To set and get the value of an option at class/table scope, use %SetClassOption() and %GetClassOption(), respectively.

The following table summarizes the available options.

Hadoop Gateway Configuration Options
Name Scope Default Description
Delimiter Glbl,Class , (comma) Delimiter between fields when exporting in delimited text format.
LineSeparator Glbl,Class LF ($c(0) Separator between lines of exported data.
Pause Glbl,Class 1 second Pause between sync passes, if no updates were found in previous pass.
Format Glbl,Class DelimitedText Output format for exported data. Currently "Delimited Text" is the only supported option, but XML and additional options will be supported in the production version.
ImportTableExists Glbl error The behavior when importing a MapReduce result, when a table of the specified name already exists. The default value, "error", causes an error to be returned. The value "reuse" causes the data to be imported into the existing table. The value "drop" causes the existing table to be dropped, and a new table created according to the specification passed to %HadoopGateway.MapReduceResult.%Import().
Host Glbl localhost Hostname of machine on which Java Gateway and Hadoop Namenode are running.
Port Glbl 56789 Port number on which Java Gateway is listening, on host machine.
HadoopHome Glbl /hadoophome Pathname of root directory of Hadoop installation.
RootPath Glbl home directory The absolute root path within HDFS to which relative paths for exported data files are appended. By default, relative paths are appended to the home directory within HDFS of the user who started the Java Gateway instance through which data is exported.
Pathname Class classname.data The final pathname component for the HDFS data file for an exported table.
Pathname Namespace NAMESPACE The intermediate pathname component (one or more levels of directory) for HDFS data files for exported tables from a specified namespace. Defaults to the namespace's name, in all uppercase. To cause there to be no intermediate namespace component in the pathname, specify the value "" (empty string).

Method Inventory

Methods

classmethod %GetClassOption(pClassName As %String, pOptionName As %String) as %String
Return the value of the option specified by pOptionName, within the scope of the class specified by pClassName. If no value for this option has been set at class scope, its global value is returned if it has one, else its default value.
classmethod %GetNamespaceOption(pNamespace As %String, pOptionName As %String) as %String
Return the value of the option specified by pOptionName, within the scope of the namespace specified by pNamespace. If no value for this option has been set at namespace scope, its default value is returned.
classmethod %GetOption(pOptionName As %String) as %String
Return the value of the option specified by pOptionName. If no value has been set for this option, its default value is returned.
classmethod %SetClassOption(pClassName As %String, pOptionName As %String, pOptionValue As %String)
Set the option specified by pOptionName to have the value specified by pOptionValue, within the scope of the class specified by pClassName. If pOptionValue is not specified, the option reverts to value at global scope, or to its default if it is an option that does not apply at global scope.
classmethod %SetNamespaceOption(pNamespace As %String, pOptionName As %String, pOptionValue As %String)
Set the option specified by pOptionName to have the value specified by pOptionValue, within the scope of the namespace specified by pNamespace. If pOptionValue is not specified, the option reverts to its default value.
classmethod %SetOption(pOptionName As %String, pOptionValue As %String)
Set the option specified by pOptionName to have the value specified by pOptionValue, with global scope. If pOptionValue is not specified, the option reverts to its default value.

Inherited Members

Inherited Methods

FeedbackOpens in a new tab