@Override public SolrInputDocument next() { return parent.next().getSolrInputDocument(); }
@Override public SolrInputDocument next() { return parent.next().getSolrInputDocument(); }
/** * Write a record. This method accumulates records in to a batch, and when * {@link #batchSize} items are present flushes it to the indexer. The writes * can take a substantial amount of time, depending on {@link #batchSize}. If * there is heavy disk contention the writes may take more than the 600 second * default timeout. */ @Override public void write(K key, V value) throws IOException { heartBeater.needHeartBeat(); try { try { SolrInputDocumentWritable sidw = (SolrInputDocumentWritable) value; batch.add(sidw.getSolrInputDocument()); if (batch.size() >= batchSize) { batchWriter.queueBatch(batch); numDocsWritten += batch.size(); if (System.nanoTime() >= nextLogTime) { LOG.info("docsWritten: {}", numDocsWritten); nextLogTime += TimeUnit.NANOSECONDS.convert(10, TimeUnit.SECONDS); } batch.clear(); } } catch (SolrServerException e) { throw new IOException(e); } } finally { heartBeater.cancelHeartBeat(); } }
/** * Write a record. This method accumulates records in to a batch, and when * {@link #batchSize} items are present flushes it to the indexer. The writes * can take a substantial amount of time, depending on {@link #batchSize}. If * there is heavy disk contention the writes may take more than the 600 second * default timeout. */ @Override public void write(K key, V value) throws IOException { heartBeater.needHeartBeat(); try { try { SolrInputDocumentWritable sidw = (SolrInputDocumentWritable) value; batch.add(sidw.getSolrInputDocument()); if (batch.size() >= batchSize) { batchWriter.queueBatch(batch); numDocsWritten += batch.size(); if (System.nanoTime() >= nextLogTime) { LOG.info("docsWritten: {}", numDocsWritten); nextLogTime += TimeUnit.NANOSECONDS.convert(10, TimeUnit.SECONDS); } batch.clear(); } } catch (SolrServerException e) { throw new IOException(e); } } finally { heartBeater.cancelHeartBeat(); } }
/** * Write a record. This method accumulates records in to a batch, and when * {@link #batchSize} items are present flushes it to the indexer. The writes * can take a substantial amount of time, depending on {@link #batchSize}. If * there is heavy disk contention the writes may take more than the 600 second * default timeout. */ @Override public void write(K key, V value) throws IOException { heartBeater.needHeartBeat(); try { try { SolrInputDocumentWritable sidw = (SolrInputDocumentWritable) value; batch.add(sidw.getSolrInputDocument()); if (batch.size() >= batchSize) { batchWriter.queueBatch(batch); numDocsWritten += batch.size(); if (System.nanoTime() >= nextLogTime) { LOG.info("docsWritten: {}", numDocsWritten); nextLogTime += TimeUnit.NANOSECONDS.convert(10, TimeUnit.SECONDS); } batch.clear(); } } catch (SolrServerException e) { throw new IOException(e); } } finally { heartBeater.cancelHeartBeat(); } }
@Override public int getPartition(Text key, SolrInputDocumentWritable value, int numPartitions) { DocRouter docRouter = docCollection.getRouter(); SolrInputDocument doc = value.getSolrInputDocument(); String keyStr = key.toString();
/** * Write a record. This method accumulates records in to a batch, and when * {@link #batchSize} items are present flushes it to the indexer. The writes * can take a substantial amount of time, depending on {@link #batchSize}. If * there is heavy disk contention the writes may take more than the 600 second * default timeout. */ @Override public void write(K key, V value) throws IOException { heartBeater.needHeartBeat(); try { try { SolrInputDocumentWritable sidw = (SolrInputDocumentWritable) value; batch.add(sidw.getSolrInputDocument()); if (batch.size() >= batchSize) { batchWriter.queueBatch(batch); numDocsWritten += batch.size(); if (System.currentTimeMillis() >= nextLogTime) { LOG.info("docsWritten: {}", numDocsWritten); nextLogTime += 10000; } batch.clear(); } } catch (SolrServerException e) { throw new IOException(e); } } finally { heartBeater.cancelHeartBeat(); } }
@Override public int getPartition(Text key, SolrInputDocumentWritable value, int numPartitions) { DocRouter docRouter = docCollection.getRouter(); SolrInputDocument doc = value.getSolrInputDocument(); String keyStr = key.toString();