Package org.apache.flume.source.avro

Examples of org.apache.flume.source.avro.AvroSourceProtocol.appendBatch()


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

        if (eventBuffer.size() >= 1000) {
          Status status = client.appendBatch(eventBuffer);

          if (!status.equals(Status.OK)) {
            logger.error("Unable to send batch size:{} status:{}",
                eventBuffer.size(), status);
          }
View Full Code Here


          lastCheck = now;
        }
      }

      if (eventBuffer.size() > 0) {
        Status status = client.appendBatch(eventBuffer);

        if (!status.equals(Status.OK)) {
          logger.error("Unable to send batch size:{} status:{}",
              eventBuffer.size(), status);
        }
View Full Code Here

            i = 0;
            do {
                try {
                    transceiver = null;
                    AvroSourceProtocol c = connect(agent.getHost(), agent.getPort());
                    Status status = (batch == null) ? c.append(avroEvent) : c.appendBatch(batch);
                    if (!status.equals(Status.OK)) {
                        if (i == retries - 1) {
                            String warnMsg = "RPC communication failed to " + getName() + " at " +
                                agent.getHost() + ":" + agent.getPort();
                            LOGGER.warn(warnMsg);
View Full Code Here

            i = 0;
            do {
                try {
                    transceiver = null;
                    AvroSourceProtocol c = connect(agent.getHost(), agent.getPort());
                    Status status = (batch == null) ? c.append(avroEvent) : c.appendBatch(batch);
                    if (!status.equals(Status.OK)) {
                        if (i == retries - 1) {
                            String warnMsg = "RPC communication failed to " + getName() + " at " +
                                agent.getHost() + ":" + agent.getPort();
                            LOGGER.warn(warnMsg);
View Full Code Here

                i = 0;
                do {
                    try {
                        transceiver = null;
                        final AvroSourceProtocol c = connect(agent.getHost(), agent.getPort());
                        final Status status = (batch == null) ? c.append(avroEvent) : c.appendBatch(batch);
                        if (!status.equals(Status.OK)) {
                            if (i == retries - 1) {
                                final String warnMsg = "RPC communication failed to " + getName() + " at " +
                                    agent.getHost() + ":" + agent.getPort();
                                LOGGER.warn(warnMsg);
View Full Code Here

            i = 0;
            do {
                try {
                    transceiver = null;
                    AvroSourceProtocol c = connect(agent.getHost(), agent.getPort());
                    Status status = (batch == null) ? c.append(avroEvent) : c.appendBatch(batch);
                    if (!status.equals(Status.OK)) {
                        if (i == retries - 1) {
                            String warnMsg = "RPC communication failed to " + getName() + " at " +
                                agent.getHost() + ":" + agent.getPort();
                            LOGGER.warn(warnMsg);
View Full Code Here

            i = 0;
            do {
                try {
                    transceiver = null;
                    AvroSourceProtocol c = connect(agent.getHost(), agent.getPort());
                    Status status = (batch == null) ? c.append(avroEvent) : c.appendBatch(batch);
                    if (!status.equals(Status.OK)) {
                        if (i == retries - 1) {
                            String warnMsg = "RPC communication failed to " + getName() + " at " +
                                agent.getHost() + ":" + agent.getPort();
                            LOGGER.warn(warnMsg);
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.