Package org.apache.sqoop.framework

Examples of org.apache.sqoop.framework.SubmissionRequest


  }

  private void testImportCompressionInner(OutputCompression comprssionFormat,
    String expectedCodecName, boolean expectedCompressionFlag) {
    MapreduceExecutionEngine executionEngine = new MapreduceExecutionEngine();
    SubmissionRequest request = executionEngine.createSubmissionRequest();
    ImportJobConfiguration jobConf = new ImportJobConfiguration();
    jobConf.output.outputFormat = OutputFormat.TEXT_FILE;
    jobConf.output.compression = comprssionFormat;
    request.setConfigFrameworkJob(jobConf);
    request.setConnectorCallbacks(new Importer(Initializer.class,
      Partitioner.class, Extractor.class, Destroyer.class) {
    });
    executionEngine.prepareImportSubmission(request);

    MutableMapContext context = request.getFrameworkContext();
    final String obtainedCodecName = context.getString(
      JobConstants.HADOOP_COMPRESS_CODEC);
    final boolean obtainedCodecFlag =
      context.getBoolean(JobConstants.HADOOP_COMPRESS, false);
    assertEquals("Unexpected codec name was returned", obtainedCodecName,
View Full Code Here

TOP

Related Classes of org.apache.sqoop.framework.SubmissionRequest

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.