コード例 #1
0
 public void store(Path output) throws IOException {
   FileSystem fs = output.getFileSystem(HadoopUtils.createConfiguration());
   fs.delete(output, true);
   OutputStream os = fs.create(output, true);
   store(os);
   os.close();
 }
コード例 #2
0
 public ColumnDefinitionFile(Path path) throws IOException {
   if (path == null) {
     throw new IOException("A column file path must be specified.");
   }
   FSDataInputStream fdis = path.getFileSystem(HadoopUtils.createConfiguration()).open(path);
   load(fdis);
   fdis.close();
 }
  @Before
  public void init() {
    // create a configuration
    conf = HadoopUtils.createConfiguration();

    // set this to a relatively high value - it will be bumped back down in
    // testMoreWorkersThanMapSlots
    conf.setInt("mapred.tasktracker.map.tasks.maximum", 100);

    // create a metadata
    metadata = new MrsImagePyramidMetadata();
    metadata.setTilesize(tileSize);
    metadata.setTileType(DataBuffer.TYPE_FLOAT);
  }