spark模型error java.lang.IllegalArgumentException: Row length is 0

failure: Lost task 18.3 in stage 17.0 (TID 59784,XXXXX, executor 19): java.lang.IllegalArgumentException: Row length is 0

场景是写入hbase:

val put = new Put(Bytes.toBytes(line._1))

当取出的line._1做为row,值是“”或者null时就会出现此异常。所以做如下处理,先过滤掉为null和“”的数据

    val bhaseRdd = resultRdd.filter(r => {
      r._1 != "" && r._1!=null&&r._1.length>0
    }).map(line => {
      val put = new Put(Bytes.toBytes(line._1)) //rowKey 为参数,拿到put
      val key = line._2.keySet().iterator(); //拿到对应的dataMap    ........

原文地址:https://www.cnblogs.com/shaozhiqi/p/11613605.html

时间: 2024-11-11 10:34:41

spark模型error java.lang.IllegalArgumentException: Row length is 0的相关文章

Caused by: java.lang.IllegalArgumentException: error at ::0 can't find referenced pointcut aaa

这个错误是说,找不到这个注释: 解决方案: 1.更改自己本机的jdk版本(我的更改了无效): 在工程选择框内点击右键--->build path----->Library--->add Library 选择JRE System Library ----->next 就可以更改了. 2.更改aspectjweaver.ja的版本,进入官网这一页http://www.eclipse.org/aspectj/downloads.php 选择aspectj-1.8.8.jar进行下载. 完

严重: Error starting static Resources java.lang.IllegalArgumentException:

严重: Error starting static Resources java.lang.IllegalArgumentException: Document base E:\myworkspace\evecomoa\WebRoot does not exist or is not a readable directory at org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext... 解决办法: E:\my

Error querying database. Cause: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for …

编译通过并且运行web成功后,访问的页面不需要连接数据库,不牵扯到反射调用实体类就不会报错, 报错内容如下: [WARNING] org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exce

Kafka日志报错:[error] k.m.j.KafkaJMX$ - Failed to connect to service:jmx:rmi:///jndi/rmi://10.1.3.116:-1/jmxrmi java.lang.IllegalArgumentException: requirement failed: No jmx port but jmx polling enabled!

一.Kafka日志报错:[error] k.m.j.KafkaJMX$ - Failed to connect to service:jmx:rmi:///jndi/rmi://10.1.3.116:-1/jmxrmi java.lang.IllegalArgumentException: requirement failed: No jmx port but jmx polling enabled! 以上报错,并没有对Kafka对使用造成直接影响: 1>.启动生产者:kafka-console

搭建Mybatis 出现 Error querying database. Cause: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for mapper.BatchCustomer.findBatchCustomerOneToOne

Error querying database. Cause: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for mapper.BatchCustomer.findBatchCustomerOneToOne### Cause: java.lang.IllegalArgumentException: Mapped Statements collection does

jmeter linux压测报错:Error in NonGUIDriver java.lang.IllegalArgumentException: Problem loading XML from:'/home/server/ptest/disk_out.jmx'.

1.linux环境jmeter与win环境编写脚本的jmeter版本不一致,版本改为一致 2.脚本中存在中文,去除中文 3.脚本中存在类似于[email protected] - Active Threads Over Time 监听器,去除监听器(查看结果树和聚合报告可以保留) 再次上传至服务器压测 jmeter linux压测报错:Error in NonGUIDriver java.lang.IllegalArgumentException: Problem loading XML fro

view.setTag(key,Object) (java.lang.IllegalArgumentException: The key must be an application-specific resource id.)

转自: http://blog.csdn.net/brokge/article/details/8536906 setTag是android的view类中很有用的一个方法,可以用它来给空间附加一些信息,在很多场合下都得到妙用. setTag(Object tag)方法比较简单,这里主要谈一谈带两个参数的setTag方法. 官方的api文档中提到:" The specified key should be an id declared in the resources of the applica

解决Android studio 启动报错java.lang.RuntimeException: java.lang.IllegalArgumentException

报错内容 Internal error. Please report to https://code.google.com/p/android/issues java.lang.RuntimeException: java.lang.IllegalArgumentException: Argument for @NotNull parameter 'name' of com/android/tools/idea/welcome/Platform.<init> must not be null 

java.lang.IllegalArgumentException: Document base E:\Eclipse\workspace\.metadata\.plugins\org.eclips

1.错误描述 四月 13, 2015 5:56:55 下午 org.apache.catalina.core.AprLifecycleListener init 信息: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: D:\Java\jdk1.7.0_67\bi