org.apache.flume.Channel.getName()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(7.4k)|赞(0)|评价(0)|浏览(202)

本文整理了Java中org.apache.flume.Channel.getName()方法的一些代码示例,展示了Channel.getName()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Channel.getName()方法的具体详情如下:
包路径:org.apache.flume.Channel
类名称:Channel
方法名:getName

Channel.getName介绍

暂无

代码示例

代码示例来源:origin: apache/flume

@Override
 public String toString() {
  return this.getClass().getName() + "{name:" + name + ", channel:" + channel.getName() + "}";
 }
}

代码示例来源:origin: apache/flume

/**
 *
 * @return A map of name to channel instance.
 */
protected Map<String, Channel> getChannelNameMap() {
 Map<String, Channel> channelNameMap = new HashMap<String, Channel>();
 for (Channel ch : getAllChannels()) {
  channelNameMap.put(ch.getName(), ch);
 }
 return channelNameMap;
}

代码示例来源:origin: apache/flume

private void checkSinkChannelCompatibility(Sink sink, Channel channel)
  throws InstantiationException {
 if (sink instanceof BatchSizeSupported && channel instanceof TransactionCapacitySupported) {
  long transCap = ((TransactionCapacitySupported) channel).getTransactionCapacity();
  long batchSize = ((BatchSizeSupported) sink).getBatchSize();
  if (transCap < batchSize) {
   String msg = String.format(
     "Incompatible sink and channel settings defined. " +
       "sink's batch size is greater than the channels transaction capacity. " +
       "Sink: %s, batch size = %d, channel %s, transaction capacity = %d",
     sink.getName(), batchSize,
     channel.getName(), transCap);
   throw new InstantiationException(msg);
  }
 }
}

代码示例来源:origin: apache/flume

private void checkSourceChannelCompatibility(Source source, Channel channel)
  throws InstantiationException {
 if (source instanceof BatchSizeSupported && channel instanceof TransactionCapacitySupported) {
  long transCap = ((TransactionCapacitySupported) channel).getTransactionCapacity();
  long batchSize = ((BatchSizeSupported) source).getBatchSize();
  if (transCap < batchSize) {
   String msg = String.format(
     "Incompatible source and channel settings defined. " +
       "source's batch size is greater than the channels transaction capacity. " +
       "Source: %s, batch size = %d, channel %s, transaction capacity = %d",
     source.getName(), batchSize,
     channel.getName(), transCap);
   throw new InstantiationException(msg);
  }
 }
}

代码示例来源:origin: apache/flume

&& !supervisor.isComponentInErrorState(ch)) {
try {
 logger.info("Waiting for channel: " + ch.getName() +
   " to start. Sleeping for 500 ms");
 Thread.sleep(500);

代码示例来源:origin: apache/flume

for (Channel channel : sourceChannels) {
 ChannelComponent channelComponent =
   Preconditions.checkNotNull(channelComponentMap.get(channel.getName()),
                 String.format("Channel %s", channel.getName()));
 channelComponent.components.add(sourceName);
for (Channel channel : sourceChannels) {
 ChannelComponent channelComponent =
   Preconditions.checkNotNull(channelComponentMap.get(channel.getName()),
                 String.format("Channel %s", channel.getName()));
 channelComponent.components.add(sourceName);

代码示例来源:origin: apache/flume

} else if (t instanceof ChannelException) {
 logger.error("Rpc Sink " + getName() + ": Unable to get event from" +
   " channel " + channel.getName() + ". Exception follows.", t);
 sinkCounter.incrementChannelReadFail();
 status = Status.BACKOFF;

代码示例来源:origin: apache/flume

myChannel.getName() + ". Exception follows.", t);
sinkCounter.incrementEventWriteOrChannelFail(t);
try {

代码示例来源:origin: org.apache.flume/flume-ng-core

@Override
 public String toString() {
  return this.getClass().getName() + "{name:" + name + ", channel:" + channel.getName() + "}";
 }
}

代码示例来源:origin: org.apache.flume/flume-ng-core

/**
 *
 * @return A map of name to channel instance.
 */
protected Map<String, Channel> getChannelNameMap() {
 Map<String, Channel> channelNameMap = new HashMap<String, Channel>();
 for (Channel ch : getAllChannels()) {
  channelNameMap.put(ch.getName(), ch);
 }
 return channelNameMap;
}

代码示例来源:origin: telefonicaid/fiware-cygnus

if (channel.getName().equals(channelName)) {
  break;

代码示例来源:origin: telefonicaid/fiware-cygnus

channelColumns += ",\"" + channel.getName() + "\"";

代码示例来源:origin: org.apache.flume/flume-ng-node

private void checkSinkChannelCompatibility(Sink sink, Channel channel)
  throws InstantiationException {
 if (sink instanceof BatchSizeSupported && channel instanceof TransactionCapacitySupported) {
  long transCap = ((TransactionCapacitySupported) channel).getTransactionCapacity();
  long batchSize = ((BatchSizeSupported) sink).getBatchSize();
  if (transCap < batchSize) {
   String msg = String.format(
     "Incompatible sink and channel settings defined. " +
       "sink's batch size is greater than the channels transaction capacity. " +
       "Sink: %s, batch size = %d, channel %s, transaction capacity = %d",
     sink.getName(), batchSize,
     channel.getName(), transCap);
   throw new InstantiationException(msg);
  }
 }
}

代码示例来源:origin: org.apache.flume/flume-ng-node

private void checkSourceChannelCompatibility(Source source, Channel channel)
  throws InstantiationException {
 if (source instanceof BatchSizeSupported && channel instanceof TransactionCapacitySupported) {
  long transCap = ((TransactionCapacitySupported) channel).getTransactionCapacity();
  long batchSize = ((BatchSizeSupported) source).getBatchSize();
  if (transCap < batchSize) {
   String msg = String.format(
     "Incompatible source and channel settings defined. " +
       "source's batch size is greater than the channels transaction capacity. " +
       "Source: %s, batch size = %d, channel %s, transaction capacity = %d",
     source.getName(), batchSize,
     channel.getName(), transCap);
   throw new InstantiationException(msg);
  }
 }
}

代码示例来源:origin: jaibeermalik/searchanalytics-bigdata

selectorProperties.put("mapping.VIEWED", HDFSChannel.getName() + " "
    + ESChannel.getName() + " " + sparkAvroChannel.getName() + " "
    + HbaseChannel.getName());
selectorProperties.put("mapping.FAVOURITE", HDFSChannel.getName() + " "
    + ESChannel.getName() + " " + sparkAvroChannel.getName() + " "
    + HbaseChannel.getName());
selectorProperties.put("default", HDFSChannel.getName() + " "
    + sparkAvroChannel.getName() + " " + HbaseChannel.getName());
Context selectorContext = new Context(selectorProperties);
selector.configure(selectorContext);

代码示例来源:origin: org.apache.flume/flume-ng-node

&& !supervisor.isComponentInErrorState(ch)) {
try {
 logger.info("Waiting for channel: " + ch.getName() +
   " to start. Sleeping for 500 ms");
 Thread.sleep(500);

代码示例来源:origin: org.apache.flume/flume-ng-node

for (Channel channel : sourceChannels) {
 ChannelComponent channelComponent =
   Preconditions.checkNotNull(channelComponentMap.get(channel.getName()),
                 String.format("Channel %s", channel.getName()));
 channelComponent.components.add(sourceName);
for (Channel channel : sourceChannels) {
 ChannelComponent channelComponent =
   Preconditions.checkNotNull(channelComponentMap.get(channel.getName()),
                 String.format("Channel %s", channel.getName()));
 channelComponent.components.add(sourceName);

代码示例来源:origin: telefonicaid/fiware-cygnus

jsonStr += "{\"name\":\"" + channel.getName() + "\","
    + "\"status\":\"" + channel.getLifecycleState().toString() + "\",";

代码示例来源:origin: org.apache.flume/flume-ng-core

} else if (t instanceof ChannelException) {
 logger.error("Rpc Sink " + getName() + ": Unable to get event from" +
   " channel " + channel.getName() + ". Exception follows.", t);
 sinkCounter.incrementChannelReadFail();
 status = Status.BACKOFF;

代码示例来源:origin: org.apache.flume.flume-ng-sinks/flume-ng-morphline-solr-sink

myChannel.getName() + ". Exception follows.", t);
sinkCounter.incrementEventWriteOrChannelFail(t);
try {

相关文章