简体   繁体   English

createOrReplaceTempView 不是 org.apache.spark.rdd.RDD 的成员

[英]createOrReplaceTempView is not a member of org.apache.spark.rdd.RDD

I am using hadoop 2.7.2, hbase 1.4.9, spark 2.2.0, scala 2.11.8 and java 1.8 .我正在使用hadoop 2.7.2、hbase 1.4.9、spark 2.2.0、scala 2.11.8 和 Z93F725A07423FE1C8896F448B33.D21 I run this command whithout having any error:我运行这个命令没有任何错误:

val Patterns_fromHbase = mimic_PatternsFromHbase.mapPartitions(f=> f.map(row1 => (Bytes.toString(row1._2.getRow), Bytes.toString(row1._2.getValue(Bytes.toBytes("sepsiscategories"),Bytes.toBytes("subject_id")))))).toDF("id","subject_id")

Then I run this command:然后我运行这个命令:

mimic_PatternsFromHbase.createOrReplaceTempView("subject_id_table")

and I just have this error:我只是有这个错误:

:57: error: value createOrReplaceTempView is not a member of org.apache.spark.rdd.RDD[(org.apache.hadoop.hbase.io.ImmutableBytesWritable, org.apache.hadoop.hbase.client.Result)] mimic_PatternsFromHbase.createOrReplaceTempView("subject_id_table") :57: error: value createOrReplaceTempView is not a member of org.apache.spark.rdd.RDD[(org.apache.hadoop.hbase.io.ImmutableBytesWritable, org.apache.hadoop.hbase.client.Result)] mimic_PatternsFromHbase. createOrReplaceTempView("subject_id_table")

what is the cause of this error and how to fix it please请问这个错误的原因是什么以及如何解决它

I found my fault, it is a fault of bad attention.我发现了我的错,这是注意力不集中的错。 in the place to call createOrReplaceView method by calling them by Patterns_fromHbase I called her by mimic_PatternsFromHbase在通过Patterns_fromHbase调用它们来调用 createOrReplaceView 方法的地方我通过mimic_PatternsFromHbase调用了她

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM