Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-21038

SAXParseException when hbase.spark.use.hbasecontext=false

    XMLWordPrintableJSON

    Details

    • Hadoop Flags:
      Reviewed

      Description

      org.xml.sax.SAXParseException; systemId: file:/home/qwerty/hbase/hbase/hbase-spark/target/test-classes/; lineNumber: 1; columnNumber: 1; Content is not allowed in prolog.
      {{ java.lang.RuntimeException: org.xml.sax.SAXParseException; systemId: file:/home/qwerty/hbase/hbase/hbase-spark/target/test-classes/; lineNumber: 1; columnNumber: 1; Content is not allowed in prolog.}}
      {{ at org.apache.hadoop.conf.Configuration.loadResource(Configuration.java:2728)}}
      {{ at org.apache.hadoop.conf.Configuration.loadResources(Configuration.java:2574)}}
      {{ at org.apache.hadoop.conf.Configuration.getProps(Configuration.java:2477)}}
      {{ at org.apache.hadoop.conf.Configuration.get(Configuration.java:1047)}}
      {{ at org.apache.hadoop.mapred.JobConf.checkAndWarnDeprecation(JobConf.java:2007)}}
      {{ at org.apache.hadoop.mapred.JobConf.<init>(JobConf.java:449)}}
      {{ at org.apache.hadoop.mapreduce.Job.getInstance(Job.java:184)}}
      {{ at org.apache.hadoop.hbase.spark.HBaseContext.<init>(HBaseContext.scala:71)}}
      {{ at org.apache.hadoop.hbase.spark.HBaseRelation.<init>(DefaultSource.scala:136)}}
      {{ at org.apache.hadoop.hbase.spark.DefaultSource.createRelation(DefaultSource.scala:79)}}

      This is because when hbase.spark.use.hbasecontext=false, org.apache.hadoop.hbase.spark.HBaseRelation will try to create a HbaseContext with org.apache.hadoop.hbase.spark.HBaseRelation#configResources. But if org.apache.hadoop.hbase.spark.datasources.HBaseSparkConf#HBASE_CONFIG_LOCATION is not set, tdefault is "" (empty string). org.apache.hadoop.conf.Configuration#getResource(String) will return current folder as URL due to classLoader.getResource(""), which will fail to be parsed as a file

        Attachments

        1. HBASE-21038.02.patch
          3 kB
          Ajith S
        2. HBASE-21038.01.patch
          1 kB
          Ajith S

          Activity

            People

            • Assignee:
              ajithshetty Ajith S
              Reporter:
              ajithshetty Ajith S
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: