Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
マッパーとリデューサーの ID に従って、これらのマッパーとリデューサーの出力にタグを付けたいため、各マッパーとリデューサーのタスクの ID を取得したいと考えています。それぞれのIDを取得するにはどうすればよいですか?
ありがとう
次のコードを利用して、マップ、セットアップなどの関数で taskId を出力できます。
context.getTaskAttemptID().getTaskID();
org.apache.hadoop.mapreduce.MapContext :: getTaskAttemptID()を使用してこれを行うことができます。