Guest User

Untitled

a guest
Dec 16th, 2018
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.48 KB | None | 0 0
  1. public class HiveConf extends Configuration {
  2.  
  3. /* */ private void initialize(Class<?> cls) {
  4. /* 617 */ this.hiveJar = new JobConf(cls).getJar();
  5. /* */
  6. /* 620 */ this.origProp = getUnderlyingProps();
  7. /* */
  8. /* 623 */ URL hconfurl = getClassLoader().getResource("hive-default.xml");
  9. /* 624 */ if (hconfurl == null)
  10. /* 625 */ l4j.debug("hive-default.xml not found.");
  11. /* */ else {
  12. /* 627 */ addResource(hconfurl);
  13. /* */ }
  14. /* 629 */ URL hsiteurl = getClassLoader().getResource("hive-site.xml");
  15. /* 630 */ if (hsiteurl == null)
  16. /* 631 */ l4j.debug("hive-site.xml not found.");
  17. /* */ else {
  18. /* 633 */ addResource(hsiteurl);
  19. /* */ }
  20. /* */
  21. /* 638 */ URL hadoopconfurl = getClassLoader().getResource("hadoop-default.xml");
  22. /* 639 */ if (hadoopconfurl == null) {
  23. /* 640 */ hadoopconfurl = getClassLoader().getResource("hadoop-site.xml");
  24. /* */ }
  25. /* 642 */ if (hadoopconfurl != null) {
  26. /* 643 */ String conffile = hadoopconfurl.getPath();
  27. /* 644 */ setVar(ConfVars.HADOOPCONF, conffile.substring(0, conffile.lastIndexOf(47)));
  28. /* */ }
  29. /* */
  30. /* 647 */ applySystemProperties();
  31. /* */
  32. /* 651 */ if (this.hiveJar == null) {
  33. /* 652 */ this.hiveJar = get(ConfVars.HIVEJAR.varname);
  34. /* */ }
  35. /* */
  36. /* 655 */ if (this.auxJars == null)
  37. /* 656 */ this.auxJars = get(ConfVars.HIVEAUXJARS.varname);
  38. /* */ }
Add Comment
Please, Sign In to add comment