Examples of SolrInputDocumentWritable


Examples of org.apache.solr.hadoop.SolrInputDocumentWritable

    public void add(int shard, Map<String, SolrInputDocument> inputDocumentMap) throws SolrServerException, IOException {
        for (Entry<String, SolrInputDocument> documentEntry : inputDocumentMap.entrySet()) {
            try {
                context.write(
                    new Text(documentEntry.getKey()),
                    new SolrInputDocumentWritable(documentEntry.getValue()));
                context.getCounter(HBaseIndexerCounters.OUTPUT_INDEX_DOCUMENTS).increment(1L);
            } catch (InterruptedException e) {
                Thread.currentThread().interrupt();
                throw new RuntimeException(e);
            }
View Full Code Here

Examples of org.apache.solr.hadoop.SolrInputDocumentWritable

      if (id == null) {
        throw new IllegalArgumentException("Missing value for (required) unique document key: " + uniqueKeyFieldName
            + " (see Solr schema.xml)");
      }
      try {
        context.write(new Text(id.toString()), new SolrInputDocumentWritable(doc));
      } catch (InterruptedException e) {
        throw new IOException("Interrupted while writing " + doc, e);
      }

      if (LOG.isDebugEnabled()) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.