Member since
03-26-2017
61
Posts
1
Kudos Received
3
Solutions
My Accepted Solutions
Title | Views | Posted |
---|---|---|
3085 | 08-27-2018 03:19 PM | |
25410 | 08-27-2018 03:18 PM | |
9816 | 04-02-2018 01:54 PM |
08-24-2018
05:51 PM
Hi @Felix Albani, Still the same issue Exists, please find my attached build.sbt and sample code attached. import sbt._
import sbt.Keys._
name := "BackupSnippets"
version := "1.0"
scalaVersion := "2.11.8"
val sparkVersion = "2.2.1"
val hadoopVersion = "2.7.1"
val poiVersion = "3.9"
val avroVersion = "1.7.6"
val hortonworksVersion = "2.2.0.2.6.3.79-2"
conflictManager := ConflictManager.latestRevision
/*libraryDependencies ++= Seq(
"org.apache.spark" %% "spark-core" % sparkVersion,
"org.apache.spark" %% "spark-sql" % sparkVersion,
"org.apache.spark" %% "spark-hive" % sparkVersion,
"org.apache.poi" % "poi-ooxml" % poiVersion,
"org.apache.poi" % "poi" % poiVersion,
"org.apache.avro" % "avro" % avroVersion
)*/
/*resolvers ++= Seq(
"Typesafe repository" at "https://repo.typesafe.com/typesafe/releases/",
"Typesafe Ivyrepository" at "https://repo.typesafe.com/typesafe/ivy-releases/",
"Maven Central" at "https://repo1.maven.org/maven2/",
"Sonatype snapshots" at "https://oss.sonatype.org/content/repositories/snapshots/",
Resolver.sonatypeRepo("releases")
) */
libraryDependencies ++= Seq(
"org.apache.spark" %% "spark-core" % hortonworksVersion,
"org.apache.spark" %% "spark-sql" % hortonworksVersion,
"org.apache.spark" %% "spark-hive" % hortonworksVersion)
resolvers ++= Seq("Hortonworks Releases" at "http://repo.hortonworks.com/content/repositories/releases/",
"Jetty Releases" at "http://repo.hortonworks.com/content/repositories/jetty-hadoop/") ************************************************************************************ package BigData101.ORC
import ScalaUtils.SchemaUtils
import org.apache.spark.sql.{Encoders, Row, SparkSession}
import org.apache.spark.sql.catalyst.ScalaReflection
import org.apache.spark.sql.types.StructType
object ORCTesting {
def main(args: Array[String]): Unit = {
val spark: SparkSession = SparkSession.builder()
.master("local[*]")
.appName("ORC Testing")
.enableHiveSupport()
.getOrCreate()
case class Airlines(Airline_id: Integer, Name: String, Alias: String, IATA: String, ICAO: String, Callsign: String,
Country: String, Active: String)
//val AirlineSchema = ScalaReflection.schemaFor[Airlines].dataType.asInstanceOf[StructType]
Encoders.product[Airlines].schema
sys.exit(1)
}
}
... View more
08-24-2018
05:41 PM
Hi @Felix Albani just for an clarification this will work only on Hortonworks dependencies ? please find my build.sbt dependencies and let me know whether i needs to add anything val sparkVersion = "2.2.1"val hadoopVersion = "2.7.1"val poiVersion = "3.9"val avroVersion = "1.7.6" libraryDependencies ++= Seq(
"org.apache.spark" %% "spark-core" % sparkVersion,
"org.apache.spark" %% "spark-sql" % sparkVersion,
"org.apache.spark" %% "spark-hive" % sparkVersion,
"org.apache.poi" % "poi-ooxml" % poiVersion,
"org.apache.poi" % "poi" % poiVersion,
"org.apache.avro" % "avro" % avroVersion
)
... View more
08-24-2018
01:32 PM
Hi @Felix Albani, Tanx for your response, actully I've tried all the possible options, please find the attached image for reference. is there any other way i can solve my issue ? Cheers, MJ
... View more
08-24-2018
08:28 AM
Hi @Dongjoon Hyun How to add this dependency in build.sbt ? coz im using Spark 2.2.1 which is showing following Errorjava.lang.ClassNotFoundException: org.apache.spark.sql.execution.datasources.orc.DefaultSource.
... View more
08-24-2018
01:13 AM
Hi Aditya, Tanx for your reply, is there any other posts or blog can i find how to implement the schema evolution in ORC ?
... View more
08-24-2018
01:09 AM
Hi All, im trying to convert case class to StryctType schema in spark, im getting error attached in image, please find my case class and conversion technique case class Airlines(Airline_id: Integer, Name: String, Alias: String, IATA: String, ICAO: String, Callsign: String, Country: String, Active: String) val AirlineSchema = ScalaReflection.schemaFor[Airlines].dataType.asInstanceOf[StructType] Reference URL: https://stackoverflow.com/questions/36746055/generate-a-spark-structtype-schema-from-a-case-class Cheers, MJ
... View more
Labels:
- Labels:
-
Apache Spark
-
Schema Registry
08-23-2018
07:47 AM
Hi all, as we all know we can control schema evolution in Avro format for both "forward and backward" schema-compatibility. is there any option can we perfrom the same in ORC file format too ? let me know the possibilities to explore more on this. Cheers, MJ
... View more
Labels:
- Labels:
-
Schema Registry
07-09-2018
08:06 AM
Hi @Sandeep Nemuri, I think i found the answer from Stackoverflow site. Tanx for you info.
... View more
07-09-2018
08:05 AM
Tanx for your info @Felix Albani
... View more