{"id":19930930,"url":"https://github.com/ericlondon/map-reduce-20160121","last_synced_at":"2025-06-23T14:37:45.964Z","repository":{"id":55111209,"uuid":"50125789","full_name":"EricLondon/map-reduce-20160121","owner":"EricLondon","description":"Hadoop, Pig, Ruby, Map/Reduce, on OSX via Homebrew","archived":false,"fork":false,"pushed_at":"2024-09-05T18:18:01.000Z","size":16,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-01T11:27:30.605Z","etag":null,"topics":["hadoop","mapreduce","osx","ruby"],"latest_commit_sha":null,"homepage":"http://ericlondon.com/2014/08/01/hadoop-pig-ruby-map-reduce-on-osx-via-homebrew.html","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/EricLondon.png","metadata":{"files":{"readme":"README.01-hadoop.txt","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-01-21T17:54:43.000Z","updated_at":"2024-09-05T18:17:58.000Z","dependencies_parsed_at":"2025-03-01T11:36:43.809Z","dependency_job_id":null,"html_url":"https://github.com/EricLondon/map-reduce-20160121","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/EricLondon/map-reduce-20160121","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EricLondon%2Fmap-reduce-20160121","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EricLondon%2Fmap-reduce-20160121/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EricLondon%2Fmap-reduce-20160121/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EricLondon%2Fmap-reduce-20160121/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/EricLondon","download_url":"https://codeload.github.com/EricLondon/map-reduce-20160121/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EricLondon%2Fmap-reduce-20160121/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261495758,"owners_count":23167374,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hadoop","mapreduce","osx","ruby"],"created_at":"2024-11-12T23:05:37.169Z","updated_at":"2025-06-23T14:37:45.650Z","avatar_url":"https://github.com/EricLondon.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"whoami\neric\n\njava -version\njava version \"1.8.0_66\"\nJava(TM) SE Runtime Environment (build 1.8.0_66-b17)\nJava HotSpot(TM) 64-Bit Server VM (build 25.66-b17, mixed mode)\n\nbrew install hadoop\n\n# ~/.profile:\nexport JAVA_HOME=`/usr/libexec/java_home -v 1.8`\n# /Library/Java/JavaVirtualMachines/jdk1.8.0_66.jdk/Contents/Home\nexport HADOOP_HOME=/usr/local/Cellar/hadoop/2.7.1\nexport HADOOP_CONF_DIR=$HADOOP_HOME/libexec/etc/hadoop\n\n$HADOOP_HOME/bin/hdfs namenode -format\n$HADOOP_HOME/sbin/start-all.sh\njps\n\n$HADOOP_HOME/bin/hdfs dfs -mkdir /user\n$HADOOP_HOME/bin/hdfs dfs -mkdir /user/eric\n$HADOOP_HOME/bin/hdfs dfs -mkdir /user/eric/input\n\n$HADOOP_HOME/bin/hdfs dfs -put /usr/share/dict/words /user/eric/input\n$HADOOP_HOME/bin/hadoop dfs -ls /user/eric/input\n$HADOOP_HOME/bin/hadoop jar $HADOOP_HOME/libexec/share/hadoop/mapreduce/hadoop-mapreduce-examples-2.7.1.jar grep input output 'eric'\n$HADOOP_HOME/bin/hadoop dfs -ls /user/eric/output\n\nhdfs dfs -cat output/part-r-00000\n559 eric\n\n##################################################\n\ncat /usr/share/dict/words | bin/main.rb --map | sort | bin/main.rb --reduce\na 199554\nb 40433\nc 103440\nd 68191\ne 235331\nf 24165\ng 47094\nh 64356\ni 201032\nj 3167\nk 16158\nl 130463\nm 70680\nn 158743\no 170692\np 78163\nq 3734\nr 160985\ns 139542\nt 152831\nu 87353\nv 20177\nw 13864\nx 6932\ny 51681\nz 8460\n\n##################################################\n\n# trying above on local hadoop:\n\n# clean up output dir\nhdfs dfs -ls output\nhdfs dfs -rmr output\n\nhadoop jar $HADOOP_HOME/libexec/share/hadoop/tools/lib/hadoop-streaming-2.7.1.jar -mapper 'bin/main.rb --map' -reducer 'bin/main.rb --reduce' -input input -output output\n\nhdfs dfs -cat output/part-00000\na 199554\nb 40433\nc 103440\nd 68191\ne 235331\nf 24165\ng 47094\nh 64356\ni 201032\nj 3167\nk 16158\nl 130463\nm 70680\nn 158743\no 170692\np 78163\nq 3734\nr 160985\ns 139542\nt 152831\nu 87353\nv 20177\nw 13864\nx 6932\ny 51681\nz 8460\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fericlondon%2Fmap-reduce-20160121","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fericlondon%2Fmap-reduce-20160121","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fericlondon%2Fmap-reduce-20160121/lists"}