├── .DS_Store
├── Inverted-Index
├── .DS_Store
├── .classpath
├── .project
├── InputFiles
│ ├── .DS_Store
│ ├── China.txt
│ ├── India.txt
│ ├── IndiaPakistanRelations.txt
│ ├── IndiaUSChinaPakistanRelationship.txt
│ ├── Russia.txt
│ ├── USARussiaRelations.txt
│ └── UnitedStates.txt
├── Resources for Input Files.txt
├── outputInvertedIndex
│ ├── _SUCCESS
│ └── part-r-00000
└── src
│ ├── constants
│ └── Constants.java
│ └── invertedindex
│ ├── InvertedIndex.java
│ ├── InvertedIndexMapper.java
│ └── InvertedIndexReducer.java
├── JAR_Files
├── .DS_Store
├── inverted-index.jar
├── matrix-multiplication.jar
└── page-rank.jar
├── LICENSE.md
├── README.md
├── matrix-multiplication
├── .DS_Store
├── .classpath
├── .project
├── finalResult
│ └── MatrixC.txt
├── input
│ └── InputMatrices.txt
├── output
│ ├── _SUCCESS
│ └── part-r-00000
└── src
│ ├── .DS_Store
│ └── matrixmultiplication
│ ├── .DS_Store
│ ├── Constants.java
│ ├── FileNames.java
│ ├── MatrixCProcessing.java
│ ├── MatrixMultiplication.java
│ ├── MatrixMultiplicationCombiner.java
│ ├── MatrixMultiplicationMapper.java
│ └── MatrixMultiplicationReducer.java
└── page-rank
├── .DS_Store
├── .classpath
├── .project
├── finalOutput
└── finalOutput.txt
├── input
├── originalinput.txt
└── pagerankinput.txt
├── outputs
├── output0
│ ├── _SUCCESS
│ └── part-r-00000
├── output1
│ ├── _SUCCESS
│ └── part-r-00000
├── output10
│ ├── _SUCCESS
│ └── part-r-00000
├── output2
│ ├── _SUCCESS
│ └── part-r-00000
├── output3
│ ├── _SUCCESS
│ └── part-r-00000
├── output4
│ ├── _SUCCESS
│ └── part-r-00000
├── output5
│ ├── _SUCCESS
│ └── part-r-00000
├── output6
│ ├── _SUCCESS
│ └── part-r-00000
├── output7
│ ├── _SUCCESS
│ └── part-r-00000
├── output8
│ ├── _SUCCESS
│ └── part-r-00000
└── output9
│ ├── _SUCCESS
│ └── part-r-00000
└── src
├── filepreprocess
└── HadoopDFSFileReadWrite.java
├── finalpagerank
└── FinalPageRankCalculator.java
└── pagerank
├── PageRank.java
├── PageRankMapper.java
└── PageRankReducer.java
/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/asarraf/Algorithm-Implementation-Using-Map-Reduce/a86463ba2159508b02666a43a2289562d84c845f/.DS_Store
--------------------------------------------------------------------------------
/Inverted-Index/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/asarraf/Algorithm-Implementation-Using-Map-Reduce/a86463ba2159508b02666a43a2289562d84c845f/Inverted-Index/.DS_Store
--------------------------------------------------------------------------------
/Inverted-Index/.classpath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 |
147 |
148 |
--------------------------------------------------------------------------------
/Inverted-Index/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | Inverted-Index
4 |
5 |
6 |
7 |
8 |
9 | org.eclipse.jdt.core.javabuilder
10 |
11 |
12 |
13 |
14 |
15 | org.apache.hadoop.eclipse.Nature
16 | org.eclipse.jdt.core.javanature
17 |
18 |
19 |
--------------------------------------------------------------------------------
/Inverted-Index/InputFiles/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/asarraf/Algorithm-Implementation-Using-Map-Reduce/a86463ba2159508b02666a43a2289562d84c845f/Inverted-Index/InputFiles/.DS_Store
--------------------------------------------------------------------------------
/Inverted-Index/InputFiles/China.txt:
--------------------------------------------------------------------------------
1 | China officially the People Republic of China is a sovereign state located in East Asia
2 | It is the world most populous country
3 | The People Republic of China is a single party state governed by the Communist Party with its seat of government in the capital city of Beijing exercises jurisdiction many provinces five autonomous regions four direct controlled municipalities Beijing Tianjin Shanghai and Chongqing and two mostly self governing special administrative regions Hong Kong and Macau
4 | China also claims Taiwan which is controlled by the Republic of China a separate political entity as its extra province a claim which is controversial due to the complex political status of Taiwan
--------------------------------------------------------------------------------
/Inverted-Index/InputFiles/India.txt:
--------------------------------------------------------------------------------
1 | India officially the Republic of India is a country in South Asia
2 | It is the seventh largest country by area the second most populous country
3 | The most populous democracy in the world
4 | Bounded by the Indian Ocean on the south the Arabian Sea on the south west and the Bay of Bengal on the south east
5 | It shares land borders with Pakistan to the west China Nepal and Bhutan to the north east and Burma and Bangladesh to the east
6 | In the Indian Ocean India is in the vicinity of Sri Lanka and the Maldives
7 | In addition India Andaman and Nicobar Islands share a maritime border with Thailand and Indonesia
--------------------------------------------------------------------------------
/Inverted-Index/InputFiles/IndiaPakistanRelations.txt:
--------------------------------------------------------------------------------
1 | Relations between India and Pakistan have been strained by a number of historical and political issues and are defined by the violent partition of British India
2 | The Kashmir dispute and the numerous military conflicts fought between the two nations
3 | Consequently even though the two South Asian nations share historic cultural ethnic geographic and economic links their relationship has been plagued by hostility and suspicion
4 | After the dissolution of the British Raj two new sovereign nations were formed the Union of India and the Dominion of Pakistan
5 | The subsequent partition of the former British India displaced millions of people with estimates of loss of life varying from several hundred thousand to a million
6 | India emerged as a secular nation with a Hindu majority population and a large Muslim minority while Pakistan was established as an Islamic republic with an overwhelming Muslim majority population
7 | Soon after their independence India and Pakistan established diplomatic relations but the violent partition and numerous territorial disputes would overshadow their relationship
8 | Since their independence the two countries have fought three major wars one undeclared war and have been involved in numerous armed skirmishes and military standoffs
9 | The Kashmir dispute is the main centre point of all of these conflicts with the exception of the India Pakistan War and Bangladesh Liberation War which resulted in the secession of East Pakistan now Bangladesh
--------------------------------------------------------------------------------
/Inverted-Index/InputFiles/IndiaUSChinaPakistanRelationship.txt:
--------------------------------------------------------------------------------
1 | The India US China Pakistan strategic quadrilateral
2 | Although the disputed border between China and India is often highlighted as the major sticking point in Sino Indian relations in reality it has remained relatively peaceful since the end of a war the potential for overt military conflict in the region remains minimal
3 | Of much greater concern is the strategic quadrilateral relationship in South Asia involving China India the United States and Pakistan
4 | It has both regional and wider implications
5 | At the heart of this matter is the India Pakistan conflict over Kashmir and continuing US involvement in Afghanistan and Pakistan
6 | The relationships between these four actors are extremely complex
7 | China support for Pakistan in its conflict with India is a serious and ongoing source of tension in the Sino Indian relationship
8 | While the US relationship with Pakistan is looking increasingly fraught even as its relationship with India improves in the wake of a civilian nuclear deal
9 | Growing closeness between India and the United States has caused some concern in China about the possibility that the US may be establishing a policy of containment or encirclement
10 | This concern in turn affects China relationship with both the US and India
11 | Understanding this complex web of relationships is key to understanding the issues which are at the heart of China India relations and which affect markedly how these two countries interact in the region
12 | China still sees its South Asian interests as firmly linked with Pakistan a stance which is problematic not only for the Sino Indian relationship but also for the China US relationship because of significant US investment in Pakistan
13 | So although US relationships with India and Pakistan are more likely the result of America pursuing its national interests than an overt attempt to contain China the region volatility and its location in China traditional strategic backyard mean that any US attempt to befriend India or other South and Southeast Asian countries is often viewed with suspicion by the Chinese
--------------------------------------------------------------------------------
/Inverted-Index/InputFiles/Russia.txt:
--------------------------------------------------------------------------------
1 | Russia also officially known as the Russian Federation is a country in northern Eurasia
2 | It is a federal semi presidential republic
3 | Russia shares land borders with Norway Finland Estonia Latvia Lithuania and Poland Belarus Ukraine Georgia Azerbaijan Kazakhstan China Mongolia and North Korea
4 | It shares maritime borders with Japan by the Sea of Okhotsk
5 | The United States state of Alaska across the Bering Strait and Canada Arctic islands
6 | Russia is the largest country in the world covering more than one eighth of the Earth inhabited land area
7 | Russia is also the world ninth most populous nation
8 | Extending across the entirety of northern Asia and much of Eastern Europe Russia spans nine time zones and incorporates a wide range of environments and landforms
--------------------------------------------------------------------------------
/Inverted-Index/InputFiles/USARussiaRelations.txt:
--------------------------------------------------------------------------------
1 | Russia United States relations is the bilateral relationship between the Russian Federation and the United States of America and their predecessor states
2 | Relations between the United States and Russia has long been tense in the past
3 | In recent years the two countries have attempted to reset frosty relations and establish a growing partnership
4 | However as the two nations conflicting ideologies became more prominent hopes of a benevolent relationship between the two world powers have slowly deteriorated
5 | Despite this Russia and the United States still agree on supporting a bilateral agenda to confront several problems such as discarding stockpiles of nuclear weapons and combating the palpable threats of terrorism
6 | As unrest spread into eastern Ukraine relations between the USA and Russia became more strained
7 | Russian support for separatists fighting Ukrainian forces attracted USA sanctions
8 | After one bout of sanctions announced by President Obama Russian President Vladimir Putin said sanctions were driving Russia into a corner that could bring relations between the two countries to a dead end
9 | Relations between the two countries deteriorated further when Malaysia Airlines Flight was brought down by a surface to air missile in eastern Ukraine near the Russian border
10 | Obama said the missile was fired from an area controlled by Russian back separatists who he said were being supplied by Russia with sophisticated weapons training heavy arms and anti aircraft equipment
--------------------------------------------------------------------------------
/Inverted-Index/InputFiles/UnitedStates.txt:
--------------------------------------------------------------------------------
1 | The United States of America or USA commonly referred to as the United States America and sometimes the States
2 | Is a federal republic consisting of many states and a federal district
3 | The contiguous states and Washington are in central North America between Canada and Mexico
4 | The state of Alaska is the northwestern part of North America and the state of Hawaii is an archipelago in the mid-Pacific
5 | The country also has five populated and nine unpopulated territories in the Pacific and the Caribbean
6 | The United States is third or fourth largest country by total area and third largest by population
7 | It is one of the most ethnically diverse and multicultural nations the product of large scale immigration from many countries
8 | The geography and climate of the United States is also extremely diverse and home to a wide variety of wildlife
--------------------------------------------------------------------------------
/Inverted-Index/Resources for Input Files.txt:
--------------------------------------------------------------------------------
1 | http://en.wikipedia.org/wiki/United_States
2 | http://en.wikipedia.org/wiki/Russia
3 | http://en.wikipedia.org/wiki/China
4 | http://en.wikipedia.org/wiki/Russia–United_States_relations
5 | http://en.wikipedia.org/wiki/India–Pakistan_relations http://en.wikipedia.org/wiki/Russia–United_States_relations
6 | http://www.eastasiaforum.org/2012/04/11/the-india-us-china-pakistan-strategic-quadrilateral/
7 | http://en.wikipedia.org/wiki/India
--------------------------------------------------------------------------------
/Inverted-Index/outputInvertedIndex/_SUCCESS:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/asarraf/Algorithm-Implementation-Using-Map-Reduce/a86463ba2159508b02666a43a2289562d84c845f/Inverted-Index/outputInvertedIndex/_SUCCESS
--------------------------------------------------------------------------------
/Inverted-Index/outputInvertedIndex/part-r-00000:
--------------------------------------------------------------------------------
1 | a IndiaPakistanRelations UnitedStates Russia USARussiaRelations IndiaUSChinaPakistanRelationship China India
2 | about IndiaUSChinaPakistanRelationship
3 | across Russia
4 | actors IndiaUSChinaPakistanRelationship
5 | addition India
6 | administrative China
7 | affect IndiaUSChinaPakistanRelationship
8 | affects IndiaUSChinaPakistanRelationship
9 | afghanistan IndiaUSChinaPakistanRelationship
10 | after IndiaPakistanRelations USARussiaRelations
11 | agenda USARussiaRelations
12 | agree USARussiaRelations
13 | air USARussiaRelations
14 | aircraft USARussiaRelations
15 | airlines USARussiaRelations
16 | alaska UnitedStates Russia
17 | all IndiaPakistanRelations
18 | also UnitedStates Russia IndiaUSChinaPakistanRelationship China
19 | although IndiaUSChinaPakistanRelationship
20 | america UnitedStates USARussiaRelations IndiaUSChinaPakistanRelationship
21 | an IndiaPakistanRelations UnitedStates USARussiaRelations IndiaUSChinaPakistanRelationship
22 | and IndiaPakistanRelations UnitedStates Russia USARussiaRelations China India IndiaUSChinaPakistanRelationship
23 | andaman India
24 | announced USARussiaRelations
25 | anti USARussiaRelations
26 | any IndiaUSChinaPakistanRelationship
27 | arabian India
28 | archipelago UnitedStates
29 | arctic Russia
30 | are IndiaPakistanRelations UnitedStates IndiaUSChinaPakistanRelationship
31 | area UnitedStates USARussiaRelations Russia India
32 | armed IndiaPakistanRelations
33 | arms USARussiaRelations
34 | as IndiaPakistanRelations UnitedStates Russia USARussiaRelations IndiaUSChinaPakistanRelationship China
35 | asia Russia China India IndiaUSChinaPakistanRelationship
36 | asian IndiaPakistanRelations IndiaUSChinaPakistanRelationship
37 | at IndiaUSChinaPakistanRelationship
38 | attempt IndiaUSChinaPakistanRelationship
39 | attempted USARussiaRelations
40 | attracted USARussiaRelations
41 | autonomous China
42 | azerbaijan Russia
43 | back USARussiaRelations
44 | backyard IndiaUSChinaPakistanRelationship
45 | bangladesh IndiaPakistanRelations India
46 | bay India
47 | be IndiaUSChinaPakistanRelationship
48 | became USARussiaRelations
49 | because IndiaUSChinaPakistanRelationship
50 | been IndiaPakistanRelations USARussiaRelations
51 | befriend IndiaUSChinaPakistanRelationship
52 | beijing China
53 | being USARussiaRelations
54 | belarus Russia
55 | benevolent USARussiaRelations
56 | bengal India
57 | bering Russia
58 | between IndiaPakistanRelations UnitedStates USARussiaRelations IndiaUSChinaPakistanRelationship
59 | bhutan India
60 | bilateral USARussiaRelations
61 | border USARussiaRelations India IndiaUSChinaPakistanRelationship
62 | borders Russia India
63 | both IndiaUSChinaPakistanRelationship
64 | bounded India
65 | bout USARussiaRelations
66 | bring USARussiaRelations
67 | british IndiaPakistanRelations
68 | brought USARussiaRelations
69 | burma India
70 | but IndiaPakistanRelations IndiaUSChinaPakistanRelationship
71 | by IndiaPakistanRelations UnitedStates Russia USARussiaRelations China IndiaUSChinaPakistanRelationship India
72 | canada UnitedStates Russia
73 | capital China
74 | caribbean UnitedStates
75 | caused IndiaUSChinaPakistanRelationship
76 | central UnitedStates
77 | centre IndiaPakistanRelations
78 | china Russia China IndiaUSChinaPakistanRelationship India
79 | chinese IndiaUSChinaPakistanRelationship
80 | chongqing China
81 | city China
82 | civilian IndiaUSChinaPakistanRelationship
83 | claim China
84 | claims China
85 | climate UnitedStates
86 | closeness IndiaUSChinaPakistanRelationship
87 | combating USARussiaRelations
88 | commonly UnitedStates
89 | communist China
90 | complex IndiaUSChinaPakistanRelationship China
91 | concern IndiaUSChinaPakistanRelationship
92 | conflict IndiaUSChinaPakistanRelationship
93 | conflicting USARussiaRelations
94 | conflicts IndiaPakistanRelations
95 | confront USARussiaRelations
96 | consequently IndiaPakistanRelations
97 | consisting UnitedStates
98 | contain IndiaUSChinaPakistanRelationship
99 | containment IndiaUSChinaPakistanRelationship
100 | contiguous UnitedStates
101 | continuing IndiaUSChinaPakistanRelationship
102 | controlled USARussiaRelations China
103 | controversial China
104 | corner USARussiaRelations
105 | could USARussiaRelations
106 | countries IndiaPakistanRelations UnitedStates USARussiaRelations IndiaUSChinaPakistanRelationship
107 | country UnitedStates Russia India China
108 | covering Russia
109 | cultural IndiaPakistanRelations
110 | dead USARussiaRelations
111 | deal IndiaUSChinaPakistanRelationship
112 | defined IndiaPakistanRelations
113 | democracy India
114 | despite USARussiaRelations
115 | deteriorated USARussiaRelations
116 | diplomatic IndiaPakistanRelations
117 | direct China
118 | discarding USARussiaRelations
119 | displaced IndiaPakistanRelations
120 | dispute IndiaPakistanRelations
121 | disputed IndiaUSChinaPakistanRelationship
122 | disputes IndiaPakistanRelations
123 | dissolution IndiaPakistanRelations
124 | district UnitedStates
125 | diverse UnitedStates
126 | dominion IndiaPakistanRelations
127 | down USARussiaRelations
128 | driving USARussiaRelations
129 | due China
130 | earth Russia
131 | east IndiaPakistanRelations India China
132 | eastern USARussiaRelations Russia
133 | economic IndiaPakistanRelations
134 | eighth Russia
135 | emerged IndiaPakistanRelations
136 | encirclement IndiaUSChinaPakistanRelationship
137 | end USARussiaRelations IndiaUSChinaPakistanRelationship
138 | entirety Russia
139 | entity China
140 | environments Russia
141 | equipment USARussiaRelations
142 | establish USARussiaRelations
143 | established IndiaPakistanRelations
144 | establishing IndiaUSChinaPakistanRelationship
145 | estimates IndiaPakistanRelations
146 | estonia Russia
147 | ethnic IndiaPakistanRelations
148 | ethnically UnitedStates
149 | eurasia Russia
150 | europe Russia
151 | even IndiaPakistanRelations IndiaUSChinaPakistanRelationship
152 | exception IndiaPakistanRelations
153 | exercises China
154 | extending Russia
155 | extra China
156 | extremely UnitedStates IndiaUSChinaPakistanRelationship
157 | federal UnitedStates Russia
158 | federation USARussiaRelations Russia
159 | fighting USARussiaRelations
160 | finland Russia
161 | fired USARussiaRelations
162 | firmly IndiaUSChinaPakistanRelationship
163 | five UnitedStates China
164 | flight USARussiaRelations
165 | for USARussiaRelations IndiaUSChinaPakistanRelationship
166 | forces USARussiaRelations
167 | formed IndiaPakistanRelations
168 | former IndiaPakistanRelations
169 | fought IndiaPakistanRelations
170 | four China IndiaUSChinaPakistanRelationship
171 | fourth UnitedStates
172 | fraught IndiaUSChinaPakistanRelationship
173 | from IndiaPakistanRelations UnitedStates USARussiaRelations
174 | frosty USARussiaRelations
175 | further USARussiaRelations
176 | geographic IndiaPakistanRelations
177 | geography UnitedStates
178 | georgia Russia
179 | governed China
180 | governing China
181 | government China
182 | greater IndiaUSChinaPakistanRelationship
183 | growing USARussiaRelations IndiaUSChinaPakistanRelationship
184 | has IndiaPakistanRelations UnitedStates USARussiaRelations IndiaUSChinaPakistanRelationship
185 | have IndiaPakistanRelations USARussiaRelations
186 | hawaii UnitedStates
187 | he USARussiaRelations
188 | heart IndiaUSChinaPakistanRelationship
189 | heavy USARussiaRelations
190 | highlighted IndiaUSChinaPakistanRelationship
191 | hindu IndiaPakistanRelations
192 | historic IndiaPakistanRelations
193 | historical IndiaPakistanRelations
194 | home UnitedStates
195 | hong China
196 | hopes USARussiaRelations
197 | hostility IndiaPakistanRelations
198 | how IndiaUSChinaPakistanRelationship
199 | however USARussiaRelations
200 | hundred IndiaPakistanRelations
201 | ideologies USARussiaRelations
202 | immigration UnitedStates
203 | implications IndiaUSChinaPakistanRelationship
204 | improves IndiaUSChinaPakistanRelationship
205 | in IndiaPakistanRelations UnitedStates Russia USARussiaRelations China India IndiaUSChinaPakistanRelationship
206 | incorporates Russia
207 | increasingly IndiaUSChinaPakistanRelationship
208 | independence IndiaPakistanRelations
209 | india IndiaPakistanRelations India IndiaUSChinaPakistanRelationship
210 | indian IndiaUSChinaPakistanRelationship India
211 | indonesia India
212 | inhabited Russia
213 | interact IndiaUSChinaPakistanRelationship
214 | interests IndiaUSChinaPakistanRelationship
215 | into USARussiaRelations
216 | investment IndiaUSChinaPakistanRelationship
217 | involved IndiaPakistanRelations
218 | involvement IndiaUSChinaPakistanRelationship
219 | involving IndiaUSChinaPakistanRelationship
220 | is IndiaPakistanRelations UnitedStates Russia USARussiaRelations India China IndiaUSChinaPakistanRelationship
221 | islamic IndiaPakistanRelations
222 | islands Russia India
223 | issues IndiaPakistanRelations IndiaUSChinaPakistanRelationship
224 | it UnitedStates Russia India IndiaUSChinaPakistanRelationship China
225 | its IndiaUSChinaPakistanRelationship China
226 | japan Russia
227 | jurisdiction China
228 | kashmir IndiaPakistanRelations IndiaUSChinaPakistanRelationship
229 | kazakhstan Russia
230 | key IndiaUSChinaPakistanRelationship
231 | known Russia
232 | kong China
233 | korea Russia
234 | land Russia India
235 | landforms Russia
236 | lanka India
237 | large IndiaPakistanRelations UnitedStates
238 | largest UnitedStates Russia India
239 | latvia Russia
240 | liberation IndiaPakistanRelations
241 | life IndiaPakistanRelations
242 | likely IndiaUSChinaPakistanRelationship
243 | linked IndiaUSChinaPakistanRelationship
244 | links IndiaPakistanRelations
245 | lithuania Russia
246 | located China
247 | location IndiaUSChinaPakistanRelationship
248 | long USARussiaRelations
249 | looking IndiaUSChinaPakistanRelationship
250 | loss IndiaPakistanRelations
251 | macau China
252 | main IndiaPakistanRelations
253 | major IndiaPakistanRelations IndiaUSChinaPakistanRelationship
254 | majority IndiaPakistanRelations
255 | malaysia USARussiaRelations
256 | maldives India
257 | many UnitedStates China
258 | maritime Russia India
259 | markedly IndiaUSChinaPakistanRelationship
260 | matter IndiaUSChinaPakistanRelationship
261 | may IndiaUSChinaPakistanRelationship
262 | mean IndiaUSChinaPakistanRelationship
263 | mexico UnitedStates
264 | mid-pacific UnitedStates
265 | military IndiaPakistanRelations IndiaUSChinaPakistanRelationship
266 | million IndiaPakistanRelations
267 | millions IndiaPakistanRelations
268 | minimal IndiaUSChinaPakistanRelationship
269 | minority IndiaPakistanRelations
270 | missile USARussiaRelations
271 | mongolia Russia
272 | more USARussiaRelations Russia IndiaUSChinaPakistanRelationship
273 | most UnitedStates Russia China India
274 | mostly China
275 | much Russia IndiaUSChinaPakistanRelationship
276 | multicultural UnitedStates
277 | municipalities China
278 | muslim IndiaPakistanRelations
279 | nation IndiaPakistanRelations Russia
280 | national IndiaUSChinaPakistanRelationship
281 | nations IndiaPakistanRelations UnitedStates USARussiaRelations
282 | near USARussiaRelations
283 | nepal India
284 | new IndiaPakistanRelations
285 | nicobar India
286 | nine UnitedStates Russia
287 | ninth Russia
288 | north UnitedStates Russia India
289 | northern Russia
290 | northwestern UnitedStates
291 | norway Russia
292 | not IndiaUSChinaPakistanRelationship
293 | now IndiaPakistanRelations
294 | nuclear USARussiaRelations IndiaUSChinaPakistanRelationship
295 | number IndiaPakistanRelations
296 | numerous IndiaPakistanRelations
297 | obama USARussiaRelations
298 | ocean India
299 | of IndiaPakistanRelations UnitedStates USARussiaRelations Russia China IndiaUSChinaPakistanRelationship India
300 | officially Russia China India
301 | often IndiaUSChinaPakistanRelationship
302 | okhotsk Russia
303 | on USARussiaRelations India
304 | one IndiaPakistanRelations UnitedStates Russia USARussiaRelations
305 | ongoing IndiaUSChinaPakistanRelationship
306 | only IndiaUSChinaPakistanRelationship
307 | or UnitedStates IndiaUSChinaPakistanRelationship
308 | other IndiaUSChinaPakistanRelationship
309 | over IndiaUSChinaPakistanRelationship
310 | overshadow IndiaPakistanRelations
311 | overt IndiaUSChinaPakistanRelationship
312 | overwhelming IndiaPakistanRelations
313 | pacific UnitedStates
314 | pakistan IndiaPakistanRelations India IndiaUSChinaPakistanRelationship
315 | palpable USARussiaRelations
316 | part UnitedStates
317 | partition IndiaPakistanRelations
318 | partnership USARussiaRelations
319 | party China
320 | past USARussiaRelations
321 | peaceful IndiaUSChinaPakistanRelationship
322 | people IndiaPakistanRelations China
323 | plagued IndiaPakistanRelations
324 | point IndiaPakistanRelations IndiaUSChinaPakistanRelationship
325 | poland Russia
326 | policy IndiaUSChinaPakistanRelationship
327 | political IndiaPakistanRelations China
328 | populated UnitedStates
329 | population IndiaPakistanRelations UnitedStates
330 | populous Russia China India
331 | possibility IndiaUSChinaPakistanRelationship
332 | potential IndiaUSChinaPakistanRelationship
333 | powers USARussiaRelations
334 | predecessor USARussiaRelations
335 | president USARussiaRelations
336 | presidential Russia
337 | problematic IndiaUSChinaPakistanRelationship
338 | problems USARussiaRelations
339 | product UnitedStates
340 | prominent USARussiaRelations
341 | province China
342 | provinces China
343 | pursuing IndiaUSChinaPakistanRelationship
344 | putin USARussiaRelations
345 | quadrilateral IndiaUSChinaPakistanRelationship
346 | raj IndiaPakistanRelations
347 | range Russia
348 | reality IndiaUSChinaPakistanRelationship
349 | recent USARussiaRelations
350 | referred UnitedStates
351 | region IndiaUSChinaPakistanRelationship
352 | regional IndiaUSChinaPakistanRelationship
353 | regions China
354 | relations IndiaPakistanRelations USARussiaRelations IndiaUSChinaPakistanRelationship
355 | relationship IndiaPakistanRelations USARussiaRelations IndiaUSChinaPakistanRelationship
356 | relationships IndiaUSChinaPakistanRelationship
357 | relatively IndiaUSChinaPakistanRelationship
358 | remained IndiaUSChinaPakistanRelationship
359 | remains IndiaUSChinaPakistanRelationship
360 | republic IndiaPakistanRelations UnitedStates Russia India China
361 | reset USARussiaRelations
362 | result IndiaUSChinaPakistanRelationship
363 | resulted IndiaPakistanRelations
364 | russia Russia USARussiaRelations
365 | russian USARussiaRelations Russia
366 | said USARussiaRelations
367 | sanctions USARussiaRelations
368 | scale UnitedStates
369 | sea Russia India
370 | seat China
371 | secession IndiaPakistanRelations
372 | second India
373 | secular IndiaPakistanRelations
374 | sees IndiaUSChinaPakistanRelationship
375 | self China
376 | semi Russia
377 | separate China
378 | separatists USARussiaRelations
379 | serious IndiaUSChinaPakistanRelationship
380 | seventh India
381 | several IndiaPakistanRelations USARussiaRelations
382 | shanghai China
383 | share IndiaPakistanRelations India
384 | shares Russia India
385 | significant IndiaUSChinaPakistanRelationship
386 | since IndiaPakistanRelations IndiaUSChinaPakistanRelationship
387 | single China
388 | sino IndiaUSChinaPakistanRelationship
389 | skirmishes IndiaPakistanRelations
390 | slowly USARussiaRelations
391 | so IndiaUSChinaPakistanRelationship
392 | some IndiaUSChinaPakistanRelationship
393 | sometimes UnitedStates
394 | soon IndiaPakistanRelations
395 | sophisticated USARussiaRelations
396 | source IndiaUSChinaPakistanRelationship
397 | south IndiaPakistanRelations India IndiaUSChinaPakistanRelationship
398 | southeast IndiaUSChinaPakistanRelationship
399 | sovereign IndiaPakistanRelations China
400 | spans Russia
401 | special China
402 | spread USARussiaRelations
403 | sri India
404 | stance IndiaUSChinaPakistanRelationship
405 | standoffs IndiaPakistanRelations
406 | state UnitedStates Russia China
407 | states UnitedStates USARussiaRelations Russia IndiaUSChinaPakistanRelationship
408 | status China
409 | sticking IndiaUSChinaPakistanRelationship
410 | still USARussiaRelations IndiaUSChinaPakistanRelationship
411 | stockpiles USARussiaRelations
412 | strained IndiaPakistanRelations USARussiaRelations
413 | strait Russia
414 | strategic IndiaUSChinaPakistanRelationship
415 | subsequent IndiaPakistanRelations
416 | such USARussiaRelations
417 | supplied USARussiaRelations
418 | support USARussiaRelations IndiaUSChinaPakistanRelationship
419 | supporting USARussiaRelations
420 | surface USARussiaRelations
421 | suspicion IndiaPakistanRelations IndiaUSChinaPakistanRelationship
422 | taiwan China
423 | tense USARussiaRelations
424 | tension IndiaUSChinaPakistanRelationship
425 | territorial IndiaPakistanRelations
426 | territories UnitedStates
427 | terrorism USARussiaRelations
428 | thailand India
429 | than Russia IndiaUSChinaPakistanRelationship
430 | that USARussiaRelations IndiaUSChinaPakistanRelationship
431 | the IndiaPakistanRelations UnitedStates USARussiaRelations Russia India China IndiaUSChinaPakistanRelationship
432 | their IndiaPakistanRelations USARussiaRelations
433 | these IndiaPakistanRelations IndiaUSChinaPakistanRelationship
434 | third UnitedStates
435 | this USARussiaRelations IndiaUSChinaPakistanRelationship
436 | though IndiaPakistanRelations
437 | thousand IndiaPakistanRelations
438 | threats USARussiaRelations
439 | three IndiaPakistanRelations
440 | tianjin China
441 | time Russia
442 | to IndiaPakistanRelations UnitedStates USARussiaRelations IndiaUSChinaPakistanRelationship India China
443 | total UnitedStates
444 | traditional IndiaUSChinaPakistanRelationship
445 | training USARussiaRelations
446 | turn IndiaUSChinaPakistanRelationship
447 | two IndiaPakistanRelations USARussiaRelations China IndiaUSChinaPakistanRelationship
448 | ukraine USARussiaRelations Russia
449 | ukrainian USARussiaRelations
450 | undeclared IndiaPakistanRelations
451 | understanding IndiaUSChinaPakistanRelationship
452 | union IndiaPakistanRelations
453 | united UnitedStates Russia USARussiaRelations IndiaUSChinaPakistanRelationship
454 | unpopulated UnitedStates
455 | unrest USARussiaRelations
456 | us IndiaUSChinaPakistanRelationship
457 | usa UnitedStates USARussiaRelations
458 | variety UnitedStates
459 | varying IndiaPakistanRelations
460 | vicinity India
461 | viewed IndiaUSChinaPakistanRelationship
462 | violent IndiaPakistanRelations
463 | vladimir USARussiaRelations
464 | volatility IndiaUSChinaPakistanRelationship
465 | wake IndiaUSChinaPakistanRelationship
466 | war IndiaPakistanRelations IndiaUSChinaPakistanRelationship
467 | wars IndiaPakistanRelations
468 | was IndiaPakistanRelations USARussiaRelations
469 | washington UnitedStates
470 | weapons USARussiaRelations
471 | web IndiaUSChinaPakistanRelationship
472 | were IndiaPakistanRelations USARussiaRelations
473 | west India
474 | when USARussiaRelations
475 | which IndiaPakistanRelations China IndiaUSChinaPakistanRelationship
476 | while IndiaPakistanRelations IndiaUSChinaPakistanRelationship
477 | who USARussiaRelations
478 | wide UnitedStates Russia
479 | wider IndiaUSChinaPakistanRelationship
480 | wildlife UnitedStates
481 | with IndiaPakistanRelations USARussiaRelations Russia India IndiaUSChinaPakistanRelationship China
482 | world USARussiaRelations Russia China India
483 | would IndiaPakistanRelations
484 | years USARussiaRelations
485 | zones Russia
486 |
--------------------------------------------------------------------------------
/Inverted-Index/src/constants/Constants.java:
--------------------------------------------------------------------------------
1 | package constants;
2 |
3 | public interface Constants {
4 | final String inputPath = "/invertedIndex/inputDocuments";
5 | final String outputPath = "/invertedIndex/outputInvertedIndex";
6 | }
--------------------------------------------------------------------------------
/Inverted-Index/src/invertedindex/InvertedIndex.java:
--------------------------------------------------------------------------------
1 | package invertedindex;
2 |
3 | import java.io.IOException;
4 |
5 | import org.apache.hadoop.conf.Configuration;
6 | import org.apache.hadoop.fs.FileSystem;
7 | import org.apache.hadoop.fs.Path;
8 | import org.apache.hadoop.io.Text;
9 | import org.apache.hadoop.mapreduce.Job;
10 | import org.apache.hadoop.mapreduce.lib.input.FileInputFormat;
11 | import org.apache.hadoop.mapreduce.lib.output.FileOutputFormat;
12 |
13 | import constants.Constants;
14 |
15 | public class InvertedIndex {
16 | public static void main(String[] args) throws Exception {
17 | Configuration conf = new Configuration();
18 | Job job = Job.getInstance(conf, "JobName");
19 | job.setJarByClass(invertedindex.InvertedIndex.class);
20 |
21 | /**
22 | * Code can be inserted to do the Data Munging
23 | * That can include removing stop words, punctuation, etc.
24 | * But that is not the scope of this Project
25 | */
26 |
27 | // Delete Output directory if it already exists
28 | deleteFolder(conf, Constants.outputPath);
29 |
30 | myMapReduceTask(job, Constants.inputPath, Constants.outputPath);
31 | }
32 |
33 | public static void deleteFolder(Configuration conf, String folderPath)
34 | throws IOException{
35 | // Delete the Folder
36 | FileSystem fs = FileSystem.get(conf);
37 | Path path = new Path(folderPath);
38 | if(fs.exists(path)) {
39 | fs.delete(path,true);
40 | }
41 | }
42 |
43 | public static void myMapReduceTask(Job job, String inputPath, String outputPath) throws
44 | IllegalArgumentException,
45 | IOException,
46 | ClassNotFoundException,
47 | InterruptedException {
48 | // Set Mapper Class
49 | job.setMapperClass(InvertedIndexMapper.class);
50 |
51 | // Set Mapper Output Types
52 | job.setMapOutputKeyClass(Text.class);
53 | job.setMapOutputValueClass(Text.class);
54 |
55 | // Set Reducer Class
56 | job.setReducerClass(InvertedIndexReducer.class);
57 |
58 | // Set the Reducer Output Types
59 | job.setOutputKeyClass(Text.class);
60 | job.setOutputValueClass(Text.class);
61 |
62 | // Specify input and output Directories
63 | FileInputFormat.addInputPath(job, new Path(Constants.inputPath));
64 | FileOutputFormat.setOutputPath(job, new Path(Constants.outputPath));
65 |
66 | // Wait condition for the Mapper and Reducer Class to finish their execution
67 | if (!job.waitForCompletion(true))
68 | return;
69 | }
70 | }
--------------------------------------------------------------------------------
/Inverted-Index/src/invertedindex/InvertedIndexMapper.java:
--------------------------------------------------------------------------------
1 | package invertedindex;
2 |
3 | import java.io.IOException;
4 | import org.apache.hadoop.io.Text;
5 | import org.apache.hadoop.mapreduce.Mapper;
6 | import org.apache.hadoop.mapreduce.lib.input.FileSplit;
7 |
8 | public class InvertedIndexMapper extends Mapper