How to uninstall or remove Hadoop from Ubuntu ?
Solution 1
Actually I just delete the folder hadoop which given permission(shown below) to my HDFS user.
$ sudo rm -r -f /usr/local/hadoop/
Previously I extracted hadoop-2.4.0 and given permission for my HDFS user(hadoopuser - HDFS user),
$ sudo chown -R hadoopuser:hadoop hadoop
After that I removed user(hadoopuser) and group(hadoop)
root@ARUL-PC:~# deluser hadoopuser
Removing user `hadoopuser' ...
Warning: group `hadoop' has no more members.
Done.
root@ARUL-PC:~# deluser --group hadoop
Removing group `hadoop' ...
Done.
Now hadoop-2.4.0 not present in my system.
Note :
In my system, configured hadoop folder is /usr/local/hadoop/
.
Solution 2
You can uninstall hadoop using:
sudo apt-get purge hadoop-2.4.*
This will remove all packages and configurations related to hadoop from your system.
Related videos on Youtube
Tibblez
Updated on September 18, 2022Comments
-
Tibblez over 1 year
I'm not sure my title is the best descriptor of my issue. Consider this minimum working example:
$arr = @() $object = New-Object -TypeName PSObject $object | Add-Member –MemberType NoteProperty –Name Name –Value "Fred" $object | Add-Member –MemberType NoteProperty –Name Rank –Value "2" $arr += $object $object = New-Object -TypeName PSObject $object | Add-Member –MemberType NoteProperty –Name Name –Value "Joe" $object | Add-Member –MemberType NoteProperty –Name Rank –Value "1" $arr += $object $object = New-Object -TypeName PSObject $object | Add-Member –MemberType NoteProperty –Name Name –Value "Ann" $object | Add-Member –MemberType NoteProperty –Name Rank –Value "4" $arr += $object $arr ($arr | foreach { if($_.Rank -gt 1) { $_ } }).GetType() | FT ($arr | foreach { if($_.Rank -le 1) { $_ } }).GetType() | FT
The output of this is
Name Rank ---- ---- Fred 2 Joe 1 Ann 4 IsPublic IsSerial Name BaseType -------- -------- ---- -------- True True Object[] System.Array IsPublic IsSerial Name BaseType -------- -------- ---- -------- True False PSCustomObject System.Object
My problem exists when trying to do additional processing on the resultant array of the foreach commands. As you can imagine, the input data for $arr would be different each time and the number of matching results would be different. Depending on the number of matching results the data type is different. What I would like is for both of these to return an array of objects but in the case where there is only one match it returns just the object. If I try to use a calculated index to get information from the array I will get vastly different results depending on if it is an object or an array of objects.
Hoping someone has a solution for me! Thanks!
-
NIMISHAN over 8 yearshow to check that I removed Hadoop ?
-
uhhh_big_mike_boiii about 8 yearsBut hadoop installs so may other things this is not really a complete uninstall is it?
-
Tibblez over 6 yearsThank you! This simply and perfectly solves my problem.
-
Serzhan Akhmetov almost 6 yearslink does not work