如果我的分区器类返回n个分区,并且在main函数中我有job.setNumReduceTasks(1),将启动多少个reduce任务以及创建多少个输出文件?
答案 0 :(得分:1)
<input type='button' class='getLoc' id=‘s13' value=‘s13’>
<script>
$(function(){
$('.getLoc').click(function(){
var id = $(this).attr('id');
alert(id); //<-- shows s13
navigator.geolocation.getCurrentPosition(function(position,id){
var lat = position.coords.latitude;
var lon = position.coords.longitude;
alert(lat+","+lon+","+id); //<-- shows undefined for id
});
});
});
</script>
。job.setNumReduceTasks(1)
次。