Skip to content

Commit d170e24

Browse files
author
deyzhong
committed
fixed spark3.0 access hive table while data in hbase problem
1 parent 8c7d6f9 commit d170e24

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

sql/hive/src/main/scala/org/apache/spark/sql/hive/TableReader.scala

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,9 @@ class HadoopTableReader(
299299
*/
300300
private def createHadoopRDD(localTableDesc: TableDesc, inputPathStr: String): RDD[Writable] = {
301301
val inputFormatClazz = localTableDesc.getInputFileFormatClass
302-
if (classOf[newInputClass[_, _]].isAssignableFrom(inputFormatClazz)) {
302+
if (!inputFormatClazz.getName.
303+
equalsIgnoreCase("org.apache.hadoop.hive.hbase.HiveHBaseTableInputFormat")
304+
&& classOf[newInputClass[_, _]].isAssignableFrom(inputFormatClazz)) {
303305
createNewHadoopRDD(localTableDesc, inputPathStr)
304306
} else {
305307
createOldHadoopRDD(localTableDesc, inputPathStr)

0 commit comments

Comments
 (0)