Guest User

Untitled

a guest
Nov 21st, 2017
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.31 KB | None | 0 0
  1. {
  2. "display_name": "PySpark ",
  3. "language": "python3",
  4. "argv": [
  5. "/usr/bin/python3",
  6. "-m",
  7. "IPython.kernel",
  8. "-f",
  9. "{connection_file}"
  10. ],
  11. "env": {
  12. "SPARK_HOME": "<mypath>/spark-1.6.0",
  13. "PYTHONSTARTUP": "<mypath>/spark-1.6.0/python/pyspark/shell.py",
  14. "PYSPARK_SUBMIT_ARGS": "--master spark://<mymaster>:7077 --conf spark.executor.memory=2G pyspark-shell --driver-class-path /opt/vertica/java/lib/vertica-jdbc.jar"
  15. }
  16. }
  17.  
  18. # download postgres jar
  19. wget https://jdbc.postgresql.org/download/postgresql-42.1.4.jar
  20.  
  21. # install postgres on your machine
  22. pip install postgres
  23.  
  24. # add user, pass and db to postgres
  25. psql -d postgres -c "create user hive"
  26. psql -d postgres -c "alter user hive with password 'pass'"
  27. psql -d postgres -c "create database hive_metastore"
  28. psql -d postgres -c "grant all privileges on database hive_metastore to hive"
  29.  
  30. <configuration>
  31.  
  32. <property>
  33. <name>javax.jdo.option.ConnectionURL</name>
  34. <value>jdbc:postgresql://localhost:5432/hive_metastore</value>
  35. </property>
  36.  
  37. <property>
  38. <name>javax.jdo.option.ConnectionDriverName</name>
  39. <value>org.postgresql.Driver</value>
  40. </property>
  41.  
  42. <property>
  43. <name>javax.jdo.option.ConnectionUserName</name>
  44. <value>hive</value>
  45. </property>
  46.  
  47. <property>
  48. <name>javax.jdo.option.ConnectionPassword</name>
  49. <value>pass</value>
  50. </property>
  51.  
  52. </configuration>
Add Comment
Please, Sign In to add comment