Advertisement
Guest User

Untitled

a guest
Mar 30th, 2016
187
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.27 KB | None | 0 0
  1. JDBC Uri: jdbc:hive2://taco.bell.company.com:10000/default: Peer indicated failure: Unsupported mechanism type PLAIN
  2.  
  3. package com.tacobell
  4.  
  5.  
  6.  
  7. import org.apache.hadoop.fs.permission.{FsAction, FsPermission}
  8. import org.apache.hadoop.fs.{Path, FileSystem}
  9. import org.apache.spark.SparkConf
  10. import org.apache.spark.SparkContext
  11.  
  12. import org.apache.spark.sql.{SQLContext, Row}
  13. import org.apache.spark.sql.types.{StructType, StructField, StringType, LongType, DoubleType}
  14.  
  15.  
  16. //scp BeelineConnection-1.0-SNAPSHOT-worker.jar tacoEater@$hadoopdev:/home/nit505/
  17. /**
  18. * Created by tacoEater on 3/29/16.
  19. */
  20. object Main {
  21.  
  22. def main (args: Array[String]): Unit ={
  23.  
  24. println("hello from the other side")
  25. //create a spark conf
  26. val conf = new SparkConf()
  27. .setAppName("BeelineTest")
  28. .setMaster("local")
  29.  
  30. //create a spark context
  31. val sc = new SparkContext(conf)
  32.  
  33. //create a jdbc sql context
  34. val sqlContext = new SQLContext(sc)
  35.  
  36. val hive_df = sqlContext.read.format("jdbc").options(
  37. Map("url" -> "jdbc:hive2://taco.bell.company.com:10000/default",
  38. "dbtable" -> "dhdp_taco.digestion_note_history_taco",
  39. "driver" -> "org.apache.hive.jdbc.HiveDriver",
  40. "user" -> "tacoEater",
  41. "password" -> "tacoPassword"
  42. )
  43. ).load()
  44.  
  45.  
  46.  
  47. }
  48.  
  49. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement