@Dinesh Chitlangia, @Ayoush Agarwal, I think you may be missing the point -- he included "if exists" in his drop function notation. If the function doesn't exist, you shouldn't get an error from the statement, it should silently do nothing. This is similar to `create table if not exists xyz` -- if the table exists, the statement does nothing, if it doesn't exist, you do something. Unfortunately, there's no notation to create function if not exists, and if it does already exist, you'll get an error. The drop function notation does include an "if exists" option which means if you want to safely create a function that may already exist, you can first drop it if it does exist, and then recreate it -- however as Ayoush has demonstrated, due to the issue with the Drop implementation, you can't actually use this approach because the statement throws an exception if the function doesn't exist.
... View more
I get the strong impression that HW no longer actually supports manual installation and favors pushing users to install via ambari. I've tried following the manual instructions and they are filled with errors, inconsistencies and links to missing resources (for instance, the companion files reference here don't exist -- https://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.5.5/bk_command-line-installation/content/download-companion-files.html -- nor do they exist for any version of 2.5.5 or 2.5.6, I tried every possible patch number from 1-200) In general, I have to say that I'm a bit annoyed with the creation of yet another symlink management tool (hdp-select). It would be really nice if you supported a standard tool and tried to conform to standard accepted folder structures rather than coming up with your own new and nonconformant standards (i.e. support etc alternatives and go back to putting files in /usr/lib or /usr/libexec rather than /usr/hdp/2.5...../) The new approach has broken a lot of the old scripts and companion files (which are the only ones still available). For those who wonder, I'm trying to setup a basic virtual environment for development purposes -- one that's easy to standup and teardown. You might ask why I don't just use the readily available "sandox" -- I have a few simple answer: 1. I can't find an old sandbox that conforms to my production cluster version 2. the sandbox is HUGE -- why are these images 10gb in size? 3. this is kind of a reiteration of 1 and 2, but the sandbox has more than I want or need for my purposes, so it takes forever to teardown and standup and it doesn't have the things that I do want/need, so I have to manually add all those things each time I tear it down and stand it back up. I want this to be fully automated (I use vagrant for development ease -- vagrant destroy, vagrant up, boom -- I have a fully reproducible environment)
... View more