Package com.marklogic.mapreduce
Class PropertyOutputFormat
- java.lang.Object
-
- org.apache.hadoop.mapreduce.OutputFormat<KEYOUT,VALUEOUT>
-
- com.marklogic.mapreduce.MarkLogicOutputFormat<DocumentURI,MarkLogicNode>
-
- com.marklogic.mapreduce.PropertyOutputFormat
-
- All Implemented Interfaces:
MarkLogicConstants,org.apache.hadoop.conf.Configurable
public class PropertyOutputFormat extends MarkLogicOutputFormat<DocumentURI,MarkLogicNode>
MarkLogicOutputFormat for Document Property.Use this class to store MapReduce results as properties on documents in a MarkLogic database. This class expects output key-value pairs where the key is a
DocumentURIand the value is aMarkLogicNodedescribing the property to be added to the document at the key URI.Control whether the inserted property replaces or adds to existing document properties by setting the configuration property
output.property.optype. By default, any existing properties are replaced with the new one.By default, properties are only created by documents that exist in the database. Set the configuration property
output.property.alwayscreateto true to create properties even if the target document does not exist.- See Also:
PropertyOpType
-
-
Field Summary
Fields Modifier and Type Field Description static org.apache.commons.logging.LogLOG-
Fields inherited from class com.marklogic.mapreduce.MarkLogicOutputFormat
conf, HOSTS_QUERY
-
Fields inherited from interface com.marklogic.mapreduce.MarkLogicConstants
ADVANCED_MODE, ASSIGNMENT_POLICY, BASIC_MODE, BATCH_SIZE, BIND_SPLIT_RANGE, COLLECTION_FILTER, CONTENT_TYPE, COPY_COLLECTIONS, COPY_METADATA, COPY_QUALITY, DEFAULT_BATCH_SIZE, DEFAULT_CONTENT_TYPE, DEFAULT_LOCAL_MAX_SPLIT_SIZE, DEFAULT_MAX_SPLIT_SIZE, DEFAULT_OUTPUT_CONTENT_ENCODING, DEFAULT_OUTPUT_XML_REPAIR_LEVEL, DEFAULT_PROPERTY_OPERATION_TYPE, DEFAULT_TXN_SIZE, DIRECTORY_FILTER, DOCUMENT_SELECTOR, EXECUTION_MODE, EXTRACT_URI, INDENTED, INPUT_API_KEY, INPUT_BASE_PATH, INPUT_DATABASE_NAME, INPUT_GRANT_TYPE, INPUT_HOST, INPUT_KEY_CLASS, INPUT_KEYSTORE_PASSWD, INPUT_KEYSTORE_PATH, INPUT_LEXICON_FUNCTION_CLASS, INPUT_MODE, INPUT_PASSWORD, INPUT_PORT, INPUT_QUERY, INPUT_QUERY_LANGUAGE, INPUT_QUERY_TIMESTAMP, INPUT_RESTRICT_HOSTS, INPUT_SSL_OPTIONS_CLASS, INPUT_SSL_PROTOCOL, INPUT_TOKEN_DURATION, INPUT_TOKEN_ENDPOINT, INPUT_TRUSTSTORE_PASSWD, INPUT_TRUSTSTORE_PATH, INPUT_USE_SSL, INPUT_USERNAME, INPUT_VALUE_CLASS, MAX_SPLIT_SIZE, MIN_NODEUPDATE_VERSION, MODE_DISTRIBUTED, MODE_LOCAL, MR_NAMESPACE, NODE_OPERATION_TYPE, OUTPUT_API_KEY, OUTPUT_BASE_PATH, OUTPUT_CLEAN_DIR, OUTPUT_COLLECTION, OUTPUT_CONTENT_ENCODING, OUTPUT_CONTENT_LANGUAGE, OUTPUT_CONTENT_NAMESPACE, OUTPUT_DATABASE_NAME, OUTPUT_DIRECTORY, OUTPUT_FAST_LOAD, OUTPUT_FOREST_HOST, OUTPUT_GRANT_TYPE, OUTPUT_GRAPH, OUTPUT_HOST, OUTPUT_KEY_TYPE, OUTPUT_KEY_VARNAME, OUTPUT_KEYSTORE_PASSWD, OUTPUT_KEYSTORE_PATH, OUTPUT_NAMESPACE, OUTPUT_OVERRIDE_GRAPH, OUTPUT_PARTITION, OUTPUT_PASSWORD, OUTPUT_PERMISSION, OUTPUT_PORT, OUTPUT_PROPERTY_ALWAYS_CREATE, OUTPUT_QUALITY, OUTPUT_QUERY, OUTPUT_QUERY_LANGUAGE, OUTPUT_RESTRICT_HOSTS, OUTPUT_SSL_OPTIONS_CLASS, OUTPUT_SSL_PROTOCOL, OUTPUT_STREAMING, OUTPUT_TOKEN_DURATION, OUTPUT_TOKEN_ENDPOINT, OUTPUT_TRUSTSTORE_PASSWD, OUTPUT_TRUSTSTORE_PATH, OUTPUT_URI_PREFIX, OUTPUT_URI_REPLACE, OUTPUT_URI_SUFFIX, OUTPUT_USE_SSL, OUTPUT_USERNAME, OUTPUT_VALUE_TYPE, OUTPUT_VALUE_VARNAME, OUTPUT_XML_REPAIR_LEVEL, PATH_NAMESPACE, PROPERTY_OPERATION_TYPE, QUERY_FILTER, RECORD_TO_FRAGMENT_RATIO, REDACTION_RULE_COLLECTION, SPLIT_END_VARNAME, SPLIT_QUERY, SPLIT_START_VARNAME, SUBDOCUMENT_EXPRESSION, TEMPORAL_COLLECTION, TXN_SIZE, TYPE_FILTER
-
-
Constructor Summary
Constructors Constructor Description PropertyOutputFormat()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcheckOutputSpecs(org.apache.hadoop.conf.Configuration conf, com.marklogic.xcc.ContentSource cs, org.apache.hadoop.mapreduce.JobContext context)org.apache.hadoop.mapreduce.RecordWriter<DocumentURI,MarkLogicNode>getRecordWriter(org.apache.hadoop.mapreduce.TaskAttemptContext context)-
Methods inherited from class com.marklogic.mapreduce.MarkLogicOutputFormat
checkOutputSpecs, getConf, getHosts, getOutputCommitter, queryHosts, queryHosts, setConf
-
-
-
-
Method Detail
-
getRecordWriter
public org.apache.hadoop.mapreduce.RecordWriter<DocumentURI,MarkLogicNode> getRecordWriter(org.apache.hadoop.mapreduce.TaskAttemptContext context) throws IOException, InterruptedException
- Specified by:
getRecordWriterin classorg.apache.hadoop.mapreduce.OutputFormat<DocumentURI,MarkLogicNode>- Throws:
IOExceptionInterruptedException
-
checkOutputSpecs
public void checkOutputSpecs(org.apache.hadoop.conf.Configuration conf, com.marklogic.xcc.ContentSource cs, org.apache.hadoop.mapreduce.JobContext context) throws IOException- Specified by:
checkOutputSpecsin classMarkLogicOutputFormat<DocumentURI,MarkLogicNode>- Throws:
IOException
-
-