Error reading field 'throttle_time_ms': java.nio.BufferUnderflowException

flume往Kafka里写数据报错:

04 Jul 2018 20:43:44,401 ERROR [kafka-producer-network-thread | producer-1] (org.apache.kafka.clients.producer.internals.Sender.run:130)  - Uncaught error in kafka producer I/O thread: 
org.apache.kafka.common.protocol.types.SchemaException: Error reading field 'throttle_time_ms': java.nio.BufferUnderflowException
	at org.apache.kafka.common.protocol.types.Schema.read(Schema.java:71)
	at org.apache.kafka.clients.NetworkClient.handleCompletedReceives(NetworkClient.java:439)
	at org.apache.kafka.clients.NetworkClient.poll(NetworkClient.java:265)
	at org.apache.kafka.clients.producer.internals.Sender.run(Sender.java:216)
	at org.apache.kafka.clients.producer.internals.Sender.run(Sender.java:128)
	at java.lang.Thread.run(Thread.java:748)

是由于flume版本为1.7,kafka版本较老为0.8,不兼容所致,将kafka版本升级为0.11或flume版本使用1.6解决!

注:flume1.6及以前的版本没有TAILDIR(org.apache.flume.source.taildir.TaildirSource)这个source type,这个类型支持目录变化的文件,断点续传,1.6版本想要使用这个功能需要将1.7版中Taildir Source 组件源码编译打包后,放入 Flume1.6 安装目录的 lib 文件目录下。

在 Flume配置文件中指定全类名即可使用 TaildirSource 组件。

a1.sources.r1.type = com.xxx.flume.source.TaildirSource
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
// Function to get the robot pose in the given costmap frame bool MoveBase::getRobotPose(geometry_msgs::PoseStamped& global_pose, costmap_2d::Costmap2DROS* costmap) { // Set the global pose to the identity transform tf2::toMsg(tf2::Transform::getIdentity(), global_pose.pose); // Create a new pose for the robot and set it to the identity transform geometry_msgs::PoseStamped robot_pose; tf2::toMsg(tf2::Transform::getIdentity(), robot_pose.pose); // Set the frame ID for the robot pose to the robot base frame robot_pose.header.frame_id = robot_base_frame_; // Set the time stamp for the robot pose to the latest available time robot_pose.header.stamp = ros::Time(); // latest available // Save the current time for checking the tf delay later ros::Time current_time = ros::Time::now(); // save time for checking tf delay later // Get the robot pose on the given costmap frame try { tf_.transform(robot_pose, global_pose, costmap->getGlobalFrameID()); } catch (tf2::LookupException& ex) { // If the transform lookup fails, print an error message and return false ROS_ERROR_THROTTLE(1.0, "No Transform available Error looking up robot pose: %s\n", ex.what()); return false; } catch (tf2::ConnectivityException& ex) { // If there is a connectivity error, print an error message and return false ROS_ERROR_THROTTLE(1.0, "Connectivity Error looking up robot pose: %s\n", ex.what()); return false; } catch (tf2::ExtrapolationException& ex) { // If there is an extrapolation error, print an error message and return false ROS_ERROR_THROTTLE(1.0, "Extrapolation Error looking up robot pose: %s\n", ex.what()); return false; } // Check if the time stamp of the global pose is within the costmap transform tolerance if (current_time.toSec() - global_pose.header.stamp.toSec() > costmap->getTransformTolerance()) { // If the time stamp is outside the tolerance, print a warning and return false ROS_WARN_THROTTLE(1.0, "Transform timeout for %s. " \ "Current time: %.4f, pose stamp: %.4f, tolerance: %.4f", costmap->getName().c_str(), current_time.toSec(), global_pose.header.stamp.toSec(), costmap->getTransformTolerance()); return false; } // Return true if the robot pose was successfully retrieved return true; }
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值