List of usage examples for org.apache.hadoop.mapred JobConf getInt
public int getInt(String name, int defaultValue)
name
property as an int
. From source file:voldemort.store.readwrite.mr.HadoopRWStoreBuilderReducer.java
License:Apache License
@Override public void configure(JobConf job) { super.configure(job); this.totalBytes = 0; this.chunkId = job.getInt("mapred.task.partition", -1); // http://www.mail-archive.com/core-user@hadoop.apache.org/msg05749.html if (this.chunkId < 0) { throw new RuntimeException("Incorrect chunk id "); }//from w ww .j a va 2s .c om this.nodeId = this.chunkId / getNumChunks(); this.client = new AdminClient(getCluster(), new AdminClientConfig()); logger.info("Reducer for Node id - " + this.nodeId + " and chunk id - " + this.chunkId); }