Examples of appendBatch()


Examples of journal.io.api.Journal.WriteBatch.appendBatch()

                            }
                            WriteCommand controlRecord = currentBatch.prepareBatch();
                            writeRecord.getLocation().setDataFileId(file.getDataFileId());
                            writeRecord.getLocation().setPointer(currentBatch.incrementAndGetPointer());
                            writeRecord.getLocation().setLatch(currentBatch.getLatch());
                            currentBatch.appendBatch(writeRecord);
                            if (!writeRecord.isSync()) {
                                journal.getInflightWrites().put(controlRecord.getLocation(), controlRecord);
                                journal.getInflightWrites().put(writeRecord.getLocation(), writeRecord);
                                nextWriteBatch = currentBatch;
                            } else {
View Full Code Here

Examples of journal.io.api.Journal.WriteBatch.appendBatch()

                            }
                            WriteCommand controlRecord = currentBatch.prepareBatch();
                            writeRecord.getLocation().setDataFileId(file.getDataFileId());
                            writeRecord.getLocation().setPointer(currentBatch.incrementAndGetPointer());
                            writeRecord.getLocation().setLatch(currentBatch.getLatch());
                            currentBatch.appendBatch(writeRecord);
                            if (!writeRecord.isSync()) {
                                journal.getInflightWrites().put(controlRecord.getLocation(), controlRecord);
                                journal.getInflightWrites().put(writeRecord.getLocation(), writeRecord);
                                nextWriteBatch = currentBatch;
                            } else {
View Full Code Here

Examples of journal.io.api.Journal.WriteBatch.appendBatch()

                            }
                            WriteCommand controlRecord = currentBatch.prepareBatch();
                            writeRecord.getLocation().setDataFileId(file.getDataFileId());
                            writeRecord.getLocation().setPointer(currentBatch.incrementAndGetPointer());
                            writeRecord.getLocation().setLatch(currentBatch.getLatch());
                            currentBatch.appendBatch(writeRecord);
                            if (!writeRecord.isSync()) {
                                journal.getInflightWrites().put(controlRecord.getLocation(), controlRecord);
                                journal.getInflightWrites().put(writeRecord.getLocation(), writeRecord);
                                nextWriteBatch = currentBatch;
                            } else {
View Full Code Here

Examples of journal.io.api.Journal.WriteBatch.appendBatch()

                            }
                            WriteCommand controlRecord = currentBatch.prepareBatch();
                            writeRecord.getLocation().setDataFileId(file.getDataFileId());
                            writeRecord.getLocation().setPointer(currentBatch.incrementAndGetPointer());
                            writeRecord.getLocation().setLatch(currentBatch.getLatch());
                            currentBatch.appendBatch(writeRecord);
                            if (!writeRecord.isSync()) {
                                journal.getInflightWrites().put(controlRecord.getLocation(), controlRecord);
                                journal.getInflightWrites().put(writeRecord.getLocation(), writeRecord);
                                nextWriteBatch = currentBatch;
                            } else {
View Full Code Here

Examples of org.apache.flume.api.RpcClient.appendBatch()

          if (now >= lastCheck + 5000) {
            logger.debug("Packed {} bytes, {} events", sentBytes, sent);
            lastCheck = now;
          }
        }
        rpcClient.appendBatch(eventBuffer);
      }
      logger.debug("Finished");
    } finally {
      if (reader != null) {
        logger.debug("Closing reader");
View Full Code Here

Examples of org.apache.flume.api.RpcClient.appendBatch()

      while ((line = reader.readLine()) != null) {
        // logger.debug("read:{}", line);

        int size = eventBuffer.size();
        if (size == batchSize) {
          rpcClient.appendBatch(eventBuffer);
          eventBuffer.clear();
        }

        Event event = EventBuilder.withBody(line, Charset.forName("UTF8"));
        setHeaders(event);
View Full Code Here

Examples of org.apache.flume.api.RpcClient.appendBatch()

          lastCheck = now;
        }
      }

      if (!eventBuffer.isEmpty()) {
        rpcClient.appendBatch(eventBuffer);
      }

      logger.debug("Finished");
    } finally {
      if (reader != null) {
View Full Code Here

Examples of org.apache.flume.api.RpcClient.appendBatch()

      while ((line = reader.readLine()) != null) {
        // logger.debug("read:{}", line);

        int size = eventBuffer.size();
        if (size == batchSize) {
          rpcClient.appendBatch(eventBuffer);
          eventBuffer.clear();
        }

        Event event = EventBuilder.withBody(line, Charset.forName("UTF8"));
        eventBuffer.add(event);
View Full Code Here

Examples of org.apache.flume.api.RpcClient.appendBatch()

          lastCheck = now;
        }
      }

      if (!eventBuffer.isEmpty()) {
        rpcClient.appendBatch(eventBuffer);
      }

      logger.debug("Finished");
    } finally {
      if (reader != null) {
View Full Code Here

Examples of org.apache.flume.api.RpcClient.appendBatch()

          if (now >= lastCheck + 5000) {
            logger.debug("Packed {} bytes, {} events", sentBytes, sent);
            lastCheck = now;
          }
        }
        rpcClient.appendBatch(events);
        if (reader instanceof ReliableEventReader) {
          ((ReliableEventReader) reader).commit();
        }
      }
      logger.debug("Finished");
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.