Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- JDBC Uri: jdbc:hive2://taco.bell.company.com:10000/default: Peer indicated failure: Unsupported mechanism type PLAIN
- package com.tacobell
- import org.apache.hadoop.fs.permission.{FsAction, FsPermission}
- import org.apache.hadoop.fs.{Path, FileSystem}
- import org.apache.spark.SparkConf
- import org.apache.spark.SparkContext
- import org.apache.spark.sql.{SQLContext, Row}
- import org.apache.spark.sql.types.{StructType, StructField, StringType, LongType, DoubleType}
- //scp BeelineConnection-1.0-SNAPSHOT-worker.jar tacoEater@$hadoopdev:/home/nit505/
- /**
- * Created by tacoEater on 3/29/16.
- */
- object Main {
- def main (args: Array[String]): Unit ={
- println("hello from the other side")
- //create a spark conf
- val conf = new SparkConf()
- .setAppName("BeelineTest")
- .setMaster("local")
- //create a spark context
- val sc = new SparkContext(conf)
- //create a jdbc sql context
- val sqlContext = new SQLContext(sc)
- val hive_df = sqlContext.read.format("jdbc").options(
- Map("url" -> "jdbc:hive2://taco.bell.company.com:10000/default",
- "dbtable" -> "dhdp_taco.digestion_note_history_taco",
- "driver" -> "org.apache.hive.jdbc.HiveDriver",
- "user" -> "tacoEater",
- "password" -> "tacoPassword"
- )
- ).load()
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement