spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From windpiger <...@git.apache.org>
Subject [GitHub] spark pull request #16910: [SPARK-19575][SQL]Reading from or writing to a hi...
Date Wed, 22 Feb 2017 06:40:52 GMT
Github user windpiger commented on a diff in the pull request:

    https://github.com/apache/spark/pull/16910#discussion_r102393239
  
    --- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/TableReader.scala ---
    @@ -114,22 +114,30 @@ class HadoopTableReader(
         val tablePath = hiveTable.getPath
         val inputPathStr = applyFilterIfNeeded(tablePath, filterOpt)
     
    -    // logDebug("Table input: %s".format(tablePath))
    -    val ifc = hiveTable.getInputFormatClass
    -      .asInstanceOf[java.lang.Class[InputFormat[Writable, Writable]]]
    -    val hadoopRDD = createHadoopRdd(tableDesc, inputPathStr, ifc)
    -
    -    val attrsWithIndex = attributes.zipWithIndex
    -    val mutableRow = new SpecificInternalRow(attributes.map(_.dataType))
    -
    -    val deserializedHadoopRDD = hadoopRDD.mapPartitions { iter =>
    -      val hconf = broadcastedHadoopConf.value.value
    -      val deserializer = deserializerClass.newInstance()
    -      deserializer.initialize(hconf, tableDesc.getProperties)
    -      HadoopTableReader.fillObject(iter, deserializer, attrsWithIndex, mutableRow, deserializer)
    -    }
    +    val locationPath = new Path(inputPathStr)
    +    val fs = locationPath.getFileSystem(sparkSession.sessionState.newHadoopConf())
    --- End diff --
    
    ok~


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Mime
View raw message