Package org.apache.hadoop.mapred

Examples of org.apache.hadoop.mapred.OutputFormat


    }
  }
 
  public OrcFileWriter(Configuration conf, Path path, PType<T> pType) throws IOException {
    JobConf jobConf = new JobConf(conf);
    OutputFormat outputFormat = new OrcOutputFormat();
    writer = outputFormat.getRecordWriter(null, jobConf, path.toString(), new NullProgress());
   
    mapFn = pType.getOutputMapFn();
    mapFn.initialize();
   
    serde = new OrcSerde();
View Full Code Here


     if (isMapOnly)
       AvroJob.setMapOutputSchema(outputConf, schema);
     else
       AvroJob.setOutputSchema(outputConf, schema);
   }
   OutputFormat outputFormat = outputConf.getOutputFormat();
   return outputFormat.getRecordWriter(fs, outputConf, fileName, arg3);
   }  
View Full Code Here

     if (isMapOnly)
       AvroJob.setMapOutputSchema(outputConf, schema);
     else
       AvroJob.setOutputSchema(outputConf, schema);
   }
   OutputFormat outputFormat = outputConf.getOutputFormat();
   return outputFormat.getRecordWriter(fs, outputConf, fileName, arg3);
   }  
View Full Code Here

            confCopy.set("pig.storeFunc", ObjectSerializer.serialize(
                    store.getSFile().getFuncSpec().toString()));
            confCopy.set(JobControlCompiler.PIG_STORE_CONFIG,
                    ObjectSerializer.serialize(storeConfig));
            confCopy.setOutputFormat(sPrepClass);
            OutputFormat of = confCopy.getOutputFormat();
            of.checkOutputSpecs(fs, confCopy);
       
        }
       
    }
View Full Code Here

        // The workpath is set to a unique-per-store subdirectory of
        // the current working directory.
        String workPath = outputConf.get("mapred.work.output.dir");
        outputConf.set("mapred.work.output.dir",
                       new Path(workPath, tmpPath).toString());
        OutputFormat outputFormat = outputConf.getOutputFormat();

        // Generate a unique part name (part-<task_partition_number>).
        String fileName = getPartName(outputConf);
       
        // create a new record writer
        writer = outputFormat.getRecordWriter(FileSystem.get(outputConf),
                                              outputConf, fileName, reporter);

        // return an output collector using the writer we just created.
        return new StoreFuncAdaptor(new OutputCollector()
            {
View Full Code Here

     if (isMapOnly)
       AvroJob.setMapOutputSchema(outputConf, schema);
     else
       AvroJob.setOutputSchema(outputConf, schema);
   }
   OutputFormat outputFormat = outputConf.getOutputFormat();
   return outputFormat.getRecordWriter(fs, outputConf, fileName, arg3);
   }  
View Full Code Here

   Schema schema = schemaList.get(nameOutput+"_SCHEMA");
   JobConf outputConf = new JobConf(job);
   outputConf.setOutputFormat(getNamedOutputFormatClass(job, nameOutput));
   if(schema!=null)
    AvroJob.setOutputSchema(outputConf,schema);
   OutputFormat outputFormat = outputConf.getOutputFormat();
   return outputFormat.getRecordWriter(fs, outputConf, fileName, arg3);
   }  
View Full Code Here

        // The workpath is set to a unique-per-store subdirectory of
        // the current working directory.
        String workPath = outputConf.get("mapred.work.output.dir");
        outputConf.set("mapred.work.output.dir",
                       new Path(workPath, tmpPath).toString());
        OutputFormat outputFormat = outputConf.getOutputFormat();

        // Generate a unique part name (part-<task_partition_number>).
        String fileName = getPartName(outputConf);
       
        // create a new record writer
        writer = outputFormat.getRecordWriter(FileSystem.get(outputConf),
                                              outputConf, fileName, reporter);

        // return an output collector using the writer we just created.
        return new StoreFuncAdaptor(new OutputCollector()
            {
View Full Code Here

     if (isMapOnly)
       AvroJob.setMapOutputSchema(outputConf, schema);
     else
       AvroJob.setOutputSchema(outputConf, schema);
   }
   OutputFormat outputFormat = outputConf.getOutputFormat();
   return outputFormat.getRecordWriter(fs, outputConf, fileName, arg3);
   }  
View Full Code Here

        this.attempt = attempt;

        if (directWrite) {
            jobConf.set("mapreduce.task.attempt.id", attempt.toString());

            OutputFormat outFormat = jobConf.getOutputFormat();

            writer = outFormat.getRecordWriter(null, jobConf, fileName, Reporter.NULL);
        }
        else
            writer = null;
    }
View Full Code Here

TOP

Related Classes of org.apache.hadoop.mapred.OutputFormat

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.