Reverses a url's domain. This form is better for storing in hbase. Because scans within the same domain are faster. E.g. "http://bar.foo.com:8983/to/index.html?a=b" becomes "com.foo.bar:8983:http/to/index.html?a=b". @param urlString url to be reversed @return Reversed url @throws Malfo
(String urlString)
| 39 | * @throws MalformedURLException |
| 40 | */ |
| 41 | public static String reverseUrl(String urlString) |
| 42 | throws MalformedURLException { |
| 43 | return reverseUrl(new URL(urlString)); |
| 44 | } |
| 45 | |
| 46 | /** |
| 47 | * Reverses a url's domain. This form is better for storing in hbase. Because |