本文整理汇总了Java中org.apache.flume.source.avro.Status.FAILED属性的典型用法代码示例。如果您正苦于以下问题:Java Status.FAILED属性的具体用法?Java Status.FAILED怎么用?Java Status.FAILED使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.apache.flume.source.avro.Status
的用法示例。
在下文中一共展示了Status.FAILED属性的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: append
@Override
public Status append(AvroFlumeEvent avroEvent) {
logger.debug("Avro source {}: Received avro event: {}", getName(),
avroEvent);
sourceCounter.incrementAppendReceivedCount();
sourceCounter.incrementEventReceivedCount();
Event event = EventBuilder.withBody(avroEvent.getBody().array(),
toStringMap(avroEvent.getHeaders()));
try {
getChannelProcessor().processEvent(event);
} catch (ChannelException ex) {
logger.warn("Avro source " + getName() + ": Unable to process event. " +
"Exception follows.", ex);
return Status.FAILED;
}
sourceCounter.incrementAppendAcceptedCount();
sourceCounter.incrementEventAcceptedCount();
return Status.OK;
}
示例2: append
@Override
public Status append(AvroFlumeEvent event) throws AvroRemoteException {
if (failed) {
logger.debug("Event rejected");
return Status.FAILED;
}
logger.debug("LB: Received event from append(): {}",
new String(event.getBody().array(), Charset.forName("UTF8")));
appendCount++;
return Status.OK;
}
示例3: appendBatch
@Override
public Status appendBatch(List<AvroFlumeEvent> events) throws
AvroRemoteException {
if (failed) {
logger.debug("Event batch rejected");
return Status.FAILED;
}
logger.debug("LB: Received {} events from appendBatch()",
events.size());
appendBatchCount++;
return Status.OK;
}
示例4: append
@Override
public Status append(AvroFlumeEvent avroEvent) {
if (logger.isDebugEnabled()) {
if (LogPrivacyUtil.allowLogRawData()) {
logger.debug("Avro source {}: Received avro event: {}", getName(), avroEvent);
} else {
logger.debug("Avro source {}: Received avro event", getName());
}
}
sourceCounter.incrementAppendReceivedCount();
sourceCounter.incrementEventReceivedCount();
Event event = EventBuilder.withBody(avroEvent.getBody().array(),
toStringMap(avroEvent.getHeaders()));
try {
getChannelProcessor().processEvent(event);
} catch (ChannelException ex) {
logger.warn("Avro source " + getName() + ": Unable to process event. " +
"Exception follows.", ex);
return Status.FAILED;
}
sourceCounter.incrementAppendAcceptedCount();
sourceCounter.incrementEventAcceptedCount();
return Status.OK;
}
示例5: appendBatch
@Override
public Status appendBatch(List<AvroFlumeEvent> events) {
logger.debug("Avro source {}: Received avro event batch of {} events.",
getName(), events.size());
sourceCounter.incrementAppendBatchReceivedCount();
sourceCounter.addToEventReceivedCount(events.size());
List<Event> batch = new ArrayList<Event>();
for (AvroFlumeEvent avroEvent : events) {
Event event = EventBuilder.withBody(avroEvent.getBody().array(),
toStringMap(avroEvent.getHeaders()));
batch.add(event);
}
try {
getChannelProcessor().processEventBatch(batch);
} catch (Throwable t) {
logger.error("Avro source " + getName() + ": Unable to process event " +
"batch. Exception follows.", t);
if (t instanceof Error) {
throw (Error) t;
}
return Status.FAILED;
}
sourceCounter.incrementAppendBatchAcceptedCount();
sourceCounter.addToEventAcceptedCount(events.size());
return Status.OK;
}
示例6: append
@Override
public Status append(AvroFlumeEvent avroEvent) {
if (isFail) {
return Status.FAILED;
}
appendCount.incrementAndGet();
return super.append(avroEvent);
}
示例7: appendBatch
@Override
public Status appendBatch(List<AvroFlumeEvent> events) {
if (isFail) {
return Status.FAILED;
}
appendCount.addAndGet(events.size());
return super.appendBatch(events);
}
示例8: appendBatch
@Override
public Status appendBatch(List<AvroFlumeEvent> events) {
logger.debug("Avro source {}: Received avro event batch of {} events.",
getName(), events.size());
sourceCounter.incrementAppendBatchReceivedCount();
sourceCounter.addToEventReceivedCount(events.size());
List<Event> batch = new ArrayList<Event>();
for (AvroFlumeEvent avroEvent : events) {
Event event = EventBuilder.withBody(avroEvent.getBody().array(),
toStringMap(avroEvent.getHeaders()));
batch.add(event);
}
try {
getChannelProcessor().processEventBatch(batch);
} catch (Throwable t) {
logger.error("Avro source " + getName() + ": Unable to process event " +
"batch. Exception follows.", t);
if (t instanceof Error) {
throw (Error) t;
}
return Status.FAILED;
}
sourceCounter.incrementAppendBatchAcceptedCount();
sourceCounter.addToEventAcceptedCount(events.size());
return Status.OK;
}
示例9: appendBatch
@Override
public Status appendBatch(List<AvroFlumeEvent> events) throws
AvroRemoteException {
LOG.info("Failed: Received {} events from appendBatch()",
events.size());
return Status.FAILED;
}
示例10: appendBatch
@Override
public Status appendBatch(List<AvroFlumeEvent> events) throws
AvroRemoteException {
logger.info("Failed: Received {} events from appendBatch()",
events.size());
return Status.FAILED;
}
示例11: append
@Override
public Status append(AvroFlumeEvent event) throws AvroRemoteException {
LOG.info("Failed: Received event from append(): {}",
new String(event.getBody().array(), Charset.forName("UTF8")));
return Status.FAILED;
}
示例12: append
@Override
public Status append(AvroFlumeEvent event) throws AvroRemoteException {
logger.info("Failed: Received event from append(): {}",
new String(event.getBody().array(), Charset.forName("UTF8")));
return Status.FAILED;
}