You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import it.nerdammer.spark.hbase._
import org.apache.spark.sql.SparkSession
object SparkHBase {
def main(args: Array[String]): Unit = {
val spark = SparkSession
.builder
.appName("FunnelSpark")
.master("local[*]")
.config("spark.hbase.host", "localhost")
.getOrCreate
val sc = spark.sparkContext
sc.hadoopConfiguration.set("spark.hbase.host", "localhost")
val rdd = sc.parallelize(1 to 100)
.map(i => (i.toString, i + 1, "Hello"))
rdd.toHBaseTable("mytable")
.toColumns("column1", "column2")
.inColumnFamily("mycf")
.save()
spark.stop()
}
}
This code is writing data to HBase but than it failes with this error:
java.lang.IllegalArgumentException: Can not create a Path from a null string
at org.apache.hadoop.fs.Path.checkPathArg(Path.java:123)
at org.apache.hadoop.fs.Path.<init>(Path.java:135)
at org.apache.hadoop.fs.Path.<init>(Path.java:89)
at org.apache.spark.internal.io.HadoopMapReduceCommitProtocol.absPathStagingDir(HadoopMapReduceCommitProtocol.scala:58)
at org.apache.spark.internal.io.HadoopMapReduceCommitProtocol.commitJob(HadoopMapReduceCommitProtocol.scala:132)
at org.apache.spark.internal.io.SparkHadoopMapReduceWriter$.write(SparkHadoopMapReduceWriter.scala:101)
at org.apache.spark.rdd.PairRDDFunctions$$anonfun$saveAsNewAPIHadoopDataset$1.apply$mcV$sp(PairRDDFunctions.scala:1085)
at org.apache.spark.rdd.PairRDDFunctions$$anonfun$saveAsNewAPIHadoopDataset$1.apply(PairRDDFunctions.scala:1085)
at org.apache.spark.rdd.PairRDDFunctions$$anonfun$saveAsNewAPIHadoopDataset$1.apply(PairRDDFunctions.scala:1085)
at org.apache.spark.rdd.RDDOperationScope$.withScope(RDDOperationScope.scala:151)
at org.apache.spark.rdd.RDDOperationScope$.withScope(RDDOperationScope.scala:112)
at org.apache.spark.rdd.RDD.withScope(RDD.scala:362)
at org.apache.spark.rdd.PairRDDFunctions.saveAsNewAPIHadoopDataset(PairRDDFunctions.scala:1084)
at it.nerdammer.spark.hbase.HBaseWriter.save(HBaseWriterBuilder.scala:102)
at SparkHBase$.main(SparkHBase.scala:47)
at SparkHBase.main(SparkHBase.scala)```
The text was updated successfully, but these errors were encountered:
abstract-karshit
changed the title
Spark 2.2: Exception in thread "main" java.lang.IllegalArgumentException: Can not create a Path from a null string
Running in Spark 2.2
Sep 28, 2017
This code is writing data to HBase but than it failes with this error:
The text was updated successfully, but these errors were encountered: