flume - Apache Flume 在我第一次在 Windows 上安装时没有卡在启动时
问题描述
我已经下载了最新版本的 Apache Flume “apache-flume-1.8.0-bin”,并在首次启动时更改了如下配置。我正在 Windows 8.1 中设置 apache flume
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
# The configuration file needs to define the sources,
# the channels and the sinks.
# Sources, channels and sinks are defined per agent,
# in this case called 'agent'
na.sources = nas1
na.channels = nac1
na.sinks = nal1
# For each one of the sources, the type is defined
na.sources.nas1.type = netcat
na.sources.nas1.bind = localhost
na.sources.nas1.port = 44444
# The channel can be defined as follows.
na.sources.nas1.channels = nac1
# Each sink's type must be defined
na.sinks.nal1.type = logger
#Specify the channel the sink should use
na.sinks.nal1.channel = nac1
# Each channel's type is defined.
na.channels.nac1.type = memory
# Other config values specific to each type of channel(sink or source)
# can be defined as well
# In this case, it specifies the capacity of the memory channel
na.channels.nac1.capacity = 100
保存此配置后,我尝试使用以下命令启动我的水槽代理
flume-ng agent -n na -f C:/apache-flume-1.8.0-bin/conf/flume-conf-log.properties
之后它卡在了水槽代理的启动中,如下所示,
C:\apache-flume-1.8.0-bin\bin>flume-ng agent -n na -f C:/apache-flume-1.8.0-bin/conf/flume-conf-log.properties
C:\apache-flume-1.8.0-bin\bin>powershell.exe -NoProfile -InputFormat none -ExecutionPolicy unrestricted -File C:\apache-flume-1.8.0-bin\bin\flume-ng.ps1 agent -n na -f C:/apache-fl
ume-1.8.0-bin/conf/flume-conf-log.properties
WARN: Config directory not set. Defaulting to C:\apache-flume-1.8.0-bin\conf
Sourcing environment configuration script C:\apache-flume-1.8.0-bin\conf\flume-env.ps1
Including Hadoop libraries found in (C:\hadoop-2.7.6) for DFS access
Including HBase libraries found via (C:\hbase-2.1.0) for HBase access
WARN: HIVE_HOME not found
Running FLUME agent :
class: org.apache.flume.node.Application
arguments: -n na -f "C:\apache-flume-1.8.0-bin\conf\flume-conf-log.properties"
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/C:/apache-flume-1.8.0-bin/lib/slf4j-log4j12-1.6.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/C:/hadoop-2.7.6/share/hadoop/common/lib/slf4j-log4j12-1.7.10.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
我附上了错误截图以供参考。我需要处理服务器日志以捕获错误消息,为此我需要使用 Flume 将日志流式传输到 HDFS。
水槽在启动时卡住 - 屏幕截图
解决方案
通过添加 Java 路径更改“flume-env.sh”后,它可以使用以下命令。
flume-ng agent -n na --conf ./conf/ -f C:/apache-flume-1.8.0-bin/conf/flume-conf-log.properties
我也附上了工作截图。 工作截图
推荐阅读
- javascript - 当它是一个 URL 时下载 PDF
- ios - 使用 sudo gem install cocoapods 更新 cocopods 后,它仍然显示旧版本
- javascript - Express CORS 不适用于 socket.io
- libreoffice - 显示简单 TextBox 形状的 LibreOffice 宏
- android - 获取真实日期,当用户从 android studio 中的设置更改日期时
- scikit-learn - 为什么每次运行程序时我的 Pearson 相关系数(和 MSE)都会不断变化?
- c# - 如何在asp中每天运行cron作业。网络核心应用?
- javascript - 代码编辑器无法识别 javascript 函数
- python - while 循环 + if 年龄询问程序中的条件语句
- sql - 在没有游标的情况下更新每个选择行结果