Code example for NumberFormat

Methods: setGroupingUsed, setMinimumIntegerDigits

0
 
public class TestDistributionPolicy extends TestCase {
 
  private static final NumberFormat NUMBER_FORMAT = NumberFormat.getInstance();
  static { 
    NUMBER_FORMAT.setMinimumIntegerDigits(5);
    NUMBER_FORMAT.setGroupingUsed(false);
  } 
 
  // however, "we only allow 0 or 1 reducer in local mode" - from 
  // LocalJobRunner 
  private Configuration conf;
  private Path localInputPath = new Path(System.getProperty("build.test") + "/sample/data.txt");
  private Path localUpdatePath =
      new Path(System.getProperty("build.test") + "/sample/data2.txt");
  private Path inputPath = new Path("/myexample/data.txt");
  private Path updatePath = new Path("/myexample/data2.txt");
  private Path outputPath = new Path("/myoutput");
  private Path indexPath = new Path("/myindex");
  private int numShards = 3;
  private int numMapTasks = 5;