Tabnine Logo
com.marklogic.mapreduce
Code IndexAdd Tabnine to your IDE (free)

How to use com.marklogic.mapreduce

Best Java code snippets using com.marklogic.mapreduce (Showing top 20 results out of 315)

origin: com.marklogic/marklogic-mapreduce2

  @Override
  public Object clone() {
    return new DocumentURIWithSourceInfo(this);
  }
}
origin: com.marklogic/mlcp

  @Override
  protected void setValue(long length) {
    if (value == null || value.getPath() == null) {
      value = new StreamLocator(file, codec);
    }
  }
}
origin: com.marklogic/marklogic-mapreduce2

public ZipEntryInputStream(ZipInputStream zipIn, String fileName) {
  this.zipIn = zipIn;   
  this.fileName = fileName;
  // advance the stream to the first zip entry position.
  hasNext();
}

origin: com.marklogic/marklogic-mapreduce2

@Override
protected boolean nextResult(ResultItem result) {
  String uri = result.getDocumentURI();
  String path = result.getNodePath();
  if (currentKey != null) {
    currentKey.set(uri, path);
  } else {
    currentKey = new NodePath(uri, path);
  }
  if (currentValue != null) {
    currentValue.set(result);
  } else {
    currentValue = new MarkLogicNode(result);
  }
  
  return true;
}
origin: com.marklogic/marklogic-mapreduce2

  @Override
  public Content createContent(String uri, ContentCreateOptions options,
      boolean copyCollections, boolean copyMetadata, boolean copyQuality)
  throws IOException {
    if (copyCollections || copyMetadata || copyQuality) {
      setContentOptions(options, copyCollections, copyMetadata, 
          copyQuality);
    }
    return ContentFactory.newContent(uri, 
        getContentAsMarkLogicNode().get(), options);
  }
}
origin: com.marklogic/marklogic-mapreduce2

@Override
public RecordWriter<NodePath, MarkLogicNode> getRecordWriter(
    TaskAttemptContext context) throws IOException, InterruptedException {
  Configuration conf = context.getConfiguration();
  TextArrayWritable hosts = getHosts(conf);
  String host = InternalUtilities.getHost(hosts);
  return new NodeWriter(conf, host);
}
origin: com.marklogic/marklogic-mapreduce2

@Override
public RecordWriter<DocumentURI, MarkLogicNode> getRecordWriter(
    TaskAttemptContext context) throws IOException, InterruptedException {        
  Configuration conf = context.getConfiguration();
  TextArrayWritable hosts = getHosts(conf);
  
  String host = InternalUtilities.getHost(hosts);
  return new PropertyWriter(conf, host);
}
origin: com.marklogic/marklogic-mapreduce2

public MarkLogicNode getContentAsMarkLogicNode() {
  if (contentType == ContentType.XML || 
    contentType == ContentType.TEXT) {
    return new MarkLogicNode(getContentAsText().toString(), 
            contentType);      
  }
  throw new UnsupportedOperationException(
    "Cannot convert JSON or binary data to MarkLogicNode.");        
}

origin: com.marklogic/marklogic-mapreduce2

@Override
public MarkLogicNode getContentAsMarkLogicNode() {
  return new MarkLogicNode(doc);
}
origin: com.marklogic/marklogic-mapreduce2

@Override
public Object clone() {
  return new DocumentURI(uri);
}

origin: com.marklogic/marklogic-mapreduce2

@Override
public RecordReader<DocumentURIWithSourceInfo, VALUE> createRecordReader(
    InputSplit split, TaskAttemptContext context) throws IOException,
    InterruptedException {
  return new ForestReader<VALUE>();
}
origin: com.marklogic/marklogic-mapreduce2

public MarkLogicRecordWriter(Configuration conf, String hostName) {
  this.hostName = hostName;
  this.conf = conf;
  this.txnSize = getTransactionSize(conf);
}

origin: com.marklogic/marklogic-mapreduce2

@Override
public long getContentSize() {
  byte[] buf = getContentAsByteArray();
  return buf.length;
}
origin: com.marklogic/marklogic-mapreduce2

protected TextArrayWritable queryHosts(ContentSource cs) 
    throws IOException {
  return queryHosts(cs, null, null);
}

origin: com.marklogic/mlcp

@Override
public void readFields(DataInput in) throws IOException {
  uri.readFields(in);
}
origin: com.marklogic/marklogic-mapreduce2

@Override
public String getContentAsString() throws UnsupportedEncodingException {
  return toString();
}
origin: com.marklogic/mlcp

@Override
public void write(DataOutput out) throws IOException {
  uri.write(out);
}
origin: com.marklogic/marklogic-mapreduce2

protected Session getSession(int fId, boolean nextReplica) {
  TransactionMode mode = TransactionMode.AUTO;
  if (needCommit) {
    mode = TransactionMode.UPDATE;
  }
  return getSession(fId, nextReplica, mode);
}
origin: com.marklogic/marklogic-mapreduce2

public MarkLogicNode(ResultItem item) {
  set(item);
}

origin: com.marklogic/marklogic-mapreduce2

@Override
public String getContentAsString() throws UnsupportedEncodingException {
  return toString();
}

com.marklogic.mapreduce

Most used classes

  • ContentOutputFormat
    MarkLogicOutputFormat for Content. Use this class to store results as content in a MarkLogic Server
  • ContentType
    Type of supported document format.
  • DatabaseDocument
    A MarkLogicDocument retrieved from a database via MarkLogic Server.
  • DocumentURI
    Document URI, used as a key for a document record. Use with DocumentInputFormat and ContentOutputFor
  • DocumentURIWithSourceInfo
    Document URI with source information. Use with DocumentInputFormat and ContentOutputFormat.
  • LinkedMapWritable,
  • MarkLogicInputSplit,
  • MarkLogicNode,
  • StreamLocator,
  • ZipEntryInputStream,
  • AssignmentManager,
  • ForestHost,
  • InternalUtilities,
  • TextArrayWritable,
  • URIUtil,
  • BinaryDocument,
  • CompressionCodec,
  • ContentWriter,
  • CustomContent
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now