Package org.apache.sqoop.job.etl

Examples of org.apache.sqoop.job.etl.HdfsExportPartitioner$OneBlockInfo


    FileUtils.mkdirs(indir);
    createTextInput(null);
    Configuration conf = new Configuration();
    conf.set(JobConstants.HADOOP_INPUTDIR, indir);

    HdfsExportPartitioner partitioner = new HdfsExportPartitioner();
    PrefixContext prefixContext = new PrefixContext(conf, "");
    int[] partitionValues = {2, 3, 4, 5, 7, 8, 9, 10, 11, 12, 13, 17};

    for(int maxPartitions : partitionValues) {
      PartitionerContext partCont = new PartitionerContext(prefixContext, maxPartitions, null);
      List<Partition> partitionList = partitioner.getPartitions(partCont, null, null);
      assertTrue(partitionList.size()<=maxPartitions);
    }
  }
View Full Code Here


    FileUtils.mkdirs(indir);
    createTextInput(null);
    Configuration conf = new Configuration();
    conf.set(JobConstants.HADOOP_INPUTDIR, indir);

    HdfsExportPartitioner partitioner = new HdfsExportPartitioner();
    PrefixContext prefixContext = new PrefixContext(conf, "");
    int[] partitionValues = {2, 3, 4, 5, 7, 8, 9, 10, 11, 12, 13, 17};

    for(int maxPartitions : partitionValues) {
      PartitionerContext partCont = new PartitionerContext(prefixContext, maxPartitions);
      List<Partition> partitionList = partitioner.getPartitions(partCont, null, null);
      assertTrue(partitionList.size()<=maxPartitions);
    }
  }
View Full Code Here

TOP

Related Classes of org.apache.sqoop.job.etl.HdfsExportPartitioner$OneBlockInfo

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.