开发者

Can the Map function of Map Reduce call a (external) web service in Amazon Map Reduce?

I have to write a Map Reduce job in Java in which I am given Locations (City, State, Country) and I need to convert them to lat/long coordinates, the details of which are provided from an external web service: Google Geocoding API - my questions is whether it is allowed to invoke an HTTP request from the Map function of a Map Reduce job, 开发者_如何学编程i.e:

public class GeoLocator {

  private static String genderCheck = "female";

  public static class Map extends MapReduceBase implements Mapper {

  // CALL EXTERNAL WEB SERVICE HERE


  }
  ..
}


Yes you can. The mapper is running inside a normal JVM and it is allowed to make remote calls. The only limitations on accessing external resources would be enforced by any security groups of the EC2 instance running the process.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜