Code example for NumberFormat

Methods: setGroupingUsed, setMinimumIntegerDigits

0
 
public class TestAggregates extends TestCase {
 
  private static NumberFormat idFormat = NumberFormat.getInstance();
    static { 
      idFormat.setMinimumIntegerDigits(4);
      idFormat.setGroupingUsed(false);
  } 
 
 
  public void testAggregates() throws Exception { 
    launch(); 
  } 
 
  public static void launch() throws Exception { 
    JobConf conf = new JobConf(TestAggregates.class);
    FileSystem fs = FileSystem.get(conf);
    int numOfInputLines = 20;
 
    Path OUTPUT_DIR = new Path("build/test/output_for_aggregates_test");
    Path INPUT_DIR = new Path("build/test/input_for_aggregates_test");